text:
PyTorch Object Detector reference application on IPUs
---

## Overview

Run Object Detector inference on Graphcore IPUs using PyTorch.

The following models are supported in inference:
1. YOLOv4-P5, implementation of [Scaled-YOLOv4: Scaling Cross Stage Partial Network](https://arxiv.org/abs/2011.08036). [Original repository](https://github.com/WongKinYiu/ScaledYOLOv4).

### Folder structure

* `run.py` Reference script to run the application.
* `models` Models definition.
* `utils` Contains common code such as tools and dataset functionalities.
* `configs` Contains the default configuration for inference.
* `tests` Contains all the different tests for the model.
* `README.md` This file.
* `requirements.txt` Required Python packages.
* `conftest.py` Test helper functions.

### Installation instructions

1. Prepare the PopTorch environment. Install the Poplar SDK following the
   [Getting Started](https://docs.graphcore.ai/en/latest/getting-started.html) guide for your IPU system. Make sure to source the
   `enable.sh` scripts for Poplar and PopART and activate a Python virtualenv with PopTorch installed.

2. Install the pip dependencies:

```console
pip install -r requirements.txt
```

3. Download labels and sample images for inference and training:

Download the labels:

```console
curl -L https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017labels.zip -o coco2017labels.zip && unzip -q coco2017labels.zip -d '/localdata/datasets' && rm coco2017labels.zip
```

This command might need root access or sudo to unzip the folders.

Download the images:

```console
bash utils/download_coco_dataset.sh
```

4. Build the custom ops:

```console
make
```

## Running and benchmarking

To run a tested and optimised configuration and to reproduce the performance shown on our [performance results page](https://www.graphcore.ai/performance-results), please follow the setup instructions in this README to setup the environment, and then use the `examples_utils` module (installed automatically as part of the environment setup) to run one or more benchmarks. For example:

```bash
python3 -m examples_utils benchmark --spec <path to benchmarks.yml file>
```

Or to run a specific benchmark in the `benchmarks.yml` file provided:

```bash
python3 -m examples_utils benchmark --spec <path to benchmarks.yml file> --benchmark <name of benchmark>
```

For more information on using the examples-utils benchmarking module, please refer to [the README](https://github.com/graphcore/examples-utils/blob/master/examples_utils/benchmarks/README.md).

### Running inference

1. Running inference without the weight:

```console
python run.py
```
`run.py` will use the default config defined in `configs/inference-yolov4p5.yaml` which can be overridden by the following options:
```
  -h, --help            show this help message and exit
  --data DATA           Path to the dataset root dir (default:
                        /localdata/datasets/)
  --config CONFIG       Configuration of the model (default:
                        configs/inference-yolov4p5.yaml)
  --show-config         Show configuration for the program (default: False)
  --weights WEIGHTS     Pretrained weight path to use if specified (default:
                        None)
  --num-ipus NUM_IPUS   Number of IPUs to use (default: 1)
  --num-workers NUM_WORKERS
                        Number of workers to use (default: 20)
  --input-channels INPUT_CHANNELS
                        Number of channels in the input image (default: 3)
  --activation ACTIVATION
                        Activation function to use in the model (default:
                        mish)
  --normalization NORMALIZATION
                        Normalization function to use in the model (default:
                        batch)
  --num-classes NUM_CLASSES
                        Number of classes of the model (default: 80)
  --epochs EPOCHS       Number of training epochs (default: 300)
  --class-name-path CLASS_NAME_PATH
                        Path to the class names yaml (default:
                        ./configs/class_name.yaml)
  --image-size IMAGE_SIZE
                        Size of the input image (default: 896)
  --micro-batch-size MICRO_BATCH_SIZE
                        The number of samples calculated in one full
                        forward/backward pass (default: 1)
  --mode MODE           Mode to run the model (default: test)
  --precision {half,mixed,single}
                        Precision to run the model with (default: half)
  --benchmark           Run performance benchmark (default: False)
  --sharded             Use sharded execution, where IPU will sequentially
                        execute a part of the model, otherwise pipeline
                        execution will be used instead (default: False)
  --exec-cache EXEC_CACHE
                        Path to store training executable cache for the
                        compiled model (default: ./exec_cache)
  --cpu                 Use cpu to run model (default: True)
  --device-iterations DEVICE_ITERATIONS
                        Number of device iterations (default: 1)
  --gradient-accumulation GRADIENT_ACCUMULATION
                        Number of gradient accumulation, only relevant for
                        training (default: 1)
  --initial-lr INITIAL_LR
                        Initial learning rate (default: 0.01)
  --momentum-lr MOMENTUM_LR
                        Initial learning rate (default: 0.937)
  --class-conf-threshold CLASS_CONF_THRESHOLD
                        Minimum threshold for class prediction probability
                        (default: 0.4)
  --obj-threshold OBJ_THRESHOLD
                        Minimum threshold for the objectness score (default:
                        0.4)
  --iou-threshold IOU_THRESHOLD
                        Minimum threshold for IoU used in NMS (default: 0.65)
  --plot-step PLOT_STEP
                        Plot every n image (default: 250)
  --plot-dir PLOT_DIR   Directory for storing the plot output (default: plots)
  --dataset-name DATASET_NAME
                        Name of the dataset (default: coco)
  --max-bbox-per-scale MAX_BBOX_PER_SCALE
                        Maximum number of bounding boxes per image (default:
                        90)
  --train-file TRAIN_FILE
                        Path to the train annotations (default: train2017.txt)
  --test-file TEST_FILE
                        Path to the test annotations (default: val2017.txt)
  --no-eval             Dont compute the precision recall metrics (default:
                        True)
  --verbose             Print out class wise eval (default: False)
  --wandb               Log metrics to weight and biases (default: False)
  --logging-interval LOGGING_INTERVAL
                        Number of steps to log training progress on console
                        and/or to wandb (default: 200)
```
2. Running pre-trained model:

To download the pretrained weights, run the following commands:
```
mkdir weights
cd weights
curl https://gc-demo-resources.s3.us-west-1.amazonaws.com/yolov4_p5_reference_weights.tar.gz -o yolov4_p5_reference_weights.tar.gz && tar -zxvf yolov4_p5_reference_weights.tar.gz && rm yolov4_p5_reference_weights.tar.gz
cd ..
```
These weights are derived from the a pre-trained model shared by the [YOLOv4's author](https://github.com/WongKinYiu/ScaledYOLOv4).
We have post-processed these weights to remove the model description and leave a state_dict compatible with the IPU model description.

To run inference with the weights:

```console
python run.py --weights weights/yolov4_p5_reference_weights/yolov4-p5-sd.pt
```

### Evaluation

To compute evaluation metrics run:
``` console
python run.py --weights '/path/to/your/pretrain_weights.pt' --obj-threshold 0.001 --class-conf-threshold 0.001
```
You can use the `--verbose` flag if you want to print the metrics per class. Here is a comparison of our metrics against theirs on the COCO 2017 detection validation set:

| Model | Image Size | Type | Classes | Precision | Recall |<EMAIL_ADDRESS>| mAP@0.5:.95 |
|-------|------------|------|---------|-----------|--------|---------|-------------|
|  GPU  | 896        | FP32 | all     | 0.4501    | 0.76607| 0.6864  | 0.49034     |
|  GPU  | 896        | FP16 | all     | 0.44997   | 0.7663 | 0.68663 | 0.49037     |
|  IPU  | 896        | FP16 | all     | 0.45032   | 0.7674 | 0.68674 | 0.49159     |

We generate the numbers for the GPU by re-running the Scaled-YOLOv4 repo code on an AWS instance. Please note that these numbers are slightly different from what they report in their repo. This is attributed to the `rect` parameter. In their inference, this is set to be `True`. The IPU currently can not support different sized images, and therefore, we set this to `False` in their evaluation in order to draw a fair comparison. In that regard, we do perform at par with SOTA.

### Running the tests

After following installation instructions run:

```console
pytest
```

### Running training

To run the training you need to run ´run.py´in train mode.
It is recommended to use the provided config file.

``` console
python run.py --config /configs/training-yolov4p5.yaml --epochs 300
```
The training config can be overwritten with command-line interface.

The training will create multiple checkpoints. It is the files with `.pt` extension in the weights folder. To improve the portability of checkpoints `.pt.conf.yml` assigned to the file, which contains the configs of the experiment.

Any checkpoint can be validated with the following command:
``` console
python run.py --weights <path/checkpoint.pt> --epochs 0
```
It loads the pretrained model and skips the training.

repository: graphcore/examples

repo_name: graphcore/examples


text:
```
┌─┐┬ ┬┌─┐┌─┐┌─┐┌─┐┬─┐   ┌┬┐┌─┐┬─┐┌─┐┌─┐┬─┐
└─┐│││├─┤│ ┬│ ┬├┤ ├┬┘───│││├┤ ├┬┘│ ┬├┤ ├┬┘
└─┘└┴┘┴ ┴└─┘└─┘└─┘┴└─   ┴ ┴└─┘┴└─└─┘└─┘┴└─
```

[![Greenkeeper badge](https://badges.greenkeeper.io/WindomZ/swagger-merger.svg)](https://greenkeeper.io/)
[![Node.js(≥12.22) CI](https://github.com/WindomZ/swagger-merger/actions/workflows/ci.yml/badge.svg)](https://github.com/WindomZ/swagger-merger/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/WindomZ/swagger-merger/badge.svg?branch=master)](https://coveralls.io/github/WindomZ/swagger-merger?branch=master)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)

> Merge **multiple** related files from **a** input swagger file, Write to **a** output swagger file.
>
> Support **JSON**/**YAML**.

[![NPM](https://nodei.co/npm/swagger-merger.png)](https://nodei.co/npm/swagger-merger/)

[![swagger-merger](https://img.shields.io/npm/v/swagger-merger.svg)](https://www.npmjs.com/package/swagger-merger)
[![status](https://img.shields.io/badge/status-stable-green.svg)](https://www.npmjs.com/package/swagger-merger)

## Features
- [x] _Merge_ ***multiple*** swagger files into ***a*** swagger file.
- [x] _$ref_ - A tag, include a **single-level** of swagger file.
- [x] _$ref#*_ - A tag, include a **multi-level** of swagger file.
- [x] _Support_ **JSON**/**YAML** swagger files(`.json`/`.yaml`/`.yml`).
- [x] _CLI_ - Command line interface.

## Usage

### $ref
> Includes a _single-level_ of swagger file.

- [Official standards](https://swagger.io/docs/specification/using-ref/)
- Recommended, universal

For `yaml` example:

```yaml
$ref: "./host.yaml"
parameters:
  - $ref: "name.yaml"
  - $ref: "./year.yaml"
  - $ref: "age.yaml#/alex/son"
remote:
  $ref: "https://raw.githubusercontent.com/WindomZ/swagger-merger/remote.yaml#/name"
responses:
  $ref: "./responses.yaml#/post"
```

### $ref#*
> Includes a _multi-level_ of swagger file.

- Non-standard, suggest you use it for yourself
- Instead of `$ref`, can be used _side by side_ and not an array

For `yaml` example:

```yaml
paths:
  $ref#pets: "./paths/pets.yaml"
  $ref#pets-id: "./paths/pets-id.yaml"
paths-url:
  $ref#paths: "https://raw.githubusercontent.com/WindomZ/swagger-merger/master/test/no_ext_json"
```

Output `yaml`:

```yaml
paths:
  /pets:
    hello: world
  /pets/{id}:
    good: bye
paths-url:
  /pets:
    hello: world
  /pets/{id}:
    good: bye
```
### CLI
> How to use?

```bash
$ swagger-merger -h

  Usage: swagger-merger [-h] [-v] [-c] [-o file] <-i file | file>

  Merge multiple swagger files into a swagger file, just support JSON/YAML.

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -i, --input <file>   input a main/entry JSON/YAML swagger file
    -o, --output <file>  output a merged JSON/YAML swagger file, default is `swagger.*`
    -c, --compact        compact JSON/YAML format string
    --debug              debug mode, such as print error tracks
```

Easy to use.
```bash
swagger-merger -i in.yaml                # Merge in.yaml into swagger.yaml
swagger-merger -i in.yaml -o out.yaml    # Merge in.yaml into out.yaml
swagger-merger -i in.yaml -o out.yaml -c # Merge in.yaml into out.yaml and compress it
swagger-merger -i in.yaml -o out.json    # Merge in.yaml into out.json

swagger-merger -i in.json                # Merge in.json into swagger.json
swagger-merger -i in.json -o out.json    # Merge in.json into out.json
swagger-merger -i in.json -o out.json -c # Merge in.json into out.json and compress it
swagger-merger -i in.json -o out.yaml    # Merge in.json into out.yaml
```

### Module
> How to use?

```bash
npm install swagger-merger
```

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

const swaggerMerger = require('swagger-merger')

swaggerMerger.merge({
  input: 'index.json',
  output: 'swagger.json',
  compact: false
}).catch(e => {
  console.error(e)
})
```

## Install
```bash
npm install swagger-merger -g
```

## Examples
> It would be more helpful to see these examples.

Open the terminal, **choose** one of the following ways:

- [npm](https://www.npmjs.com/)
    ```bash
    npm install
    npm run test
    ```

- [yarn](https://yarnpkg.com/)
    ```bash
    yarn
    yarn run test
    ```

- [swagger-merger]((https://www.npmjs.com/package/swagger-merger)) (installed, go to each examples)
    ```bash
    swagger-merger -i index.yaml
    swagger-merger -i index.json
    ```

Then, these examples may help you:

### [heroku-pets](https://github.com/WindomZ/swagger-merger/tree/master/example/heroku-pets)
- Official swagger example
- _No_ modification

Go to `example/heroku-pets`
1. The output `swagger.json` is same as the expected `heroku-pets.json`.
1. The output `swagger.yaml` is similar to the expected `heroku-pets.yaml`.

### [echo](https://github.com/WindomZ/swagger-merger/tree/master/example/echo)
- Base on official swagger example
- _Modify_ to support for [$ref](#ref) tags

Go to `example/echo`
1. The output `swagger.json` is same as the expected `echo.json`.
1. The output `swagger.yaml` is similar to the expected `echo.yaml`.

### [petstore_simple](https://github.com/WindomZ/swagger-merger/tree/master/example/petstore_simple)
- Base on official swagger example
- _Modify_ to support for [$ref#*](#ref-1) tags

Go to `example/petstore_simple`
1. The output `swagger.json` is same as the expected `petstore_simple.json`.
1. The output `swagger.yaml` is similar to the expected `petstore_simple.yaml`.

### [petstore_domain](https://github.com/WindomZ/swagger-merger/tree/master/example/petstore_domain)
> A way of using [$ref](#ref) instead of [$ref#*](#ref-1), and better compatibility.

- Same as [petstore_simple](#examplepetstore_simple)
- _Modify_ to support for [$ref](#ref) tags
- _Modify_ to support for **multiple levels** schema

Go to `example/petstore_domain`
1. The output `swagger.json` is same as the expected `petstore_simple.json`.
1. The output `swagger.yaml` is similar to the expected `petstore_simple.yaml`.

## Contributing
Welcome to pull requests, report bugs, suggest ideas and discuss **swagger-merger**,
i would love to hear what you think about **swagger-merger** on [issues page](https://github.com/WindomZ/swagger-merger/issues).

If you like it then you can put a :star: on it.

## License
[MIT](https://github.com/WindomZ/swagger-merger/blob/master/LICENSE)

license: MIT

repository: WindomZ/swagger-merger

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: WindomZ/swagger-merger


text:
---
title: Git Cli Cheat Sheet
description: Cheat sheet for Git. Git version control system designed to quickly and efficiently manage projects cheet sheet for the command line.
template: comments.html
tags: [github, git, cheat-sheet]
---

# Git Cli Cheat Sheet

Git is a free and open source distributed version control system designed to quickly and efficiently manage everything from small to very large projects.

## Create Repositories

A new repository can either be created locally, or an existing repository can be cloned. When a repository was initialized locally, you have to push it to GitHub afterwards.

The git init command turns an existing directory into a new Git repository inside the folder you are running this command. After using the `git init` command, link the local repository to an empty GitHub repository using the following command:

```shell
git init
```

Specifies the remote repository for your local repository. The url points to a repository on GitHub.

```shell
git remote add origin [url]
```

Clone (download) a repository that already exists on GitHub, including all of the files, branches, and commits

```shell
git clone [url]
```

## Git Configuration

Configure user information for all local repositories

Sets the name you want attached to your commit transactions

```shell
git config --global user.name "[name]"
```

Sets the email you want attached to your commit transactions

```shell
git config --global user.email "[email address]"
```

Enables helpful colorization of command line output

```shell
git config --global color.ui auto
```

## Synchronize Changes

Synchronize your local repository with the remote repository on GitHub.com

Downloads all history from the remote tracking branches

```shell
git fetch
```

Combines remote tracking branches into current local branch

```shell
git merge
```

Uploads all local branch commits to GitHub

```shell
git push
```

Updates your current local working branch with all new commits from the corresponding remote branch on GitHub. `git pull` is a combination of `git fetch` and `git merge`

```shell
git pull
```

## Redo Commits

Erase mistakes and craft replacement history

Undoes all commits after [commit], preserving changes locally

```shell
git reset [commit]
```

If you don't want to reset absolutely, but relatively that is also possible using
```shell
git reset HEAD~2
```
which undoes the last 2 commits.

Discards all history and changes back to the specified commit

```shell
git reset --hard [commit]
```

## Branches

Branches are an important part of working with Git. Any commits you make will be made on the branch you’re currently “checked out” to. Use git status to see which branch that is.

Creates a new branch

```shell
git branch [branch-name]

```

Switches to the specified branch and updates the working directory

```shell
git switch -c [branch-name]
```
or you can use

```shell
git checkout -b [branch-name]
```
to both create and switch to the branch simultaneously.

Combines the specified branch’s history into the current branch. This is usually done in pull requests, but is an important Git operation.

```shell
git merge [branch]
```

Deletes the specified branch

```shell
git branch -d [branch-name]
```

## Make Changes

Browse and inspect the evolution of project files

Lists version history for the current branch

```shell
git log
```

Lists version history for a file, beyond renames (works only for a single file)

```shell
git log --follow [file]
```

Shows content differences between two branches

```shell
git diff [first-branch]...[second-branch]
```

Outputs metadata and content changes of the specified commit

```shell
git show [commit]
```

Snapshots the file in preparation for versioning

```shell
git add [file]
```

Records file snapshots permanently in version history

```shell
git commit -m "[descriptive message]"
```

## The .gitignore file

Sometimes it may be a good idea to exclude files from being tracked with Git. This is typically done in a special file named .gitignore. You can find helpful templates for `.gitignore` files at [github.com/github/gitignore][gitignore-url]{target=\_blank}. If there are certain files (like `.vscode` or `.ide`) that should be discluded from all projects, you can create a global `.gitignore` file to do so.

## Untrack Files Already Added to git Repository Based on .gitignore

Commit all your changes. Before proceeding, make sure all your changes are committed, including your .gitignore file.
Remove everything from the repository. To clear your repo, use:

```bash
git rm -r --cached .
```

Re add everything.

```bash
git add .
```

Commit.

```bash
git commit -m ".gitignore fix"
```

## Use Gist as Repository

It's probably easiest if you just start by cloning the gist, so that `origin` (a "remote" that refers to the original repository) is set up for you. Then you can just do `git push origin master`.

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: NOASSERTION


text:
# Changelog

All notable changes to `laravel-short-schedule` will be documented in this file

## 1.4.7 - 2022-01-12

- PendingShortScheduleCommand::command method will attempt to resolve command name if class name was given

**Full Changelog**: https://github.com/dima-bzz/laravel-short-schedule/compare/1.4.6...1.4.7

## 1.4.6 - 2021-09-01

- added an output message to the console when starting and restarting the worker

## 1.4.5 - 2021-08-31

- updated description for restart command and update Readme

## 1.4.4 - 2021-08-31

- updated composer.json and Readme

## 1.4.3 - 2021-08-27

- added command restart for worker daemons

## 1.4.2 - 2021-06-11

- allow spatie/temporary-directory 2.* (#35)

## 1.4.1 - 2021-06-04

- do not set a default lifetime for production

## 1.4.0 - 2021-05-31

- add lifetime option

## 1.3.0 - 2020-12-24

- add PHP8 support (#25)

## 1.2.2 - 2020-09-08

- add support for Laravel 8

## 1.2.1 - 2020-07-14

- fix for tasks not getting executed if the command is started by supervisord.

## 1.2.0 - 2020-07-13

- added `onOneServer` option to short run commands (#8)

## 1.1.0 - 2020-06-17

- adding support for Maintenance Mode (#4)

## 1.0.0 - 2020-06-07

- initial release

repository: dima-bzz/laravel-short-schedule

repo_name: dima-bzz/laravel-short-schedule


text:
---
title: Constraints on the noise in dynamical reduction models
publication_types:
  - "2"
authors:
  - with Beatrix Hiesmayr
doi: 10.1016/j.physleta.2016.01.042
publication: In *Physics Letters A*
publication_short: In *Phys. Lett. A*
abstract: "The dynamics of a quantum system with internal degrees of freedom
  undergoing spontaneous collapse in the position basis are analysed; e.g.,
  neutral mesons or neutrinos. Surprisingly, the value of the Heaviside function
  θ(x) at x=0 that can in general be chosen in the interval [0,1] leads to
  different physical predictions. For the QMUPL (Quantum Mechanics with
  Universal Position Localization) model only a single value leads to
  probabilities conserving the particle number. Herewith the physical properties
  of the noise field can be constrained. This opens a road to study the physical
  properties of the noise field essential for collapse models. "
draft: false
featured: false
tags:
  - measurement problem
  - mixed particles
  - spontaneous collapse
  - stochastic PDEs
categories:
  - quantum foundations
image:
  filename: featured
  focal_point: Smart
  preview_only: false
date: 2016-03-22T14:45:00.000Z
---

repository: kirsim/starter-academic

repo_name: kirsim/starter-academic


text:
Impact of enabling ipfw or pf on forwarding performance
  - HP ProLiant DL360p Gen8 with height cores (Intel Xeon E5-2650 @ 2.60GHz)
  - Quad port Chelsio 10-Gigabit T540-CR and OPT SFP (SFP-10G-LR).
  - FreeBSD 10.2
  - 2000 flows of smallest UDP packets
  - 2 firewall rules, 2 static routes
  - ntxq10g and nrxq10g = 4 (and not the default value of ncpu=8)
  - Traffic load at 10Mpps

![Impact of enabling ipfw or pf on forwarding performance on FreeBSD 10.2](graph.png)

```
x pps.fastforwarding
+ pps.ipfw-statefull
* pps.pf-statefull
+------------------------------------------------------------------------+
|   *                                                                    |
|*  *     +                                     x                        |
|*  *    ++++                                   x   x x                 x|
|                                            |______M__A_________|       |
|        |A|                                                             |
||_AM                                                                    |
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5       2258965       2553360       2312089     2342101.6      121840.6
+   5       1775671       1809822       1788475     1792371.6     14091.412
Difference at 95.0% confidence
	-549730 +/- 126489
	-23.4717% +/- 5.40065%
	(Student's t, pooled s = 86728.6)
*   5       1678010       1716103       1714692     1701638.8     19028.929
Difference at 95.0% confidence
	-640463 +/- 127174
	-27.3456% +/- 5.42992%
	(Student's t, pooled s = 87198.7)
```

repository: ocochard/netbenches

gha_language: Shell

repo_name: ocochard/netbenches


text:
# Some Tools for BESS

There are two crates here:
* `libbess` a rust version of the BESS gRPC client.
* `tools` a few random tools for interacting with BESS, including a version of
bessctl built with clap.

This currently requires a build of BESS with introspection support, like this
branch: https://github.com/melvinw/bess/tree/dyn_pb.

repository: melvinw/besstools

repo_name: melvinw/besstools


text:
## appium-ios-simulator

[![NPM version](http://img.shields.io/npm/v/appium-ios-simulator.svg)](https://npmjs.org/package/appium-ios-simulator)
[![Downloads](http://img.shields.io/npm/dm/appium-ios-simulator.svg)](https://npmjs.org/package/appium-ios-simulator)

Appium API for dealing with iOS simulators. The API enables you to use the following features:

- query locations of Simulator-specific directories and applications
- read/write access to Simulator settings
- full control over starting and stopping simulators
- deal with biometric auth, geolocation settings, application permissions, and others

### Usage

`async getSimulator(udid)`

This is the main entry of this module.
This function returns a simulator object (see below) associated with the udid passed in. If an iOS simulator with the given udid does not exist already on this machine, it will throw an error.

If you want to create a new simulator, you can use the `createDevice()` method of [node-simctl](https://github.com/appium/node-simctl).

```js
import { getSimulator } from 'appium-ios-simulator';
import assert from 'node:assert/strict';

const sim = await getSimulator('DAE95172-0788-4A85-8D0D-5C85509109E1');
await sim.run();
assert.equal('Booted', (await sim.stat()).state);
await sim.shutdown();
assert.equal('Shutdown', (await sim.stat()).state);
```

### Third-party tools

The following tools and utilities are not mandatory, but could be used by the appium-ios-simulator, if installed locally, to extend its functionality:

- [Mobile Native Foundation](https://github.com/MobileNativeFoundation)
- [IDB](https://github.com/facebook/idb)
- [AppleSimulatorUtils](https://github.com/wix/AppleSimulatorUtils)

### Xcode and iOS versions

Check [Xcode wikipedia](https://en.wikipedia.org/wiki/Xcode) for more details about Xcode version to iOS version mapping.

### Development

Checkout the repository and run

```bash
npm install
npm run dev
```

Use the following commands to run tests:

```bash
# unit tests
npm run test
# integration tests
npm run e2e-test
```

repository: appium/appium-ios-simulator

repo_name: appium/appium-ios-simulator


text:
# ⚠ Outdated

This project is not supported anymore. Please visit the successor of this project:
https://github.com/vctr-sls

---

div align="center">

~ SLMS ~

     Short link management system - create and manage custom shortlinks on your webserver

---

# Introduction

SLMS is a simple server solution which provides managable short links for your domain. You can create, edit and delete short links in a simple web interface which will relocate the user of these links to the defined root link location. Each *(uncached)* access will be recorded *(anonymously)* to provide simple access analytics.

---

# Screenshots

> *State: Commit [`5f7139a`](https://github.com/zekroTJA/slms/commit/5f7139a38c2b737e906e33304aa8e935ba94297a)*

### Management Page

![](https://i.zekro.de/Code_-_Insiders_WwKjWCP6Cm.png)

### Add Short Links

![](https://i.zekro.de/firefox_yd6F9si7ro.png)

## Edit Short Links

![](https://i.zekro.de/firefox_dWZdEiXMNy.png)

---

# Why v.2.0?

I realy had intrest on resuming developing on this project and I wanted to get deeper into creating REST API's with go. So I thought about experimenting with `fasthttp` and `fasthttp-routing` instead of `net/http` and `gorilla/mux` *(which I have used in v.1.0)*. Also, I wanted to enhance the project layout and the database structure, so I've decided to re-create this whole project.

---

# 3rd Party Dependencies

- [valayala/fasthttp](https://github.com/valyala/fasthttp)
- [qiangxue/fasthttp-routing](https://github.com/qiangxue/fasthttp-routing)
- [op/go-logging](https://github.com/op/go-logging)
- [ghodss/yaml](https://github.com/ghodss/yaml)
- [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)
- [go-gem/sessions](https://github.com/go-gem/sessions)

---

© 2019 Ringo Hoffmann (zekro Development)
Covered by MIT Licence.

repository: zekro-archive/slms

repo_name: zekro-archive/slms


text:
# OVH UI Kit

![OVH component](https://user-images.githubusercontent.com/3379410/27423240-3f944bc4-5731-11e7-87bb-3ff603aff8a7.png)

A component framework for the OVH brand.

[![npm version](https://badgen.net/npm/v/@ovh-ux/ui-kit)](https://www.npmjs.com/package/@ovh-ux/ui-kit)

## Installation

### Prerequisites

This library has been tested with AngularJS 1.6+.

You need to load these dependencies in your project:

- [angular](https://www.npmjs.com/package/angular)
- [angular-aria](https://www.npmjs.com/package/angular-aria)
- [angular-sanitize](https://www.npmjs.com/package/angular-sanitize)
- [bloodhound-js](https://www.npmjs.com/package/bloodhound-js) (used by [Autocomplete](./packages/components/autocomplete))
- [clipboard](https://www.npmjs.com/package/clipboard) (used by [Clipboard](./packages/components/clipboard))
- [flatpickr](https://www.npmjs.com/package/flatpickr) (used by [Calendar](./packages/components/calendar) and [Timepicker](./packages/components/timepicker))
- [popper.js](https://www.npmjs.com/package/popper.js) (used by [Popover](./packages/components/popover) and [Tooltip](./packages/components/tooltip))
- [ui-select](https://www.npmjs.com/package/ui-select) (used by [Select](./packages/components/select) and [Select Picker](./packages/components/select-picker))

See `package.json` for more informations.

[![Dependencies](https://badgen.net/david/dep/ovh-ux/ovh-ui-kit/packages/libs/ui-kit)](https://npmjs.com/package/@ovh-ux/ui-kit?activeTab=dependencies)
[![Dev Dependencies](https://badgen.net/david/dev/ovh-ux/ovh-ui-kit/packages/libs/ui-kit)](https://npmjs.com/package/@ovh-ux/ui-kit?activeTab=dependencies)
[![Peer Dependencies](https://badgen.net/david/peer/ovh-ux/ovh-ui-kit/packages/libs/ui-kit)](https://npmjs.com/package/@ovh-ux/ui-kit?activeTab=dependencies)

### Install with [npm](https://www.npmjs.com/)

```bash
npm install @ovh-ux/ui-kit
```

### Install with [yarn](https://yarnpkg.com)

```bash
yarn add @ovh-ux/ui-kit
```

## Usage

1. In your `index.html`, you need to load `oui.css` and `oui.js`:

```html
<link rel="stylesheet"<EMAIL_ADDRESS>
<script<EMAIL_ADDRESS>type="text/javascript"></script>
```

2. You need to add `oui` in your angular module dependencies like that:

```js
angular.module('myAwesomeApp', ['oui']);
```

### Webpack

In your `index.js`, you need to import the library, with its CSS file separately.

```js
import<EMAIL_ADDRESS>import oui from '@ovh-ux/ui-kit';

angular.module('myAwesomeApp', [oui]);
```

### LESS variables

If you want to use the variables for your style, you can access it through `_variables.less`.

```less
@import 'path/to/@ovh-ux/ui-kit/dist/less/_variables';
```

**Note**: Importing `_variables.less` will import `_constants.less` and `_icons.less` too.

### Base 10px

UI Kit use `rem` units and has for base `16px`. It could create size conflicts with others libraries using a base `10px`. In this case, you need to load `oui-b10.css` instead of `oui.css`.

```html
<link rel="stylesheet"<EMAIL_ADDRESS>```

## Develop

### Run in development mode

1. Clone and install `ovh-ui-kit`

```bash
git clone https://github.com/ovh-ux/ovh-ui-kit.git
cd ovh-ui-kit
yarn install
```

2. Run `ovh-ui-kit` in the Workshop

```bash
yarn start
```

This will open [Storybook](https://storybook.js.org/) in your default browser

### Hot reload

Once you have `yarn start`-ed the project, you can edit anything with an automatic browser refresh as a result.

### Contributing

You've developed a new cool feature? Fixed an annoying bug? We'd be happy
to hear from you!

see [CONTRIBUTING](https://github.com/ovh-ux/ovh-ui-kit/blob/master/CONTRIBUTING.md)

## Related links

 * Contribute: [https://github.com/ovh-ux/ovh-ui-kit/blob/master/CONTRIBUTING.md](https://github.com/ovh-ux/ovh-ui-kit/blob/master/CONTRIBUTING.md)
 * Report bugs: [https://github.com/ovh-ux/ovh-ui-kit/issues](https://github.com/ovh-ux/ovh-ui-kit/issues)
 * Get latest version: [https://github.com/ovh-ux/ovh-ui-kit](https://github.com/ovh-ux/ovh-ui-kit)

## Documentation

Documentation is available from the `packages/` folder, every package is self-documented throught a `README.md` file.

## License

See [https://github.com/ovh-ux/ovh-ui-kit/blob/master/LICENSE](https://github.com/ovh-ux/ovh-ui-kit/blob/master/LICENSE)

repository: rmajasol/ovh-ui-kit

repo_name: rmajasol/ovh-ui-kit


text:
# deployment-resources

The repo to apply source control to the resources we purely use for deployment

## Installation

```bash
npm install
```

## Setup environment variables

We need to setup some environment variables for some paths and environment information that are needed by the scripts. If you are doing this for development you can either do `export` in your current bash session, or prefix your running of the script you're testing with the needed environment variables like `ENV=SOME_VALUE ./script_to_test.sh`.

When deploying you're probably going to want to add these environment variables to your `.bashrc` file as follows:

```bash
export SLACK_DEPLOYMENT_BOT_DIRECTORY=~/path/to/slack-deployment-bot
export DEPLOYMENT_RESOURCES_DIRECTORY=~/path/to/deployment-resources
export SERVER_DIRECTORY=~/path/to/server
# Replace ENVIRONMENT with "staging" if it's the staging server or "production" for the production server
export GAZELLE_ENV=ENVIRONMENT
### The database ones below are only necessary for making database backups which if you're on staging you probably don't need
# The value of this is probably root
export DATABASE_USER=<user_name>
export DATABASE_PASSWORD=<password>
# The value of this is probably 'the__gazelle'
export DATABASE_NAME=<name_of_gazelle_database>
```

> NOTE: It is important that you don't add trailing forward slashes to your paths as it is assumed there aren't any

If you're doing all the setup of a server in one go, remember to restart your bash session or resource your `.bashrc` for these environment variables to actually be exported.

## Setup automatic database backups

> NOTE: This is of course only necessary on one server if using 2 different ones for staging and production

To backup the database, a script has been written that will automatically dump the database and upload it to the "Timestamped Ghost Dumps" folder in the [Gazelle Engineering Google Drive](https://drive.google.com/drive/u/1/folders/0B5ceCeOuBd1tVWNSX2k2RVUtOFk). To set it up, you first have to get the credentials that give you the rights to programatically access the drive. This is very simple as you just run

`./scripts/getGoogleApiOAuthToken.sh`

and follow the instructions given in the terminal to get and store an OAuth token on your computer. It will be stored in ~/.credentials. You should now be ready to backup the database. First check that it runs correctly by running

`./scripts/backupDatabase.sh`

and if everything works you should now be able to setup Cron to regularly update the database automatically.

To setup Cron run

`crontab -e`

and open it in your favourite editor.
Below all the comments you can now add in the line

`0 2 * * Thu /bin/bash -ic '/path/to/deployment-resources/scripts/backup_database.sh'`

> NOTE: The reason that we use `/bin/bash -ic` is so that we start an interactive shell that loads in `.bashrc` and other environment variables that cron doesn't do by default

And Cron should be setup to update your database every Thursday morning at 2 AM. Remember to check it actually does this. You can also test it by temporarily setting the time fields to `* * * * *` to have it backup once a minute for temporary testing.
And remember to change the `/path/to/deployment-resources` to your actual path to the repository.

## Setup memory monitoring

Very similarly to above, we setup a cron job, as long as you have setup the environment variables as described at the top it should be as easy as adding the following to your crontab

```
* * * * * /bin/bash -ic "/path/to/deployment-resources/scripts/check_free_memory.sh error-logging 250"
```

Where you can replace `error-logging` (the channel to post to) and `250` (the memory limit to check for) with whatever values suit you, but those are our current ones as this README is being written.

## Setup health monitoring

Very similarly to above, we setup a cron job, as long as you have setup the environment variables as described at the top it should be as easy as adding the following to your crontab

```
* * * * * /bin/bash -ic "/path/to/deployment-resources/scripts/check_server_health.sh error-logging"
```

Where you can replace `error-logging` (the channel to post to) with whatever value suits you, but those are our current ones as this README is being written.

repository: thegazelle-ad/deployment-resources

repo_name: thegazelle-ad/deployment-resources


text:
# Chat Room with Node.js and Socket.io
This is the source code basic from a very simple chat room used
the [Getting Started](http://socket.io/get-started/chat/) guide
of the Socket.IO website.
If you need more information in Chinese, please visit my [Blog](http://howard10335.blogspot.tw/2015/07/nodejssocketio.html).

## Current Features
- Broadcast a message to connected users when someone connects or disconnects
- Support for unique nicknames
- Append the message directly as soon as he presses enter
- Show {user} is typing
- Show who’s online
- Private messaging
- Sending Picture to eachother
- Save current messages(for Chrome)
- Show desktop notification when receive new message(for Chrome)

## License
MIT

repository: webProgramDesign/web-

repo_name: webProgramDesign/web-


text:
SaltStack
=====

[SaltStack](www.saltstack.com) is a master/slave provision system in python, it is using zeromq for asynchonous communication.

# Architecture

Master and minion

![SaltStack Architecture](images/saltarch.png "Architecture")

# References

- https://www.linux.com/learn/tutorials/772719-how-to-provision-aws-ec2-instances-with-salt-cloud

repository: perigee/grandoc

repo_name: perigee/grandoc


text:
# Celestial.UIToolkit
A custom WPF toolkit which is inspired by a lot of the current design languages, including
Microsoft's Fluent Design and Google's Material Design.

[![Build Status](https://dev.azure.com/ManuelRoemer/Celestial%20UIToolkit/_apis/build/status/Celestial.UIToolkit)](https://dev.azure.com/ManuelRoemer/Celestial%20UIToolkit/_build/latest?definitionId=2)
[![NuGet - Celestial.UIToolkit.Core](https://img.shields.io/nuget/v/Celestial.UIToolkit.Core.svg?label=Celestial.UIToolkit.Core)](https://www.nuget.org/packages/Celestial.UIToolkit.Core/)
[![NuGet - Celestial.UIToolkit](https://img.shields.io/nuget/v/Celestial.UIToolkit.svg?label=Celestial.UIToolkit)](https://www.nuget.org/packages/Celestial.UIToolkit/)

![Example Image](./.github/Images/MainExample.png)

## Table of Contents
* [1. Getting started](#1-getting-started)
  * [1.1 What is Celestial.UIToolkit?](#11-what-is-celestialuitoolkit)
  * [1.2 Installation and Requirements](#12-installation)
  * [1.3 Minimum System Requirements](#13-minimum-system-requirements)
  * [1.4 Which DLL do I need?](#14-which-dll-do-i-need)
  * [1.5 The Control Gallery](#15-the-control-gallery)
* [2. Documentation](#2-documentation)

## 1. Getting Started
### 1.1 What is Celestial.UIToolkit?
There are amazing UI Frameworks for WPF out there, like *MahApps.Metro* or *MaterialDesignInXaml*.
None of these fulfilled all requirements for an upcoming project of mine though.

Thus, this project was born. It started out as a library of custom styles, but quickly
developed certain features that are also useable by other libraries or projects.

It provides a vast set of utilities for the day-to-day WPF development, custom animations (for
instance `BrushAnimation` classes), a set of commonly used converters, a Behavior API, a lot of
modern controls, custom and consistent styles for all types of controls and lots of other features.

### 1.2 Installation
The libraries can be installed via NuGet (preferred way), or via
[GitHub Releases](https://github.com/manuelroemer/Celestial.UIToolkit/releases/latest).

*Unsure about what to install? See [Section 1.4](#14-which-dll-do-i-need) for details.*

*Done with installing, but unsure about how to use the toolkit? Head over to the
[Guides](https://manuelroemer.github.io/Celestial.UIToolkit/doc/articles/introduction.html)
for a tutorial*.

#### Install the whole toolkit:
```
Install-Package Celestial.UIToolkit
```

#### Install only the Core library:
```
Install-Package Celestial.UIToolkit.Core
```

#### Install the Control Gallery:

The [Control Gallery](#15-the-control-gallery)
application (the toolkit's interactive companion) can be downloaded on
[GitHub Releases](https://github.com/manuelroemer/Celestial.UIToolkit/releases/latest).

### 1.3 Minimum System Requirements

| Component                    | Minimum .NET Framework Requirement(s) |
| ---------------------------- | ------------------------------------- |
| `Celestial.UIToolkit.Core`   | .NET 4.5                              |
| `Celestial.UIToolkit`        | .NET 4.5                              |
| Control Gallery              | .NET 4.6                              |
| Solution (for custom builds) | .NET 4.6                              |

### 1.4 Which DLL do I need?
In most cases, you will want to install the `Celestial.UIToolkit` library, since it provides every single feature of the toolkit.
If you don't require any styles or custom controls for your project, you only need the `Celestial.UIToolkit.Core` library.

See the following image for a basic overview of the features:

![DLL Overview](./.github/Images/DllArchitecture.png)

### 1.5 The Control Gallery
The Control Gallery is a demo application built upon the toolkit. It displays most of the available
controls and styles, which allows you to *directly interact* with them.

In addition, thanks to the amazing [ShowMeTheXAML](https://github.com/Keboo/ShowMeTheXAML) project,
it shows you the exact XAML code which is required to recreate an individual example.
Thus, the Control Gallery is also a living piece of **documentation** that you should use for
discovering the features of the toolkit.

You can either [download](#install-the-control-gallery) the application directly, or you can
clone this repo and build it yourself.

Here are some screenshots of the application:

![Control Gallery Screenshot 1](./.github/Images/ControlGalleryExample1.png)
![Control Gallery Screenshot 2](./.github/Images/ControlGalleryExample2.png)
![Control Gallery Screenshot 3](./.github/Images/ControlGalleryExample3.png)

## 2. Documentation
There are three sources of documentation available:

| Documentation type | Description |
| --- | --- |
| [ControlGallery](https://github.com/manuelroemer/Celestial.UIToolkit/releases/latest) | The ControlGallery application is your information source for controls and examples on how to use them. [More info on what the ControlGallery provides.](#15-the-control-gallery) |
| [Guides](https://manuelroemer.github.io/Celestial.UIToolkit/doc/articles/introduction.html) | There are several guides available, ranging from topics on getting started, up to more specific concepts and details of the toolkit. |
| [API Reference](https://manuelroemer.github.io/Celestial.UIToolkit/doc/api/Celestial.UIToolkit.html) | A list of all current API members, like MSDN. |


text:
# Frend Tabs Change Log

## [1.0.5] 2016-06-19
- Improve DOM traversal with `_closest()` utility
- Add `matches` polyfill for better browser support

## [1.0.4] 2016-06-05
- Replace NodeList.prototype jacking with `_q()` querySelectorAll util

## [1.0.3] 2016-06-03
- Added guard clause for modifier key events - fix issue 75

## [1.0.2] 2016-05-22
- Added aria-labelledby for tabpanels
- Improve ids on tab anchors and tabpanels

## [1.0.1] 2016-03-09
- Permalink docs update

## [1.0.0] 2016-03-08
- Initial release

branch_name: refs/heads/gh-pages


text:
# Baylor Biblical Art

A searchable database of images from the Baylor University Libraries Special Collections.

[Themed Readme](https://josh-been.github.io/baylorbiblicalart)

Live Power BI Database: [https://sites.baylor.edu/baylorbiblicalart/](https://sites.baylor.edu/baylorbiblicalart/)

Files:
* [Power BI Project File](https://josh-been.github.io/baylorbiblicalart/biblicalart_grid.pbix)

3rd Party Tools Used:
* [Microsoft Power BI](https://powerbi.microsoft.com/)

Custom Tools Used:
* [baylorbiblicalart.html](https://josh-been.github.io/baylorbiblicalart/baylorbiblicalart.html)
  * Assists accessing full information with copy/paste capabilities

repository: Josh-Been/baylorbiblicalart

repo_name: Josh-Been/baylorbiblicalart


text:
# Controlling UAV camera using gestures with Leap Motion Controller

This project was an extension to CSCE 635 AI Robotics with Dr. Robin Murphy at Texas A&M.
Project developed by [Raghav Hari Krishna](https://github.com/vsraghavhk) and [Leslie Kim](https://github.com/leslieyskim), developed during Fall of 2020.

The final report for this project which explains the prohject in detail, is available [here](https://github.com/vsraghavhk/gesture-based-control/blob/master/Project%20Report.pdf).

## Requirements
This project requires the following softwares and SDKs for the corresponding hardware.

### [Leap Motion Controller](https://www.ultraleap.com/product/leap-motion-controller/):
  - [Leap Motion SDK Version 3.2](https://developer.leapmotion.com/releases/leap-motion-orion-321)
  - [Python 2.7](https://www.python.org/download/releases/2.7/)

  The documentation to use the Leap Motion SDK with Python 2.7 can be found [here](https://developer-archive.leapmotion.com/documentation/python/index.html#).

The Leap Motion SDK does not officially support Python 3 and above. But there are a few wrappers made by the community, but they do not tend to work.
Let me know if you come across a working one.

### [Parrot Anafi Thermal drone](https://www.parrot.com/us/drones/anafi-thermal)
  - [PyParrot API](https://github.com/amymcgovern/pyparrot) by [amymcgovern](https://github.com/amymcgovern)
  - [Python 3.9](https://www.python.org/downloads/release/python-390/)

## Installation

Install the two python versions (2.7 and 3.9).

It is suggested to create two [virtual environments](https://docs.python.org/3/tutorial/venv.html) for the 2 python versions.

To run the leap motion controller code
  - Make sure the Leap Motion Controller control panel shows the LMC as connected.
  - In the Leap Motion Control Panel go to General tab, and uncheck both "robust mdoe tracking" and "Auto-orient tracking".
  - The code in the leap folder is to obtain the gestures using the leap motion controller.
  - Install leap-requirements.txt in the leap folder within the Python 2.7 environment.
  - The leap folder has all the code and the relevant SDK files needed to run the code which handles the gestures.
  - The read_gesture.py in the leap folder is the program to run within the python 2.7 environment.

The read_gesture_extended.py is the same code as read_gesture.py but has more comments and extra bits of code which can be used to add more gestures or implement different gestures.

To run the parrot drone code:
  - The code in the pyparrot folder is to send commands to the drone based on the gesture inputs from LMC.
  - Install drone-requirements.txt in the pyparrot folder with Python 3.9.
  - The PyParrot folder has all the SDK files form the PyParrot API necessary to run the code for the drone control.
  - The Anafi-gesture.py in the pyparrot folder is the program to run within the python 3.9 environement.

Before running this program, open the anafi-gesture.py in an editor and check the debug_mode parameter. If this is set to true, the program does not actually connect to anything but instead simply prints the commands recieved from the read_gesture.py program. If set to False, it will attempt to connect to the Parrot Anafi drone and send the commands to it.

#### Both the read_gesture.py and Anafi-gesture.py must be run at the same time.

### Possible Python 3 implementations of Leap Motion SDK (For the sake of posterity)
The LMC py3 support folder inside the leap folder has the Leap SDK files which should ideally work with python 3. It is from this [resource section of CSSE 120 class at Rose-Hulman Institute of Technology](https://www.rose-hulman.edu/class/cs/csse120/Resources/LeapMotion/)

Another option to try is [repo](https://github.com/brunodigiorgi/leapMotionController) by [brunodigiorgi](https://github.com/brunodigiorgi).

A good resource to learn python for LMC is [Coding Basic's Youtube playlist](https://www.youtube.com/playlist?list=PLgTGpidiW0iTELuljcIdTkA5SjHa5tudP).

repository: vsraghavhk/gesture-based-control

repo_name: vsraghavhk/gesture-based-control


text:
# lipa_na_mpesa_online

A dart wrapper around mpesa daraja api from safaricom sandbox and production.

Ready Methods

- [x] LIPA NA MPESA ONLINE STK PUSH

## 1. Sand Box:Requisites

You Will need a few things from Safaricom before development.

1. Consumer Key
2. Consumer Secret
3. Test Credentials for Development/Sanbox environment

- Login or Register as a Safaricom developer [here](https://developer.safaricom.co.ke/login-register) if you haven't.
- Add a new App [here](https://developer.safaricom.co.ke/user/me/apps)
- You will be issued with a Consumer Key and Consumer Secret. You will use these to initiate an Mpesa Instance.
- Obtain Test Credentials [here](https://developer.safaricom.co.ke/test_credentials).
  - The Test Credentials Obtained Are only valid in Sandbox/Development environment. Take note of them.
  - To run in Production Environment you will need real Credentials.
    - To go Live and be issued with real credentials,please refer to [this guide](https://developer.safaricom.co.ke/docs?javascript#going-live)

## 2. Live:Requisites
1. Consumer Key
2. Consumer Secret
3. Production Credentials which is normally sent to the account email you use to go live with including the lipanampesa pass key. and till/paybill number your are going live with.
3. Switch to the orginasation tab, and obtain the Consumer Key and Consumer Secret,
4. The API URLS will also be sent to you by safaricom from the API support email.

Download test cases when they are creating a sandbox app. The test cases are in an Excel spreadsheet which the you will fill with results from the API calls they make for each test scenarios.

Once the test case scenarios have been duly filled, the you will upload the filled Excel spreadsheet during the ‘Go Live’ process. API support team will then review the test cases and then either approve or reject the production app.

NOTE: IF YOU ARE STACK REACH ME THROUGH<EMAIL_ADDRESS>SUBJECT:LIPANAMPESA STKPUSH PUB.DEV.
## Credits

| Contributors |
|--------------|
| [kahdichienja](https://github.com/kahdichienja) |

----------------------------

For help getting started with Flutter, view their
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

## Getting Started

Add dependency in pubspec.yaml

```yaml
dependencies:
  lipa_na_mpesa_online: [ADD_LATEST_VERSION_HERE]
```

Import in your Flutter app or plain dart app.
in on pressed func, perform
```dart
lipanampesa(with all @requred params.)

```

```dart
//Now Support Production URLS
import 'package:lipa_na_mpesa_online/lipa_na_mpesa_online.dart';
import 'package:path/to/your/key.dart' as key;
MpesaService.lipanampesa(
      lipanampesapasskey: key.lipa_na_mpesa_passkey,
      businessshortcode: key.business_short_code,
      consumerkey: key.consumer_key,
      consumersecret: key.consumer_secret,
      phonenumber: key.phone_number,
      transactionType: key.transactiontype,
      amount: key.amount,
      callBackURL: key.callbackURL_sand,
      accountReference: key.accountref,
      transactionDesc: key.transactionDesc,
      isProduction: false
    ).then(
      (C2BInitialMpesaRespoce value) => {
        print('MerchantRequestID = ' + value.merchantRequestID),
        print('CheckoutRequestID = ' + value.checkoutRequestID),
        print('ResponseCode = ' + value.responseCode),
        print('ResponseDescription = ' + value.responseDescription),
        print('CustomerMessage = ' + value.customerMessage),
      },
    ),

```

repository: kahdichienja/lipanampesa

repo_name: kahdichienja/lipanampesa


text:
# Apache Ignite JavaScript compute jobs with GraalVM

This is a simple demo that distributes a simple JavaScript block of
code to an Apache Ignite compute grid using the GraalVM Java Virtual
Machine.

JavaScript works "out of the box" but any GraalVM supported
language -- such as Python -- could be used with a little more effort.

## How to run

It's really designed to run inside an IDE currently. Run the
`Server` class and then `App`. The former needs to be run using
the GraalVM, the app can be run with any supported JVM (I'm using
OpenJDK 8).

repository: sdarlington/ignite-graalvm

repo_name: sdarlington/ignite-graalvm


text:
# Guide to map PrtSc key to F13

Simple way to make PrtSc key useful

## Map into SSDT-KBRD

Already done into EFI

## Set Screenshots shortcuts in macOS

Default is ⇧⌘5, change it to F13 by simply pressing PrtSc on your keyboard


text:
# Internet Connection Monitoring Service (Angular v9-v15)

> Detects whether browser has an active internet connection or not in Angular application.

> Detects whether your API Server is running or not in Angular application.

>> Note that, this library is being updated to support most of the Angular versions. Currently, it supports Angular v9 till v15, and verified with demos. Meanwhile, for Angular 8 and earlier versions, try installing package with version 1.0.4 `npm i<EMAIL_ADDRESS>Stay tuned for updates.

## Install

You can get it on npm.

```
npm install ng-connection-service --save
```

## Setup

*  Import `HttpClientModule` and `ConnectionServiceModule` into your application `AppModule`

```ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { ConnectionServiceModule } from 'ng-connection-service';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    ConnectionServiceModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

```

## Usage - Check only internet connection status
* Inject `ConnectionService` in Angular component's constructor, subscribe to `monitor()` method.

```ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ConnectionService, ConnectionServiceOptions, ConnectionState } from 'ng-connection-service';
import { Subscription, tap } from 'rxjs';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit, OnDestroy {
  title = 'demo';

  status!: string;
  currentState!: ConnectionState;
  subscription = new Subscription();

  constructor(private connectionService: ConnectionService) {
  }

  ngOnInit(): void {
    this.subscription.add(
      this.connectionService.monitor(options).pipe(
        tap((newState: ConnectionState) => {
          this.currentState = newState;

          if (this.currentState.hasNetworkConnection) {
            this.status = 'ONLINE';
          } else {
            this.status = 'OFFLINE';
          }
        })
      ).subscribe()
    );
  }

  ngOnDestroy(): void {
    this.subscription.unsubscribe();
  }
}

```

## Usage - Check YOUR API Server connection status

* Inject `ConnectionService` in Angular component's constructor, subscribe to `monitor()` method. Here `hasInternetConnection` boolean property informs if given server URL passed via `heartbeatUrl` property is reachable or not.

```ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ConnectionService, ConnectionServiceOptions, ConnectionState } from 'ng-connection-service';
import { Subscription, tap } from 'rxjs';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit, OnDestroy {
  title = 'demo';

  status!: string;
  currentState!: ConnectionState;
  subscription = new Subscription();

  constructor(private connectionService: ConnectionService) {
  }

  ngOnInit(): void {
    const options: ConnectionServiceOptions = {
      enableHeartbeat: false,
      heartbeatUrl: 'https://localhost:4000',
      heartbeatInterval: 2000
    }
    this.subscription.add(
      this.connectionService.monitor(options).pipe(
        tap((newState: ConnectionState) => {
          this.currentState = newState;

          if (this.currentState.hasNetworkConnection && this.currentState.hasInternetAccess) {
            this.status = 'ONLINE';
          } else {
            this.status = 'OFFLINE';
          }
        })
      ).subscribe()
    );
  }

  ngOnDestroy(): void {
    this.subscription.unsubscribe();
  }
}

```

* Note that we have passed configuration object to `monitor()` function to watch application server status.

```ts
 const options: ConnectionServiceOptions = {
      enableHeartbeat: false,
      heartbeatUrl: 'https://localhost:5000',
      heartbeatInterval: 2000
    }
```

## Demos

You can find demos in GitHub repository under directory `projects/demo/`.
* [Angular v9 Demo](https://github.com/ultrasonicsoft/ng-connection-service/tree/main/projects/demo/ng-connection-demo-v9)
* [Angular v10 Demo](https://github.com/ultrasonicsoft/ng-connection-service/tree/main/projects/demo/ng-connection-demo-v10)
* [Angular v11 Demo](https://github.com/ultrasonicsoft/ng-connection-service/tree/main/projects/demo/ng-connection-demo-v11)
* [Angular v12 Demo](https://github.com/ultrasonicsoft/ng-connection-service/tree/main/projects/demo/ng-connection-demo-v12)
* [Angular v13 Demo](https://github.com/ultrasonicsoft/ng-connection-service/tree/main/projects/demo/ng-connection-demo-v13)
* [Angular v14 Demo](https://github.com/ultrasonicsoft/ng-connection-service/tree/main/projects/demo/ng-connection-demo-v14)
* [Angular v15 Demo](https://github.com/ultrasonicsoft/ng-connection-service/tree/main/projects/demo/ng-connection-demo-v15)

## API

You can configure the service using `ConnectionServiceOptions` configuration variable.
Following options are available;

```ts
/**
 * Instance of this interface could be used to configure "ConnectionService".
 */
export interface ConnectionServiceOptions {
  /**
   * Controls the Internet connectivity heartbeat system. Default value is 'true'.
   */
  enableHeartbeat?: boolean;
  /**
   * Url used for checking Internet connectivity, heartbeat system periodically makes "HEAD" requests to this URL to determine Internet
   * connection status. Default value is "//internethealthtest.org".
   */
  heartbeatUrl?: string;
  /**
   * Interval used to check Internet connectivity specified in milliseconds. Default value is "30000".
   */
  heartbeatInterval?: number;
  /**
   * Interval used to retry Internet connectivity checks when an error is detected (when no Internet connection). Default value is "1000".
   */
  heartbeatRetryInterval?: number;
  /**
   * HTTP method used for requesting heartbeat Url. Default is 'head'.
   */
  requestMethod?: 'get' | 'post' | 'head' | 'options';

}
```

## Demo

[Working demo](https://ng-connection-service-demo.surge.sh/)

## License

[MIT License](https://github.com/ultrasonicsoft/ng-connection-service/blob/master/LICENSE) © Balram Chavan

repository: ultrasonicsoft/ng-connection-service

gha_language: TypeScript

repo_name: ultrasonicsoft/ng-connection-service


text:
![Title](https://user-images.githubusercontent.com/37352289/224664351-06a03699-f80f-4489-a63d-43f658661906.png)
[![Paper](https://img.shields.io/badge/Paper-link-orange)](https://www.nature.com/articles/s41598-023-28600-5)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7728024.svg)](https://doi.org/10.5281/zenodo.7728024)

# Travelers Dilemma Code

Code for the simulations and numerical solutions accompanying the paper:

**_Diversity enables the jump towards cooperation for the Traveler's Dilemma_ by M.A.Ramirez, M.Smerlak, A.Traulsen & J.Jost**

See the published paper [here](https://www.nature.com/articles/s41598-023-28600-5)

## Using the code
The code is divided in the 3 different methods used for analysing the Traveler's Dilemma
1. Replicator Mutator Equation

The code to numerically solve the equation, and to graph and analyse the results is available at:

[https://github.com/MA-Ramirez/Replicator_Mutator_Eq](https://github.com/MA-Ramirez/Replicator_Mutator_Eq)

2. Wright-Fisher Model

Julia sub-project to simulate the Wright-Fisher model. It uses [`Agents.jl`](https://juliadynamics.github.io/Agents.jl/stable/), a Julia framework for agent-based modeling.

3. Introspection Dynamics

Python scripts to simulate the dynamics, obtain the stationary distribution numerically and graph the results.

## Reproducing the code
The project contains code in Python and Julia, each method contains the corresponding files to locally reproduce them: `environment.yml` (Python) - `Manifest.toml` and `Project.toml` (Julia)


text:
## Docs

**JSDocs** [https://functional-jslib.github.io/fjl]

**Note:** Docs are divided by internal module names though, note, all methods live on top level `fjl` export.

### Library methods:

repository: functional-jslib/fjl

repo_name: functional-jslib/fjl


text:
Attention Is All You Need Paper Implementation
==============================================

This is an unaffiliated implementation of the following paper:

    Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł. and Polosukhin, I., 2017. Attention is all you need. In Advances in neural information processing systems (pp. 5998-6008).

### Motivation

Prior to the wave of transformer-style attention in the NLP and wider deep learning communities, language models
were moving much more towards applying recurrent networks to tackle complex linguistic tasks.
In particular, for the class of problems that take an input sequence and transform it into an output
sequence (known as sequence transduction), recurrent networks were the favored approach.
The main motivation behind the paper was the observation that although recurrent networks
as they were formulated could capture long-term relationships, there was usually a hard limit
on how far back information would propagate due to the vanishing gradient problem. Another limiting factor
when working with long sequences is that recurrent networks pass information sequentially which can be
inefficient.

The paper introduced the Transformer model, which uses a special kind of global attention that
is able to transform an input sequence of length N into an output sequence of length M, using O(M)
forward passes, where each forward pass can attend to the inputs and previously produced outputs in parallel.
By structuring learning in this way, some of the aforementioned problems that faced
recurrent models could be greatly diminished.

### Key Contributions

* First neural sequence transduction model that worked entirely on self-attention.
* Outperformed all previous models on the WMT 2014 English-to-German and English-to-French tasks.

### Approach

As described, the main goal of the Transformer is to take an input sequence of tokens (i.e. words or subword units)
and transform them into an output sequence of tokens. A sequence of tokens, however, can be represented
in any number of different ways and so the first step in this process requires that a
suitable representation be chosen.

#### Input/Output Representation

For the Transformer model, it is expected
that the input token sequence (i.e. a sentence) is converted into a sequence of vectors known as embeddings.
Such embeddings have been shown to be powerful ways to capture semantic meaning
in a vector space. This is typically done by running a separate training process, using
methods such as Word2Vec or GloVe, to learn a representation in which tokens that
co-occur are closer in the vector space. There are many pre-trained token (i.e. word) embeddings
that can be used off-the-shelf, though they can also be generated using existing tools relatively
easily as well. In sum, this pre-processing step takes an input sequence of tokens
(which are often words but can also be subword units) and uses what is effectively a learned
lookup table to convert that into a sequence of vectors of a common dimensionality (i.e. 256).
This can be represented as a 2D matrix of shape [number of input tokens, input embedding dimensionality].
In the paper this sequence of vectors is described as the `Input Embeddings`.

In much the same way, the outputs predicted by the Transformer are in the form of discrete categorical distributions over the possible output tokens. Each of these output tokens have a corresponding embedding
vector which could have be trained using entirely different data as the input embeddings
(usually another language).

Additionally, there is one important consideration that should be made when using token embeddings.
With sequence transducers, there are often a set of special tokens that are interpreted
as signals to either begin or end a sequence. Specifically in the case of the Transformer, before
producing any outputs, the output embeddings are initialized using a special "begin" embedding.
Subsequent predicted embeddings are then concatenated with this "begin" embedding to produce the
output embeddings for future steps. The Transformer also signals that it is finished with
sequence transduction by predicting the special "end" token as the most likely next token.

Although the Transformer does not maintain a hidden state that gets updated sequentially
like an RNN, it still generates the sequence of output tokens autoregressively one at a time.
What this means is that to generate M output tokens requires running M different forward
passes. This is done by first shifting the previously generated output tokens to the right typically
by inserting a start/begin token at the beginning as described earlier. These tokens are then
converted into embeddings (described in the paper as `Output Embedding`) which are continuous
vector representations. The model then uses the input embeddings along with these shifted output
embeddings in order to generate a next token probability distribution for each of the shifted output
positions. So after having produced `i` output tokens, the model will construct the new shifted output
embeddings of length `i+1`. For each of these `i+1` embeddings, there will be a
discrete categorical distribution corresponding to the next token probabilities. The `i+1`th distribution
can then be used to predict the next token in the output sequence (i.e. taking the most likely or
by performing beam search). This structure of inputs and outputs makes end-to-end neural
learning possible and enables the network architectures described in the following sections.

#### Encoder/Decoder Architecture

The Transformer's neural architecture can be decomposed into two components, the encoder and
the decoder. The encoder is a neural module that takes as input the previously described input
embeddings with a separate positional embedding added to it. A positional embedding is just
another vector of the same dimensionality as the token embedding it is used with, but that
contains information specific to the position in the input sequence it is associated with.
The paper describes the exact positional embedding used, but note that it is not a
learned embedding and is just computed using a function of the position in the sequence and
the size of the embedding space. The encoder produces a sequence of encodings with the same
length as the input. For every input sequence, the encoder is run only a single time.
The decoder, on the other hand is, a separate neural module that unlike the encoder is run M
times, once for each output token. As described earlier, the output of the decoder is a sequence of
discrete categorical distributions over the set of possible next output tokens for each output position.
Furthermore, there are two inputs to the decoder, the encodings (from the encoder) and the
aforementioned output embeddings with positional embeddings added to them just like with the encoder
inputs.

#### Multi-Head Attention

Both the encoder and the decoder heavily use what is known as multi-head scaled dot-product attention,
or multi-head attention (MHA).
This attention mechanism is used in cases where given three sequences of vectors, Q, K, and V of
lengths L, J, and J respectively, you want to generate an output sequence of vectors Z of length L in such a way
that each output vector is produced by attending over all of the J elements in sequence K using a corresponding
vector in sequence Q. Additionally, the output vector should be produced mainly by "looking" at
the vectors in the sequence V. The matrices Q, K, and V are dubbed queries, keys, and values respectively
because this mechanism can be described as using using each query to extract keys from which to lookup values
which are then combined to compute an output. Dot product attention accomplishes this by first linearly mapping the
queries (Q) of length L and keys (K) of length J into vectors with the same dimensionality.
Additionally, the J values in V are linearly mapped to vectors with the desired dimensionality of the output.
Each of the J output vectors of the sequence Z are then computed using a convex
combination of these mapped values. The weights of the convex combination for the output at position
`i` are generated by first taking the dot-product of the linearly mapped query at position `i` with all of the
linearly mapped keys. This produces J weights, one corresponding to each of the keys. These weights are then
scaled using a constant that depends on the dimensionality used for the queries and keys in order to avoid
oversaturation of a softmax applied right afterwards to produce the final convex combination weights.
Then as mentioned, the output
is computed by taking a combination of the J linearly mapped values using these weights.
This process is done for each of the L queries producing L outputs. All of this can be accomplished
efficiently using solely matrix operations, which are detailed in the paper. Furthermore,
by applying this multiple times using different parameters and stacking the outputs, you arrive
at the final multi-headed attention (MHA) mechanism.

MHA is used in the encoder for self-attention. Specifically, all three input sequences, Q, K, and V,
used earlier are the same in this case and correspond to the encoder inputs. The decoder
applies MHA in two ways, both for self-attention on the summed output and positional embeddings
as well as for attention using the encodings as the queries and keys while the decoder's
self-attention as the values. One important detail was that the self-attention used by the
decoder applied masking of the dot-product weights so that the convex combination for the output
at position `i` would never include information at later time steps. This enforces the autoregressive
nature of the model.

#### Further Details

Along with MHA, feed forward networks were used as well as layer normalization and residual connections.
These operations were combined into stacks which were repeated multiple times to produce deep
models. The decoder also had a final linear layer with a softmax applied to generate the
predicted next token probabilities for each of the shifted outputs.

See the paper for more details.

### Implementation

For this implementation, tokenization was performed using byte-pair encoding (BPE) and GloVe was used to
generate the word embeddings. Different token embeddings were generated for the source and target languages. Additionally, the model size and embedding dimensionality used was 256 rather than 512 as in the paper. The Adam optimizer with the same hyperparameters
and learning rate schedule as described in the paper was also used.

There are scripts to download the dataset and generate the BPE files under `/scripts`.
As the WMT13 dataset doesn't provide a train/val split, one was generated using
`chainer_transformer.tools.generate_trainval_split` before tokenization.
After generating the tokenizations (BPE files) on the training set of the source and target languages, the
[GloVe](https://github.com/stanfordnlp/GloVe) repo was used to generate the word
embeddings. In that repository, the `demo.sh` script was modified so that the `CORPUS` variable pointed to the
training corpus being processed. Additionally, a few more variable updates were made, with
`VOCAB_MIN_COUNT=0` and `VECTOR_SIZE=256`. This generated a `vectors.txt` file for
each vocabulary which was transformed into an npz file using the
`chainer_transformer.tools.convert_vectors_into_npy` tool. These fixed vectors were then
passed to `chainer_transformer.trainer` during training.

repository: enceladus-rex/chainer-transformer

repo_name: enceladus-rex/chainer-transformer


text:
# Line Items

Any methods return promise object.

## Static methods

### Retrieve order's line items

```javascript
client.lineItems.find(orderId[, params][, callback(err, items)]);
```

- `orderId` is unique identifier (number) of the order
- `params` is object with a list of filters, not required
- `callback` is a function, not required

### Create a line item

```javascript
client.lineItems.create(orderId, data[, callback(err, item)]);
```

- `orderId` is unique identifier (number) of the order
- `data` is a line item object
- `data.product` is a model of the [product](https://github.com/yurypaleev/BaseCRM/blob/master/src/products/README.md "API Documentation")
- `callback` is a function, not required

### Retrieve a single line item

```javascript
client.lineItems.find(orderId, id[, callback(err, item)]);
```

- `orderId` is unique identifier (number) of the order
- `id` is unique identifier (number) of the line item
- `callback` is a function, not required

### Remove a line item

```javascript
client.lineItems.remove(orderId, id[, callback(err, state)]);
```

- `orderId` is unique identifier (number) of the order
- `id` is unique identifier (number) of the line item
- `callback` is a function, not required

## Model methods

### Remove a line item

```javascript
item.remove(orderId, [callback(err, state)]);
```

- `orderId` is unique identifier (number) of the order
- `callback` is a function, not required

---

Detailed documentation in the [official API](https://developers.getbase.com/docs/rest/reference/line_items "API Documentation")

## License
MIT

## Bug Reports
Report [here](https://github.com/yurypaleev/BaseCRM/issues?q=line%20items).

repository: iotdesignshop/BaseCRM

repo_name: iotdesignshop/BaseCRM


text:
# China Won’t Be Banning Bitcoin Mining Activities in the Country

Published at: **2019-11-06T13:18:16+00:00**

Author: **Bhushan Akolkar**

Original: [Coinspeaker](https://www.coinspeaker.com/china-wont-ban-bitcoin-mining/)

It’s a great moment of cheer for all cryptocurrency miners carrying out operations based out of China. In the latest development, the China National Development and Reform Commission (NDRC) has decided to withdraw its proposal of banning crypto-mining activities (including Bitcoin mining) taking place in the country.
On Wednesday, November 5, the NDRC published a new catalog for Guiding Industry Restructuring. The new version replaces the earlier one created in 2011 wherein the agency had proposed banning the crypto mining activities in China.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
---
title: Visualization Videos
keywords: videos
tags: [videos]
sidebar: doc_sidebar
permalink: videos_dashboards_charts.html
published: false
summary: Visualize data with dashboards and charts.
---
Learn about visualizing your metrics with dashboards and charts, and how to customize time windows, add legends, configure dashboard variables, and more!
Note that in most of the videos we still refer to VMware Aria Operations for Applications as Tanzu Observability or Wavefront.

Browsing Your Data

90-second video that shows how you can find and examine metrics from the Sources browser and from the Metrics browser.

You can also watch the video here .

Time Windows in Dashboards and Charts

Learn how to select, sync, and reset time windows so you can analyze and compare your data.

You can also watch the video here .

Create Dashboards

Users with the Dashboards permission can create a new dashboard with one or multiple charts from metrics, a chart type, or an integration.

You can also watch the video here .

Customize Dashboards

All users can customize their dashboards. Learn how to find a section, filter using variables or filters, set the time for the dashboard, and share the dashboard with others.

You can also watch the video here .

Create and Modify Charts with Chart Builder

Users with the Dashboards permission can use Chart Builder to select metrics or histograms, apply filters and functions, select a chart type, and customize the chart.

You can also watch the video here .

Sharing Content

In this video, you'll learn how to share content. For example, search results, dashboards, charts, and so on. You will also learn about what live and non-live displays are and how to share a live display of a dashboard.

You can also watch the video here .

repository: wavefrontHQ/docs

gha_language: CSS

repo_name: wavefrontHQ/docs


text:
# jc2mp-buymenu-twoveh
This script was originally created by Philpax (Phillip Larkson). I commit some changes like:
- Two vehicles per player (one which is used by player disappear)
- Added weapons from DLC
- Added some vehicles (all from DLC and some more interesting which weren't included)
- Price divided by 10

# jc2mp-buymenu

The JC2-MP buy menu script implements a fully-featured buy menu within the game, allowing you to purchase vehicles, weapons and skins.

## Adding new items

Edit shared/buymenu.lua - inside, you will find lists of vehicles, weapons and skins. Edit these as appropriate to add and modify the items you want. The DLC items have been commented out; you can easily re-add these if you would like to use them on your server.


text:
# Installation
## Quickstart for testing

If you just want to checkout Confidant and aren't looking to deploy it into
production, it's possible to get started without any external dependencies.
Check out the [test and development quickstart](contributing.html#development-guide)
for this.

Note that you should _never_ run with this quickstart configuration in production.

## Docker installation

### To run confidant in Docker

It's necessary to export your configuration variables before running confidant.
You can either specify them as multiple -e options, or you can put them into an
an environment file and use --env-file.

```bash
docker pull lyft/confidant
docker run --env-file my_config -t lyft/confidant
```

### To build the image

If you want to build the image and store it in your private registry, you can
do the following:

```bash
git clone https://github.com/lyft/confidant
cd confidant
docker build -t lyft/confidant .
```

## pip installation

Warning: this is still a work in progress and it may not be working right now.
We'll remove this warning when we have pip installation fully working.

1. Using Ubuntu or Debian (please help with non-Ubuntu/Debian install
   instructions!)
1. Using gunicorn as the wsgi server
1. venv location: /srv/confidant/venv

### Make a virtualenv and install pip requirements

```bash
sudo apt-get install -y python python-pip python-virtualenv python-dev build-essential libffi-dev libxml2-dev libxmlsec1-dev
cd /srv/confidant
virtualenv venv
source venv/bin/activate
pip install -U pip
pip install confidant
deactivate
```

Note that the pip package includes the minified, generated frontend artifacts,
in the dist directory. This can be configured via the STATIC_FOLDER setting.

## Manual installation

Assumptions:

1. Using Ubuntu or Debian (please help with non-Ubuntu/Debian install
   instructions!)
1. Using gunicorn as the wsgi server
1. Installation location: /srv/confidant/venv
1. venv location: /srv/confidant/venv
1. node\_modules location: /srv/confidant/node\_modules

### Clone Confidant

```bash
cd /srv
git clone https://github.com/lyft/confidant
```

### Make a virtualenv and install pip requirements

```bash
sudo apt-get install -y python python-pip python-virtualenv python-dev build-essential libffi-dev libxml2-dev libxmlsec1-dev
cd /srv/confidant
virtualenv venv
source venv/bin/activate
pip install -U pip
pip install -r requirements.txt
deactivate
```

### Build the frontend

```bash
cd /srv/confidant
sudo apt-get install -y npm nodejs nodejs-legacy git git-core
gem install compass
npm install grunt-cli
npm install
node_modules/grunt-cli/bin/grunt build
```

### Run confidant

It's necessary to export your configuration variables before running confidant.
The easiest method is to source a file that exports your environment before
running confidant.

```bash
source my_config
cd /srv/confidant
source venv/bin/activate
gunicorn confidant.wsgi:app --workers=2 -k gevent
```

That's it. See the configuration documentation about how to configure and run.

repository: lyft/confidant

gha_language: Python

repo_name: lyft/confidant


text:
# ffmpeg-aws-spot-cluster
Configurable one-time run and self cleanup of ffmpeg running on AWS EC2 Spot. Aiming for cost efficiency and for those who don't encode often but want to harness power of aws to do the job.

Python Version: >3.5

## Basic Idea

![alt text](docs/idea.png "Idea")

## Development Getting Started

### pre-commit

Install [`pre-commit`](https://pre-commit.com/) to automatically run scripts when commit. On MacOS install using homebrew: `brew install pre-commit`

Then run `pre-commit install --install-hooks` on this directory.

### Installing the python package

Create virtualenv by `python3 -m venv env`
then activate it `source env/bin/activate`
Install using `pip install --editable .`


text:
---
layout:     post
title:      Scrapying Greek Laws from UltraCl@rity
date:       2015-06-22 00:37:19
summary:    In this post we provide a tutorial about how to downlad all Greek laws from the unofficial UltraCl@rity service, using the popular open source framework Scrapy.
categories: legislation code
---

In this post we present a step by step tutorial describing the procedure we followed to download all PDF documents containing law texts that form Greek legislation.

Laws in Greece are published by the [National Printing Service (NPS)](http://www.et.gr) as PDF files, a format that is, from a technological point of view, unfriendly for their processing. Since 2010 these files are available to download for free. Unfortunately, NPS does not provide any API that would allow software applications to request and grant access to these documents.

Another service that could be used to obtain these documents is [UltraCl@rity](https://yperdiavgeia.gr/), which is an unofficial and voluntarily developed search engine for public sector decisions. This service apart from decisions published in the governmental [Cl@rity](https://diavgeia.gov.gr/) website, contains also the total set of Greek legislation. While it provides an API for querying content published in Cl@rity website, it does not support queries for the total set of Greek laws.

To deal with this situation, our approach was to implement a web crawler. So, here comes the powerful framework "Scrapy".

###What is Scrapy?
[Scrapy](http://scrapy.org/) is a web crawling framework written in Python. It is a fast and open-source tool for extracting data from websites. Using Scrapy we implemented a crawler that automatically downloads all law PDF files from the UltraCl@rity website. Our preference for this unofficial service instead of the NPS website results from the fact that URLs follow a consistent pattern making it easy to form the required http requests.
For example:

{% highlight ruby %}
    https://yperdiavgeia.gr/laws/search/year_from:XXXX/year_to:YYYY/teuxos:A
{% endhighlight %}

returns an html page with links to all law documents published between year XXXX and year YYYY. Adding an extra *page* parameter at the end of the URL allows to easily deal with pagination.

On the other hand, the NPS website provides a form (available [here] (http://www.et.gr/index.php/2013-01-28-14-06-23/2013-01-29-08-13-13)) that limits search to the first 200 results, making the overall procedure more complex, plus the fact that pagination is implemented client-side with JavaScript.

###How do we use Scrapy?
To get a feeling of how scrapy works there is an online tutorial plus installation instructions available [here](http://doc.scrapy.org/en/0.24/). In this post we assume that Scrapy is already installed and a new project (named ultraclarity) has been created, following the structure as described in the tutorial.

Before starting the development of the spider it is necessary to define the data that we want to scrape. This is done by modifying the *items.py* file. We create [Items](http://doc.scrapy.org/en/0.24/topics/items.html) which are described as containers that will be loaded with the scraped data. Inside items.py file a class named *UltraclarityItem* has been automatically created that takes a scrapy item object as a parameter and inside that class we define some atrributes (according to what we need to download from the website) as shown below:

{% highlight python %}
  class UltraclarityItem(scrapy.Item):
    title = scrapy.Field()
    url = scrapy.Field()
    desc = scrapy.Field()
    pass
{% endhighlight %}

The above model defines three attributes used to capture the *title* (in our case this will be used as the name of the file that the data will be saved to), the *URL* (where is the item that we want to scrape), and the description referred as *desc* (later it will become clear that this should contain the content of the PDF file).

Next, we have to declare our Spider. Spiders are user-written classes that must be well defined. With the term well-defined we mean that it is important to instantiate some mandatory fields, for example its unique name etc, create the URLs to download and define through methods how content is parsed to extract items. There are some basic methods to use but scrapy also allows to create or override functions in order to obtain a more customized behaviour. All spiders are set up inside a folder named *spiders*.

In our project we used CrawlSpider which is the most common spider used to crawl regular websites. Inside spiders folder we create a new file named ultraclarityspider.
As we will developing the spider, packages need to be imported to avoid errors when compiling the code. For example to be able to make http requests from scrapy.http we need to import Request. These packages are written in ultraclarityspider and are shown below:

{% highlight python %}
import scrapy
from scrapy.spiders 	import CrawlSpider
from scrapy.selector    import Selector
from ultraclarity.items import UltraclarityItem
from scrapy.http    	import Request
{% endhighlight %}

We are now ready to begin developing the spider. Firstly, we create a class named *UltraclaritySpider* which subclasses the CrawlSpider and afterwards we specify its mandatory fields: a *name* that we will use to call from the terminal, an optional list named *Allowed_domains* which is a list of domains where the spider will begin to crawl from, when no particular URLs are specified and finally a list of URLs where the Spider will begin to crawl from. The code below illustrates the above description.

{% highlight python %}
class UltraclaritySpider(CrawlSpider):
    name = "ultraclarity"
    allowed_domains = ["yperdiavgeia.gr"]

    start_urls = []

    for year in range(xxxx, yyyy):
        start_urls.append("http://yperdiavgeia.gr/laws/search/year_from:" + str(year) + "/year_to:" + str(year) + "/teuxos:A"))
{% endhighlight %}

In order to define *start_urls* we need to know which years of publications of laws we intend to search for. So, we use a *for* loop where *xxxx* and *yyyy* is the range of years to work with.

Inside *UltraclaritySpider* class we also implement three methods to help us scrape data. The first one, *parse* is a basic method, a default callback used by Scrapy to process downloaded responses.

{% highlight python %}
def parse(self, response):
    sel = Selector(response)
    num_pages = pages(int(sel.xpath('//span[@id="total-results"]/text()').extract()[0]))

    for n in range(1, num_pages + 1):
        request = Request(response.url + "/page:" + str(n), callback=self.parse_objects)
        yield request
{% endhighlight %}

The above code shows that we have used a mechanism called [Selector](http://doc.scrapy.org/en/0.24/topics/selectors.html) to select which data we are going to extract. Selectors select certain parts of the HTML document specified either by [XPath](http://www.w3.org/TR/xpath/) or CSS expressions. XPath (which we are using) is a language for selecting nodes in XML and HTML documents. In this method we use selectors to deal with pagination. First, we follow the path to the element that contains the total number of results according to our search, then we use a *pages* function that divides this number with the number of results per page (UltraCl@rity Service by default uses ten documents per page) and returns the number of pages. As mentioned above we can use an extra *page* parameter to construct the urls dynamically. Multiple requests are then processed with this tecnhique and for such requests we implement a callback function named "parse_objects".

Now that we have created all requests for every page, we need to fill the items that we created in UltraclarityItem class. Spiders are expected to return their scraped data inside *item* objects and by taking advantage of selectors and following the tree structure of every page we can easily spot the information we need. In our case, documents are stored in divs having class *law* or *law alt* so for every path we follow we call an instance of the UltraclarityItem and we fill the item title (following the same pattern to all files e.g *government-gazzette-issue-num\_issue-type\_year-of-publication*) and the URL that points to the PDF file. As this URL points directly to the law document, we just need to perform requests based on these URLs, define a callback function named *parse_urls* and just pass the item as metadata so that we can use it in the callback function:

{% highlight python %}
def parse_objects(self, response):
    sel = Selector(response)
    paths = sel.xpath('//div[@class="law"] | //div[@class="law alt"]')

    for paths in paths:
        item = UltraClarityItem()
        title = paths.xpath('a[@class="title"]/text()').extract()
        item['title'] = title[0].split()[2].replace("/","_").replace(",","")+'_'+title[0].split()[3]
        item['url'] = paths.xpath('a[@class="title"]/@href').extract()
        request = Request(item['url'][0], callback = self.parse_urls)
        request.meta['item'] = item
        yield request
{% endhighlight %}

The last method of the class is used to store the file in the item's description.

{% highlight python %}
def parse_urls(self,response):
    item = response.meta['item']
    item['desc'] = response.body
    yield item
{% endhighlight %}

Finally, in the last step we need to store every item that contains information locally to our computer. After an item has been scraped by a spider, it is sent to the item pipeline which processes it through several components that are executed sequentially. Scrapy provides a placeholder file when you create a project in *project_name/project_name/pipelines.py* that one can modify. Our pipeline is a class (*UltraclarityPipeline*) that implements a simple method named *process_item* which stores every item in a file based on the item's title. All we need to do is just open files and store in them the text. For better organisation, we store files in folders based on their year of publication.

{% highlight python %}
from ultraclarity.items import UltraclarityItem
import os

class UltraclarityPipeline(object):
    def process_item(self, item, spider):
        if not os.path.exists('laws/'+item['title'].split('_')[2]+'/'):
            os.makedirs('laws/'+item['title'].split('_')[2]+'/')

        with open('laws/'+item['title'].split('_')[2]+'/'+item['title'], 'w') as f:
            f.write(item['desc'])

        return item
{% endhighlight %}

This is it! Just calling our spider's name from the terminal will do the job!
The source code is available in [Github](https://github.com/OpenLawsGR/ultraclarity-crawler)

repository: OpenLawsGR/pixyll

repo_name: OpenLawsGR/pixyll


text:
# NHC Cones
##### Author: Protuhj
##### Version: 0.9.2

#### Disclaimer:
I am in no way associated with the National Hurricane Center, and this project or its output is not intended for official use.

---

#### Description:
Takes the current storm data from the National Hurricane Center (NHC) and plots all of the forecast cones onto the 5 day forecast graphics

Example output for the Atlantic forecast:

![Atlantic Basic Latest](atl_latest.png)

---

#### Dependencies

Written against Python 3.6

From requirements.txt:
```
certifi==2020.6.20
chardet==3.0.4
idna==2.10
lxml==4.5.2
Pillow==7.2.0
requests==2.24.0
urllib3==1.25.10
```

repository: petermalone/nhc-cones

repo_name: petermalone/nhc-cones


text:
---
title: Arez 0.53 released
author: Arez Project
authorURL: https://github.com/arez
---

[Full Changelog](https://github.com/arez/arez/compare/v0.52...v0.53)

Changes in this release:

#### Fixed
* **\[processor\]** The `create` methods on the generated repository incorrectly had their access level
  determined by the access level of the associated components constructor. This has been corrected so
  that the access level of the component class determines the access level of the method.
* **\[processor\]** The methods on the generated repository and the repository class itself incorrectly
  had defined the access level as public. This has been corrected so that the access level of the component
  class determines the access level of the methods and the repository type.
* **\[processor\]** Make sure that the annotation processor copies documented annotations when implementing
  the method annotated by `@ComponentNameRef`.

#### Changed
* **\[core\]** Updated `ObserverErrorHandlerSupport` to improve dead code elimination in production mode.
  Previously when an `ObserverErrorHandler` produced an error, the error handler would delegate to
  `ThrowableUtil` to produce a detailed error message while the new code delegates to platform to decode
  throwables and produces a slightly less comprehensive message.
* **\[processor\]** Used code supplied by the JVM to detect whether a name is a valid java identifier and
  removed custom code to detect whether name is a java identifier. Enhanced the exceptions to give greater
  context to why a name is invalid.
* **\[processor\]** Added checks in the annotation processor that names are not keywords. This can cause
  problems during code generation.
* **\[component\]** Added some nullability annotations to the ref methods in the `AbstractRepository` class.
* **\[annotations\]** Remove the `name` parameter from the `@Repository` annotation as it is no longer unused.


text:
## Creating an Issue

__Before you create a new issue:__
* Check the [issues](https://github.com/BillionOysterProject/Digital-Platform/issues) in Github to ensure a similar issue doesn't already exist.

__In your issue request:__
* Clearly describe the issue.
  - If it's a bug, include the steps you took to reproduce the issue.
  - If it's a new feature, enhancement, or restructure, explain why you think it should be added.
* Include your BOP Digital Platform username.
* Include the __type__ and __scope__.
  - Issue types:
    - feat - features, enhancements, and overall improvements
    - fix - fixes, bugs, HotFixs, etc...
    - doc - changes to the documentation that don't touch any code.
  - Issue scopes:
    - The scope should be where proposed changes will take place.
    - Examples: Expeditions, Data, Curriculum, Events
* Label your issue with the site feature it relates to:
    - Expeditions
    - Data
    - Curriculum
    - Research
    - Events

__Issue format guidelines:__
 ```
Header
Blank Line
Body
Blank Line
BOP Digital Platform username

The header should look like this:
<type>(<scope>): <subject>

The body should have any necessary detailed info about the issue (described above).

So a commit should look like:
feat(Expeditions): Include wild oyster recruitment data in Protocol 2: Oyster Measurements.

We'd like a way to collect information about potential wild oyster recruitment at an ORS site.

UN: bop-admin

```

Someone from BOP will get back to you within a week with feedback on your issue!

repository: BillionOysterProject/Digital-Platform

repo_name: BillionOysterProject/Digital-Platform