text:
# Change Log for l10n
Creates translatable PO-Files, strong orientation to xgettext

## [Unreleased](http://github.com/mikemitterer/dart-l10n-gettext/compare/v2.0...HEAD)

### Feature
* initLanguageSetting shortens the init-section in main [09537d8](https://github.com/mikemitterer/dart-l10n-gettext/commit/09537d85e3a2eacbf0bf3a4e1cf2284417b30939)
* Easy translation with mkl10n [7c6f264](https://github.com/mikemitterer/dart-l10n-gettext/commit/7c6f264dc53270db6bcd84e9748c0e0ff195e141)

### Bugs
* Browser didn't show the right language if Browser-Language was just English [a05d0f2](https://github.com/mikemitterer/dart-l10n-gettext/commit/a05d0f21702ec26b54ec356623ce65ef44dfad52)
* Language does not change on client-side [23f6700](https://github.com/mikemitterer/dart-l10n-gettext/commit/23f6700cd1c8e5dad970ae4214fb0cf3f992f9b2)

### Docs
* Better documentation for example [1d30157](https://github.com/mikemitterer/dart-l10n-gettext/commit/1d30157b68f8cc5cad8f511161c22e991b0b8b11)
* Browser-Sample got a separate _initLanguageSettings-function [cb0734c](https://github.com/mikemitterer/dart-l10n-gettext/commit/cb0734c4e3b51fc43bf5beb816177155ec02e320)
* Typos in README [02c4201](https://github.com/mikemitterer/dart-l10n-gettext/commit/02c4201d9d5a17e698fdc174601083c20bc50ef9)

### Refactor
* loosened constraint to analyzer [2cabd6f](https://github.com/mikemitterer/dart-l10n-gettext/commit/2cabd6f42c3c20a6faa26bb983d8011335c4440e)

## [v1.4](http://github.com/mikemitterer/dart-l10n-gettext/compare/v1.3...v1.4) - 2018-08-29

### Refactor
* Preparing fort Dart II [b5525bc](https://github.com/mikemitterer/dart-l10n-gettext/commit/b5525bc10a94913336cbd19426b505f9c9b276ca)

## [v1.3](http://github.com/mikemitterer/dart-l10n-gettext/compare/v1.2...v1.3) - 2018-06-06

### Feature
* Dart 2.x ready [b8bc367](https://github.com/mikemitterer/dart-l10n-gettext/commit/b8bc367dbf0a58530e9a4478c18d6c88d46d52ba)

### Docs
* Readme in cmdline-sample [5e39385](https://github.com/mikemitterer/dart-l10n-gettext/commit/5e39385ff0720bdfc7d449d5dd414fb49b767fba)
* cmdline-Sample added [512d28c](https://github.com/mikemitterer/dart-l10n-gettext/commit/512d28cd07cfee29511a965214220f6c9a51460e)

### Refactor
* Dependency update [7b9ecc7](https://github.com/mikemitterer/dart-l10n-gettext/commit/7b9ecc715bc319f5d22d4dc6e0077d12b620b628)

## [v1.1.0](http://github.com/mikemitterer/dart-l10n-gettext/compare/v1.0.1...v1.1.0) - 2017-09-01

### Feature
* l10 in String interpolation [3a590dc](https://github.com/mikemitterer/dart-l10n-gettext/commit/3a590dc745f1f4e65f3eae384f811c22e049f479)

### Docs
* Usage in README [cb711d1](https://github.com/mikemitterer/dart-l10n-gettext/commit/cb711d143796a0ab12cf614438ebe7a8badf234a)
* Cleanup + prepearing a new test-sample [7add301](https://github.com/mikemitterer/dart-l10n-gettext/commit/7add301d1a7278c15895197df4566aabbfb43ea8)

## [v1.0.1](http://github.com/mikemitterer/dart-l10n-gettext/compare/v1.0.0...v1.0.1) - 2017-08-25

### Docs
* Syntax in Readme [10027e1](https://github.com/mikemitterer/dart-l10n-gettext/commit/10027e14b07980e300775e2727c65946bf201243)

## [v1.0](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.19.2...v1.0) - 2017-08-25

### Feature
* xgettext is Depreciated - mkl10n writes the POT-File [8727b6e](https://github.com/mikemitterer/dart-l10n-gettext/commit/8727b6e6d083f3f9bad0f8043ecf97956ce6c386)

## [v0.19.2](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.19.1...v0.19.2) - 2017-08-23

### Docs
* Readme updated [6d184d7](https://github.com/mikemitterer/dart-l10n-gettext/commit/6d184d7b5e0a16f61aee064e544f21c704ca0103)

## [v0.19.1](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.19.0...v0.19.1) - 2017-08-23

### Docs
* New sample-video, better README [79f985d](https://github.com/mikemitterer/dart-l10n-gettext/commit/79f985d572985f11e1c32d7cbefdb5156a387af5)
* cmdline-Sample added [406e9a5](https://github.com/mikemitterer/dart-l10n-gettext/commit/406e9a5870c6bb57b529073c46f6355713d2b4fc)

## [v0.19.0](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.18.0...v0.19.0) - 2017-08-23

### Feature
* Define settings in Settings-File (.mkl10n.yaml), Sort output by file location [1e18a7e](https://github.com/mikemitterer/dart-l10n-gettext/commit/1e18a7e159b1b9c86b4fee43f7c3b0bffffe9ca0)

## [v0.18.0](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.17.0...v0.18.0) - 2017-08-22

### Docs
* Better documentation [61426f3](https://github.com/mikemitterer/dart-l10n-gettext/commit/61426f3f2b169c85393b71471012744c0c155200)

## [v0.17.0](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.16.4...v0.17.0) - 2017-08-17

### Feature
* External programs are now a subclass of ShellCommand, structure improved [3fc1c82](https://github.com/mikemitterer/dart-l10n-gettext/commit/3fc1c82104ea967fbd45a13ec0192405159d8941)

## [v0.16.4](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.16.3...v0.16.4) - 2016-11-16

### Docs
* Strong-Mode support, README improved [5532669](https://github.com/mikemitterer/dart-l10n-gettext/commit/5532669a19e08d9ec71f5280975be2f847ba1403)

## [v0.16.2](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.16.1...v0.16.2) - 2015-12-16

### Docs
* More documentation for translate + sample [3f0445b](https://github.com/mikemitterer/dart-l10n-gettext/commit/3f0445b8a58bb2095b41e87c7419cafa687ed4d6)

## [v0.16.1](http://github.com/mikemitterer/dart-l10n-gettext/compare/v0.16...v0.16.1) - 2015-12-04

### Docs
* Grinder + new test-format [f0fbeff](https://github.com/mikemitterer/dart-l10n-gettext/commit/f0fbeff3f2b5e24ffccdb077bd2cef75bfee3418)

This CHANGELOG.md was generated with [**Changelog for Dart**](https://pub.dartlang.org/packages/changelog)


text:
![CI](https://github.com/esx/to-esx/workflows/CI/badge.svg)

# to-esx

Converts JSX and `React.createElement` into [esx](https://github.com/esxjs/esx)

The basis of:

* [`esx-optimize`](https://github.com/esxjs/esx-optimize)
* [`babel-plugin-esx-ssr`](https://github.com/esxjs/babel-plugin-esx-ssr)

## API

### `convert(source) => String`

Accepts source code as a string, returns the converted source.

## Contributions

`esx` is an **OPEN Open Source Project**. This means that:

> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the [CONTRIBUTING.md](https://github.com/esxjs/esx/blob/master/CONTRIBUTING.md) file for more details.

## License

[MIT](./LICENSE)

license: MIT

repository: antonioru/to-esx

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: antonioru/to-esx


text:
# Auth0 SSO Demo

This sample demonstrates how to configure your Universal Login Page to automatically sign in if you have an SSO session without passing prompt=none

## Getting Started

If you haven't already done so, [sign up](https://auth0.com) for your free Auth0 account and create a new client in the [dashboard](https://manage.auth0.com).
* Find the **domain** and **client ID** from the settings area and add the URL for your application to the **Allowed Callback URLs** box.
* If you are serving the application with the provided `serve` library, you will need to add '<IP_ADDRESS> test.local' to your hosts file and then the URL for allowedCallbacks is `http://test.local:3000`.
* Add 'http://test.local:3000' to your Allowed Logout URLs in your tenant settings (upper right drop down menu->Settings->Advanced)*[]:
* Clone this repo.

```bash
cd demoSSO
yarn install
```

## Set the Client ID and Domain

Rename the `auth0-variables.sample.js` file to `auth0-variables.js` and provide the **client ID** and **domain** there.

## Initialize your Universal Login Page

* Log into manage.auth0.com
* Click Hosted Pages
* Make sure that "Customize Login Page" is turned on
* Copy the contents of universalLoginPage.html to the code box
* Click Save

## Run the Application

The `serve` module provided with this sample can be run with the `start` command.

```bash
yarn run start
```

The application will be served at `http://test.local:3000`.

## How to Test that SSO is working

Logging in the first time should create your SSO session.
When you are returned to the page, click "Kill Session", this will remove your application browser session, but not your Auth0 SSO session.  Refreshing the page should leave you logged out, but if you click Login, you should automatically log in without having to enter credentials.
When you click "Logout" it will kill your SSO session, clicking login should prompt you to enter your credentials.

## What is Auth0?

Auth0 helps you to:

* Add authentication with [multiple authentication sources](https://docs.auth0.com/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, amont others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**.
* Add authentication through more traditional **[username/password databases](https://docs.auth0.com/mysql-connection-tutorial)**.
* Add support for **[linking different user accounts](https://docs.auth0.com/link-accounts)** with the same user.
* Support for generating signed [Json Web Tokens](https://docs.auth0.com/jwt) to call your APIs and **flow the user identity** securely.
* Analytics of how, when and where users are logging in.
* Pull data from other sources and add it to the user profile, through [JavaScript rules](https://docs.auth0.com/rules).

## Create a free Auth0 account

1. Go to [Auth0](https://auth0.com/signup) and click Sign Up.
2. Use Google, GitHub or Microsoft Account to login.

## Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.

## Author

[Auth0](https://auth0.com)

## License

This project is licensed under the MIT license. See the [LICENSE](LICENSE.txt) file for more info.

repository: sandeepneerarambham/demo-sso

repo_name: sandeepneerarambham/demo-sso


text:
# Object Oriented Design

* [The Principles of OOD](http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod)
* [The Liskov Substitution Principle](http://web.archive.org/web/20110722014513/http://www.objectmentor.com/resources/articles/lsp.pdf)

# Refactoring

* [Refactoring at SourceMaking](http://sourcemaking.com/refactoring)

license: Unlicense

repository: nikolaygit/webdev

repo_name: nikolaygit/webdev


text:
# Recovering Ethereum from a Celo Address

In this guide, steps are outlined to help you recover your [Ethereum](https://en.wikipedia.org/wiki/Ethereum#Addresses) if you accidentally transferred them to a [CELO (previously Celo Gold)](../overview.md#background-and-key-concepts).

## Prerequisites

This guide assumes that you have access to the following:

- The [24-word recovery phrase](https://kb.myetherwallet.com/en/security-and-privacy/what-is-a-mnemonic-phrase/) of your Celo address
- MyEtherWallet

{% hint style="danger" %}
There are [risks](https://www.cryptomathic.com/news-events/blog/cryptographic-key-management-the-risks-and-mitigations) associated with using a recovery phrase or a private key. Please do not share them with anyone else.
{% endhint %}

## Steps

Please follow the instructions below closely, because missteps can lead to errors or permanent loss of your tokens. To understand these steps, please read [What is Ethereum](https://ethereum.org/en/what-is-ethereum/) and [Celo Overview](https://docs.celo.org/overview).

### Recover your Celo address on Ethereum with Mnemonic

Recover your Celo address on the Ethereum network:

1. Download MyEtherWallet for Desktop (It is recommended to use the Desktop version over a webapp version)
2. Click on "Access My Wallet"
3. Click on "Access By Mnemonic Phrase"
4. Enter the 24-word recovery phrase for Celo
5. You should now have access to the same address on Ethereum, where you can recover the Ethereum you accidentally sent to your Celo address.

repository: szym/celo-monorepo

repo_name: szym/celo-monorepo


text:
# dbreak
A development database debugging tool that lets you set breakpoints and issue direct queries to one or more databases. Extensible via plugins to allow you to query a wide range of database types, both SQL and NoSQL.

Requires Python 3.6+

## Installation
Install from PyPi using pip:

```
pip install dbreak
```
The base dbreak package includes support for DB API-compliant connections, such as the following:

* sqlite3 (built-in)
* psycopg2
* pymysql

Add support for additional connection types by installing plugins:

* [dbreak-sqlalchemy](https://github.com/jrhege/dbreak-sqlalchemy)
* [dbreak-redis](https://github.com/jrhege/dbreak-redis)

## Usage
Your main interaction will be with the show_console() function. This pauses the application and lets you query any database connections you've provided.

### Basic Usage
Example using a SQLite in-memory database:
```
import sqlite3
import dbreak

# Set up a SQLite connection as you normally would
connection = sqlite3.connect(":memory:")

# Add a table
connection.execute("create table foobar(x int, y int)")

# Add a row
connection.execute("insert into foobar select 1, 2")

# Pause execution and enter the console
dbreak.start_console(connection)
```

Once the start_console command is encountered you'll enter an interactive console where you can query the database using the connections you've provided:

```
Starting debug session on connection 'db[0]'.
You may issue database commands by simply typing them and pressing enter.

Use !help for a list of special commands.
Use !exit to quit the debugger and resume the application.

db[0]> select * from foobar

===  ===
  x    y
===  ===
  1    2
===  ===
(1 row(s) returned)
```

### Multiple Connections
If you have multiple database connections, you can name them via arguments to the show_console() command for easier access in the shell. Connections can be of the same type or different (for example, one shell could handle connections to both MySQL and Redis databases).

Example using two SQLite connections:

```
import sqlite3
import dbreak

# Set up a couple of SQLite connections
connection1 = sqlite3.connect(":memory:")
connection2 = sqlite3.connect(":memory:")

# Pause execution and enter the console
dbreak.start_console(
    conn1=connection1,
    conn2=connection2,
    starting_connection="conn1"
)
```
The `starting_connection` parameter takes a string that indicates what connection the shell should use initially. The other parameters act as names for the connections and can be anything you want.

Once inside the shell you can then use special commands (described via !help) to list and switch between the connections:

```
Starting debug session on connection 'conn1'.
You may issue database commands by simply typing them and pressing enter.

Use !help for a list of special commands.
Use !exit to quit the debugger and resume the application.

conn1> !connections

=================  ==============  =======================  ======================
Connection Name    Wrapper Type    Raw Connection Module    Raw Connection Class
=================  ==============  =======================  ======================
conn1              DBAPIWrapper    sqlite3                  Connection
conn2              DBAPIWrapper    sqlite3                  Connection
=================  ==============  =======================  ======================
(2 row(s) returned)

conn1> !switch conn2
conn2>
```
Note that the name of the current connection is shown at the input prompt.

repository: jrhege/dbreak

repo_name: jrhege/dbreak


text:
# dotfiles
My personal [dotfiles](https://dotfiles.github.io/). I'll be adding more as time goes on.

Created via [Atlassian's guide](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/).

Licensed under [MIT](LICENSE).

# To install
Follow [Atlassian's guide](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/) (specifically the section where you install to a new system or migrating to the setup).

```
Note: These dotfiles are specifically made for my systems,
so these might not work properly, or not at all. Your mileage may vary.
```

repository: akmijares/dotfiles

repo_name: akmijares/dotfiles


text:
# Density

- How much mass there is per volume
  - Mass divided by volume

## Densities of Common Materials

| Material        | Density ($g/cm^3$) |
| --------------- | ------------------ |
| Gold            | 19.3               |
| Lead            | 11.3               |
| Iron            | 7.9                |
| Earth (bulk)    | 5.5                |
| Rock (typical)  | 2.5                |
| Water           | 1                  |
| Wood (typical)  | 0.8                |
| Insulating foam | 0.1                |
| Silica gel      | 0.02               |

[[Physics]]

branch_name: refs/heads/main

gha_language: TypeScript


text:
GeoMesa Accumulo Quick Start
============================

This tutorial is the fastest and easiest way to get started with GeoMesa.  It is
a good stepping-stone on the path to the other tutorials that present
increasingly involved examples of how to use GeoMesa.

In the spirit of keeping things simple, the code in this tutorial only does a
few small things:

1.  establishes a new (static) SimpleFeatureType
2.  prepares the Accumulo table to store this type of data
3.  creates a few hundred example SimpleFeatures
4.  writes these SimpleFeatures to the Accumulo table
5.  queries for a given geographic rectangle, time range, and attribute filter,
    writing out the entries in the result set

The only dynamic element in the tutorial is the Accumulo destination; that is
a property that you provide on the command-line when running the code.

Prerequisites
-------------

Before you begin, you must have the following:

* an instance of Accumulo 1.5, 1.6 or 1.7 running on Hadoop 2.2 or better
* an Accumulo user that has both create-table and write permissions
* the GeoMesa Accumulo distributed runtime [installed for your Accumulo instance](http://www.geomesa.org/documentation/user/installation_and_configuration.html#installing-the-accumulo-distributed-runtime-library)
* a local copy of the [Java](http://java.oracle.com/) JDK 8
* Apache [Maven](http://maven.apache.org/) installed
* a GitHub client installed

Download and Build the Tutorial
--------------------------

Pick a reasonable directory on your machine, and run:

```bash
$ git clone https://github.com/geomesa/geomesa-tutorials.git
$ cd geomesa-tutorials
```

To build, run

```bash
$ mvn clean install -pl geomesa-quickstart-accumulo
```

> :warning: Note: ensure that the version of Accumulo, Hadoop, etc in the root `pom.xml` match your environment.

<span/>

> :warning: Note: depending on the version, you may also need to build GeoMesa locally.
> Instructions can be found [here](https://github.com/locationtech/geomesa/).

About this Tutorial
-------------------

The QuickStart operates by inserting and then querying 1000 features.  After the insertions are complete,
a sequence of queries are run to demonstrate different types of queries possible via the GeoTools API.

Run the Tutorial
----------------

On the command-line, run:

```bash
$ java -cp geomesa-quickstart-accumulo/target/geomesa-quickstart-accumulo-${geomesa.version}.jar \
  com.example.geomesa.accumulo.AccumuloQuickStart \
  -instanceId <instance>                          \
  -zookeepers <zookeepers>                        \
  -user <user>                                    \
  -password <password>                            \
  -tableName <table>
```

where you provide the following arguments:

* ```<instance>``` the name of your Accumulo instance
* ```<zookeepers>``` your Zookeeper nodes, separated by commas
* ```<user>``` the name of an Accumulo user that has permissions to create, read and write tables
* ```<password>``` the password for the previously-mentioned Accumulo user
* ```<table>``` the name of the destination table that will accept these test records; this table should either not exist or should be empty

> :warning: If you have set up the GeoMesa Accumulo distributed runtime to be isolated within
> a namespace [as described in the GeoMesa installation guide](http://www.geomesa.org/documentation/user/installation_and_configuration.html#for-accumulo-1-6),
> the value of ``<table>`` should include the namespace (e.g. ``myNamespace.geomesa``).

You should see output similar to the following (not including some of Maven's output and log4j's warnings):

    Creating feature-type (schema):  QuickStart
    Creating new features
    Inserting new features
    Submitting query
    1.  Bierce|640|Sun Sep 14 15:48:25 EDT 2014|POINT (-77.36222958792739 -37.13013846773835)|null
    2.  Bierce|886|Tue Jul 22 14:12:36 EDT 2014|POINT (-76.59795732474399 -37.18420917493149)|null
    3.  Bierce|925|Sun Aug 17 23:28:33 EDT 2014|POINT (-76.5621106573523 -37.34321201566148)|null
    4.  Bierce|589|Sat Jul 05 02:02:15 EDT 2014|POINT (-76.88146600670152 -37.40156607152168)|null
    5.  Bierce|394|Fri Aug 01 19:55:05 EDT 2014|POINT (-77.42555615743139 -37.26710898726304)|null
    6.  Bierce|931|Fri Jul 04 18:25:38 EDT 2014|POINT (-76.51304097832912 -37.49406125975311)|null
    7.  Bierce|322|Tue Jul 15 17:09:42 EDT 2014|POINT (-77.01760098223343 -37.30933767159561)|null
    8.  Bierce|343|Wed Aug 06 04:59:22 EDT 2014|POINT (-76.66826220670282 -37.44503877750368)|null
    9.  Bierce|259|Thu Aug 28 15:59:30 EDT 2014|POINT (-76.90122194030118 -37.148525741002466)|null
    Submitting secondary index query
    Feature ID Observation.859 | Who: Bierce
    Feature ID Observation.355 | Who: Bierce
    Feature ID Observation.940 | Who: Bierce
    Feature ID Observation.631 | Who: Bierce
    Feature ID Observation.817 | Who: Bierce
    Submitting secondary index query with sorting (sorted by 'What' descending)
    Feature ID Observation.999 | Who: Addams | What: 999
    Feature ID Observation.996 | Who: Addams | What: 996
    Feature ID Observation.993 | Who: Addams | What: 993
    Feature ID Observation.990 | Who: Addams | What: 990
    Feature ID Observation.987 | Who: Addams | What: 987

The quick start code may also be run via Maven using the ``live-test`` profile:

```bash
$ mvn -Plive-test exec:exec -DinstanceId=<instance> -Dzookeepers=<zookeepers> -Duser=<user> -Dpassword=<password> -DtableName=<tableName>
```

Looking at the Code
-------------------

The source code is meant to be accessible for this tutorial, but here is
a high-level breakdown of the methods in the ``AccumuloQuickStart``
class that are relevant:

* ``getCommonRequiredOptions`` helper code to establish the
   command-line parser for Accumulo options
* ``getAccumuloDataStoreConf`` create a ``HashMap`` of Accumulo
   parameters that will be used to fetch a ``DataStore``
* ``createSimpleFeatureType`` defines the custom ``FeatureType`` used
   in the tutorial. There are five fields: Who, What, When, Where, and
   Why.
* ``createNewFeatures`` creates a collection of new features, each of
   which is initialized to some randomized set of values
* ``insertFeatures`` instructs the ``DataStore`` to write the
   collection of new features to the GeoMesa-managed Accumulo table
* ``createFilter`` given a set of geometric bounds, temporal bounds,
   and an optional attribute-only expression, construct a common query
   language (CQL) filter that embodies these constraints. This filter
   will be used to query data.
* ``queryFeatures`` query for records; for each, print out the five
   field (attribute) values
* ``secondaryIndexExample`` additional examples that build other CQL
   queries
* ``main`` this is the main entry point; it collects command-line
   parameters, builds the ``DataStore``, creates and inserts new
   records, and then kicks off a single query

Visualize Data With GeoServer
-----------------------------

### Register the GeoMesa store with GeoServer

Log into GeoServer using your user and password credentials. Click
"Stores" and "Add new Store". If you do not see the Accumulo Feature
Data Store listed under Vector Data Sources, ensure the plugin is in the
right directory and restart GeoServer.

Select the ``Accumulo Feature Data Store`` vector data source, and enter
the following parameters:

* basic store info
  * ``workspace`` this is dependent upon your GeoServer installation
  * ``data source name`` pick a sensible name, such as, ``geomesa_quick_start``
  * ``description`` this is strictly decorative; ``GeoMesa quick start``
* connection parameters
  * these are the same parameter values that you supplied on the
    command-line when you ran the tutorial; they describe how to
    connect to the Accumulo instance where your data reside

Click "Save", and GeoServer will search your Accumulo table for any
GeoMesa-managed feature types.

### Publish the layer

GeoServer should recognize the ``QuickStart`` feature type, and should
present that as a layer that could be published. Click on the "Publish"
link.

You will be taken to the Edit Layer screen. Two of the tabs need to be
updated: Data and Dimensions.

In the Data pane, enter values for the bounding boxes. In this case, you
can click on the link to compute these values from the data.

In the Dimensions tab, check the "Enabled" checkbox under Time. Then
select "When" in the Attribute and End Attribute dropdowns, and
"Continuous Interval" in the Presentation dropdown.

Click on the "Save" button when you are done.

### Take a look

Click on the "Layer Preview" link in the left-hand gutter. If you don't
see the quick-start layer on the first page of results, enter the name
of the layer you just created into the search box, and press <Enter>.

Once you see your layer, click on the "OpenLayers" link, which will open
a new tab. By default, the display that opens will not show all the
data, because we have enabled the time dimension for this layer, but the
preview does not specify a time. In the URL bar for the visualization,
add the following to the end:

``&TIME=2014-01-01T00:00:00.000Z/2014-01-31T23:59:59.999Z``

That tells GeoServer to display the records for the entire month of January
2014. You can find more information about the TIME parameter from
[GeoServer's documentation](http://docs.geoserver.org/latest/en/user/services/wms/time.html).

Once you press <Enter>, the display will update, and you should see a
collection of red dots similar to the following image.

![Visualizing quick-start data](../assets/geomesa-quickstart-accumulo/geoserver-layer-preview.png)

### Tweaking the display

Here are just a few simple ways you can play with the visualization:

* Click on one of the red points in the display, and GeoServer will
  report the detail records underneath the map area.
* Shift-click to highlight a region within the map that you would like
  to zoom into.
* Alter the ``TIME=`` parameter in the URL to a different date range,
  and you can filter to see only the records that satisfy the temporal
  constraint.
* Click on the "Toggle options toolbar" icon in the upper-left corner
  of the preview window. The right-hand side of the screen will include
  a "Filter" text box. Enter ``Who = 'Bierce'``, and press on the
  "play" icon. The display will now show only those points matching
  your filter criterion. This is a CQL filter, which can be constructed
  in various ways to query our data. You can find more information
  about CQL from [GeoServer's CQL tutorial](http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html).

### Generating Heatmaps

* To try out the DensityIterator, you can install the Heatmap SLD from
  the [GDELT Tutorial](../geomesa-examples-gdelt).
* After configuring the SLD, in the URL, change ``styles=`` to be
  ``styles=heatmap&density=true``. Once you press <Enter>, the display
  will change to a density heat-map. (NB: For this to work, you will
  have to first install the WPS module for GeoServer. See the official
  web site for a download.)

repository: geoHeil/geomesa-tutorials

repo_name: geoHeil/geomesa-tutorials


text:
# dockerapplifecycle

**Note**: This repository should be imported as `code.cloudfoundry.org/dockerapplifecycle`.

The docker app lifecycle implements a Docker deployment strategy for Cloud
Foundry on Diego.

The **Builder** extracts the start command and execution metadata from the docker image.

The **Launcher** executes the start command with the correct cloudfoundry and docker enviroment.

Read about the app lifecycle spec here: https://github.com/cloudfoundry/diego-design-notes#app-lifecycles

repository: PaaS-TA/PaaS-TA-Core

gha_language: Go

repo_name: PaaS-TA/PaaS-TA-Core


text:
---
title: reproducer (1)
date: 2020-05-07
---
Example Python program reproducer (1).py
Python version 3.x or newer.
To check the Python version use:

    python --version

## Modules

* import _multiprocessing
* import multiprocessing

## Methods

* def main():

## Code

Python example

    import _multiprocessing
    import multiprocessing

    q = multiprocessing.Queue()

    COUNT = 2**15 - 1

    if COUNT > _multiprocessing.SemLock.SEM_VALUE_MAX:
        print('It is going to lock up')
    else:
        print('It should be fine. Wait about 2 seconds.')

    def main():
        for i in range(COUNT):
            q.put(i)

        for i in range(COUNT):
            q.get(i)

    main()

    # This is the sample when it locks up.

    #2907 Thread_25011567   DispatchQueue_1: com.apple.main-thread  (serial) ########## <---------------------- main thread, blocked on acquire of semaphore in .put (self._sem of Queue)
    #+ 2907 start  (in libdyld.dylib) + 1  [0x7fff895f55c9]
    #+   2907 Py_Main  (in Python) + 3051  [0x10b90eb23]
    #+     2907 PyRun_SimpleFileExFlags  (in Python) + 769  [0x10b8fd3fd]
    #+       2907 PyRun_FileExFlags  (in Python) + 133  [0x10b8fd860]
    #+         2907 ???  (in Python)  load address 0x10b85a000 + 0xa37bd  [0x10b8fd7bd]
    #+           2907 PyEval_EvalCode  (in Python) + 54  [0x10b8dd7d7]
    #+             2907 PyEval_EvalCodeEx  (in Python) + 1413  [0x10b8ddd62]
    #+               2907 PyEval_EvalFrameEx  (in Python) + 13389  [0x10b8e13e3]
    #+                 2907 ???  (in Python)  load address 0x10b85a000 + 0x8a57d  [0x10b8e457d]
    #+                   2907 PyEval_EvalCodeEx  (in Python) + 1413  [0x10b8ddd62]
    #+                     2907 PyEval_EvalFrameEx  (in Python) + 14387  [0x10b8e17c9]
    #+                       2907 sem_wait  (in libsystem_kernel.dylib) + 10  [0x7fff827c97ba]
    #2907 Thread_25011569                                                  ############## <------------------- Queue's internal "feeder thread", blocked on a pipe write
    #  2907 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff871dd41d]
    #    2907 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x7fff871df1e5]
    #      2907 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x7fff871df268]
    #        2907 ???  (in Python)  load address 0x10b85a000 + 0xb6882  [0x10b910882]
    #          2907 PyEval_CallObjectWithKeywords  (in Python) + 93  [0x10b8e3d6b]
    #            2907 PyObject_Call  (in Python) + 99  [0x10b8642ac]
    #              2907 ???  (in Python)  load address 0x10b85a000 + 0x150cf  [0x10b86f0cf]
    #                2907 PyObject_Call  (in Python) + 99  [0x10b8642ac]
    #                  2907 ???  (in Python)  load address 0x10b85a000 + 0x2830a  [0x10b88230a]
    #                    2907 PyEval_EvalCodeEx  (in Python) + 1413  [0x10b8ddd62]
    #                      2907 PyEval_EvalFrameEx  (in Python) + 13389  [0x10b8e13e3]
    #                        2907 ???  (in Python)  load address 0x10b85a000 + 0x8a60e  [0x10b8e460e]
    #                          2907 PyEval_EvalFrameEx  (in Python) + 13389  [0x10b8e13e3]
    #                            2907 ???  (in Python)  load address 0x10b85a000 + 0x8a60e  [0x10b8e460e]
    #                              2907 PyEval_EvalFrameEx  (in Python) + 10788  [0x10b8e09ba]
    #                                2907 PyObject_Call  (in Python) + 99  [0x10b8642ac]
    #                                  2907 ???  (in Python)  load address 0x10b85a000 + 0x2830a  [0x10b88230a]
    #                                    2907 PyEval_EvalCodeEx  (in Python) + 1413  [0x10b8ddd62]
    #                                      2907 PyEval_EvalFrameEx  (in Python) + 15766  [0x10b8e1d2c]
    #                                        2907 ???  (in _multiprocessing.so)  load address 0x10bbdc000 + 0x13c0  [0x10bbdd3c0]
    #                                          2907 ???  (in _multiprocessing.so)  load address 0x10bbdc000 + 0x1a2d  [0x10bbdda2d]
    #                                            2907 write  (in libsystem_kernel.dylib) + 10  [0x7fff827c9c22]

## Useful Links

- Articles: https://python-commandments.org/
- Python shell: https://bsdnerds.org/learn-python/
- Tutorial: https://pythonprogramminglanguage.com/

repository: importostar/boilerplate

path: /source/reproducer (1).md

filename: reproducer (1).md

repo_name: importostar/boilerplate


text:
Clay Command Line Tool
========

Command Line tool to build and Publish Web and Mobile Applications

## What is clay

Clay is used to publish pages, apps and content to the web fast and easy.

Clay can also be used to build javascript/html5 apps with a streamlined process that takes advantage of gulp plugins.

## How can I use Clay

First setup your project, then use clay and gulp plugin to automate the most repetitive tasks while building apps and finally use Clay to upload the project to the web.

## Creating an App
After registering with Clay - create and app using `clay create APP_NAME` where APP_NAME is the name of your app.

Once you are ready to `clay preview` your app - it will be available in APP_NAME.3votapp.com - where APP_NAME is the name of your app.

Then from your domain - simply create a CNAME record that points to APP_NAME.3votapp.com. Once that's done you'll be able to run apps from http://smile.cocacola.com for example.

## Gulp and Plugins
Use project http://github.com/3vot/r3_demo to setup your new project.

Gulp is optional and completely under developers control - in the end what Clay does is it gets the contents of the `dist` folder and uploads it.

## Salesforce
Clay is useful to build Salesforce Applications based in Visualforce - it contains a set of plugins to login, run a local server, upload visualforce pages and static resources.

It operates the whole livecycle of the app from development to deployment - apps can be build like regular HTML5/Javascript apps and then published to Salesforce/Salesforce1 as Visualforce Pages.

Use project http://github.com/3vot/vf_demo to setup your new project.

## Commands

### clay
Runs the default Gulp task - is similar as running gulp.

### clay preview
Runs the `gulp dist` task if it exists and then uploads the contents of the `dist` folder into APP_NAME_stage.3votapp.com.

The preview adds a _stage suffix to APP_NAME, this is done so we are able to have a staging sharable version.

### clay publish
Runs the `gulp dist` task if it exists and then uploads the contents of the `dist` folder into APP_NAME.3votapp.com.

## Salesforce Commands

Salesforce commands are similar - just add the salesforce keyword

`clay salesforce` - starts local development server

`clay salesforce publish` - published contents of `dist` folder as visualforce page + static resources

## Gulp Tasks
To run a gulp task from Clay - simply type the task name after clay. `clay images` - just make sure the task's name is not salesforce, preview or publish.

## .env file
Every project needs to have a .env file - this file contains project specific information. Here is an example:
```
```

Make sure to add the `.env` file entry to `.gitignore` file on the projects root.

## .env file for Salesforce
When used in Salesforce the .env file also requires the options SF_USERNAME, SF_PASSWORD AND SF_HOST. SF_PASSWORD may include the security token right after the password.

gha_language: JavaScript


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

# Order Respecting the Sale of the Shares of The de Havilland Aircraft of Canada, Limited by the Canada Development Investment Corporation

**SOR/86-60**

Enabling authorities:
- [FINANCIAL ADMINISTRATION ACT](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-11.md)

Date registered: 20 December 1985

----------

Her Excellency the Governor General in Council, on the recommendation of the Minister of Regional Industrial Expansion and the Treasury Board, pursuant to paragraphs 101(1)(d)[*] and 108(2)(b)[*] of the [Financial Administration Act](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-11.md), is pleased hereby to make the annexed Order respecting the sale of the shares of The de Havilland Aircraft of Canada, Limited by the Canada Development Investment Corporation.

*: S.C. 1984, c. 31, s. 11

## Short Title

**1** This Order may be cited as The de Havilland Shares Sale Order.

## Authorization

**2** The Canada Development Investment Corporation is authorized to sell the 31,999 Class A shares and 10,000 Class B common shares of The de Havilland Aircraft of Canada, Limited that it holds on behalf of Her Majesty in right of Canada to The Boeing Company on terms and conditions that substantially incorporate the provisions set out in section 3 of the Letter of Intent signed by Her Majesty in right of Canada, the Canada Development Investment Corporation and The Boeing Company on November 28, 1985 and that incorporate the terms of the decision of the Treasury Board.
> SOR/90-123, s. 2.

repository: TravisMadill/CanadianLaws

path: /en/Regulations/Statutory Orders and Regulations/86/60.md

repo_name: TravisMadill/CanadianLaws


text:
[![wercker status](https://app.wercker.com/status/65a1ed067b4b857b631988e0356cde86/s/master "wercker status")](https://app.wercker.com/project/byKey/65a1ed067b4b857b631988e0356cde86)
[![Go Report Card](https://goreportcard.com/badge/github.com/oracle/navarkos?)](https://goreportcard.com/report/github.com/oracle/navarkos)

# Navarkos

Navarkos acts as a mediator between demand (deployment replicas) and supply (federated clusters). When you are deploying an application to a group of clusters, you need a way to distribute replicas of that application to multiple clusters. Navarkos helps in re-balancing replica allocation among clusters to optimize usage or load by analyzing:

 -	what clusters are there and how they are currently used for applications,
 -	how much capacity must be allocated for each cluster, and
 -	which cluster is best suited for the application.

Navarkos is best used in tandem with [cluster-manager](https://github.com/oracle/cluster-manager) to help re-balance demand by performing life cycle operations on clusters, which is achieved either by provisioning more capacity (Provision/Scale up) or removing excessive allocated capacity (Scale Down/Shutdown) i.e. its provides application-aware infrastructure.

## Before You Begin

The [default Scheduling](https://kubernetes.io/docs/tasks/administer-federation/deployment/#spreading-replicas-in-underlying-cluster) provided as part of the [Federation project](https://github.com/kubernetes/federation) distributes replica equally among Federated clusters, but it doesn't provide application-aware infrastructure.

Navarkos works on re-balancing, after initial equal distribution and persists that by updating [ReplicaAllocationPreferences](https://github.com/kubernetes/federation/blob/master/apis/federation/types.go) annotation on the deployment.

Figure:1 Navarkos with cluster-manager Architecture

The above architecture diagram shows how Navarkos works with cluster-manager. Navarkos communicates with cluster-manager for life cycle operations by requesting state change in the form of a cluster annotation.

When used with cluster-manager, Navarkos provides following advantages over default scheduling:

- **Consistency**: Cluster capabilities consistency (ingress, nodes, network)
- **Manageability**: Automated cluster life-cycle management
- **Portability**: Trivially move workloads from one set of clusters to another
- **Cost**: offline when idle, scale workload with application awareness
- **Compliance**: Ensure application is run where and how it needs to be
- **Multi-cloud**: Manage application independently of cloud provider
- **Global Scale**: Run your application wherever there is demand
- **Hybrid**: Allows for private & public clusters to work together dynamically

## Build

requirements:

- Go 1.8.x (Note: Go 1.9 with glide will have nested dependency errors on `glide up -v`)
- Glide 0.12+ (0.12.3 and 0.13.0 are the tested versions)
- Docker (Multi-stage builds requires Docker 17.05 or higher on the daemon and client.)

get source:
- `export K8S_INCUBATOR_DIR="$GOPATH/src/github.com/kubernetes-incubator"`
- `mkdir -p $K8S_INCUBATOR_DIR`
- `cd $K8S_INCUBATOR_DIR`
- `git clone https://github.com/oracle/navarkos`

build:
- `make build-local` will clean up, builds the navarkos binary and runs locally.
- `make build-image` will invoke 'build-local' and builds navarkos docker image, which is suitable for deploying to Kubernetes.
- `make build-docker` will cleanup and builds docker image containing navarkos binary, which is suitable for deploying to Kubernetes. Resultant docker image is produced using the multi-stage build docker file.
- `make check` will fmt, vet and unit test the code.

## Deploy

Follow [deploy instructions](deploy/README.md) to deploy Navarkos.

## How to use

Learn how to use Navarkos with an [example](examples/README.md).

## Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).

You can reach the maintainers of this project at:

- Slack: tbd
- Mailing List: tbd
- [OWNERS](OWNERS) file has the project leads listed.

Contributions to this code are welcome!

Refer to [CONTRIBUTING.md](CONTRIBUTING.md) and [LICENSE](LICENSE) on how to contribute to the project.
Refer to [RELEASE.md](RELEASE.md) about the process of release of this project.

## Kubernetes Incubator

This is a pending proposal for [Kubernetes Incubator project](https://github.com/kubernetes/community/blob/master/incubator.md). The project was established 2017-12-05. The incubator team for the project is:

- Sponsor: tbd
- Champion: tbd
- SIG: tbd

## Code of conduct

Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).

repository: jwgish/navarkos

repo_name: jwgish/navarkos


text:
# Consulea
#### Load Consul keys, environment vars, and command line arguments in a predictable, standardized way.

Module goals:
- Compile single config object from Consul kv, environment variables, and command line arguments.
- Watch for changes in Consul prefix, send an event with updated config.
- Verify required variables are set.
- Be extremely light weight, having minimal dependencies.
- Predictable config key outcome given different standards of input variables using different sources.
- Simplify origin of keys in Consul and Env. Each project should have it's own namespace, nothing shared.
- No ES6 dependency, so it works under Node.js 0.10 and onward.

Variables are first read from Consul, then the environment, then command line arguments, allowing the user to override something already previously set in Consul. The config key `webPort` can be set by Consul key `test-svc/web-port` and can be overridden by environment variable `TESTSVC_WEB_PORT`, and both can be overridden by `--web-port`.

## Install
```bash
npm install --save consulea
```

## Example
```javascript
// Load module
var Consulea = require('consulea');

// Create new instance of module, pass in config
var consulea = new Consulea({
    consulToken: '4fe3dee9-4148-404e-9928-d95cfb1e6947',
    consulPrefix: 'test-svc/',
    envPrefix: 'TESTSVC',
    requiredKeys: ['serverName', 'port'],
    ifMissingKeysOnUpdate: 'warn',
    defaultData: {
        maxConnects: "100",
        timeOutMs: "10000",
    },
});

// Store your config however you please.
var myConfig = {};

// This event is called every time the Consul namespace is updated and upon first start.
// "meta" will supply things like keysChanged, and initialLoad
consulea.on('update', function (err, data, meta) {
    myConfig = data;
});

// Continue starting up project, with all config loaded for the first time.
// This event is only called once.
consulea.on('ready', function (err, data) {
    // Proceed with starting up... open service ports, etc.
});

// Or, if callbacks are more your style...
consulea.callbackWhenReady(function (err){
    // Proceed with starting up... open service ports, etc.
});

// Handle errors and warnings as you see fit
consulea.on('error', function (err) {
    console.error('Consulea error:', err);
});
```

Config is now available to project from three different sources:

| Consul key | Env key | CLI key | Resulting variable |
| - | - | - | - |
| test-svc/port         | TESTSVC_PORT         | --port         | port        |
| test-svc/server-name  | TESTSVC_SERVER_NAME  | --server-name  | serverName  |
| test-svc/max-connects | TESTSVC_MAX_CONNECTS | --max-connects | maxConnects |
| test-svc/time-out-ms  | TESTSVC_TIME_OUT_MS  | --time-out-ms  | timeOutMs   |

```bash
# Assuming Consul has all of the above keys configured,
# they can be overridden by the ENV variables by doing:
export TESTSVC_MAX_CONNECTS=100
export TESTSVC_SERVER_NAME="New staging server"
node someScript.js
# ... or inline:
TESTSVC_MAX_CONNECTS=100 TESTSVC_SERVER_NAME="New staging server" node someScript.js

# And they can be overridden again by using CLI arguments:
node someScript.js --max-connects=50 --server-name="Prod server"
```

## Config object options
| Key | Required | Description |
| - | - | - |
| consulToken            | No  | ACL Token used to authenticate with Consul service |
| consulPrefix           | Yes | Namespace/prefix to search for keys in Consul |
| envPrefix              | No  | Namespace/prefix to search for keys in local environment |
| requiredKeys           | No  | List of camelCased keys which are considered to be required |
| consulClientConfig     | No  | Consul config object, if you'd rather configure it yourself |
| ifMissingKeysOnStartUp | No  | Set behavior when required keys are missing on first start up (default: exit) |
| ifMissingKeysOnUpdate  | No  | Set behavior when required keys are missing on any update after start up (default: exit) |
| suppressErrors         | No  | Set `true` to prevent Consulea from emitting errors. The emitted error event will still occur |
| defaultData            | No  | Pass in default KV data, which may be overwritten by Consul, ENV or command line arguments |

ifMissingKeysOnStartUp and ifMissingKeysOnUpdate can be one of the following:
- `exit`: Consulea will exit if any keys are missing.
- `warn`: Consulea will warn if any keys are missing.
- `skip`: Consulea will skip emitting the update/ready event if any keys are missing.
- `lastGoodValue`: Consulea will try to use the last good value for a given missing key and will exit if any keys did not previously exist.

## Notes

The Consul host:port can be also be defined using the environment variable `CONSUL_HTTP_ADDR`. This may be helpful if code is running in Docker or the Consul agent isn't running on the local instance.

```bash
# Don't use localhost:8500, connect somewhere else
export CONSUL_HTTP_ADDR='https://remoteconsulserver.com:8500'
node someScript.js
```

repository: Brayyy/node-consulea

repo_name: Brayyy/node-consulea


text:
# 1 - [Solidity versions](Solidity%20versions.md)
Using very old versions of Solidity prevents benefits of bug fixes and newer security checks.

Using the latest versions might make contracts susceptible to undiscovered compiler bugs.

Consider using one of these versions: `0.7.5`, `0.7.6` or `0.8.4`.

(see [here](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity))

___
## Slide Screenshot
![01.png](../../images/4.%20Pitfalls%20and%20Best%20Practices%20101/001.png)
___
## Slide Text
- Old vs New Versions
- Old: Bugs, Time-Tested
- New: Bug-fixes, New Bugs
- Old: Less Features
- New: More Features
- Optimal Version
- Security vs Functionality
___
## References
- [Youtube Reference](https://youtu.be/OOzyoaYIw2k?t=22)
___
## Tags

url: https://raw.githubusercontent.com/0xRektora/secureum-mind_map/c15a93fc9714de59e6847dbc6e5f99e32a5d9d31/content/4. Pitfalls and Best Practices 101/Solidity versions.md

filename: Solidity versions.md


text:
# Power Computation

Raises an uint32 integer to the n-th power

### Benchmark

Computes 2^100000:
```
BenchmarkFastPower	50000000	        41.6 ns/op
BenchmarkSlowPower	   10000	    115484 ns/op
```

gha_license_id: NOASSERTION


text:
# Equals

This is a boolean operator that will return `true` if the LHS is equal to the RHS and `false` otherwise.

```
.a == .b
```

It is most often used with the select operator to find particular nodes:

```
select(.a == .b)
```

repository: chanwit/yq

repo_name: chanwit/yq


text:
# Contribution to the Digital Global Health

Your contributions are always welcome!

## Guidelines

Please ensure your pull request adheres to the following guidelines:

- Search previous suggestions before making a new one, as yours may be a duplicate.
- Suggested additions should be made the the `README.md` file.
- Suggested additions should be related to Global Health Informatics, eHealth, mHealth, and Digital Health.
- Add your links: * [project-name](http://example.com/) - A short description ends with a dot.
- Link additions should be added to the bottom of the relevant category.
- New categories or improvements to the existing categorization are welcome.
- Make sure your text editor is set to remove trailing whitespace.
- Check your spelling and grammar.
- Make an individual pull request for each suggestion.
  - The pull request and commit should have a useful title.
  - Add short description in your Pull Request of why the project/resource/tool is awesome.
  - The body of your commit message should contain a link to the repository or the webpage url.


text:
These labs run a set of Chaos Engineering experiments against a very simple
web application.

A `front` application is listening for incoming requests on its root path.
When it gets one, it calls the `middle` service over HTTP. The `middle` service
in turns calls the `back` service. The response of the `back` service is
forwarded back to the `middle` then `front` services, finally to the client.

The `front` and `middle` services have a timeout of 1.0 second for their
respective calls. When such timeout, or any transport error, occurs, they
still return a 200 response but with the last seen value knwon to them and
an error message. The client can therfore inspect the payload to determine
it receives an actual stalled/errored response.

All the applications expose a `/metrics` endpoint monitored by Prometheus. In
particular they expose the number of errors seen so far.

All applications run in the `default` namespace.


text:
# Fixtures

These are the responses that are outputted by HAProxy when a given command is
received. The responses are the output of HAProxy 1.5-dev18 which was released
on 2013/04/03.

The output is created by using the `socat` tool:

```
echo "show info" | socat unix-connect:/tmp/haproxy.sock stdio > fixture.out
```

These responses are then mapped in the `index.js` file in the folder so it can
be used in our "HAMOCKproxy".

repository: gitple/haproxy

repo_name: gitple/haproxy


text:
# Monte-Carlo-Simulation-for-Blackjack
Monte Carlo Simulation for discovering optimum winning strategy in the game of Blackjack. The game is standard blackjack where two cards are initially dealt to the player and the dealer. The player can choose to hit or stand till they are satisfied with their standing. The dealer then proceeds to hit until they have 17 or higher. The options to double up or split in the middle of the game are not available.

## Part I

This simulation attempts to discover a simple strategy for the player to keep hitting until a certain target is reached without taking into consideration what the dealer has.

Initial amount in the simulation has been set to 10,000 and the wager is fixed at 100 for all games. There are 5 different players with different target points that play a maximum of 1000 games. The games aren't continued if they go broke.

![](./example/amount_plot.png) ![](./example/score_plot.png)


text:
Kompute follows [Linux Foundation's Code of Conduct](https://lfprojects.org/policies/code-of-conduct/).

# Introduction

The purposes of LF Projects, LLC (“LF Projects”) are to:

    support the collaborative development, availability and adoption of open source software, hardware and networking and other technologies and the collaborative development, availability and adoption of open protocols and standards (individually and collectively, “Open Technology”);
    host various projects pursuing the development of Open Technology and other technical assets, materials and processes (each such project, which itself may include any number of projects, a “Project”);
    provide enablement and support to Projects to assist their development activities; and
    undertake such other lawful activity as permitted by law and as consistent with the mission, purpose and tax status of LFP, Inc., a Delaware non-profit non-stock corporation and the sole member of LF Projects.

LF Projects hosts communities where participants choose to work together, and in that process experience differences in language, location, nationality, and experience. In such a diverse environment, misunderstandings and disagreements happen, which in most cases can be resolved informally. In rare cases, however, behavior can intimidate, harass, or otherwise disrupt one or more people in the community, which LF Projects will not tolerate.

 It also provides a benchmark for self-evaluation and acts as a vehicle for better identity of the organization.

LF Projects is a Delaware series limited liability company.  Projects of LF Projects are formed as separate series of LF Projects (each, a “Series”).  References to “Projects” within this Policy include the applicable Series for each Project.

This Code applies to any participant of any Project – including without limitation developers, participants in meetings, teleconferences, mailing lists, conferences or functions, and contributors. Note that this Code complements rather than replaces legal rights and obligations pertaining to any particular situation.  In addition, with the approval of LF Projects, Projects are free to adopt their own code of conduct in place of the Code.

## Statement of Intent

LF Projects is committed to maintain a positive, professional work environment. This commitment calls for workplaces where participants at all levels behave according to the rules of the following code. A foundational concept of this code is that we all share responsibility for our work environment.

## Code

    Treat each other with respect, professionalism, fairness, and sensitivity to our many differences and strengths, including in situations of high pressure and urgency.
    Never harass or bully anyone verbally, physically or sexually.
    Never discriminate on the basis of personal characteristics or group membership.
    Communicate constructively and avoid demeaning or insulting behavior or language.
    Seek, accept, and offer objective work criticism, and acknowledge properly the contributions of others.
    Be honest about your own qualifications, and about any circumstances that might lead to conflicts of interest.
    Respect the privacy of others and the confidentiality of data you access.
    With respect to cultural differences, be conservative in what you do and liberal in what you accept from others, but not to the point of accepting disrespectful, unprofessional or unfair or unwelcome behavior or advances.
    Promote the rules of this Code and take action (especially if you are in a leadership position) to bring the discussion back to a more civil level whenever inappropriate behaviors are observed.
    Stay on topic: Make sure that you are posting to the correct channel and avoid off-topic discussions. Remember when you update an issue or respond to an email you are potentially sending to a large number of people.
    Step down considerately: participants in every project come and go, and LF Projects is no different. When you leave or disengage from the project, in whole or in part, we ask that you do so in a way that minimizes disruption to the project. This means you should tell people you are leaving and take the proper steps to ensure that others can pick up where you left off.

# Glossary

## Demeaning behavior

is acting in a way that reduces another person’s dignity, sense of self-worth or respect within the community.

## Discrimination

is the prejudicial treatment of an individual based on criteria such as: physical appearance, race, ethnic origin, genetic differences, national or social origin, name, religion, gender, sexual orientation, family or health situation, pregnancy, disability, age, education, wealth, domicile, political view, morals, employment, or union activity.

## Insulting behavior

is treating another person with scorn or disrespect.

## Acknowledgement

is a record of the origin(s) and author(s) of a contribution.

## Harassment

is any conduct, verbal or physical, that has the intent or effect of interfering with an individual, or that creates an intimidating, hostile, or offensive environment.

## Leadership position

includes group Chairs, project maintainers, staff members, and Board members.

## Participant

includes the following persons:

    Developers
    Representatives of corporate participants
    Anyone from the Public partaking in the LF Projects work environment (e.g. contribute code, comment on our code or specs, email us, attend our conferences, functions, etc)

## Respect

is the genuine consideration you have for someone (if only because of their status as participant in LF Projects, like yourself), and that you show by treating them in a polite and kind way.

## Unwelcome behavior

Hard to define? Some questions to ask yourself are:

    how would I feel if I were in the position of the recipient?
    would my spouse, parent, child, sibling or friend like to be treated this way?
    would I like an account of my behavior published in the organization’s newsletter?
    could my behavior offend or hurt other members of the work group?
    could someone misinterpret my behavior as intentionally harmful or harassing?
    would I treat my boss or a person I admire at work like that ?

Summary: if you are unsure whether something might be welcome or unwelcome, don’t do it.

## Unwelcome sexual advance

includes requests for sexual favors, and other verbal or physical conduct of a sexual nature, where:

    submission to such conduct is made either explicitly or implicitly a term or condition of an individual’s employment,
    submission to or rejection of such conduct by an individual is used as a basis for employment decisions affecting the individual,
    such conduct has the purpose or effect of unreasonably interfering with an individual’s work performance or creating an intimidating hostile or offensive working environment.

## Workplace Bullying

is a tendency of individuals or groups to use persistent aggressive or unreasonable behavior (e.g. verbal or written abuse, offensive conduct or any interference which undermines or impedes work) against a co-worker or any professional relations.

## Work Environment

is the set of all available means of collaboration, including, but not limited to messages to mailing lists, private correspondence, Web pages, chat channels, phone and video teleconferences, and any kind of face-to-face meetings or discussions.

## Incident Procedure

To report incidents or to appeal reports of incidents, send email to the Manager of LF Projects, Mike Dolan (manager@lfprojects.org). Please include any available relevant information, including links to any publicly accessible material relating to the matter. Every effort will be taken to ensure a safe and collegial environment in which to collaborate on matters relating to the Project. In order to protect the community, the Project reserves the right to take appropriate action, potentially including the removal of an individual from any and all participation in the project. The Project will work towards an equitable resolution in the event of a misunderstanding.

## Credits

This code is based on the W3C’s Code of Ethics and Professional Conduct with some additions from the Cloud Foundry’s Code of Conduct and the Hyperledger Project Code of Conduct.

repository: ItsBasi/kompute

repo_name: ItsBasi/kompute


text:
# cmpy
[![License](https://pypip.in/license/cmpy/badge.svg)](https://pypi.python.org/pypi/cmpy/)
[![Latest Version](https://pypip.in/version/cmpy/badge.svg)](https://pypi.python.org/pypi/cmpy/)
[![Downloads](https://pypip.in/download/cmpy/badge.svg)](https://pypi.python.org/pypi/cmpy/)

A simple utility for detecting differences in directories and files.

### Installation

You can get cmpy with pip:

```
pip install cmpy
```

### Overview

Comparison of files and directories in `cmpy` is handled with the `FCompare` and `DCompare` classes, respectively. Files
can also be compared using the static `shallow_fcmp()` and `deep_fcmp()` methods. As the names suggest, the former performs
a shallow comparison (less strict comparison, faster and less resource intensive), while the latter performs a deep comparison
(strict comparison, slower, more resource intensive).

For additional information on the comparison methods and classes, see the docstring in `cmpy.py`.

### Usage

#### Comparing Files

```python
# Instantiate a file compare object between to files
f = FCompare('foo/bar', 'bar/foo')

# Compare the files (returns True or False)
f.compare()
```

Optional arguments may be provided

```python
# Perform a shallow comparison (default behavior)
f = FCompare('foo/bar', 'bar/foo', shallow=True)

# Perform a deep comparison
f = FCompare('foo/bar', 'bar/foo', shallow=False)

# Change the default buffer size (for deep comparison). Default is 2**10 bytes
f = FCompare('foo/bar', 'bar/foo', buffer_size=2**8)
```

Files can also be compared without instantiating an object

```python
# Shallow comparison
shallow_fcmp('foo/bar', 'bar/foo')

# Deep comparison
deep_fcmp('foo/bar', 'bar/foo')

# Deep comparison specifying buffer size
deep_fcmp('foo/bar', 'bar/foo', 2**8)
```

#### Comparing Directories:

```python
# Instantiate a directory compare object between to directories
d = DCompare('foo/bar/', 'bar/foo/')

# Compare the directories (returns True or False)
d.compare()
```

Optional arguments may be provided

```python
# Perform a shallow comparison (default behavior)
d = DCompare('foo/bar/', 'bar/foo/', shallow=True)

# Perform a deep comparison
d = DCompare('foo/bar/', 'bar/foo/', shallow=False)

# Change the default buffer size (for deep comparison). Default is 2**10 bytes
d = DCompare('foo/bar/', 'bar/foo/', buffer_size=2**8)

# Perform a comparison non-recursively
d = DCompare('foo/bar/', 'bar/foo/', recursive=False)

# Perform a comparison recursively (default behavior)
d = DCompare('foo/bar/', 'bar/foo/', recursive=True)
```

The `DCompare` class has various properties on it

```python
d = DCompare('foo/bar/', 'bar/foo/')

# The names of files in the first directory
d.dir1_files

# The names of directories in the first directory
d.dir1_directories

# The names of the entries in the first directory
d.dir1_contents

# The names of files in the second directory
d.dir2_files

# The names of directories in the second directory
d.dir2_directories

# The names of the entries in the second directory
d.dir2_contents

# The names of the entries in the first directory which are not in the second directory
d.dir1_unique

# The names of the entries in the second directory which are not in the first directory
d.dir2_unique

# The names of the entries found in both directories
d.common
```

repository: edaniszewski/cmpy

gha_language: Python

repo_name: edaniszewski/cmpy


text:
Repo containing the code from the prototype built in the medium article [Prototyping physical interactions with visual interfaces](https://alexwidua.medium.com/prototyping-physical-interactions-with-visual-interfaces-in-2021-d0a305658c5e). This repo contains uncommented code, refer to [react-j5-arduino](https://github.com/alexwidua/react-j5-arduino) for more comprehensive code and examples.

## Usage

1. `npm install` — Install dependencies
1. Update IP address in `srv/index.js` to make dev server accessible to other devices in your local network
1. Make sure that your Arduino and sensor is hooked up correctly and start the node server — `node server`
1. Serve your React app — `npm run serve`

## 📝 License

[MIT](LICENSE)


text:
opal(1) -- The opal.io CLI client.
==================================

## SYNOPSIS

    opal <command> [args]

Where <command> is one of:

repository: jxson/opal-cli

repo_name: jxson/opal-cli


text:
# launch-all-browsers
This is a collection of scripts to open a link on all installed browsers on multiple OS's.

## Windows 10
[LaunchAllBrowsers.bat](https://github.com/DallasO/launch-all-browsers/blob/master/LaunchAllBrowsers.bat)

### Currently supports
1. Chrome
2. Chrome Beta
3. Firefox
4. Internet Explorer
5. Edge

### How to use
Save the .bat file and double-click to run
Right click to paste a link
Hit enter to begin opening all browsers
Leave blank to close

## Linux
[LaunchAllBrowsers.sh](https://github.com/DallasO/launch-all-browsers/blob/master/LaunchAllBrowsers.sh)

### Currently supports
Tested on Debian
1. Chrome
2. Firefox

### How to use
1. Make sure this script is executable

    `$ chmod u+x LaunchAllBrowsers.sh`

2. Add to your PATH

     Either by editing your ~/.profile or ~/.bashrc file:

    `export PATH="$PATH:/path/to/launch-all-browsers"`

    OR

    Adding a symlink:

    ```
    $ cd /usr/local/bin
    $ sudo ln -s /path/to/launch-all-browsers/LaunchAllBrowsers.sh launch-all-browsers
    ```

repository: DallasO/launch-all-browsers

gha_language: Batchfile

repo_name: DallasO/launch-all-browsers


text:
---
title: Custom Language Support——自定义语言支持
---

*IntelliJ Platform* is a powerful platform for building development tools targeting *any* language.
Most of IDE features consist of language-independent and language-specific parts, and you can support a particular feature for your language with a small amount of effort:
you just need to implement the language-specific part, and the language-independent part is provided for you by the platform.

**CN:**  *IntelliJ Platform*是一个针对*any*语言构建开发工具的强大平台。
        大多数IDE特性由语言独立和特定于语言的部分组成，您可以通过少量的工作为您的语言支持特定的特性:
        您只需要实现特定于语言的部分，平台为您提供了独立于语言的部分。

This part of the documentation will explain the main concepts of the *Language API* and will guide you through the sequence of steps which are usually required to develop a custom language plugin.
You can obtain additional information about the *Language API* from the JavaDoc comments for the *Language API* classes and from the source code of the Properties language support, which is part of the
[IntelliJ IDEA Community Edition](https://github.com/JetBrains/intellij-community)
source code.

**CN:**  本部分的文档将解释*Language API*的主要概念，并将指导您完成开发自定义语言插件通常需要的一系列步骤。
        您可以从*Language API*类的JavaDoc注释和属性语言支持的源代码中获得关于*Language API*的更多信息
        [IntelliJ IDEA Community Edition](https://github.com/JetBrains/intellij-community)源代码。

If you prefer a full example to the detailed description offered on this page, please check out a step-by-step tutorial how to define custom language support on example of ".properties" files:
[Custom Language Support Tutorial](/tutorials/custom_language_support_tutorial.md)

**CN:**  如果你喜欢一个完整的例子，而不是在这个页面上提供的详细描述，请查看一个循序渐进的教程，如何定义自定义语言支持的例子的".properties"文件:
        [Custom Language Support Tutorial](/tutorials/custom_language_support_tutorial.md)

Providing custom language support includes the following major steps:

**CN:**  提供自定义语言支持包括以下主要步骤:

* [Registering File Type(注册文件类型)](/reference_guide/custom_language_support/registering_file_type.md)
* [Implementing Lexer(实现词法分析程序)](/reference_guide/custom_language_support/implementing_lexer.md)
* [Implementing Parser and PSI(实现解析器和PSI)](/reference_guide/custom_language_support/implementing_parser_and_psi.md)
* [Syntax Highlighting and Error Highlighting(语法突出显示和错误突出显示)](/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md)
* [References and Resolve(引用和解决)](/reference_guide/custom_language_support/references_and_resolve.md)
* [Code Completion(代码自动完成)](/reference_guide/custom_language_support/code_completion.md)
* [Find Usages(查找使用)](/reference_guide/custom_language_support/find_usages.md)
* [Rename Refactoring(重命名重构)](/reference_guide/custom_language_support/rename_refactoring.md)
* [Safe Delete Refactoring(安全删除重构)](/reference_guide/custom_language_support/safe_delete_refactoring.md)
* [Code Formatter(代码格式化程序)](/reference_guide/custom_language_support/code_formatting.md)
* [Code Inspections and Intentions(代码检查和意图)](/reference_guide/custom_language_support/code_inspections_and_intentions.md)
* [Structure View(结构视图)](/reference_guide/custom_language_support/structure_view.md)
* [Surround With(环绕)](/reference_guide/custom_language_support/surround_with.md)
* [Go to Class and Go to Symbol(转到类和转到符号)](/reference_guide/custom_language_support/go_to_class_and_go_to_symbol.md)
* [Documentation(文档)](/reference_guide/custom_language_support/documentation.md)
* [Additional Minor Features(额外的小特性)](/reference_guide/custom_language_support/additional_minor_features.md)

Please ask questions or suggest missing topics in [plugin development forum](https://intellij-support.jetbrains.com/hc/en-us/community/topics/200366979-IntelliJ-IDEA-Open-API-and-Plugin-Development).

**CN:**  请在[plugin development forum](https://intellij-support.jetbrains.com/hc/en-us/community/topics/200366979-IntelliJ-IDEA-Open-API-and-Plugin-Development)中提出问题或建议遗漏的主题。


text:
# mdgen

This is a library for generating Markdown documents in Ruby. If your project emits Markdown, you've probably written some methods like these somewhere

```ruby
def link(text, url)
  "[#{text}](#{url})"
end
```

This library is just that, dressed up in a slick DSL. It's probably unnecessary for most use cases, but I once worked on a project where this would have saved me a whole fifteen minutes.

## Usage

To expose the Markdown generation methods in a compact way that's convenient to write long documents in, use `MDGen.md`. All Markdown methods will evaluate to their Markdown text representations.

```ruby
page = ''
MDGen.md do
  page << h('The title')
  page << "\n"
  page << p("This paragraph has a link: #{link('example', 'http://example.com')}")
  page << "\n"
  page << list([
    'item one',
    'item two',
    'item three'
    ])
end
```

After this listing, the value of `page` would be

```markdown
# The title

This paragraph has a link: [example](http://example.com)

* item one
* item two
* item three
```

If your document is simple, you can use `MDGen.document` to handle line breaks and just get back a string. Here the methods for Markdown block objects will be added to the resulting document. Methods for inline objects still evaluate to their The value of `page` ends up the same in this listing.

```ruby
page = MDGen.document do
  h 'The title'
  p "This paragraph has a link: #{link('example', 'http://example.com')}"
  list [
    'item one',
    'item two',
    'item three'
  ]
end
```

If you're thinking "oh no another Ruby DSL why", don't worry because there are still regular methods in the `MDGen::Markdown` module

```ruby
page = ''
page << MDGen::Markdown.h('The title')
page << "\n"
page << MDGen::Markdown.p("This paragraph has a link: #{MDGen::Markdown.link('example', 'http://example.com')}")
page << "\n"
page << MDGen::Markdown.list([
  'item one',
  'item two',
  'item three'
])
```

## Markdown elements

This supports most major markdown elements. The tests in [`spec/mdgen/markdown_spec.rb`](spec/mdgen/markdown_spec.rb) are another example of usage.

### Headers - #h through #hhhhhh

Header levels 1-6 are supported in atx style

```ruby
MDGen::Markdown.h 'The title'
  # => '# The title\n'
MDGen::Markdown.hh 'Subtitle'
  # => '## Subtitle\n'
MDGen::Markdown.hhhhhh 'Subhead'
  # => '###### Subhead\n'
```

### Paragraph - #p

Just adds the line break that makes a string a paragraph in Markdown. This does override the `p` to `puts` mapping, which you can still call as `Kernel.p`.

```ruby
MDGen::Markdown.p 'This is a paragraph'
  # => 'This is a paragraph\n'
```

### Block quote - #quote

Handles lines when adding the quote prefacing

```ruby
text = <<EOF
First line
Second line
EOF

MDGen::Markdown.quote text
  # => "> First line\n> Second line\n"
```

### Lists - #list, #ul, and #ol

Both `ul` and its alias `list` generate an unordered list

```ruby
MDGen::Markdown.list ['red', 'green', 'blue']
  # => '* red\n* green\n* blue\n'
```

The `ol` method generates an ordered list

```ruby
MDGen::Markdown.ol ['one', 'two', 'three']
  # => '1. one\n2. two\n3. three\n'
```

### Task list - #task_list

This element is from Github flavored Markdown and may not be supported by all parsers.

```ruby
MDGen::Markdown.task_list [
  ['foo', false],
  ['bar', true],
  ['baz', false]
]
  #=> '- [ ] foo\n- [x] bar\n- [ ] baz\n'
```

To initialize a big list you could do

```ruby
tasks = [
  'a thing',
  'another',
  'and another' # and so on
]
MDGen::Markdown.task_list(tasks.zip([false].cycle))
  # => '- [ ] a thing\n- [ ] another\n- [ ] and another\n'
```

### Code block - #code

Supports optional syntax highlighting. Also has the alias `pre`

```ruby
text = "puts 'foo'"
MDGen::Markdown.code(text, 'ruby')
  # => '```ruby\nputs 'foo'\n```'
```

### Horizontal rule - #rule

```ruby
MDGen::Markdown.rule
  # => '* * *\n'
```
### Table - #table

Pass your data as an array of rows to make a Github flavored markdown table. It will make the spacing nice and readable. The first row is read as a header by default.

```ruby
data = [
  ['thing', 'color', 'dangerous?'],
  ['sky', 'blue', 'no'],
  ['tiger', 'orange', 'yes']
]
MDGen::Markdown.table(data)
```

would evaluate to

```markdown
| thing | color  | dangerous? |
| ----- | ------ | ---------- |
| sky   | blue   | no         |
| tiger | orange | yes        |
```

```ruby
# pass header: false to get an empty header
MDGen::Markdown.table(data.drop(1), header: false)

# indicate alignment by passing an array of column alignments
alignments = [:center, :left, :right]
MDGen::Markdown.table(data, alignment: alignments)
```

The second example would evaluate to

```markdown
| thing | color  | dangerous? |
|:-----:|:------ | ----------:|
| sky   | blue   | no         |
| tiger | orange | yes        |
```

Note that the alignment feature doesn't actually align the Markdown text. It sets the alignment for the columns when they are rendered by the Markdown renderer.

### Links - #link

```ruby
MDGen::Markdown.link('example', 'http://example.com')
  # => '[example](http://example.com)'
```

### Images - #image

Pass `title: str` for an optional image title

```ruby
MDGen::Markdown.image('example', 'http://example.com/image.jpg')
  # => '![example](http://example.com.image)''

# Pass title: str for an optional image title
MDGen::Markdown.image('example', 'http://example.com/image.jpg', 'my title')
  # => '![example](http://example.com/image.jpg "my title")'
```

### Raw text - #raw

Use this when you want to insert text without any changes when using `MDGen.document`. Acts as the identity function.

```ruby
MDGen::Markdown.raw('foo')
  # => 'foo'

MDGen.document do
  raw 'foo'
  p 'paragraph'
end
   # => 'fooparagraph\n'
```

repository: andbristol/mdgen

repo_name: andbristol/mdgen


text:
# DDNS

Dynamic DNS server for Google Cloud DNS managed zones on Cloud Run.

This is not an officially supported Google product. This project is maintained
soley by David Claridge, and not in association with his employment at Google.

## Set-up

1. Create a GCP project and enable Datastore, Cloud DNS & Cloud Run.
1. Create a Zone in Cloud DNS.
1. Clone this GitHub repository.
1. Change the `Project` and `zone` constants in `ddns/google.go`.
1. Build using `docker build -t gcr.io/<project>/ddns-server:latest .`.
1. Push the image to GCR using `docker push gcr.io/<project>/ddns-server:latest`.
1. (optional) Create a service account with the roles "Cloud Datastore User" and "DNS Administrator". Pass that service account to the next command as `--service-account <custom-account>`.
1. Deploy the Cloud Run application `gcloud run deploy --image gcr.io/<project>/ddns-server:latest --project <project> --platform managed --allow-unauthenticated`.
1. Create tokens for your domains using: `go run ./cmd/adddomain`. The created token corresponds to the password to use in the next step.
1. Configure the dynamic DNS client on your router to use the Cloud Run app's address. Specify any value as the username, if required, and the created token as the password.

## TODO

This project is a work in progress. Unfinished work includes:

* UI for managing domains (instead of `adddomain` CLI utility).
* Moving project/zone configuration to environment variables.
* Listening based on the `PORT` environment variable, rather than a constant `8080`.

repository: dgpc/ddns

repo_name: dgpc/ddns


text:
# PHP API
Here is a simple Web API PHP to implement functionality of home assignment.
# Installation
1.	Clone/download this folder to your computer.
2.	Save this folder in your web-server root directory (it can be ‘htdocs’ folder if you are using XAMPP, for example). Web-server & PHP 5.3+ supposed to be installed on your computer.
# How does it work
You can use the API either from:
1.	A web front-end application (run index.php from the project root directory). It uses a 3d party JS library ‘dtsel’ to implement DateTime picker form field (MIT license).
![API frontend](https://github.com/Zigr1/API-Challenge/blob/main/img/api1.png?raw=true)
2.	Or using the Postman to test HTTP requests and read responses. It can be downloaded there: https://www.postman.com/downloads/. You can use POST or GET method of sending request. Others are not allowed.
![API in POSTMAN](https://github.com/Zigr1/API-Challenge/blob/main/img/api2.png?raw=true)
### The request should look like this: http://localhost/API-Challenge/api/index.php?
(or ../API-Challenge-main/.. if you left the branch name)
### There are 6 request parameters:
1.	dateTimeStart: Starting date and time
2.	timeZoneStart: Time zone of starting date and time (full list of supported timezones can be found here: https://www.php.net/manual/en/timezones.php )
3.	dateTimeEnd: Ending date and time
4.	timeZoneEnd: Time zone of ending date and time
5.	measure: Interval measurement (‘d’ for days, ‘wd’ for weekdays, or ‘w’ for complete weeks)
6.	convertTo: One of ‘s’, ’i’, ’h’, or ‘y’ to convert result to seconds, minutes, hours or years respectively (null or ‘-‘ for no convertion).
Response returned is a JSON object.

### You can also run request as http://localhost/API-Challenge/api/[any_custom_route]?[parameters] if you add this lines to the .htaccess file of the project:
RewriteEngine On

RewriteRule ^ index.php [QSA,L]

### API itself consists of two files in ‘api’ folder:
1.	index.php – api access point. It gets parameters from the request, handle input, initialize a new object of a Client class, returns response as a JSON object.
2.	client.class.php – api client that implements the core functionality as a class with properties and methods.
# Decisions and assumptions made for this task
1.	To count days between two DateTime parameters I will use PHP method DateTime::diff() as it is more accurate than do it manually. This method takes into account time zones offsets, day light savings, leap years, etc.
### Assumptions made:
Count whole days only (that comprise 24 hours)

2. I will count weekdays manually as I couldn't find any 3d party library to do the task.
### Assumptions made:
Weekdays are Monday to Friday;
Any holidays are ignored;
Count whole weekdays only (that comprise 24 hours from 12am to 12am of the next day)

3.	To count complete weeks I can use the result of (1) and take its whole fraction of division by 7.
### Assumptions made:
Complete week is a period of any 7 consecutive whole days (24hours * 7). Not necessarily Sunday to Saturday.

4.	To receive the result of conversion operation I will use the result of (1), (2) or (3) as an input as it is asked in the assignment. This will assure consistency (always getting the same result, as 2 days is always 24*2 hours or 24*2*60*60 seconds), though finding difference in seconds or hours between two DateTime parameters straightforward would result in a different number.

5.	Time zone offset is taken into account by DateTime::diff() method that I'm going to use.
# Unit tests
‘test’ folder contains php file with unit tests for calculateWeekdaysBetween function that doesn’t use standard php methods.

PHPUnit library was used for running tests. It was installed to the project locally as a Composer dependency. For this reason, the project include composer.json dependencies file and ‘vendor’ folder with PHPUnit software.

PHPUnit installation guide can be found here:
https://phpunit.de/getting-started/phpunit-9.html

To run the test, run the command:
./vendor/bin/phpunit test/DataTest.php


text:
# Result
🎲 **Monad library for Unity Game Engine.**

The Result monad is useful to express a series of computations that might return an error object with additional information, but without force to throwing exceptions.
There are quite a few errors that are not exceptions and should be handled in the usual manner.

The Result mixin has two type constructors: Ok and Error.
The Ok can be thought of as "everything went success" and the Error is used when "something has gone wrong".

## 📖 How To Install

Open Package Manager and add Git URL to this repository.

## 📘 Getting Started

Declaration of method with return Result:

```c#
using Scellecs;
...

public Result<int> ValidateSomeInt(int someArg) {
    if (someArg < 0) {
        return Result.Error<int>(errorCode: 0, errorMessage: "someArg is less than zero");
    }
    else if (someArg == 0) {
        return Result.Error<int>(errorCode: 1, errorMessage: "someArg is zero");
    }
    else {
        return Result.Ok(someArg);
    }
}
```

Shorter version:

```c#
using Scellecs;
using static Scellecs.Result;
...

public Result<int> ValidateSomeInt(int someArg) {
    if (someArg < 0) {
        return Error<int>(0, "someArg is less than zero");
    }
    if (someArg == 0) {
        return Error<int>(1, "someArg is zero");
    }
    return Ok(someArg);
}
```

Some consumer method with error handling:

```c#
public void Foo() {
    var result = this.ValidateSomeInt(-100);
    if (result.IsError) {
        var error = result.TryGetError();
        if (error.code == 0) {
            //handle error
            Debug.LogError(error.message);
        }
        else if (error.code == 1) {
            //handle error
            Debug.LogError(error.message);
        }
    }
    else {
        var value = result.TryGet();
        //some stuff
    }
}
```

Some consumer method with manual exception throwing:

```c#
public void Bar() {
    var result = this.ValidateSomeInt(-100);
    if (result.IsError) {
        throw result.TryGetError().AsException();
    }
    else {
        var value = result.TryGet();
        //some stuff
    }
}
```

Invalid case of usage:

```c#
public void WidePhilSpencer() {
    var result = this.ValidateSomeInt(-100);

    result.TryGet();      //calling TryGet without IsError check, cause throw an exception
    result.TryGetError(); //calling TryGetError without IsError check, cause throw an exception

    if (result.IsError) {
        var value = result.TryGet(); // there is the error. getting the value cause throw an exception
    }
    else {
        var error = result.TryGetError(); //opposite situation. there is the value. getting the error cause throw an exception

        var value = result.TryGet();
        var duplicateValue = result.TryGet(); // getting value two in a row is impossible, an exception will be thrown
    }
}
```
> 💡 **IMPORTANT**
> Result and Error are ref structs.
  They can't be stored in fields, collections and anywhere except stack.

## 📘 License

📄 [MIT License](LICENSE)

## 💬 Contacts

✉ Telegram: [olegmrzv](https://t.me/olegmrzv)
📧 E-Mail: [mail<EMAIL_ADDRESS>

repository: scellecs/result

repo_name: scellecs/result


text:
# Contributing to Token Builder

Thank you for taking the time to give feedback or contribute code or token parts.

## Giving Feedback / Requesting Parts

Feedback is always welcome in the form of a github issue.

Before raising an issue, please search to see if it has been raised before. If it has been raised, contributing a thumbs up to that original issue - it's the best way to tell what is most requested.

## Contributing Code

Code and bug fixes are always welcome. If you have an idea for a feature or want to add or tweak something, raise an issue and be ready for feedback.

### Getting setup

You will need the following installed on your box:
- docker
- node

You will need access to the following:
- github, to clone the repository
- google cloud platform
  - firestore, for storage
  - pubsub, for batch operations
  - storage buckets, for caching and results of batch operations
- microsoft live application
- google oauth application

After cloning, you will need to create a `config.json` and a `creds.json`.

`creds.json` should contain a JSON KEY for a service account in GCP that can be used to access:
- firestore
- pubsub
- storage bucket

`config.json` should follow the structure of `config.example.json`, with placeholder values replaced.

Once this is done, you'll need to build the token parts. Navigate to `~/token-parts` and run:

```bash
npm i
node ./bundle.js
```

This will dump the built SVG templates into both the API and the UX.

Once all that is done, run `docker-compose up` at the root and in theory, everything should come up.

### Conventions

Linting is run as part of the build process. You can run it locally by running `npm run lint` in the relevant folders.

I'm not picky about having lots of tests, but make sure you update any that touch on any change you make.

### Understanding architecture and questions

Reach out to<EMAIL_ADDRESS>if you want to know more about how everything fits together or run into issues getting your dev environment set up.

## Contributing Token Parts

If you have ideas for parts, but no artwork, raise an issue.

If you want to create token parts, you need to understand SVG and have an editor (like inkscape).

Specifically, SVG files need:
- to have a 0 0 90 90 viewbox
- use a weight of 4.5 for thick outer lines
- use a weight of 2.75 for inner lines
- use a weight of 1.375 for thinner lines
- use only gray colors
- bodies need to be based off a circle centered at 45 45 that has radius 36 and stroke weight of 4.5
- place each 'color group' in a different `g` tag (see example below)
- use one color per color group
- add a `data-slots` attribute to the root `svg` that includes which slots it should intersect with
- add a `data-z` attribute to the root indicating what it's default z-order should be
- add a `data-tags` including a comma-delimited list of tags it should be available under when filtering parts
- not use any gradient fills - to achieve a gradient effect use a fill with a gradient mask, limitation of setting colors
- not use any filters like blurring, limitation of rendering engine

Basically they have to match the other parts. If you get most of the way through that list, feel free to open up the pull request with the partially completed part and I can help get it over the finish line and usable.

Parts are dedicated to the public domain. If you are contributing art, please add your name to the license.

repository: dougrich/tokenerator

repo_name: dougrich/tokenerator


text:
# Recipes App in React Native

## Getting Started
To run the app, simply run

``` npm install && expo start ```

And scan the QR code in the Expo client app.

## Features
- Recipes List
- Categories
- Ingredients
- Recipes Details Screen
- Photo Gallery
- Detailed Description
- Ingredients button
- Ingredients List
- Recipes by Ingredient
- Search
- Drawer Menu
- Navigation Bar
- Beautiful UI Design Kit
- Compatible with Expo
- Highly modularized codebase


text:
# Swedbank Pay Design Guide Theme for Jekyll

![Swedbank Pay Design Guide Theme for Jekyll][opengraph-image]

This repository hosts the Swedbank Pay Design Guide theme for Jekyll, used for
[Swedbank Pay on GitHub][swedbankpay] among other things.

## Contributing

Bug reports and pull requests are welcome on [GitHub][repo]. This project is
intended to be a safe, welcoming space for collaboration, and contributors are
expected to adhere to the [Contributor Covenant][cc] code of conduct as well as
[PayEx Open Source Development Guidelines][dev-guide].

## Usage

To view this theme, browse to [swedbankpay.github.io][swedbankpay]. If you'd
like to host it locally on your computer, you have two options, manual install
or [Docker][docker].
The Docker installation is the one we recommend to use for its simplicity.

### Docker

1. Install [Docker][docker], using Linux containers.
   Make sure virtualization is enabled on your machine.
2. Open a console window at the root of the repository and run
   `docker-compose up`

### Manual install

1. [Clone this repository][clone].
2. Jekyll is written in [Ruby][ruby], so you'll need to download and install
   that. If you're installing on Windows, choose setup with DevKit.
3. To install the [Ruby Gems][gems] this web site requires, you first need to
   install [Bundler][bundler].
4. Install [Graphviz][graphviz], this will require Java.
5. Once Ruby ,Bundler, and Graphviz, is in place, type `bundle install` inside the root
   folder of this repository.
6. Run `bundle exec jekyll serve` to start the website.
7. Open `http://localhost:4000` in a browser.

### Required Visual Studio Code plugins

*   `shd101wyy.markdown-preview-enhanced`, to render Markdown to HTML in a
  preview window.
*   `bpruitt-goddard.mermaid-markdown-syntax-highlighting`, to give syntax
  highlighting to Mermaid diagrams in Markdown files.
*   `yzhang.markdown-all-in-one`, to enable a plethora of Markdown features,
  most importantly formatting of Markdown tables with VS Code's built-in
  format functionality.
*   `stkb.rewrap`, to make line-breaking text at 80 characters easier.
*   `supperchong.pretty-json` to format selected JSON snippets in code
  examples.
*   `sissel.shopify-liquid` for syntax highlighting of [Liquid][liquid].
*   [Set up a ruler at 80 characters][vsc-ruler] by
  adding `"editor.rulers": [80]` to its configuration.

Jekyll should now be fired up with this theme. You can now add pages, documents,
data, etc. like normal to test your theme's contents. As you make modifications
to your theme and to your content, the site will regenerate and you should see
the changes in the browser after a refresh, just like normal.

When the theme is released, only the files in `_layouts`, `_includes`, `_sass`
and `assets` tracked with Git will be bundled. To add a custom directory to your
theme-gem, please edit the regexp in `swedbankpay.gemspec` accordingly.

## License

This website is available as open source under the terms of the
[MIT License][license].

[bundler]: https://bundler.io/
[cc]: http://contributor-covenant.org
[clone]: https://help.github.com/articles/cloning-a-repository/
[dev-guide]: https://developer.swedbankpay.com/resources/development-guidelines/
[docker]: https://www.docker.com/
[gems]: <https://rubygems.org/>
[graphviz]: https://graphviz.org/download/
[license]: <https://opensource.org/licenses/MIT>
[liquid]: <https://jekyllrb.com/docs/liquid/>
[opengraph-image]: <https://repository-images.githubusercontent.com/209270355/36818080-53ee-11ea-896c-082addb851a6>
[repo]: <https://github.com/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/>
[ruby]: <https://www.ruby-lang.org/en/>
[swedbankpay]: <https://swedbankpay.github.io/swedbank-pay-design-guide-jekyll-theme/>
[vsc-ruler]: https://stackoverflow.com/questions/29968499/vertical-rulers-in-visual-studio-code


text:
This folder generates Figs. 5, 7, S6, S7 and S8.

This folder utilizes the LME model to explore the relationships between longitudinal cognitive decline rates and atrophy factors.

---

## What Does Each File Do?

1. `CBIG_wrapper.m` shows how to call the functions.
2. `CBIG_fitLME_3t.m` fits a three-factor LME model to the behavioral scores. Ditto for `CBIG_fitLME_2t.m` and `CBIG_fitLME_4t.m`.
3. `CBIG_hypoTest_3t.m` performs statistical tests among the three factors. Ditto for `CBIG_hypoTest_2t.m` and `CBIG_hypoTest_4t.m`.
4. `CBIG_hypoTest_3t_withinFactorAcrossStages.m` performs statistical tests across different disease stages within a given factor.
5. The rest are our p values and raw figures.

repository: ThomasYeoLab/CBIG

gha_language: MATLAB

repo_name: ThomasYeoLab/CBIG


text:
# ttnhabbridge
Bridge between TheThingsNetwork/Helium and the habitat network,
to receive telemetry from amateur balloons using LoRaWAN

See https://revspace.nl/TTNHABBridge for a more detailed description of this project.
See https://travis-ci.org/bertrik/ttnhabbridge for the Travis CI status

# Development environment
I develop this on in Java 11 in Eclipse.

Steps to install everything:
* download a Java 11 JDK and put it in tools/jdk
* download Eclipse and put in in the tools/eclipse directory (for example)

Steps to prepare the Eclipse environment:
* open a command line to the checked out project, enter the 'ttnhabbridge' directory
* type 'env.bat' to initialise the tool paths etc
* type 'gradlew eclipse' and watch dependencies being downloaded from the internet
* start Eclipse, using the 'workspace' directory as workspace
* import sub-projects (ttnhabbridge, cayenne) into the workspace

Steps to update source code from github:
* in the top-level 'ttnhabbridge' directory, enter 'git pull'

Steps to create the executable package:
* in the root directory of the project,  type './gradlew assemble' (or just 'gradlew assemble' on Windows)
* the .tar (for Linux) and .zip (for Windows) file can be found under ttnhabbridge/build/distributions

# Deployment
Steps to deploy the application:
* unzip the .zip or .tar file
* cd into the application directory
* start the .bat or .sh file, if no .yaml configuration file exists, a default one is generated
* edit and install the systemd service file, if desired (instructions inside the .service file)

# Usage with Helium Network

The key difference between using The Things Network and the Helium Network MQTT integration is The Things Network hosts their  packet broker, while the helium network does not. Therefore, we have to setup our own packet broker, and get Helium to and TTNhabbridge to connect to it. Here are a few steps on how to do it.

1. Setup a MQTT packet broker on machine with port 1883 open to the internet. Docker is the simplest way to do it. Run the following command, changing the `<username>` and `<secret_password>` password fields to something secret :
```
docker run \
    --name mosquitto \
    -d \
    -p 1883:1883 \
    -p 9883:9883 \
    -e MQTT_USERNAME=<username> \
    -e MQTT_PASSWORD=<secret_password> \
    cburki/mosquitto:latest
```

2. Now make Helium to speak with the MQTT broker in the earlier step. To do that, first add a label to your tracker device registration. In this case, it has been labeled `icspace26`
![image](https://user-images.githubusercontent.com/26815217/141027855-6e63df70-782e-4f75-ac23-23b7f7f438df.png)

3. Next in your integrations tab, make a new MQTT integration. Your endpoint address should be in the format ` mqtt://<username>:<secret_password>@your-ip-or-domain.com:1883`. Your  `<username>` and `<secret_password>` fields should be the same as the ones your set in step 1.
![image](https://user-images.githubusercontent.com/26815217/141028244-318307c4-d5bd-436d-ae7e-e7f85bc784db.png)

4. Next, head over to the `flows` tab and connect the label box with the mqtt integrations box. You should immediately see some data appearing on your MQTT packet broker log. This will be log data from Helium servers connecting with your packet broker. The log entries would look like this:

```
mosquitto_1     |<PHONE_NUMBER>: New connection from <IP_ADDRESS> on port 1883.
mosquitto_1     |<PHONE_NUMBER>: New client connected from <IP_ADDRESS> as 8fda71a3-be09-44b0-b3b0-611fb5a54de2 (p2, c0, k30, u'medad').
```

![image](https://user-images.githubusercontent.com/26815217/141028680-b7133ea2-2627-4da0-9fd8-98f57c224d4e.png)

5. Finally, update the `ttnhabbridge.yaml` with your MQTT packet broker's address and credentials.  Helium will publish incoming messages to your MQTT broker. TTNhabbridge will subscribe to your broker, repackage messages and post it on Habhub. An example `ttnhabridge.yaml` file looks like this:
```yaml
---
thethingsnetwork:
  url: "tcp://eu1.cloud.thethings.network"
  user: "icss-lora-tracker@ttn"
  pass: "NNSXS.JDUJCMUYUNDVPIOZ53TN6GBTT2P74NBH5FZXYXQ.OCWSRRQ4E46M5OMNATY35GJ6lkaBH6MOWZ5QFP32DMLP823S6M2A"
  topic: "v3/+/devices/+/up"
helium:
  url: "tcp://beta.medadnewman.co.uk:1887"
  user: "medad"
  pass: "secret_password"
  topic: "helium/+/rx"
habitat:
  url: "http://habitat.habhub.org"
  timeout: 60
gwCacheExpirationTime: 600
payloadEncoding: "cayenne"

```

repository: bertrik/ttnhabbridge

gha_language: Java

repo_name: bertrik/ttnhabbridge