text:
# PCA-Alignment-Cleaning
Simulations and validations for simple PCA neurophysiological data alignment cleaning strategy.

## Overview ##

This repository contains a simple tool for "cleaning" misaligned neurophysiological time-series which are meant to be event-locked to a fixed behavioral event of interest. For example, a behavior of interest may be captured using a video camera with a framerate of 30 Hz, while the relevant timescale for spiking processes of interest is orders of magnitude faster (300 - 3000 Hz). The jitter introduced by misalignment even within a single frame (by comparison to the spike timescale) is a noise source for the physiological data of interest. Fortunately, we can correct for this noise source to remove jitter from recovered single-trial spike rate estimates by implementing a simple PCA noise rejection step that aims to reconstruct the correctly-aligned data **under following assumption:** _we can "discard" part of the data in a principled way, such that the reconstruction error contains the unwanted misalignment noise._

### Sub-objective ###

In order for this to be a useful utility for neurophysiological behavior analysis in preclinical studies, we would like to achieve the following:

_Identify a "robust" surface manifold that relates **the optimal retained data variance** based on a combination of known or estimable parameters such as:_

- [ ] Number of channels
- [ ] Number of trials
- [ ] Expected jitter standard deviation
- [ ] Expected non-neural noise variance
- [ ] Total number of "generative" factors present for spike rates

---

## Use ##

#### Where to Start? ####

There are pretty much just two steps to follow:

1. If not already cloned to the same folder containing this repository, add the following repository at that location (or modify `default.Repos()` local path to reflect its location; note that the local name on my PC is just `'Projects/Utilities'`, so if you clone using the default repo name (`'Matlab_Utilities'`) make sure to reflect that):
   https://github.com/m053m716/Matlab_Utilities
   * This should be the only major **dependency** the repository has, and it's not really that important other than for using the `save` functions in `main.mlx`.
2. Literally, just click through `main.mlx` in a Matlab release that supports the Matlab `Live Editor` (likely, `Matlab R2016a` and beyond).

---

## Simulation Source Factors ##

The factors used for simulation of spike trains are derived from a reach-to-grasp experiment recorded from a rat reaching to retrieve a pellet, in alignment to the first video frame on which the rat closed its paw.

### Original Factors ###

