text:
# Model Predictive Control Project

[![Udacity - Self-Driving Car NanoDegree](https://s3.amazonaws.com/udacity-sdc/github/shield-carnd.svg)](http://www.udacity.com/drive)

Model Predictive Control Project in Udacity's Self-Driving Car Nanodegree. The original project template can be found [here](https://github.com/udacity/CarND-MPC-Project).

## Dependencies

The C++ code depends on the following libraries:

* uWebSockets
* Ipopt
* CppAD
* Eigen [bundled in the project]
* Matplotlibcpp [bundled in the project]

This project involves the Term 2 Simulator which can be downloaded [here](https://github.com/udacity/self-driving-car-sim/releases).

## The model

The model used in this project constitutes a kinematic model of a vehicle. It operates on three classes of variables:

* state: `x, y, psi, v`
* controls: `delta, a`
* errors: `cte, epsi`

The model updates the state and errors based on the values on controls, the time increment `dt`, and constant `Lf` (specific to the vehicle in the simulator).

```
(1) x_next = x + v * cos(psi) * dt
(2) y_next = y + v * sin(psi) * dt
(3) psi_next = psi + (v / Lf) * delta * dt
(4) v_next = v + a * dt
(5) cte_next = [f(x) - y] + v * sin(epsi) * dt
(6) epsi_next = [psi - psides] + (v / Lf) * delta * dt
```

`f(x)` constitutes a polynomial estimated from waypoints. In this project, the 3rd degree polynomial is considered:

```
f(x) = a3 * x**3 + a2 * x**2 + a1 * x + a0
```

On each telemetry message from the simulator, the state of the vehicle is read (`x, y, psi, v`). Given (`x, y`) and a list of waypoints, the errors are measured with respect to a line formed by the first two waypoints (see function `errorsFromLine` in `geometry.cpp`).

After receiving the original state of the vehicle, its position and orientation after 100 ms is predicted using equations (1)-(4) of the kinematic model (to account for latency). These position and orientation (`x, y, psi`) are used to define the vehicle's coordinate frame, with respect to which all waypoints are transformed (see functions `createPose` and `invertPose` in `geometry.cpp`).

## Tuning the controller

The MPC controller (`MPCController`) is configured with `MPCConfig` structure. It is instantiated with three required parameters:

* `N` - number of iterations
* `dt` - time increment
*  `vref` - reference velocity

Additional fields of `MPCConfig` can be set:

* `change_a_penalty_`
* `change_delta_penalty_`

They are used in the optimization routine in `MPC.cpp` to penalize the change of throttle and steering respectively:

```cpp
fg[0] += conf_.change_delta_penalty_ *
         CppAD::pow(vars[conf_.delta_start_ + t + 1] - vars[conf_.delta_start_ + t], 2);
fg[0] += conf_.change_a_penalty_ *
         CppAD::pow(vars[conf_.a_start_ + t + 1] - vars[conf_.a_start_ + t], 2);
```

These parameters are set to the following values: `change_delta_penalty_=100, change_a_penalty_=500`.

The controller exerts the best behavior with the following required parameters: `(N=50, dt=0.2, vref=5.)`. Other workable,  albeit less stable, configuration is `(N=30, dt=0.1, vref=10.)`.

It is observed that for larger `vref`, it is important that the total prediction time (product `N * dt`)  is not too big. In addition, `dt`  should not be too small. Setting the penalizing factors stablizes the driving behavior.

repository: semeniuta/CarND-MPC

repo_name: semeniuta/CarND-MPC


text:
# Description

**_Note: Please delete placeholder texts that are not relevant. Including this_**

Tips:

- _What is the summary of the change and which issue is fixed?_
- _What is the relevant motivation and context?_
- _Is there any dependencies that are required for this change?_

**Fixes # (issue)**

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update

# How Has This Been Tested?

Tips:

- _Please describe the tests that you ran to verify your changes._
- _How can we reproduce the issue?_
- _What are the relevant details for your test configuration:?_

**Test/Development Configuration**:

- OS:
- Browser:
- Python version:

license: MIT

repository: shxrainz/six-percent

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: shxrainz/six-percent


text:
# react-a11y-sidebar-demo

![Demo GIF](https://i.imgur.com/AHSueWA.gif)

Study to implement a sidebar with good accessibility, for keyboard and screen reader users

## Install

    yarn

## Run

    yarn start

gha_language: JavaScript

gha_license_id: MIT


text:
## Drive Link
[download](https://drive.google.com/open?id=1sPzHTgGcKwDkGLlJp48TIfhHjn6sbUnb)

## Data Statistics

training	: 145
validation 	: 77
test		: 50
num of unique rows 	: 4
moving bag		: each dataset is sampled from  different rows
stationary bags		:each dataset comprised of one bag


text:
# Release Notes 0.7.1

## New Features

- Added structs for next generation of Shipyard [#2016](https://github.com/keptn/keptn/issues/2016)
- Added page size parameter to EventFilter
- Added structs for next generation of Keptn CloudEvents [#2107](https://github.com/keptn/keptn/issues/2107)
- Added sh.keptn.internal.event.service.delete event [#2199](https://github.com/keptn/keptn/issues/2199)
- Added helper function to delete service [#2199](https://github.com/keptn/keptn/issues/2199)
- Added helper functions to send .started and .finished events

## Fixed Issues

- Set error code to 404 if no event could be found [#1655](https://github.com/keptn/keptn/issues/1655)

## Known Limitations

repository: jsoref/keptn-go-utils

repo_name: jsoref/keptn-go-utils


text:
# API References
-----

```python
class paddleseg.models.OCRNet(
    num_classes,
    backbone,
    backbone_indices=None,
    ocr_mid_channels=512,
    ocr_key_channels=256,
    pretrained=None
)
```

The OCRNet implementation based on PaddlePaddle. The original article refers to [Yuan, Yuhui, et al. "Object-Contextual Representations for Semantic Segmentation"](https://arxiv.org/pdf/1909.11065.pdf)

> **Parameters**
>
> *num_classes(int)*: the unique number of target classes.
>
> *backbone(Paddle.nn.Layer)*: backbone network.
>
> *backbone_indices(tuple)*: two values in the tuple indicate the indices of output of backbone. the first index will be taken as a deep-supervision feature in auxiliary layer; the second one will be taken as input of pixel representation.
>
> *ocr_mid_channels(int)*: the number of middle channels in OCRHead.
>
> *ocr_key_channels(int)*: the number of key channels in ObjectAttentionBlock.
>
> *pretrained(str)*: the path or url of pretrained model. Default to None.

-----

```python
class paddleseg.models.BiSeNetv2(
    num_classes,
    backbone,
    backbone_indices=None,
    ocr_mid_channels=512,
    ocr_key_channels=256,
    pretrained=None
)
```

The BiSeNet V2 implementation based on PaddlePaddle. The original article refers to [Yu, Changqian, et al. "BiSeNet V2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation"](https://arxiv.org/abs/2004.02147)

> **Parameters**
>
> *num_classes(int)*: the unique number of target classes.
>
> *lambd(float)*: factor for controlling the size of semantic branch channels. Default to 0.25.
>
> *pretrained(str)*: the path or url of pretrained model. Default to None.

branch_name: refs/heads/develop

gha_language: Python


text:
# Puppet master & agent setup

## Pre-requirements check
1. Check that two nodes can ping each other
2. Check that both nodes have the same time (ntp)
3. Ideally, we should have the OS supported by puppet
4. All commands shown here are executed from root user env

## Installing packages
1. We have debian stretch (9), so we need this (on both nodes!):
```
wget https://apt.puppetlabs.com/puppet-release-stretch.deb
wget https://apt.puppet.com/puppet-tools-release-stretch.deb # This one is needed only on master server
dpkg -i ./pupp*deb
apt update
```
2. On master, run:
```
apt-get install -y puppetserver pdk
```
3. On nodes (agents), run:
```
apt-get install -y puppet-agent
```

## Post install (configuration) task
1. Add each other (master and nodes) to everyone's /etc/hosts config file:
```
ip_addr_of_master master puppet
ip_addr_of_node btcnode01
```
You can also re-check everything works by pinging master or btcnode01 etc.

2. On master, add this lines to config /etc/puppetlabs/puppet/puppet.conf :
```
dns_alt_names = puppet-master,master,puppet
[main]
certname = master
server = master
environment = production
runinterval = 15m
```
3. On master, generate certificates, start and enable it:
```
/opt/puppetlabs/bin/puppetserver ca setup
systemctl start puppetserver
systemctl enable puppetserver
```
4. On agent, add this lines to config /etc/puppetlabs/puppet/puppet.conf :
```
[main]
certname = btcnode01
server = master
environment = production
runinterval = 15m
```
5. On agent, send certificate to master:
```
/opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true
```
6. On master, check & sign the certificate:
```
/opt/puppetlabs/bin/puppetserver ca list
/opt/puppetlabs/bin/puppetserver ca sign --all
```
7. Finally, on agent, check that everything is okay:
```
/opt/puppetlabs/bin/puppet agent --test
```
This show show something like:
```
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Caching catalog for btcnode01
Info: Applying configuration version '1576397498'
Notice: Applied catalog in 0.02 seconds
```
Here we know it's working.

Configuration completed, now let's go to module setup.

# Module setup
1. On the master server, install sxiii-bitcoind module from puppet forge:
```
puppet module install sxiii-bitcoind
```
2. On the master server, add the module so it will be used by agents.
This can be achieved in different ways. For example, edit this file:
`/etc/puppetlabs/code/environments/production/manifests/site.pp`
and add the following code:
```
 node default {
 include bitcoind
 class { 'bitcoind::source': }
 }
```
3. Module bitcoind will be used now. If you're too lazy to wait, sync
the agent right away by running (on the agent):
```
/opt/puppetlabs/bin/puppet agent -t
```
Now you have to wait as agent downloads and compiles the bitcoin source code.
Depending on your agent hardware, it might take quite long (e.g. 30 minutes or even more).

After building, daemon will automatically start.
Wait 10~20 minutes and check if blockchain folder grows with:
`du -lh /opt/data/crypto/btc/data`.

# Path notes
* compile path is /opt/data/bitcoin-src
* data-path is /opt/data/crypto/btc/data
* bitcoin daemon & config files are located at /opt/data/crypto/btc/data/bin/

repository: MCM-Mike/bitcoind-custom-puppet

repo_name: MCM-Mike/bitcoind-custom-puppet


text:
# OkDesk PHP API v1

[![Build Status](https://travis-ci.org/theskillz/okdesk-api.svg?branch=master)](https://travis-ci.org/theskillz/okdesk-api)
[![Packagist](https://img.shields.io/packagist/v/theskillz/okdesk-api.svg)](https://packagist.org/packages/theskillz/okdesk-api)

This is an php client for the [OkDesk](http://okdesk.ru) API v1.
## Quick Start
```php
require __DIR__ . '/vendor/autoload.php';
use \OkDesk\Api;

$api = new Api("your_okdesk_domain", "your_okdesk_token");

$issue = $api->issues->view(123);
$companiesList = $api->companies->all(['search_string' => 'ACME Ltd']);

```
## Installation

To integrate this library into your application, use [Composer](https://getcomposer.org).
 can be installed using [Composer](https://getcomposer.org) by running the following command:

```bash
php composer.phar require theskillz/okdesk-api
```

repository: alexsholk/okdesk-api

repo_name: alexsholk/okdesk-api


text:
# Github Collaborator Adder
This tools allows you to keep a repository private and invite collaborators to join it.
It can be usefull when trying to add a lot of people from a closed group to a private repository.

This tool is build using koa.

## Preparation
Create a `.env` file in the root folder with the following content:
```
USER=MyUser
REPO=MyRepository
TOKEN=MyPersonnalAccessToken
```

To generate a token, go to `Settings`->`Developer Settings`->`Personnal access tokens`

Direct link: [https://github.com/settings/tokens](https://github.com/settings/tokens)

## Usage
- Standalone: `npm install & npm start`
- Docker: `sudo docker build . & sudo docker run -p 80:8080 -d github`

repository: Sytten/GithubCollaboratorAdder

repo_name: Sytten/GithubCollaboratorAdder


text:
# Organizations, Groups, and Teams

::: warning Note
This section is not applicable to Credential Engine instances of CAT.
:::

In CaSS Authoring Tools, user groups provide the capability to assign multiple users the ability to share permissions across an organization or team. Members of a group are granted access to any CaSS framework or competency that the group has been explicitly assigned. [Please refer to the user and groups section](~@img/users-and-groups/).

repository: cassproject/cass-editor

gha_language: Vue

repo_name: cassproject/cass-editor


text:
# blakes7-rpg
A setup for rendering blakes 7 rpg game sheets

# Based on data and specs from https://rpggeek.com/rpgitem/51958/blakes-7-role-playing-game
by Kin Ming Looi and Zoe Taylor.

# Characters

* Orac is special character.

* For Shya, recommend using this photo (modified to 460x171, with white on left and right).  http://conceptartworld.com/wp-content/uploads/2015/03/Magdalena_Radziej_Concept_Art_Illustration_hacker-girl-01-001-680x1227.jpg

* For Vest, recommend using this photo:
https://www.deviantart.com/taniadragon/art/Presenting-Mr-DAVID-BOWIE-8672926

* For Elise, used this photo:
https://www.deviantart.com/comicreadinggamer/art/Rebels-of-Youth-Elise-728393143

* For Ruriktron, this photo:
https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/KC85-1_Arbeitsplatz_1.jpg/1024px-KC85-1_Arbeitsplatz_1.jpg

branch_name: refs/heads/main


text:
3.51 - John Henry Thompson - Invent Your Future

[Yoga](../../../yoga.md) > [Patanjali's Yoga Sutras - A Comparison](../../patanjani.md) > [Book 3](../book-3.md) >

### 3.51

**स्थान्युपनिमन्त्रणे सङ्गस्मयाकरणं पुनरनिष्टप्रसङ्गात् ॥५१॥**
sthany upa nimantrane sanga smaya akaranam punar anishta prasangat ||51||

[\[RS\] 3.51 When the celestial beings beckon, the yogi should avoid forming any attachment to this complacency, since this contact can reinstate undesirable attachment.](http://www.ashtangayoga.info/source-texts/yoga-sutra-patanjali/chapter-3/item/sthany-nimantrane-sanga-smaya-akaranam-punar/)

[\[JW\] 3.51 In case of invitations from those-in-high-places, these should arouse no attachment or pride, for undesired consequences recur.](http://books.google.com/books?id=YzFImjtOxUwC&pg=PA285&ci=85%2C467%2C752%2C79&source=bookclip)

[\[SS\]](http://www.amazon.com/Yoga-Sutras-Patanjali-Commentary-Satchidananda/dp/0932040381) 3.52 The Yogi should neither accept nor smile with pride at the admiration of even the celestial beings, as there is the possibility of his getting caught again in the undesirable. \[p201\]

[\[EB\]](http://www.amazon.com/Yoga-Sutras-Patanjali-Translation-Commentary/dp/0865477361/ref=sr_1_1?ie=UTF8&s=books&qid=1250508322&sr=1-1) 3.51 If solicited by celestial beings, \[the yogi\] should not become smug, because the tendency toward undesirable consequences can once again manifest. \[p394\]

[<Page 3.50](350.md)  [Page 3.52>](351/352.md)

sthāni = celestial beings

upanimantraṇe = invitation; on being invited by

saṅga = acceptance; attachment

smaya = pride; enjoyment

akaraṇaṁ = he should avoid; to refuse

punaḥ = again

aniṣṭa = undesirable

prasaṇgāt = as a result of the contact

Subpages (1): [3.52](351/352.md)

gha_language: HTML


text:
# PhuPhighter

PhuPhighter is a firefighting robot that navigates a maze, locates a candle, and extinguishes it.

It was built with PlatformIO, a professional IDE for IoT development and an Arduino Mega 2560.

PhuPighter won first place at Sheprobo 2019.

## Check out the video

[![Watch the video](https://img.youtube.com/vi/cffJLw-3VGg/0.jpg)](https://www.youtube.com/watch?v=cffJLw-3VGg)

repository: druvv/PhuPhighter

repo_name: druvv/PhuPhighter


text:
(intro-to-event-loop)=

# An introduction to the event loop in napari

## Brief summary

It is not necessary to have a deep understanding of Qt or event loops to use
napari. napari attempts to use "sane defaults" for most scenarios. Here are the
most important details:

### In IPython or Jupyter Notebook

napari will detect if you are running an IPython or Jupyter shell, and will
automatically use the [IPython GUI event
loop](https://ipython.readthedocs.io/en/stable/config/eventloops.html#integrating-with-gui-event-loops).
As of [version 0.4.7](https://github.com/napari/napari/releases/tag/v0.4.7), it is
no longer necessary to call `%gui qt` manually.  Just create a viewer:

```python
In [1]: import napari

In [2]: viewer = napari.Viewer()  # Viewer will show in a new window

In [3]: ... # Continue interactive usage
```

````{tip}
If you would prefer that napari did *not* start the interactive
event loop for you in IPython, then you can disable it with:

```python
from napari.settings import get_settings

get_settings().application.ipy_interactive = False
```

... but then you will have to start the program yourself as described [below](#in-a-script).
````

### In a script

Outside of IPython, you must tell napari when to "start the program" using
{func}`napari.run`.  This will *block* execution of your script at that point,
show the viewer, and wait for any user interaction.  When the last viewer
closes, execution of the script will proceed.

```python
import napari

viewer = napari.Viewer()
...  # Continue setting  up your program

# Start the program, show the viewer, wait for GUI interaction.
napari.run()

# Anything below here will execute only after the viewer is closed.
```

-----------

## More in depth...

Like most applications with a graphical user interface (GUI), napari operates
within an **event loop** that waits for – and responds to – events triggered by
the user's interactions with the interface.  These events might be something like a
mouse click, or a keypress, and usually correspond to some specific action taken
by the user (e.g. "user moved the gamma slider").

At its core, an event loop is rather simple.  It amounts to something that looks
like this (in pseudo-code):

```python
event_queue = Queue()

while True:  # infinite loop!
    if not event_queue.is_empty():
        event = get_next_event()
        if event.value == 'Quit':
            break
        else:
            process_event(event)
```

Actions taken by the user add events to the queue (e.g. "button pressed",
"slider moved", etc...), and the event loop handles them one at a time.

## Qt applications and event loops

Currently, napari uses Qt as its GUI backend, and the main loop handling events
in napari is the [Qt
EventLoop](https://wiki.qt.io/Threads_Events_QObjects#Events_and_the_event_loop).

A deep dive into the Qt event loop is beyond the scope of this document, but
it's worth being aware of two critical steps in the "lifetime" of a Qt
Application:

1) Any program that would like to create a
   [`QWidget`](https://doc.qt.io/qt-5/qwidget.html) (the class from which all
   napari's graphical elements are subclassed), must create a
   [`QApplication`](https://doc.qt.io/qt-5/qapplication.html) instance *before*
   instantiating any widgets.

   ```python
   from qtpy.QtWidgets import QApplication

   app = QApplication([])  # where [] is a list of args passed to the App
   ```

2) In order to actually show and interact with widgets, one must start the
   application's event loop:

   ```python
   app.exec_()
   ```

### napari's `QApplication`

In napari, the initial step of creating the `QApplication` is handled by
{func}`napari.qt.get_app`.  (Note however, that napari will do this for you
automatically behind the scenes when you create a viewer with
{class}`napari.Viewer()`)

The second step – starting the Qt event loop – is handled by {func}`napari.run`

```python
import napari

viewer = napari.Viewer()  # This will create a Application if one doesn't exist

napari.run()  # This will call `app.exec_()` and start the event loop.
```

(gui-qt-deprecated)=

:::{admonition}  What about `napari.gui_qt`?
:class: caution

**{func}`napari.gui_qt` was deprecated in version 0.4.8.**

The autocreation of the `QApplication` instance and the {func}`napari.run`
function was introduced in
[PR#2056](https://github.com/napari/napari/pull/2056), and released in [version
0.4.3](https://github.com/napari/napari/releases/tag/v0.4.3).  Prior to that,
all napari examples included this `gui_qt()` context manager:

```python
# deprecated
with napari.gui_qt():
    viewer = napari.Viewer()
```

On entering the context, `gui_qt` would create a `QApplication`, and on exiting
the context, it would start the event loop (the two critical steps [mentioned
above](#qt-applications-and-event-loops)).

Unlike a typical context manager, however, it did not actually *destroy* the
`QApplication` (since it may still be needed in the same session)... and future
calls to `gui_qt` were only needed to start the event loop.  By auto-creating
the `QApplication` during {class}`~napari.Viewer` creation, introducing the
explicit {func}`napari.run` function, and using the [integrated IPython event
loop](#in-ipython-or-jupyter-notebook) when applicable, we hope to simplify the
usage of napari.

:::

Now that you have an understanding of how napari creates the event loop, you may
wish to learn more about {ref}`hooking up your own actions <connecting-events>` and callbacks to specific events.

repository: napari/docs

gha_language: Makefile

repo_name: napari/docs


text:
# bucket-queue
A queue with leaky bucket logic made for promises

[![Build Status](https://travis-ci.org/willhoag/bucket-queue.svg?branch=master)](https://travis-ci.org/willhoag/bucket-queue)
[![npm version](https://badge.fury.io/js/bucket-queue.svg)](http://badge.fury.io/js/bucket-queue)

If you use any of my packages, please star them on github. It’s a great way of getting feedback and gives me the kick to put more time into their development. If you encounter any bugs or have feature requests, just open an issue report on Github.

Follow me on Twitter [@devhoag](http://twitter.com/devhoag)

## Description
A simple queue for built for promises and throttling calls. It's great for
making multiple requests to an external api that likely has some kind of rate
limiting like Shopify or Github. This is designed to fit a leaky bucket strategy
of rate limiting, but can fit many different throttling scenarios. Either way,
it's made to be simple and easy to use.

## Example
```js
import BucketQueue from 'bucket-queue'

// initialize
q = BucketQueue({
  calls: 6,
  perInterval: 60 * 1000,
  maxConcurrent: 4,
  tickFrequency: 100
}).start()

// execute a bunch of promises
userIds.length // 40
const users = userIds.map((id) => {
  return q.add(fetch, `/user/${id}`)
    .then((res) => res.json())
    .then((user) => console.log(user.name))
})

// check state
q.getState()
// {
//   concurrent: 6,
//   bucketCount: 6,
//   queueCount: 34,
//   waiting: true
// }

// or just one
q.getState('waiting')
// true

// stop running
q.stop()
```

## Usage
### instantiate queue
```js
const q = BucketQueue(options)
```

### options
- `calls:int (default: 100)` - Max number of calls per interval
- `perInterval:int (default: 60 * 1000)` - Time window (in ms) for max calls to be made
- `maxConcurrent:int (default: Infinity)` - Max number of concurrent promises to be running at one time
- `tickFrequency:int (default: 10)` - How often (in ms) to update state

### using instance
- `q.add(fn -> promise, [args]) -> Promise` - Takes a function that returns a promise and an option set of args to call it with
- `q.getState([key: String]) -> Object / [String/int]` - Returns a object with current state. An optional key will return that particular state
- `q.start() -> q` - Starts the queue running at the specified tickFrequency or the default
- `q.stop() -> q` - Stops the queue running

### the state object from `q.getState()`
- `concurrent` - How many promises are running at the current moment
- `bucketCount` - How many promises have started within the current window
- `queueCount` - How many promises are left on the queue
- `waiting` - whether or now the queue is waiting for the bucket to drain

## Installation
Download node at [nodejs.org](http://nodejs.org) and install it, if you haven't already.

```bash
npm install bucket-queue --save
```

## License
ISC

license: ISC

repository: willhoag/bucket-queue

repo_name: willhoag/bucket-queue


text:
# ios-pod-template
This is a iOS template repo with the basic setup to build an iOS pod. It builds the entire pod structure, including tests and an Example app. It's already integreated with Travis :)

## Setup the initial repo

### Branch setup
- Our main branch is blocked, no one has permision to push directly, you must do a pull request

### Initialize the Pod
For initializing the pod first we need to setup the right version of CocoaPods. In order to avoid versions conflicts, we use bundler to unify our version.
```
$ bundle install
```

Now we are ready to setup the pod structure:
1. If you used this repo as template
```
$ ruby configure [POD_NAME]
```

2. If you just used a normal repo
```
$ bundle exec pod lib create [POD_NAME] --template-url=git@github.com:cobixs/pod-template
```

repository: tinchovictory/pod-template

gha_language: Ruby

gha_license_id: NOASSERTION

repo_name: tinchovictory/pod-template


text:
# Attrandom

An easy line-by-line text picker.

## Usage

1. Go to [Attrandom](https://keyfox.github.io/attrandom/).
1. Drop text file(s) which you'd like to pick a line from onto the app.
   - NOTE: Processing a larger file takes longer time.
   - The file encoding must be UTF-8.
1. A line will be picked for each file and the content of them will be shown.
1. You can pick a line again by clicking the text as 🎲 indicates.

## Is it a typo for "Atrandom?"

**Nope.**
This app is originally supposed to be used for picking an _attribute_.

## License

MIT

repository: keyfox/attrandom

repo_name: keyfox/attrandom


text:
# DwpEncodedLogger
[![Build Status](https://travis-ci.org/dwp/encoded-logger-output.svg?branch=master)](https://travis-ci.org/dwp/encoded-logger-output) [![Known Vulnerabilities](https://snyk.io/test/github/dwp/encoded-logger-output/badge.svg)](https://snyk.io/test/github/dwp/encoded-logger-output)

This is a simple project that provides DWPs Health PDU standard Java Logger
implementations for standard Java Logging Libraries

This project was originally created to mitigate the **Heap_Inspection** vulnerability :-

_`The application writes audit logs upon security-sensitive actions. Since the audit log includes user input that is neither checked for data type validity nor subsequently sanitized, the input could contain false information made to look like legitimate audit log data`_

### [Breaking Change with Java17](https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0)
A breaking change is introduced with version 3.0.0 which is Java 17 upgrade.

Jakarta EE 9 a new top-level jakarta package, replacing EE 8’s javax top-level package. For example, the Servlet specification in Jakarta EE 8 uses a javax.servlet package but this has changed to jakarta.servlet in EE 9.

Generally speaking, it’s not possible to mix Java EE and Jakarta EE APIs in the same project. You need to ensure that your own code, as well as all third-party libraries are using jakarta.* package imports.

## Implementations
There are implementations for `LogBack` and `Log4j2`

The library assumes that the desired logging implementation  is provided on the
class path.  The default log level is **_INFO_**.

#### Project inclusion

properties entry in pom

    <properties>
        <dwp.encoded_logger>x.x</dwp.encoded_logger>
    </properties>

dependency reference

    <dependency>
        <groupId>uk.gov.dwp.logging</groupId>
        <artifactId>encoded-logger-output</artifactId>
        <version>${dwp.encoded_logger}</version>
    </dependency>

and include the relevant logging system `Logback` or `Log4j2`

## Configuration
### Logback
The default configuration provided by this package assumes that there is an
`application.yml` file in the root of the classpath that contains -- at least --
`app_name` and `app_version` attributes that are set to the specific values.

### Log4j2
The default configuration provided by this package assumes that there are two
system properties `app_name` and `app_version` set the relevant values. How these
are set is up the specific application.

** WINDOWS USERS **

This test suite uses a file to match the logging output against the expected values.  The default file encoding for windows command-line is not *UTF8* and (as such) will cause characters like the pound sign to be interpreted differently to that of the logger's character set.  In order to enforce *UTF8* encoding please set the following environment variable

    JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8

repository: dwp/encoded-logger-output

gha_language: Java

repo_name: dwp/encoded-logger-output


text:
# rng-reference
Reference implementations of various RNG engines.

## Available Implementations

* Tiny Mersenne Twister (TinyMT). Pseudo random number generators whose periods are 2^127-1
    * Added from https://github.com/MersenneTwister-Lab/TinyMT/tree/master/tinymt
* Mersenne Twister 19937 64-bit
    * Added from http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt64.html
* SplitMix64
    * Added from http://xorshift.di.unimi.it/splitmix64.c
* Xorshift128+
    * Added from http://xorshift.di.unimi.it/xorshift128plus.c
* xorshift1024*
    * Added from http://xorshift.di.unimi.it/xorshift1024star.c

repository: shivakar/rng-reference

repo_name: shivakar/rng-reference


text:
# Newtype

TODO: we've already used newtype twice by now (fixed point values and volatile
addresses), so we need to adjust how we start this section.

There's a great Zero Cost abstraction that we'll be using a lot that you might
not already be familiar with: we're talking about the "Newtype Pattern"!

Now, I told you to read the Rust Book before you read this book, and I'm sure
you're all good students who wouldn't sneak into this book without doing the
required reading, so I'm sure you all remember exactly what I'm talking about,
because they touch on the newtype concept in the book twice, in two _very_ long
named sections:

* [Using the Newtype Pattern to Implement External Traits on External
  Types](https://doc.rust-lang.org/book/ch19-03-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types)
* [Using the Newtype Pattern for Type Safety and
  Abstraction](https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction)

...Yeah... The Rust Book doesn't know how to make a short sub-section name to
save its life. Shame.

## Newtype Basics

So, we have all these pieces of data, and we want to keep them separated, and we
don't wanna pay the cost for it at runtime. Well, we're in luck, we can pay the
cost at compile time.

```rust
pub struct PixelColor(u16);
```

TODO: we've already talked about repr(transparent) by now

Ah, except that, as I'm sure you remember from [The
Rustonomicon](https://doc.rust-lang.org/nomicon/other-reprs.html#reprtransparent)
(and from the RFC too, of course), if we have a single field struct that's
sometimes different from having just the bare value, so we should be using
`#[repr(transparent)]` with our newtypes.

```rust
#[repr(transparent)]
pub struct PixelColor(u16);
```

And then we'll need to do that same thing for _every other newtype we want_.

Except there's only two tiny parts that actually differ between newtype
declarations: the new name and the base type. All the rest is just the same rote
code over and over. Generating piles and piles of boilerplate code? Sounds like
a job for a macro to me!

## Making It A Macro

If you're going to do much with macros you should definitely read through [The
Little Book of Rust
Macros](https://danielkeep.github.io/tlborm/book/index.html), but we won't be
doing too much so you can just follow along here a bit if you like.

The most basic version of a newtype macro starts like this:

```rust
#[macro_export]
macro_rules! newtype {
  ($new_name:ident, $old_name:ident) => {
    #[repr(transparent)]
    pub struct $new_name($old_name);
  };
}
```

The `#[macro_export]` makes it exported by the current module (like `pub`
kinda), and then we have one expansion option that takes an identifier, a `,`,
and then a second identifier. The new name is the outer type we'll be using, and
the old name is the inner type that's being wrapped. You'd use our new macro
something like this:

```rust
newtype! {PixelColorCurly, u16}

newtype!(PixelColorParens, u16);

newtype![PixelColorBrackets, u16];
```

Note that you can invoke the macro with the outermost grouping as any of `()`,
`[]`, or `{}`.  It makes no particular difference to the macro. Also, that space
in the first version is kinda to show off that you can put white space in
between the macro name and the grouping if you want. The difference is mostly
style, but there are some rules and considerations here:

* If you use curly braces then you _must not_ put a `;` after the invocation.
* If you use parentheses or brackets then you _must_ put the `;` at the end.
* Rustfmt cares which you use and formats accordingly:
  * Curly brace macro use mostly gets treated like a code block.
  * Parentheses macro use mostly gets treated like a function call.
  * Bracket macro use mostly gets treated like an array declaration.

**As a reminder:** remember that `macro_rules` macros have to appear _before_
they're invoked in your source, so the `newtype` macro will always have to be at
the very top of your file, or if you put it in a module within your project
you'll need to declare the module before anything that uses it.

## Upgrade That Macro!

We also want to be able to add `derive` stuff and doc comments to our newtype.
Within the context of `macro_rules!` definitions these are called "meta". Since
we can have any number of them we wrap it all up in a "zero or more" matcher.
Then our macro looks like this:

```rust
#[macro_export]
macro_rules! newtype {
  ($(#[$attr:meta])* $new_name:ident, $old_name:ident) => {
    $(#[$attr])*
    #[repr(transparent)]
    pub struct $new_name($old_name);
  };
}
```

So now we can write

```rust
newtype! {
  /// Color on the GBA gives 5 bits for each channel, the highest bit is ignored.
  #[derive(Debug, Clone, Copy)]
  PixelColor, u16
}
```

Next, we can allow for the wrapping of types that aren't just a single
identifier by changing `$old_name` from `:ident` to `:ty`. We can't _also_ do
this for the `$new_type` part because declaring a new struct expects a valid
identifier that's _not_ already declared (obviously), and `:ty` is intended for
capturing types that already exist.

```rust
#[macro_export]
macro_rules! newtype {
  ($(#[$attr:meta])* $new_name:ident, $old_name:ty) => {
    $(#[$attr])*
    #[repr(transparent)]
    pub struct $new_name($old_name);
  };
}
```

Next of course we'll want to usually have a `new` method that's const and just
gives a 0 value. We won't always be making a newtype over a number value, but we
often will. It's usually silly to have a `new` method with no arguments since we
might as well just impl `Default`, but `Default::default` isn't `const`, so
having `pub const fn new() -> Self` is justified here.

Here, the token `0` is given the `{integer}` type, which can be converted into
any of the integer types as needed, but it still can't be converted into an
array type or a pointer or things like that. Accordingly we've added the "no
frills" option which declares the struct and no `new` method.

```rust
#[macro_export]
macro_rules! newtype {
  ($(#[$attr:meta])* $new_name:ident, $old_name:ty) => {
    $(#[$attr])*
    #[repr(transparent)]
    pub struct $new_name($old_name);
    impl $new_name {
      /// A `const` "zero value" constructor
      pub const fn new() -> Self {
        $new_name(0)
      }
    }
  };
  ($(#[$attr:meta])* $new_name:ident, $old_name:ty, no frills) => {
    $(#[$attr])*
    #[repr(transparent)]
    pub struct $new_name($old_name);
  };
}
```

Finally, we usually want to have the wrapped value be totally private, but there
_are_ occasions where that's not the case. For this, we can allow the wrapped
field to accept a visibility modifier.

```rust
#[macro_export]
macro_rules! newtype {
  ($(#[$attr:meta])* $new_name:ident, $v:vis $old_name:ty) => {
    $(#[$attr])*
    #[repr(transparent)]
    pub struct $new_name($v $old_name);
    impl $new_name {
      /// A `const` "zero value" constructor
      pub const fn new() -> Self {
        $new_name(0)
      }
    }
  };
  ($(#[$attr:meta])* $new_name:ident, $v:vis $old_name:ty, no frills) => {
    $(#[$attr])*
    #[repr(transparent)]
    pub struct $new_name($v $old_name);
  };
}
```

repository: felixjones/gba

repo_name: felixjones/gba


text:
---
title: Wrapping vars as Object Literals on console.log
date: '2017-12-02'
spoiler: A trick i find useful when logging variables via console.logs.
---

Today i learned a handy console trick that i find useful. I hope it does to you too.

When logging variable's, wrap it in Object literal.

Before when i log variables, i always do console.log(variable) and at first its quite okay, until when you pile up logs of console log information, its quite challenging to know which is which.

But now, wrapping the variable with brackets, like console.log({variable}) before logging makes it more readable in your terminal.

```js
const currentInd = 24;
const names = ['Rizal','Bonifacio'];

//nahh
console.log(currentInd); // 24
console.log(names);      // [ 'Rizal', 'Bonifacio']

//nice
console.log({currentInd}); // { currentInd: 24 }
console.log({names});      // { names: [ 'Rizal', 'Bonifacio'] }
```


text:
# react-i18n-kit

[![npm](https://img.shields.io/npm/v/react-i18n-kit.svg?style=flat-square)](https://www.npmjs.com/package/react-i18n-kit)
![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/react-i18n-kit.svg?style=flat-square)
[![Travis branch](https://img.shields.io/travis/com/aichbauer/react-i18n-kit/master.svg?style=flat-square)](https://travis-ci.com/aichbauer/react-i18n-kit)
[![Codecov branch](https://img.shields.io/codecov/c/github/aichbauer/react-i18n-kit/master.svg?style=flat-square)](https://codecov.io/gh/aichbauer/react-i18n-kit)
[![docz](https://img.shields.io/badge/docs%20with-docz-1F2D3D.svg?style=flat-square)](https://aichbauer.github.io/react-i18n-kit)

> I18n for your React Components

## Table of Contents

- [Documentation](https://aichbauer.github.io/react-i18n-kit)
- [Why?](#why)
- [Installation](#installation)
- [Functions](#functions)
  - [withI18n](#withi18n)
    - [Basic Usage](#basic-usage)
    - [Options](#options)
- [License](#license)

## Why?

I needed a simple way to translate my react applications without to much overhead.

## Installation

```sh
$ npm i react-i18n-kit -S
```

or

```sh
$ yarn add react-i18n-kit
```

## Functions

For more detailed information you can take a look at the [documentation](https://aichbauer.github.io/react-i18n-kit).

### withI18n

This is the enhancer for your Components. If you wrap your Components in this function you get access to a `i18n` and a `translate` property.

#### Syntax

Returns a component which renders the wrapped `Component`.

```js
const i18n = withI18n(Component, data, options);
```

#### Parameters

| Parameter | Type        | Required | Default | Description                           |
| --------- | ----------- | -------- | ------- | ------------------------------------- |
| Component | `Component` | true     |         | The component that gets rendered      |
| data      | `object`    | true     |         | The translations for your `Component` |
| options   | `object`    | false    |         | The options for your translations     |

##### Component

An example for the `Component` parameter.

This component gets access to 2 exposed properties.

| Property  | Type     | Description                                                          |
| --------- | -------- | -------------------------------------------------------------------- |
| i18n      | `object` | The committed `data` object, but only for the corresponding language |
| translate | `func`   | The function for the dynamic translation (e.g. on a button click)    |

```jsx
const Text = (props) => (
  <div>
    <button onClick={() => props.translate('en')}>
      English
    <button/>
    <button onClick={() => props.translate('de')}>
      Deutsch
    <button/>
    {props.i18n.text}
  </div>
);
```

##### data

An example for the `data` parameter.

```js
const data = {
  de: {
    text: "Hallo Welt!",
  },
  en: {
    text: "Hello World!",
  },
};
```

##### options

> If there is no translation for a language it will take the `fallback` which is default to `en`

An example for the `options` parameter.

```js
const options = {
  lang: "de",
  fallback: "de",
};
```

## Basic Usage

> For more detailed information you can take a look at the [documentation](https://aichbauer.github.io/react-i18n-kit)

Render a text based on the users browser language. If your browsers language is set to `de` it will render `Hallo Welt!` and if the browsers language is set to `en` it will render `Hello World!`.

```jsx
import React from "react";
import { withI18n } from "react-i18n-kit";

const data = {
  de: {
    text: "Hallo Welt!",
  },
  en: {
    text: "Hello World!",
  },
};

/*
  if language is:
    - en:
      props.i18n.text: "Hello World!"
    - de:
      props.i18n.text: "Hallo Welt!"
*/
const Text = props => <div>{props.i18n.text}</div>;

const TextI18n = withI18n(Text, data);

export { TextI18n as Text };
```

As you see you get access to a `i18n` property. To make that enhancer work properly we have to pass an object with with keys set to a [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. Then the enhancer simply passes only the object with the corresponding language to the `i18n` property.

For example your browser language is set to `en-US`, `props.i18n` will be:

```json
{
  "text": "Hello World!"
}
```

You can pass everything you want into these objects, but every language object has to contain the same keys (in this example `text`), which you will use in your enhanced component.

#### Options

If you do not want to deside the language based on the browser language and you want to have a default value you can pass a options object.

If the user is visiting the page with a browser which has its language set to `zh` (chinese) it will automatically fallback to `en` since there is no translation for `zh` right now.

```jsx
import React from "react";
import { withI18n } from "react-i18n-kit";

const data = {
  de: {
    text: "Hallo Welt!",
  },
  en: {
    text: "Hello World!",
  },
};

const Text = props => <div>{props.i18n.text}</div>;

const TextI18n = withI18n(Text, data, { fallback: "en" });

export { TextI18n as Text };
```

## License

MIT © Lukas Aichbauer


text:
# PETFINDERPLUGIN

Petfinder has transitioned away from their v1 API to a v2 API that uses OAUTH. This basic plugin will help you get started on your way to getting data from Petfinder and displaying it on your webpages.

# GETTING STARTED

1. Request a API license and secret from Petfinder by visiting https://www.petfinder.com/developers/

2. Open getpets.php and add your API Key, Secret and shelter ID

3. Add <script src="petfinderplugin.js"></script> to your webpage and adjust your path if necessary

4. Add an ID to a div dom element on your webpage. You can use any ID name you choose, ensure you update the id name when you initialize the plugin.

5. Initizlize the plugin on your webpage with the following:
    <script>
        Petfinderplugin.init({
            shelterid: "...",
            petdisplay: 0, // 1 = one, 0 = all
            url: "getpets.php",
            id: "data"
        });
    </script>

6. Add <link rel="stylesheet" href="petfinderplugin.css"> the head of your webpage and adjust your path if necessary. See plugintest.html for an example.

# AUTHOR

Shaun Nelson - [snndeveloper]
(https://github.com/snndeveloper)

repository: SNNDEVELOPER/PETFINDERPLUGIN

repo_name: SNNDEVELOPER/PETFINDERPLUGIN


text:
# Changelog

All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v1.1.0](https://github.com/voxpupuli/puppet-prometheus_reporter/tree/v1.1.0) (2021-05-02)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus_reporter/compare/v1.0.0...v1.1.0)

**Breaking changes:**

- drop Ubuntu 14.04 support [\#48](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/48) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- List Puppet 7 support [\#62](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/62) ([bastelfreak](https://github.com/bastelfreak))
- Add cache\_catalog\_status and puppet\_status metrics [\#57](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/57) ([matejzero](https://github.com/matejzero))

**Closed issues:**

- Question about how to properly use this [\#56](https://github.com/voxpupuli/puppet-prometheus_reporter/issues/56)
- config stale\_time doesn't work [\#53](https://github.com/voxpupuli/puppet-prometheus_reporter/issues/53)
- Does this reporter support the newest node version? [\#9](https://github.com/voxpupuli/puppet-prometheus_reporter/issues/9)

**Merged pull requests:**

- modulesync 4.1.0 / Drop Puppet 5 from metadata.json [\#63](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/63) ([bastelfreak](https://github.com/bastelfreak))
- Fix issue \#53 config stale\_time doesn't work [\#55](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/55) ([zipkid](https://github.com/zipkid))
- Feature/report puppet transaction completed [\#54](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/54) ([zipkid](https://github.com/zipkid))

## [v1.0.0](https://github.com/voxpupuli/puppet-prometheus_reporter/tree/v1.0.0) (2019-07-27)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus_reporter/compare/v0.3.1...v1.0.0)

**Breaking changes:**

- modulesync 2.7.0 and drop puppet 4 [\#39](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/39) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- Remove metric files for nodes that haven't sent reports in X time [\#44](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/44) ([LDaneliukas](https://github.com/LDaneliukas))

**Closed issues:**

- Configurable metric types  [\#42](https://github.com/voxpupuli/puppet-prometheus_reporter/issues/42)
- Configurable environments [\#40](https://github.com/voxpupuli/puppet-prometheus_reporter/issues/40)
- Removing deactivated node [\#38](https://github.com/voxpupuli/puppet-prometheus_reporter/issues/38)

**Merged pull requests:**

- Allow selecting reports which are used for metrics [\#43](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/43) ([LDaneliukas](https://github.com/LDaneliukas))
- Allow configurable environments [\#41](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/41) ([LDaneliukas](https://github.com/LDaneliukas))

## [v0.3.1](https://github.com/voxpupuli/puppet-prometheus_reporter/tree/v0.3.1) (2018-10-14)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus_reporter/compare/v0.3.0...v0.3.1)

**Merged pull requests:**

- modulesync 2.2.0 and allow puppet 6.x [\#34](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/34) ([bastelfreak](https://github.com/bastelfreak))
- Remove docker nodesets [\#29](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/29) ([bastelfreak](https://github.com/bastelfreak))
- drop EOL OSs; fix puppet version range [\#27](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/27) ([bastelfreak](https://github.com/bastelfreak))

## [v0.3.0](https://github.com/voxpupuli/puppet-prometheus_reporter/tree/v0.3.0) (2018-03-31)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus_reporter/compare/v0.2.0...v0.3.0)

**Fixed bugs:**

- don't add .prom if report\_filename is set. [\#21](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/21) ([cz8s](https://github.com/cz8s))

**Merged pull requests:**

- bump puppet to latest supported version 4.10.0 [\#25](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/25) ([bastelfreak](https://github.com/bastelfreak))
- Change epochtime to seconds, add HELP/TYPE info [\#22](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/22) ([oleg-glushak](https://github.com/oleg-glushak))

## [v0.2.0](https://github.com/voxpupuli/puppet-prometheus_reporter/tree/v0.2.0) (2017-11-11)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus_reporter/compare/v0.1.0...v0.2.0)

**Merged pull requests:**

- release 0.2.0 [\#18](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/18) ([bastelfreak](https://github.com/bastelfreak))
- Update metadata.json for supported puppet versions [\#16](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/16) ([bastelfreak](https://github.com/bastelfreak))

## [v0.1.0](https://github.com/voxpupuli/puppet-prometheus_reporter/tree/v0.1.0) (2017-04-19)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus_reporter/compare/5b2be9adcf5f2fc4f467d7b5605db8e95563dc26...v0.1.0)

**Implemented enhancements:**

- remove transaction\_uuid [\#5](https://github.com/voxpupuli/puppet-prometheus_reporter/issues/5)

**Merged pull requests:**

- Release 0.1.0 [\#12](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/12) ([bastelfreak](https://github.com/bastelfreak))
- Fix syntax [\#10](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/10) ([dhoppe](https://github.com/dhoppe))
- Move to unique metrics names [\#7](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/7) ([roidelapluie](https://github.com/roidelapluie))
- Add the prometheus reporter ruby script [\#4](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/4) ([roidelapluie](https://github.com/roidelapluie))
- Add metadata.json [\#2](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/2) ([roidelapluie](https://github.com/roidelapluie))
- Add Readme and LICENSE [\#1](https://github.com/voxpupuli/puppet-prometheus_reporter/pull/1) ([roidelapluie](https://github.com/roidelapluie))

\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*


text:
# instparser

#### Install: npm i

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

# CONFIG

- **outputPath** - This path will be created and each downloaded profile will be in own folder, like ./out/tab_mk `(default: './out/')`
- **logger.enabled** - You can turn off/on debug `(default: true)`
- **logger.noColors** - Turn off colors for debug `(default: false)`
- **logger.data** - Some data for debug. You can change it whatever you like
- **pageLimit** - Defines how many pages will be requested. Can be also string 'ALL' to fetch all content. `(default: 1)`
- **postsLimit** -  Defines how many content will be requested per page. Max. - 20, less = more requests, that's why bigger values are recommended `(default: 20)`
- **saveData** - Option for saving main info about user to the file *data.json*  `(default: false)`
- **photoQuality** - You can choose quality which you want to download: *src, low, high*. If you need best - set 'src', because high is compressed. `(default: 'src')`
- **cookie** - You instagram sessionid cookie. Sign in and than take it in your browser settings ([chrome://settings/cookies/detail?site=instagram.com](chrome://settings/cookies/detail?site=instagram.com "chrome://settings/cookies/detail?site=instagram.com") for google chrome)
# START
Simple run command `node index nickname` and it will download content with params in config. You can also pass params through command line as below.
### Arguments:
- nickname - instagram user nickname (only this argument is required)
- posts limit - postsLimit, number 1-20 (look above)
- pages limit - number or 'ALL'
- save data - boolean (true/false)
- debug - boolean
- nocolor - boolean

##### examples:
1. `node index tab_mk 20 ALL true false`
2. `node index tab_mk 7 5 false true false`

# TODO List
- Full support for GraphSidecar
- Video content support
- Download data for each post

Open [new issue](https://github.com/TABmk/instparser/issues/new "new issue") if you want request new features

repository: TABmk/instparser

repo_name: TABmk/instparser


text:
# {{ projectName }}

A starter template for a polymer.dart web app.

## Creating new elements

The `polymer` package includes a utility to generate new elements. From
within this project, run:

`pub run polymer:new_element <name>`


text:
## Howdy, stranger!

This humble toolkit gives a quick and dirty view of a Twitter user's recent timeline history, including basic account info, a Top 20 list of (mostly noncommon) the words they've used, and a list of the named entities (i.e. proper nouns including people, places, organizations, and so on) they've mentioned in their last 100 tweets.

### How to use

Easy peasy. Just invoke "python intel.py" at the command line and it'll prompt you for the screenname to investigate.

### Easy tweaks to be made

* Add more "blacklist" words to filter out by editing common_words.txt (for my own purposes I've left "RT" in there for now, but there are better ways to get a sense of how much an account is retweeting vs. tweeting which I hope to add in a later version)
* Change the number of tweets to fetch from the user timeline in intel.py, or make this a parameter you can pass in like the screenname
* Change the display layout to consolidate the view or remove parts of the user account info you're not interested in, etc.
* Add another "blacklist" to filter out specific entities from the 3rd part of the display, or add a "whitelist" to specifically look for tracked entities
* Store the data for later parsing (coming in a future version -- for now, keeping things simple...)

### Fun things to look for

* Some users show a mismatch between their location as stated in their profile, and the time zone set privately in their settings (the former is displayed publicly while the latter is not) -- this is useful for sniffing out trolls and/or bots masquerading as citizens of someplace else.
* If the 'contributors' flag is set to True (rare), then multiple individuals are expressly allowed to manage this account.

repository: doctorparadox/pyTwintel

repo_name: doctorparadox/pyTwintel


text:
# Run

## Table of Contents

- [Introduction](#introduction)
- [Usage](#usage)
- [Examples](#examples)

## Introduction

The `run` tool can be used to convert models, run inference, and compare results across frameworks.

## Usage

See `polygraphy run -h` for usage information.

## Examples

For examples, see [this directory](../../../examples/cli/run)

repository: NVIDIA/TensorRT

repo_name: NVIDIA/TensorRT


text:
# tls-cert-renewer

This application is used to auto renew kubernetes ingress tls certificate from s3 bucket.

## How it works

![How it works](https://github.com/ldoming/tls-cert-renewer/blob/master/img/how-it-works.png)

### Note:
Secrets must contain the following metadata labels
```yaml
metadata:
  labels:
    tls-cert-renewer-enabled: 'true'
    tls-cert-renewer-parent-domain: <REPLACE>
```

## Setting up in your environment:
1) Create a new IAM User with an S3 download policy
2) Replace the ACCESS_KEY_ID environment variable in `kubernetes/deployment.yaml` with your new generated user's access key id
3) Replace the `awsKey:` variable in `kubernetes/secret.yaml` with the base64 contents of your generated user's secret access key
```bash
$ echo -n "secretkey" | base64
```
4) Update the `AWS_REGION` environment variable in `kubernetes/deployment.yaml` if you aren't running in `us-west-2` with your EKS cluster
5) Edit the `kubernetes/deployment.yaml` `command:` with following arguments

| Symbol | Default | Description
| --- | --- | ---
| `--bucket_name` | `Required` | Bucket Name
| `--prefix` | `Required` | Folder name where the certificate is located
| `--sleep_time` | `86400` | Time until the next execution

6) Finally:
```bash
$ kubectl apply -f kubernetes/
```

## Have suggestions or want to contribute?
Raise a PR or file an issue, I'd love to help!

repository: ldoming/tls-cert-renewer

repo_name: ldoming/tls-cert-renewer


text:
XPlaneOculus
============

Download compiled builds of this project at [this project's website](http://runway12.com/projects/XPlaneOculus/).

A plugin for [X-Plane](http://www.x-plane.com) that adds support for head tracking with the [Oculus Rift](http://www.oculusvr.com) virtual reality HMD.

3D rendering for the rift is not currently supported. I'm using [Ibex](http://hwahba.com/ibex/) to convert the X-Plane window's image to the format needed by the rift for now. It's not a perfect solution at all, but it's good enough for initial development.

Support for rendering in stereo 3D with the correct dirstortion for the Oculus' optics is a planned area of research, but may not be possible from an X-Plane plugin. Positional headtracking using a head mounted Razer Hydra is also planned.

Things are in pretty rough shape right now. Expect things to get better and more documentation to come after a few more hours of hacking.

repository: steveski/XPlaneOculus

repo_name: steveski/XPlaneOculus


text:
[uy.klutter.core.collections](../index.md) / [kotlin.collections.Collection](index.md) / [asReadOnly](.)

# asReadOnly
fun <T> Collection<T>.asReadOnly(): Collection<T> [(source)](https://github.com/kohesive/klutter/blob/master/core-jdk6/src/main/kotlin/uy/klutter/core/common/Immutable.kt#L202)

Wraps the Collection with a lightweight delegating class that prevents casting back to mutable type

repository: drothmaler/klutter

repo_name: drothmaler/klutter


text:
# Spring Integration gateway parsing performance sample

This simple Spring Boot application contains only Spring Integration dependency and provides only simple a `@MessagingGateway` interface to parse and expose as a bean.

The goal of the sample to measure the mentioned parsing performance via currently provided `instanceSupplier` approach.
It starts an `ApplicationContext` 100 times and shows a result of the `StopWatch` around.

To compare with suggested gateway parser changes (back) to the reflection style instead of `instanceSupplier`, you need pull this [Spring Integration branch](https://github.com/spring-projects/spring-integration/tree/gateway_reflection) locally and perform `./gradlew publishToMavenLocal -x test` in Spring Integration project.
Then on this sample side, in its `pom.xml`, uncomment the `spring-integration.version` property.
Refresh project in the IDE to take fresh dependecies and run the sample again to see a difference in the SDOUT.
You can also run it via Maven: `./mvn spring-boot:run`.

On my machine it shows a performance degradation with reflection style as a half seconds.

repository: artembilan/sandbox

repo_name: artembilan/sandbox


text:
## Manual Annotation Protocol

Many neurocartography applications require manual annotations to train machine learning algorithms and explore datasets.  Here we describe a protocol for uploading annotations using ITK Snap.

### Overall Steps

- Create a JSON file specifying how to upload data following the example below.
- Download data by running `python3 mano.py -fp /path/to/json/file -down`
- Annotate by loading in your data to ITK Snap
- Modify your JSON file by inserting the annotation_channel location
- To upload data run `python3 mano.py -fp /path/to/json/file -up`

### File name convention

<to insert>

### Annotation channel naming convention

For provenance and reproducibility, we recommend the following annotation channel naming convention:

<user>_<format>_<class>_<type>_<initials>

- user: {manual, automated}
- format: {sparse, dense, centroid, skeleton}
- class: {pixel, object}
- type: {a: axon, b: blood vessel, c: cell, d: dendrite, r: region of interest
- initials: {user initials, automated algorithm}

Example:

`manual_dense_pixel_abc_wrgr`

### LIMS

We recommend maintaining a searchable database of projects with info

### Starter JSON file

Please replace `<value>` with your values (remove the `<>` as well)
```
{
    "protocol": "https",
    "host": "api.bossdb.org",
    "token": "<string>",
    "file_path": "<string>",
    "image": {
        "collection": "<string>",
        "experiment": "<string>",
        "channel": "<string>",
        "datatype": "<string>"
    },

    "annotation": {
        "collection": "<string>",
        "experiment": "<string>",
        "channel": "<string>",
        "datatype": "<string>",
        "description": "<string>"
    },

    "xmin": <int>,
    "ymin": <int>,
    "zmin": <int>,
    "xmax": <int>,
    "ymax": <int>,
    "zmax": <int>,
    "resolution": <int>
}
```

repository: aplbrain/mano

repo_name: aplbrain/mano


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [redsys-easy](./redsys-easy.md) > [mimicSoapNotificationReceiver](./redsys-easy.mimicsoapnotificationreceiver.md)

## mimicSoapNotificationReceiver variable

Extracts the body of a SOAP notification from the body of the HTTP request

**Signature:**

```typescript
mimicSoapNotificationReceiver: (xml: string) => string
```

## Remarks

It does not understand SOAP or use WSDL, the implementation is a little bit hacky

repository: javiertury/redsys-easy

gha_language: TypeScript

repo_name: javiertury/redsys-easy


text:
# BabelGladeExtractor

This package contains message catalog extractors for the following
formats, extending [Babel][babel] so it can handle them.

* The new XML format used by [Glade][glade] 3.8 and above, properly
  known as the [GtkBuilder UI Definitions][uixml] format;

* The older "GladeXML" format used by libglade and older versions of
  Glade;

* The GNOME [AppData XML][appdataxml] dialect, because it's similar;

* FreeDesktop.org [Desktop Entry][desktopfile] files.

## Getting started

To make these formats translatable, install this package using pip:

```shell
pip3 install BabelGladeExtractor
```

Then in your own projects, map some source and data files to the simple
extractor names "glade" and "desktop" that are provided by this package.
In your `setup.py`, add a section like

```ini
[extract_messages]
mapping_file = babel.cfg
output_file = subdir/myproject.pot
input_dirs = .
```

Next, create a separate `babel.cfg` file, and add sections to it for
each format you want to translate.

```ini
[glade: **.ui]

[desktop: **.desktop]

```

You can then use Babel's [setuptools integration][babelsetuptools] or
its [command line interface][babelcli] for your routine i18n lifecycle
tasks.

```shell
python3 setup.py extract_messages
```

There's a lot more to it than this, naturally. See Babel's extensive
[Working with Message Catalogs][babelpo] documentation for a detailed
explanation of how to get translatable strings into your Python code.

In Glade 3.22, when you are editing a string property in a sidebar,
click the edit icon on the right hand side of the text entry. In the
dialog that pops up, enter the text in the main text box, and make sure
that the Translatable checkbox is ticked. You can also add some helpful
[context][pocontext] or comments for your translators if you need to
give them a hint. BabelGladeExtractor will handle the corresponding XML
attributes appropriately when it extracts strings for translation.

[babel]: http://babel.pocoo.org/
[glade]: https://glade.gnome.org/
[uixml]: https://developer.gnome.org/gtk3/stable/GtkBuilder.html#BUILDER-UI
[appdataxml]: https://wiki.gnome.org/Initiatives/GnomeGoals/AppDataGnomeSoftware
[desktopfile]: https://specifications.freedesktop.org/desktop-entry-spec/
[babelsetuptools]: http://babel.pocoo.org/en/latest/setup.html
[babelcli]: http://babel.pocoo.org/en/latest/cmdline.html
[babelpo]: http://babel.pocoo.org/en/latest/messages.html
[pocontext]: https://www.gnu.org/software/gettext/manual/html_node/Contexts.html#Contexts

repository: gnome-keysign/babel-glade

repo_name: gnome-keysign/babel-glade


text:
1. Navigate to Administration > Integrations management > CTIX Integrators.
2. Click “Add New” to create and configure a new integration instance and download the key files.
3. Login to the Cortex XSOAR application and go to the App Configuration page.
4. Fill in the following details.
    a. Name: Give a name for the integration instance.
    b. Endpoint URL: Enter the endpoint URL of your CTIX Instance. The Endpoint URL can be generated by a licensed user from the CTIX application. For example, https://<domain_name>/ctixapi/openapi/
    c. Access Key: Enter the Access Key from the CTIX application. The Access Key can be generated by a licensed user from the CTIX application. For example, “74xxxxx7-xxxb-4xxa-xxxx-0xxxxxxxxxx2“.
    d. Secret Key: Enter the Secret Key from the CTIX application. The Secret Key can be generated by a licensed user from the CTIX application. For example, “0xxxxxx8-xxxx-4xx4-xxx6-5xxxxxxxxxxc”.
5.  After finishing, click the “Test“ button to validate the URL, Token, and Connection.

Notice: Submitting indicators using the following commands of this integration might make the indicator data publicly available.
- ***url***
- ***domain***
See the vendor’s documentation for more details.

repository: demisto/content

repo_name: demisto/content


text:
## Versions

* [Elm](/elm/)
* [Reason](/reason)

[wordbot]: https://noopschallenge.com/challenges/wordbot

repository: stackbuilders/nonsense

repo_name: stackbuilders/nonsense


text:
---
layout: post
title: "Study: Rails| Tutorial 2"
comments: true
description: "Rails Model"
keywords: "rails, ruby, activerecord, model"
---

# Models

## TOC

## 1. Introduction

### Active Record
- refer to [Active Record Pattern](https://www.martinfowler.com/eaaCatalog/activeRecord.html)
- we can simply consider M(Model) is a mapping function, from ORM(class object) to Relational DB table.

### Naming Convention
- Database Table - Plural with underscores separating words
- Model Class - Singular with the first letter of each word capitalized

### Schema Convention
- **Foreign key**: naming like *singularized_table_name_id (e.g., item_id, order_id)*
- **Primary Key**: by default, use *id* as a primary key
- **created_at**: Automatically gets set to the current date and time when the record is first created.
- **updated_at**: Automatically gets set to the current date and time whenever the record is updated.

## 2. Create a Model

### subclass *ActiveRecord::Base* class
```
class Product < ActiveRecord::Base
end
```

## 3. Read & Write Data

### Create
- using create method of a model class
  - create and save
```
user = User.create(name: "David", occupation: "Code Artist")
```
- using new method of a model class
  - only created, use **save** to commit the record to database
```
user = User.new
user.name = "David"
user.occupation = "Code Artist"
```

### Retrieve
- [reference to Query Interface](http://guides.rubyonrails.org/v4.2/active_record_querying.html)
- methods
>
bind
create_with
distinct
eager_load
extending
from
group
having
includes
joins
limit
lock
none
offset
order
preload
readonly
references
reorder
reverse_order
select
uniq
where
>
- return a collection with all users
```
users = User.all
```
- return the first user
```
user = User.first
```
- return the first user named David
```
david = User.find_by(name: 'David')
```
- find all users named David who are Code Artists and sort by created_at in reverse chronological order
```
users = User.where(name: 'David', occupation: 'Code Artist').order(created_at: :desc)
```

### Update
- find a record, and modify the data of it, finally commit to database
```
user = User.find_by(name: 'David')
user.name = 'Dave'
user.save
```
- update method
```
user = User.find_by(name: 'David')
user.update(name: 'Dave')
```
- batch update
```
User.update_all "max_login_attempts = 3, must_change_password = 'true'"
```

### Delete
- find a record and remove it
```
user = User.find_by(name: 'David')
user.destroy
```


text:
# JCS_ApplyDamageTextToLiveObjectAction

Apply the damage to live object by automatically.

## Variables

| Name                      | Description                                                                            |
|:--------------------------|:---------------------------------------------------------------------------------------|
| mAbilityFormat            | Ability format for calculation.                                                        |
| mDamageTextPositionOffset | Position offset where damage text spawns.                                              |
| mPreCalculateEffect       | Attack will be calculate before hit the object.                                        |
| mDamageApplying           | Damages that store in here ready to apply to the target.                               |
| mOnlyWithTarget           | Lock on the target?                                                                    |
| mTargetTransform          | Target we lock on!                                                                     |
| mRandPos                  | Random position effect.                                                                |
| mRandPosRange             | Random position limit to within this range.Random position limit to within this range. |
| mDestroyByThisAction      | Destroy live object by this object.                                                    |
| mIsAOE                    | Make object un-destroyable, count down by AOECount below.                              |
| mAOECount                 | Once the object hit a object count one down.                                           |
| mHitSound                 | Play this hit sound, while is action happens.                                          |

## Functions

| Name       | Description                           |
|:-----------|:--------------------------------------|
| CopyToThis | Copy some information from the other. |

gha_language: C#


text:
Server is an HTTP server that prints summaries for a `Report`.

Report implements: [`addMetric()`](#Server.addMetric)

### Instantiate
`Server` is an exported constructor in `metrics`.

```
var metrics = require('metrics'),
    server = new metrics.Server(3000);

server.addMetric('namespace.name', new metrics.Counter());
server.addMetric('counter', new metrics.Counter());
```

The server takes a port argument, and optionally a object of metrics to track, for this format please check the `Report` instantiation documentation.

The server responds with the report summary in JSON format at the endpoint `/metrics`.

For more advanced usage of reporting, you can use the `Report` constructor and create an HTTP server that responds however you'd like.

### .addMetric
`Report.addMetric(eventName, metric)`

Delegated to the servers Report instance.

repository: mikejihbe/metrics

repo_name: mikejihbe/metrics


text:
# Typed Enumerations

Typed-enum is A simple, lightweight and efficient enumeration library. Type hint your enumerated options efficiently and strictly to eliminate unintended side effects and bugs introduced by typos.

## How to use:

### Download

Download with composer:
```
composer require "laudis/typed-enum"
```

### Extending from TypedEnum

Extend from TypedEnum and use any scalar constants to define the enumeration:

```
final Foo extends TypedEnum {
    private const BAR = 'bar';
    private const BAZ = 2;
    private const FOO = 2.1;
}
```

You can now create instances of Foo by using the __callstatic method based on the name of the constant:

```
Foo::BAR()  // Returns an instance of Foo with value 'bar'
```

### Testing for equality

As a bonus, you can now use strict comparisons. TypedEnum guarantees there to be only one instance of the same enumerated value at runtime.

```
function isBar(Foo $enum): bool {
    return Foo::BAR() === $enum;
}
```

### Return the actual value:

If your application depends on the value assigned tot he enumeration, you can easily fetch it with the getValue() getter.

```
echo Foo::BAR()->getValue(); //'bar'
```

### Resolve the enumeration

Resolve an enumeration based on its value.
The resolve method will return all enumerations with the same value in the array.

```
echo Foo::resolve('bar')[0] === Foo::BAR() // true
```

## Tips

### IDE integration

You can easily use the power of you ide by simply adding @method tags in the docblock of your class like this:

```
/**
 * @method static TypedEnum TEST()
 */
final class Foo extends TypedEnum {
    protected const TEST = 'test';
}
```

### Psalm

We built TypedEnum with psalm! With these powerful annotations, you can now hint the scalar value of the enumeration:

```
/**
 * @method Foo<string> TypedEnum TEST()
 */
final class Foo extends TypedEnum {
    protected const TEST = 'test';
}
```

### Easy Bug protection

Php 7.2 allows for protected constants, and 7.4 uses private ones. Use these features to protect against unintended side effects!

```
echo Foo::BAR === Foo::BAR() // echo's false but is impossible if it was a protected constant
```

***
Developed by [laudis](https://laudis.tech)


text:
# Project 1 - *Flickster*

**Flickster** shows the latest movies currently playing in theaters. The app utilizes the Movie Database API to display images and basic information about these movies to the user.

Time spent: **16** hours spent in total

## User Stories

The following **required** functionality is completed:

* [x] User can **scroll through current movies** from the Movie Database API
* [x] Layout is optimized with the [ViewHolder](http://guides.codepath.com/android/Using-an-ArrayAdapter-with-ListView#improving-performance-with-the-viewholder-pattern) pattern.
* [x] For each movie displayed, user can see the following details:
  * [x] Title, Poster Image, Overview (Portrait mode)
  * [x] Title, Backdrop Image, Overview (Landscape mode)

The following **optional** features are implemented:

* [ ] Display a nice default [placeholder graphic](http://guides.codepath.com/android/Displaying-Images-with-the-Picasso-Library#configuring-picasso) for each image during loading.
* [x] Improved the user interface through styling and coloring.

The following **bonus** features are implemented:

* [ ] Allow user to view details of the movie including ratings and popularity within a separate activity or dialog fragment.
* [ ] When viewing a popular movie (i.e. a movie voted for more than 5 stars) the video should show the full backdrop image as the layout.  Uses [Heterogenous ListViews](http://guides.codepath.com/android/Implementing-a-Heterogenous-ListView) or [Heterogenous RecyclerView](http://guides.codepath.com/android/Heterogenous-Layouts-inside-RecyclerView) to show different layouts.
* [ ] Allow video trailers to be played in full-screen using the YouTubePlayerView.
    * [ ] Overlay a play icon for videos that can be played.
    * [ ] More popular movies should start a separate activity that plays the video immediately.
    * [ ] Less popular videos rely on the detail page should show ratings and a YouTube preview.
* [ ] Apply the popular [Butterknife annotation library](http://guides.codepath.com/android/Reducing-View-Boilerplate-with-Butterknife) to reduce boilerplate code.
* [ ] Apply rounded corners for the poster or background images using [Picasso transformations](https://guides.codepath.com/android/Displaying-Images-with-the-Picasso-Library#other-transformations)
* [ ] Replaced android-async-http network client with the popular [OkHttp](http://guides.codepath.com/android/Using-OkHttp) networking libraries.

The following **additional** features are implemented:

* [ ] List anything else that you can get done to improve the app functionality!

## Video Walkthrough

Here's a walkthrough of implemented user stories:

<img src='./demo_flicks.gif' title='Video Walkthrough' width='' alt='Video Walkthrough' />

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

- Just need spare time.

## Open-source libraries used

- [Android Async HTTP](https://github.com/loopj/android-async-http) - Simple asynchronous HTTP requests with JSON parsing
- [Picasso](http://square.github.io/picasso/) - Image loading and caching library for Android

## License

    Copyright (c) 2017 Summit Suen

    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: suensummit/codepath-android-flicks

repo_name: suensummit/codepath-android-flicks


text:
# userid-info
A powercord plugin to quickly get info about a userid.

Usage: `.userid <userid>`

Example:
![img](https://i.imgur.com/QxkfyrU.png)


text:
---
layout: post
title: GSoC week-10
---
This is the tenth week of `GSoc 2018`

# Report
This week I have implemented authorization for TANNER-API server.[(merged)](https://github.com/mushorg/tanner/pull/268)
- JWT tokens used as API_KEYS.
- Each token is verified on every api request made.
- Each tanner owner can use their own desired signature for api verification.

Next week I shall work on HTTP-fingerprinting on snare's side and evaluate the performance :)

gha_language: CSS


text:
# Sample-Stream-Service

Reference implementation of a daemon and REST service using RealSelf's [`stream-ruby`](https://github.com/RealSelf/stream-ruby/wiki) gem.

#### Sample Daemon
The daemon includes examples for building a social newsfeed, asynchronous "fanout-on-write" activity distribution, retrying activity handling on failure, custom error handling, and replaying failed messages from an error queue.

#### Sample REST Serive
The REST service includes routes for managing a social graph of "follow" relationships, paged retrieval of a newsfeed, managing a per-user count of unread newsfeed items and synchronous ingestion and fanout of new activities.

# Installation

    git clone git@github.com:RealSelf/sample-stream-service.git
    cd sample-stream-service
    bundle install

# Usage

You need to connect to running rabbitmq, elasticsearch and mongodb servers.  Run them locally, or add environment variables pointing at each.

### Starting the Daemon
    export ELASTICSEARCH_URL='http://localhost:9200'
    export MONGODB_HOST='localhost:27017'
    export RABBITMQ_URL='amqp://guest:guest@localhost:5672'
    bundle exec bin/sample-daemon

### Starting the REST Service
    export ELASTICSEARCH_URL='http://localhost:9200'
    export MONGODB_HOST='localhost:27017'
    export RABBITMQ_URL='amqp://guest:guest@localhost:5672'
    bundle exec rackup bin/rest-service

repository: mtowers/sample-stream-service

repo_name: mtowers/sample-stream-service


text:
# Bang!

Bang is a tool to study the consistency of socio-psychological phenomena by running within subjects studies on groups. Bang uses pseudonyms to see what happens when people work in the same groups when they think they're working in new ones.

## Getting started

1. Clone the repository then run `npm install` in the github directory to get all the dependencies.
2. Make sure you're set up to use the MTurk API. I have a [intro](https://glitch.com/edit/#!/mturk) that will get you started.
3. Add an `.env` with the following content:

```PowerShell
AWS_ID=YOUR_AWS_MTURK_ID
AWS_KEY=YOUR_AWS_MTURK_KEY
TEAM_SIZE=2
NODE_ENV=development/production //var for setup front build and etc, not for mturk
API_HOST=your host
MONGO_URI=your mongo connect uri
ADMIN_TOKEN=your admin token
TEST_WILL_BANG_QUAL=will bang qual id from mturk
TEST_HAS_BANGED_QUAL=has banged qual id from mturk
PROD_WILL_BANG_QUAL=will bang qual id from mturk
PROD_HAS_BANGED_QUAL=has banged qual id from mturk
HIT_URL=http://localhost:3000/ or https://bang-dev.deliveryweb.ru/, url for mturk mail when FRAME=OFF
MTURK_MODE=off/test/prod ; DANGEROUS: if 'prod', it uses real mturk account; if no - sandbox, if 'off' - work without mturk.
MTURK_NOTIFY_ID - special mturk worker-user for notifications about experiment.
```

4. Set up mongodb (ver. 4.0)
5. Start the server (port 3001) by running `node built/index.js`.
6. Build front in prod mode by `npm run build-front` and use /front/build/ as static folder or
   Start dev front-server with hot reload by `npm run start-front` (port 3000)

## Source/etc files

All server code - /server;
All front code - /front/src, /front/public;
Front building utils - /front/scripts, /front/config;
Built front code - /front/build;
Built server code - /built;

## Developing

Run `tsc` to watch typescript files for changes and `supervisor server/index.js` so that the server will restart when files in the github folder are changed.

The URL parameters are required because they are read in from Amazon Mechanical Turk. Here's an example URL for local host: http://<IP_ADDRESS>:3000/?assignmentId=3K4J6M3CXF8DU3JZ8XUVEMJHFWEAGV&hitId=3TRB893CSJPTPHN7BSD9FBMB45DG72&workerId=A19MTSLG2OYDLZ&turkSubmitTo=https%3A%2F%2Fworkersandbox.mturk.com

## Specification

Bang has the following core functionality:

1. Get workers registered to do our task
2. Recruit workers via a waiting room
3. Run the chat client with tasks and surveys included
4. Pay bonuses to completed workers

These will be explained in more detail below:

### Registration

A HIT that runs every hour will allow workers to sign up to be notified of experimental runs in the future. This HIT is low price, `$0.01` reward, and adds the workers who complete it to our `willBang` qualification list. This HIT also includes our IRB. Currently these features are set up in `scheduleBang.ts`.

### Recruiting

When we start an experiment we need `TEAM_SIZE`(from the `.env` file) squared participants to be active in the `waitChat` before we can start the experiment. This recruiting process initially notifies our `willBang` list and optionally makes the HIT available to other workers on MTurk. During recruiting if participants are not active in `waitChat` we remove them and pay them a nominal participation fee. Once there are enough active workers we remove their `willBang` qualification and add the `hasBanged` qualification, which makes it impossible for them to work on our experiments again. Also at this time, we usually notify ourselves that the experiment has launched.

`waitChatOn` controls if a chatbot should be shown before the main task starts. This is designed so that the participants can stay engaged through the chat interaction and we can make sure they are present. For example, when participants don't respond to the chat bot for a certain time period we no longer consider them active.
Note: `waitChatOn` exists in `server.js` and `public/client.js` and needs to have the same value in both places to work as designed.

### Running the experiment

The experiment works by generating several chat rooms, each of `TEAM_SIZE` people, and letting them work together for `ROUND_MINUTES` before being moved into another activity. The activity cycle includes the following steps:

1. pre experiment activities
2. chat activities (happens for each round)
   1. pre chat activities
   2. chat
   3. post chat activities
3. post experiment activities

There are usually several rounds of chats and critically, some are with prior teams and some are with random teams. We can can control and randomize when this happens. The user names of each individual are randomized and the team configurations are governed by `createTeams` in the `utils.ts` file.

We are moving toward a model where bang can be run with a variety of tasks and activities outlined in an external file, so as to make it easier to run different types of experiments.

### Paying

At the end of the task, we provide bonuses to our workers and follow up with any who experienced errors. This currently happens at the start of the next round of the experiment or on a cron script.

### System workflow

To achieve admin’s access you need to add following keys into the Local Storage:
bang-token: any test user mturkId
bang-admin-token: (value ADMIN_TOKEN from the .env file)

    List of the links which are available only for admin user:

/templates
/templates-add
/batches
/batches-add
/batches:id
/users

main workflow:

For start experiment you need to add new batch at the /batches-add page. After that in will have “waiting” status and server will start posting qualification HITs every 4 minutes.
Qualification HITs’ lifetime is 250 sec. Server will notify all 'willbang' users (from previous run) in our db to join us.
All people which are ready with the qualification HIT achieve willBang qualification on Mturk and get email invite to the main task in our site.
When in the waiting room there’re enough participants, they get ability to join the batch. After enough people are joined batch experiment automatically starts.
As experiment is started all joined participants get start bonus, for now it’s $1.00, and achieve hasBanged qualification on Mturk/our db.
From now those participants can’t see our Mturk’s task anymore. After final survey is completed by participant they are paid out a completion bonus at a predetermined hourly wage (nominally $15/hour based on the [fair work](https://fairwork.stanford.edu) rate).

repository: StanfordHCI/bang

branch_name: refs/heads/newarch

repo_name: StanfordHCI/bang


text:
# fancyMOTD
Fancy MOTD's for your everyday ssh logins

This is a collection of ASCII arts that you can put instead of your regular boring MOTD. They ar all about 20 lines in height and within 70 columns in width so they should fit any terminal no problemo.
Hint: Always backup your original MOTD file.

Current collection contains:
* Glados
* King Turret
* Aperture Science

## Shuffling
I like to shuffle MOTD's around so that i get different MOTD every time I login. There's `motd.sh` file which contains simple `sh` script that I use for shuffling. It generates random number and then puts one of the fancy MOTDS in place of default MOTD file. Feel free to play around with this script to fit it for your system (This works fine on `FreeBSD 10.1`) and put it into startup script for your particular shell of choice

repository: mkalcok/fancyMOTD

repo_name: mkalcok/fancyMOTD


text:
# Midterm Project - Strawberry
This is for the midterm project in MA615 about Strawberry

Team member: Yuli Jin, Biyao Zhang, Xihao Cao, Jinyu Li

Explain what you may want to look at:
- Our presentation:
  - R markdown file: presentation_strawberry_team9.Rmd
  - html slides: presentation_strawberry_team9.html

- Our report:
  - R markdown file: Group9_Report.Rmd
  - pdf version: Group9_Report.pdf

- Our shiny:
  - r script: test_shiny.R
  - link: https://yulijin.shinyapps.io/midterm/


text:
# Peereview
GNAT GPS plug-in to make Peer Review using the GPS interface

INSTALL

To install it, move peereview.py and peereview.xml to {GPS install dir}/share/gps/plug-ins

GPS must be close and launch again if it was open when moving the files.

USAGE

To start a new subject of discution, right-click the line where you want to comment and go to Peereview->Add comment
Enter your comment and press enter.
It will now appear in the Locations window, so when you click it'll take you to the line that the comment was made

You can respond to a comment by right-clicking the line (or the error in Locations) and Peereview->Answer comment
This wil add a child line into the subject.

You can remove a subject by right-clicking the line (or the error in Locations) and Peereview->Close subject

All comments are kept in a file that is save along side with the GPR file.

repository: PedroWitzel/Peereview

repo_name: PedroWitzel/Peereview


text:
Django site_news's example project
====================

Simple project to display how to use django-site-news.

### Installation
Install using pip
```
$ pip install -r requirements.txt
$ python manage.py migrate  # Django 1.7+ and sqllite3 by default
$ python manage.py runserver <IP_ADDRESS>:8000
```
Go to http://localhost:8000


text:
This image runs a small node server that can execute any scripts on the specified server's directory via SSH.

Example request:
``` bash
curl http://localhost:3000/run/test?test_var=123
```

This is equivalent to running the following bash command (from the scripts directory):
``` bash
test_var=123 ./test
```

Environment Variables:
SSH_HOST: name or ip of host
SSH_USERNAME: username to access host
SSH_PASSWORD: password to access host
SCRIPT_DIR: directory path containing the script files.

Basic docker-compose.yml:

``` yaml
version: '3'
services:
  run-command:
    image: nathantreid/run-command
    environment:
      SSH_HOST: <IP_ADDRESS>
      SSH_USERNAME: myUser
      SSH_PASSWORD: password123
      SCRIPT_DIR: /scripts
    restart: always
    ports:
      - "3000:3000"
```

Sample docker-compose.yml for use with [Traefik](https://traefik.io/):

``` yaml
version: '3'
networks:
  web:
    external: true
services:
  run-command:
    image: nathantreid/run-command
    labels:
      - "traefik.backend=my-backend"
      - "traefik.frontend.rule=Host:api.mydomain.com;PathPrefix:/run/"
      - "traefik.port=3000"
      - "traefik.enable=true"
      - "traefik.docker.network=web"
      - "traefik.frontend.auth.basic=aUsername:$$2y$$05$$BtgBJv5cbUcuBoakDm7OXeU0cA8sriiduBqor2tD8EzVS2DvVWvCm"
    environment:
      SSH_HOST: <IP_ADDRESS>
      SSH_USERNAME: myUser
      SSH_PASSWORD: password123
      SCRIPT_DIR: /scripts
    restart: always
    networks:
      - web
```


text:
# `nz_import_dir_to_db`: import directory

## Description

 Import a directory into database. The directory must have a set of csv files

## Usage

```r
nz_import_dir_to_db(
  DSN,
  directory,
  table_name,
  value_type = "varchar",
  createTable = T,
  max_errors = 2
)
```

## Arguments

Argument      |Description
------------- |----------------
```DSN```     |     The NZ DSN object made by nz_init
```directory```     |     Directory of CSV files
```table_name```     |     Name of the table to import data into
```value_type```     |     The type of Value possible options float, varchar, integer, bigint
```createTable```     |     Either make a new table and drop table if exists or append data to the existing table
```max_errors```     |     The maximumn number of rows in the csv which can include error in their values

## Value

## Examples

```r
nz_import_dir_to_db()
```

repository: thespatiallabatLaurier/nzdggs

repo_name: thespatiallabatLaurier/nzdggs


text:
---
layout:     post
title:      "packto7bits.sh"
subtitle:   (a script for packing/unpacking 7-bit text)
date:       2018-12-12 08:00:00
author:     "JPLa"
header-img: "img/packto7bits.png"
---
I uploaded the `packto7bits.sh` script I used in [Tuning Binary Messages]({{ site.baseurl }}{% post_url 2018-10-29-Binary-Messages-Making-your-own-Fragments %}) so that you can repeat the example from that article.

----
You can find it on GitHub: [Opaali / tools / packto7bits](https://github.com/MiiKos/Opaali/blob/master/tools/packto7bits/)

----
(_This can also be useful for other purposes -- this week the newspapers reported about a __job ad__ that was encoded as 7-bit SMS PDU code to attract suitable geeky applicants._)

repository: MiiKos/Opaali

extension: markdown

repo_name: MiiKos/Opaali


text:
# SibApiV3Sdk.GetExtendedContactDetailsStatisticsDelivered

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**campaignId** | **Number** | ID of the campaign which generated the event |
**eventTime** | **String** | UTC date-time of the event |

gha_license_id: ISC


text:
[![npm](https://img.shields.io/npm/v/tsconfig-seek.svg?style=flat-square)](https://www.npmjs.com/package/tsconfig-seek) [![Test](https://github.com/seek-oss/tsconfig-seek/actions/workflows/test.yml/badge.svg)](https://github.com/seek-oss/tsconfig-seek/actions/workflows/test.yml)
[![Release](https://github.com/seek-oss/tsconfig-seek/actions/workflows/release.yml/badge.svg)](https://github.com/seek-oss/tsconfig-seek/actions/workflows/release.yml)

# tsconfig-seek

This package includes the shareable [tsconfig](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) configuration used by [SEEK](https://github.com/seek-oss/).

## Usage

First, install this package and make sure you use `typescript` v3.2+.

Then create a file named `tsconfig.json` in the root folder of your project:

```json
{
  "extends": "tsconfig-seek",
  "include": ["src/**/*.ts"],
  "compilerOptions": {
    // Override certain options on a project-by-project basis.
    "module": "es2015"
  }
}
```

For configuration options refer to [official guide](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) and [config schema](http://json.schemastore.org/tsconfig).

## License

MIT.

repository: seek-oss/tsconfig-seek

repo_name: seek-oss/tsconfig-seek


text:
# nexus

Nexus replicates arbitrary blobs of data across wide area networks (WANs) using
the [Raft consensus algorithm](https://raft.github.io/) by [etcd/raft](https://github.com/etcd-io/etcd/tree/master/raft)
onto pluggable storage backends.

It is intended to be used as a library for implementing synchronous replication
of data onto any given storage backend. Checkout the [examples](https://github.com/flipkart-incubator/nexus/raw/master/examples) directory for how this
can be achieved with few data stores.

## Features
- Synchronous replication of user-defined datasets
- Support for addition & removal of replicas at runtime
- Periodic data consistency checks across replicas [TODO]

## Dependencies
- Go version 1.13+
- [Raft consensus algorithm](https://raft.github.io/) by [etcd/raft](https://github.com/etcd-io/etcd/tree/master/raft) version 3.3+

[Coming Soon]

repository: AdityaPawade/nexus

repo_name: AdityaPawade/nexus


text:
# Haxe React Intl

A Haxe library offering externs for the [React-Intl](https://github.com/yahoo/react-intl) library.

React Intl provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.

## Documentation

The haxe documentation has not been written yet (PRs welcome!), but the [original React Intl wiki](https://github.com/yahoo/react-intl/wiki) covers most topics.

The main differences between using the javascript lib and this haxe lib are:

 * Components are in the [`react.intl.comp`](/src/react/intl/comp/) package.
 * `addLocaleData`, `defineMessages` and `injectIntl` are static methods from [`react.intl.ReactIntl`](/src/react/intl/ReactIntl.hx).
 * `intlShape` is available as [`react.intl.IntlShape`](/src/react/intl/IntlShape.hx) typedef for use in components `TProps`.

## Roadmap

 * [X] ReactIntl [methods](https://github.com/yahoo/react-intl/wiki/API)
 * [X] React Intl [components](https://github.com/yahoo/react-intl/wiki/Components)
 * [X] [Examples apps](https://github.com/yahoo/react-intl/tree/master/examples)
	 * [X] React-Router example
	 * [X] Translations example
 * [ ] README.md
 * [ ] Test suite / CI

repository: haxe-react/haxe-react-intl

repo_name: haxe-react/haxe-react-intl