text:
![open issues](https://img.shields.io/github/issues/saksham1991999/GitTra)
![open issues](https://img.shields.io/github/forks/saksham1991999/GitTra)
![open issues](https://img.shields.io/github/stars/saksham1991999/GitTra)
![open issues](https://img.shields.io/github/contributors/saksham1991999/GitTra)
[![Visits Badge](https://badges.pufler.dev/visits/saksham1991999/GitTra)](https://badges.pufler.dev)

[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/uses-html.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/uses-css.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/uses-js.svg)](https://forthebadge.com)

GitTra

    Git add-on for translating comments on open-source project.

    Helps people work on inter-language collaboration.

## Table of Contents

* [About the Project](#about-the-project)
  * [Built With](#built-with)
* [Getting Started](#getting-started)
  * [Prerequisites](#prerequisites)
  * [Installation](#installing-the-cli-client)
  * [Usage](#usage-commands)
* [Web Application](#web-application)
    * [Django](#django)
    * [Installation](#django-installation)
    * [Features](#features)
* [Screenshots](#screenshots)
* [Authors](#authors)
* [Contributing](#contributing)
* [License](#license)

## About the Project
[GitTra](https://www.gittra.com/) is a translation tool for open source collaborator.

Got that one project that you want to work on and all the documentation is in chinese?
   ... we got you covered.

Use Gittra as a CLI or use our Dashboard to clone a translated version.
All you need is a remote repo name, and you're good to go.

### Built With
*   Python
*   Django
*   Google Translator

[Back to Table of Contents](#table-of-contents)

## Getting Started

### Prerequisites
- Ensure that you have the Github CLI client installed. If not, follow the instructions [here](https://github.com/cli/cli) to set it up.
- Ensure that you have pip and python installed.
- Optional: Set up a virtual environment by following the instructions [here](https://docs.python.org/3/library/venv.html)
- Install the required dependencies using `pip install -r requirements.txt`

### Installing the CLI client
- In the root directory, run the following command:
  - **Linux**: `python3 -m pip install --editable .`
  - **Windows & Mac**: `pip install -e .`
- Use any `gittra` command now to fork, clone and push repos in different languages!

### Usage Commands
- `gittra fork [GITHUB URL] [LANGUAGE]` Forks a Github repository and translates comments into a given language on a new 'translated' branch
- `gittra clone [GITHUB URL] [LANGUAGE]` Clones a Github repository and translates comments into a given language on a new 'translated' branch
- `gittra push` Pushes into the 'translated' branch of the respository and automatically updates the 'main' branch as well

## Web Application

## Frontend

* #### Django template language
    Django’s template language is designed to strike a balance between power and ease. It’s designed to feel comfortable to those used to working with HTML. If you have any exposure to other text-based template languages, such as Smarty or Jinja2, you should feel right at home with Django’s templates.

## Backend

* #### Django
    Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It's free and open source.

    * ###### Why Django ?
        *  Ridiculously fast
        *  Reassuringly secure
        *  Exceedingly scalable
        *  Incredibly versatile
        *  Easy to Integrate with Python Libraries/Functions

### Django Installation

* Backend

    ```Python
    pip install -r requirements.txt
    python manage.py makemigrations
    python manage.py migrate
    ```

### Usage

* To Create Super User

    ``` python
    python3 manage.py createsuperuser
    ```

* To Run Server

    ``` python
    python3 manage.py runserver
    ```

[Back to Table of Contents](#table-of-contents)

## Features
  * Translate the repository using the GitHub repo URL, uploading a zip file.
  * Translate the repository by replacing GitHub.com with GitTra.com
  * Send a Post request to /api and will receive the Translated Zip URL in response.

[Back to Table of Contents](#table-of-contents)

## Screenshots

![alt text](Screenshots/gittra_cli.png)

![alt text](Screenshots/gittra_clone.png)

![alt text](Screenshots/gittra_postman.jpg)

![alt text](Screenshots/gittra.tech_home.png)

![alt text](Screenshots/gittra.tech_translated.png)

![alt text](Screenshots/gittra.tech_admin.png)

## Authors

💻Prabal Chhatkuli

💻Saksham Mittal

💻Grace Gao

[Back to Table of Contents](#table-of-contents)

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)

[Back to Table of Contents](#table-of-contents)

repository: prabalchhatkuli/GitTra

branch_name: refs/heads/main

repo_name: prabalchhatkuli/GitTra


text:
## Reproducibility in Machine Learning

Reproducibility in machine learning modeling is an important problem faced by data scientists and companies seeking to put machine learning models into production. Reproducibility means that given the same inputs, we should obtain exactly the same outputs. And this is for both our research and our production environment. In other words, our research models and our deployed models should produce the same score for the same input.

There are tremendous costs to irreproducible machine learning models including:

- Financial costs
- Time costs (lost time)
- Reputational costs
- Compliance costs
- Regulatory costs

The problems with reproducibility can arise in any and all of the machine learning building pipeline steps:

- Data gathering
- Feature extraction and feature engineering
- Feature selection
- Model building
- Data scoring

This is because all these steps involve elements of randomness. For example, if gathering data with SQL, there is an element of randomness when retrieving the rows from the database. During feature engineering, if we replace missing information by a random extraction of non-missing observations, we are introducing another layer of randomness. Machine learning models and feature selection algorithms involve randomness during model fitting. Think for example Random Forests; there is an element of randomness to select the features at each split, as well as to bootrstrap a sample of the dataset to fit each tree. For neural networks there is an element of randomness to initialise the network weights.

In a future section, we will show you how to tackle reproducibility between research and deployment pipelines.

For this section, please go ahead and get familiar with randomness in computer science and machine learning by visiting the following resources:

- [Why do we need randomness?](https://www.kdnuggets.com/2017/06/surprising-complexity-randomness.html)
- [Embrace Randomness in Machine Learning](https://machinelearningmastery.com/randomness-in-machine-learning/)
- [Random Number Generators for ML in python](https://machinelearningmastery.com/introduction-to-random-number-generators-for-machine-learning/)

extension: md

gha_language: Jupyter Notebook

license_type: permissive


text:
# Web-EPANET

**This project is now discontinued**

### Requirements

```
    export FLASK_APP=web_epanet.py
    flask run
```

### About

It's a JavaScript application that edits a text file in the browser.

The code takes in a structured text file ".inp" and outputs a modified version of that same file.

The main part of the code parses the text file, adapts the network it represents, and then spits out a new file.

The input/output files are EPANET files that are white-space separated with optional semi-colons at the end of each line.

The sections have keyword headers ([PIPES]), but some of these can be absent.

The work flow is demonstrated by the files under `app/lib`. The example modifies all junctions. Ideally it would skip junctions (not create a tank) if they start with a user selectable string (e.g. SKIP or S_). In a perfect world, another string (e.g., ROOF) would create a tank at a different height than the default height.

Examples of .inp input files can be here: https://emps.exeter.ac.uk/engineering/research/cws/resources/benchmarks/design-resiliance-pareto-fronts/data-files/

The code is only physically correct if the .inp file starts with hydraulic units of LPS. Additionally, it assumed Hazel-Williams is used for friction factor, but it's an easy tweak to make it work for Darcy-Weissbach also.

Use WNTR python package to parse the .inp files

### Using the code

This code can be used by anyone who would like to, with permission of authors. The javascript was adapted from certain python scripts to fit the web. For permission or any inquiries, please contact<EMAIL_ADDRESS>

license: MIT

repository: AppliedTechLab/web-epanet

branch_name: refs/heads/master

repo_name: AppliedTechLab/web-epanet


text:
# Simple-Cms-Server

[![Build Status](https://travis-ci.org/thingleme/simple-cms-server.svg?branch=master)](https://travis-ci.org/thingleme/simple-cms-server)

## Introduction
This server allows to run a minimal CMS that is compatible with the [Thingle.me](https://thingle.me)'s `Generic CMS plugin` API specifications.

Documents must accordingly be listed in the `config.yml` configuration file.

## Configuration
Create a configuration file listing all the documents you want to use with [Thingle.me](https://thingle.me)

Example of `config.yml`
```
   - domain_uuid: PUT_YOUR_DOMAIN_UUID_HERE
     files:
       - document_id: "1"
         format: "application/pdf"
         description: "The Pro Git book"
         tags:
           - "Git"
           - "Pro"
           - "Book"
         i18n:
           - language: "en"
             url: "https://progit2.s3.amazonaws.com/en/2016-03-22-f3531/progit-en.1084.pdf"
             description: "The Pro Git book"
             created_at: 2014-01-01 11:02:57
             updated_at: 2014-01-01 11:03:14
       - document_id: "2"
         description: "Thingle.me video"
         tags:
           - "Customer Service"
           - "Products"
           - "Innovation"
         i18n:
           - language: "en"
             url: "https://www.youtube.com/watch?v=pCUyt-9m9tA"
             description: "Thingle.me video"
             created_at: 2017-02-01 12:00:00
             updated_at: 2017-02-01 12:00:00
```

## Notes:
- the `domain_uuid` can be discovered calling the `/users/me` API (see the `Developer Zone` in your Dashboard)

# Security
In order to provide a secure way to filter out unauthorized incoming requests, you need to set an env variable to your `access_token` (the same used in the Thingle.me Generic CMS plugin configuration).

- The `name` of this variable must start with the prefix "dom_" followed by the first 8 characters of your `domain_uuid`
- Its `value` must match the `access_token`

Example:
your domain_uuid is `a2d4c8a0-d994-11e6-9c32-e3ed0fb5736e` and you have configured `mysecretpwd` as secret access_token in your Thingle.me plugin configuration. To start your `simple-cms-server`, just run:

> $ dom_a2d4c8a0=mysecretpwd npm start

## Run

You can start the server by either locally running node or launching a docker container. If not otherwise provided, the default port is 5000.

### Node.js

> $ dom_<first_8_digits_of_your_domain_uuid>=<your_access_token> npm start

### Docker

> $ docker run -e PORT=5001 -e dom_<first_8_digits_of_your_domain_uuid>=<your_access_token> -p 5001:5001 -v path_to_the_config.yml:/app/config.yml --name simple-cms-server thingleme/simple-cms-server:v1.2.2

repository: thingleme/simple-cms-server

repo_name: thingleme/simple-cms-server


text:
# flow-pie
Simple HTML5+CSS3+Javascript game, ideal for quizzes.

# Summary
FlowPie is an interactive game which can be used for different purposes. It creates route experience which basically allows users to go
throught different steps between a set of items defined for the game.

# Features
* Cross browser
* Resposive UI
* Beautiful UI/UX
* Easy initialization
* Can be used for multiple games (quizzes, learning games, etc.)

# Usage
* Add the external libraries references into your HTML page: [jQuery](https://jquery.com/), [Underscore.js](http://underscorejs.org/)
and [FontAwesome](https://fontawesome.com/)
```html
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
```
* Add the internal resources references into your HTML page: ```flowPie.css``` and ```flowPie.js```
```html
<link rel="stylesheet" href="flowPie.css">
<script src="flowPie.js"></script>
```
* Initialize your flow items and the flow itself:
```javascript
/* Initialize the items of the flow */
var items = [
  {id: 1, sortOrder: 0, showShadow: false, isAnswered: false, image: "https://placeimg.com/200/200/animals/1"},
  {id: 2, sortOrder: 1, showShadow: true, isAnswered: false, image: "https://placeimg.com/200/200/animals/2"},
  {id: 3, sortOrder: 2, showShadow: true, isAnswered: false, image: "https://placeimg.com/200/200/animals/3"},
  {id: 4, sortOrder: 3, showShadow: true, isAnswered: false, image: "https://placeimg.com/200/200/animals/4"},
  {id: 5, sortOrder: 4, showShadow: true, isAnswered: false, image: "https://placeimg.com/200/200/animals/5"}
]

/* Initialize the flow */
flowPie.init($('body'), items, ''); // Init the flow passing the DOM element container, the flow items and the path where the badge image is located
flowPie.buildFlow(); // Build the flow

/* Initialize the callback to be executed when clicking any element in the flow */
flowPie.callbackOnClickElement = function (element, event) {
  // Make awesome stuffs here, like open a modal with a question
  // ...

  // Set the current element as done and move to the next
  flowPie.answerCurrentElement();
  flowPie.goNextElement();
};
```

# How it looks
## Flow after first initialization
![Flow Pie](https://i.imgur.com/oCpH7w5.jpg)
## Flow after having set as done a few items
![Flow Pie](https://i.imgur.com/Uyohn1e.jpg)
## Flow finished
![Flow Pie](https://i.imgur.com/eWOg65m.jpg)

# Reference
## Items
* __id__ ```{Number}```: Unique identifier of each flow item
* __sortOrder__ ```{Number}```: Defines the order of the item in the flow
* __isDone__ ```{Boolean}```: Indicates if the flow item is done
* __showShadow__ ```{Boolean}```: Defines if the DOM element representing the item will be covered by a shadow (represents that the item isn't done)
* __image__ ```{String}```: Image URL of the item

## flowPie
### Properties
* __currentItem__ ```{Object}```: Represent the current active item of the flow
  * __isDone__ ```{Boolean}```: Indicates if the item is done
  * __isLast__ ```{Boolean}```: Indicates if the item is the last in the flow
  * __order__ ```{Number}```: Indicates the order of the item in the flow
  * __position__ ```{Object}```: Indicates the ```X,Y``` position of the item in the flow
* __utils__ ```{Object}```: Utility object in the flow
  * __isFlowFinished__ ```{Boolean}```: Indicates if flow is finished
  * __rows__ ```{Number}```: Indicates the number of rows within the flow
  * __itemsPerRow__ ```{Number}```: Indicates the number of items in a row in the flow
  * __windowWidth__ ```{Number}```: Indicates the current window width

## Methods
* __init__ ```function(container, dataSource, imagePath)```: Initializes the flow with 3 parameters
  * __container__: DOM element that will contain the flow
  * __dataSource__: Data source of items that the flow will contain
  * __imagePath__: Path wehere the bagde image/icon is located (badge icon is shown where the flow is finished)
* __buildFlow__ ```function()```: Build all the DOM elements that shapes the flow
* __callbackOnClickElement__ ```function(element, event)```: Callback to be executed when clicking any element in the flow
* __answerCurrentElement__ ```function()```: Set the current element as done. This means that the current DOM element will not have the shadow any more and will have the check icon active
* __goNextElement__ ```function()```: Move to the next element in the flow (calling this method will update the ```currentItem``` property)

repository: lvelasquezm/flow-pie

repo_name: lvelasquezm/flow-pie


text:
Wdio Workflo Allure Reporter
===========

This is a customized version of [wdio-allure-reporter](https://github.com/webdriverio/wdio-allure-reporter) for use with [workflo](https://github.com/flohil/workflo) framework.

### License

MIT

repository: flohil/wdio-workflo-allure-reporter

repo_name: flohil/wdio-workflo-allure-reporter


text:
# Contributing

## Issues

When creating an issue, please check if one has already been created for a similar purpose.

## Pull requests

If you're addressing a specific issue, please refer to it in your pull request's comment for tracking.

1. Fork it (https://github.com/vinistock/loupe/fork)
2. Create your feature branch (git checkout -b my-feature)
3. Commit your changes (git commit -am 'Add my feature')
4. Push to the branch (git push origin my-feature)
5. Create a new pull request

repository: dannybarrientos/loupe

repo_name: dannybarrientos/loupe


text:
Ansible Role - rdi2-slurm
=========================

This role simply installs SLURM Workload Manager with the following configuration.

- Install directory: `/opt/slurm/{{ slurm_version }}`
- Configuration directory: `/opt/slurm/{{ slurm_version }}/etc`
- Logging directory: `/var/log/slurm`
- Slurmd spool directory: `/var/spool/slurmd`
- PAM Slurm: `/lib64/security/pam_slurm.so`

Platforms
---------

CentOS 6.7 is the only OS that is supported and tested so far.

Role Variables
--------------

TBD

Dependencies
------------

None.

Example Playbook
----------------

Include the role like this:

    - hosts: servers
      roles:
         - { role: kjtanaka.rdi2-slurm }

License
-------

MIT License.

Author
------

- Koji Tanaka - RDI2

repository: kojiwell/ansible-role-slurm-old

repo_name: kojiwell/ansible-role-slurm-old


text:
ReactPixiFiber – React Fiber renderer for PixiJS

    ReactPixiFiber is a JavaScript library for writing PixiJS applications using React declarative style in React 16 and above.

    For React <16.0.0 see react-pixi.

## Demo

See [Rotating Bunny](https://codesandbox.io/s/q7oj1p0jo6) demo.

Also, please explore our [CodeSandbox](https://codesandbox.io/) templates:
* [Hello world using JavaScript](https://codesandbox.io/s/react-pixi-fiber-template-ohk6z)
* [Hello world using TypeScript](https://codesandbox.io/s/react-pixi-fiber-typescript-template-613ly)

and examples:
* [Rotating Bunny](https://codesandbox.io/s/q7oj1p0jo6)
* [AnimatedSprite using CustomComponent](https://codesandbox.io/s/react-pixi-fiber-demo-animatedsprite-d6udu)
* [Aligning texts](https://codesandbox.io/s/react-pixi-fiber-text-alignment-th5eg)
* [Sharing Redux state](https://codesandbox.io/s/react-pixi-fiber-with-redux-g4k7n)
* [Using animated](https://codesandbox.io/s/9qyxrljyo)

## 🚀 Migrating from version `0.x.y`? 🚀

Read [migration guide](#migrating-from-react-pixi-fiber0xy-before-version-100).

## Installing

The current version assumes [React] >16.0.0 and [PixiJS] >4.4.0

    yarn add react-pixi-fiber prop-types pixi.js

or

    npm install react-pixi-fiber prop-types pixi.js --save

Refer to next sections to see usage examples.

This package works flawlessly with [Create React App](https://github.com/facebookincubator/create-react-app) – see examples below, they already use it.

## Usage

    With ReactDOM (React 18 and above)

```jsx harmony
import { createRoot } from "react-dom/client";
import { Sprite, Stage } from "react-pixi-fiber";
import bunny from "./bunny.png";

function Bunny (props) {
  return <Sprite texture={PIXI.Texture.from(bunny)} {...props} />;
}

const container = document.getElementById("container");
const root = createRoot(container);

root.render(
  <Stage options={{ backgroundColor: 0x10bb99, height: 600, width: 800 }}>
    <Bunny x={200} y={200} />
  </Stage>,
);
```

This example will render [`PIXI.Sprite`] object into a [Root Container] of [`PIXI.Application`] on the page.

The HTML-like syntax; [called JSX](https://reactjs.org/docs/introducing-jsx.html) is not required to use with this renderer, but it makes code more readable. You can use [Babel](https://babeljs.io/) with a [React preset](https://babeljs.io/docs/plugins/preset-react/) to convert JSX into native JavaScript.

---

    With ReactDOM (React 16 and 17)

```jsx harmony
import { render } from "react-dom";
import { Sprite, Stage } from "react-pixi-fiber";
import bunny from "./bunny.png";

function Bunny(props) {
  return <Sprite texture={PIXI.Texture.from(bunny)} {...props} />;
}

const container = document.getElementById("container");
render(
  <Stage options={{ backgroundColor: 0x10bb99, height: 600, width: 800 }}>
    <Bunny x={200} y={200} />
  </Stage>,
  container
);
```

This example will render [`PIXI.Sprite`] object into a [Root Container] of [`PIXI.Application`] on the page.

The HTML-like syntax; [called JSX](https://reactjs.org/docs/introducing-jsx.html) is not required to use with this renderer, but it makes code more readable. You can use [Babel](https://babeljs.io/) with a [React preset](https://babeljs.io/docs/plugins/preset-react/) to convert JSX into native JavaScript.

---

    Without ReactDOM

```jsx harmony
import { render, Text } from "react-pixi-fiber";
import * as PIXI from "pixi.js";

// Setup PixiJS Application
const canvasElement = document.getElementById("container")
const app = new PIXI.Application({
  backgroundColor: 0x10bb99,
  view: canvasElement,
  width: 800,
  height: 600,
});

render(
  <Text text="Hello World!" x={200} y={200} />,
  app.stage
);
```

This example will render [`PIXI.Text`] object into a [Root Container] of PIXI Application (created as `app`) inside the `<canvas id="container"></canvas>` element on the page.

## Running Examples

1. Run `yarn install` (or `npm install`) in the repository root.
2. Run `yarn install` (or `npm install`) in the `examples` directory.
3. Run `yarn start` (or `npm run start`) in the `examples` directory.
4. Wait few seconds and browse examples that will open in new browser window.

## Migrating from<EMAIL_ADDRESS>(before version `1.0.0`)

    Changed built-in Stage and the one returned by createStageClass() to have the same API

It is now possible to get `ref` to built-in `Stage`.

Unless you are using class-based `Stage` component explicitly in your application, for example you are extending it, you should prefer to use built-in `Stage` instead of creating it with `createStageClass()`.

Data available on the `Stage` "instance":
* `_app` - PIXI.Application instance
* `_canvas` - HTMLCanvasElement instance
* `props` - props passed to Stage component

For example:
```js
import * as React from "react";
import { Stage, Text } from "react-pixi-fiber";

const width = 600;
const height = 400;
const options = {
  backgroundColor: 0x56789a,
  width: width,
  height: height
};
const style = {
  width: width,
  height: height
};

function App() {
  const stageRef = React.useRef()
  React.useEffect(() => {
    // Access PIXI.Application instance
    console.log(stageRef.current?._app.current)
    // Access HTMLCanvasElement instance
    console.log(stageRef.current?._canvas.current)
    // Access props passed to Stage component
    console.log(stageRef.current?.props)
  }, [])

  return (
    <Stage options={options} style={style} ref={stageRef}>
      <Text x={100} y={100} text="Hello world!" />
    </Stage>
  );
}
```

---

    Changed PIXI.Application exposed by Stage to be React ref

This is only relevant if you were using `createStageClass()` to create `Stage` component, as it was impossible to get `ref` when using built-in `Stage` as if was a function component, which triggered `Warning: Function components cannot be given refs` error.

For example:
```diff
import * as React from "react";
import { createStageClass, Text } from "react-pixi-fiber";

const Stage = createStageClass()

const width = 600;
const height = 400;
const options = {
  backgroundColor: 0x56789a,
  width: width,
  height: height
};
const style = {
  width: width,
  height: height
};

function App() {
  const stageRef = React.useRef()
  React.useEffect(() => {
-    console.log(stageRef.current?._app.renderer)
+    console.log(stageRef.current?._app.current.renderer)
  }, [])

  return (
    <Stage options={options} style={style} ref={stageRef}>
      <Text x={100} y={100} text="Hello world!" />
    </Stage>
  );
}
```

---

    Changed oldProps in customApplyProps to not be initialised when the component is first rendered

Make sure to check if `oldProps` is initialised before trying to read properties from it.

For example:
```diff
import { Container, CustomPIXIComponent } from "react-pixi-fiber"

const TYPE = "CustomContainer"
const behavior = {
  customApplyProps: function (instance, oldProps, newProps) {
-    const { customProp: oldCustomProp, ...otherOldProps } = oldProps
+    const { customProp: oldCustomProp, ...otherOldProps } = oldProps ?? {}
    const { customProp, ...otherNewProps } = newProps
    if (customProp !== oldCustomProp) {
      // Do something when customProp value have changed
    }
    this.applyDisplayObjectProps(otherOldProps, otherNewProps)
  },
  customDisplayObject: function ({ customProp, ...props }) {
    const container = new PIXI.Container(props)
    if (customProp === "foo") {
      // Do something when customProp is equal to "foo"
    }
    return container
  },
}

export default CustomPIXIComponent(behavior, TYPE)
```

---

    Changed applyProps to applyDisplayObjectProps

`react-pixi-fiber` now needs to know the type of component (e.g. `"Sprite"`) to properly apply the props.

For example:
```diff
-import { applyProps } from "react-pixi-fiber"
+import { applyDisplayObjectProps } from "react-pixi-fiber"

function ApplyAnimatedValues(instance, props) {
  if (instance instanceof PIXI.DisplayObject) {
-    applyProps(instance, {}, props)
+    // Component has custom way of applying props - use that
+    if (typeof instance._customApplyProps === "function") {
+      instance._customApplyProps(instance, {}, props)
+    }
+    // Component doesn't have custom way of applying props - use default way
+    else {
+      const type = instance.constructor.name
+      applyDisplayObjectProps(type, instance, {}, props)
    }
  } else {
    return false
  }
}
```

Refer to the implementation, when in doubt:
* old `applyProps` -> https://github.com/michalochman/react-pixi-fiber/blob/64e8e9f991f51b407f3af108da732e186429454a/src/ReactPixiFiber.js#L43
* new `applyDisplayObjectProps` -> https://github.com/michalochman/react-pixi-fiber/blob/3a9b71b8d18180117bf70459dd6b4419c5ef1c21/src/ReactPixiFiberComponent.js#L161

---

## Migrating from `react-pixi`

It is possible to use React Pixi Fiber as a drop-in replacement for `react-pixi`.

There are two options:

  Changing import or require statements

Change:

```js
import ReactPIXI from "react-pixi";
// or
const ReactPIXI = require("react-pixi");
```

to:

 ```js
import ReactPIXI from "react-pixi-fiber/react-pixi-alias";
// or
const ReactPIXI = require("react-pixi-fiber/react-pixi-alias");
```

---

  Using webpack resolve alias

```js
resolve: {
  alias: {
    "react-pixi$": "react-pixi-fiber/react-pixi-alias"
  }
}
```

---

## API

### Components

React Pixi Fiber currently supports following components out of the box (but read [Custom Components](#custom-components) section if you need more):

#### `<Stage />`

Renders [Root Container] of any [`PIXI.Application`].

Expects **one** the following props:
* `app` - pass your own [`PIXI.Application`] instance,
* `options` - pass only the [`PIXI.Application`] options.

#### `<Container />`

Renders [`PIXI.Container`].

#### `<Graphics />`

Renders [`PIXI.Graphics`].

#### `<ParticleContainer />`

Renders [`PIXI.ParticleContainer`] (or [`PIXI.particles.ParticleContainer`] if you're using PixiJS 4).

#### `<Sprite />`

Renders [`PIXI.Sprite`].

#### `<TilingSprite />`

Renders [`PIXI.TilingSprite`] (or [`PIXI.extras.TilingSprite`] if you're using PixiJS 4).

#### `<Text />`

Renders [`PIXI.Text`].

#### `<BitmapText />`

Renders [`PIXI.BitmapText`] (or [`PIXI.extras.BitmapText`] if you're using PixiJS 4).

#### `<NineSlicePlane />`

Renders [`PIXI.NineSlicePlane`].

### Props

[Similarly](https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html) to ReactDOM in React 16,
ReactPixiFiber is not ignoring unknown [`PIXI.DisplayObject`] members – they are all passed through. You can read
more about [Unknown Prop Warning](https://reactjs.org/warnings/unknown-prop.html) in ReactDOM.

#### Custom Props / Plugins

In case you are using PixiJS plugins, such as [`pixi-layers`](https://github.com/pixijs/pixi-layers), ReactPixiFiber can
recognize these custom props by using the following `CustomPIXIProperty` API:

`CustomPIXIProperty(maybeComponentType, propertyName, validator)` accepts:
* `maybeComponentType` – a ReactPixiFiber component, an array of ReactPixiFiber components or `undefined`/`null`. Passing `undefined` or `null` will apply custom property to all ReactPixiFiber components.
* `propertyName` – a name of the custom property as string. ReactPixiFiber will also check that the casing is correct.
* `validator` – optional function that will be called with value provided and should return `true` if the value is valid, `false` otherwise.

For example:

```js
import { Container, Sprite } from "react-pixi-fiber";

const group = new PIXI.display.Group(0, true);

// if you just want to get rid of Unknown Prop Warning:
CustomPIXIProperty(Container, "parentGroup");
CustomPIXIProperty(undefined, "zIndex");

// if you want to be strict in the values that are provided
CustomPIXIProperty(Container, "parentGroup", value => value instanceof PIXI.display.Group);
CustomPIXIProperty([Container, Sprite], "zIndex", value => Number.isFinite(value));

function App() {
  return (
    <Container>
      <Container parentGroup={group}>
        <Sprite texture={PIXI.Texture.WHITE} x={10} y={10} zIndex={1} />
        <Sprite texture={PIXI.Texture.WHITE} x={15} y={15} zIndex={2} />
      </Container>
      {/* `parentgroup` below will trigger prop warning, as the letter casing is incorrect */}
      <Container parentgroup={group}>
        <Sprite texture={PIXI.Texture.WHITE} x={100} y={100} zIndex={1} />
        {/* `zindex` below will trigger prop warning, as the letter casing is incorrect */}
        <Sprite texture={PIXI.Texture.WHITE} x={105} y={105} zindex={2} />
      </Container>
    </Container>
  )
}
```

#### Setting values for Point and ObservablePoint types

For setting properties on PixiJS types that are either [`PIXI.Point`]s or [`PIXI.ObservablePoint`]s you can use either
and array of integers or a comma-separated string of integers in the following forms: `[x,y]`, `"x,y"`, `[i]`, `"i"`.

In the case where two integers are provided, the first will be applied to the `x` coordinate and the second will be
applied to the `y` coordinate. In the case where a single integer if provided, it will be applied to both coordinates.

You can still create your own PIXI `Point` or `ObservablePoint` objects and assign them directly to the property.
These won't actually replace the property but they will be applied using the original object's `.copy()` method.

### Context – Accessing `PIXI.Application` instance created by `<Stage />`

`PIXI.Application` is automatically provided using the following definition (either as a prop or in context):
* `app` – an instance of PixiJS Application, with properties like:
  * `loader` – Loader instance to help with asset loading,
  * `renderer` – WebGL or CanvasRenderer,
  * `ticker` – Ticker for doing render updates,
  * `view` – reference to the renderer's canvas element.

    Using withApp Higher-Order Component (with all React versions)

To get `app` prop in your component you may wrap it with `withApp` higher-order component:

```jsx harmony
import { render } from "react-dom";
import { Sprite, Stage, withApp } from "react-pixi-fiber";
import bunny from "./bunny.png";

class RotatingBunny extends Component {
  state = {
    rotation: 0,
  };

  componentDidMount() {
    // Note that `app` prop is coming through `withApp` HoC
    this.props.app.ticker.add(this.animate);
  }

  componentWillUnmount() {
    this.props.app.ticker.remove(this.animate);
  }

  animate = delta => {
    this.setState(state => ({
      rotation: state.rotation + 0.1 * delta,
    }));
  };

  render() {
    return (
      <Sprite
        {...this.props}
        texture={PIXI.Texture.from(bunny)}
        rotation={this.state.rotation}
      />
    );
  }
}
RotatingBunny.propTypes = {
  app: PropTypes.object.isRequired,
};

const RotatingBunnyWithApp = withApp(RotatingBunny);

render(
  <Stage options={{ backgroundColor: 0x10bb99, height: 600, width: 800 }}>
    <RotatingBunnyWithApp x={200} y={200} />
  </Stage>,
  document.getElementById("container")
);
```

---

    Using New Context API directly (with React 16.3.0 and newer)

```jsx harmony
import { render } from "react-dom";
import { AppContext, Sprite, Stage } from "react-pixi-fiber";
import bunny from "./bunny.png";

class RotatingBunny extends Component {
  state = {
    rotation: 0,
  };

  componentDidMount() {
    // Note that `app` prop is coming directly from AppContext.Consumer
    this.props.app.ticker.add(this.animate);
  }

  componentWillUnmount() {
    this.props.app.ticker.remove(this.animate);
  }

  animate = delta => {
    this.setState(state => ({
      rotation: state.rotation + 0.1 * delta,
    }));
  };

  render() {
    return (
      <Sprite
        {...this.props}
        texture={PIXI.Texture.from(bunny)}
        rotation={this.state.rotation}
      />
    );
  }
}
RotatingBunny.propTypes = {
  app: PropTypes.object.isRequired,
};

render(
  <Stage options={{ backgroundColor: 0x10bb99, height: 600, width: 800 }}>
    <AppContext.Consumer>
      {app => (
        <RotatingBunny app={app} x={200} y={200} />
      )}
    </AppContext.Consumer>
  </Stage>,
  document.getElementById("container")
);
```

---

    Using Legacy Context API directly (with React older than 16.3.0)

This approach is not recommended as it is easier to just use `withApp` HoC mentioned above.

```jsx harmony
import { render } from "react-dom";
import { Sprite, Stage } from "react-pixi-fiber";
import bunny from "./bunny.png";

class RotatingBunny extends Component {
  state = {
    rotation: 0,
  };

  componentDidMount() {
    // Note that `app` is coming from context, NOT from props
    this.context.app.ticker.add(this.animate);
  }

  componentWillUnmount() {
    this.context.app.ticker.remove(this.animate);
  }

  animate = delta => {
    this.setState(state => ({
      rotation: state.rotation + 0.1 * delta,
    }));
  };

  render() {
    return (
      <Sprite
        {...this.props}
        texture={PIXI.Texture.from(bunny)}
        rotation={this.state.rotation}
      />
    );
  }
}
// Note that here we tell React to apply `app` via legacy Context API
RotatingBunny.childContextTypes = {
  app: PropTypes.object,
};

render(
  <Stage options={{ backgroundColor: 0x10bb99, height: 600, width: 800 }}>
    <RotatingBunny x={200} y={200} />
  </Stage>,
  document.getElementById("container")
);
```

---

### Custom Components

ReactPixiFiber can recognize your custom components using API compatible with `react-pixi`.

`CustomPIXIComponent(behavior, type)` accepts a `behavior` object with the following 4 properties and a `type` string.

#### `customDisplayObject(props)`

Use this to create an instance of [PIXI.DisplayObject].

This is your entry point to custom components and the only required method. Can be also passed as `behavior` of type `function` to `CustomPIXIComponent`.

#### `customApplyProps(displayObject, oldProps, newProps)` (optional)

Use this to apply `newProps` to your `Component` in a custom way.

Note: this replaces the default method of transfering `props` to the specified `displayObject`.

#### Simple Graphics example

For example, this is how you could implement `Rectangle` component:
```javascript
// components/Rectangle.js
import { CustomPIXIComponent } from "react-pixi-fiber";
import * as PIXI from "pixi.js";

const TYPE = "Rectangle";
export const behavior = {
  customDisplayObject: props => new PIXI.Graphics(),
  customApplyProps: function(instance, oldProps, newProps) {
    const { fill, x, y, width, height } = newProps;
    instance.clear();
    instance.beginFill(fill);
    instance.drawRect(x, y, width, height);
    instance.endFill();
  }
};
export default CustomPIXIComponent(behavior, TYPE);
```

```jsx harmony
// App.js
import { render } from "react-pixi-fiber";
import * as PIXI from "pixi.js";
import Rectangle from "./components/Rectangle"

// Setup PixiJS Application
const canvasElement = document.getElementById("container")
const app = new PIXI.Application(800, 600, {
  view: canvasElement
});

render(
  <Rectangle
    x={250}
    y={200}
    width={300}
    height={200}
    fill={0xFFFF00}
  />,
  app.stage
);
```

## Testing

## Caveats

## FAQ

### Is it production ready?

Yes and it's awesome! It is battle tested and backed up by [Kalamba Games](https://kalambagames.com/games/) since the conception in the beginning of 2018 (after [migrating from `react-pixi`](#migrating-from-react-pixi)) and now also used by other game studios.

### What version of PixiJS I can use?

PixiJS v4, v5 and v6 are supported.

### Can I use it in my TypeScript project?

Sure thing! We've got you covered.

### Can I use already existing [`PIXI.Application`]?

Yes, you can pass `app` property to `Stage` component, e.g. `<Stage app={app} />`.

### Can I migrate from `react-pixi`?

Yes, it is easy, read [migration guide](#migrating-from-react-pixi).

### Is server-side rendering supported?

No, unfortunately it is not supported right now.

## Contributing

The main purpose of this repository is to be able to render PixiJS objects inside React 16 Fiber architecture.

Development of React Pixi Fiber happens in the open on GitHub, and I would be grateful to the community for any contributions, including bug reports and suggestions.

Read below to learn how you can take part in improving React Pixi Fiber.

### [Code of Conduct](https://github.com/michalochman/react-pixi-fiber/blob/master/CODE_OF_CONDUCT.md)
React Pixi Fiber has adopted a Contributor Covenant Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://github.com/michalochman/react-pixi-fiber/blob/master/CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.

### [Contributing Guide](https://github.com/michalochman/react-pixi-fiber/blob/master/CONTRIBUTING.md)

Read the contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React Pixi Fiber.

### Contact

You can help others and discuss in our [gitter channel](https://gitter.im/react-pixi-fiber/Lobby).

## License

ReactPixiFiber is [MIT licensed]((https://github.com/michalochman/react-pixi-fiber/blob/master/LICENSE)).

## Credits

### [`react-pixi`]

For making PIXI available in React for the first time.

### [React Fiber Architecture](https://github.com/acdlite/react-fiber-architecture)

For deeply explaining the concepts of Fiber architecture.

### [Building a custom React renderer](https://github.com/nitin42/Making-a-custom-React-renderer)

For helping me understand how to build an actual renderer.

### [React ART](https://github.com/facebook/react/tree/master/packages/react-art)

On which this renderer was initially based.

### [React] Contributors

For making an awesome project structure and documentation that is used in similar fashon here.

[PixiJS]: https://github.com/pixijs/pixi.js
[React]: https://github.com/facebook/react
[Root Container]: http://pixijs.download/release/docs/PIXI.Application.html#stage
[`PIXI.Application`]: http://pixijs.download/release/docs/PIXI.Application.html
[`PIXI.BitmapText`]: http://pixijs.download/release/docs/PIXI.BitmapText.html
[`PIXI.Container`]: http://pixijs.download/release/docs/PIXI.Container.html
[`PIXI.DisplayObject`]: http://pixijs.download/release/docs/PIXI.DisplayObject.html
[`PIXI.extras.BitmapText`]: https://pixijs.download/v4.8.8/docs/PIXI.extras.BitmapText.html
[`PIXI.extras.TilingSprite`]: https://pixijs.download/v4.8.8/docs/PIXI.extras.TilingSprite.html
[`PIXI.Graphics`]: http://pixijs.download/release/docs/PIXI.Graphics.html
[`PIXI.NineSlicePlane`]: http://pixijs.download/release/docs/PIXI.NineSlicePlane.html
[`PIXI.ObservablePoint`]: http://pixijs.download/release/docs/PIXI.ObservablePoint.html
[`PIXI.ParticleContainer`]: http://pixijs.download/release/docs/PIXI.ParticleContainer.html
[`PIXI.particles.ParticleContainer`]: https://pixijs.download/v4.8.8/docs/PIXI.particles.ParticleContainer.html
[`PIXI.Point`]: http://pixijs.download/release/docs/PIXI.Point.html
[`PIXI.Sprite`]: http://pixijs.download/release/docs/PIXI.Sprite.html
[`PIXI.Text`]: http://pixijs.download/release/docs/PIXI.Text.html
[`PIXI.TilingSprite`]: http://pixijs.download/release/docs/PIXI.TilingSprite.html
[`react-pixi`]: https://github.com/Izzimach/react-pixi

repository: michalochman/react-pixi-fiber

gha_language: JavaScript

gha_license_id: MIT

repo_name: michalochman/react-pixi-fiber


text:
# Python SCOTUS Dataset

## Contents

- [Overview](#Overview)
- [Background](#Background)
- [Dependencies](#Dependencies)
- [Usage](#Usage)
- [Example](#Example)
- [License](#License)
- [Links](#Links)

## Overview

The Python SCOTUS Dataset is a repository for retrieving, processing, and maintaining structured data from the Supreme Court of the United States (SCOTUS). The Python functions in the repo can combine trial transcripts from the [SCOTUS website](https://www.supremecourt.gov/oral_arguments/argument_transcript/) with structured case data from the [Supreme Court Database](http://scdb.wustl.edu/) (SCDB) at the Washington University Law School to create comprehensive summaries of the most recent SCOTUS cases. The repo is primarily used for building systems that predict SCOTUS case decisions.

## Background

### SCOTUS decision prediction

Just as DeepMind’s AlphaZero chess AI has improved the game of human experts, so can highly performant algorithms provide insights that help predict SCOTUS behavior. Industry, academia, and the legal profession have long been interested in using such algorithms to improve domain outcomes.

For instance, lawyers can adjust variables and analyze features to determine which issues should be highlighted to win an argument. Models can show whether a single justice (or a constellation of justices) has a strong or atypical voting tendency on important issues such as taxes and civil rights. Would-be SCOTUS appellants can use algorithms to help determine whether a case appeal is practical based on the likelihood of a win. Investors, too, may find SCOTUS prediction useful by betting on companies that are likely to benefit most from a favorable ruling.

SCOTUS typically decides 70 to 90 cases annually, historically reversing approximately two thirds of those cases. While this reversal rate may seem high, it understandably stems from the court’s selection bias in favor of cases the court regards as meriting review. Furthermore, unanimous decisions occur about half the time — far more often than might be suggested by the ideological biases of the justices that critics point out.

Important cognitive biases must therefore be identified to better understand the nuances at play in SCOTUS decision making. Often, achieving optimal performance in machine learning applications requires a high degree of domain knowledge and custom feature engineering. Such complexities challenge both machine and human performance and make the problem of accurate SCOTUS prediction an open research question. Python Scotus Dataset serves as a starting point for addressing that question.

### Structured data from the SCDB

The SCDB, developed by Harold Spaeth, is a widely used database for SCOTUS outcome prediction. The SCDB contains 247 variables for each case. The variables are divided into six categories, given below with examples of SCDB variables in parentheses:

1.	Identification (LEXIS Citation, Docket Number)
2.	Background (Origin of Case, Source of Case, Reason for Granting Cert)
3.	Chronological (Date of Decision, Term of Court, Natural Court)
4.	Substantive (Legal Provisions Considered by the Court, Issue, Decision Direction)
5.	Outcome (Disposition of Case, Winning Party, Formal Alteration of Precedent, Declaration of Unconstitutionality)
6.	Voting & Opinion (Direction of the Individual Justice's Votes, Opinion, Majority and Minority Voting by Justice)

Python SCOTUS Dataset includes a local copy of the SCDB case data for analysis.

### Unstructured SCOTUS transcripts

On its [official website](https://www.supremecourt.gov/oral_arguments/argument_transcript/), SCOTUS publishes full transcripts of oral arguments the day the arguments are heard. As a significant amount of time typically elapses between oral arguments and a SCOTUS ruling, the transcripts provide context for outcome prediction. The transcripts contain exchanges between all relevant parties (including attorneys and justices), are generally around 60 pages, and require significant preprocessing — for example, PDF-to-text conversion and manual featurization. Engineers who find that language use yields clues to the justices’ leanings will want to capture associated features from the transcript corpus.

How a justice questions lawyers can signal what that justice is thinking; swing-vote justices are often a focal point, especially since those justices tend to receive more attention from lawyers. The very act of questioning can also have important implications. [FiveThirtyEight](https://fivethirtyeight.com/features/how-to-read-the-mind-of-a-supreme-court-justice/) author Oliver Roeder observes as follows:

>When a justice asks questions of a lawyer, it’s bad for his chances — it means the justice is skeptical and is trying to poke holes. If justices interrupt a lawyer, it’s really bad for his chances — they’re so skeptical they just can’t wait to poke holes. A Ginsburg interruption is worst of all.

Research further supports a correlation between lawyers’ language use and case outcomes; perceived attributes such as confidence, intelligence, trustworthiness, and aggressiveness that are conveyed through a lawyer’s statements can affect the likelihood that justices will side with the lawyer. Python Scotus Dataset provides a starting point for predicting language use in relation to case outcomes.

## Dependencies

Python SCOTUS Dataset requires the following libraries:

- [`pdfminer`](https://pypi.org/project/pdfminer/)
- [`peewee`](http://docs.peewee-orm.com/en/latest/)
- [`pandas`](https://pandas.pydata.org/)
- [`numpy`](https://numpy.org/)

Install these libraries using `pip` and requirements.txt:

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

## Usage

The Python SCOTUS Dataset `recon` module exports two public functions for compiling data reconciliation.

### Function: compile_data()

The `compile_data()` function does the following:
1. It iterates over the transcript PDFs in the data directory, parses them, and saves the extracted transcript data in the database.
2. It loads and parses the SCDB data saved as a CSV in the data directory, and saves the extracted case data in the database.
3. Maps the transcripts to their associated cases.

Upon completion, the database will contain a full set of case objects with associated SCDB data and transcripts.

### Function: print_coverage_stats()

The `print_coverage_stats()` function prints statistics describing the data compiled in the database.

### Class: Case

The `Case` class contains all case-related data, including a reference to the associated transcript.

### Class: Transcript

The `Transcript` class contains all transcript data.

## Example

### Compiling Structured Data

The code below compiles all case data and then prints statistics describing the data in the database:

```bash
from recon import compile_data, print_coverage_stats

compile_data()
print_coverage_stats()
```

### Using Compiled Data

```bash
from models import Case

for case in Case.select():
  print(case.docket, case.transcript)
```

## License

Python SCOTUS Dataset is licensed under the
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).

## Links

- [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
- [FiveThirtyEight](https://fivethirtyeight.com/features/how-to-read-the-mind-of-a-supreme-court-justice/)
- [NumPy](https://numpy.org/)
- [pandas](https://pandas.pydata.org/)
- [PDFMiner](https://pypi.org/project/pdfminer/)
- [peewee](http://docs.peewee-orm.com/en/latest/)
- [SCOTUS transcripts website](https://www.supremecourt.gov/oral_arguments/argument_transcript/)
- [Supreme Court Database](http://scdb.wustl.edu/)

repository: ashkonf/ScotusDataset

repo_name: ashkonf/ScotusDataset


text:
# predicates-core

> Traits for **boolean-valued predicate functions** in Rust.

[![Build Status](https://dev.azure.com/assert-rs/assert-rs/_apis/build/status/predicates-rs?branchName=master)](https://dev.azure.com/assert-rs/assert-rs/_build/latest?definitionId=1&branchName=master)
[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)](https://docs.rs/predicates-core)
![License](https://img.shields.io/crates/l/predicates-core.svg)
[![Crates.io](https://img.shields.io/crates/v/predicates-core.svg?maxAge=2592000)](https://crates.io/crates/predicates-core)

[Changelog](https://github.com/assert-rs/predicates-rs/blob/master/crates/core/CHANGELOG.md)

## License

`predicates-core` is distributed under the terms of both the MIT license and the
Apache License (Version 2.0).

See LICENSE-APACHE, and LICENSE-MIT for details.

## Credits

Big thanks to [futures-rs](https://github.com/alexcrichton/futures-rs), whose
slick API design informed a lot of decisions made on the API design of this
library.

repository: assert-rs/predicates-rs

gha_language: Rust

repo_name: assert-rs/predicates-rs


text:
## SJ Laravel MVC Blog

This is a blog written in PHP, JS, jQuery, and CSS on the Laravel framework.

##Getting Started
- Clone this repository
- Create a database for this application
- Create a .env.local.php inside of `blog.dev`
- Add the contents of `env-template.php` to `.env.local.php`
- Add your database logins to to the values
- Run `composer install`

## Official Documentation

Documentation for the entire framework can be found on the [Laravel website](http://laravel.com/docs).

### Contributing To Laravel

**All issues and pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.**

### License

The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
# blog.dev


text:
## MapShuffle

This app generates random Google maps. If you use the default settings, your map could be centered anywhere on Earth except for polar regions and ocean areas that aren't claimed by any particular country. (...I suspect you won't miss staring at large stretches of ocean and aren't looking for Santa's workshop or anything. :P)

If you feel like walking off to look for America, you can set the app to only generate maps centered within the continental United States. You can also randomize the zoom level, which might give you a closer look at interesting scenery... or leave you stranded in the middle of uninhabited wilderness!

This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). It was built almost entirely using React, with the help of a few awesome NPM modules (especially [Google-Map-React](https://github.com/istarkov/google-map-react)).

**MIT License
Copyright © 2018 Sam Richards**

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: samrrichards/MapShuffle

repo_name: samrrichards/MapShuffle


text:
# Controlling IR Devices Using ESP8266 and Blynk App in Android

A simple device used to control any IR Device* using ESP8266 and Blynk App from any where in the world.

> Requirement

An IR LED 940nm (i used a 5mm 940nm)

Red LED

Resistors

ESP8266

> Library Used

ESP8266wIfI : https://github.com/esp8266/Arduino

Blynk : https://github.com/blynkkk/blynk-library/releases/tag/v0.6.1

IRremoteESP8266 : https://github.com/crankyoldgit/IRremoteESP8266

Complete code is in the source code/main

First Do a Reciever Dump for the IR codes by the device remote, then enter the IR codes into the irsend.sendNEC(), function.

url: https://raw.githubusercontent.com/anjalp/Microcontrollers-and-Sensors/0c9a1ddda0f3bf99eade7712ab87bac5f822bc50/Minor Projects/Controlling a TV over Internet Using Blynk-Esp8266-IR LED/README.md

repository: anjalp/Microcontrollers-and-Sensors

repo_name: anjalp/Microcontrollers-and-Sensors


text:
# ScalaJack

[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=86400)](https://opensource.org/licenses/MIT)
[![bintray](https://api.bintray.com/packages/blocke/releases/scalajack/images/download.svg)](https://bintray.com/blocke/releases/scalajack/_latestVersion)
[![Build Status](https://img.shields.io/travis/gzoller/ScalaJack.svg?branch=master)](https://travis-ci.org/gzoller/ScalaJack)
[![Codacy branch grade](https://img.shields.io/codacy/grade/9437bb8b88464096b1a848ba0eed8b7d/master.svg?maxAge=2592000)](https://www.codacy.com/app/gzoller/ScalaJack?utm_source=github.com&utm_medium=referral&utm_content=gzoller/ScalaJack&utm_campaign=Badge_Grade)
[![Coveralls branch](https://img.shields.io/coveralls/gzoller/ScalaJack/master.svg?maxAge=360)](https://coveralls.io/github/gzoller/ScalaJack)

ScalaJack is a very fast, seamless serialization engine for JSON, and other protocols, designed to require the minimum amount of help possible when serializing a class.

Advanced Features:
 - Handles tuples
 - 'Any' support
 - Handles default values for case class fields
 - Rich configuration of trait type hint/value
 - Supports value classes
 - Sealed trait-style enumerations
 - Extensible to other encodings (JSON, CSV, MongoDB, and DynamoDB are provided by ScalaJack, but you can roll your own too!)

> **Note:** Scala 2.13.1 + JDK 13.0.1 + sbt 1.3.5+ or later is strongly recommended!
>There has been quite a bit of change lately in Scala and sbt and we've found various combinations of Scala/JDK/sbt do not play well together!
>We can vouch for the combination of Scala 2.13.1 / JDK 13.0.1 / sbt 1.3.5.  Later versions should work as well, but you're on your own with earlier versions.

## Use

ScalaJack is extremely simple to use.

Include the following in your build.sbt:

    resolvers += Resolver.bintrayRepo("blocke","releases")
    libraryDependencies ++= Seq("co.blocke" %% "scalajack" % "6.2.0")

If you want to use the optional MongoDB serialization support include this as well:

    libraryDependencies ++= Seq("co.blocke" %% "scalajack_mongo" % "6.2.0")

DynamoDB helpers are available here:

    libraryDependencies ++= Seq("co.blocke" %% "scalajack_dynamo" % "6.2.0")

ScalaJack is hosted on Bintray/JCenter.  If you're using pre-v0.13.9 of SBT you may need to enable the bintray resolver in your build.sbt with

``` sbt
useJCenter := true
```

Now you're good to go!  Let's use ScalaJack in your project to serialize/de-serialize a case class object into JSON:

```scala
import co.blocke.scalajack._

val sj = ScalaJack()
val js = sj.render( myCaseObj )  // serialization
val myObj = sj.read[MyCaseClass](js) // deserialization
```

Couldn't be simpler!

## Features

* [Case Classes and Traits](doc/classesAndTraits.md)
* [Non-Case Classes and Java Class Support](doc/noncase.md)
* [Re-name Case Class Fields](doc/mapname.md)
* [Any Support](doc/any.md)
* [Value Class Support](doc/valueClass.md)
* [Parameterized Classes](doc/parameterized.md)
* [Trait Type Hint Customization](doc/typeHint.md)
* [Custom Type Adapters (custom read/render)](doc/custom.md)
* [Try and Capture](doc/tryAndCapture.md)
* [ParseOrElse and Cascading Fallback Parsing](doc/parseOrElse.md)
* [Null and None treatment](doc/nullAndNone.md)
* [Externalized Type Hints](doc/externalTypes.md)
* [View/SpliceInto](doc/viewSplice.md)
* [Filter](doc/filter.md)
* [Union type](doc/union.md)
* [Converters *(new)*](doc/map.md)
* [ScalaJack Configuration](doc/config.md)
* [Gimme Speed!](doc/speed.md)

Non-JSON Formats:
* [YAML *(new)*](doc/yaml.md)
* [MongoDB](doc/mongo.md)
* [Delimited (e.g. CSV)](doc/delimited.md)
* [DynamoDB](doc/dynamo.md)
* [Json4s](doc/json4s.md)

## Benchmarks

I need to start this section with an apology.  After having benchmarks deactivated for some time I finally wired them up and discovered that
ScalaJack 6.0 series was significantly slower than the 5.x series.  Definitely not desirable!

ScalaJack 6.1 has undergone a significant streamlining and refactoring with beneficial results. Numbers are below.

*Disclaimer: Benchmarks are very situational.  We didn't hand-pick a senario to favor our product.  It is entirely possible/likely you can find scenarios where your favorite parser beats ScalaJack.*

|Benchmark         |Score      |Error        |Units
|------------------|----------:|------------:|-----|
|**ScalaJack 6.1 (forType[T])** |27729.218  |±  338.995   |ops/s
|Hand-written      |24041.835  |± 1752.455   |ops/s
|**ScalaJack 6.1** |20232.361  |±  736.766   |ops/s
|Circe             |19971.288  |±  986.961   |ops/s
|ScalaJack 5.x     |16349.600  |±  193.090   |ops/s
|ScalaJack 6.0     |11111.795  |±  127.843   |ops/s
|LiftJson          |9313.472   |±  639.219   |ops/s
|Json4s            |3425.144   |±  219.970   |ops/s

The key takeaway here is that for our sample test, ScalaJack was very fast, and most critically, ScalaJack 6.1 is a dramatic improvement over 6.0.

## Series 6

Series 5 introduced a whole new engine for ScalaJack.  For series 6 we went through and streamlined everything internally.  JSON is no longer assumed in the core, allowing for an easier extension to other protocols.  Internally the code is tighter and cleaner, which always makes us feel happy.

A major goal of this release was to clean up the internals to be ready for Dotty/Scala 3.0 when it comes out.

We've got to give our users at least a few new toys, so we've added a filter feature, so you can filter on incoming parsed messages, pulling out those you care about and passively ignoring those you don't.

There have also been improvements to Delimited/CSV handling.  Before, ScalaJack could not handle List in CSV format.  Now it can (for simple Lists), along with Either and Enumeration.

MongoDB support has been strengthened, with some of the limitations of earlier versions removed.  Type hint modifiers (for type members) are now supported.  Support for scalar non-String keys (Int, Boolean, etc) work now too.  Try and SJCapture features are now supported for Mongo as well as JSON.

One feature was removed: non-canonical JSON support.  If you loved this feature, I understand, but its benefits just weren't worth the benefit of continued maintenance.

We hope you'll enjoy using the latest ScalaJack!

*Blöcke*

repository: harana-oss/ScalaJack

repo_name: harana-oss/ScalaJack


text:
# Detection

## Use Cases and Requirements

Detection in Traffic Light Recognition is required for use cases involved with traffic light:

- Passing intersection when traffic signal is green
- Stopping at intersection when traffic signal is red

For the details about related requirements, please refer to the [document for Perception stack](/design/Perception/Perception.md).

## Role

Detection module in Traffic Light Recognition finds traffic lights' region of interest(ROI) in the image. For example, one image could contain many traffic signals at intersection. However, the number of traffic signals, in which an autonomous vehicle is interested, is limited. Map information is used to point the part of an image which needs to be paid attention to.

## Input

| Input       | Data Type                        | Topic                          |
| ----------- | -------------------------------- | ------------------------------ |
| Camera      | `sensor_msgs::Image`             | /sensing/camera/\*/image_raw   |
| Camera info | `sensor_msgs::CameraInfo`        | /sensing/camera/\*/camera_info |
| Map         | `autoware_lanelet2_msgs::MapBin` | /map/vector_map                |
| TF          | `tf2_msgs::TFMessage`            | /tf                            |

## Output

| Output                                | Data Type                                            | Output Module                             | Topic                                      |
| ------------------------------------- | ---------------------------------------------------- | ----------------------------------------- | ------------------------------------------ |
| Cropped traffic light ROI information | `autoware_perception_msgs::TrafficLightRoiArray.msg` | Traffic Light Recognition: Classification | /perception/traffic_light_recognition/rois |

## Design

The Detection module is designed to modularize some patterns of detecting traffic lights' ROI.

![msg](../image/LightDetectionDesign.png)

This is our sample implementation for the Detection module.
![msg](../image/LightDetectionDesign2.png)

Our sample implementation has one advantage over Map-only Detection method, which sometimes suffers from calibration error. In our approach, Map Based Detection passes rough ROIs to Fine Detection so that it would not care minor calibration error. Fine Detection refines the passed rough ROI to accurately cropped traffic signals' ROI.

gha_language: Shell


text:
---
title: 'Including JS In Jekyll Markdown'
subtitle: 'Or is it _including?'
date: 2017-11-22 15:04:23
tags: [jekyll, Frontend, markdown, HTML]
---

I don't know if calling the markdown language for [jekyll][jekyll] 'Jekyll Markdown' is the best nomenclature. I mean, it _is_ to me at its heart really markdown, but then I've got the [liquid][liquid] templating language. :aside: templates within non-templated material. oy.:

So I was thinking about how to include some dynamically-rendered content in one of these pages. But then, yaknow, the whole point of this system is to pre-compile everything. Was trying to think of a way to inject javascript into my jekyll markdown. Then I remembered the **\_includes** folder. So, here's what I came up with

## Method 1: Inline `<script>` Tags

### A Quick & Dirty Not-The-Best-Idea

Since you can use whatever HTML tags you want inline in a Markdown post, if I were to arbitrarily put a `<script>` tag to start code and end it with a `</script>` in the middle of my writing, it _would_ actually take effect. If you don't believe me, <script> console.log('Why Helloooooo... See? I told ya so =\_= :-P')</script> go ahead and take a look at your console, and then the source for this page. (I'll wait)...

While this may be useful, it does seem a little hack-y and it would be tough figuring out where code went awry, so I gotta say, I'd recommend the following idea of using jekyll's 'includes' over inlining your JS.

## Method 2: The \_includes Folder

### (aka "The Clean Way")

Then I remembered the **\_includes** folder. You can bring in anything to the middle of a page by using the liquid\ruby\whatever percentage syntax: `{% raw %}{% include some-other-file.html %}{% endraw %}`. There is some great advanced and _dynamic_ usage of includes over [at idratherbewriting.com][Adv Includes]

Since the `_includes` folder import process is looking for _complete_ .html files, what ya could do is write a super-vanilla HTML markup, and then write whatever code you want inside of a `<script>` tag.
So I'd write the following and save it as `something.html` inside the site's `_includes` directory

```html
<!DOCTYPE html>
<html>
  <head>
    <title></title>
  </head>
  <body>
    <script>
      /*** Put JS Content Here... ***/
    </script>
  </body>
</html>
```

Then, by typing `{% raw %}{% include something.html %}{% endraw %}` the file will be imported\injected into this post and the javascript code should be coming along for the ride...

## Method 3: Outside Forces

Let me add that apparently you can pull in a live file from a github repo by using that file's raw incarnation (available via the [rawgit][rawgit] website). Haven't tried it yet...

---

[Adv Includes]: http://idratherbewriting.com/2016/06/06/extending-markdown-in-jekyll-with-includes/
[jekyll]: http://jekyllrb.com
[liquid]: https://shopify.github.io/liquid/
[rawgit]: https://rawgit.com/


text:
# Lair: Linear Algebra in Rust

Lair implements linear algebra routines in pure Rust. It uses [ndarray] as its
matrix representation.

[ndarray]: https://github.com/bluss/ndarray

[![Coverage Status](https://codecov.io/gh/vinesystems/lair/branch/master/graphs/badge.svg)](https://codecov.io/gh/vinesystems/lair)

## Requirements

* Rust ≥ 1.37

## License

Licensed under [Apache License, Version 2.0][apache-license]
([LICENSE](LICENSE)).

## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the [Apache-2.0
license][apache-license], shall be licensed as above, without any additional
terms or conditions.

[apache-license]: http://www.apache.org/licenses/LICENSE-2.0

repository: minshao/lair

repo_name: minshao/lair


text:
# Hook

A hook is called at a specific location in the code called the interception point identified by a `string`. Plugins registered one or multiple hooks which name must match the interception point. When the interception point is reached, all the hooks registered in the plugins are executed.

## Definition

Hooks are inside a plugins. A plugins can be seen as a group of related hooks. They are defined as object literals. You can register one or multiple hooks at once by providing an array. Defining the hook as a function is also accepted. It is converted to an object with the handler property associated to the function.

The `handler` property is the function where the plugin author can listen, intercept and modify the application code. Promises are supported. Handlers can be synchronous and asynchronous JavaScript functions.

The `after` and `before` properties are used to sort the order in which the hook handlers are called. They must refers to a valid plugins name which must have a hook of the same name registered.

## Handler

When the handler defines 1 argument, it can only access and modify the interception point arguments.

When the handler defines 2 arguments, it get access to the original handler or the handler returned by the previous hook. It can then decide to return it, execute it or even return an alternative handler. It can also prevent other hooks from being executed by returning `null`.

repository: afroz-al/node-plug-and-play

repo_name: afroz-al/node-plug-and-play


text:
# HELM-ZABBIX

![CI](https://github.com/dj-wasabi/helm-zabbix/workflows/CI/badge.svg)
![GitHub Release Date](https://img.shields.io/github/release-date/dj-wasabi/helm-zabbix)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/dj-wasabi/helm-zabbix)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/dj-wasabi/pre-commit-hooks)

Table of content:
<!--TOC-->

- [HELM-ZABBIX](#helm-zabbix)
- [Introduction](#introduction)
  - [Prerequisites](#prerequisites)
  - [Dependencies](#dependencies)
- [Installation](#installation)
  - [server-db-secret](#server-db-secret)
  - [www.example.com](#wwwexamplecom)
  - [proxy-db-secret](#proxy-db-secret)
  - [Install the HELM Chart](#install-the-helm-chart)
- [Configuration](#configuration)
  - [Zabbix overal](#zabbix-overal)
  - [Zabbix Server](#zabbix-server)
  - [Zabbix Web](#zabbix-web)
  - [Zabbix Agent](#zabbix-agent)
    - [`agent.volumes_host`](#agentvolumes_host)
    - [`agent.volumes`](#agentvolumes)
  - [Zabbix Proxy](#zabbix-proxy)
  - [Zabbix JavaGateway](#zabbix-javagateway)
  - [Network Policies](#network-policies)

<!--TOC-->

# Introduction

[WIP] Work in Progress (I've started a puppet module (owned by vox-populi now), have created several Ansible roles (Now part of the collection.zabbix) so why not starting a HELM Chart for Zabbix.)

This HELM Chart will install (all|some) of the Zabbix components onto a Kubernetes environment. This HELM Chart is based on the work Zabbix already did and can be found https://github.com/zabbix/zabbix-docker/blob/5.0/kubernetes.yaml .

## Prerequisites

* Kubernetes 1.10+;
* Helm 3.0;
* The need for deploying Zabbix.

## Dependencies

This HELM Chart will only install the Zabbix specific components and it will not install any database instance. Before deploying this HELM Chart, please make sure you have either `MySQL` or `PgSQL` installed and running.

There is no need for running `MySQL` or `PgSQL` in the same Kubernetes environment that you want to use for running the Zabbix components. This can also be a (Physical) host or some cloud related instance like AWS RDS.

# Installation

Before we can install 1 or more Zabbix components, we need to create some "secrets". We need to create the following:

1. `server-db-secret`
2. `www.example.com`
3. `proxy-db-secret`

Once we have done that, we can install the HELM Chart.

## server-db-secret

This secret `server-db-secret` contains the username/passwords for accessing the database used by the `Zabbix Server`. Please check [dependencies](#dependencies) and make sure you have either a `MySQL` or a `PgSQL` running.

Once you have that running, please create the following secret:
```
kubectl create namespace zabbix
kubectl create secret generic server-db-secret -n zabbix --from-literal=db-zbx-user=zabbix-user --from-literal=db-zbx-pass=zabbix-pass --from-literal=db-root-pass=changeme
```

The following tables provides an overview of the meaning for the values.

Parameter | Description
--------- | -----------
`db-zbx-user`|The username that Zabbix can use to authenticate against a (MySQL or PgSQL) database.
`db-zbx-pass`|The password that Zabbix can use to authenticate against a (MySQL or PgSQL) database.
`db-root-pass`|The (MySQL or PgSQL) password for the `ROOT` or `postgres` user.

## www.example.com

When you set `ingress.enabled` to `true`, you will have access to the Zabbix Web interface via the Ingress Controller. But if you want to use TLS certificates, we need to create a 2nd secret which contains the TLS information.

This secret contains the `key` and `crt` that we need to provide to the Ingress Controller. But first, we need to make sure we have a `crt` and `key` file. The following provides an example command to generate an self signed TLS certificate. Please do not do this in production, use properly signed certificates for this. For demonstration purposes, this would be fine.

```bash
openssl req -x509 \
  -newkey rsa:2048 \
  -keyout www.example.com.key \
  -out www.example.com.crt \
  -days 365 \
  -nodes \
  -subj "/C=NL/ST=Utrecht/L=Utrecht/O=MyAwesomeCompany/CN=www.example.com"
```

The above will create 2 files named `www.example.com.key` and `www.example.com.crt` and will be working for the `www.example.com` domain. Please change this to your FQDN.

Once that is done, we have to create a secret containing these 2 files.

```bash
kubectl create secret tls -n zabbix www.example.com \
  --key="www.example.com.key" \
  --cert="www.example.com.crt"
```

In the above command, we create a secret named `www.example.com` in the `zabbix` namespace. Please change the name and/or files as well to either your FQDN or something that you know that it is related to the earlier mentioned FQDN.

We need to create an `zabbix-override.yaml` file containing the following ingress configuration.
```yaml
---
ingress:
  enabled: true
  hosts:
    - host: www.example.com
      secretName: www.example.com
      paths:
        - "/"
  tls:
    - hosts:
      - www.example.com
      secretName: www.example.com
```

We need to update the `www.example.com` with the actual FQDN or name you have for the secret name that you created in the previous command.

## proxy-db-secret

This secret `server-db-secret` contains the username/passwords for accessing the database used by the `Zabbix Proxy`. If you don't need to deploy the Proxy (Zabbix Proxy is disabled default), you can skip this step. Please check [dependencies](#dependencies) and make sure you have either a `MySQL` or a `PgSQL` running.

Once you have that running, please create the following secret:
```
kubectl create secret generic proxy-db-secret -n zabbix --from-literal=db-zbx-user=zabbix-user --from-literal=db-zbx-pass=zabbix-pass --from-literal=db-root-pass=changeme
```

The following tables provides an overview of the meaning for the values.

Parameter | Description
--------- | -----------
`db-zbx-user`|The username that Zabbix can use to authenticate against a (MySQL or PgSQL) database.
`db-zbx-pass`|The password that Zabbix can use to authenticate against a (MySQL or PgSQL) database.
`db-root-pass`|The (MySQL or PgSQL) password for the `ROOT` or `postgres` user.

## Install the HELM Chart

We are now ready to deploy the HELM Chart. We have to execute the following commands to make it work.

```
git clone https://github.com/dj-wasabi/helm-zabbix.git
helm install -n zabbix zabbix ./helm-zabbix -f zabbix-override.yaml
```

# Configuration

The next few paragraphs provides an overview of all available options you can configure per Zabbix component. First it mentions the properties that are set generally

## Zabbix overal

The following provides an overview of the settings that can be used for all components. When setting these, you won't have to set them specifically for each component.

Parameter | Description | Default
--------- | ----------- | -------
`zabbix.version`|The version to be deployed.| `5.2-latest`
`zabbix.database.type`|The type of database to be used.|`mysql`
`zabbix.database.name`|The name of the database.| `zabbix`
`zabbix.database.host`|The host of the database.| `zabbix`
`zabbix.namespace`|The namespace on which Zabbix is running.| `zabbix`
`zabbix.networkPolicy.enabled`|If the network policies are enabled.| `true`

## Zabbix Server

Parameter | Description | Default
--------- | ----------- | -------
`server.image` |If you want to override the default official Zabbix image. This should also contain the appropriate tag. | `None`
`server.enabled` |If the Zabbix Server needs to be deployed or not. | `true`
`server.version`|The version of the Zabbix Server.| `5.2-latest`
`server.database.type`|The type of database to be used (Is overriding the `zabbix.database.type`).|`mysql`
`server.database.name`|The name of the database (Is overriding the `zabbix.database.name`).| `zabbix`
`server.database.host`|The host of the database (Is overriding the `zabbix.database.host`).| `zabbix`
`server.externalIPs`|A list with IPs of outside Kubernetes to access the server| `[]`
`server.env`|A dict for adding environment variables| `{}`
`server.securityContext.privileged`|If you need to run the agent as a privileged Docker container.|`false`
`server.securityContext.runAsUser` |The UID of the user inside the Docker image.|`1997`
`server.volumes`|Add additional volumes to be mounted.| `[]`
`server.volumeMounts`|Add additional volumes to be mounted.| `[]`

## Zabbix Web

Parameter | Description | Default
--------- | ----------- | -------
`web.image` |If you want to override the default official Zabbix image. This should also contain the appropriate tag. | `None`
`web.webserver`|What kind of webserver do you want to use: `nginx` or `apache`.| `nginx`
`ingress.enabed`|If Ingress needs to be enabled.| `false`
`ingress.annotations`| Add additional annotations to configure the Ingress.| `{}`
`ingress.hosts`|Add FQDN/path configuration to te Ingress.| `{}`

## Zabbix Agent

Parameter | Description | Default
--------- | ----------- | -------
`image.image` |If you want to override the default official Zabbix image. This should also contain the appropriate tag. | `None`
`agent.enabled`|If the Zabbix Agent needs to be deployed or not.|`true`
`agent.version`|The version of the Zabbix Agent.| `5.2-latest`
`agent.server.host`|.The FQDN on which the Zabbix Server is available.|`zabbix-server.zabbix.svc`
`agent.timeout`|The timeout of the Zabbix Agent.|`10`
`agent.startagents`|The amount of agents to start.|`3`
`agent.passiveagent`|If we need to allow passive checks.|`true`
`agent.securityContext.privileged`|If you need to run the agent as a privileged Docker container.|`true`
`agent.securityContext.runAsUser` |The UID of the user inside the Docker image.|`1997`
`agent.volumes_host`|If a preconfigured set of volumes to be mounted (`/`, `/etc`, `/sys`, `/proc`, `/var/run`).|`true`
`agent.volumes`|Add additional volumes to be mounted.| `[]`
`agent.volumeMounts`|Add additional volumes to be mounted.| `[]`

### `agent.volumes_host`

The following directories will be mounted from the host, inside the pod:

Host | Pod |
---- | ----
`/` | `/hostfs`
`/etc` | `/hostfs/etc`
`/sys` | `/hostfs/sys`
`/proc` | `/hostfs/proc`
`/var/run` | `/var/run`

### `agent.volumes`

The following will provide an overview on how to add additional volumes.

## Zabbix Proxy

Parameter | Description | Default
--------- | ----------- | -------
`proxy.enabled`|If the Zabbix Proxy needs to be deployed or not.|`false`
`proxy.database.type`|The type of database to be used (Is overriding the `zabbix.database.type`).| `mysql`
`proxy.database.name`|The name of the database (Is overriding the `zabbix.database.name`).| `zabbix`
`proxy.database.host`|The host of the database (Is overriding the `zabbix.database.host`).| `zabbix`

## Zabbix JavaGateway

Parameter | Description | Default
--------- | ----------- | -------
`javagateway.enabled`|If the Zabbix Java Gateway needs to be deployed or not.|`false`

## Network Policies

When `zabbix.networkPolicy.enabled` is set to `true` (Which is default), 3 networkpolicies are installed:

```sh
$ kubectl -n zabbix get networkpolicies
NAME            POD-SELECTOR        AGE
zabbix-agent    app=zabbix-agent    32m
zabbix-server   app=zabbix-server   32m
zabbix-web      app=zabbix-web      32m
```

The Zabbix Server only allows connections from and to both the Zabbix Web on port 10051 and the Zabbix Agent. The Zabbix Server also allows connections to be made to either port 3306 (MySQL) or 5432 (PostGreSQL), depending on the database type.

The Zabbix Agent only allows connections from and to the Zabbix Server on port 10050. Both the Zabbix Server and Agent will allow DNS request made to `kube-dns`.

repository: xerdink/helm-zabbix

repo_name: xerdink/helm-zabbix


text:
## SMS Sales Example

This is example code for my article on this topic found here: [Customer feedback via SMS using Go and Slack](https://gophp.io/customer-feedback-via-sms-using-go-and-slack/)

An example of a customer feedback bot to rate and get text input regarding past sales via text messaging written in go.

Run like so: `go run main.go [46elks username] [46elks password] [Elks46 phone number] [Slack webhook]`

You can register for a 46elks account on their [website](https://46elks.com).

Read about Slack webhooks and how to get your webhook url in the [Slack Incoming Webhook Documentation](https://api.slack.com/incoming-webhooks)

To send an email just send a post request with a `to` field to `/outgoing`, below is an example in curl

```
curl -X POST \
  http://<your url here>/outgoing \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'to=<your number here>'
```

repository: uberswe/smssalesexample

repo_name: uberswe/smssalesexample


text:
# CryptoInscriber

CryptoInscriber - a live cryptocurrency historical trade data poller. Download live historical trade data from any cryptoexchange, be it for machine learning, trading bots, trading strategies, or perhaps minute-level data is just way too expensive.

Outputs to `out/` by default in CSV format. Title will be `{EXCHANGE}_{MARKET}_{ASCTIME}.csv` with columns `Transaction ID, Timestamp (milli), Price, Amount, Side`

Tested on Debian Stretch, and Raspberry Pi 3 Stretch.

## Installation using Virtualenv

```sh
sudo apt install python3 python3-pip
pip3 install virtualenv
python3 -m virtualenv -p python3 env
source env/bin/activate
pip install -r requirements.txt
./cryptoinscriber
```

## Usage

Poll for trade data from Bitstamp on market BTC/USD

`./cryptoinscriber -e bitstamp -m btc/usd`

Poll for trade data from Bitfinex on market BTC/USD, limit to 20 executions per poll

`./cryptoinscriber -e bitfinex -m btc/usd -c '{"limit_trades": 20}'`

Poll for trade data from Quoinex on market BTC/JPY, iterate twice only, limit to 100 executions per poll

`./cryptoinscriber -e bitfinex -m btc/usd -i 2 -c '{"limit": 100}'`


text:
## Description
When you hear 'give me amazing game quotes', and you may think about D2 look no further, check Stay awhile and listen App ! :) However this app can use every music file you wish to use !

## Technologies
- Java EE
- Spring
- React.js
- Docker for instalation.

## Instalation
1. go to springboot application and run
```
mvn clean install -DskipTests
```
2. go to the main folder with docker compose file and run
```
docker-compose up
```
docker will do the rest :)

## Usage

## Contact info
- Email<EMAIL_ADDRESS>- LinkedIn: www.linkedin.com/in/KamilKuzbinski

repository: Garfeello/Stay-awhile-and-listen

repo_name: Garfeello/Stay-awhile-and-listen


text:
v2.7.0
===
- add npm@7 support

v2.6.2
====
- skip failed request

v2.6.1
====
- update dependencies

v2.6.0
======
- add: use new `-p --exclude-locked` option to exclude all locked packages.
- fix: use `--no-save` when installing packages (> [npm@5.0.0](https://github.com/npm/npm/releases/tag/v5.0.0)), which will disturb npm-up's behaviour.
- update dependencies

v2.5.0
======
- support scoped-packages
- update dependencies

v2.4.0
======
- fix: broken -t param
- ipt: ignore packages with URL version, like `git://`, `file://`.
- update dependencies

v2.3.0
=======
- add: support tag as version
- remove node v0.8.x support

v2.2.4
========
- fix: `-d` invalide

v2.2.3
========
- sort global dependencies

v2.2.2
=======
- upd dep

v2.2.1
=======
- update nofs & semver

v2.2.0
=======
- add: warn when use a mirror.
- upd: nofs

v2.1.1
=======
- fix: `-o`
- better spinner
- update chalk

v2.1.0
=======
- **Notable** important fix: version prefix lost.

v2.0.2
======
- fix -ig bug

v2.0.1
======
- minor fix

v2.0.0
=======
- faster, more stable
- **remove** useless backup function
- **remove** useless slicent option
- use [chalk](https://github.com/chalk/chalk) to replace [colors](https://github.com/Marak/colors.js)
- better tips
- support optionalDependencies
- bug fix and optimization

v1.9.3
=======
- minor fix
- search package as require does

v1.9.2
========
- update semver and nofs

v1.9.1
========
- fix: _.remove

v1.9.0
========
- support `> < >= <=`
- use `kiss-request` to send request.
- use `underscore`, which is as useful as lodash but smaller.
- update dependency.

v1.8.2
======
- update dependency

v1.8.1
======
- fix: bug when latest version is not found

v1.8.0
======
- upd: nofs & which
- add: node v0.8 support
- use [yaku](https://github.com/ysmood/yaku) to replace bluebird

v1.7.0
=======
- upd: dep
- fix: bug for private package
- question: Don't install npm by npm-up. A broken error may occur and I wonder why.

v1.6.4
=======
- upd: dep
- typo
- use strict

v1.6.3
======
- fix: null version

v1.6.2
======
- fix: cache clean issue
- opt: mirror supports https now.

v1.6.1
======
- opt: If a package is not installed, and declared version is *, nothing will happen.
- fix: If mirror is not set, don't overwrite it by `http://registry.npmjs.org/`.

v1.6.0
======
- **change**: cli arg name
    - `--ALL`       --> `--All`
    - `--writeback` --> `--writeback`
    - `-v, --ver`   --> `-V, --version` (provided by commander)
- **Use restful API to check latest version.**
- opt: performance
- No warning when a package is not installed.
- Support mirror registry server

v1.5.5
=======
- fix: [#2](https://github.com/dracupid/npm-up/issues/2), caused by misusing of `_.isEmpty()` when arg is boolean.
- opt: cli symbols in windows

v1.5.4
=======
- fix: `npm-up clean`
- opt: clean cache automatically, rename cache file
- opt: `exclude` and `include` cli arg use space or comma to split
- upd: lodash, nofs

v1.5.3
========
- fix: invalid writeback arg

v1.5.2
=========
- add: -c, --cwd option
- add: --no-warning option

v1.5.1
=======
- fix: error handler

v1.5.0
========
- **Use global npm**

v1.4.7
=========
- fix: error handler.
- minor optimize and fix

v1.4.6
=========
- fix: `npm-up -A` error strategy.

v1.4.5
==========
- fix: exit when permission denied

v1.4.4
=========
- ADD: Detect Permission Denied error when install global packages to avoid incomplete Installations.

v1.4.3
========
- ADD: set npm loglevel by `-L info`.

v1.4.2
=========
- **ADD: Check all projects in sub directories** `npm-up -A`

v1.4.1
===========
- upd: dep

v1.4.0
========
- **BIG CHANGE**: use [semver](https://github.com/npm/node-semver) to parse and compare version.
- ADD: support all kinds of semantic version.
- **COMMAND CHANGE**: `npm-up cache` to `npm-up dump`.
- opt: print
- bug fix
- update npm to v2.6.0

v1.3.2
=========
- minor fix
- upd: dep

v1.3.1
=========
- minor fix
- update nofs

v1.3.0
==========
- opt: update checking interval changed to 12 hours.
- NEW feature: version cache (expires in 10 minutes)
- NEW: cli flag --no-cache
- NEW: cli command: cache & clean
- fix: too long package name may cause padding overflow

v1.2.4
===========
- fix typo

v1.2.3
==========
- update bluebird
- fix update interval

v1.2.2
==========
- update nofs & nokit
- fix a promise return value bug
- overwrite outdated version info

v1.2.1
============
- check latest version of npm-up itself
- fix minor bugs

v1.2.0
=============
- opt: usage of npm config
- use `nokit` to build
- upd: dep
- Modularize and clean code
- More pretty print.

v1.1.3
==============
- Just update dependency

v1.1.2
=============
- fix: add suffix when write back

v1.1.1
===============
- fix: UNMET DEPENDENCY and version error

v1.0.9
===============
- fix: checking global installed packages correctly

v1.0.8
===============
- use nofs directly instead of nokit
- fix: lock-all don't lock

v1.0.7
================
- use `--lock-all` to lock a `*` version
- fix typo

v1.0.5 - v1.0.6
=================
- fix stupid mistakes

v1.0.4
=================
- Fix: When no package is installed, `package.json` is not able to be overwritten when flag `whiteback` is set.

v1.0.3
==================
- Support checking and update global packages.

v1.0.2
===================
- If the version is `*` in `package.json`, it will never be overwritten, even the flag `lock` is set.

v1.0.1
===================
- Add `-v` flag to display the current version.
- Add a newline at the end of `package.json` after writing back.

> I am sorry that the version is bumped from 0.1.0 to 1.0.1 by mistake.

v0.1.0
===================
- npm-up is much more powerful.
- Support command line arguments.

repository: dracupid/npm-up

gha_language: CoffeeScript

repo_name: dracupid/npm-up


text:
# 1.0 - Exercise 1 - Introduction

In these exercises we're going to make an Alarmsystem - the kind with fire and smoke detectors.

## 1.1 - The Alarm System :rotating_light:

Requirements:

- The system should support any number of sensors
- The system should support different types of sensors (fire, smoke, gas, etc)
- The system should poll all sensors to see if any are triggered (an alarm is raised)
- The system should also check for the battery percentage of the sensors (different types of sensors draines faster)

> Important! The goal of these exercises is to work on code with the SOLID principles in mind. Try to evaluate your choices as you go and keep the principles in mind.

## 1.2 - Getting started

> **Before you begin**: Please make sure that you have the following installed:

1. :pencil2: Either `git clone https://github.com/bouvet-bergen/solid.git` or "Download as ZIP"
2. :pencil2: Start IntelliJ and go `File -> Open -> select the POM.xml file in the cloned repository`. Open the bouvet-solid.sln file with your prefered IDE.
3. :pencil2: You should be able to compile the code and run all the existing unit tests.

### 1.2.3 Existing code

**Interfaces**

- `Sensor`. This interface defines methods for all sensors to implement.
	- `IsTriggered()`: returns true/false for whether the sensor is triggered or not. Different sensors has different rules. See exercises.
	- `GetLocation()`: returns a description of the location of the sensor such as "Lobby 1st floor" or "In the auditorium".
	- `GetSensortype()`: returns a textual description of the sensor type such as "Fire sensor" or "Smoke sensor".
	- `GetBatteryPercentage()`: Returns a number between 0-100 where 0 is empty and 100 is fully charged.

**Classes**

- `FireSensor`. This sensor implements the `Sensor` interface but has no logic yet.
- `SmokeSensor`. This sensor implements the `Sensor` interface but has no logic yet.
- `ControlUnit`. This is the starting point for the alarmsystem. It's the main entry point for polling sensors and controlling the system.

### 1.2.4 - Existing unit tests

:book: There are some initial unit tests in place: `FireSensorTest.java` and `SmokeSensorTest.java`. These are just dummy implementations to verify our starting template works out of the box as expected.
When you work on your code you should keep the tests green, and that obviously means you will need to change them as you go along. TL;DR - the tests are just placeholders. Write better ones as you go along and remove the placeholder ones.

## 1.3 - `FireSensor`

:pencil2: Implement the `FireSensor` methods.

:exclamation: Requirements:

- Should raise an alarm every third time it is polled
- Drains 10% battery between each poll

## 1.4. - `SmokeSensor`

:pencil2: Implement the `SmokeSensor` methods.

:exclamation: Requirements:

- Should raise an alarm every second time it is polled
- Drains 20% battery between each poll

### [Go to exercise 2 :arrow_right:](exercise2.md)

repository: KolbeinFoldoy/Solid

repo_name: KolbeinFoldoy/Solid


text:
# Tic-Tac-Toe-Objc
Introduction Project on iPhone App with Single Player Tic-Tac-Toe against Device. Where Device Always wins or ties, but never loses

![](TicTacToe.png)

Features:

1. Support Both iPhone / iPad
2. Allow a Single player (I called him Human) to play Tic-Tac-Toe against the device. Use "I will Start" or "You Start" buttons
3. Human can either chose himself  to start or allow device to take first turn
4. Device will always try to win, But if Human is smart, it tries to Draw/Tie the game
5. If the device takes turn first, then It will always win except if Human takes center spot on his first move.
6. At any time, Human can restart the game by either tapping "I will Start" or "You Start" button placed below the board


text:
# CRUD Pokedex
A Sinatra project developed for [Flatiron School](https://www.flatironschool.com) and their Full-Stack Web Development program. It's a very basic CRUD application that allows you to create user accounts and add Pokemon to a global Pokedex.

## Installation
- clone this repo
- run `bundle`
- run `rake db:migrate`
- run `rake db:seed`
- run `shotgun` and navigate to the location it's listening on in your web browser (ex. <IP_ADDRESS>:9393)

## Contributions
Contributions are welcome!

Feel free to ask for feedback on your ideas before submitting a pull request.

Please search issues and pull requests before adding something new to avoid duplications.

The following types of contributions are welcome:

- Reporting a bug
- Discussing current code
- Submitting a fix
- Proposing new features

## License
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

gha_language: Ruby


text:
# Audio/Video Setup

Regardless of what operating system or device you're using there will likely be some gremlins in the audio setup.  This page exists to help you troubleshoot those items.

NOTICE: The information on this page is primarily focused at folks using __PulseAudio__ as their sound engine.

## Listing Audio Devices by Device ID
Inevitably you are going to need to know your device IDs for your input and output devices.  The good news is that it is relatively simple _once Pulse Audio is installed_.  Here are the commands.
```
## List Microphones/Inputs
pacmd list-sources | grep -e "index:" -e device.string -e "name:"

## List Outputs
pacmd list-sinks | grep -e "index:" -e device.string -e "name:"
```
Once you have what you think to be the correct device IDs you can test it out with one or more of the following commands.
```
## Testing audio output
paplay -d 1 /usr/share/sounds/alsa/Front_Center.wav

## Testing audio input/recording
parecord -d 1 test.wav
```

## Picking a voice for Text-to-Speech
Next we need to configure output to Festival.  Festival will reference a file in the user's home directory just like the .bashrc above.  You can also set this in /etc, but we'll keep it simple with the following:
```
echo "(Parameter.set 'Audio_Required_Format 'aiff)" > ~/.festivalrc
echo "(Parameter.set 'Audio_Command \"paplay $FILE --client-name=Festival --stream-name=Speech -d 1\")" >> ~/.festivalrc
echo "(Parameter.set 'Audio_Method 'Audio_Command)" >> ~/.festivalrc
echo "(set! voice_default 'voice_cmu_us_slt_arctic_hts)" >> ~/.festivalrc
```
BE ADVISED that you must know the device index to use the above.  Change the "-d 1" to the index number of the device you're using for output from pulse audio.  You can omit this setting if you set the default devices inside the control panels, but if you are using multiple devices that can be a little cumbersome so I've opted to use the device IDs to be sure I'm pointing to the desired output/input device.

You can convert any text you want into voice using festival's --tts switch.  It works as follows:
```
echo "Testing speech" | festival --tts
```

## Install/Compile a Console-Based Visualizer (optional)
You can install a visualizer program called "vis" if you want a dynamic visual to go along with your text-to-speech output as a console-based visualization.  It's a pretty simple compile.  The project is hosted on Github as [dpayne/cli-visualizer](https://github.com/dpayne/cli-visualizer)

### Required Libraries
```
sudo apt-get install libfftw3-dev libncursesw5-dev cmake libpulse-dev xterm
```

### Compile/Install the Visualizer
```
cd /tmp
wget https://github.com/dpayne/cli-visualizer/archive/master.zip
unzip master.zip
cd cli-visualizer-master

export ENABLE_PULSE=1
./install.sh
```

You may need to set it to the specific audio device.  You can add the device's ID in the "~/.config/vis/config" file.  (Make sure to use the correct ID.  Here I'm referencing ID by the index 1.)
```
echo "audio.pulse.source=1" >> ~/.config/vis/config
```

repository: dirmich/karen

repo_name: dirmich/karen