![](https://media.githubusercontent.com/media/Cortical-Plasticity-Lab/PCA-Alignment-Cleaning/master/docs/Original_Factors.png)

_The original factors are scaled as coefficients between -1 and 1._

### Offset Factors ###

![](https://media.githubusercontent.com/media/Cortical-Plasticity-Lab/PCA-Alignment-Cleaning/master/docs/Offset_Factors.png)

_Each factor offset is just to make them non-negative for all points, so that they can be scaled to physiologically plausible spike rate parameters._

### Scaled Factors ###

![](https://media.githubusercontent.com/media/Cortical-Plasticity-Lab/PCA-Alignment-Cleaning/master/docs/Scaled_Factors.png)

_After the offset, factors are rescaled so that their units change to spikes/second. All subsequent simulations are weighted combinations of these four factors._

---

## Example Output ##

### Simulated Rate Trial Overlays ###

![](https://media.githubusercontent.com/media/Cortical-Plasticity-Lab/PCA-Alignment-Cleaning/master/docs/Example_Original_Output.png)

Here is an example of fairly noisy data with jitter on the order of 20-ms (low-noise case) up to 120-ms (high-noise case) for a realistic number of trials (N = 25). Each semi-opaque trajectory represents an individual trial for that recording "channel," which is some weighted combination of the **[scaled factors](#Scaled-Factors)** Note that particularly in rehabilitation experiments, it is difficult to get a high number of trials for a variety of reasons, but particularly if the animal belongs to an injury group they may not be very motivated to perform hundreds of behavioral trials.

### Cleaned Rate Trial Overlays ###

![](https://media.githubusercontent.com/media/Cortical-Plasticity-Lab/PCA-Alignment-Cleaning/master/docs/Example_Cleaned_Output.png)

Using the same **[simulated data](#simulated-rate-trial-overlays)**, we retain the top-3 (_top: low-noise_) or top-7 (_bottom: high-noise_) principal components and reconstruct the simulated spike rates. The number of principal components is set using a threshold based on the total percent of the variance explained by the retained principal components. **Part of the goal of this small project is to identify a "robust" surface manifold based on parameters such as the number of channels, number of trials, noise parameters, and total number of "generative" factors present for spike rates.**


text:
# Semantic Dev Tech Test  [![Build Status](https://travis-ci.com/EBISPOT/semantic_dev_tech_test.svg?branch=main)](https://travis-ci.com/EBISPOT/semantic_dev_tech_test)

## Background

This test requires background knowledge of Web Ontology Language (OWL), RDF and/or Cypher. The following background reading may be useful.

* [OWL primer](https://www.w3.org/TR/owl2-primer/)
* [Sparql primer](https://docs.data.world/tutorials/sparql/)
* [Intro to Neo4J Cypher](https://neo4j.com/docs/getting-started/current/cypher-intro/patterns-in-practice/#cypher-intro-patterns-in-practice-matching-patterns)

## TEST

This GitHub Repository has:

 *  An OWL file with an ontology of wines (src/resources/wine.owl)
 *  A script for loading OWL files into a customised Neo4j database.
 *  A `.travis.yml` file that launches a containerised Neo4j database and loads the OWL file into it.

### Exercise 1:

Explore the OWL file in [Protege](http://protegeproject.github.io/protege/installation/) and run a reasoner.

![image](https://user-images.githubusercontent.com/112839/97699007-60bd2f00-1aa1-11eb-8e1a-ab8a5b1c98ac.png)

* Please explain, in a few clear sentences, why the reasoner classifies Barolo as an Italian wine.

Make sure docker has access to the location where you've checked out this repo.

Launch a local copy of the DB and load the ontology

```sh
docker run -d -p:7474:7474 -p 7687:7687 --volume=`pwd`:/import/  --env-file ./src/resources/env.list matentzn/vfb-prod
```

Wait until you can browse at http://localhost:7474

Then run:

```sh
python3 src/load_db.py file:///src/resources/wine.owl
```

You should now be able to browse a neo4j representation of the ontology at http://localhost:7474

* Compare the original OWL representation of the wine ontology and its representation as a Neo4j labelled property graph and document the transformation in your own words. How do the representations differ? How was the OWL representation mapped into the Neo4j representation?

### Exercise 2:

Using a forked copy of this repo as a base, write an API library, preferably in Python\*, to query the database with methods to:

* List all grape growing regions (in the ontology)
* List all varietals  (in the ontology)
* List all types (classes) of wine  (in the ontology)
* Query for wine types and individual wines by: colour, varietal, region

Your code should:
  * have at least 3 unit tests, ideally with continuous integration via Travis or GitHub Actions
  * be well documented

If you prefer, you may base your API on SPARQL queries of the OWL ontology in place of Cypher queries of the Neo4J database.

You should include clear documentation on how to use your API.

\* While we would prefer a solution in Python, we will accept solutions in you language of choice if you are not comfortable with writing Python.

### Exercise 3:

Write a couple of paragraphs on how you might extend the OWL modelling and content to build a knowledge base of individual wines that would be useful to consumers trying to decide what wine to buy.

## Submitting your completed test

Please make a *private* fork of this repo & share it with @dosumis

repository: EBISPOT/semdevtest

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: EBISPOT/semdevtest


text:
# Caterpillar

Given the recent interest in [progressive web
apps](https://infrequently.org/2015/06/progressive-apps-escaping-tabs-without-losing-our-soul/),
this project investigates whether it is feasible to automatically port some
[Chrome Apps](https://developer.chrome.com/apps/about_apps) to web sites that
run offline in Chrome and other modern browsers.  This code is extremely
experimental and not intended for real-world use.

## Installation

Extract the code into a folder. Install dependencies with pip and npm:

    $ pip install -r requirements.txt && npm install

## Usage

```bash
./caterpillar.py config -i config.json
./caterpillar.py convert -c config.json my-chrome-app/ my-web-app/
```

This will convert an unpackaged Chrome App `my-chrome-app/` into a progressive
web app `my-web-app/` and generate a conversion report inside a subdirectory of
`my-web-app/` (depending on the configuration options you set).

For more detailed documentation, see [the manual](docs/manual.md).

## Running Tests

Running all tests:

```bash
./run_tests.py
```

Running Python tests only:

```bash
./run_tests.py py
```

Running specific Python tests:

```bash
./run_tests.py py module_test
./run_tests.py py module_test.TestClass
./run_tests.py py module_test.TestClass.test_function
```

Running JavaScript tests only:

```bash
./run_tests.py js
```

The JavaScript tests assume you have Chrome and Firefox (version 45 or greater).
If you want to run the tests on different browsers, edit karma.conf.js.

## Disclaimer

This is not an official Google product (experimental or otherwise), it is just
code that happens to be owned by Google.

Copyright 2016 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

> <http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

repository: anirudhcmohan/caterpillar

branch_name: refs/heads/master

repo_name: anirudhcmohan/caterpillar


text:
---
sidebar_position: 4
title: View Server Info
---

This command allows you to view information about the server.

**Trigger Type:** `Regex`

**Trigger:** `\A(-|<@!?204255221017214977>\s*)(server|guild)(-?info)?(\s+|\z)`

**Usage:**
`-serverinfo`
(Use `-server icon` to view the server icon).

```go
{{/*
	This command allows you to view information about the server.
	Usage: `-serverinfo`. (Use `-server icon` to view the server icon).

	Recommended trigger: Regex trigger with trigger `\A(-|<@!?204255221017214977>\s*)(server|guild)(-?info)?(\s+|\z)`
*/}}

{{ $icon := "" }}
{{ $name := printf "%s (%d)" .Guild.Name .Guild.ID }}
{{ if .Guild.Icon }}
	{{ $ext := "webp" }}
	{{ if eq (slice .Guild.Icon 0 2) "a_" }} {{ $ext = "gif" }} {{ end }}
	{{ $icon = printf "https://cdn.discordapp.com/icons/%d/%s.%s" .Guild.ID .Guild.Icon $ext }}
{{ end }}

{{ $owner := userArg .Guild.OwnerID }}
{{ $levels := cslice
	"None: Unrestricted"
	"Low: Must have a verified email on their Discord account."
	"Medium: Must also be registered on Discord for longer than 5 minutes."
	"(╯°□°）╯︵ ┻━┻: Must also be a member of this server for longer than 10 minutes."
	"┻━┻ ﾐヽ(ಠ益ಠ)ノ彡┻━┻: Must have a verified phone on their Discord account."
}}
{{ $afk := "n/a" }}
{{ if .Guild.AfkChannelID }}
	{{ $afk = printf "**Channel:** <#%d> (%d)\n**Timeout:** %s"
		.Guild.AfkChannelID
		.Guild.AfkChannelID
		(humanizeDurationSeconds (toDuration (mult .Guild.AfkTimeout .TimeSecond)))
	}}
{{ end }}
{{ $embedsEnabled := "No" }}
{{ if .Guild.EmbedEnabled }} {{ $embedsEnabled = "Yes" }} {{ end }}
{{ $createdAt := div .Guild.ID 4194304 | add<PHONE_NUMBER>000 | mult 1000000 | toDuration | (newDate 1970 1 1 0 0 0).Add }}

{{ $infoEmbed := cembed
	"author" (sdict "name" $name "icon_url" $icon)
	"color" 14232643
	"thumbnail" (sdict "url" $icon)
	"fields" (cslice
		(sdict "name" "❯ Verification Level" "value" (index $levels .Guild.VerificationLevel))
		(sdict "name" "❯ Region" "value" .Guild.Region)
		(sdict "name" "❯ Members" "value" (printf "**• Total:** %d Members\n**• Online:** %d Members" .Guild.MemberCount onlineCount))
		(sdict "name" "❯ Roles" "value" (printf "**• Total:** %d\nUse `-listroles` to list all roles." (len .Guild.Roles)))
		(sdict "name" "❯ Owner" "value" (printf "%s (%d)" $owner.String $owner.ID))
		(sdict "name" "❯ AFK" "value" $afk)
		(sdict "name" "❯ Embeds Enabled" "value" $embedsEnabled)
	)
	"footer" (sdict "text" "Created at")
	"timestamp" $createdAt
}}

{{ if .CmdArgs }}
	{{ if eq (index .CmdArgs 0) "icon" }}
		{{ sendMessage nil (cembed
			"author" (sdict "name" $name "icon_url" $icon)
			"title" "❯ Server Icon"
			"color" 14232643
			"image" (sdict "url" $icon)
		) }}
	{{ else }}
		{{ sendMessage nil $infoEmbed }}
	{{ end }}
{{ else }}
	{{ sendMessage nil $infoEmbed }}
{{ end }}
```

license: MIT


text:
# GAME_MK1
> Game made with python, you have to destroy the blocks by bouncing off the ball against them while avoiding letting the ball go down below the bar.

## Table of content
* [Todo](#todo)
* [Setup](#setup)
* [Contributors](#contributors)

## Todo

- [ ] 	Better ball
- [ ]	Improve colors
- [ ]	Improve overall performance

## Setup
> You need to have install python Python 3.6.9 and pip3
> After install the modules: 'pygame', and that's it, that's all you need, after you just need to download the code and run it! :)

## Contributors
* Vidal, Facundo
* Vidal, Tomás

gha_language: Python

gha_license_id: MIT


text:
> [Go to French version](/fr/Règlements/Décrets,%20ordonnances%20et%20règlements%20statutaires/2002/416.md)

# Regulations Respecting Applications for Ministerial Review — Miscarriages of Justice

**SOR/2002-416**

Enabling authorities:
- [CRIMINAL CODE](/en/Acts/Revised%20Statutes%20of%20Canada/C/C-46.md)

Date registered: 21 November 2002

----------

Her Excellency the Governor General in Council, on the recommendation of the Minister of Justice, pursuant to subsection 696.1(2)[a] and section 696.6[a] of the [Criminal Code](/en/Acts/Revised%20Statutes%20of%20Canada/C/C-46.md), hereby makes the annexed Regulations Respecting Applications for Ministerial Review — Miscarriages of Justice.

a: S.C. 2002, c. 13, s. 71

## Interpretation

**1** The following definitions apply in these Regulations.

***Code*** means the [Criminal Code](/en/Acts/Revised%20Statutes%20of%20Canada/C/C-46.md). (*Code*)

***Minister*** means the Minister of Justice. (*ministre*)

## Application

**2**

- **(1)** For the purposes of subsection 696.1(2) of the Code, an application for ministerial review under Part XXI.1 of the Code shall be in the form set out in the schedule and contain the following information:
	- **(a)** with respect to the applicant,
		- **(i)** the applicant’s name, including any alias or former name,
		- **(ii)** the applicant’s address, date of birth and, if any, the number assigned to the applicant under the Royal Canadian Mounted Police Automated Fingerprint Identification System,
		- **(iii)** the name, address and telephone number of the person making the application on the applicant’s behalf, if any,
		- **(iv)** whether the alleged miscarriage of justice relates to a conviction on an offence punishable on summary conviction or on an indictable offence, or, in the case of a finding of dangerous offender or long-term offender under Part XXIV of the Code, particulars of the finding, and
		- **(v)** whether the applicant is in custody;
	- **(b)** with respect to any pre-trial hearings,
		- **(i)** the date of the preliminary inquiry, if any,
		- **(ii)** the court and its address, and
		- **(iii)** the number, type and date of any pre-trial motions, as well as the court decision on those motions;
	- **(c)** with respect to the trial,
		- **(i)** the date on which it started,
		- **(ii)** the court and its address, the plea entered at trial, the mode of trial and the date of the conviction and that of sentencing,
		- **(iii)** the names and addresses of all counsel involved in the trial, and
		- **(iv)** the number, type and date of any motions made, as well as the date of the court decision on those motions;
	- **(d)** particulars regarding any subsequent appeals to the court of appeal or the Supreme Court of Canada;
	- **(e)** the grounds for the application; and
	- **(f)** a description of the new matters of significance that support the application, if any.

- **(2)** The application must be accompanied by the following documents:
	- **(a)** the applicant’s signed consent authorizing the Minister
		- **(i)** to have access to the applicant’s personal information that is required for reviewing the application, and
		- **(ii)** to disclose to any person or body the applicant’s personal information obtained in the course of reviewing the application in order for the Minister to obtain from that person or body any information that is required for reviewing the application;
	- **(b)** a true copy of the information or indictment;
	- **(c)** a true copy of the trial transcript, including any preliminary hearings;
	- **(d)** a true copy of all material filed by the defence counsel and Crown counsel in support of any pre-trial and trial motions;
	- **(e)** a true copy of all factums filed on appeal;
	- **(f)** a true copy of all court decisions; and
	- **(g)** any other document that the applicant considers necessary for the review of the application.
> SOR/2011-97, s. 1.

## Review of the Application

**3** On receipt of an application completed in accordance with section 2, the Minister shall
- **(a)** send an acknowledgment letter to the applicant and the person acting on the applicant’s behalf, if any; and
- **(b)** conduct a preliminary assessment of the application.

**4**

- **(1)** After the preliminary assessment has been completed, the Minister
	- **(a)** shall conduct an investigation in respect of the application if the Minister determines that there may be a reasonable basis to conclude that a miscarriage of justice likely occurred; or
	- **(b)** shall not conduct an investigation if the Minister
		- **(i)** is satisfied that there is a reasonable basis to conclude that a miscarriage of justice likely occurred and that there is an urgent need for a decision to be made under paragraph 696.3(3)(a) of the Code for humanitarian reasons or to avoid a blatant continued prejudice to the applicant, or
		- **(ii)** is satisfied that there is no reasonable basis to conclude that a miscarriage of justice likely occurred.

- **(2)** The Minister shall send a notice to the applicant and to the person acting on the applicant’s behalf, if any, indicating whether or not an investigation will be conducted under subsection (1).

- **(3)** If the Minister does not conduct an investigation for the reason described in subparagraph (1)(b)(ii), the notice under subsection (2) shall indicate that the applicant may provide further information in support of the application within one year after the date on which the notice was sent.

- **(4)** If the applicant fails, within the period prescribed in subsection (3), to provide further information, the Minister shall inform the applicant in writing that no investigation will be conducted.

- **(5)** If further information in support of the application is provided after the period prescribed in subsection (3) has expired, the Minister shall conduct a new preliminary assessment of the application under section 3.

**5**

- **(1)** After completing an investigation under paragraph 4(1)(a), the Minister shall prepare an investigation report and provide a copy of it to the applicant and to the person acting on the applicant’s behalf, if any. The Minister shall indicate in writing that the applicant may provide further information in support of the application within one year after the date on which the investigation report is sent.

- **(2)** If the applicant fails, within the period prescribed in subsection (1), to provide any further information, or if the applicant indicates in writing that no further information will be provided in support of the application, the Minister may proceed to make a decision under subsection 696.3(3) of the Code.

**6** The Minister shall provide a copy of the Minister’s decision made under subsection 696.3(3) of the Code to the applicant and to the person acting on the applicant’s behalf, if any.

## Annual Report

**7** An annual report submitted under section 696.5 of the Code shall contain the following information in respect of the financial year under review in the report:
- **(a)** the number of applications made to the Minister;
- **(b)** the number of applications that have been abandoned or that are incomplete;
- **(c)** the number of applications that are at the preliminary assessment stage;
- **(d)** the number of applications that are at the investigation stage;
- **(e)** the number of decisions that the Minister has made under subsection 696.3(3) of the Code; and
- **(f)** any other information that the Minister considers appropriate.

## Coming into Force

[*]**8** These Regulations come into force on the day on which section 71 of the Criminal Law Amendment Act, 2001, chapter 13 of the Statutes of Canada, 2002, comes into force.

*: [Note: Regulations in force November 25, 2002, *see* SI/2002-106.]

### **SCHEDULE**
**(Subsection 2(1))**
#### APPLICATION FOR MINISTERIAL REVIEW

**Section A  **
**PERSONAL INFORMATION**

Name
Alias or Former Name

Address

Date of Birth
RCMP Automated Fingerprint Identification System No. (if any)

Type of Conviction (Summary or Indictable or Finding of Dangerous Offender or Long-term Offender)
In Custody/Not in Custody

Person Making Application on Applicant’s Behalf (if any)
Representative’s Address

Telephone Number

**Section B**
**SUPPORTING INFORMATION**

**PRE-TRIAL HEARING**

Date of Preliminary Inquiry
Court and Its Address

Date of Other Pre-Trial Motions (eg. Bail Hearing, *Charter* Application, etc.)

Particulars Relating to Motions

**TRIAL**

Date of Trial
Court and Its Address
Plea (Guilty or Not Guilty)

Names and Addresses of Counsel
Mode of Trial

Date of Conviction
Date of Sentence

Particulars Relating to Motions

**COURT OF APPEAL**

Date Appeal Filed
Date of Hearing

Date of Decision
Address of Court

**SUPREME COURT OF CANADA**

Date Appeal Filed
Date of Hearing
Date of Decision

**GROUNDS FOR APPLICATION**

**DESCRIPTION OF THE NEW MATTERS OF SIGNIFICANCE THAT SUPPORT THIS APPLICATION**

**Section C **
**REQUIRED DOCUMENTS (Mandatory)**

Applicant’s Consent to the Release of Personal Information

**(If unable to provide any of the following, please explain why.)**

**PRE-TRIAL**

True Copy of Information or Indictment

True Copy of Motion Material Filed by Defence

True Copy of Motion Material Filed by Crown

True Copy of Transcript of Proceedings

**TRIAL**

True Copy of Indictment

True Copy of Material Filed by Defence

True Copy of Material Filed by Crown

True Copy of Transcript of Proceedings

True Copy of Decision

**APPEALS**

True Copy of Appellant’s Factum

True Copy of Respondent’s Factum

True Copy of Appeal Court Decision

True Copy of Supreme Court of Canada Decision

**Section D**
**OTHER SUPPORTING EVIDENCE (Optional)**

**(Affidavits, letters, photographs, plans, drawings, technical and scientific reports, etc.)**

> SOR/2011-97, s. 2(E).

repository: TravisMadill/CanadianLaws

path: /en/Regulations/Statutory Orders and Regulations/2002/416.md

repo_name: TravisMadill/CanadianLaws


text:
DEPRECATED: Use https://github.com/fishbrain/shop-dot-fishbrain-dot-com-redirects instead.

# Edge-rewrite - a rewrite engine running in Lambda@Edge

This project aims to provide a mechanism for running URI/URL rewriting capabilities leveraging Lambda@Edge.

In the case where you are deploying your website behind CloudFront, you can now rewrite URLs at the CDN edge and avoid wasted CPU cycles on your backend servers.

# Rule format

The rule format is similar to the format used by mod_rewrite.

```
<REGEX> <OPTIONAL REPLACEMENT> [<FLAGS>]
```

The first part of a rule is a regular expression, followed by an optional new path or URL and optional flags.

The regular expression match can contain capturing parenthesis and the capture groups can be used in the replacement expression.

The regular expression can be negated by adding an exclamation mark (!) in front of the expression.

The replacement value is used the specify the new URI or URL to return. If a dash is used as the replacement value, no replacement will take place. This can be used in conjunction with the last flag to stop processing rules.

Flags can be used to change the behaviour of the rewrite rules.

The following flags are available:

`L`: This indicates that if this rule matches, no further rules should be applied.

`NC`: When evaluating the regular expression, ignore case.

`R`: The redirect flag. Defaults to a 301 redirect, although a different code can be specified by adding the code to the flag with an equal sign (eg: R=302).

`F`: The forbidden flag. Will return a 403 error message.

`G`: The gone flag, will return a 410 error message.

`H=<host regex>`: This flag will match a regular expression against the host HTTP header.

Unless short-circuited with the last flag, all rules are tested, with the last rule that matches determining the final outcome.

Sample rules:

```
^/oldpath/(\\d*)/(.*)$ /newpath/$2/$1 [L]
!^/oldpath.*$ http://www.example.com [R=302,L,NC]
^/topsecret.*$ [F,L]
^/deadlink.*$ [G]
^/foo$ /bar [H=^baz\.com$]
```

# Operation

The code will look for a file called 'rules.json' in the root of this project. It should contain either a JSON array of rules (see rules.sample.json), or a quoted URL (on a single line, see rules.sample_url.json) that points to a JSON file that contains an array of rules.

The rules.json file will be packaged inside the lambda as part of the packaging process.

When using a URL, rules are dynamically loaded at runtime from the specified URL in the rules.json file, and will be cached for 600 seconds. This allows you to update the rules without re-deploying the lambda.

# Installation

```
npm install serverless -g
npm install
```

# Deployment

```
sls deploy -s prod --region us-east-1 --aws-profile prod
```

This assumes you have AWS credentials setup in your profile. Prior to deploying, edit the serverless.yml to suit your needs (eg: update the profile name).

Once the function is deployed, it can be associated to a CloudFront behaviour by specifying the versioned ARN to the behavior.

This function has been tested to run on the `viewer request` phase of Lambda@Edge. It should also work on origin requests (which would have the benefit of caching responses).

# Acknowledgements

Based on https://github.com/tinganho/connect-modrewrite/blob/master/index.js

repository: fishbrain/edge-rewrite

gha_language: JavaScript

repo_name: fishbrain/edge-rewrite


text:
# Model Generator

Generate models to different languages based on Doctype.

## Motive

During development, the doctypes are defined usually by the backend team. Front-end development teams will require to write the models for these doctypes in the front-end as models which usually counts much as manual and repetitive task.

Since it's repetitive and somewhat an annoying task, I saw an opportunity to some extent automate this task with some minor configurations in the doctype and refactoring in the frontend which will hopefully reduce the time wasted achieving this task.

### Doctypes included

- Model Generator
- Language Model Configuration

#### Model Generator Demo

![Demo](demo.gif)

#### Language Model Configuration

A doctype to configure the templates and data types for each language. By default, there are two fixtures defined:
- Dart/Flutter
- TS/JS

Configurations include:

- **Data Type Map**. For instance, `Data` fieldtype is a `String` in Dart/Flutter.
- Variable and type template. For instance for *Dart*:
  ```
  {{fieldtype}} {{fieldname}};
  ```
  which results in:
  ```dart
  String fullName;
  ```
- **Signature Start** which indicates the beginning of the model like *class* or *interface*.
- **Signature End** which indicates the end of the model of a *class* or *interface*.
- **Child Doctype Template** which indicates the representation of a child doctype in a model. For instance in *Dart*:
   ```
   List<{{child_doctype}}>
   ```
   which results in:
   ```dart
   List<Role> roles;
   ```
- **To Camel Case** which converts the field names from the standard naming in Frappé, snake-case, to camel-case which is the convention, *Dart*, for instance.
- **Decorator (Only used if To Camel Case is checked** where this is used for languages (Dart or C#, for instance), to convert the naming between backend and frontend.

### API
In addition to utilizing this app through Frappé UI, it can also be utilized using an endpoint (`POST`). Example:
```json
{
  "cmd": "model_generator.api.generate_model",
  "lang_config": "Dart",
  "include_std_fields": 0,
  "fields": {
    "User": [
      {
        "fieldname": "enabled",
        "fieldtype": "Check"
      },
      {
        "fieldname": "email",
        "fieldtype": "Data"
      },
      {
        "fieldname": "first_name",
        "fieldtype": "Data"
      },
      {
        "fieldname": "middle_name",
        "fieldtype": "Data"
      },
      {
        "fieldname": "last_name",
        "fieldtype": "Data"
      },
      {
        "fieldname": "full_name",
        "fieldtype": "Data"
      },
      {
        "fieldname": "send_welcome_email",
        "fieldtype": "Check"
      },
      {
        "fieldname": "unsubscribed",
        "fieldtype": "Check"
      },
      {
        "fieldname": "username",
        "fieldtype": "Data"
      },
      {
        "fieldname": "language",
        "fieldtype": "Link"
      },
      {
        "fieldname": "time_zone",
        "fieldtype": "Select"
      },
      {
        "fieldname": "user_image",
        "fieldtype": "Attach Image"
      },
      {
        "fieldname": "role_profile_name",
        "fieldtype": "Link"
      },
      {
        "fieldname": "gender",
        "fieldtype": "Link"
      },
      {
        "fieldname": "phone",
        "fieldtype": "Data"
      },
      {
        "fieldname": "mobile_no",
        "fieldtype": "Data"
      },
      {
        "fieldname": "birth_date",
        "fieldtype": "Date"
      },
      {
        "fieldname": "location",
        "fieldtype": "Data"
      },
      {
        "fieldname": "banner_image",
        "fieldtype": "Attach Image"
      },
      {
        "fieldname": "interest",
        "fieldtype": "Small Text"
      },
      {
        "fieldname": "bio",
        "fieldtype": "Small Text"
      },
      {
        "fieldname": "mute_sounds",
        "fieldtype": "Check"
      },
      {
        "fieldname": "new_password",
        "fieldtype": "Password"
      },
      {
        "fieldname": "logout_all_sessions",
        "fieldtype": "Check"
      },
      {
        "fieldname": "reset_password_key",
        "fieldtype": "Data"
      },
      {
        "fieldname": "last_password_reset_date",
        "fieldtype": "Date"
      },
      {
        "fieldname": "redirect_url",
        "fieldtype": "Small Text"
      },
      {
        "fieldname": "document_follow_notify",
        "fieldtype": "Check"
      },
      {
        "fieldname": "document_follow_frequency",
        "fieldtype": "Select"
      },
      {
        "fieldname": "thread_notify",
        "fieldtype": "Check"
      },
      {
        "fieldname": "send_me_a_copy",
        "fieldtype": "Check"
      },
      {
        "fieldname": "allowed_in_mentions",
        "fieldtype": "Check"
      },
      {
        "fieldname": "email_signature",
        "fieldtype": "Small Text"
      },
      {
        "fieldname": "home_settings",
        "fieldtype": "Code"
      },
      {
        "fieldname": "simultaneous_sessions",
        "fieldtype": "Int"
      },
      {
        "fieldname": "user_type",
        "fieldtype": "Select"
      },
      {
        "fieldname": "login_after",
        "fieldtype": "Int"
      },
      {
        "fieldname": "login_before",
        "fieldtype": "Int"
      },
      {
        "fieldname": "restrict_ip",
        "fieldtype": "Data"
      },
      {
        "fieldname": "bypass_restrict_ip_check_if_2fa_enabled",
        "fieldtype": "Check"
      },
      {
        "fieldname": "last_login",
        "fieldtype": "Read Only"
      },
      {
        "fieldname": "last_ip",
        "fieldtype": "Read Only"
      },
      {
        "fieldname": "last_active",
        "fieldtype": "Datetime"
      },
      {
        "fieldname": "last_known_versions",
        "fieldtype": "Text"
      },
      {
        "fieldname": "api_key",
        "fieldtype": "Data"
      },
      {
        "fieldname": "api_secret",
        "fieldtype": "Password"
      },
      {
        "doctype": "Has Role",
        "fieldname": "roles",
        "fields": [
          {
            "fieldname": "role",
            "fieldtype": "Link"
          }
        ]
      },
      {
        "doctype": "User Email",
        "fieldname": "user_emails",
        "fields": [
          {
            "fieldname": "email_account",
            "fieldtype": "Link"
          },
          {
            "fieldname": "email_id",
            "fieldtype": "Data"
          },
          {
            "fieldname": "awaiting_password",
            "fieldtype": "Check"
          },
          {
            "fieldname": "enable_outgoing",
            "fieldtype": "Check"
          }
        ]
      },
      {
        "doctype": "Block Module",
        "fieldname": "block_modules",
        "fields": [
          {
            "fieldname": "module",
            "fieldtype": "Data"
          }
        ]
      },
      {
        "doctype": "DefaultValue",
        "fieldname": "defaults",
        "fields": [
          {
            "fieldname": "defkey",
            "fieldtype": "Data"
          },
          {
            "fieldname": "defvalue",
            "fieldtype": "Text"
          }
        ]
      },
      {
        "doctype": "User Social Login",
        "fieldname": "social_logins",
        "fields": [
          {
            "fieldname": "provider",
            "fieldtype": "Data"
          },
          {
            "fieldname": "username",
            "fieldtype": "Data"
          },
          {
            "fieldname": "userid",
            "fieldtype": "Data"
          }
        ]
      }
    ]
  }
}
```

## Contribution
Contributions in all shapes, forms and sizes are welcome :)

## License

MIT

gha_license_id: NOASSERTION


text:
# Combat Manager

> A generic tabletop combat manager

Combat Manager (clever name to come eventually) is a lightweight, generic tabletop RPG combat UI to assist dungeon/game masters when running tabletop games. The design goals are:

* Clear, effective UI
* No account necessary (all data locally saved)
* Fault tolerance (accidental refreshes don't lose any data)
* Very fast load and run time
* Generic enough to support most games

This project is a work in progress. See the [roadmap](#roadmap) for functionality targets. When a stable-enough-to-use version is reached, there will be a publicly available hosted copy, so no need to run it yourself if you don't need to!

## Development / Running

This project uses Nuxt to generate a standalone front-end application. For more information, see the [Nuxt.js docs](https://nuxtjs.org).

``` bash
# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm start

# generate static project
$ npm run generate
```

## Roadmap

* [ ] Generic stat definitions
* [ ] Saveable default player data
* [ ] Customizable monster library
* [ ] Combat state autosave
* [ ] Improved styling and UX
* [ ] Import/Export local data

repository: twisterghost/combat-manager

repo_name: twisterghost/combat-manager


text:
# Stone Soup PotLuck

#### Epicodus Android Independent Project, November/3/2017

#### By **Kimberly H. Lu**

[Github repository](https://github.com/kchamp45/StoneSoup2)

Welcome to the ultimate website for those who love soups!  This application allows you to find inspirations from a list of amazing soups so you can gather your ingredients and other cook enthusiasts to cook and socialize.  The application will also allow you to browse soups and determine their ingredients before trying the recipe out.

![app-screenshot](https://github.com/kchamp45/StoneSoup/blob/master/app/src/main/res/drawable/soup.jpg?raw=true)

## Setup/Installation Requirements

This application is intended to be used on your mobile Android device.  To view on your desktop, in your computer terminal, please navigate to your desktop and execute:  $ git clone https://github.com/kchamp45/StoneSoup2.  You will need to download Android Studio. Before installing Android Studio, you will need a JDK 6 or higher (please verify by typing in CLI: $ javac -version). Follow the instructions here https://developer.android.com/studio/archive.html to download Android Studio.  Please note that the AS version used in this app is 2.3.2. Higher or lower version of AS may result in poorer performance.

## Known Bugs

There are no known bugs.

## Technologies Used

JAVA and Android Studios.

## User Stories:

* I want to learn more about Stone Soup.
* I want to find soups.
* I want to determine the soup's ingredients before deciding to try it out (for example, I may have food restrictions or preferences).
* I want to get the recipe for the soup.
* I want an image of the soups.
* I want my food restriction / ingredient exclusion to persist across sessions
* I want my account to be secured.
* I want to re-order my list of saved soups
* I want to delete items from my saved list
* I want to view my soup list in both portrait and landscape views

## Specs

| Behavior  | Input | Output |
| ------------- |:-------------:| -----|
| create an account | enter user information and click "create account"| account created and saved |
| login into a saved account | enter user email and password | after authentication, user enters main view|
| display history of Stone Soup  | click "Folklore" | Display description |
| get inspiration for soups for my Stone Soup gathering | click "Let's cook!"| place to enter a soup ingredients |
| get a list of soups | enter favorite ingredient and excluded ingredient and click "Find Soups"| display list of soups|
| get a list of soups | enter previous favorite ingredient without entering excluded ingredient again & click "Find Soups"| display same list of soups as before|
| find recipes | click "Click for Recipe" | transfer to website for recipe|
| get details of soup| click on soup item | Display the details|
| view saved list | click "saved list" | display saved list|
| reorder saved list items | drag and drop item in new place | display reordered list |
| delete item from saved list | horizontally swipe item off list | display list with said item removed|
| view soup list in landscape view | turn phone or emulator | list displayed in horizontal position |

### License

Published under MIT License.

Copyright (c) 2017 **_Kimberly H. Lu_**


text:
# How can I help?

Certainly the best help will be pull requests with fixes (please read this [guide](https://github.com/linq2db/linq2db/blob/master/CONTRIBUTING.md) before creating PR).

If you are not ready to start as developer you can:
1. Write XML documentation. Yes, this thing we do really need - XML documentation with samples. You can take any undocumented public class or method and document it and make pull requests.
1. Stories - you can tell your friends about linq2db, also you can post some samples and guides, it would be really great.
1. Testing! It is really great if you can spent some of your time to run your projects tests with new RC version.
1. Proof-reading. If you are native english speaker, it would be nice if you can spend some time proof-reading documentation.
1. Can run Linq To DB tests on DB2 z/OS database? Ping us [here](https://github.com/linq2db/linq2db/issues/734).

## Testing how to
1. Open new issue "Invite me to testers team", we'll send you an invitation.
1. Before each official release new PR would be created with notification to all team members.
1. Next you need to update to the latest RC package from MyGet and run your tests. If something is wrong please report us and if everything is alright just approve PR.


text:
Employee Absenteeism Analysis
==============================

The objective of this Case Study is to analyze and forecast the Employee Absenteeism trend using the multivariate Time Series Data

## Tools Used:
##### Driven Data Cookie Cutter Template
##### Python
##### Jupyter Notebook
##### Git

## Python libraries
##### sklearn
##### pandas
##### numpy
##### os
##### fancyimpute
##### seaborn

## Information about the data:
The given data is multivariate time series data.
The details of data attributes in the dataset are as follows -
##### Individual identification (ID)
##### Reason for absence (ICD).
Absences attested by the International Code of Diseases (ICD) stratified into 21
categories (I to XXI) And 7 categories without (ICD)
##### Month of absence
##### Day of the week (Monday (2), Tuesday (3), Wednesday (4), Thursday (5), Friday (6))
##### Seasons (summer (1), autumn (2), winter (3), spring (4))
##### Transportation expense
##### Distance from Residence to Work (kilometers)
##### Service time
##### Age
##### Work load Average/day
##### Hit target
##### Disciplinary failure (yes=1; no=0)
##### Education (high school (1), graduate (2), postgraduate (3), master and doctor (4))
##### Son (number of children)
##### Social drinker (yes=1; no=0)
##### Social smoker (yes=1; no=0)
##### Pet (number of pet)
##### Weight
##### Height
##### Body mass index
##### Absenteeism time in hours (target)

## Problem Statement
The questions to be answered after analysis:
##### What changes company should bring to reduce the number of absenteeism?
##### How much losses every month can we project in 2011 if same trend of absenteeism continues?

## Findings of EDA:
The data consists of observations from 36 unique individuals and their absenteeism details and reason. The data does not contain missing values. We analyze the data by constructing bar plots for the categorical variables and histograms for the continuous variables.
The bar plot reveals that Reason for absence has value 0 which means that there was no reason given and Month of absence contains 0 value for 3 obserations so remove these observations from our dataset.
Moreover, Reason for absence is a nominal qualitative variable with 28 categories, we can group these 28 categories into 4 main categories as reasons 1-14 are common diseases, 15-18 are pregnancy related issues, 19-21 are related to poisoning and death, and 22-28 are appointment related. 0 being none of the reasons. So lets convert the 28 category variable into 5 categories.
In case of Education, we see that majority of the observations are 1 and other observation can be grouped together. Similarly for Pets most of the individuals have 0 pets so we can convert the values greater than 0 to represent having a pet and 0 to not having a pet. For Son, we see that 2 or more children are rarely present so we can represent 2 or more children with 1 and less 2 children with 0. and find that outliers are present in the data.
For numerical variables, Outliers detected using boxplot in Transportation Expense, Service Time, Age, Work load Average/ day, Hit Target, Pet, Height, and Absenteeism time in hours. These outliers are first assigned NA and then treated as missing values and KNN Imputation is used impute them. This completes Outlier Treatment.
Correlation present in numerical variables. As weight and body mass index are correlated and Service time and Age are correlated we can remove one of each. Let's remove Weight and Age. Moreover, as Disciplinary Failure and Social Smoker are constant we can remove them as well.
Boxplots constructed for categorical variables, and we see that boxplots of Pet and Education wrt Absenteeism are same for all the categories so we can drop Education and Pet from the data as well.
Now we convert the nominal categorical variable Reason for absence to dummy variables. The numerical features are then scaled using standard scaler. This ends the EDA.
As our problem looks like a regression problem as Absenteeism time is continuous, we can make it a classification problem by converting the Absenteeism time to Absenteeism class denoting excessive absenteeism whenever the absenteeism time greater than the mean.
To further help our analysis, we create a new feature named as Total Utilization. This new feature is calculated as the difference in Service time and Absenteeism time whole divided by the Service Time. This gives us an idea of the time utilization and thus help in guessing the loss. Feature Scaling performed on all variables except the target. This ends the Exploratory Data Analysis and We are now ready to step into Model Development.

## Models used:
##### Logestic Regression: Used backward elimination to find the best model
##### KNN Regression: K was chosen as 7 after analyzing the test error and select k for which test error is the least.
##### KNN Classification: K was chosen as 5 after analyzing the test error and select k for which test error is the least.

## Model Evaluation:
##### Accuracy Scores for Test Set for all models
###### Logistic Model: 0.771 ( For Test Data)
###### KNN Regression Model: 0.187
###### KNN Classification Model: 0.722
##### Logistic Regression resulted in the best accuracy value and hence was chosen as the best model.

## Conclusion:
After thoroughly analyzing the data, we come to the conclusion that absenteeism is dependent on the following variables:
##### Transportation Expense
##### Distance from Residence to Work
So the changes company should bring to reduce the absenteeism time is that they can provide transportation to the employees with longer distances at reduced prices.
Whereas when we forecast the loss to occur, if the same trend of absenteeism continues, then the overall loss of utilization will be approx. 47% time wasted in absenteeism.

Project Organization
------------

    ├── LICENSE
    ├── Makefile           <- Makefile with commands like `make data` or `make train`
    ├── README.md          <- The top-level README for developers using this project.
    ├── data
    │   ├── external       <- Data from third party sources.
    │   ├── interim        <- Intermediate data that has been transformed.
    │   ├── processed      <- The final, canonical data sets for modeling.
    │   └── raw            <- The original, immutable data dump.
    │
    ├── docs               <- A default Sphinx project; see sphinx-doc.org for details
    │
    ├── models             <- Trained and serialized models, model predictions, or model summaries
    │
    ├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),
    │                         the creator's initials, and a short `-` delimited description, e.g.
    │                         `1.0-jqp-initial-data-exploration`.
    │
    ├── references         <- Data dictionaries, manuals, and all other explanatory materials.
    │
    ├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc.
    │   └── figures        <- Generated graphics and figures to be used in reporting
    │
    ├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
    │                         generated with `pip freeze > requirements.txt`
    │
    ├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
    ├── src                <- Source code for use in this project.
    │   ├── __init__.py    <- Makes src a Python module
    │   │
    │   ├── data           <- Scripts to download or generate data
    │   │   └── make_dataset.py
    │   │
    │   ├── features       <- Scripts to turn raw data into features for modeling
    │   │   └── build_features.py
    │   │
    │   ├── models         <- Scripts to train models and then use trained models to make
    │   │   │                 predictions
    │   │   ├── predict_model.py
    │   │   └── train_model.py
    │   │
    │   └── visualization  <- Scripts to create exploratory and results oriented visualizations
    │       └── visualize.py
    │
    └── tox.ini            <- tox file with settings for running tox; see tox.testrun.org

--------

Project based on the cookiecutter data science project template. #cookiecutterdatascience


text:
1. Create a new HTML document named `index.html`.
2. Outline the document using the base HTML elements.
3. Set the title of the document to "Apple pie recipe".
4. Use heading, text, list, and image elements to format the text in `content.txt` into the page of a recipe book.
5. Format the text so that important keywords are given greater significance.


text:
### [CVE-2022-47769](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-47769)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

An arbitrary file write vulnerability in Serenissima Informatica Fast Checkin v1.0 allows unauthenticated attackers to upload malicious files in the web root of the application to gain access to the server via the web shell.

### POC

#### Reference
- https://www.swascan.com/it/security-advisory-serenissima-informatica-fastcheckin/

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
Places files into groups or "virtual paths", rather than the default behavior of mirroring the filesystem in IDE-based projects. So you could, for instance, put all header files in a group called "Headers", no matter where they appeared in the source tree.

```lua
vpaths { ["group"] = "pattern(s)" }
```

Note that Lua tables do not maintain any ordering between key-value pairs, so there is no precedence between the supplied rules. That is, you can't write a rule that rewrites the results of an earlier rule, since there is no guarantee in which order the rules will run.

### Parameters ###

A list of key/value pairs, specified with Lua's standard syntax, which map file patterns to the group in which they should appear. See the examples below for a more complete explanation.

### Applies To ###

Project configurations. [Not all exporters currently support](Feature-Matrix.md) per-configuration file lists however.

### Availability ###

Premake 4.4 or later.

### Examples ###

Place all header files into a virtual path called "Headers". Any directory information is removed, so a path such as `src/lua/lua.h` will appear in the IDE as `Headers/lua.h`.

```lua
vpaths { ["Headers"] = "**.h" }
```

You may also specify multiple file patterns using the table syntax.

```lua
vpaths {
   ["Headers"] = { "**.h", "**.hxx", "**.hpp" }
}
```

It is also possible to include the file's path in the virtual group. Using the same example as above, this rule will appear in the IDE as `Headers/src/lua/lua.h`.

```lua
vpaths { ["Headers/*"] = "**.h" }
```

Any directory information explicitly provided in the pattern will be removed from the replacement. This rule will appear in the IDE as `Headers/lua/lua.h`.

```lua
vpaths { ["Headers/*"] = "src/**.h" }
```

You can also use virtual paths to remove extra directories from the IDE. For instance, this rule will cause the previous example to appear as `lua/lua.h`, removing the `src` part of the path from *all* files.

```lua
vpaths { ["*"] = "src" }
```

And of course, you can specify more than one rule at a time.

```lua
vpaths {
   ["Headers"] = "**.h",
   ["Sources/*"] = {"**.c", "**.cpp"},
   ["Docs"] = "**.txt"
}
```

repository: premake/premake-core

gha_language: C

repo_name: premake/premake-core


text:
# Exploratory data analysis

## Stationarity analysis

Female births and airline passengers examples taken from

https://machinelearningmastery.com/time-series-data-stationary-python/

## Autocorrelation analysis

### ar-acf-vs-pacf.py

Compares ACF and PACF when applied to an autoregressive (AR) model:

https://towardsdatascience.com/significance-of-acf-and-pacf-plots-in-time-series-analysis-2fa11a5d10a8

### ma-acf-vs-pacf.py

Compares ACF and PACF when applied to a moving average (MA) model:

https://towardsdatascience.com/significance-of-acf-and-pacf-plots-in-time-series-analysis-2fa11a5d10a8


text:
# RESTLogger
### A complete example of IEC61131-3 PLC program and PHP scripts to manage the REST data exchange.
This program allows to acquire by using a energy meter the power consumption of a machine, it also send the acquired data to a cloud server by using the REST protocol.
On the server the data are stored into a MySQL database and are displayed on a graph page using the popular Chart.js script. Link to the server Web page.

http://www.slimline.altervista.org/Mdp095a200/Ptp145a000/Dashboard/Home.htm

Connecting to this links it's possible to see the power consumption of our datacenter rack.

license: Unlicense

repository: ElsistWebmaster/RESTLogger

repo_name: ElsistWebmaster/RESTLogger


text:
# howler.js

__Link:__ [howler.js Home Page](https://howlerjs.com/)

__About:__ Audio library for the modern web. Howler.js makes working with audio in JavaScript easy and reliable across all platforms. Defaults to Web Audio and falls back to HTML5 Audio to provide full coverage across all browsers and platforms including IE9 and Cordova. Control everything from play, pause and seek to rate, fade and loop, just to name a few.

---
_Last update: 25 May 2023_

repository: RadekRo/til

repo_name: RadekRo/til


text:
### Quick start
**Make sure you have Node version >= 5.0 and yarn >= 3**

```bash
# install the repository with yarn
yarn install

# start the server
yarn start

# use Hot Module Replacement
yarn run server:dev:hmr
```
go to [http://<IP_ADDRESS>:3000](http://<IP_ADDRESS>:3000) or [http://localhost:3000](http://localhost:3000) in your browser

# Getting Started
## Dependencies
What you need to run this app:
* `node` and `yarn` (`brew install node`)
* Ensure you're running the latest versions Node `v5.x.x`+ and yarn `3.x.x`+

> If you have `nvm` installed, which is highly recommended (`brew install nvm`) you can do a `nvm install --lts && nvm use` in `$` to run with the latest Node LTS. You can also have this `zsh` done for you [automatically](https://github.com/creationix/nvm#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file)

## Running the app
After you have installed all dependencies you can now run the app. Run `yarn run server` to start a local server using `webpack-dev-server` which will watch, build (in-memory), and reload for you. The port will be displayed to you as `http://<IP_ADDRESS>:3000` (or if you prefer IPv6, if you're using `express` server, then it's `http://[::1]:3000/`).

### server
```bash
# development
yarn run server
# production
yarn run build:prod
yarn run server:prod
```

## Other commands

### build files
```bash
# development
yarn run build:dev
# production (jit)
yarn run build:prod
```

### hot module replacement
```bash
yarn run server:dev:hmr
```

### watch and build files
```bash
yarn run watch
```

### run unit tests
```bash
yarn test
```

### watch and run our tests
```bash
yarn run watch:test
```

### run end-to-end tests
```bash
# update Webdriver (optional, done automatically by postinstall script)
yarn run webdriver:update
# this will start a test server and launch Protractor
yarn run e2e
```

### continuous integration (run unit tests and e2e tests together)
```bash
# this will test both your JIT and AoT builds
yarn run ci
```

### run Protractor's elementExplorer (for end-to-end)
```bash
yarn run e2e:live
```
# External Stylesheets
Any stylesheets (Sass or CSS) placed in the `src/styles` directory and imported into your project will automatically be compiled into an external `.css` and embedded in your production builds.

For example to use Bootstrap as an external stylesheet:
1) Create a `styles.scss` file (name doesn't matter) in the `src/styles` directory.
2) `yarn add` the version of Boostrap you want.
3) In `styles.scss` add `@import 'bootstrap/scss/bootstrap.scss';`
4) In `src/app/app.module.js` add underneath the other import statements: `import '../styles/styles.scss';`

repository: AmirAliSobhGol/my-starter

repo_name: AmirAliSobhGol/my-starter


text:
---
layout: post
title:  "How to install inertiajs with Rails 7 and react"
date:   2023-07-06 15:00:00 -0400
categories: general
---
Rails 7 introduced some new ways of interacting with javascript. It introduced importmaps which are a new way of pinning
your js files to your project. It also made turbo the default for frontend development which mostly got rid of the need
to have frontend javascript. One thing that I miss about rails 6 however was the quick and easy integration with tools
like inertiajs. This article goes into the new way to install it so I don't forget in the future.

Small disclaimer- most of the content of this article has been pieced together from the docs and other blogs. I didn't
find a current blog that had all of the pieces in the correct order however to end up with a working version of rails
and react. Thats what I hope to accomplish here.

1. Install Rails and skip dependencies

```
rails new exampleapp --skip-javascript --skip-asset-pipeline
```

2. Install inertia rails and vite rails

```
bundle add inertia_rails
bundle add vite_rails
```

3. Execute the vite installer

```
bundle exec vite install
```

4. Go to `/app/views/layouts/application.html.erb` and change the following-
1. Remove `<%#= stylesheet_link_tag "application" %>` (We will add the styles in our javascript)
2. Change `<%= vite_javascript_tag 'application' %>` to `<%= vite_javascript_tag 'application.jsx' %>`

5. Install vite-plugin-rails and @vitejs/plugin-react

```
yarn add -D vite-plugin-rails @vitejs/plugin-react react react-dom @inertiajs/react
```

Make sure your vite.config.ts looks like the following-

```ts
import {defineConfig} from 'vite'
import react from '@vitejs/plugin-react'
import ViteRails from 'vite-plugin-rails'

export default defineConfig({
  plugins: [
    react(),
    ViteRails(),
  ],
})
```

6. In `app/frontend` add two new folders- css and pages

In pages we can add our first test file- home.jsx with the following contents

```jsx
export default function home() {
  return (
    <div className="mt-16 mx-auto max-w-5xl">
      <h1 className="text-3xl">Hello home</h1>
    </div>
  );
}
```

7. In `app/frontend/entrypoints` you should already have a file called application.js change the name to application.jsx
   and add the following

```jsx
import {createInertiaApp} from '@inertiajs/react'
import {createRoot} from 'react-dom/client'
import '../css/styles.css' // We are going to add this in step 10

createInertiaApp({
  resolve: name => {
    const pages = import.meta.glob('../pages/**/*.jsx', {eager: true})
    return pages[`../pages/${name}.jsx`]
  },
  setup({el, App, props}) {
    createRoot(el).render(<App {...props} />)
  },
})
```

8. Generate a controller using rails's default generator

```
rails g controller home index
```

You can delete the `app/views/home/index.html.erb` file that is created

In the home_controller, change it as follows-

```ruby
class HomeController < ApplicationController
  def index
    render inertia: 'home'
  end
end
```
Then add your route to the routes file-

```ruby
Rails.application.routes.draw do
  root "home#index"
end
```

9. Now we can install tailwindcss-

```
yarn add -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
```

Configure your template paths in the generated `tailwind.config.js` as follows

```js
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./app/views/**/*.html.erb",
    "./app/frontend/**/*.{js,ts,jsx,tsx,css}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
```

10. Add the styles.css file to `app/frontend/css` and paste the following

```css
@tailwind base;
@tailwind components;
@tailwind utilities;
```

11. Start up your server and see if it works!

```
foreman start -f Procfile.dev
```

You should now have a working rails inertiajs react setup. My recommendation is to install rspec and follow along in the
docs to use the built in testing support. Enjoy!

gha_language: CSS


text:
# Hattrick Scoreboard

Hattrick Scoreboard is the modern application to follow your [Hattrick](http://www.hattrick.org) club.

![PlayStore Screen](Documents/Screenshots/playstore_fr.png)

## Official presentation

Hattrick Scoreboard is the modern application to follow your club. You can read a lot of information for your team in this modern application also suitable for tablets.

The features at a glance:

★ Club: support 2 teams (Supporter functionality)
★ Information: club, stadium employees and finances
★ Matches: schedule and standings
★ Players: skills and statistics
★ HT-Live: All your games (and those you follow) on live!
★ Match: Summary, lineup  and statistics
★ New: See also information from other clubs!

and also:
• Customizable Colors
• Notifications for matches (goals, cards, injuries ...)

In development:
- Transfers and supporters
- More information about the teams
- Information on youth teams
- Pass the match orders (Supporter functionality)

► Hattrick Scoreboard search testers and/or translators, if you want to participate, write to the manager khips on Hattrick!

[Hattrick Scoreboard CHPP](http://www.hattrick.org/Community/CHPP/ChppProgramDetails.aspx?ApplicationId=4726) provides access to a wealth of information for your team. All in a **modern application** also suitable for **tablets** and offers some features **offline** !

## About source code

After the new official app of the game, and for lack of time, I decided to stop publish the application. I then decided to open source the application to the community why not revive the project and / or facilitate new projects.

## Hattrick Scoreboard L

> Preview of the application for tablet with Android L (Lollipop) theme.

![PlayStore Screen](Documents/2.1.0/HS_Material_Design_-_Home_Tablet_-_Draft_1.png)

> **Warning**
>
>Because [Hattrick](http://www.hattrick.org) uses a public / private key system to authenticate CHPP applications and  developers, **I voluntarily removed my own key**. You should ask your key to build your application.
>
> **MIT License**
> <i>"...THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND..."</i>
>
> **Note**
> - The application contains many bugs, feel free to suggest a correction ;-)
> - A wiki will be set up soon ...
> - A branch that I had started to develop will be pushed soon. The application takes Material Design and brings some major changes.

repository: kookyungmo/hattrick-scoreboard

repo_name: kookyungmo/hattrick-scoreboard


text:
# Salary-Management-System
Using Java as base language

Go to com\Company\department\salary to find the java code.

Run the code in IntelliJ IDEAD using maven layout.

Install the appropriate dependancies.

### Edit the properties files.

Make an excel file with the same feilds as the code fetch the input to the code.

Will automatically generate the salary slip for each employee and send it via mail.

Salary slip of each employee will be password protected.

Password1- admin password(edit in properties files)
Password2- employeename@DOB-year

repository: EashanKaushik/Salary-Management-System

repo_name: EashanKaushik/Salary-Management-System


text:
# GitLab Contributing Process

## Purpose of describing the contributing process

Below we describe the contributing process to GitLab for two reasons. So that contributors know what to expect from maintainers (possible responses, friendly treatment, etc.). And so that maintainers know what to expect from contributors (use the latest version, ensure that the issue is addressed, friendly treatment, etc.).

## Common actions

### Issue team
- Looks for issues without workflow labels and triages issue
- Monitors merge requests
- Closes invalid issues and merge requests with a comment (duplicates, [feature requests](#feature-requests), [fixed in newer version](#issue-fixed-in-newer-version), [issue report for old version](#issue-report-for-old-version), not a problem in GitLab, etc.)
- Assigns appropriate [labels](#how-we-handle-issues)
- Asks for feedback from issue reporter/merge request initiator ([invalid issue reports](#improperly-formatted-issue), [format code](#code-format), etc.)
- Asks for feedback from the relevant developer(s) based on the [list of members and their specialities](https://www.gitlab.com/core-team/)
- Monitors all issues/merge requests for feedback (but especially ones commented on since automatically watching them):
- Closes issues with no feedback from the reporter for two weeks
- Closes stale merge requests

### Development team

- Responds to issues and merge requests the issue team mentions them in
- Monitors for new issues in _Awaiting developer action/feedback_ with no developer activity (once a week)
- Monitors for new merge requests (at least once a week)
- Manages their work queue by looking at issues and merge requests assigned to them
- Close fixed issues (via commit messages or manually)
- Be kind to people trying to contribute. Be aware that people can be a non-native or a native English speaker, they might not understand thing or they might be very sensitive to how your word things. Use emoji to express your feelings (heart, star, smile, etc.). Some good tips about giving feedback to merge requests is in the [Thoughtbot code review guide](https://github.com/thoughtbot/guides/tree/master/code-review).

## Priorities of the issue team

1. Mentioning people (critical)
2. Workflow labels (normal)
3. Functional labels (minor)
4. Assigning issues (avoid if possible)

## Mentioning people

The most important thing is making sure valid issues receive feedback from the development team. Therefore the priority is mentioning developers that can help on those issue. Please select someone with relevant experience from [GitLab core team](https://www.gitlab.com/core-team/). If there is nobody mentioned with that expertise look in the commit history for the affected files to find someone. Avoid mentioning the lead developer, this is the person that is least likely to give a timely response. If the involvement of the lead developer is needed the other core team members will mention this person.

## Workflow labels

Workflow labels are purposely not very detailed since that would be hard to keep updated as you would need to reevaluate them after every comment. We optionally use functional labels on demand when want to group related issues to get an overview (for example all issues related to RVM, to tackle them in one go) and to add details to the issue.

- _Awaiting feedback_: Feedback pending from the reporter
- _Awaiting confirmation of fix_: The issue should already be solved in **master** (generally you can avoid this workflow item and just close the issue right away)
- _Attached MR_: There is a MR attached and the discussion should happen there
  - We need to let issues stay in sync with the MR's. We can do this with a "Closing #XXXX" or "Fixes #XXXX" comment in the MR. We can't close the issue when there is a merge request because sometimes a MR is not good and we just close the MR, then the issue must stay.
- _Awaiting developer action/feedback_: Issue needs to be fixed or clarified by a developer

## Functional labels

These labels describe what development specialities are involved such as: PostgreSQL, UX, LDAP.

## Assigning issues

If an issue is complex and needs the attention of a specific person, assignment is a good option but assigning issues might discourage other people from contributing to that issue. We need all the contributions we can get so this should never be discouraged. Also, an assigned person might not have time for a few weeks, so others should feel free to takeover.

## Label colors
- Light orange `#fef2c0`: workflow labels for issue team members (awaiting feedback, awaiting confirmation of fix)
- Bright orange `#eb6420`: workflow labels for core team members (attached MR, awaiting developer action/feedback)
- Light blue `#82C5FF`: functional labels
- Green labels `#009800`: issues that can generally be ignored. For example, issues given the following labels normally can be closed immediately:
  - Feature request (see copy & paste response: [Feature requests](#feature-requests))
  - Support (see copy & paste response: [Support requests and configuration questions](#support-requests-and-configuration-questions)

## Copy & paste responses

### Improperly formatted issue

Thanks for the issue report. Please reformat your issue to conform to the issue tracker guidelines found in our \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker-guidelines).

### Feature requests

Thanks for your interest in GitLab. We don't use the issue tracker for feature requests. Please use the [feature request forum](http://feedback.gitlab.com/) for this purpose or create a merge request implementing this feature. Have a look at the \[contribution guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) for more information.

### Issue report for old version

Thanks for the issue report but we only support issues for the latest stable version of GitLab. I'm closing this issue but if you still experience this problem in the latest stable version, please open a new issue (but also reference the old issue(s)). Make sure to also include the necessary debugging information conforming to the issue tracker guidelines found in our \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker-guidelines).

### Support requests and configuration questions

Thanks for your interest in GitLab. We don't use the issue tracker for support requests and configuration questions. Please use the \[support forum\]\(https://groups.google.com/forum/#!forum/gitlabhq), \[Stack Overflow\]\(http://stackoverflow.com/questions/tagged/gitlab), the unofficial #gitlab IRC channel on Freenode or the http://www.gitlab.com paid services for this purpose. Have a look at the \[contribution guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) for more information.

### Code format

Please use ``` to format console output, logs, and code as it's very hard to read otherwise.

### Issue fixed in newer version

Thanks for the issue report. This issue has already been fixed in newer versions of GitLab. Due to the size of this project and our limited resources we are only able to support the latest stable release as outlined in our \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker). In order to get this bug fix and enjoy many new features please \[upgrade\]\(https://github.com/gitlabhq/gitlabhq/tree/master/doc/update). If you still experience issues at that time please open a new issue following our issue tracker guidelines found in the \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker-guidelines).

### Improperly formatted merge request

Thanks for your interest in improving the GitLab codebase! Please update your merge request according to the \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#pull-request-guidelines).

### Inactivity close of an issue

It's been at least 2 weeks (and a new release) since we heard from you. I'm closing this issue but if you still experience this problem, please open a new issue (but also reference the old issue(s)). Make sure to also include the necessary debugging information conforming to the issue tracker guidelines found in our \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker-guidelines).

### Inactivity close of a merge request

This merge request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the merge request guidelines in our \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#pull-requests) we will reopen this merge request.


text:
# Acts As Contextable

Acts As Contextable is aruby gem written for Rails/ActiveRecord models.
The gem allows:
- Any model can refer to any other model by adding it to its own context
- Any model can have multiple various models in context
- Context can be queryed by the class (type) of a model.

## Installation

Add this line to your application's Gemfile:

    gem 'acts_as_contextable'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install acts_as_contextable

### Database Migrations

Acts As Contextable uses a votes table to store all voting information.
To generate and run the migration just use.

    rails generate acts_as_contextable:migration
    rake db:migrate

## Usage

### Contextable Models

```ruby
class Meeting < ActiveRecord::Base
  acts_as_contextable
end

@meeting = Meeting.new(:name => 'my meeting!')
@meeting.save

@meeting.add_to_context @user
@meeting.add_to_context @place
@meeting.add_to_context @event
etc.

```

### Working with context

```ruby
if @meeting.has_contexts_of_a_type User
	@meeting.contexts_of_a_type(User).each do |user|
		...
	end
end
```

### Removing from context

```ruby
@meeting.remove_from_context @user
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
# **NOTICE: I do not need pull requests or other contributions of end~o~points!

# Unofficial Documentation of Robinhood Trade's Private API

Table of Contents:

- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
	- [Development](#development)
- [API Security](#api-security)
- [API Error Reporting](#api-error-reporting)
- [Pagination](#pagination)
	- [Semi-Pagination](#semi-pagination)

## See also

- [Authentication.md](Authentication.md) for methods related to user authentication, password recovery, etc.
- [Banking.md](Banking.md) for bank accounts & ACH transfers methods
- [Order.md](Order.md) for order-related functions (placing, cancelling, listing previous orders, etc.)
- [Options.md](Options.md) for options related endpoints
- [Quote.md](Quote.md) for stock quotes
- [Fundamentals.md](Fundamentals.md) for basic, fundamental data
- [Instrument.md](Instrument.md) for internal reference to financial instruments
- [Watchlist.md](Watchlist.md) for watchlists management
- [Account.md](Account.md) talks about gathering and modifying user and account information
- [Settings.md](Settings.md) covers notifications and other settings
- [Markets.md](Markets.md) describes the API for getting basic info about specific exchanges themselves
- [Referrals.md](Referrals.md) is all about account referrals
- [Statistics.md](Statistics.md) exposes the new social/statistical endpoints
- [Tags.md](Tags.md) exposes the new categorizing endpoints

Things I have yet to organize are in [Unsorted.md](Unsorted.md)

# Introduction

[Robinhood](http://robinhood.com/) is a commission-free, online securities brokerage. As you would expect, being an online service means everything is handled through a request that is made to a specific URL.

# API Security

The HTTPS protocol is used to access the Robinhood API. Transactions require security because most calls transmit actual account informaion. SSL Pinning is used in the official Android and iOS apps to prevent MITM attacks; you would be wise to do the same at the very least.

Calls to API endpoints make use of two different levels of authentication:

1. **None**: No authentication. Anyone can query the method.
2. **Token**: Requires an authorization token generated with a call to [log in](Authentication.md#logging-in).

Calls which require no authentication are generally informational ([quote gathering](Quote.md#quote-methods), [securities lookup](#instrument-methods), etc.).

Authorized calls require an `Authorization` HTTP Header with the authentication type set as `Token` (Example: `Authorization: Token 40charauthozationtokenherexxxxxxxxxxxxxx`).

# API Error Reporting

The API reports incorrect data or improper use with HTTP status codes and JSON objects returned as body content. Some that I've run into include:

| HTTP Status | Key                | Value | What I Did Wrong |
|-------------|--------------------|-------|------------------|
| 400         | `non_field_errors` | `["Unable to log in with provided credentials."]` | Attempted to [log in](#logging-in) with incorrect username/password |
| 400         | `password`         | `["This field may not be blank."]`                | Attempted to [log in](#logging-in) without a password |
| 401         | `detail`           | `["Invalid token."]`                              | Attempted to use cached token after [logging out](#logging-out) |
| 400         | `password`           | `["This password is too short. It must contain at least 10 characters.", "This password is too common."]`                                                       | Attempted to [change my password](#password-reset) to `password` |

...you get the idea. Letting you know exactly what went wrong makes the API almost self-documenting so thanks Robinhood.

# Pagination

Some data is returned from the Robinhood API as paginated data with `next` and `previous` cursors already in URL form.

If your call returns paginated data, it will look like this call to `https://api.robinhood.com/instruments/`:

```
{
    "previous": null,
    "results": [{
        "splits" : "https://api.robinhood.com/instruments/42e07e3a-ca7a-4abc-8c23-de49cb657c62/splits/",
        "margin_initial_ratio" : "1.0000",
        "url" : "https://api.robinhood.com/instruments/42e07e3a-ca7a-4abc-8c23-de49cb657c62/",
        "quote" : "https://api.robinhood.com/quotes/SBPH/",
        "symbol" : "SBPH",
        "bloomberg_unique" : "EQ0000000028928752",
        "list_date" : null,
        "fundamentals" : "https://api.robinhood.com/fundamentals/SBPH/",
        "state" : "active",
        "tradeable" : true,
        "maintenance_ratio" : "1.0000",
        "id" : "42e07e3a-ca7a-4abc-8c23-de49cb657c62",
        "market" : "https://api.robinhood.com/markets/XNAS/",
        "name" : "Spring Bank Pharmaceuticals, Inc. Common Stock"
    },
        ...
    ],
    "next": "https://api.robinhood.com/instruments/?cursor=cD04NjUz"
}
```

To get the next page of results, just use the `next` URL.

## Semi-Pagination

Some data is returned as a list of `results` as if they were paginate but the API doesn't supply us with `previous` or `next` keys.


text:
# music-library
This is the repository for the iOS app Music Library.

## Build Info

- Xcode 9.3
- Swift 4.1
- iOS Deployment Target - iOS 11

## General app info

Application consists of 3 main functions :

- Adding songs info into the library
- Viewing library, editing and deleting records
- Searching through the library

Also, there is a Settings tab, where user can change sorting options or delete all data.

## License

This project is released open source under the MIT License.

## Contributors

- [Me :)](https://github.com/bohdanpodvirnyi)

## Acknowledgments

Thanks to [MacPaw](https://github.com/MacPaw) for such a great task.

repository: bohdanpodvirnyi/music-library

repo_name: bohdanpodvirnyi/music-library


text:
---
layout: post
title:  "Mahtava: suburban mobility Startup"
date:   2019-04-29 15:01:35 +0300
image:  mahtava.png
tags:   Startup Mobility Business
---
Startup Experience is a course that simulates the process of creating a new business, understanding customer needs and developing a new product or service that we had throughout the second semester at Aalto. I worked with Naba Kumar, Mario López Batres, Jiyo Palatti, Ling Sun and Dosky Otewa on solving the **last mile problem**.

The course was divided into Sprints, each with its own deliverables and ending with a pitch. I took on the role of a **COO** for the initial two Sprints and set up our work process that we followed until the end of the course. In the beginning our focus was on research. In the first **2 Sprints** alone we have made **64 interviews** split equally among the team.

> "When carrying something like groceries, it's difficult." — Interviewee

Additionaly, we performed **desktop research** on existing alternative solutions, case study of Kutsuplus, challenges for autonomous driving such as weather conditions, local examples of the last mile problem and urban mobility in general. To get an idea of what we accomplished in the first **~4 weeks**, take a look at my [COO report][coo] (including a draft of the Lean Canvas and our key findings).

![]({{ site.baseurl }}/images/trello.png)
*Trello board with tasks assigned to individual team members*

The COO role then rotated as did the role of a pitcher. One of our pitches was made in the form of a video (narrated by me) and can be found [here][pitch].

During our ongoing research we realized the importance of finding the right geographical area to start with and we have made [website][website] to engage our potential users in locating it. We identified supermarkets in **suburban areas** as a promising location and ran an **experiment** there by offering rides to customer as they were walking out (of course with the permission of the supermarket staff). As the service was of course not ready yet, we had candy prepared for those keen to accept our offer. This helped us confirm the customer need.

Together with Ling and Mario we made prototypes to test our concept with users and demostrate how it would work. We started on paper and gathered the first feedback using the **Wizard of Oz** technique with post-its in place of interactive elements. Then we moved on to **Sketch** and **InVision** and made a rough [prototype][prototype], which was then redesigned in the [next iteration][iteration].

![]({{ site.baseurl }}/images/fidelity.png)
*The incresing fidelity of our prototypes*

Marketing is another important aspect of start-ups success so we had to make **posters**, create presence on **social media** and during one of the latter sprints we recorded this **promotional video** in a only couple of hours during class:

One of our last main tasks was to figure out the **finances**. We have calculated our **market size**, described a **revenue model** and identified **key partners** as well as sources of **funding** - all incorporated in our **financial plan**. We then had a mock interview with an **angel investor** to whom we presented our proposal.

Working on this project has truly been quite an experience. I've freezing outside in show while trying to get more interviews, sweating in a sauna or having fun playing bowling at our team outings (made mandatory by our team agreement!), polishing our pitches and acting in our own commercials. All I have left to say is **thank you** to my **team**, it has been amazing working with you!

[website]: https://mahtava-oy.firebaseapp.com/
[prototype]: https://invis.io/U9R6O398QXC
[iteration]: https://invis.io/7TRD0W4WS9Y
[video]: https://www.youtube.com/watch?v=xW-nx60xmmM
[pitch]: https://www.youtube.com/watch?v=HNM1QWPTxfk
[coo]: /files/COO report.pdf

extension: markdown


text:
---
title: On JavaScript Fatigue
date: "2015-12-28"
description: "personal thoughts on JavaScript fatigue"
---

Short background: I have been doing front end development professionally for 7 years, but personally started about 12 years ago. This is just to illustrate
the timeframe I have been exposed to JavaScript development.

Ill start at about 2010, when I feel like JavaScript was really starting to take
off as a serious career path. Before then, JavaScript seemed like something in addition to knowing another programming language and of course, html and css. CSS 3 and HTML 5 were just starting to be talked about as something you could use in the future. At the time it was hard seeing ie6 support dying off, windows users wanted to keep Windows XP.

![Github early 2010](./github.png)
Github early 2010

Github was starting to take off, people began to use Stack Overflow. Things were looking pretty great on the web. Things became a lot easier to find. The mobile web became important. I remember going to An Event Apart (2010 San Diego). Responsive web stuff was now a thing. CHROME DEV TOOLS!

Directories filled with copied libraries. If you wanted to support all the browsers you were using jquery. Our “module system” was wrapping everything in closure functions to not pollute the global space. JQUERY PLUGINS. Oh god jquery plugins. You were lucky if they had documentation, were ever updated, or what version of jquery it supported. It wasn’t jquery’s fault. Their plugin system was (is) pretty amazing for the time.

We needed books like “The Good Parts” to show us the way. JSLint was not out until the later part of 2010. News of Nodejs coming out. Everything started _moving_, and it hasn’t really stopped.

Bower, NPM, Grunt, Gulp, Webpack, JSHint, Backbone, Angualar, React, Ember, QUnit, Mocha, Jasmine, Requirejs, Browserify, and countless others that were only hot for a few months that I can’t remember.

We have come a long way since just including script tags on the page in a specific order to make sure the right variables were available. No longer are we concatenating files and hoping it gets it right. We have commonjs, requirejs, and the ES6 module system to help us with that.

So I have been on this ride for a while.

![Github language popularity in 2015](./language-popularity.png)
Github language popularity in 2015

#### I think where we are headed is amazing.

I could argue that being a JavaScript developer is better now than it has ever been. We have amazing tools, large and small companies dedicating teams to open source.

Now that JavaScript and the web is a truly amazing application platform, tools and libraries will continue to mature. I can see us soon having native type checking, immutable data structures, more IDE features. We have some great people leading the efforts for the **ECMAScript** project. I don’t want them to stop (maybe focus on more functional aspects :D).

We have it good. This does not mean we don’t have issue or that fatigue is not real. Lets solve those problems too.

#### Help with the fatigue

The community looks to be solving this problem with some new tools (lol), but for now, here are some tips I have learned to help with fatigue.

- Stop listening. Really. Take a month of not looking on twitter
  and Hacker News. You will find that most of what you knew a month ago works as well as what you know now.
- Stop feeling like you need to use the new thing. Should you keep
  learning new things? Yes. Always.
- Learn to read through the garbage to find the gems
  you can use (or find interesting) to use at work.

What can you do to help? **Keep making new things. Keep making new frameworks.** Just don’t assume its the next best thing. Everyone has good ideas, but it can take years to turn a good idea into something stable that we can all use. Don’t impose your new ideas on coworkers without giving time to research those ideas. **Get good at vanilla JavaScript**.

Most of my new projects really don’t have that many libraries. Most of those libraries are the same ones I used last year. I think the only thing growing in my projects are rc files :(


text:
## CareerMuse Client

### Frameworks / Libraries
* NodeJS
* Angular
* LESS
* Gulp
* Material Design

### Description

A quick client CMS for Careermuse's resume builder site.

### Install

1. `npm install`

2. `npm start`

3. navigate to localhost:3000 in your browser

### Demo

[Demo](https://shielded-citadel-61095.herokuapp.com/)

### Client Screens

#### license

MIT. Copyright (c) Brad Zimmerman

repository: BradZzz/careermuse-client

repo_name: BradZzz/careermuse-client


text:
---
title: Async Custom Action
weight: 106
description: Creating a custom async action
---

---

To create a custom action in Beagle where execution is asynchronous such as consuming an API or accessing a database, just create an `action` as usual as the previous example detailed and implement the `AsyncAction` interface.

With the action created, just link the `AsyncAction` interface and delegate its implementation to the `AsyncActionImpl` class that Beagle already provides.

{{% alert color="info" %}}
It is recommended to use this class, as it implements the `onActionStarted` and `onActionFinished`, exposing its state in a reactive and standardized way in the framework.
{{% /alert %}}

```kotlin
@RegisterAction
data class CustomActionAndroid(
    val value: String
) : Action, AsyncAction by AsyncActionImpl() {
    override fun execute(rootView: RootView) {
        // Do asynchronous work
    }
}
```

Now, with the action ready to execute asynchronously, you have to **MANDATORY** notify when its execution is finished through the `onActionFinished` method.

```kotlin
@RegisterAction
data class CustomActionAndroid(
    val value: String
) : Action, AsyncAction by AsyncActionImpl() {
    override fun execute(rootView: RootView) {
        // Do asynchronous work
        onActionFinished()
    }
}
```

It's done! Your action is now configured to run any job asynchronously!

{{% alert color="danger" %}}
It is mandatory to implement the `AsyncAction` interface for any custom action that is inserted within the [ListView]({{< ref path="/api/components/layout/listview" lang="en" >}}) component.
{{% /alert %}}

repository: otaviojava/beagle-docs

repo_name: otaviojava/beagle-docs


text:
# 目录

[Git 工作指南](https://github.com/lhmouse/git-workflow-zh/blob/master/workflow.md)

[Git 入门命令参考](https://github.com/lhmouse/git-workflow-zh/blob/master/basic-command-reference.md)

repository: xiaoyxue/git-workflow-zh

repo_name: xiaoyxue/git-workflow-zh


text:
# Images

A small library to generate thumbnails and do a bit of editing.
The gd library is procedural and difficult to use, so I created this library to make things a little easier.

## Features

- Object oriented.
- Smart methods with less obligatory parameters.
- Methods accept hexadecimal and rgb syntax strings for colors.

## Basic editing

Our reference:

Photo by [ipet photo](https://unsplash.com/@ipet_photo?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

### ::resize(int $width, int $height = null)

Resize the image. Only one parameter is needed, if only a single parameter is informed then the ratio will be preserved.

```php
use AdinanCenci\Images\File;

$picture = new File('example-original.jpg');
$picture->resize(400);

header('Content-type: image/png');
$file->imageJpg();
```

### ::crop(int $x, int $y, int $width, int $height)

Crop the image to the given rectangle.

```php
$picture = new File('example-original.jpg');
$picture->crop(185, 50, 280, 210);

header('Content-type: image/jpeg');
$picture->imageJpg(null, 80);
```

### ::copy(int $x = 0, int $y = 0, int $width = null, int $height = null)

Copy part of the image. All the parameters are optional, if left empty it will return a copy of the image.

```php
$copy = $picture->copy();
```

### ::paste(Image $image, int $x = 0, int $y = 0, int $width = null, int $height = null)

Paste a image on top. Besides $image, all parameters are optional. If left empty, it will paste at the top left corner, with $image's dimensions unaltered.

```php
$file = new File('./my-image.jpeg');
$picture = new Image(500, 500);

$picture->paste($file);
```

### ::rotate(int $angle, color identifier/string $color = 'rgba(0,0,0,0)')

Rotates the image according to $angle. Will apply $color to the background.

```php
$picture = new File('example-original.jpg');
$picture->resize(400);
$picture->rotate(45);

header('Content-type: image/png');
$picture->imagePng(null, 80);

```

## Thumbnails

The class comes with methods to easily create thumbnails.

### ::fillWith($image, $align = '')

Will fill the entire area with $image, cropping as needed.

```php
$picture = new File('example-original.jpg');
$thumbnail = new TrueColor(200, 300);

$thumbnail->fillWith($picture);

header('Content-type: image/png');
$thumbnail->imagePng();
```

### ::fit($image, $align = '')

Will fit $image inside the constrains without cropping.

```php
$picture = new File('example-original.jpg');
$thumbnail = new TrueColor(200, 300);
$thumbnail->fill('rgba(0,0,0,127)'); // just to make the background visible

$thumbnail->fit($picture);

header('Content-type: image/png');
$thumbnail->imagePng();
```

## Multi-line text paragraph

```php
$text =
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';

$t = new Text($text);
$t->fontFile('./fonts/Roboto-Bold.ttf')
->alignment('justify')
->color('rgba(255,255,255)')
->background('rgba(255,0,0,0.5)')
->padding(20)
->width(500);

$imagem = $t->getImage();

header('Content-type: image/png');
$imagem->imagePng();
```

## Dimensions shorthands

The class offer short hands to the image's dimensions:

```php
$picture = new TrueCollor(1000, 600);

$picture->halfWidth;     	// 500
$picture->oneThirdWidth;	// 333.3333...
$picture->halfHeight;   	// 300

// If you ommit the measure, it defaults to width:
$picture->half;  			// 500
$picture->oneThird;			// 333.3333...
$picture->oneTenth;  		// 100

// So you may use it:
$picture->resize($picture->half);
```

## Filters

**::invert()**

**::greyScale()**

**::brightness($level)**
$level: Integer between -255 to 255

**::contrast($level)**
$level: integer, 0 = no change, -100 = max contrast, 100  = min contrast

***::colorize($r, $g, $b, $a = null)**
Adds or subtract rgb values from each pixel
From -255 to 255

**::edge($times = 1)**
$times: Integer, how many times the filter must be applied.

**::boss($times = 1)**
$times: Integer, how many times the filter must be applied.

**::meanRemoval($times = 1)**
$times: Integer, how many times the filter must be applied.

**::gaussianBlur($times = 1)**
$times: Integer, how many times the filter must be applied.

**::blur($times = 1)**
$times: Integer, how many times the filter must be applied.

**::smooth($level)**
$times: Integer, how many times the filter must be applied.

**::pixelate($size, $advanced = false)**
$size: Integer, block size in pixels
$advanced: Boolean, whether to use advanced pixelation effect or not.

**::scatter($substraction, $addition, $color = null)**
$substraction: Integer, substraction level. This must not be higher or equal to the $addition level.
$addition: Integer, effect addition level.
$color: identifier/string

repository: adinan-cenci/images

repo_name: adinan-cenci/images