text:
# PlantNet-300K

This repository contains the code used to produce the benchmark in the paper : .
In order to train a model on the PlantNet-300K dataset, you first have to download the dataset [here](https://doi.org/10.5281/zenodo.4726653).

If you use this work for this research, please cite the paper :

### Requirements

Only pytorch, torchvision are necessary for the code to run.
If you have installed anaconda, you can run the following command :

```conda env create -f plantnet_300k_env.yml```

### Training a model

In order to train a model on the PlantNet-300K dataset, run the following command :

```python main.py --lr=0.05 --n_epochs=80 --k 1 3 5 10 --model=resnet50 --root=path_to_data --save_name_xp=xp1```

 You must provide in the "root" option the path to the train val and test folders.
 The "save_name_xp" option is the name of the directory where the weights of the model and the results (metrics) will be stored.
 You can check out the different options in the file cli.py.


text:
Extrapolate Datasets and add Coordinates
=======================================

Takes a dataset, and a geoJSON polygon. Extrapolates the dataset, and attaches a coordinate to each data point.

Is pretty hardcoded to take a google flu trends file, a geoJSON file (in this case UK), and create a semi-realistic UK flu trends dataset. Think of this script as generating flu "events", where each event is a flu level + a coordinate.

Can also take a set of "seed" coordinates. That's useful for generating "cities" on the map, by passing in larger cities as seed coordinates, and upping the probability (look in the script) of having "randomly" generated coordinates staying close to existing coordinates.

The script can extrapolate the dataset to however many (temporal) data points you want, and can create however many geographical coordinates from that dataset you want.

The script is used to generate mock data for the first flu dashboard mockup

=== Example
python genCoord.py res/google-flu-data-us.csv res/GBR.geo.json res/seedCoords.txt

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Tools

The Natural Resources Applications are currently hosted in [RedHat OpenShift](https://www.openshift.com) operated by [BCDevExchange](https://bcdevexchange.org).  We follow the guidelines and principles of the [BCDevOps](https://github.com/BCDevOps) team. We make every attempt to use, or build off the tooling and scripts that BCDevOps (through the [DevHub](https://developer.gov.bc.ca)) provides.

As part of the BCDevOps community, each project will have 4 OpenShift namespaces allocated:

| Namespace | Description |
| --- | --- |
| Dev | development "environment", will contain a deployment from the master branch and N deployments for [pull requests](https://help.github.com/en/articles/about-pull-requests). |
| Test | test and Quality Assurance, will contain deployment from master branch. Promotions to be manually approved. |
| Prod | production. The user ready application. Promotions to be manually approved. |
| Tools | devops namespace. |

The tools directory contains all the infrastructure-as-code that we use for devops. Although there are many ways to build/test/deploy, this is the way we are doing it.  We currently rely less on OpenShift to do promotions, and more on our own Continuous Integration/Continuous Delivery ([CI/CD](https://en.wikipedia.org/wiki/CI/CD)).  This affords us more control over the workflow and add tooling as needed.  Currently, the tools in use are: Jenkins and Sonarqube.

## Prerequisites

All of the following instructions and examples are written for a *nix based system.  If you are on Windows, you may have to make some adjustments; particularly around piping `|`, setting environment variables and environment variable substitution. We suggest that Windows users consider using the Windows Subsystem for Linux (WSL) in order to minimize potential conflicts with the local environment. Check the [Microsoft Documentation](https://docs.microsoft.com/en-us/windows/wsl/install-win10) for more information on how to install WSL on your system.

 We assume that whomever is running these commands has admin privileges to the 4 OpenShift projects.

You will need to install the OpenShift command line tools and have them in your path.  Login to OpenShift via web console, click on the Help icon (question mark), click Command Line Tools and follow the instructions.

You will need a github account and token (preferrably a team shared account) with access to your repo: [New Personal Access Token](https://github.com/settings/tokens/new?scopes=repo,read:user,user:email,admin:repo_hook).

## Environment Variables

For simplicity sake, we will be setting all our project specific values as environment variables and substitute them into the oc commands.  The following are just examples and will need to be changed to your specific projects/namespaces, credentials, etc.

### DevOps Tools Repository

Configure environment variables to access and run DevOps Tools scripts.

```sh
export tools_repo_owner=bcgov
export tools_repo_name=nr-showcase-devops-tools
export tools_repo_url=https://github.com/$tools_repo_owner/$tools_repo_name.git
export tools_repo_ref=master
export tools_repo_raw=https://raw.githubusercontent.com/$tools_repo_owner/$tools_repo_name/$tools_repo_ref
export templates_url=$tools_repo_raw/tools/jenkins/openshift
```

### Namespace Enumeration

Configure the 4 environment namespaces for your application.

```sh
export ns_prefix=<your-namespace-prefix>
export tools=$ns_prefix-tools
export dev=$ns_prefix-dev
export test=$ns_prefix-test
export prod=$ns_prefix-prod
```

### Github Repository and Credentials for Application

Configure your application repository details.  This is the application that will be built and deployed by the pipeline.

```sh
export gh_username=<github account>
export gh_password=<personal access token, see above>
export repo_owner=<your github account>
export repo_name=<your application repo>
```

### Application Details

Configure any remaining application specific details here.

```sh
export app_name=<your application acronym/short name>
export app_domain=pathfinder.gov.bc.ca
```

### Login to OpenShift

Once you have all of the environment variables defined, login to Openshift via web console, click your login name at top tight and click "Copy Login Command".  Go to your terminal, go to your project root and paste the copy command.

### Go to Tools Namespace/Project

Once logged into the OpenShift console, go to your tools project.  Each oc command should use the `-n <NAMESPACE>` option, but being in your tools project is just another safeguard.

```sh
oc project $tools
```

## SonarQube

SonarQube should be installed and configured first, as the Jenkins will run the pipeline which will may require SonarQube.  So, stand up and configure SonarQube first.

SonarQube is a static analysis tool which assists with improving and maintaining code quality. For this tool to work, you will need the SonarQube server, as well as an agent that runs the sonar-scanner (this can be local or in Jenkins).

### SonarQube Server Setup

To deploy a SonarQube server instance to our tools project we simply leverage the prebuilt server image provided by the BCDevOps organization found on the [BCDevOps SonarQube repository](https://github.com/BCDevOps/sonarqube).

We outline below the rapid startup steps to get SonarQube Server setup. Refer to the original repository for more details if necessary.

#### SonarQube Deploy

You will need to use the `sonarqube-postgresql-template.yaml` file in order to deploy it to openshift. This will deploy BOTH the PostgreSQL database AND the SonarQube server.

  And the template was at commit `bc80961d75eed66ec70ca022a6444963341fb39f`.*

Deploying the database is done with the following:

```sh
oc -n $tools new-app -f https://raw.githubusercontent.com/BCDevOps/sonarqube/bc80961d75eed66ec70ca022a6444963341fb39f/sonarqube-postgresql-template.yaml --param=SONARQUBE_VERSION=6.7.5
```

Let the SonarQube pods spin up, you can then go to `https://sonarqube-<$tools>.pathfinder.gov.bc.ca` and watch until SonarQube is ready.  Now you can set the admin password.

#### Admin Password

The SonarQube server instance is created with standard insecure credentials (User: `admin`, PW:). This should be reset to something stronger and stored in an OpenShift secret so authorized developers can find it.

The BCDevOps SonarQube repo provides a script that will generate a random PW, set it in SonarQube, and create a secret. This can be found under the  `/provisioning` folder of the cloned BCDevOps repo.

In order to directly get the password reset script, run the following:

```sh
curl https://raw.githubusercontent.com/BCDevOps/sonarqube/bbb9f62e29706b61382cf24d7ad7e08f2476a01f/provisioning/updatesqadminpw.sh > updatesqadminpw.sh
```

Then simply run the following script and follow its instructions. Make sure you save the new password in an OpenShift secret or equivalent!  Ensure that the SonarQube app is fully deployed and operational before running this script.

```sh
chmod +x updatesqadminpw.sh && ./updatesqadminpw.sh
```

Go to `https://sonarqube-<$tools>.pathfinder.gov.bc.ca` and log in as `admin` with the new password (it is stored in sonarqube-admin-password secret).

## Jenkins

Uses BCDevOps CICD Jenkins Basic install.  This Jenkins install includes a number of customizations. A customization of particular note is that it will register GitHub webhooks.  [link](https://github.com/BCDevOps/openshift-components/tree/master/cicd/jenkins-basic)

The commands, labels, and naming conventions follow the Pull Request Pipeline principles of the BCDevOps pipeline-cli [link](https://github.com/BCDevOps/pipeline-cli).

The jobs that Jenkins creates and uses will also follow those principles and build out an "environment" for each pull request.

Jenkins will include a slave/builder that can execute Node builds and run Sonarqube scanner.  You can use this as a reference if you need to create additional slaves (ex. python builds).  See [jenkins/openshift/build-slave.yaml](jenkins/openshift/build-slave.yaml).

### Additional Setup Files/Scripts

* **jenkins/docker/contrib/jenkins/configuration**

    We need to make some additional configuration changes to the BCDevOps CICD Jenkins Basic install.  Under the [jenkins/docker/contrib/jenkins/configuration](jenkins/docker/contrib/jenkins/configuration) directory, we have additional start up scripts and configuration overrides.

* **org.jenkinsci.plugins.workflow.libs.GlobalLibraries.xml**

    We pull in [BCDevOps Jenkins Pipeline Shared Lib](https://github.com/BCDevOps/jenkins-pipeline-shared-lib).  This provides us some functions for examining the Git repos and commits. We can use these functions in Jenkinsfiles and other grovy scripts.

* **scriptApproval.xml**

    For our configuration groovy scripts, we need to allow certain jenkins and third party plugin scripts to run.  We override the restrictions here.

* **init.groovy.d/003-create-jobs.groovy**

    This groovy script will build 2 jobs in Jenkins.  One that will build the master branch, and one that will build pull requests.

    To add or change the jobs, this is where you want to go.  The name of this file is important, as it needs to get run *BEFORE* the 003-register-github-webhooks.groovy included in the basic install.  Scripts are run alphabetically.  The jobs need to be created before the github webhooks are created.  Our jobs script will read secrets and configmaps created during this setup; described below.

    These jobs are configured to use [Jenkinsfile](https://github.com/bcgov/nr-showcase-devops-tools/blob/master/Jenkinsfile) and [Jenkinsfile.cicd](https://github.com/bcgov/nr-showcase-devops-tools/blob/master/Jenkinsfile.cicd) found at the root of your project repository.  These Jenkinsfiles will make use of the OpenShift ConfigMaps we will create below.

* **init.groovy.d/100-jenkins-config-set-admin-address.groovy**

    This groovy script will update the admin email address.  It is not necessary, but an example of further customization to Jenkins.  If you are swiping this, keep in mind the email address is hardcoded.

### Project Prerequisites

We are setting up a CICD pipeline to build and deploy a specific project.  In order for this to work, there are expectations on those projects.  Currently, each project will require 3 files at the __root__ of the repository.

| Name | Description |
| --- | --- |
| `Jenkinsfile` | this is the master branch build pipeline |
| `Jenkinsfile.cicd` | this is the Pull Request build pipeline |
| `sonar-project.properties` | this is will configure your SonarQube scans |

A very simple example to demonstrate a build and SonarQube analysis (no additional setup, no servers, no deployments), can be found at the [nr-showcase-devops-tools-demo-sq](https://github.com/bcgov/nr-showcase-devops-tools-demo-sq.git) repo.  This can be forked and used to test the Jenkins and SonarQube installation, and to demonstrate the master and pull request jobs.  For instance, the master branch will show Code Smells and duplicates in SonarQube.  In you fork, create a pull request that corrects these and see how the PR Jenkins job kicks off.

For more fully featured pipeline examples, you may refer to the following projects:

* [NR Get Token](https://github.com/bcgov/nr-get-token.git)
* [NR Messaging Service Showcase](https://github.com/bcgov/nr-messaging-service-showcase.git)

A very simple example to demonstrate a build and SonarQube analysis (no additional setup, no servers, no deployments), can be found at [nr-showcase-devops-tools-demo-sq](https://github.com/bcgov/nr-showcase-devops-tools-demo-sq.git).  This can be forked and used to test the Jenkins and SonarQube installation, and to demonstrate the master and pull request jobs.  For instance, the master branch will show Code Smells and duplicates in SonarQube.  In you fork, create a pull request that corrects these and see how the PR Jenkins job kicks off.

### Jenkins Server Setup

The following commands setup up Jenkins and uses this repository and specific OpenShift project namespaces.

#### Create Secrets

The BCDevOps CICD Jenkins Basic install requires a template github secret and a template for the slave.  This will create the secrets named as it requires.

```sh
oc -n $tools process -f "$templates_url/secrets.yaml" -p GH_USERNAME=$gh_username -p GH_PASSWORD=$gh_password | oc  -n $tools create -f -
```

#### Create ConfigMap for related namespaces

For our custom jobs scripts and Jenkinsfiles.

```sh
oc -n $tools process -f "$templates_url/ns-config.yaml" -p DEV=$dev -p TEST=$test -p PROD=$prod -p TOOLS=$tools | oc  -n $tools create -f -
```

#### Create ConfigMap for the application

For our custom jobs scripts and Jenkinsfiles.

```sh
oc -n $tools process -f "$templates_url/jobs-config.yaml" -p REPO_OWNER=$repo_owner -p REPO_NAME=$repo_name -p APP_NAME=$app_name -p APP_DOMAIN=$app_domain | oc -n $tools create -f -
```

#### Add Service Account Access to other Projects

This is required in order to allow Jenkins to have the RBAC permissions to handle deployments in other namespaces.

```sh
oc -n $dev policy add-role-to-user admin system:serviceaccount:$tools:jenkins-prod
oc -n $test policy add-role-to-user admin system:serviceaccount:$tools:jenkins-prod
oc -n $prod policy add-role-to-user admin system:serviceaccount:$tools:jenkins-prod
```

#### Process the BuildConfig templates

These build configs have no build triggers, we start them manually - we don't want OpenShift to automatically deploy on a configuration change or an image change.

The parameters and labels we are providing match up with the BCDevOps pipeline-cli.  Although we are not using the pipeline-cli, we try to align ourselves with its philosophies.  We will consider this deployment of Jenkins to be our "prod" deployment.  We are not providing all the labels pipeline-cli would, but the most important ones for identifying the app and the environment.

##### Master BuildConfig

```sh
oc -n $tools process -f "$templates_url/build-master.yaml" -p NAME=jenkins -p SUFFIX=-prod -p VERSION=prod-1.0.0 -p SOURCE_REPOSITORY_URL=$tools_repo_url -p SOURCE_REPOSITORY_REF=$tools_repo_ref -o yaml | oc -n $tools create -f -
```

##### Slave BuildConfig

Create the slave build config and image stream, and then we add a build trigger for our main jenkins image.  This will allow the slave image to be built automatically when the master Jenkins image is built.  For whatever reason, having the build trigger in the build config template doesn't work - it is stripped out.

```sh
oc -n $tools process -f "$templates_url/build-slave.yaml" -p NAME=jenkins -p SUFFIX=-prod -p VERSION=prod-1.0.0 -p SLAVE_NAME=main -p SOURCE_IMAGE_STREAM_TAG=jenkins:prod-1.0.0 -o yaml | oc -n $tools create -f -

oc -n $tools set triggers bc jenkins-slave-main-prod --from-image=$tools/jenkins:prod-1.0.0
```

##### Build master (and slave)

Once the master is built, the slave's  build will be triggered.   Wait until the two images are built, then move on to deployment.

```sh
oc -n $tools start-build bc/jenkins-prod
```

#### Process the Deployment templates

Once the two images are created from the builds of the previous step, you may proceed with deploying those images.

##### Master DeploymentConfig

```sh
oc -n $tools process -f "$templates_url/deploy-master.yaml" -p NAME=jenkins -p SUFFIX=-prod -p VERSION=prod-1.0.0 -p ROUTE_HOST=jenkins-prod-$tools.$app_domain -p GH_USERNAME=$gh_username -p GH_PASSWORD=$gh_password -o yaml | oc -n $tools create -f -
```

##### Slave DeploymentConfig

```sh
oc -n $tools process -f "$templates_url/deploy-slave.yaml" -p NAME=jenkins -p SUFFIX=-prod -p VERSION=prod-1.0.0 -p NAMESPACE=$tools -p SLAVE_NAME=build -o yaml | oc -n $tools create -f -
```

Give the process a few minutes. If it is successful, you should be able to get onto your new Jenkins server with the appropriate URL as specified by the route. Assuming you have reached this step and there are no errors, you will have successfully completed the tools deployment and are ready to do development.

## Updates

The BCDevOps team will be continually updating Jenkins for security patches and plugin patches. This section outlines the process to bring existing deployments up to alignment with the latest versions of software available.

### Jenkins Base Image Update

If the [base image](https://github.com/BCDevOps/openshift-components/tree/master/cicd/jenkins-basic) for Jenkins is updated, you can update by starting a new build.  Since our build is based on `jenkins-basic:v2-latest`, any time the image for that tag is updated, we can update our instance with a re-build.  Because our slave image has a trigger for our `jenkins:prod-1.0.0` image stream tag, the slave will be re-built.    So, by re-building the master image, we build and redeploy our whole Jenkins instance in one action.  This means you should schedule your updates around your application builds.

```sh
oc -n $tools start-build bc/jenkins-prod
```

## Cleanup

Should you need to tear down the Jenkins and SonarQube, you will want to run the following commands. Make sure you are sure this is what you want to do as this is a destructive operation. You WILL NOT be able to recover old stored data!

### SonarQube Cleanup

```sh
oc -n $tools delete all,template,secret,cm,pvc,sa,rolebinding --selector app=sonarqube
oc -n $tools delete secret sonarqube-admin-password
```

### Jenkins Cleanup

```sh
oc -n $tools delete all,template,secret,cm,pvc,sa,rolebinding --selector app=jenkins-prod
```

## Local Development Notes

This section contains notes about how to do certain CI/CD tasks on your local machine.

### SonarQube Scanner

In order for static code analysis to happen, there must be a scanner agent that processes the code. This is achieved with the sonar-scanner distribution which can be found [here](https://github.com/SonarSource/sonar-scanner-cli). This is preinstalled on the Jenkins Slave agent.

*Note: At the time of writing, we are currently using version `<IP_ADDRESS>2`.*

#### Run scan locally

Should you wish to install and use `sonar-scanner` locally, follow the appropriate instructions depending on your platform.

##### *nix

```sh
curl -o /tmp/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-<IP_ADDRESS>2-linux.zip
unzip /tmp/sonar-scanner-cli.zip -d /tmp/sonar-scanner-cli
mv /tmp/sonar-scanner-cli/sonar-scanner-<IP_ADDRESS>2-linux /opt/sonar-scanner
ln -s /opt/sonar-scanner/bin/sonar-scanner /usr/local/bin
```

##### Windows

*Note: The following assumes you are using the [Chocolatey Package Manager](https://chocolatey.org/). If you are not using Chocolatey, you will need to figure out how to get the client from the [official website](https://www.sonarqube.org/downloads/).*

```powershell
choco install -y sonarqube-scanner.portable --version <IP_ADDRESS>2
```

### Static Analysis

Once you have `sonar-scanner` installed, ensure that you are in the same directory as the `sonar-project.properties` file. Then all you need to do is run the following (replace the arguments as necessary):

```sh
sonar-scanner -Dsonar.host.url='CHANGEURLHERE' -Dsonar.projectKey='CHANGEPROJECTKEYHERE' -Dsonar.projectName='NR Get Token (CHANGEBRANCHNAMEHERE)'
```

repository: bcgov/NRPTI

gha_language: TypeScript

repo_name: bcgov/NRPTI


text:
# OperationRule

Creates an OperationRule. An OperationRule allows you to write assertions around Operations in your API Specification.

```javascript
new OperationRule({
  name: 'prevent operation removal',
  rule: (operationAssertions) => {
    operationAssertions.removed('not remove operation', () => {
      throw new RuleError({
        message: 'cannot remove an operation',
      });
    });
  },
});
```

`new OperationRule(options)`

The following table describes the options object.

| property | description                                                                                | required | type                                                                       |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------- |
| name     | the name of the rule                                                                                | yes      | `string`                                                                   |
| matches  | A function used to determine when this Rule should be applied. Return true to indicate this Rule should run.                                                                                | no       | `(operation: Operation, ruleContext: RuleContext) => boolean`                  |
| docsLink | A link to the documentation for this ruleset. This will be used to show the user on a rule error. If there is a more specific docsLink (e.g. on a nested Rule), the more specific docsLink will be shown) | no       | `string`                                                                   |
| rule     | A function to define assertions for a specification.                                                                                | yes      | `(operationAssertions: OperationAssertions, ruleContext: RuleContext) => void` |

## matches

`matches` is invoked with an `Operation` and `RuleContext` objects. The [`Operation` object](./DataShapes.md#operation) corresponds to the `Operation` that this rule would run on. The [RuleContext object](./DataShapes.md#rulecontext) contains details about the location, and any [custom context](./Reference.md#custom-context). Return a boolean to indicate whether this rule should be run on the `Operation` provided.

Example:

```javascript
const has201StatusCode = new OperationRule({
  name: 'Has 201 status codes',
  // only matches post operations
  matches: (operation, ruleContext) => operation.method === 'post',
  rule: (operationAssertions) => {
    operationAssertions.requirement.hasResponses([{ statusCode: '201' }]);
  },
});
```

## operationAssertions

operationAssertions is used to define operation rules. There are [4 lifecycle triggers](./Reference.md#assertions) for registering rules which defines when they are triggered. A rule can be defined by passing in an assertion, which is a function that receives an [`Operation` object](./DataShapes.md#operation). Throwing a `RuleError` represents a failure, RuleError [details below](./Reference.md#rule-error).

`operationAssertions[lifecycle](assertion)`

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    // lifecycle rules that are available are added, changed, addedOrChanged, requirement and removed
    operationAssertions.added('contain summary', (operation) => {
      if (!operation.value.summary) {
        throw new RuleError({
          message: 'operations must contain a summary',
        });
      }
    });
  },
});
```

operationAssertion also includes a number of common helper functions. These are invoked by defining a lifecycle trigger, and then the helper function. e.g. `operationAssertions[lifecycle].helperFunction()`.

The helper functions that are included are:

- hasQueryParameterMatching
- hasPathParameterMatching
- hasHeaderParameterMatching
- hasCookieParameterMatching
- hasRequests
- hasResponses
- matches
- matchesOneOf

All of these helper functions can be inverted by prefixing with `.not`.

e.g. `operationAssertions.added.not.hasRequests([{contentType: 'application/json'}])`

### hasQueryParameterMatching

`operationAssertions[lifecycle].hasQueryParameterMatching(parameter)`

Looks for a query parameter in the operation that has a partial match with parameter. Passes if a partial match is found, fails if a partial match is not found. For more details about the matches helper - [see here](./Reference.md#matcher-helpers)

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    operationAssertions.added.hasQueryParameterMatching({
      name: 'version'
    });
    // This will match a query parameter with the shape `{ name: 'version' }`
    // query parameters with more keys will still be matched
  },
});
```

### hasPathParameterMatching

`operationAssertions[lifecycle].hasPathParameterMatching(parameter)`

Looks for a path parameter in the operation that has a partial match with parameter. Passes if a partial match is found, fails if a partial match is not found. For more details about the matches helper - [see here](./Reference.md#matcher-helpers)

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    operationAssertions.added.hasPathParameterMatching({
      name: 'userId'
    });
    // This will match a path parameter with the shape `{ name: 'userId' }`
    // path parameters with more keys will still be matched
  },
});
```

### hasHeaderParameterMatching

`operationAssertions[lifecycle].hasHeaderParameterMatching(parameter)`

Looks for a header parameter in the operation that has a partial match with parameter. Passes if a partial match is found, fails if a partial match is not found. For more details about the matches helper - [see here](./Reference.md#matcher-helpers)

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    operationAssertions.added.hasHeaderParameterMatching({
      name: 'X-Authorization'
    });
    // This will match a header parameter with the shape `{ name: 'X-Authorization' }`
    // header parameters with more keys will still be matched
  },
});
```

### hasCookieParameterMatching

`operationAssertions[lifecycle].hasCookieParameterMatching(parameter)`

Looks for a cookie parameter in the operation that has a partial match with parameter. Passes if a partial match is found, fails if a partial match is not found. For more details about the matches helper - [see here](./Reference.md#matcher-helpers)

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    operationAssertions.added.hasCookieParameterMatching({
      name: 'version'
    });
    // This will match a cookie parameter with the shape `{ name: 'version' }`
    // cookie parameters with more keys will still be matched
  },
});
```

### hasRequests

`operationAssertions[lifecycle].hasRequests(requests)`

Looks for an array of requests with a content type in the operation. A request has the following shape: `{ contentType: string }`

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    // asserts that the operation has both 'application/json' and 'application/xml' request bodies
    operationAssertions.added.hasRequests([{
      contentType: 'application/json'
    }, {
      contentType: 'application/xml'
    }]);
  },
});
```

### hasResponses

`operationAssertions[lifecycle].hasResponses(requests)`

Looks for an array of responses with a content type in the operation. A response has the following shape: `{ contentType?: string, statusCode: string }' where `contentType` is optional. If content type is not specified, only the status code will be considered when searching for the request.

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    // asserts that the operation has the following responses:
    // - response 200 with content 'application/json'
    // - response 400
    operationAssertions.added.hasResponses([{
      contentType: 'application/json',
      statusCode: '200'
    }, {
      statusCode: '400'
    }]);
  },
});
```

### matches

`operationAssertions[lifecycle].matches(shape)`

Expects the operation to match a shape. The default behavior is to do a partial match. For more details about the matches helper - [see here](./Reference.md#matcher-helpers)

```javascript
import { Matchers } from '@useoptic/rulesets-base';

new OperationRule({
  ...,
  rule: (operationAssertions) => {
    operationAssertions.added.matches({
      description: Matchers.string
    });
  },
});
```

### matchesOneOf

`operationAssertions[lifecycle].matches(shape)`

Expects the operation to match one of an array of shapes. The default behavior is to do a partial match. For more details about the matches helper - [see here](./Reference.md#matcher-helpers)

```javascript
import { Matchers } from '@useoptic/rulesets-base';

new OperationRule({
  ...,
  rule: (operationAssertions) => {
    operationAssertions.added.matches([
      { description: Matchers.string },
      { summary: Matchers.string },
    ]);
  },
});
```

## operationAssertions.queryParameter

operationAssertions.queryParameter is used to define query parameter rules. There are [4 lifecycle triggers](./Reference.md#assertions) for registering rules which defines when they are triggered. A rule can be defined by passing in an assertion, which is a function that receives an [`QueryParameter` object](./DataShapes.md#queryparameter--pathparameter--headerparameter--cookieparameter). Throwing a `RuleError` represents a failure, RuleError [details below](./Reference.md#rule-error).

`operationAssertions.queryParameter[lifecycle](assertion)`

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    // lifecycle rules that are available are added, changed, addedOrChanged, requirement and removed
    operationAssertions.queryParameter.added('not add required query parameter', (queryParameter) => {
      if (queryParameter.value.required) {
        throw new RuleError({
          message: 'cannot add a required query parameter',
        });
      }
    });
  },
});
```

## operationAssertions.pathParameter

operationAssertions.pathParameter is used to define path parameter rules. There are [4 lifecycle triggers](./Reference.md#assertions) for registering rules which defines when they are triggered. A rule can be defined by passing in an assertion, which is a function that receives an [`PathParameter` object](./DataShapes.md#queryparameter--pathparameter--headerparameter--cookieparameter). Throwing a `RuleError` represents a failure, RuleError [details below](./Reference.md#rule-error).

`operationAssertions.pathParameter[lifecycle](assertion)`

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    // lifecycle rules that are available are added, changed, addedOrChanged, requirement and removed
    operationAssertions.pathParameter.requirement('be snake_case', (pathParameter) => {
      if (!isSnakeCase(pathParameter.value.name)) {
        throw new RuleError({
          message: 'path parameter must be snake case',
        });
      }
    });
  },
});
```

## operationAssertions.headerParameter

operationAssertions.headerParameter is used to define header parameter rules. There are [4 lifecycle triggers](./Reference.md#assertions) for registering rules which defines when they are triggered. A rule can be defined by passing in an assertion, which is a function that receives an [`HeaderParameter` object](./DataShapes.md#queryparameter--pathparameter--headerparameter--cookieparameter). Throwing a `RuleError` represents a failure, RuleError [details below](./Reference.md#rule-error).

`operationAssertions.headerParameter[lifecycle](assertion)`

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    // lifecycle rules that are available are added, changed, addedOrChanged, requirement and removed
    operationAssertions.headerParameter.added('not add required header parameter', (headerParameter) => {
      if (headerParameter.value.required) {
        throw new RuleError({
          message: 'cannot add a required header parameter',
        });
      }
    });
  },
});
```

## operationAssertions.cookieParameter

operationAssertions.cookieParameter is used to define cookie parameter rules. There are [4 lifecycle triggers](./Reference.md#assertions) for registering rules which defines when they are triggered. A rule can be defined by passing in an assertion, which is a function that receives an [`CookieParameter` object](./DataShapes.md#queryparameter--pathparameter--headerparameter--cookieparameter). Throwing a `RuleError` represents a failure, RuleError [details below](./Reference.md#rule-error).

`operationAssertions.cookieParameter[lifecycle](assertion)`

```javascript
new OperationRule({
  ...,
  rule: (operationAssertions) => {
    // lifecycle rules that are available are added, changed, addedOrChanged, requirement and removed
    operationAssertions.cookieParameter.added('not add required cookie parameter', (cookieParameter) => {
      if (cookieParameter.value.required) {
        throw new RuleError({
          message: 'cannot add a required cookie parameter',
        });
      }
    });
  },
});
```

repository: opticdev/optic

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: opticdev/optic


text:
# Tetris

This implementation of the Tetris game was developed for the course `Programming and Data Structures in C` in Politechnika Łódzka.

![Tetris](tetris.png "Tetris!")

Since its inception the project has been rewritten to use SDL2, you can find the original implementation using SDL1.2 [here](https://github.com/epergo/tetris-C/tree/SDL1.2)

repository: epergo/tetris-C

gha_language: C

repo_name: epergo/tetris-C


text:
---
layout: post
title: Cargo compile routine
category: draft
---
* `compile_ws`
  * resolve final package dep graph (from source, with overrides, features, create a DAG)
  * `ops::compile_targets`
    * create `Unit`s out of targets
    * create `Context` && `JobQueue`
    * `compile`(enqueue `Unit`s of work)
      * check freshness by comparing `fingerprint`
      * prepare `Work` (closure) with underlying `rustc` call (which is unused for dirty package?)
        * prepare appropriate (deps) arguments
        * call (when `Work` is executed) `Executor` to compile
      * enqueue `Work` in `JobQueue` (using underlying `DependencyGraph`)
      * call `compile` for dependencies
    * `JobQueue::execute` - actually coordinate and compile
      * create helper thread for `jobserver` (gives out N tokens for maximally N running parallel jobs/lanes)
      * do the work via `drain_the_queue` inside `crossbeam::scope`
        * dequeue if possible onto local queue (as dequeue may dequeue multiple targets)
        * `run` the `Job` if queue not empty and we have jobserver token
          * fresh package runs the job directly, dirty package `scope.spawn`s it
          * ^ this actually executes `Work` prepared previously
          * note progress
    * collect compilation results + map


text:
This library is a collection of utilities for Haxe game development built with three principles in mind:

* Elegant API, itsumono utilities only do what their names say and are very simple to use.
* Highly-flexible, itsumono is designed to work with *your* data formats and *your* classes.
* Loose coupling, itsumono does not have a main loop and the utilities are vastly independant from one another.

 Otherwise, add "-lib itsumono" to your project's compilation flags. In [FlashDevelop](http://flashdevelop.org/), this can be done by clicking *Project* > *Properties…* > *Compiler Options* > *Libraries* and adding "itsumono" on a blank line. That's it, you can now use as many (or as few) itsumono utilities as you want in your project.

#Documentation

Please refer to the [itsumono wiki](https://github.com/agersant/itsumono/wiki).

#Licensing

The itsumono library is licensed under the MIT license.

repository: agersant/itsumono

repo_name: agersant/itsumono


text:
# Outreach Committee Meeting of .NET Foundation
## Fenruary 8th, 2021
Start Time: 3:00 PM ET

## Meeting Attendees

- Nicole Miller
- Shawn Wildermuth
- James Montemagno
- Jon Galloway
- Katie Savage
- Aneesh Ambikavally

## Staff Observers

- Nadeem Abutaa
- Tom Pappas

## Meeting Recording

- [Meeting Recording](https://dotnetfoundation.sharepoint.com/:v:/g/EXP8OhHzJWhArUkR_wijEDQBksawTrhtXbhlWAA8Tvqk-g)

## Introductions

Shawn Wildermuth, the Outreach Committee Chair, gave a quick introduction and outlined some agenda items.

### Open Discussion: Education Committee

The committee held its first meeting. They are realigning their goals and exploring what will be continued from the previous committee as well as what they will explore going forward.

### Open Discussion: Video Series

So far, viewership has been low but Shawn is working with the Marketing committee to try and get more engagement.

### Open Discussion: Virtual Conference

Aneesh will take care of the virtual conference; he is working on reaching out to the different vendors. The committee discussed an in-person conference as well. It was recommended that Aneesh reach out to Reactor to see if they are doing in person meetings/conferences.

### Open Discussion: Meetup Analytics

James spoke about two methods to support meetups:
- Meetup subcommittee
    - This would likely be a monthly meeting.
- This will be to support and reach out to different user groups; what do they need? How to get swag? Etc.
- We could empower groups with other tools and other tips
    - Triage Meetup Pro
- Lots of user groups that are being paid for but have not been active for quite some time.

### Open Discussion: Current Initiatives

The committee discussed the current charter as well as what goals they could adopt in order to move the needle. This could be in the form of a job board, a directory of programmers, etc. The committee also discussed the importance of marketing the initiatives we already offer as a foundation.

Two objectives that the outreach committee can focus on:

- Objective 1: .NET User Groups and supported & active
- Objective 2: .NET Open-source projects are celebrated

## Action Items

- James Montemagno will open an issue on GitHub and ask who would like to be involved in this “subcommittee”.

- Shawn Wildermuth will fix the request to join and make it more visible.

The meeting adjourned at 3:56 PM ET.

repository: dotnet-foundation/wg-outreach

repo_name: dotnet-foundation/wg-outreach


text:
# gc.pygc.py

Write a Python program called `gc.py` that takes a single positional argument which should be a file. Die with a warning if the argument is not a file. For each line in the file, print the line number and the percentage of the characters on that line that are a "G" or "C" (case-insensitive).

# Expected behavior

````
$ ./gc.py
usage: gc.py [-h] FILE
gc.py: error: the following arguments are required: FILE
$ ./gc.py foo
"foo" is not a file
$ ./gc.py samples/sample1.txt
  1:   9%
  2:  19%
  3:  19%
  4:  22%
  5:  32%
  6:  21%
````

Write a Python program called `gc.py` that takes a single positional argument which should be a file. Die with a warning if the argument is not a file. For each line in the file, print the line number and the percentage of the characters on that line that are a "G" or "C" (case-insensitive).

# Expected behavior

````
$ ./gc.py
usage: gc.py [-h] FILE
gc.py: error: the following arguments are required: FILE
$ ./gc.py foo
"foo" is not a file
$ ./gc.py samples/sample1.txt
  1:   9%
  2:  19%
  3:  19%
  4:  22%
  5:  32%
  6:  21%
````

# Test Suite

A passing test suite looks like the following:

````
$ make test
python3 -m pytest -v test.py
============================= test session starts ==============================
platform darwin -- Python 3.7.3, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 -- /Users/kyclark/anaconda3/bin/python3
cachedir: .pytest_cache
rootdir: /Users/kyclark/work/python/practical_python_for_data_science/ch05-python-strings-lists-tuples/exercises/gc_a, inifile:
plugins: remotedata-0.3.1, openfiles-0.3.2, doctestplus-0.3.0, arraydiff-0.3
collected 4 items

test.py::test_usage PASSED                                               [ 25%]
test.py::test_bad_input PASSED                                           [ 50%]
test.py::test_good_input1 PASSED                                         [ 75%]
test.py::test_good_input2 PASSED                                         [100%]

=========================== 4 passed in 0.30 seconds ===========================
````


text:
# fviz

![banner](./ss/banner.png)

Facebook Data Visualizer - made with <3

## vision

I was interested in understanding my facebook activities overtime. Also I had a knack in checking how much data I'm giving facebook. So, I thought of analysing exported facebook data and understanding what's it saying.

Later on I thought of making this tool a portable and easy installable one. So that anyone which some simple installation skills can use this tool and generate various plots, and understand their own activity on facebook overtime.

This tool does strictly run on user's machine. It doesn't talk to any remote machine, so you can use it while feeding it your exported facebook data.

## usage

- Make sure you've Python ( >=3.7 ) installed
- Also install pip using your OS specific package manager

```bash
$ sudo apt-get install python3-pip
```

- Now you're good to go and install **fviz**

```bash
$ python3 -m pip install fviz -U
```

- And voila !!!
- *fviz* is installed at `$HOME/.local/bin`. Add this path to `$PATH` env variable. For so, open `~/.bashrc` and append following line at very bottom. This will make *fviz* available for invokation from any place in your system.

```bash
export PATH="$PATH:$HOME/.local/bin"
```

- I'm assuming you've already requestsed facebook for exporting your facebook data, and downloaded so. Time to pass that *.zip* file to *fviz* and get results.

```bash
$ fviz facebook-username.zip sink plots
```

- `sink` is the directory where this *.zip* to be extracted. And `plots` is the directory where generated plots to be placed. You can set them as you will.

## visualisation

All these plots to be generated when you invoke *fviz* with proper params.
- Likes and Reactions
    - [Facebook Likes & Reactions by You](./docs/reactionsByYou.md)
    - [Top 10 Facebook profiles, whose posts were mostly reacted by You](./docs/top10ProfilesWithMostlyReactedPostsByYou.md)
    - [Detailed Facebook Likes & Reactions HeatMap](./docs/detailedReactionsHeatMap.md)
    - [Weekly Accumulated Facebook Likes & Reactions HeatMap](./docs/weeklyAccumulatedReactionsHeatMap.md)
    - [Top 3 Facebook profiles, whose posts were mostly liked & reacted by YOU, _per month_](./docs/top3ProfilesWithMonthlyMostReactedPosts.md)
    - [Accumulated Facebook likes and reactions mapped onto each minute of a Day](./docs/accumulatedAcivityInEachMinuteOfDay.md)

**This section will keep getting populated !!!**


text:
# Sort tailwind class names (class-order)

## Rule Details

This rule aims to keep tailwind classes order consistent.

Examples of **incorrect** code for this rule:

```js
<button class="flex relative mb-2 mb-0"></button>
```

Examples of **correct** code for this rule:

```js
<button class="relative flex mb-0 mb-2"></button>
```

## Further Reading

Order of rules is based on [this list](https://github.com/heybourn/headwind/blob/master/package.json#L59).

repository: mhiguera/eslint-plugin-tailwind

repo_name: mhiguera/eslint-plugin-tailwind


text:
# eps-conduit Recipes

Vagrant installation of eps-conduit is somewhat complicated, mostly due to the following requirements:

- Run latest version of golang (1.5.1)
- Configure a web app, running on multiple ports, behind eps-conduit.

## Golang

Installs Golang 1.5.1. This version is currently not available via linux package distributions, so this recipe downloads binaries and configures environment variables.

## Hello World

Downloads and installs [eps-conduit-hello](https://github.com/OrlandoGolang/eps-conduit-hello) - a lightweight web application that reports the port number it's listening on.

This information is helpful for debugging eps-conduit to confirm if it's distributing load properly across multiple backends.

## Build

Downloads dependencies via `$ go get` and compiles eps-conduit via `$ go install` each time vagrant machine is provisioned.

## Supervisor

Installs [supervisor](http://supervisord.org/) and is configured to run and manage `eps-conduit-hello` on multiple ports.

Supervisor will automatically start when the vagrant machine is started or provisioned.

If you need to modify supervisor or some of the process it manages, consult supervisor's [documentation](http://supervisord.org)

repository: OrlandoGolang/eps-conduit

gha_language: Ruby

repo_name: OrlandoGolang/eps-conduit


text:
---
title: Peninsula Terminal (Fisher's) Island will
tags:
  - Nov 1930
---

Peninsula Terminal (Fisher's) Island will become a large ship terminal. [Photos and drawings]

Newspapers: **The Miami News (weekly), Miami News-Metropolis, Miami Daily News or The Miami News**

Page: **1**, Section: **N/A**


text:
# Student Grade Table

A crud app for teachers to record student grades

## Introduction

The Student Grade Table is a dynamic web application for teachers to record the grades of their students.

## Technologies Used

- JavaScript
- React JS
- Node JS
- Express JS
- HTML5
- CSS3
- PostgreSQL
- AWS EC2

## Features

- User can view all grades already recorded
- User can view average of all grades
- User can add new grades
- User can delete existing grade
- User can modify existing grade

## Preview

![SGT](server/public/images/sgt-react.gif)

# Development

## System Requirements

- Node.js 10 or higher
- npm 6 or higher
- PostgreSQL 10 or higher

## Getting Started

1. Clone the respository.

```
git clone https://github.com/AlexanderHeo/student_grade_table.git
cd student_grade_table
```

2. Install dependencies with npm.

```
npm install
```

3. Create a PostgreSQL database

```
createdb gradebook
```

4. Setup environment variables

copy the .env.example file and rename to .env

```
copy .env.example .env
```

5. edit .env with PostgreSQL credentials

```
nano .env
```

6. Import database schema and data

```
psql [DATABASE_URL] < database/dump.sql
```

7. Start project

```
npm run dev
```

8. Open in your browser

```
localhost:5000
```

gha_language: JavaScript


text:
# bower-ripple-vault-client

This repo is for distribution on `bower`. The source for this module is in the
[main ripple-vault-client repo](https://github.com/ripple/ripple-vault-client).
Please file issues and pull requests against that repo.

## Install

Install with `bower`:

```shell
bower install ripple-vault-client
```

Add a `<script>` to your `index.html`:

```html
<script src="/bower_components/ripple/ripple-vault-client.js"></script>
```

Alternative you can use the debug and minified version

```html
<script src="/bower_components/ripple/ripple-vault-client-min.js"></script>
```

license: ISC

repository: isuncoin/icloud-client

repo_name: isuncoin/icloud-client


text:
#### Script File Name: copp\_statistics\_monitor.1.0.py

### SUMMARY
This Control Plane Policing (CoPP) statistics monitoring script is intended to monitor CoPP statistics (number of packets dropped or passed) for given CoPP class.

Switch CLI command 'show copp-policy statistics' can be executed to know about the supported CoPP classes. Examples for CoPP class are  stp, default, vrrp, sflow, dhcp, bgp-ipv4, icmp-broadcast-ipv4 etc.

Default CoPP class is in the script ‘total’ which monitors the total number of packets passed or dropped

### PLATFORMS SUPPORTED
8400X
8320

### SOFTWARE VERSION REQUIREMENTS
ArubaOS-CX 10.01.000X

### SCRIPT DESCRIPTION
The main sections of the CoPP statistics script are Manifest, ParameterDefinitions and the Agent Constructor.

The ’Manifest’ section defines the unique name for this script with short description about script purpose.

'ParameterDefinitions' section defines script parameters, in this case CoPP class name to monitor.

The 'Agent Constructor' handles the main logic for monitoring CoPP statistics for the given CoPP class. Statistics (Number of packets passed and dropped) for the given CoPP class will be presented as a time series graph for analysis purpose.

### LICENSES
Apache License, Version 2.0

### REFERENCES
[Aruba Networks Community](http://community.arubanetworks.com/t5/Network-Analytic-Engine/ct-p/NetworkAnalyticEngine)

repository: nishanthprakash-hpe/nae-scripts

repo_name: nishanthprakash-hpe/nae-scripts


text:
# Pydref - Idref access through Python
Pydref is a Python library that provides access to idref through the idref API.

## Features
This library takes care of the following for you:

- Query idref using solr api
- Download idref xml notice
- Parse some informations from the notice
- Help identify an idref from a simple full name

## Examples
You only need to import the `Pydref` class, instantiate it, and use it to query:

```python
from pydref import Pydref
pydref = Pydref()
result = pydref.identify("eric jeangirard")
```

repository: abes-esr/pydref

repo_name: abes-esr/pydref


text:
# GOLANG MICROSERVICE DEPLOYED ON AWS WITH KUBERNETES

I was able to deploy a microservice written in golang as containers that run on a kubernetes cluster. I was also able to leverage the power of kubernetes ingress to manage external access to the microservices in the cluster. Here are the steps I followed

## Proceedure

### Setup Environment

1) Build AMI with Jenkins, Nginx, Kubectl, Kops, Docker and Awscli pre-installed with Packer and Ansible. You can find my implementation of this in this [repository](https://github.com/Davitron/Jenkins_NGINX_IMAGE)

2) Spin up an EC2 ubuntu instance off this image. Ensure to create a key so you'll be able to ssh into the instance.

    `ssh -i ~/.ssh/<key>.pem ubuntu@<instance ip address>`

### Setup Kubernetetes cluster

1) Declare necessary environment variables:

    ```
      export CLUSTER_NAME=demo.k8s.local
      export KOPS_STATE_STORE=s3://demo-cluster-store
    ```

2) Create a bucket that corresponds you gave the KOPS_STATE_STORE

   ```
   aws s3 mb ${KOPS_STATE_STORE}
   ```
3) Create a kubernetes cluster with the following configuration

   `kops create cluster --name=${CLUSTER_NAME} --state=${KOPS_STATE_STORE}--node-count=2 --node-size=t2.micro --master-size=t2.micro --zones=us-east-2c`

4) Build the cluster

      `kops update cluster ${CLUSTER_NAME} --yes`

    this step will take about 10 to 15 minutes before everthing is up and running. After that you can run

      ```
        kops validate cluster
      ```
    if you still get an error such as the following:

    - `no such host`
    - `your masters are NOT ready`
    - `your node are not ready`

you can just wait it out for another 5 minutes, evnerything is perfectly fine. once all this is done and you run the validate command agian you should get an output like this:

```
Using cluster from kubectl context: demo.k8s.local

Validating cluster demo.k8s.local

INSTANCE GROUPS
NAME			ROLE	MACHINETYPE	MIN	MAX	SUBNETS
master-us-east-2c	Master	t2.micro	1	1	us-east-2c
nodes			Node	t2.micro	2	2	us-east-2c

NODE STATUS
NAME						ROLE	READY
ip-172-20-48-140.us-east-2.compute.internal	master	True
ip-172-20-49-6.us-east-2.compute.internal	node	True
ip-172-20-53-247.us-east-2.compute.internal	node	True

Your cluster demo.k8s.local is ready
```

To get all the nodes created within the cluster run:

```
  kubectl get nodes
```
 the outputs come in this format:

 ```
NAME                                          STATUS    ROLES     AGE       VERSION
ip-172-20-48-140.us-east-2.compute.internal   Ready     master    10m       v1.8.13
ip-172-20-49-6.us-east-2.compute.internal     Ready     node      8m        v1.8.13
ip-172-20-53-247.us-east-2.compute.internal   Ready     node      8m        v1.8.13
```

### Configure ECR for each of the services
These phase is crucial  because we will leverage on the power of Amazons Elastic Container Registry.

1) Create repositories for all the each of the services
   ```
    aws ecr create-repository --repository-name catalogue --region us-east-2
    aws ecr create-repository --repository-name catalogue-db --region us-east-2
    aws ecr create-repository --repository-name nginx-router --region us-east-2
   ```

2) for each of the following commands you will get a response similar to this:
   ```
    {
      "repository": {
        "registryId": "[your account ID]",
        "repositoryName": "[repository name]",
        "repositoryArn": "arn:aws:ecr:us-east-1:[your account ID]:repository/[repository name]",
        "createdAt": 150874585.0,
        "repositoryUri": "[your account ID].dkr.ecr.us-east-1.amazonaws.com/[repository name]"
      }
    }
   ```
   The repositoryUri value in each response is to be noted for later use

3) Authenticate with your repository for permission to push images to the registry:

    Running  `aws ecr get-login --no-include-email --region us-east-2`  will provide a response containing a docker command such as this:

    `docker login -u AWS -p ...` the output is very large.

    Copy the output, paste, and run it in the terminal.
    You should see

    `Login Succeeded`

4) Build all three images as provided in the Dockerfile in the `./docker` directory.
    ```
    docker build -t catalogue ./docker/cataloge .
    docker build -t catalogue-db ./docker/cataloge-db .
    docker build -t nginx-router ./docker/nginx .
    ```
    you can view the images by running such command

    ```
      REPOSITORY                TAG                 IMAGE ID            CREATED              SIZE
      nginx-router              latest              ac208f2e0a7e        2 days ago          109MB
      catalogue-db              latest              a7085c5923a3        2 days ago          372MB
      catalogue                 latest              9b8206d77dc5        2 days ago          120MB
    ```

5) Tag the images and push them to ECR
  ```
    docker tag catalogue-db:latest<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/catalogue-db:v1
    docker tag catalogue:latest<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/catalogue:v1
    docker tag nginx-router:latest<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/nginx-router:v1
  ```

  then to push them you use
  ```
    docker push<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/catalogue-db:v1
    docker push<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/catalogue:v1
    docker push<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/nginx-router:v1
  ```

### Deploy to cluster
1)Modify the deployment `yml` files like this

  ```
    spec:
    containers:
    - name: catalogue
      image:<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/catalogue:v1
      ports:
      - containerPort: 9090
  ```

  ```
    spec:
    containers:
    - name: catalogue-db
      image:<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/characters:21
      ports:
      - containerPort: 9091
  ```

  ```
    spec:
    containers:
    - name: nginx-router
      image:<PHONE_NUMBER>47.dkr.ecr.us-east-2.amazonaws.com/nginx-router:v1
      ports:
      - containerPort: 80
  ```

2) Apply this deployments with the following command
  ```
  kubectl apply -f catalogue.yml
  kubectl apply -f catalogue-db.yml
  kubectl apply -f nginx.yml
  ```

  Run `kubectl get deployments` to confirm deployment
  ```
  NAME                      DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
  catalogue-db-deployment   2         2         2            0           19s
  catalogue-deployment      2         2         2            2           29s
  nginx-router              2         2         2            2           10s
  ```

  The deployment also created services for the pods. To confirm these run:
  `kubectl get services` and you will get this response:

  ```
  NAME                   TYPE           CLUSTER-IP      EXTERNAL-IP        PORT(S)          AGE
  catalogue-db-service   ClusterIP      <IP_ADDRESS>   <none>             9091/TCP         4m
  catalogue-service      ClusterIP   <IP_ADDRESS>    aa18dfed2ca2b...   9090:30347/TCP   4m
  kubernetes             ClusterIP      <IP_ADDRESS>      <none>             443/TCP          2h
  nginx-router           LoadBalancer   <IP_ADDRESS>   aace9d436ca2b...   80:31786/TCP     4m
  ```

  from that output you can see that we have also created a loadbalancer using `nginx-ingress`. to get details of this loadbalancer we run the command:

  `kubectl describe service nginx-router` to get this output

  ```
    ubuntu@ip-172-31-33-170:~/catalogue$ kubectl describe service nginx-router
    Name:                     nginx-router
    Namespace:                default
    Labels:                   <none>
    Annotations:              kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"nginx-router","namespace":"default"},"spec":{"ports":[{"port":80,"targetPort":...
    Selector:                 app=nginx-router
    Type:                     LoadBalancer
    IP:                       <IP_ADDRESS>
    LoadBalancer Ingress:     aace9d436ca2b11e88a500a275c4b4ea-1938350810.us-east-2.elb.amazonaws.com
    Port:                     <unset>  80/TCP
    TargetPort:               80/TCP
    NodePort:                 <unset>  31786/TCP
    Endpoints:                <IP_ADDRESS>:80,<IP_ADDRESS>:80
    Session Affinity:         None
    External Traffic Policy:  Cluster
    Events:
      Type    Reason                Age   From                Message
      ----    ------                ----  ----                -------
      Normal  EnsuringLoadBalancer  13m   service-controller  Ensuring load balancer
      Normal  EnsuredLoadBalancer   13m   service-controller  Ensured load balancer
```

The LoadBalancer Ingress in this response is the DNS name that exposes the application to the public.

To test this microservice you can run the following commands in you terminal being the endpoints
originally specified in the ReadMe.md

```
  curl http://aace9d436ca2b11e88a500a275c4b4ea-1938350810.us-east-2.elb.amazonaws.com/health
  curl http://aace9d436ca2b11e88a500a275c4b4ea-1938350810.us-east-2.elb.amazonaws.com/catalogue
```

repository: Davitron/catalogue

repo_name: Davitron/catalogue


text:
---
title: "Repeating Jobs"
description: "Repeating Jobs"
buttonTitle: "Done"
parentId: "getting_started"
layout: "tutorial"
time: 90
weight: 5
---

## {$page.title}

Job.apex provides another type of jobs that can repeat themselves at given interval.

```javascript
new Job('test', new CustomJob())
    .startNow()
    .everyMinutes(30)
    .repeatForever()
    .schedule();
// Schedule a job that first runs 30 minutes after now, and then repeats itself forever
```


text:
## How to contribute to LNCM Projects

#### **Did you find a bug?**

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/lncm/pi-factory/issues).

* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/lncm/pi-factory/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and try to include a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

#### **Did you write a patch that fixes a bug?**

* Open a new GitHub pull request with the patch.

* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.

* If you haven't done a test build yet, please mention this in the pull request. This will save a world of pain for future builds. There is no regression testing suite set up yet but this is something that we're looking into. Contributions are welcome.

#### **I'm not a developer, what can I do to help?**

We could definetely use some UX, QA or Build Systems support on this project. See getting in touch below or just [create an issue](https://github.com/lncm/pi-factory/issues/new) and tag it with question.

Or if you just want to donate some money please use [**bc1qsdlppqy9mhah5ljmhcmtpl20n9km8jz45n3qx3les3q2qfzpwm7qnruqnq**](https://blockchair.com/bitcoin/address/bc1qsdlppqy9mhah5ljmhcmtpl20n9km8jz45n3qx3les3q2qfzpwm7qnruqnq) or feel free to use [**Lightning via tippin.me**](https://tippin.me/@lncnx) .

#### **Getting in touch**

We accept contributions of all kinds, please contact us on [Twitter](https://twitter.com/lncnx) or contact one of us directly on Wire Messenger (userid: @corv , @nolim1t, or @meeDamian)

repository: lncm/pi-factory

gha_language: Shell

repo_name: lncm/pi-factory


text:
coz
==========

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/coz-labo/coz
[bd_travis_url]: http://travis-ci.org/coz-labo/coz
[bd_travis_shield_url]: http://img.shields.io/travis/coz-labo/coz.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/coz-labo/coz
[bd_travis_com_shield_url]: https://api.travis-ci.com/coz-labo/coz.svg?token=
[bd_license_url]: https://github.com/coz-labo/coz/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/coz-labo/coz
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/coz-labo/coz.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/coz-labo/coz.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/coz-labo/coz
[bd_gemnasium_shield_url]: https://gemnasium.com/coz-labo/coz.svg
[bd_npm_url]: http://www.npmjs.org/package/coz
[bd_npm_shield_url]: http://img.shields.io/npm/v/coz.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

Flexible generator, which makes your project clean and maintainable.

```javascript
// Define rendering rule.
module.exports = {
  path: 'have-a-nice-day.txt', // File path to write
  tmpl: '.have-a-nice-day.txt.hbs', // Template file
  force: true, // Overwrite each time
  mode: '444',  // As readyonly file
  data: require('./my-datasource.json') // Data to render
}
```

Save this as ***.my-first-bud.bud*** , then running

```bash
$ coz render ".my-first-bud.bud"
```

will do the magic.

About coz
------

### What's This?

The basic idea of coz is that creating files from files.

1. Writing a meta file called [.bud file](#spec-bud-spec).
2. Running `coz render` command.
3. Files will be generated!

### What For?

Automation. Generating files makes your project clean and maintainable.

You can define a single datasource and distribute it in various forms.

For example,

+ Generate Javascript and Python entity from database definition.
+ Generate Web API document and Swift client entity from json schema objects.
+ Generate skelton test case files from project files.

### Why This?

+ **Lightweight and fast**
  + coz does nothing bud file templating, it's very fast.
+ **Unopinionated and flexible**
+ coz could be used to any kind of strings files.
  + Bunch of options to manipulate files.
+ Could be used by CLI or programmatically.
  + **Simple and extensible**
+ coz provides ways to customize, like registering your own template engine.

Getting started
------

### Requirements

+ [node.js][nodejs_url]

### Installation

coz is available as an [npm][npm_url] package.

```bash
# Install coz as a global module.
$ npm install coz -g
```

Or you can install it without `-g` option and use [Programmatic API](#programmatic-api).
For more details, see tutorial section "[01 - Installing coz][01_installing_coz_url]".

### Quickstart

**.who-likes-what.txt.bud** (bud file)
```javascript
/**
 * .who-likes-what.txt.bud
 * This is a bud file for "examples/01-minimum-demo"
 */

// Exports as a Node.js module.
module.exports = {

    // Template string. By default, parsed by Handlebars engine.
    tmpl: '{{#each members}}Hi, my name is {{@key}}. I like {{this}}.\n{{/each}}',

    // Overwrite when already existing.
    force: true,

    // File path to write out.
    path: 'who-likes-what.txt',

    // File permission.
    mode: '444',

    // Data to render.
    data: {
        members: {
            "Mai": "apple",
            "Tom": "Orange",
            "Rita": "Banana"
        }
    }
};

```

As you see, `.bud` file is actuary a JavaScript file and could be exported a Node.js module.

Save this file as `.who-likes-what.txt.bud` and then, run:

```bash
# Render the bud file
$ coz render ".who-likes-what.txt.bud"
```

This will generate a file named `who-likes-what.txt`.

For more details, see tutorial section "[02 - Rendering bud files][02_rendering_bud_files_url]".

### Programmatic API

coz provides programmatic API which enables you to execute coz commands from Node.js program.

```javascript
#!/usr/bin/env node

/**
 * run_rendering.js
 * This is an executable file for "examples/04-from-programmatic-api/run_rendering.js"
 */

var coz = require('coz');

// Render .bud files.
coz.render([
    '**/.*.bud'
], function (err) {
    console.log(err ? err : 'Done!');
});
```

For more details, see tutorial section "[04 - Using programmatic API][04_using_programmatic_a_p_i_url]".

[nodejs_url]: https://nodejs.org/en/
[npm_url]: https://www.npmjs.com/

Specifications
---------

### Bud File Specification

A bud contains file meta data like witch template to use, where to render it, what permission to give, and so on.

You can specify bud data by writing `.bud` file, which is actually a javascript file and could be written in Node.js format.

```javascript
module.exports = {
  path: 'my_file.txt',
  tmpl: '.my_file.txt.hbs',
  data: require('./.my_data')
}
```

And bud could be an array like:

```javascript
module.exports = [
  { path: 'my_file.txt', /* ... */ },
  { path: 'my_other_file.txt', /* ... */ },
]
```

Or an async function.

```javascript
module.exports = function(callback){
  myAsync((data) => {
   let error = null
   callback(err, data)
  })
}
```

For more details, see tutorial section "[03 - Mastering coz bud][03_mastering_coz_bud_url]".

##### Supported Properties

List of properties configurable in bud files.

| Name | Type | Default | Description |
| ----- | ----- | ----- | ----- |
| `engine` | string|object | 'handlebars' | Template engine name or engine itself |
| `cwd` | string | process.cwd() | Working directory path |
| `data` | object |  | Data which template render with |
| `mkdirp` | boolean | false | Make parent directories if needed |
| `setup` | object |  | Optional settings for template engine |
| `force` | boolean | false | Should overwrite file when already exists, or not |
| `mode` | string|number | '644' | Permission of generated files. (eg., '444' for readonly files) |
| `path` | string |  | Destination file path. If not provided, guess from bud file path |
| `tmpl` | string|function | 'json' | Template file path or registered template name or template function |

Tutorials
------

+ [01 Installing Coz][01_installing_coz_url]
+ [02 Rendering Bud Files][02_rendering_bud_files_url]
+ [03 Mastering Coz Bud][03_mastering_coz_bud_url]
+ [04 Using Programmatic Ap I][04_using_programmatic_api_url]
+ [05 Customizing Coz][05_customizing_coz_url]

[01_installing_coz_url]: https://github.com/coz-labo/coz/blob/master/doc/tutorial/01%20-%20Installing%20coz.md
[02_rendering_bud_files_url]: https://github.com/coz-labo/coz/blob/master/doc/tutorial/02%20-%20Rendering%20bud%20files.md
[03_mastering_coz_bud_url]: https://github.com/coz-labo/coz/blob/master/doc/tutorial/03%20-%20Mastering%20coz%20bud.md
[04_using_programmatic_api_url]: https://github.com/coz-labo/coz/blob/master/doc/tutorial/04%20-%20Using%20programmatic%20API.md
[05_customizing_coz_url]: https://github.com/coz-labo/coz/blob/master/doc/tutorial/05%20-%20Customizing%20coz.md

About this project
--------

### Author

+ [Taka Okunishi](http://okunishitaka.com)

### Donation

Support this project and [others by okunishinishi][my_gratipay_url] via [gratipay][my_gratipay_url].

[][my_gratipay_url]

[my_gratipay_url]: https://gratipay.com/okunishinishi/

License
-------
This software is released under the [MIT License](https://github.com/coz-labo/coz/blob/master/LICENSE).

Links
------

+ [coz-examples][coz_examples_url]

[coz_examples_url]: https://github.com/coz-labo/coz-examples#04-from-programmatic-api

repository: coz-labo/coz

repo_name: coz-labo/coz


text:
# react-router-native-slinky

[React-router-native](https://reactrouter.com/native/guides/quick-start) bindings for [slinky](https://slinky.dev/) (powered by [ScalablyTyped](https://scalablytyped.org))

It is distributed for Scala 2.13 and Scala.js 1

```
libraryDependencies ++= Seq("vision.id" %%% "react-router-native-slinky" % "0.1.3")
```

## Minimization

See the following compilation output:

```
[warn] Wrote react-router-native (36 files)
[warn] Wrote minimized prop-types (3 files)
[warn] Wrote minimized history (7 files)
[warn] Wrote minimized csstype (0 files)
[warn] Wrote minimized react-router (32 files)
[warn] Wrote minimized react (31 files)
[warn] Wrote minimized std (11 files)
[warn] Wrote minimized react-native (318 files)

```

repository: mcallisto/react-router-native-slinky

repo_name: mcallisto/react-router-native-slinky


text:
# Chynna Lew Portfolio

#### This application is a showcase of Chynna Lew's coding projects. The page can be viewed at: chynnalew.github.io/portfolio

#### By: Chynna Lew

## Technologies Used

* HTML
* CSS
* Bootstrap

## Description

This application is a webpage containing links to Chynna Lew's coding project repositories. It is intended to be used as a project portfolio.

## Setup/Installation Requirements

* Clone this repository to your local machine.
* Open index.html in your local browser.

## Known Bugs

* None

 ## License

 [MIT](https://opensource.org/licenses/MIT)

 ## Contact Information

<EMAIL_ADDRESS>

repository: chynnalew/portfolio

repo_name: chynnalew/portfolio


text:
# RSpec Matcher `adhere_to_schema`

[![Gem Version](https://badge.fury.io/rb/rspec-matchers-adhere_to_schema.svg)](http://badge.fury.io/rb/rspec-matchers-adhere_to_schema)
[![Code Climate GPA](https://codeclimate.com/github//rspec-matchers-adhere_to_schema.svg)](https://codeclimate.com/github/pekhee/rspec-matchers-adhere_to_schema)
[![Code Climate Coverage](https://codeclimate.com/github//rspec-matchers-adhere_to_schema/coverage.svg)](https://codeclimate.com/github/pekhee/rspec-matchers-adhere_to_schema)
[![Gemnasium Status](https://gemnasium.com//rspec-matchers-adhere_to_schema.svg)](https://gemnasium.com/pekhee/rspec-matchers-adhere_to_schema)
[![Travis CI Status](https://secure.travis-ci.org//rspec-matchers-adhere_to_schema.svg)](https://travis-ci.org/pekhee/rspec-matchers-adhere_to_schema)

<!-- Tocer[start]: Auto-generated, don't remove. -->

# Table of Contents

- [Features](#features)
- [Requirements](#requirements)
- [Setup](#setup)
- [Usage](#usage)
- [Tests](#tests)
- [Versioning](#versioning)
- [Code of Conduct](#code-of-conduct)
- [Contributions](#contributions)
- [License](#license)
- [History](#history)
- [Credits](#credits)

<!-- Tocer[finish]: Auto-generated, don't remove. -->

# Features

- Test if some data adheres to specified json schema
- Define json schema in a schemas directory and they will be automatically
picked

# Requirements

0. [MRI 2.2.3](https://www.ruby-lang.org)
1. [RSpec 3.x](http://rspec.info)

# Setup

To install, type the following:

    gem install rspec-matchers-adhere_to_schema

Add the following to your Gemfile:

    gem "rspec-matchers-adhere_to_schema"

This gem is signed. Use pekhee.pem as public key.

# Usage

    RSpec.describe "a user document" do
      subject do
        JSON.parse <<-JSON_DOC
          {
            firstName: "Pooyan",
            lastName: "Khosravi"
          }
        JSON_DOC
      end

      let :user_schema do
        JSON.parse <<-JSON_SCHEMA
          {
            "title": "User Schema",
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "age": {
                "description": "Age in years",
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["firstName", "lastName"]
          }
        JSON_SCHEMA
      end

      it "adheres to user schema" do
        expect(subject).to adhere_to_schema user_schema
        expect(subject).to adhere_to_schema :user # spec/schemas/user.json
      end
    end

# Tests

To test, run:

    bundle exec rake

# Versioning

Read [Semantic Versioning](http://semver.org) for details. Briefly, it means:

- Patch (x.y.Z) - Incremented for small, backwards compatible bug fixes.
- Minor (x.Y.z) - Incremented for new, backwards compatible public API enhancements and/or bug fixes.
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.

# Code of Conduct

Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By participating in this project
you agree to abide by its terms.

# Contributions

Read [CONTRIBUTING](CONTRIBUTING.md) for details.

# License

Copyright (c) 2016 [Pooyan Khosravi]().
Read the [LICENSE](LICENSE.md) for details.

# History

Read the [CHANGELOG](CHANGELOG.md) for details.
Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).

# Credits

Developed by [Pooyan Khosravi]().


text:
![Logo](admin/tileboard.png)
# ioBroker.tileboard

![Number of Installations](http://iobroker.live/badges/tileboard-installed.svg) ![Number of Installations](http://iobroker.live/badges/tileboard-stable.svg) [![NPM version](http://img.shields.io/npm/v/iobroker.tileboard.svg)](https://www.npmjs.com/package/iobroker.tileboard)
[![Downloads](https://img.shields.io/npm/dm/iobroker.tileboard.svg)](https://www.npmjs.com/package/iobroker.tileboard)

[![NPM](https://nodei.co/npm/iobroker.tileboard.png?downloads=true)](https://nodei.co/npm/iobroker.tileboard/)

WEB visualisation for ioBroker platform based on [TileBoard for Home Assistant](https://github.com/resoai/TileBoard).
Big thanks to [Alexey Ivanov](https://github.com/resoai).

## Installation & Documentation

<!-- ![Demo interface](images/user0.png) -->
<!-- ![Demo interface](images/user7.png) -->

## Control interface
TileBoard creates 3 variables:

- control.instance - Here the browser instance should be written or "*" if every browser must be controlled.
- control.data     - Parameter for command. See specific command description.
- control.command  - Command name. Write this variable triggers the command. That means before command will be written the "instance" and "data" must be prepared with data.

Commands:

* alert - show alert window in TileBoard. "control.data" has following format "message;title;jquery-icon". Title and jquery-icon are optional. Icon names can be found [here](http://jqueryui.com/themeroller/). To show icon "ui-icon-info" write ```Message;;info```.
* changeView - switch to desired view. "control.data" must have the index or title of view, like defined in config.
* refresh - reload TileBoard, for instance after project is changed to reload on all browsers.
* reload - same as refresh.
* popup - opens a new browser window. Link must be specified in "control.data", e.g. http://google.com
* playSound - play sound file. The link to file is specified in "control.data", e.g. http://www.modular-planet.de/fx/marsians/Marsiansrev.mp3.
  You can upload your own file in TileBoard and let it play as for instance "/tileboard.0/main/img/myFile.mp3".

If user changes the view or at start the variables will be filled by TileBoard with

- "control.instance": browser instance and ack=true
- "control.data": the page title as defined in config
- "control.command": "changedView" and ack=true

You can write the JSON-string or Object into control.command as ```{instance: 'AABBCCDD', command: 'cmd', data: 'ddd'}```. In this case the instance and data will be taken from JSON object.

### Alert
To get more settings for alert you can send following structure to adjust every parameter of the notification popup from script adapter.
```
setState('tileboard.0.control.command', JSON.stringify({
    command: "alert",
    instance: "*",
    data: {
        "icon": "mdi-car",        // Material icon
        "type": "info",           // Type: info, warning, error, success
        "title": "Information",   // Header of the message
        "message": "Hello world", // Text of the message
        "lifetime": 5,            // Seconds
    }
}));
```

## Changelog
### 0.2.0 (2019-07-15)
* (bluefox) Changes of the original tileboard were merged

### 0.1.1 (2019-02-12)
* (bluefox) Changes of the original tileboard were merged

### 0.1.0 (2019-01-16)
* (bluefox) initial commit

## License
Copyright (c) 2019 bluefox<EMAIL_ADDRESS>
MIT License


text:
# Liquid39

Quick & nasty barcode ([Code 39](https://en.wikipedia.org/wiki/Code_39)) rendering sample with Liquid templates (ala Shopify).  This effort was borne out of a need to use Shopify to render an HTML email containing a barcode.  The fact that it's email-based HTML, means that one is restricted to [Liquid](https://github.com/Shopify/liquid) only (i.e., no JavaScript).

To run, make sure you have Ruby installed, then:

    gem install liquid
    ruby barcode.rb

Presently outputs the encoded form of `*WIKIPEDIA*` (using the standard Code 39 start/stop symbol of '`*`').


text:
# C3.js-based OpenUI5 Data Vizualization library
This library provides an OpenUI5 API that acts as a wrapper for D3-based charting library C3.js. It offers a more detailed and attractive design than native OpenUI5 charting tools.

### License

This project is licensed under the MIT license.
Copyright 2017 [PulseShift GmbH](https://pulseshift.com/en/index.html)


text:
Android DeviceModel Plugin
====================
The purpose of the plugin is to provide a consumer friendly device model of Android devices.
I used [jaredrummler](https://gist.github.com/jaredrummler/16ed4f1c14189375131d)'s gist to crete the plugin.

Usage:
====================
Using the plugin is so simple. After installation, you will have an object called `devicemodel` in the global context.
In order to get the device model, use the `identify` method as below:

	devicemodel.identify(function(err, data) {
		if (err) return console.log('Opps, error');
		console.log(data.model);
	});

Installation
---
In order to install the plugin you can simply use the following Cordova CLI command:

	cordova plugin add https://github.com/mertdogar/cordova-android-devicemodel

Important Note
---
The plugin only works for Android platform. In iOS, device model can easy be obtained using [this](https://github.com/apache/cordova-plugin-device) plugin.

Licence
---
It is Apache License, Version 2.0. Feel free to fork the project and send pull requests if you have any.

repository: mertdogar/cordova-android-devicemodel

repo_name: mertdogar/cordova-android-devicemodel


text:
# bo

## overview
imaginary e-shop. Your task is to create an endpoint that, for a given date, will return a report that will contain the following metrics.
* The total number of items sold on that day.
* The total number of customers that made an order that day.
* The total amount of discount given that day.
* The average discount rate applied to the items sold that day.
* The average order total for that day
* The total amount of commissions generated that day.
* The average amount of commissions per order for that day.
* The total amount of commissions earned per promotion that day.

written with Python 3.7.6, Flask 1.1.1, Werkzeug 1.0.0 & SQLite version 3.28.0
## Assumptions
* i am assuming you are running on a mac with catalina with python installed and sqlite3 installed
## database creation & importing the data
* run the initdb - this will create directory instances
* at the command line cd into instances - there will be a file bo.sqlite
* run sqlite3 to get the prompt sqlite>
* then run the following
* sqlite> .open bo.sqlite
* sqlite> .tables
    * this will give you a list of the created tables
* sqlite> .mode csv
    * to tell sqlite you are importing csv files
* sqlite> .import /path-to-working-dir/file-name.csv tablename
    * on my system it looks like this
    * sqlite> .import /Users/jmhowitt/PycharmProjects/suade/csvdata/promotions.csv promotions
* do this for all six tables
    * commissions
    * orders
    * products
    * order_lines
    * product_promotions
    * promotions
* n.b. this method imports all the line even if the first line are the column header. because of this with the sample data i have removed the column heads.
*
*

## tests
There are four basic tests for the main code, one basic api call and two for the database connections
## how to use
/bonjour
just gives you a reply to make sure the api is functioning

/bo?date=yyyy-mm-dd
passing a date in the yyyy-mm-dd between 2019-08-01 and 2019-09-29 will return a json report

## if i had had more time/production environment
• would have used sqlalchemy for obvious reasons and i would have used Alembic to manage  the tables development.
• i would have written and import routine for the databases to import the csv's
* would have solit the code out to more modules
* would have used gRPC and protobuf instead of REST
* was just running out of time

license: Unlicense

repository: zanzeeba/backendorchestrator

gha_language: Python

gha_license_id: Unlicense

repo_name: zanzeeba/backendorchestrator


text:
# Free Fire ESP And Aimbot
A customized LGL mod menu, containing ESP, aimbot, hooking, and patching codes for Free Fire

Mod menu is based on my old template (August 2020)

# Screenshot
*Taken from random Youtube video, didn't bother testing it, but I know it works like this*

![](https://i.imgur.com/gHsr5Cx.png)

# DISCLAIMER
**WE SHARE THIS PROJECT FOR EDUCATIONAL PURPOSES ONLY, TO LEARN HOW THIS PROJECT WORKS. WE DO NOT ENCOURAGE YOU TO MOD FREE FIRE OR ANY TENCENT GAMES.   DON'T ask how to use it and/or fixing the project, instead learn from the internet or ask for help on any modding community forum sites.**

**DON'T SELL THE SOURCE, DON'T BUY FROM SOMEONE EITHER WHEN YOU CAN GET IT FOR FREE, DON'T GET SCAMMED. SAVE YOU MONEY**

repository: xdryzen/FreeFire-ESP-And-Aimbot

repo_name: xdryzen/FreeFire-ESP-And-Aimbot


text:
![logo](/imgs/21_logo.png)

# TwentyOne (21)*
*Note 21 is still in alpha, there will be many changes in the next few months

## Introduction
We all know ["42"](https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%27s_Guide_to_the_Galaxy#Answer_to_the_Ultimate_Question_of_Life,_the_Universe,_and_Everything_(42)) is the answer to the ultimate question in the universe. 42 is the dream solution we all want to achieve. Today we are halfway there. TwentyOne is the engine which takes data and creates models and answers questions to many different kinds of problems. 21 is a generic tool which can be used in multiple use cases.

## Why use 21?

Solution = AI Expertise + Data -> 42 + Data ~ 21 + Data

Focus of 21 is to get an effective model quickly and reliably and it doesn't try to get state of the art model (though we can get best in class results). It is meant for non-data scientists to build models for their use cases.

21 is designed to leverage transfer learning as much as possible. For many problems the data requirement for 21 is minimal. This saves a lot of time, effort and cost in data collection. Model training is also greatly reduced.

It can also be used in situations where data is private and can't be shared for training. We can use APi to trigger 21 to start the ML training remotely. The trained model can be made available for inference using right set of TBs. This helps in using the intelligence and results derived from private data and maintaining the privacy at the same time.

Though 21 tries to be an auto ML engine, it can be used as an augmented ML engine which can help data scientist to quickly develop models. This can bring best of both worlds leading to "Real Intelligence = Artificial Intelligence + Human Intelligence"

### Advantages
- Greatly improves development time (days instead of months)
- Needs less amount of data (transfer learning and data augmentation)
- Cost for development is minimal (mainly compute cost, rest is reduced)
- Builds robust models (effectively searches "more space" to get best model)
- Learns best practices and uses them for similar use cases (leverages task-pipeline relation)
- Data Security and Privacy (remote training and inference using TBs)
- Works on most of the common use cases (contiguously adding new use cases)

### Drawbacks
- Needs a lot of compute
- Can't be used for new kind of problems or very complex problems

![meme](/imgs/memes/21_0.jpeg)

## How to use?

The configuration is through config.yaml file. Look at the test folder to see how to use 21.

### Main concepts

1. Task: task includes the problem type (classification, regression, seq2seq), the pointer to the data and evaluation metric to be used to build a model.
2. Data: data holds the raw content and the meta information about the type of data (text, images, tabular etc.) and its characteristics (size, target, names, how to process etc).
3. Model: is either a machine learning or time series or deep learning model which is needed to learn the relation in the data.
4. Model Universe: is a collection of models, its hyper parameters and the tasks to which it has to be considered.

### Blocks

![top](/imgs/Blocks.PNG)

### Top level architecture of the engine

![top](/imgs/top.PNG)

## How does it work?

Read the docs to understand how it works. The architecture in the docs provide top level view of how things work. API documentation gives details of how to use 21 engine.

## Additional Resources

- [Architecture](docs/21_architecture.drawio)
- [Config](config/config.yaml)
- [Todos](docs/todo_logs.md)
- [References](docs/references.md)

## Maintained By

This repo is currently maintained by [shivaramkrs](https://github.com/shivaramkrs) and the ML team at [Curl Tech](www.curl.tech). We welcome your contribution.

## License

MIT License

repository: nikzagarwal/twentyone

repo_name: nikzagarwal/twentyone


text:
Welcome to react-native-monthly-calendar 👋

>
This is a fantastic calendar for React Native that allows you to select months for years

### 🏠 [Homepage](https://www.npmjs.com/react-native-monthly-calendar)

### ✨ [Demo](https://pippo-expo.com)

## Install

```sh
npm install
```

## Usage

```sh
npm run start
```

## Author

👤 **fannolo**

- Github: [@fannolo](https://github.com/fannolo)
- LinkedIn: [@fannolo](https://linkedin.com/in/fannolo/)

👤 **gitmazzio**

- Website: https://matteomazziotti.it/
- Github: [@gitmazzio](https://github.com/gitmazzio)
- Twitter: [@teomazzio](https://twitter.com/teomazzio)
- LinkedIn: [@matteomazziotti](http://linkedin.com/in/matteomazziotti)

👤 **lore93**

- Github: [@lore93](https://github.com/lore93)
- LinkedIn: [@lorenzo-cunial](https://linkedin.com/in/lorenzo-cunial-669aa5146/)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/Fannolo/react-native-monthly-calendar/issues). You can also take a look at the [contributing guide](https://github.com/Fannolo/react-native-monthly-calendar/graphs/contributors).

## Show your support

Give a ⭐ if this project helped you!

## 📝 License

Copyright © 2020 [fannolo](https://github.com/fannolo).

This project is [MIT](https://github.com/Fannolo/react-native-monthly-calendar/blob/master/LICENSE) licensed.

---

_This README was generated with ❤ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

repository: Fannolo/react-native-monthly-calendar

repo_name: Fannolo/react-native-monthly-calendar


text:
### 0.5.2
 * Fixed ConcurrentModificationException in JMemoryBuddyLife.
 * Upated the Gradle Build and how the publishing works.

### 0.5.1
 * Replace the PhantomReference in JMemoryBuddyLife with a WeakReference,
   because it wasn't necessary.

### 0.5.0
 * Added JMemoryBuddyLife, to monitor a running JVM for memory leaks.

### 0.2.6
 * Minor updates and refactoring.

### 0.2.5
 * The heap dumps are now saved by default in the directory `target` or `build` if they exist.

### 0.2.4
 * Updated JavaDoc.

### 0.2.3
 * Added JavaDoc.
 * Made various fields and methods private.

### 0.2.2
 * If something get's collected but is marked with `assertNotCollectable`, then the original result of the toString method is used for the error output.
 * Minor improvements/bugfixes to the error messages.

### 0.2.1
 * The following values are now also configurable: `-Djmemorybuddy.createHeapDump` and `-Djmemorybuddy.garbageAmount`
### 0.2.0
 * Added "Automatic-Module-Name" for better compatibility with jigsaw / Java11.
 * Various variables are now configurable with systemproperties.
 * The method testMemory now shares it's counter when checking whether a element has been collected.
 This makes the time required to check constant independent of the number of references to checked.

### 0.1.2
 * Changed the error from RuntimeException to AssertionError. This is the same behaviour as junit.

repository: Sandec/JMemoryBuddy

gha_language: Java

repo_name: Sandec/JMemoryBuddy


text:
---
title: "Intro to the Facilitator Cards Blog"
description: "Let's start with a little housekeeping: framing the blog, instructions for where to find things, and our intended outcomes."
categories: "Resources"
author: "Sam Killermann"
date: "2019-03-04"
keywords: ["facilitation", "training", "facilitator resources", "facilitator tools", "facilitator cards", "training resources"]
featured_image: "img/blog/creativity-doesnt-need-limits-creative-exchange.jpg"
images:
- img/blog/creativity-doesnt-need-limits-creative-exchange.jpg
photo_cred: "Creativity Exchange"
---

We're going to be using this blog as a platform to talk about a few things: the creation of the Facilitator Cards, how we (and others, and you) are using them, and other facilitation & training resources we feel compelled to share.

Beyond being a home to the cards themselves, our goal for this site is to serve as a gallery of related resources. Everything that falls into that bucket will be introduced on the blog.

Right now, at the moment I'm writing this, however, the blog is blank. Other than this post. Because the cards haven't been created yet. And nobody is using them. So there aren't any related resources we can share (obvs).

But all that will be changing in the coming months.

Each day, we're inching a little closer. Today, for example, I [built out the blog functionality on this site](https://github.com/killermann/facilitator-cards/commit/2cdaea882883986e6b1380aa93e9d7996881fe40). Gotta have a blog if we're going to tell you about the other things, right?

As the project develops, I'll update this post, and we'll write new ones. Some things we hope to write about:

- The story of how Facilitator Cards came to be
- How we designed & (eventually, hopefully) manufactured the Facilitator Cards
- Who we're making this stuff for: the types of facilitators & trainers we have in mind
- Different ways we use Facilitator Cards (and different ways you do)
- [Training tools and facilitator resources we love](https://www.facilitator.cards/categories/resources/)
- New expansions we've created and added to the site

If you'd like to read about that stuff, subscribe to the blog.

You can [view our blog's RSS feed here](https://www.facilitator.cards/blog/index.xml) (if you're the kinda person who knows what an RSS feed is), or just [click here for email updates when there are new posts](https://feedburner.google.com/fb/a/mailverify?uri=facilitatorcardsblog&loc=en_US) (free for you, free for us, everyone's happy).

We'll have news gradually over the coming months, and this will be where we share it (no plans for a Facebook Page or Twitter Profile).

Until next time,

sK

Co-creator, **Facilitator Cards**

Co-author, **[Unlocking the Magic of Facilitation](//facilitationmagic.com)**

Co-facilitator, **[Faciltating.XYZ](//facilitating.xyz)**

repository: killermann/facilitator-cards

gha_language: HTML

repo_name: killermann/facilitator-cards


text:
# net

Networking scripts:

`add_route.sh`: add a route to a network prefix via a router (gateway) to a
device:

```
Usage:
    ./add_route.sh <prefix> <gateway> <dev> [stop]
Arguments:
    prefix:  route this network prefix
    gateway: route via this gateway
    dev:     use this net device for route
    stop:    stop this routing rule
```

`forward_port.sh`: forward a port to a destination IP and port:

```
Usage:
    ./forward_port.sh <port> <dest_ip> <dest_port> [stop]
Arguments:
    port:      external port
    dest_ip:   internal forwarding IP
    dest_port: internal forwarding port
    stop:      stop this forwarding rule
```

`enable_ip_forwarding.sh`: enable IP forwarding for IPv4 persistently by
creating a sysctl configuration file in `/etc/sysctl.d/90-ip-forward.conf` and
loading it.

`nat-nftables.sh`: start NAT for outgoing traffic on a network interface:

```
Usage:
  ./nat-nftables.sh start <ext_if>
  ./nat-nftables.sh stop <ext_if>

Arguments:
  ext_if:       external network interface, e.g.: eth1

Examples:
  ./nat-nftables.sh start eth1
  ./nat-nftables.sh stop eth1
```

`ip-forward.sh`: start ip forwarding:

```
Usage:
  ./ip_forward.sh start
  ./ip_forward.sh stop
```

repository: hwipl/configs

repo_name: hwipl/configs


text:
# TF-activity workflow
Pipeline to infer active transcription factors from CAGE-seq data using transcription factor binding motifs.

[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.24.0-brightgreen.svg)](https://www.nextflow.io/)
[![Docker Repository on Dockerhub](https://img.shields.io/badge/docker-available-green.svg "Docker Repository on Dockerhub")](https://hub.docker.com/r/kevinmenden/tf-activity/)
![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)

## Description
Given a set of CAGE-peaks of interest (e.g. up-regulated in some condition), this pipeline will extract the genomic sequence
in a given range around these peaks and look for enrichment of TF motifs in these sequences. As background either the
shuffled input sequences will be used or a background extracted from user supplied CAGE-peaks that are not of interest.

The pipeline will annotate the peaks and create TF-gene mappings. Additionally, the CAGE-peaks are overlapped
with ChIP-seq peaks extracted from the [ENCODE](https://www.encodeproject.org/) project.

## Usage
As minimum input for this pipeline you will need:
* CAGE peaks of interest in bed format
* fasta of reference genome
* gtf of reference genome

#### `--fasta`
Used to specify the path to the reference genome.

#### `--gtf`
Used to specify path to the GTF file of the reference genome.

#### `--peaks`
Your cage peaks of interest in BED file format.

#### `--background`
Peaks that are not differentially expressed can be used here as background peaks. They have to be in BED format
just like your peaks of interest.

#### `--pfms`
A file containing all the TF motifs to use. This file must be in homer format. If you do not have a file in homer format,
you can instead specifiy a TF motif file in Jaspar format using the `--pfms_jaspar` flag. If none of these two flags
is set, the pipeline will use all motifs from the Jaspar core collection.

#### `--encode`
A directory containing BED peak files from ChIP-seq experiments with transcription factors. They will be used for
intersection. If this flag is not set, this step will be let out.

#### `-profile`
Which profile to use. Use `docker` to use the docker container provided.
It is best to create your own profile config file. You can look at the files in /conf for examples, and create one yourself.
Then you have to reference it in the nextflow.config file like so:

```
profiles {

    standard
    {
        includeConfig 'conf/base.config'
    }
    docker
    {
        includeConfig 'conf/base.config'
        includeConfig 'conf/docker.config'
    }
    my_profile
    {
        includeConfig 'conf/base.config'
        includeConfig 'conf/my_profile.config'
    }

}
```

Additional input options:

Example pipeline call:
```bash
nextflow run kevinmenden/tf-activity -profile docker --fasta path/to/genome.fa --gtf path/to/gtf/genome.gtf \
--peaks peaks.bed --background background.bed
```

In the above example, the pipeline will use the [docker image](https://hub.docker.com/r/kevinmenden/tf-activity/) from
dockerhub to run. Because no motifs are specified, the default Jaspar core motifs will be used.

repository: KevinMenden/tf-activity

repo_name: KevinMenden/tf-activity