text:
## Redis Basics

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

## To start the Redis server

1. redis-server
2. redis-cli

## Notes

{key :"value"} → value is always a string (key value pair)

Numbers ⇒ "10020"

Objects ⇒ {key : "{ a : '1' }" }

Array ⇒ {key : "[1,2,3,4]" }

---

## Basic Commands

1. SET → SET <key> <value>
2. GET → GET <key>
3. DEL → DEL <key>
4. EXISTS → EXISTS <key>
5. KEYS \* → displays all available keys
6. FLUSHALL → Deletes everything
7. TTL → Time to live { TTL <key> }
8. EXPIRE → EXPIRE <key> <duration(in sec)>
9. SETEX → SETEX <key> <seconds> <value>

---

## ARRAY OPERATIONS

1. LPUSH → insert from left side → LPUSH <key> <Elements....>
2. RPUSH → insert from right side → RPUSH <key> <Elements....>
3. LPOP → Delete from left → LPOP <key> <count>
4. RPOP →Delete from right → RPOP <key> <count>
5. LRANGE → Iterating through the array → LRANGE <start index {eg: 0}> <end index {eg : -1}>
6. SADD → Allows only unique String elements in the array ( tip : if you have to insert words with space write it within double quotes else it will take it as 2 words ; by default it takes input as Strings

   { SADD <key> <members ..>

7. SMEMBERS → SMEMBERS <key>

---

## HASHES (kind of objects)

1. HSET → HSET <key> <field i.e. attribute name eg roll , name etc. > <value>
2. HGET → HGET <key> <field>
3. HGETALL → HGET <key>
4. HDEL → HDEL <key> <field>
5. HEXISTS → HEXISTS <key> <field> → returns 0 or 1

## PostgreSQL Commands

> SEMI COLON IS IMPORTANT

## To start the SQL server

1. psql -U postgres -h localhost
2. Enter the password

## Create a new User for Database

1. CREATE USER <user_name> WITH PASSWORD <'password'>

## Create a new User for Database and grant all privilegs

1. CREATE DATABASE <database_name>
2. GRANT ALL PRIVILEGES ON DATABASE <database_name> to <user_name>

## Basic Commands

1.  /l → Lists all Databases
2.  DROP → { DROP DATABASE <database_name> } → Deletes the database
3.  \c → { \c <database_name> } Connect the database

## Table operations

1. CREATE TABLE <table_name> (

- <column_name -1> <Type> <primary key , not null etc> ,

  ID INT NOT NULL ,

  NAME CHAR[50],

  AGE INT,

  ADDRESS TEXT

  );

1. \d → Lists all tables within a database
2. \d <table_name> → description of entire table

repository: AtigPurohit/Learning-Resources

repo_name: AtigPurohit/Learning-Resources


text:
# AndroidFlask

## Image Upload from Android to a Python-Based Flask Server

Documentation: https://heartbeat.comet.ml/uploading-images-from-android-to-a-python-based-flask-server-691e4092a95e

The repository consists of 2 main folders:
1. **AndroidClient**: Represents the Android Studio project which builds an Android app working as a client.
2. **FlaskServer**: The Python-Based server using Flask.

To use this project, do the following:
* Open the **Android Studio** project and run it to create the APK and run the app.
* After that, run the **Flask** app Python file. It is enough to run it in the console.
* After the server is up and running, then go back to the Android app. Edit the EditText boxe of the **IPv4 address** to reflect the current IPv4 address of the server.
* If the **port number** used in the project which is **5000** is used by another app in your machine, you need to change the port number in both the client and server.
* Select an image file to be uploaded to the server by clikcing on the **Select Image** button.
* Click on the **Connect to Server** button to establish a connection with the server and upload the selected image.

license: MIT

repository: ahmedfgad/AndroidFlask

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: ahmedfgad/AndroidFlask


text:
Document: "cdn"

Path: "/tmp/azure-rest-api-specs/specification/cdn/resource-manager/Microsoft.Cdn/stable/2017-10-12/cdn.json")

## Profile

CDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider and pricing tier.

```puppet
azure_profile {
  api_version => "api_version",
  location => "location (optional)",
  profile => "profile",
  properties => $azure_profile_properties
  resource_group_name => "resource_group_name",
  sku => $azure_sku
  subscription_id => "subscription_id",
  tags => "tags (optional)",
}
```

| Name        | Type           | Required       | Description       |
| ------------- | ------------- | ------------- | ------------- |
|api_version | String | true | Version of the API to be used with the client request. Current version is 2017-04-02. |
|location | String | false | Resource location. |
|profile | Hash | true | Profile properties needed to create a new profile. |
|properties | [ProfileProperties](#profileproperties) | false |  |
|resource_group_name | String | true | Name of the Resource group within the Azure subscription. |
|sku | [Sku](#sku) | true | The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. |
|subscription_id | String | true | Azure Subscription ID. |
|tags | Hash | false | Resource tags. |

## ProfileProperties

The JSON object that contains the properties required to create a profile.

```puppet
$azure_profile_properties = {
}
```

| Name        | Type           | Required       | Description       |
| ------------- | ------------- | ------------- | ------------- |

## Sku

The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.

```puppet
$azure_sku = {
  name => "name (optional)",
}
```

| Name        | Type           | Required       | Description       |
| ------------- | ------------- | ------------- | ------------- |
|name | String | false | Name of the pricing tier. |

## CRUD operations

Here is a list of endpoints that we use to create, read, update and delete the Profile

| Operation | Path | Verb | Description | OperationID |
| ------------- | ------------- | ------------- | ------------- | ------------- |
|Create|`/subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Cdn/profiles/%{profile_name}`|Put|Creates a new CDN profile with a profile name under the specified subscription and resource group.|Profiles_Create|
|List - list all|`/subscriptions/%{subscription_id}/providers/Microsoft.Cdn/profiles`|Get|Lists all of the CDN profiles within an Azure subscription.|Profiles_List|
|List - get one|`/subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Cdn/profiles/%{profile_name}`|Get|Gets a CDN profile with the specified profile name under the specified subscription and resource group.|Profiles_Get|
|List - get list using params|`/subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Cdn/profiles`|Get|Lists all of the CDN profiles within a resource group.|Profiles_ListByResourceGroup|
|Update|`/subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Cdn/profiles/%{profile_name}`|Put|Creates a new CDN profile with a profile name under the specified subscription and resource group.|Profiles_Create|
|Delete|`/subscriptions/%{subscription_id}/resourceGroups/%{resource_group_name}/providers/Microsoft.Cdn/profiles/%{profile_name}`|Delete|Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.|Profiles_Delete|


text:
# ShushuJS
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)

A Collection manager.

## Install
Use NPM to install with the command:

```
npm i -S shushujs
```

## How to use
Import ShushuJS inside your JS file using:

```javascript
var shushujs = require('shushujs');
```

Create your Collection passing the schema (must be an SukimaJS schema):

```javascript
var Users = shushujs(schema);
```

Listen the 'new' event:

```javascript
Users.on('new', function (err, evt) {
  if (err) throw err;
  // do something
});
```

Add new data:

```
Users.set({
  name: 'sergiodxa',
  email<EMAIL_ADDRESS>});
```

If you want to use it in browser just compile it using Browserify to create a browser compatible JS file.

Enjoy!

## Methods

### .set(datum)
Add a new datum to the collection.

### .update(updatedDatum, value, field)
Modify an actual datum in the collection using the *field* and *value* the find the datum and replacing it with the updatedDatum

### .remove(value, field)
Remove an actual datum from the collection using the *field* and *value* the find the datum

### .getAll()
Return an array with all data in the collection.

### .getSingle(value, field)
Return a single datum from the collection using the *field* and *value* the find the datum.

## Events
All event listeners execute a callback returning two parameters, the first is *error* and the second is the event info.

### new
This event is emitted when a new data is setted to the collection using the method .set().

The event info return an object with the next attributes:

* old: the old collection array (with out the added datum).
* data: the actual collection array.
* added: the datum added

### updated
This event is emitted when a datum is modified in the collection using the method .update().

The event info return an object with the next attributes:

* old: the old collection array (with out the added datum).
* data: the actual collection array.
* updated: an object with the attributes:
* * datum: the new datum.
* * field: the field used to find the datum.
* * value: the value used to find the datum.

### removed
This event is emitted when a datum is removed from the collection using the method .remove().

The event info return an object with the next attributes:

* old: the old collection array (with out the added datum).
* data: the actual collection array.
* updated: the datum removed.

## Tests
To do tests just use the command:

```
npm test
```

## License
The MIT License (MIT)

Copyright (c) 2015 Sergio Daniel Xalambrí

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

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

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

repository: sergiodxa/ShushuJS

repo_name: sergiodxa/ShushuJS


text:
# Starter Kit 2 (SK2) based on the WNC M18Qx

## M18QxIotMonitor Overview
The 'iot_monitor is a simple interactive monitor program intended to demonstrate the many features of the Start kit 2.  The **iot_monitor** is installed at the factory
and is available out of the box.  To access it you need to have ADB installed on the PC connected to the SK2 so there are a few steps necessary to get
started.  The following assumes your connected PC has Ubuntu Linux installed and running, installation of the tools on other O/Ss will be different.

## Prepare the development environment
Prepare the development environment by installing ADB and the compiler/tools needed.  The basic tools needed can be obtained from **http://github.com/Avnet/AvnetWNCSDK**

### Install ADB
1. Open up a terminal windows.
2. Install ADB by issuing the command '**sudo apt-get install adb**'
3. Clone the AvnetWNCSDK by issuing the command **'git clone http://github.com/Avnet/AvnetWNCSDK'**
4. Copy the file file **adbpub.key** from the AvnetWNCSDK directory to the ADB directory (cp ./AvnetWNCSDK/adbpub.key ~/.android/).  This installs the security key so ADB can access the SK2.
5. Connect your SK2 to the development PC
6. Verify the ADB connection by listing the attached devices, **sudo adb devices** When you do this the SK2 should be reported as:

    AvnetWNCSDK$ sudo adb devices
    List of devices attached
    WNC_ADB	device

### Install the compiler and configure
1. Goto the AvnetWNCSDK directory

2. Install the tools by executing:  **sudo ./oecorex-86_64-cortexa7-neon-vfpv4-toolchain-nodistro.0.sh**

3. Add the environment variables (you will need to do this each time you open a new terminal window for development) by executing: **" .    /usr/local/oecore-x86_64/environment-setup-cortexa7-neon-vfpv4-oe-linux-gnueabi "** *(there is a spaces after the '.')*

## Install the M18QxIotMonitor source code
1. Move up out of the AvnetWNCSDK directory.

2. Clone the M18QxIoTMonitor code by executing: **'git clone https://github.com/Avnet/M18QxIotMonitor'**

3. Change the directory to **M18QxIotMonitor**

4. Set the environment: **" .    /usr/local/oecore-x86_64/environment-setup-cortexa7-neon-vfpv4-oe-linux-gnueabi "**

5. run autogen: **./autogen.sh**

6. run configure: **"./configure ${CONFIGURE_FLAGS}"**

The tools and source code are now installed.  You can compile the code by typing: **"make"**

## Push the executable to the SK2
You use ADB to push the executable image to the SK2 and place it in the corrector location.  This location is **"/CUSTAPP/"**.  Execute the following:

    M18QxIotMonitor$ adb push iot_monitor /CUSTAPP/iot/
    [100%] /CUSTAPP/iot/iot_monitor

After the code has been pushed to the SK2, you can execute it by entering an ADB shell and running it, e.g.

    M18QxIotMonitor$ adb shell
    # cd /CUSTAPP
    /CUSTAPP # ls
    all.log           custapp.squashfs  psm
    all.log.0         fwup              upload
    all.log.1         iot               user
    /CUSTAPP # cd iot
    /CUSTAPP/iot # ./iot_monitor
    ----------------------------------------------------------------------------

           ** **        **          **  ****      **  **********  ********** ®
          **   **        **        **   ** **     **  **              **
         **     **        **      **    **  **    **  **              **
        **       **        **    **     **   **   **  *********       **
       **         **        **  **      **    **  **  **              **
      **           **        ****       **     ** **  **              **
     **  .........  **        **        **      ****  **********      **
        ...........
                                        Reach Further

     AVNET - AT&T Global Module IoT Monitor
     Version  1.03 // Sep 21 2018 @ 16:11:08
     Hardware Supported: WNC M18Qx Cellular Data Module
    ----------------------------------------------------------------------------

    MON>

A sieries of video's are avaialble at http://cloudconnectkits.org/product/global-lte-starter-kit unter the **Training** tab.


text:
# SQL Server 2019 AlwaysOn Groups

## Docker Image

Docker image using Ubuntu 20.04 LTS. When the image is built it will configure update ubuntu with all needed security updates through apt get.

Using the Microsoft repo for SQL Server Linux it will install SQL Server through apt get.

Once installed it set the configuration through mssql-conf to enable HA.

To build the image use the following commend.

```bash
docker build . -t SQL2019HA:latest

```

## Docker Compose

Docker compose is setup to run three SQL servers with HA enabled. This will use about 8GB of ram on your system remove the third one if you do not want to many SQL Servers running.

### Docker compose commands

```bash
docker-compose up
```

```bash
docker-compose -d
```

```bash
docker-compose down
```

branch_name: refs/heads/main


text:
# About

Repo for reproducing https://github.com/ionic-team/ionic/issues/13453

## Steps to Reproduce

1. Clone this repo
2. `npm install`
3. `ionic build --prod` (*Module not found error*)
4. Remove `(ngModelChange)` from `home.html` then save.
5. `ionic build --prod` (*Error is gone*)


text:
---
title: CakePHP Installation for Beginners
author: Team Koding
date: 2014-04-01
template: page.toffee
---

# CakePHP Installation for Beginners

In this article we will installing CakePHP for beginners.

## What is CakePHP?

[CakePHP](http://cakephp.org/) is a popular PHP framework created with ease of use, small codebase, and MVC in mind. It's also being actively developed, with two point releases in the last month alone. With a solid codebase, a supportive community, and active developers, it is a strong choice for any project.

## CakePHP and Koding

Of course, CakePHP is especially easy on [Koding](https://koding.com). Developing locally means you need to already have a php framework up and running, as well as a database (MySQL for example). This becomes even more troublesome if you want to share your work with coworkers or friends. Exposing your ports to the outside world, finding your ip, and then sharing it. Thankfully on Koding this is a one step process.  Likewise, sharing with your friends is as easy as sharing your Koding Domain. So, lets use [Koding](https://koding.com), shall we?

## Installing CakePHP Steps

1.) On the homepage of CakePHP, copy the download link for the latest
version of CakePHP. In this case we're going to be using [CakePHP
2.4.2](https://github.com/cakephp/cakephp/zipball/2.4.2). 2.) Open your
[Koding Terminal](https://koding.com/Develop/Terminal) and type in `wget
-O cake.zip ` and then paste your download link with Ctrl-Shift-V. As an
example, it should look like this: `wget -O cake.zip
https://github.com/cakephp/cakephp/zipball/2.4.2` 3.) On the left hand
side, in the Koding FileTree, right click your file and choose Extract.
This will extract your downloaded Cakezip into the directory `cake/`.
Expand that directory, and you'll see a directory with a name similar to
`cakephp-cakephp-f53efef`. 4.) Drag that into your `Web/` directory. You
can rename this directory to "cake", or whatever you like, as this will
make it easier to type in your browser. 5.) Finally lets ensure that we
have Apache's mod_rewrite enabled. Run `sudo a2enmod rewrite && sudo
service apache2 restart` just to be safe. If you already have mod_rewrite
enabled, you can skip this step. 6.) The last step is a security step
enforced by CakePHP. Open up `app/Config/core.php` and look for the
following two lines. Edit the `DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi`
and `76859309657453542496749683645` strings to have randomized content
for your deploy. Just remember that the second string is numbers only.

```
/** * A random string used in security hashing methods. */
Configure::write('Security.salt',
'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi'); /** * A random numeric
string (digits only) used to encrypt/decrypt strings. */
Configure::write('Security.cipherSeed', '76859309657453542496749683645');
```

7.) That's it! Now just open up http://hostname.username.koding.io/cake
in your browser, making sure to use your own username in the username
url, and you'll see Cake up and running!

## All in the browser

Thanks to [Koding](https://koding.com), our only requirement to get cake downloaded and running, in the browser. No special OS installation steps, no need to set up your own LAMP stack, no _localhost hassle_. This has been a beginner guide for CakePHP from [Koding]("https://koding.com) and we have more tutorials and guides on the way soon. Stay tuned!


text:
# code-deploy-demo

## Preparing your instance for deployment by CodeDeploy
Use the following script within your EC2 instance's user data to install the CodeDeploy Agent. Make sure to modify the Amazon S3 bucket name and region parameter to reflect the region your instance belongs to:

    #!/bin/bash
    yum -y update
    yum install -y aws-cli
    cd /home/ec2-user
    aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region us-east-1
    chmod +x ./install
    ./install auto

The Code deploy agent will need to access specific Amazon S3 buckets to communicate with the CodeDeploy service. It will also need access to any bucket that contains your code for deployment. To allow access to these resources you will need to set and assign an instance profile with the following IAM policy:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Action": [
            "s3:Get*",
            "s3:List*"
          ],
          "Effect": "Allow",
          "Resource": [
            "arn:aws:s3:::CodeDeployDemoBucket/*",
            "arn:aws:s3:::aws-codedeploy-us-east-1/*",
            "arn:aws:s3:::aws-codedeploy-us-west-2/*",
            "arn:aws:s3:::aws-codedeploy-eu-west-1/*",
            "arn:aws:s3:::aws-codedeploy-ap-southeast-2/*",
            "arn:aws:s3:::aws-codedeploy-ap-northeast-1/*"
          ]
        }
      ]
    }

repository: tesslerr/code-deploy-demo

repo_name: tesslerr/code-deploy-demo


text:
#### Description of Change
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.
-->

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] Added description of change
- [ ] Proper file name given
- [ ] Added tests and example, test must pass
- [ ] Added documentation so that the program is self-explanatory and educational - [Doxygen guidelines](https://www.doxygen.nl/manual/docblocks.html)
- [ ] Relevant documentation/comments is changed or added
- [ ] PR title follows semantic
- [ ] Search previous suggestions before making a new one, as yours may be a duplicate.
- [ ] I acknowledge that all my contributions will be made under the project's license.

Notes: <!-- Please add a one-line description for developers or pull request viewers -->


text:
---
layout: default
---
GTFS-ride is an open, fixed-route transit ridership data standard developed through a partnership between the Oregon Department of Transportation and Oregon State University. GTFS-ride allows for improved ridership data collection, storing, sharing, reporting, and analysis.

This standard uses the _required_ elements of GTFS and adds files necessary for ridership data standardization and reporting. GTFS-ride allows transit agencies to share their ridership data with other agencies and organizations interesting in collecting and analyzing ridership data.

## Links

#### Information
*	[GitHub Repository](http://github.gtfs-ride.org) - GTFS-ride specification and documentation
*	[Wiki](http://wiki.gtfs-ride.org) - Usage guide and resources

#### Explore
*	[WebHub](http://webhub.gtfs-ride.org) - GTFS-ride web-based database and analytic tools
*	[WebHub Tutorials](videos.md) - Videos to guide users through WebHub features and uses

#### Engagement
*	[Specification](http://spec.gtfs-ride.org) - Details elements of standard
*	[Feed Validator](http://validation.gtfs-ride.org) - Validates complete GTFS-ride feeds
*	[Changes Forum](http://changes.gtfs-ride.org) - Discussion of sought or proposed changes


text:
# A brand new **hyde**

This is the new version of hyde under active development.
Incomplete documentation can be found [here][hydedocs].
[This][hyde1-0] should give a good understanding of the motivation behind this
version. You can also take a look at the [cloudpanic source][cp] for a
reference implementation.

[hyde1-0]: http://groups.google.com/group/hyde-dev/web/hyde-1-0
[cp]: http://github.com/tipiirai/cloudpanic/tree/refactor
[hydedocs]: http://hyde.github.com/overview

[Here](http://groups.google.com/group/hyde-dev/browse_thread/thread/2a143bd2081b3322) is
the initial announcement of the project.

## Installation

Hyde supports both python 2.7 and 2.6.

        pip install -r req-2.6.txt

or

        pip install -r req-2.7.txt

will install all the dependencies of hyde.

You can choose to install hyde by running

        python setup.py install

## Creating a new hyde site

The new version of Hyde uses the `argparse` module and hence support subcommands.

        hyde -s ~/test_site create -l test

will create a new hyde site using the test layout.

## Generating the hyde site

        cd ~/test_site
        hyde gen

## Serving the website

        cd ~/test_site
        hyde serve
        open http://localhost:8080

The server also regenerates on demand. As long as the server is running,
you can make changes to your source and refresh the browser to view the changes.

## A brief list of features

1. Support for multiple templates (although only `Jinja2` is currently implemented)
2. The different processor modules in the previous version are now
   replaced by a plugin object. This allows plugins to listen to events that
   occur during different times in the lifecycle and respond accordingly.
3. Metadata: Hyde now supports hierarchical metadata. You can specify and override
   variables at the site, node or the page level and access them in the templates.
4. Sorting: The sorter plugin provides rich sorting options that extend the
   object model.
5. Syntactic Sugar: Because of the richness of the plugin infrastructure, hyde can
   now provide additional syntactic sugar to make the content more readable. See
   `blockdown` and `autoextend` plugin for examples.

## Next Steps

1. Documentation
2. Default Layouts
3. Django Support
4. Plugins:
    * Tags
    * Atom / RSS
    * Text Compressor (CSS, JS, HTML)
    * Image optimizer

repository: chewable/hyde

extension: markdown

repo_name: chewable/hyde


text:
# OEIS explorer

This is a tool for exploring two different kinds of relationships between sequences in the OEIS: mentions (links) of other sequences on a sequence's page, and large numbers that appear in multiple different sequences.

You can view the tool [here](https://alexmojaki.github.io/oeis-explorer/) for more explanation.

You can also explore the resulting JSON data [here](https://github.com/alexmojaki/oeis-explorer/blob/master/frontend/src/result.json).

To run this code:

- [Download `full_sequences.json` here](https://drive.google.com/file/d/1bN3LrTGRenfw-esiBe4GI0CqtIfPWjlC/view?usp=sharing).
- `pip install networkx`
- `python analyse.py` to update `result.json`
- Then in the `frontend` folder, run `npm install` and `npm start` to start a server and see the UI.

At least Python 3.6 is required.

repository: alexmojaki/oeis-explorer

repo_name: alexmojaki/oeis-explorer


text:
# route_blocker
Demo app presented at the Long Night of Science Berlin 2016, 2017 and 2018

## Setup

The app calls a special edition of the [ExCELL Routing Service](https://github.com/excell-mobility/routing_service). You need to check out the `cebit` branch to get the API that can `block` or `unblock` road elements. The app will start when opening the index.html file.

## Flyer

More information about the app itself can be found on this [flyer](https://projekt.beuth-hochschule.de/fileadmin/projekt/magda/flyer_lndw.pdf).


text:
Title: About
Date: 2018-02-04

This site will hopefully curate/condense my scattered thoughts/learning on the *too-many* things I’m interested in. I wish to preserve my sanity with this outlet as well as create some sanity for those who are in need.

I'm not a good writer. But if you hang around, you'll notice significant improvement *very* quickly.

The macrotopics can be categorised into:

* Coding (primarily)
* Technology trends
* Culture
* Ethics

Specifically, the topics I’m currently focussed on include (but not restricted to):

* ML/AI
* Cryptography and Blockchains (that includes the run-of-mill coin-related stuff sometimes)

There will also be immature musings on:

* VR/AR/MR
* A little bit of Frontend engineering
* Random coding epiphanies

If you're a programmer, these are the languages I primarily discuss:

* JS
* Python
* Scheme (I gobbled it up while doing the SICP book)
* Haskell (currently learning)

The blog will occasionally read like some serious dude for want of accuracy in conveying information, but I hope to spice it up now and then. The problem with humor is that occasionally you cross the boundary and it’s not funny anymore. And whoever can predict what reeeaaallyy crossed the line? Also, the point being discussed is almost entirely missed.

Oh well, I’ll still try. Because I’ll be disappointed in myself if I didn’t.

**Most importantly**, I hope you find something worthwhile here to spend your time on. The thing I value most in humans is them spending their time on each other. The very act of paying attention to another person is a concrete step towards selflessness and freedom. I take it very seriously.  OH, and maybe bitcoins. Probably bitcoins. BTC? Moon?

Kidding.

repository: neuclid/blog

repo_name: neuclid/blog


text:
## Flow APIs Documentation

* [`TableManager`](#api_tablemanager)
* [`Section`](#api_section)
* [`Row`](#api_row)
* [Observable Events in Row](#observable_events)

* * *

## `TableManager`

### Initialize

| **Signature**                                                                | **Description**                                                                                |
|------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `init(table: UITableView, estimateRowHeight: Bool)`                          | Initialize a new manager for a specific `UITableView` instance                                                                                |                                                                                |

### Reload

| **Signature**                                                                | **Description**                                                                                |
|------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `reloadData()`                                                               | Reload the data displayed by the managed table. Call it at the end of your operations in order to reflect made changes. Reload is not animated.                                          |
| `update(animation:block:)`                                                   | Allows to perform a batch of operations on table's sections and rows. At the end of the block animations are collected and executed to reflect into the UI changes applied to the model. |
| `reload(sectionWithID id: String, animation: UITableViewRowAnimation?)`      | Reload data for section with given identifier                                                                                |
| `reload(sectionsWithIDs ids: [String],,animation: UITableViewRowAnimation?)` | Reload data for sections with given identifiers. Non existing section are ignored.                                                                                |
| `reload(sections: [Section], animation: UITableViewRowAnimation?)`           | Reload data for given sections.                                                                                |

### Add Rows

| **Signature**                                       | **Description**                                                                                |
|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `add(rows: [RowProtocol], in section: Section?)`    | Add rows to a section, if section is `nil` a new section is appened with rows at the end of table                                                                                |
| `add(rows: [RowProtocol], inSectionAt index: Int?)` | Add rows to a section specified at index (If `nil` is passed rows will be added to the last section of the table. If no sections are available, a new section with passed rows will be created automatically) |
| `add(row: RowProtocol, in section: Section? = nil)` | Add a new row into a section; if section is `nil` a new section is created and added at the end of table (is `section` is `nil` a new section is created and added at the end of the table).                  |
| `add(row: RowProtocol, inSectionAt index: Int?)`    | Add a new row into specified section (If `nil` is passed the last section is used as destination. if no sections are present into the table a new section with given row is created automatically).           |

### Move/Insert/Replace Rows

| **Signature**                                                 | **Description**                                                                                |
|---------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| `move(row indexPath: IndexPath, to destIndexPath: IndexPath)` | Move a row in another position. This is a composed operation: first of all row is removed from source, then is added to the new path. |
| `insert(section: Section, at index: Int)`                     | Insert a section at specified index of the table.                                                                                |
| `replace(sectionAt index: Int, with section: Section)`        | Replace an existing section with the new passed.                                                                                |
| `remove(sectionAt index: Int)`                                | Remove an existing section at specified index.                                                                                |
| `removeAll()`                                                 | Remove all the sections of the table.                                                                                |

### Get section

| **Signature**                           | **Description**                                                                         |
|-----------------------------------------|-----------------------------------------------------------------------------------------|
| `section(atIndex idx: Int)`             | Return setion at specified index.                                                       |
| `section(forID identifier: String)`     | Return the first section with given identifier inside the table                         |
| `sections(forIDs ids: [String])`        | Return all sections with given identifiers                                              |
| `hasSection(withID identifier: String)` | Return `true` if table contains passed section with given identifier, `false` otherwise |

### Properties

| **Signature** | **Description**                                                               |
|---------------|-------------------------------------------------------------------------------|
| `isEmpty`     | Return `true` if table does not contains sections or rows                     |
| `sections`    | Return the list of `Sections` actually contained into the manager (read-only) |

- - -

## `Section`

### Initialize

| **Signature**                                                                                | **Description**                                                                                |
|---------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| `init(id: String?, row: RowProtocol)`                                                                   | Initialize a new section with a single passed row                                                                              |
| `init(id: String?, _ rows: [RowProtocol]?, header: String?, footer: String?)`                           | Initialize a new section with a list of rows and optionally a standard header and/or footer string.                            |
| `init(id: String?, _ rows: [RowProtocol]?, headerView: SectionProtocol?, footerView: SectionProtocol?)` | Initialize a new section with a list of rows and optionally an header/footer as a custom UITableViewHeaderFooterView subclass. |

### Reload Section

| **Signature**                                                                     | **Description**                                                                         |
|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| `reload(_ anim: UITableViewRowAnimation?)`                                        | Reload current section with given animation (`nil` uses `automatic`)                    |
| `reload(rowsAtIndexes indexes: [IndexPath], animation: UITableViewRowAnimation?)` | Reload rows at specified indexes with given animation (`nil` uses `automatic`)          |
| `reload(rowWithID id: String, animation: UITableViewRowAnimation?)`               | Reload row with given identifier using passed animation type (`nil` uses `automatic`)   |
| `reload(rowsWithIDs ids: [String], animation: UITableViewRowAnimation?)`          | Reload rows with given identifiers using passed animation type (`nil` uses `automatic`) |

### Get Rows from Section

| **Signature**                                               | **Description**                                         |
|-------------------------------------------------------------|---------------------------------------------------------|
| `rows(withIDs ids: [String]) -> [RowProtocol]`              | Get rows with given identifiers                         |
| `row(withID id: String?) -> RowProtocol?`                   | Get the first row with given identifier                 |
| `index(ofRowWithID identifier: String?) -> Int?`            | Return the index of the first row with given identifier |
| `indexes(ofRowsWithIDs identifiers: [String]) -> IndexSet?` | Return the indexes of rows with given identifiers       |

### Add/Replace Rows in Section

| **Signature**                                      | **Description**                                                              |
|----------------------------------------------------|------------------------------------------------------------------------------|
| `add(_ row: RowProtocol, at index: Int? = nil)`    | Add a new row into the section optionally specifying the index.              |
| `add(_ rows: [RowProtocol], at index: Int? = nil)` | Add rows into the section optionally specifying the index of the first item. |
| `replace(rowAt index: Int, with row: RowProtocol)` | Replace a row with another row.                                              |

### Remove Rows from Section

| **Signature**                                                | **Description**                        |
|--------------------------------------------------------------|----------------------------------------|
| `remove(rowAt index: Int)`                                   | Remove a row at specified index.       |
| `remove(rowWithID identifier: String?) -> RowProtocol?`      | Remove first row with given identifier |
| `remove(rowsWithIDs identifiers: [String]) -> [RowProtocol]` | Remove rows with given identifiers     |

### Other functions

| **Signature** | **Description**                |
|---------------|--------------------------------|
| `clearAll()`  | Remove all rows of the section |

Note: you must call `reloadData()` to reflect changes (or `update()` and add operations inside a block to perform animated reload).

- - -

## `Row`

### Initialize

| **Signature**                                                                        | **Description**                                                                                |
|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| `init(_ item: Cell.T, _ configurator: TableRowConfigurator? = nil)`                  | Initialize a new `Row` with a single model (`item`) and optional configuration block you can define to initialize your class. |
| `static func create(_ items: [Cell.T], _ configurator: TableRowConfigurator? = nil)` | Create a new set of `Rows` of the specified type which hold data for passed models (`items`).                                 |

## Observable Events in Row

The following events are observable by the `Row` instance and allows you to customize behaviour and appearance of the single cell.

* `onDequeue: RowProtocol.RowEventCallback` Message received when a cell instance has been dequeued from table.
* `onTap: ((RowProtocol.RowInfo) -> (RowTapBehaviour?))?` Message received when user tap on a cell at specified path. You must provide a default behaviour by returning one of the `RowTapBehaviour` options. If `nil` is provided the default behaviour is `deselect` with animation.
* `onDelete: RowProtocol.RowEventCallback?` Message received when a selection has been made. Selection still active only if `onTap` returned `.keepSelection` option.
* `onSelect: RowProtocol.RowEventCallback` Message received when a selection has been made. Selection still active only if`onTap` returned `.keepSelection` option.
* `onEdit: ((RowProtocol.RowInfo) -> ([UITableViewRowAction]?))?` Message received when a cell at specified path is about to be swiped in order to allow on or more actions into the context. You must provide an array of UITableViewRowAction objects representing the actions for the row. Each action you provide is used to create a button that the user can tap. By default no swipe actions are returned.
* `onDeselect: RowProtocol.RowEventCallback?` Message received when cell at specified path did deselected.
* `onWillDisplay: RowProtocol.RowEventCallback?` Message received when a cell at specified path is about to be displayed. Gives the delegate the opportunity to modify the specified cell at the given row and column location before the browser displays it.
* `onDidEndDisplay: RowEventCallback?` The cell was removed from the table.
* `onWillSelect: ((RowProtocol.RowInfo) -> (IndexPath?))?` Message received when a cell at specified path is about to be selected.
* `onShouldHighlight: ((RowProtocol.RowInfo) -> (Bool))?` Message received when a cell at specified path is about to be selected. If `false` is returned highlight of the cell will be disabled. If not implemented the default behaviour of the table is to allow highlights of the cell.
* `canMove: ((RowProtocol.RowInfo) -> (Bool))?` Asks the data source whether a given row can be moved to another location in the table view. If not implemented `false` is assumed instead.
* `shouldIndentOnEditing: ((RowProtocol.RowInfo) -> (Bool))?` Asks the delegate whether the background of the specified row should be indented while the table view is in editing mode. If not implemented `true` is returned.

* * *

repository: Darkkrye/Flow

repo_name: Darkkrye/Flow


text:
# Diary application

Simple diary application with moderator functionality.

- Diary application with moderator functionality.
- Data export to excel.
- Postgres logging and auditing.
- Authorization via jwt tokens.
- Rest using encrypted uuid

Frontend  -> react + antd
Backend   -> spring boot + flyway + mybatis + postgresql

# Deployment

## Prerequisites and Dependencies
For prod/test deployment using docker the only prerequisites is docker/docker-compose.

Prerequisites: node, npm, java, gradle, docker, docker-compose

Install dependencies:
```
./api/gradlew -p ./api/ build --refresh-dependencies
```
```
npm --prefix ./ui install ./ui
```

## Development deployment

### database
PostgreSQL 10.5 (configuration in application.yml):
port:   5444
scheme: pbs
user:   admin
pass:   admin

or You can use docker-compose to setup simple database container
```
docker-compose -f ./dev/docker-compose.dev.yml up -d --build
```

### frontend and backend
Run two separate shell windows for frontend and backend.
(Or just use your favorite IDE :) )
```
./api/gradlew -p ./api/ bootRun
```
```
npm --prefix ./ui start
```

### Access
Access via http://localhost:3000

Admin account:
username: admin
password: pass

Users account:
usernames: user1, user2, user3
password: pass

## Production/Test deployment using docker-compose with downsized containers

(Not sure if still works :) )

Production and test environments are set up using multistage docker containers.
The only prerequisites here is docker/docker-compose.
Production deployment need a working ssl certificate, configured in prod/nginx.conf file.

prod:
```
sh prod/prod.sh
```

test:
```
sh test/test.sh
```

repository: mpiorowski/diary-app

gha_language: Java

gha_license_id: MIT

repo_name: mpiorowski/diary-app


text:
# Bootstrap / AngularJS / Firebase Sample Application

## ABSTRACT

Example of app using bootstrap / angularJS / firebase

In this example I use:
  - bootstrap for managing reposnsive design display
  - angular for all fronend logic
  - firebase for backend

This example shows a simple usage of the 3-ways-binding technic beteween AngularJS and Fireabse.
Angular binds the Html UI with the local JS ojects representation when Firebase bind this local JS to the firebase backend repository.

This example also illustrate how the dynamic binding can be used to build interractive apps without having to code anny backend communication layer. In this example the vote of each indiviual appear automatically on the sprint detail board and on the team.member view

## THE DEMO
To play with the demo go to:
 https://sprintvote.firebaseapp.com/#/sprint-list

To run this demo you need to signup for a (free) firebase account.
In this demo you can:
 - list all current sprints
 - select a sprint or create a new one and assign team members
 - add stories to you sprint
 - join the sprint as a team member
 - submit a story to vote
 - as a member vote for a story

Each vote is immediatly visible on sprint board and on other team member views

## REFERENCE
Please consult for references:

- http://angularjs.org/
- https://github.com/angular/angular.js
- https://www.firebase.com/
- https://www.firebase.com/docs/angular/reference.html#angularfire
- https://github.com/firebase

repository: gvtech/scrumvote

repo_name: gvtech/scrumvote


text:
# ReqresRspec

Gem generates API documentation from your integration tests written with `rspec`.

No additional DSL needed. Beside covering rspec tests, documentation may be extended with API controller action comments in `yardoc` style.

Documentation is generated in JSON, YAML, HTML, PDF formats.

## Installation

### 1) Gem

Just add this gem to `Gemfile` of your API Application

    gem 'reqres_rspec', group: :test

And then execute:

    $ bundle

### 2) PDF generator

Install `prince` http://www.princexml.com/download/ . For MacOS installation commands are

```
wget http://www.princexml.com/download/prince-9.0r2-macosx.tar.gz
tar -xvf prince-9.0r2-macosx.tar.gz
cd prince-9.0r2-macosx
./install.sh
```

## Usage

by default `reqres_rspec` is not active (this may be configured!). To activate it, run `rspec` with

`REQRES_RSPEC=1 bundle exec rspec`

Documentation will be put into your application's `/doc` folder

### Sample controller action

```ruby
  # @description creates Category from given parameters
  # description text may be multiline
  # @params category[title] required String Category title
  # @params category[weight] in which order Category will be shown
  # param text may also be multiline
  def create
    category = Category.new(create_category_params)

    if category.save
      render json: { category: category }.to_json, status: 201
    else
      render json: { errors: category.errors.full_messages }, status: 422
    end
  end
```

Description param text is started with `@description` and may be multiline.
Each param text is started with `@params` and first word will be param name, then optionally `required`, then optionally type (`Integer`, `String` etc), and finally param description, which may be multiline as well.

### Sample rspec test

```ruby
  describe 'Create' do
    it 'creates category' do
      post :create, category: { name: 'Cookies' }
      ...
    end

    it 'some other example', :skip_reqres do
      ...
    end
  end
```

 By default all examples will be added to docs. Example may be excluded from docs with option `:skip_reqres`

 Doc will use full example description, as a title for each separate spec

### Generates documentation example

[![Generated Doc](http://i44.tinypic.com/kda1pw.png)](http://i44.tinypic.com/kda1pw.png)
[![Generated Doc](http://i39.tinypic.com/2w3p6vl.png)](http://i39.tinypic.com/2w3p6vl.png)

Documentation is written in HTML format, which then converted to PDF. PDF files are textual, support search and have internal navigation links

## Configuration

TODO: Write instruction on gem configuration

## Future plans

1) Write documentation in YAML, JSON formats

2) Add configuration (folders with API specs, default generate spec for all examples, or opt-in generation)

3) Cover with tests

4) Remove dependency on `rails`

5) Add demo for `Rails`, `Rails API`, `Sinatra`

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
---
name: Bug report
about: Create a report to help improve AprilTag
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
[e.g. Run apriltag_demo on the attached input image.]

**Expected behavior**
A clear and concise description of what you expected to happen.

** Input Image**
If applicable, please attach the input image that reproduces the problem.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Operating Sytem**
[e.g. Ubuntu, iOS, Windows]

** Installation Method**
[e.g. I built AprilTag from source following the instructions in the README]

** Code version **
What does the version tag in package.xml say? Or, if you have downloaded the code from github right now, say current github HEAD.

**Additional context**
Add any other context about the problem here.

repository: AprilRobotics/apriltag

gha_language: C

repo_name: AprilRobotics/apriltag


text:
Sublime Text Ruby Logger
============

Sublime snippet to log (with dashes).

Type `log` and hit tab. You'll get:

```
p "--------------------------------------------------"
p "thing:", thing
p "--------------------------------------------------"
```

repository: hapiben/sublime-ruby-logger

repo_name: hapiben/sublime-ruby-logger


text:
## CUE Test Suite

This directory contains a test suite for testing the CUE language. This is only
intended to test language evaluation and exporting. Eventually it will also
contains tests for parsing and formatting. It is not intended to cover
testing of the API itself.

WORK IN PROGRESS

The tests are currently converted from various internal Go tests and the
grouping reflect properties of the current implementation. Once the transition
to the new implementation is completed, tests should be reordered along more
logical lines: such as literals, expressions, references, cycles, etc.

FORESEEN STRUCTURE

The txtar format allows a collection of files to be defined. Any .cue file
is used as an input. The out/* files, which should not have an extension,
define outputs for various tests. A test definition is active for a certain test
if it contains output for this test.

The comments section of the txtar file may contain additional control inputs for
a test. Each line that starts with a `#` immediately followed by a letter or
digit is specially interpreted. These can be boolean tags (`#foo`) or a
key-value pair (`#key: value`), where the value can be a free-form string.
A line starting with `#` followed by a space is interpreted as a comment.

Lines not starting with a `#` are for interpretation by the testscript package.

This organization allows the same test sets to be used for the testing of
tooling as well as internal libraries.

repository: backwardn/cue

repo_name: backwardn/cue


text:
---
layout: post
title: "First post"
date: 2021-03-11 00:00:00
img: gmplogo.png
excerpt: GMP is a free library for arbitrary precision arithmetic

categories: []
tags: [photo]

publish: 1
---
[GitHub Project](https://github.com/mathybit/java-gmp){:target="_blank"}

GMP is a free library for arbitrary precision arithmetic, extremely useful for cryptography applications and research, Internet security applications, etc. In order to use this highly efficient library, one must code in C/C++. This is a Java port for fellow Java developers who dislike thinking about pointers.

## Requirements

You will need the following:
* Cygwin installation on Windows ([https://cygwin.com/](https://cygwin.com/))
* libgmp source code ([https://gmplib.org/](https://gmplib.org/))
* msvcrt.dll (your system may already have this)
* Java Native Access Library ([java-native-access](https://github.com/java-native-access/))


text:
# JARVIS_NODEMCU
voice controlled 8 channel relay
# PIN OUTS
```
D1 => GPIO5
D2 => GPIO4
D3 => GPIO0
D4 => GPIO2
D5 => GPIO14
D6 => GPIO12
D7 => GPIO13
D8 => GPIO15
```
# ARRAY
[5,4,0,2,14,12,13,15]
int myPins[] = {5,4,0,2,14,12,13,15};

# HTTPS
https://www.onetransistor.eu/2019/04/https-server-on-esp8266-nodemcu.html


text:
## Introduction
PDFspeaker is a macOS app enabling speaks/lectures with PDF files.

## Features
- muliti-screen display
- presentor mode

## Support Us
#### Your generous donation helps a lot with our development! Any amount you would like to!
- PayPal

  [https://paypal.me/hautenlee](https://paypal.me/hautenlee)

## Team
HauTen Lee [https://htlee.net](https://htlee.net<EMAIL_ADDRESS>


text:
# Exporter
Currently only ".stl" files can be exported in Iris Web Viewer. There are some things to be aware of how the files are exported as well.

## STL
STL files are often used for 3D printing which makes them very common and are a useful file extension. Iris can export ASCII stl files which are then saved to the users download folder.

### Notes
* STL files only specify one normal per face, therefore the exported Normal for each face is the average of all three vertices. This means that if each vertice of a given face has a different normal, the result in the export file will be averaged and shared among each vertex.

repository: Hengle/Iris-Web-Viewer

repo_name: Hengle/Iris-Web-Viewer


text:
---
layout: post
title: "Persona assignment and examples"
comments: false
description: "More details about personas, some examples, and details about your assignment"
---

# Purposes of Personas

What benefits do personas provide? Well, mainly 3:

1. make the team's assumptions and knowledge about users explicit
2. help team focus on designing for specific users (who may not be like the team)
3. help team develop interest and empathy in the users

So, good personas are those that help us accomplish those three things. You heard me say in class that connections to data from the assimilation activity are particularly important, and that's because the team's ability to trust the persona depends heavily on that data. Personas that are disconnected from the data or unsupported are harder to defend and rally around.

Here are some examples:

- [two example personas]({{ site.baseurl}}/assets/pdfs/example_personas.pdf) from the [Persona Lifecycle book](https://smile.amazon.com/Essential-Persona-Lifecycle-Building-Personas/dp/0123814189?_encoding=UTF8&keywords=persona%20lifecycle&qid=1487194670&ref_=sr_1_1&sr=8-1).
- [UX magazine example](http://uxmag.com/sites/default/files/uploads/oconnorpersonas/samplepersona.png)
- [Usability.gov](https://www.usability.gov/how-to-and-tools/methods/personas.html)

# Persona Assignment

Your group must generate 2 personas and present foundation documents (descriptions like on the [CTA personas]({{ site.baseurl }}/2017/02/CTA-Personas/) page) for both. You must also "show your work" - provide pictures of your data and assumption documenting and assimilating activities (like [these from class]({{ site.baseurl}}/2017/02/Persona-activity-photos/) and be sure to include references to that data when describing your personas. You will also list skeletons on your way to deciding which personas to generate, and you must provide those as well.

## Due Date

March 1

## Deliverables

1. 2 complete persona documents
2. pictures of your data assimilation activities
3. list of skeletons and how you decided their priority


text:
# Large-Scale Parallel Training on ImageNet

[[`projects/imagenet`](../../projects/imagenet)]

This note will show that how to adopt `torchshard` to current projects.
We take the case of training ResNet-50 on ImageNet as our example.

## Coding

The official PyTorch training code is at [pytorch/examples/imagenet](https://github.com/pytorch/examples/tree/master/imagenet).
Please follow its instruction and prepare the ImageNet dataset.
In this section, we will add some code to the `main.py` step-by-step.
Let's start.

First, import torchshard of course :bowtie:.

```python
import torchshard as ts
```

Then, we need two additional flags for setting up our training.
`--enable-model-parallel` controls whether to use shard training mode or not.
`--model-parallel-dim` controls which dimension along to split layers parameters.

```python
parser.add_argument('--enable-model-parallel', action='store_true',
                    help='enable training with torchshard')
parser.add_argument('--model-parallel-dim', default=None, type=int,
                    help='parallel dim: -1 | 1 | 0 | None')
```

Since TorchShard only works in a distributed manner, we need to initialize its process groups like `torch.distributed.init_process_group` of [DDP](https://pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group).
Here we make group size equal to the world size.

```python
if args.enable_model_parallel:
    # init model parallel processes and groups
    ts.distributed.init_process_group(group_size=args.world_size)
```

Next, we start to convert the model into a parallel version.
There is only one linear layer at the last position in ResNet.
So we can directly feed the whole model into the convert helper function.

```python
if args.enable_model_parallel:
    import resnet
    model = resnet.__dict__[args.arch](pretrained=args.pretrained)
    ts.nn.ParallelLinear.convert_parallel_linear(model, dim=args.model_parallel_dim)
    print("=> paralleling model '{}'".format(args.arch))
```

Don't forget the criterion part, i.e., loss function.

```python
if args.enable_model_parallel:
    criterion = ts.nn.ParallelCrossEntropyLoss().cuda(args.gpu)
```

When model parallel mode (TorchShard) and data-parallel mode (DDP) work together, we need to take care of input for the parallel layers.
Each parameter on each rank is different, and each training data on each rank is different, this is why we gather input before the parallel linear layer in the ResNet forward.

```python
x = ts.distributed.gather(x, dim=0) # gather input along the dim of batch size
x = self.fc(x)
```

Same, we gather target tensors before calculating loss values.

```python
output = model(images)
if args.enable_model_parallel:
    target = ts.distributed.gather(target, dim=0)
loss = criterion(output, target)
```

Now we have finished adding code for the shard training on ImageNet.
Then we can scale it up with increasing the number of classes, i.e., the output feature dimension of the last fc layer.

## Performance

This section shows GPU memory cost with the standard ResNet training settings (i.e., input size 224 and batch size 256) under different parallel strategies.
Parallelism is with 8-way data parallel and N-way model parallel (N = the number of GPUs).

- Training ResNet-50 on 8 NVIDIA TITAN-XP (12196 MiB) GPUs for the number of classes ≤ 1000000, 16 GPUs for 2000000.

| number of classes | precision mode | batch size | number of GPUs | parallel dim | iteration time (s) |
| :---------------: |:-------------: | :--------: | :------------: | :----------: | :----------------: |
| 1000              | FP32           | 256        | 8              |  None        | 0.508 |
| 1000000           | FP32           | 256        | 8              | `0`          | 0.710 |
| 1000000           | FP32           | 256        | 8              | `1` or `-1`  | 0.578 |
| 2000000           | FP32           | 256        | 16             | `1` or `-1`  | 0.780 |

**Note**:
- The iteration time is sampled in the middle of an epoch training.
- The training speed can be boosted, by using AMP, if running on GPUs with [Tensor Cores](https://www.nvidia.com/en-us/data-center/tensor-cores/), such as NVIDIA V100 or A100. Currently, I have no these types of machine to benchmark out more results.

## Results

TorchShard has no accuracy loss.
We run 3 times for each experimental mode and average their best accuracies.

mode	 best accuracy@top1

DP	75.90 ± 0.2

DDP	75.60 ± 0.3

DDP + TorchShard	 75.75 ± 0.2

**Note**:
The ResNet-50 top1 accuracy in [torchvision.models](https://pytorch.org/vision/stable/models.html#classification) is 76.130.
I cannot reproduce this result, maybe because there are some broken images in my training dataset, as shown in following logs.
If you can reproduce that official best accuracy, please help me out with updating this table.
It is my great pleasure.

```bash
/opt/conda/lib/python3.7/site-packages/PIL/TiffImagePlugin.py:802: UserWarning: Corrupt EXIF data.
Expecting to read 4 bytes but only got 0. warnings.warn(str(msg))
```

## Save and Load Checkpoints

It's super easy. Just warp up the PyTorch `state_dict()` using [`torchshard.collect_state_dict()`](../api/ts.md#collect_state_dict) and [`torchshard.relocate_state_dict()`](../api/ts.md#relocate_state_dict) to process the model `stat_dict()`.

- for saving

```python
state_dict = model.state_dict()
state_dict = ts.collect_state_dict(model, state_dict) # collect state_dict() across all ranks
if ts.distributed.get_rank() == 0:
    torch.save(state_dict, 'resnet50.pt')
```

- for loading

```python
if ts.distributed.get_rank() == 0:
    state_dict = torch.load('resnet50.pt')
state_dict = ts.relocate_state_dict(model, state_dict) # relocate state_dict() for all ranks
model.load_state_dict(state_dict)
```

➝ Back to the main page

repository: mullerhai/torchshard

repo_name: mullerhai/torchshard


text:
# Entei

# React Basic Starter
* Node 6.0.0v
* React 15.1.0v
* ReactDom 15.1.0v
* ReactRouter 2.4.1v
* Redux 3.5.2v
* ReactRedux 4.4.5v
* React-Hot-Loader 1.3.0v
* eslint 2.11.1v
* ES6 Support
* Only client side render now

# Why React Basic Starter
It very very easily and basic for web developer to start the test project, and have the clearly structure to use it.

# Installation
```
git clone https://github.com/madeinfree/react-basic-starter.git
npm i
npm start

well done !
```
[http://localhost:8080](http://localhost:8080)

# TODO
* server render

# License
MIT

repository: madeinfree/Entei

repo_name: madeinfree/Entei


text:
# TerraForged

TerraForged is a small collection of projects centered around procedurally generated worlds.
The primary outlet of which is a Forge mod for the popular game Minecraft (Java Edition).

### Building From Source

Firstly you must recursively git-clone this repository and its submodules (Engine & FeatureManager). To build the
mod jar just use the gradle build task. The jar will output to the `build/libs` directory.

#### Commands
```shell script
git clone --recursive https://github.com/TerraForged/TerraForged.git

./gradlew build
```

### Developing With TerraForged's API

#### Dependency
```groovy
repositories {
    maven {
        url "https://io.terraforged.com/repository/maven/"
    }
}

dependencies {
    implementation fg.deobf("com.terraforged:TerraForged:1.15.2-0.1.0")
}
```

#### Usage

TerraForged fires a number of setup events each time its chunk generator is created. These events expose certain
components of the generator allowing for world-gen content to be configured, modified, or added to dynamically.

See the `com.terraforged.api.TerraEvent` class for the available events.

All events are fired on the `FORGE` event bus.


text:
# Code Challenges

Welcome!

This repo is a quarry of material for interviewing JavaScript developers. Exercises are focused on UI work. Some invite the user to creatively invision a solution to a UX problem. Others provide a solution and ask the interviewee to recreate the mockup in code. And yet others ask the interviewee to do both.

In addition to working code, I ask interviewees to proivde comments for design decisions, architectural dev decision. The comments can be in-code, or a separate summary.


text:
### Archived Repo - because I went back to a mac 😜 after 6 months with WSL2

# Julie's Bash on Windows

When a mac developer codes on a Windows...

### Highlights

- Ubuntu - Linux Subsystem on Window (WSL)
- Oh My ZSH
- Spaceship Prompt - with minimalist ui
- Hyper.js Terminal - for tabs and styling
- Node.js and [n](https://github.com/tj/n) for version management
- git
	- login with encrypted `.netrc`
	- sign commits by default

![Hyper.js Preview](./preview.png)

## Setting up Linux on Windows

1. Enable feature. Inside Powershell (right click windows symbol), type:

	```
	Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
	```

1. Install Ubuntu from Windows App Store.
	Note: you will be prompted to create a separate user and password for the linux subsystem.

1. Update Ubuntu - install latest versions of dependencies, etc.

	```
	sudo apt update
	sudo apt upgrade
	```

1. Install [essential developer tools]((https://blogs.windows.com/buildingapps/2016/07/22/fun-with-the-windows-subsystem-for-linux/)) incl. gcc and make, which are required later.

	```
	sudo apt install build-essential
	```

1. Install [git](https://git-scm.com/)

	```
	sudo apt install git
	```

## Installing Node.js

1. Install Node Version Manager

	We will use [n](https://github.com/tj/n) to manage versions of node.js. To install, we need to run:

	```
	curl -L https://git.io/n-install | bash
	```

	Note: this may fail if `build-essential` tools are not installed in previous step.

2. Install latest Node.js LTS version:

	```
	n lts
	```

3. Check everything works:

	```
	npm --version
	node --version
	```

	If it doesn't check that `~/n/bin` is in your `$PATH`.

## Customizing the Shell

1. Install Oh My ZSH
	```
	sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
	```
1. Install the [Hyper.js Terminal](https://hyper.is/)
1. Install Powerline Fonts [per these instructions](https://medium.com/@slmeng/how-to-install-powerline-fonts-in-windows-b2eedecace58):
	1) Download fonts from [github.com/powerline/fonts](https://github.com/powerline/fonts) and navigate to the folder in Powershell.
	1) Inside Powershell: `Set-ExecutionPolicy Bypass`
	1) Run `.\install.ps1` to install all fonts at once. Might take a few minutes
	1) Inside Powershell: `Set-ExecutionPolicy Default`
1. Install [Spaceship prompt](https://github.com/denysdovhan/spaceship-prompt)
	```
	npm install -g spaceship-prompt
	```

### Customize  Hyper.js

Open the Hyper app. Then open up preferences via the Hamburger menu or by pressing `Ctrl` + `,` (comma)

Copy the contents of the [.hyper.js file in this repository](./.hyper.js), which changes the shell to `C:\\Windows\\System32\\bash.exe`

and adds the following plugins

- [verminal](https://www.npmjs.com/package/verminal) color scheme
- [hyper-tabs-enhanced](https://www.npmjs.com/package/hyper-tabs-enhanced)
- [hyper-hide-scroll](https://www.npmjs.com/package/hyper-tabs-enhanced)

The other customizations are cosmetic.

Note: Hyper.js is not installed in your linux home, but rather at your Windows home: `/mnt/c/Users/<username>`

### Install custom dotfiles

Copy these files into your home directory, aka `~`, which should be `/home/<username>`:

- [.bash_aliases](./.bash_aliases)
- [.zshrc](./.zshrc), which also configures spaceship prompt
- [.gitconfig](./.gitconfig)

## Setup GPG, save GitHub Credentials

1. Create `.netrc`

	Inside your `~` home directory, create a `.netrc` file with the following contents (password is plain text):

	```
	machine github.com
	login <USERNAME>
	Password <PASSWORD>
	```

1. Generate GPG Key

	```
	gpg --gen-key
	```

	which will prompt you for name, email and secret.

1. Encrypt `.netrc`

	Now encrypt it using the gpg key, where `<EMAIL>` is the address you used when creating the key

	```
	gpg -e -r <EMAIL> ~/.netrc
	```

1. Add credential Helper

	Inside your `~` home folder, create a new folder

	```
	mkdir ~/bin
	```

	and then download the credential helper:

	```
	curl -o ~/bin/git-credential-netrc https://raw.githubusercontent.com/git/git/master/contrib/credential/netrc/git-credential-netrc
	```

	give it executable permissions:

	```
	chmod 755 ~/bin/git-credential-netrc
	```

	Verify the following is in your `.zshrc`:
	```
	export PATH=$HOME/bin:$PATH
	export GPG_TTY=$(tty)
	```

1. Configure git to use credential helper

	```
	git config --global credential.helper "netrc -f ~/.netrc.gpg -v"
	```

1. Configure git to automatically sign commits

	```
	git config --global commit.gpgsign true
	```

	For details about adding the public key to your GitHub.com profile, see:
	- [GitHub Help: Generating a new GPG key](https://help.github.com/en/articles/generating-a-new-gpg-key)
	- [GitHub Help: Signing Commits](https://help.github.com/en/articles/signing-commits)

## References

- [Webdev on Windows with WSL and VS Code](https://daverupert.com/2018/04/developing-on-windows-with-wsl-and-visual-studio-code/)
- [Hyper.js + Oh My ZSH as Ubuntu on Windows (WSL) Terminal](https://medium.com/@ssharizal/hyper-js-oh-my-zsh-as-ubuntu-on-windows-wsl-terminal-8bf577cdbd97)


text:
# MMDW
The coding part is done by Weicheng Zhang.

Max-margin DeepWalk

Code of IJCAI2016: "Max-Margin DeepWalk: Discriminative Learning of Network Representation"

## Datasets
  We evaluate MMDW with three datasets, including Cora, Citeseer and Wiki.
  * data/Edgelist/*_edgelist.txt: original edgelist file of network *.
  * data/Category/*_category.txt: the category list of vertices.
  * data/Net/*_net.txt: the matrix M of obtained from transition matrix A of a network.
  * data/vector/: the folder to save learnt vectors of vertices.
  * data/svm_model/:  the folder to save trained svm classifiers.
  * data/Bias/: the folder to save calculated biasVectors.
  * data/result/: the folder to classification results.

## Run
   Run the following command to learn max-margin DeepWalk:

    java -jar mmdw.jar "dataset" "data_folder" "order_of_alphaBias"

   Here is an example:

    java -jar mmdw.jar Cora data/ -3

## Cite
If you use the code, please cite this paper:

_Cunchao Tu, Weicheng Zhang, Zhiyuan Liu, Maosong Sun. Max-Margin DeepWalk: Discriminative Learning of Network Representation. International Joint Conference on Artificial Intelligence (IJCAI 2016)._

For more related works on network representation learning, please refer to my [homepage](http://weichengzhang.co).


text:
# JAX Cloud TPU Preview

JAX now runs on Cloud TPUs! **This is a preview**, and we're still working on it. Help us out by kicking the tires, and letting us know if you run into any problems (see the [Reporting issues](#reporting-issues) section below).

## Example Cloud TPU notebooks

The following notebooks showcase how to use and what you can do with Cloud TPUs on Colab:

### [Pmap Cookbook](https://colab.research.google.com/github/google/jax/blob/master/cloud_tpu_colabs/Pmap_Cookbook.ipynb)
A guide to getting started with `pmap`, a transform for easily distributing SPMD
computations across devices.

### [Lorentz ODE Solver](https://colab.research.google.com/github/google/jax/blob/master/cloud_tpu_colabs/Lorentz_ODE_Solver.ipynb)
Contributed by Alex Alemi (alexalemi@)

Solve and plot parallel ODE solutions with `pmap`.

<img src="https://raw.githubusercontent.com/google/jax/master/cloud_tpu_colabs/images/lorentz.png" width=65%></image>

### [Wave Equation](https://colab.research.google.com/github/google/jax/blob/master/cloud_tpu_colabs/Wave_Equation.ipynb)
Contributed by Stephan Hoyer (shoyer@)

Solve the wave equation with `pmap`, and make cool movies! The spatial domain is partitioned across the 8 cores of a Cloud TPU.

![](https://raw.githubusercontent.com/google/jax/master/cloud_tpu_colabs/images/wave_movie.gif)

### [JAX Demo](https://colab.research.google.com/github/google/jax/blob/master/cloud_tpu_colabs/JAX_demo.ipynb)
An overview of JAX presented at the [Program Transformations for ML workshop at NeurIPS 2019](https://program-transformations.github.io/) and the [Compilers for ML workshop at CGO 2020](https://www.c4ml.org/). Covers basic numpy usage, `grad`, `jit`, `vmap`, and `pmap`.

## Performance notes

The [guidance on running TensorFlow on TPUs](https://cloud.google.com/tpu/docs/performance-guide) applies to JAX as well, with the exception of TensorFlow-specific details. Here we highlight a few important details that are particularly relevant to using TPUs in JAX.

### Padding

One of the most common culprits for surprisingly slow code on TPUs is inadvertent padding:
- Arrays in the Cloud TPU are tiled. This entails padding one of the dimensions to a multiple of 8, and a different dimension to a multiple of 128.
- The matrix multiplication unit performs best with pairs of large matrices that minimize the need for padding.

### bfloat16 dtype

By default\*, matrix multiplication in JAX on TPUs [uses bfloat16](https://cloud.google.com/blog/products/ai-machine-learning/bfloat16-the-secret-to-high-performance-on-cloud-tpus) with float32 accumulation. This can be controlled with the `precision` keyword argument on relevant `jax.numpy` functions (`matmul`, `dot`, `einsum`, etc). In particular:
- `precision=jax.lax.Precision.DEFAULT`: uses mixed bfloat16 precision (fastest)
- `precision=jax.lax.Precision.HIGH`: uses multiple MXU passes to achieve higher precision
- `precision=jax.lax.Precision.HIGHEST`: uses even more MXU passes to achieve full float32 precision

JAX also adds the `bfloat16` dtype, which you can use to explicitly cast arrays to bfloat16, e.g., `jax.numpy.array(x, dtype=jax.numpy.bfloat16)`.

\* We might change the default precision in the future, since it is arguably surprising. Please comment/vote on [this issue](https://github.com/google/jax/issues/2161) if it affects you!

## Running JAX on a Cloud TPU from a GCE VM

Creating a [Cloud TPU](https://cloud.google.com/tpu/docs/quickstart) involves creating the user GCE VM and the TPU node.

To create a user GCE VM, run the following command from your GCP console or your computer terminal where you have [gcloud installed](https://cloud.google.com/sdk/install).

```
export ZONE=us-central1-c
gcloud compute instances create $USER-user-vm-0001 \
   --machine-type=n1-standard-1 \
   --image-project=ml-images \
   --image-family=tf-1-14 \
   --boot-disk-size=200GB \
   --scopes=cloud-platform \
   --zone=$ZONE
```

To create a larger GCE VM, choose a different [machine type](https://cloud.google.com/compute/docs/machine-types).

Next, create the TPU node, following these [guidelines](https://cloud.google.com/tpu/docs/internal-ip-blocks) to choose a <TPU_IP_ADDRESS>.

```
export TPU_IP_ADDRESS=<TPU_IP_ADDRESS>
gcloud compute tpus create $USER-tpu-0001 \
      --zone=$ZONE \
      --network=default \
      --accelerator-type=v2-8 \
      --range=$TPU_IP_ADDRESS \
      --version=tpu_driver_nightly
```

Now that you have created both the user GCE VM and the TPU node, ssh to the GCE VM by executing the following command:

```
gcloud compute ssh $USER-user-vm-0001
```

Once you are in the VM, from your ssh terminal session, follow the example below to run a simple JAX program.

**Install jax and jaxlib wheels:**

```
pip install --user jax==0.1.54 jaxlib==0.1.37
```

**Create a program, simple_jax.py:**

**IMPORTANT**: Replace <TPU_IP_ADDRESS> below with the TPU node’s IP address. You can get the IP address from the GCP console: Compute Engine > TPUs.

```
from jax.config import config
from jax import random

# The following is required to use TPU Driver as JAX's backend.
config.FLAGS.jax_xla_backend = "tpu_driver"
config.FLAGS.jax_backend_target = "grpc://<TPU-IP-ADDRESS>:8470"

key = random.PRNGKey(0)
x = random.normal(key, (10,))
print(x)
```

**Run the program:**

```
python simple_jax.py
```

## Reporting issues

If you believe you’re experiencing a problem specific to using Cloud TPUs,
please create an issue in the [Cloud TPU issue
tracker](https://issuetracker.google.com/issues/new?component=507145). If you’re
unsure whether it’s problem with Cloud TPUs, JAX, Colab, or anything else, feel
free to create an issue in the [JAX issue
tracker](https://github.com/google/jax/issues) and we'll triage it
appropriately.

If you have any other questions or comments regarding JAX on Cloud TPUs, please
email<EMAIL_ADDRESS>We’d like to hear from you!

repository: hawkinsp/jax

gha_language: Python

gha_license_id: NOASSERTION

repo_name: hawkinsp/jax


text:
# Installing Appium on a local machine

> There are several documents and instructions on the internet to install Appium on your local machine.
This is just one of the many ;-)

To setup the local test environment the following needs to be installed:

- [appium-doctor](https://github.com/appium/appium-doctor) with `npm install appium-doctor -g`
- [Appium](https://github.com/appium/appium) with `npm install appium -g`
- [appium-desktop](https://github.com/appium/appium-desktop). This one needs to be downloaded from [here](https://github.com/appium/appium-desktop/releases) and pick the latest stable releases
- [appium-inspector](https://github.com/appium/appium-inspector). Used to be part of appium-desktop, now needs to be installed separately. Can be downloaded from [here](https://github.com/appium/appium-inspector/releases) and pick the latest stable release

## Setup a local machine

### Appium Doctor
appium-doctor is used to diagnose and fix common Node, iOS and Android configuration issues before starting Appium. You only run it once to check your local machine. See an example output below.

```bash
appium-doctor

info AppiumDoctor Appium Doctor v.1.4.3
info AppiumDoctor ### Diagnostic starting ###
info AppiumDoctor  ✔ The Node.js binary was found at: /Users/wswebcreation/.nvm/versions/node/v8.9.1/bin/node
info AppiumDoctor  ✔ Node version is 8.9.1
info AppiumDoctor  ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
info AppiumDoctor  ✔ Xcode Command Line Tools are installed.
info AppiumDoctor  ✔ DevToolsSecurity is enabled.
info AppiumDoctor  ✔ The Authorization DB is set up properly.
info AppiumDoctor  ✔ Carthage was found at: /usr/local/bin/carthage
info AppiumDoctor  ✔ HOME is set to: /Users/wswebcreation
info AppiumDoctor  ✔ ANDROID_HOME is set to: /Users/wswebcreation/Library/Android/sdk
info AppiumDoctor  ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home
info AppiumDoctor  ✔ adb exists at: /Users/wswebcreation/Library/Android/sdk/platform-tools/adb
info AppiumDoctor  ✔ android exists at: /Users/wswebcreation/Library/Android/sdk/tools/android
info AppiumDoctor  ✔ emulator exists at: /Users/wswebcreation/Library/Android/sdk/tools/emulator
info AppiumDoctor  ✔ Bin directory of $JAVA_HOME is set
info AppiumDoctor ### Diagnostic completed, no fix needed. ###
info AppiumDoctor
info AppiumDoctor Everything looks good, bye!
info AppiumDoctor
```

When appium-doctor can, it will fix the problems for you, otherwise fix them manually. If you have some ENV issues make sure you have set them like this

```bash
export ANDROID_HOME=/Users/wswebcreation/Library/Android/sdk
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools/adb:$ANDROID_HOME/build-tools:$JAVA_HOME/bin
# This one is used for the `start.android.emulator` script
export emulator=/Users/wswebcreation/Library/Android/sdk/emulator
```

### Appium
If the npm install was successful you should be able to run this command `appium -v` and see a version like below.

```bash
➜  appium -v
1.9.0
➜
```

> Always make sure to check the Appium site if there is a new version. New Appium version are released mostly when Android/iOS release new versions.
Bugfixes can also be released. Just check the [changelog](https://github.com/appium/appium/blob/master/CHANGELOG.md) for a clear overview

## Appium desktop
Appium Desktop is an open source app which gives us the ability of the Appium automation server in a UI. It is a combination of a few Appium-related tools:

- A graphical interface for the Appium Server. You can set options, start/stop the server, see logs, etc...
- An Inspector (installed separately) that you can use to look at your app's elements, get basic information about them, and perform basic interactions with them. This is useful as a way to learn about Appium or as a way to learn about your app so you can write tests for it.

This tool is mainly used to view the UI-hierarchy and locate elements to be sure that all elements can be found.

See the [readme](https://github.com/appium/appium-desktop) about how to use the Appium Desktop.

When Appium Destkop is started make sure the _Automatic Server_-tab is enabled. Use the following settings for Android (also check [here](../config/wdio.android.app.conf.ts))

```js
{
  "app": "/Users/wswebcreation/git/appium-boilerplate/apps/Android-NativeDemoApp-0.2.0.apk",
  "platformName": "Android",
  "deviceName": "Pixel XL",
  "platformVersion": "7.1.1",
  "noReset": true,
  "automationName": "UiAutomator2"
}
```

And the following settings for iOS (also check [here](../config/wdio.ios.app.conf.ts))

```js
{
  "platformName": "iOS",
  "appium:app": "/Users/wswebcreation/git/appium-boilerplate/apps/iOS-NativeDemoApp-0.2.0.zip",
  "appium:deviceName": "iPhone 6",
  "appium:platformVersion": "11.1",
  "appium:noReset": true
}
```

repository: webdriverio/appium-boilerplate

gha_language: TypeScript

repo_name: webdriverio/appium-boilerplate


text:
# Requirements
 - python >=2.6
 - pySerial
 - [ascii_graph](https://pypi.python.org/pypi/ascii_graph) (for the [emg_ascii_graph.py](scripts/emg_ascii_graph.py) node)

# Topics and Messages
There are a few topics generated by the myo-rawNode.py node. These are:

1. /myo_raw/myo_arm - ros_myo/MyoArm message telling which arm and direction of X axis is (supposedly) worn.
2. /myo_raw/myo_emg - ros_myo/EmgArray message with the EMG readings.
3. /myo_raw/myo_gest - ros_myo/MyoPose message with the pose/gesture ID.
4. /myo_raw/myo_gest_str - std_msgs/String with the pose/gesture name.
5. /myo_raw/myo_imu - a standard IMU message with quaternion pose, accelerometer and gyro axes.
6. /myo_raw/myo_ori - Vector3 containing roll, pitch, yaw in radians.
7. /myo_raw/myo_ori_deg - Vector3 containing roll, pitch, yaw in degrees.
8. /myo_raw/vibrate - UInt8 topic to publish vibration to make, accepts values 1, 2, 3. The higher the value the longer the vibration.

Note that for the pose/gestures to be published you need to do the [sync gesture](https://support.getmyo.com/hc/en-us/articles/200755509-How-to-perform-the-sync-gesture) first.

With all the node running.

```
roslaunch ros_myo bringup.launch
```

repository: intuitivecomputing/myo

repo_name: intuitivecomputing/myo


text:
## [1.1.1](https://github.com/Jaspero/ng-image-preload/compare/v1.1.0...v1.1.1) (2019-03-04)

### Bug Fixes

* **PreloadService:** background not being set properly on none img elements :bug: ([c701c01](https://github.com/Jaspero/ng-image-preload/commit/c701c01))

# [1.1.0](https://github.com/Jaspero/ng-image-preload/compare/v1.0.2...v1.1.0) (2019-02-06)

### Features

* **PreloadDirective:** allow passing an empty src value (useful when you want to load the image conditionally) ([e695367](https://github.com/Jaspero/ng-image-preload/commit/e695367))

## [1.0.2](https://github.com/Jaspero/ng-image-preload/compare/v1.0.1...v1.0.2) (2019-01-05)

### Bug Fixes

* package not scoped ([c235b41](https://github.com/Jaspero/ng-image-preload/commit/c235b41))

## [1.0.1](https://github.com/Jaspero/ng-image-preload/compare/v1.0.0...v1.0.1) (2019-01-05)

### Bug Fixes

* package not scoped ([06f029a](https://github.com/Jaspero/ng-image-preload/commit/06f029a))

# 1.0.0 (2019-01-05)

### Bug Fixes

* Elements are now initialized as an empty array, options get assigned properly :bug: ([3184013](https://github.com/Jaspero/ng-image-preload/commit/3184013))
* **README:** indent :hammer: ([7f71b19](https://github.com/Jaspero/ng-image-preload/commit/7f71b19))
* **README:** typo :bug: ([ca7b404](https://github.com/Jaspero/ng-image-preload/commit/ca7b404))
* **README:** typo :bug: ([2e8434a](https://github.com/Jaspero/ng-image-preload/commit/2e8434a))
* **tslint:** missing declaration :bug: ([fc6cbde](https://github.com/Jaspero/ng-image-preload/commit/fc6cbde))

### Features

* Added examples; updated readme; ([09bcb0c](https://github.com/Jaspero/ng-image-preload/commit/09bcb0c))
* Initial setup :tada: ([b4fe8f4](https://github.com/Jaspero/ng-image-preload/commit/b4fe8f4))
* Readme and package config :zap: ([0afc9de](https://github.com/Jaspero/ng-image-preload/commit/0afc9de))
* Refactored structure, making use of [@angular](https://github.com/angular)/cli ([7fbb810](https://github.com/Jaspero/ng-image-preload/commit/7fbb810))
* Simplified implementation; added interfaces/types; ([5db29f2](https://github.com/Jaspero/ng-image-preload/commit/5db29f2))

repository: Jaspero/ng-image-preload

repo_name: Jaspero/ng-image-preload


text:
---
title: Desiderata for Causal Representation Learning
categories: blog
layout: post
---

In this post I'll cover some ideas that have been mentioned in [this article](https://arxiv.org/pdf/2109.03795.pdf) which looks at representation learning from a causal perspective.


text:
# PN5_60894

<PageHeader />

## Description

**listf -xml** fails on Linux

### Previous Release Behavior

The **listf -xml** command did not produce complete xml output.

This was primarily due to the jBASE **stat** command conflicting with the Linux one.

### Current Release Behavior

**listf -xml** produces correct xml output.

Back to [5.7.4 Release Notes](./../jbase-5.7.4-release-notes/README.md)

<PageFooter />

repository: josepheshaw/docs

repo_name: josepheshaw/docs


text:
description: List of gating methods in Neataptic
authors: Thomas Wagenaar
keywords: gating, recurrent, LSTM, neuron, activation

Gating is quite the interesting: it makes the weights in networks more dynamic,
by adapting them to their gating node. Read more about it [here](https://en.wikipedia.org/wiki/Synaptic_gating).
For specific implementation of gating, check out the [Node](../architecture/node.md),
[Group](../architecture/group.md) and [Network](../architecture/network.md) wikis!

There are 3 gating methods:

* **methods.gating.OUTPUT** every node in the gating group will gate (at least) 1 node in the emitting group and all its connections to the other, receiving group
* **methods.gating.INPUT** every node in the gating group will gate (at least) 1 node in the receiving group and all its connections from the other, emitting group
* **methods.gating.SELF** every node in the gating group will gate (at least) 1 self connection in the emitting/receiving group

repository: childish-zamboni/bleepr

gha_language: JavaScript

repo_name: childish-zamboni/bleepr


text:
# Masterman

**Unstable version**

Masterman is static data loader for Ruby.
It loads data from direct or file, and defines accessor to read attributes.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'masterman'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install masterman

## Usage

```
class Prefecture
  include Masterman

  masterman do
    attr_reader :id, :name
    mount path: '../prefecture.yml'
    has_many :shipping_costs
  end
end

class ShippingCost
  include Masterman

  masterman do
    attr_reader :id, :price, prefecture_id
    mount path: '../shipping_cost.yml'
    belongs_to :prefecture
  end
end

ShippingCost.first.prefecture.is_a?(Prefecture)
ShippingCost.first.attributes # => { 'id' => ..., 'price' => ..., 'prefecture_id' => ... }
```

### Directly mount single data to class

```
class Administrator
  include Masterman

  masterman do
    # Can not have association
    cattr_reader :email, :name
    class_mount path: '../prefecture.yml'
  end
end

Prefecture.email.present? # => true
```

### Select filetype of static data

```
class Item
  include Masterman

  masterman do
    # You can use either loader
    # mount direct: [{ id: 1 }]
    # mount path: 'item.yml', loader: :yml
    # mount path: 'item.csv', loader: :csv
    # mount path: 'item.json', loader: :json
  end
end
```

### ActiveRecord-like associations

```
class Item
  include Masterman

  masterman do
    mount direct: [{ id: 1 }]
    belongs_to :user
    has_one :main_attachment
    has_many :variations
    has_many :attachments, through: :variations

    # Filter records by scope which is evaluated by using `#instance_exec`.
    has_many :odd_variations, -> { id % 2 == 1 }, source: :variations
  end
end
```

### Enable cache

When masterman loader called `.find` or `.all`, loader is not cached.
If you want to cache static data, call `.mount` with `cache: true`

```
class Item
  include Masterman

  masterman do
    mount path: 'item.yml', cache: true
  end
end
```

## TODO

- Support `has_and_belongs_to` association
- Should I support lazy loading?
- Support cache records.
- Validate options for association
- Try to install masterman to [pixivFACTORY](factory.pixiv.net)

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

repository: alpaca-tc/masterman

repo_name: alpaca-tc/masterman


text:
---
title: Events
page_title: Color Palette - Events
description: Events in the Color Palette for Blazor.
slug: colorpalette-events
tags: telerik,blazor,Color,Palette,events
published: true
position: 50
---

# Events

This article explains the events available in the Telerik Color Palette for Blazor:

* [OnChange](#onchange)
* [ValueChanged](#valuechanged)
* [OnBlur](#onblur)

## OnChange

The `OnChange` event represents a user action - confirmation of the current value. It fires when the user clicks, taps or presses `Enter` to select a color, or when the component loses focus. It does not prevent you from using two-way binding for the `Value`.

>caption Handle OnChange and use two-way binding for the Value

````CSHTML
@MyColor
<br />

<TelerikColorPalette @bind-Value="@MyColor" OnChange="@OnChangeHandler">
</TelerikColorPalette>

@code {
    string MyColor { get; set; }

    async Task OnChangeHandler(object color)
    {
        string selectedColor = (string)color;
        Console.WriteLine($"two-way binding: {MyColor}, event argument: {selectedColor}");
    }
}
````

@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)

>tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.

## ValueChanged

The `ValueChanged` event fires upon every change (selection of color) in the component. Its main purpose is to provide two-way biding of the `Value`.

>caption Handle ValueChanged

````CSHTML
@MyColor
<br />

<TelerikColorPalette Value="@MyColor" ValueChanged="@ValueChangedHandler">
</TelerikColorPalette>

@code {
    string MyColor { get; set; }

    async Task ValueChangedHandler(string color)
    {
        // make sure to update the view-model. If you don't, you will effectively cancel the event
        MyColor = color;

        Console.WriteLine($"The user selected the color {MyColor}");
    }
}
````

@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)

## OnBlur

The `OnBlur` event fires when the component loses focus.

>caption Handle the OnBlur event

````CSHTML
@* You do not have to use OnChange to react to loss of focus *@

@MyColor
<br />

<TelerikColorPalette @bind-Value="@MyColor" OnBlur="@OnBlurHandler">
</TelerikColorPalette>

@code {
    string MyColor { get; set; }

    async Task OnBlurHandler()
    {
        Console.WriteLine($"Lost focus. The color is {MyColor}");
    }
}
````

## See Also

* [ValueChanged and Validation]({%slug value-changed-validation-model%})
* [Fire OnChange Only Once]({%slug ddl-kb-onchange-fires-twice%})

repository: telerik/blazor-docs

repo_name: telerik/blazor-docs


text:
---
title: Fitted Mask with Pocket
description: Mask with pocket to hold an optional filter. Without a filter, this
  mask offers light protection as an isolation mask, but is not ASTM-rated.
video: Lyg_Nb27jp8
pdf: /images/fitted-mask.pdf
skill_level: Intermediate
faq:
  - question: I just printed the pattern and find that the 2" scale measures 1 ⅞"
      for me. Is that close enough or do I need to enlarge the pieces slightly?
    answer: It is also helpful if when you print you click “Actual Size” instead of
      “scale to fit” But if that doesn’t work you can change the scale
      percentage in your printer options when you go to print.
---

This mask is made of two layers of fabric with a pocket between to hold an optional filter. Without a filter, this mask offers light protection as an isolation mask, but is not ASTM-rated.

*Note: We are not making filters.*

## Material Info

Use the same fabric for outer and lining if you want, or use different ones to help you remember which side is clean and
which is dirty.

You can choose any tightly woven cotton fabric you like. Check the weave by holding the fabric up to the light—you shouldn’t
be able to see through it.

Pre-shrink all fabrics by washing before sewing. Don’t use stretchy, sequined, or velvet material.

## What you will need

* 9" × 15" fabric outer layer
* 9" × 15" fabric lining layer
* 3" piece of soft wire (e.g., decorative wire, picture wire, pipe cleaners)
* For straps: 30" of elastic, or 40" for fabric ties.

Please Note:

* 3 regular or large-size masks can be made from ¼ yard (9") of 45" wide fabric).
* Elastic is threaded to fit around the head.
* Seam allowances are ¼" unless otherwise noted.

## How to make a mask

### Preparing the outer mask & lining

![](/images/fitted-mask-1.png)

1. Fold outer fabric and cut two of pattern piece A (Outer Mask). Mark large dots from pattern onto fabric.
2. Fold lining fabric and cut two of pattern piece B (Lining).

### Center seam

![](/images/fitted-mask-2.png)

3. Sew center curves of outer layers, right sides together. Sew center curves of lining layers, right sides together.
4. Clip the curved seam at about ½" intervals but not down to the seam.
5. Flip around to the right side, open flat. Fold seam allowance over to one side and top stitch down (for both lining and outer layer).

### Interior details

![](/images/fitted-mask-3.png)

6. Fold straight side edges of lining fabric in (wrong sides together) about ½", and sew fold down with straight stitch.
7. Lay inner layer over outer layer, right sides touching. Sew the top edge and the bottom edge.
8. Turn right side out. Top stitch the top and bottom seams, ⅛" from edge. This will assure both layers stay in place during laundering.

### Straps

![](/images/fitted-mask-4.png)

9. Turn over. On outer layer side edges, fold top, bottom, and side edges in, using the dotted lines on pattern and the transferred dots as guides. Pin. Ironing helps keep this in place. Stitch along all the 3 folds on each side, ⅛" from fold.
10. Make the sleeves for the elastic: With wrong side up, fold stitched ends of outer layer up to the pencil line (dots). Stitch down.
11. Feed elastic through the sleeves to create an upper and lower strap. Feed each end of the elastic through the sleeves in a
U shape. A safety pin can help feed it through. Tie ends of elastic in a knot and slide knot into the channel on the side of the mask.

### Nose wire

![](/images/fitted-mask-5.png)

12. Make a channel to hold the nose wire by stitching a line ¼" from the top stitch line, echoing the curve (2" on each side of Center Front Seam).
13. Slide a 3"ish piece of wire into the slot created (loop the ends first with pliers if they are sharp).
14. Sew the ends of the channel closed.

----

*Pattern and concept by artist Jen Murphy and medical professional Sabra Stein. Adapted by Gwynedh van Allan and Alyssum Quaglia.*

gha_language: Nunjucks