text:
[![](https://img.shields.io/docker/pulls/alexanderkrause/rpi-nginx-proxy.svg)](https://hub.docker.com/r/alexanderkrause/rpi-nginx-proxy "Click to view the image on Docker Hub")

This is a [**fork**](https://github.com/Alexander-Krause/rpi-docker-nginx-proxy), that enables usage on a armhf architecture (tested on RPI 3). Have a look at Jason Wilder's [original](https://github.com/jwilder/nginx-proxy) repository and README. The following part does not include all available options of the original project.

### Why do you want to use this?
Reasons and examples for using a reverse proxy are discussed [by Jason Wilder](https://stackoverflow.com/a/366212/3250397) or [here](https://stackoverflow.com/a/366212/3250397).
With a [companion container](https://github.com/Alexander-Krause/rpi-docker-letsencrypt-nginx-proxy-companion) for creating/renewing *Let's Encrypt certificates* automatically you can use it with a Raspberry Pi and DynDNS Provider to host and expose your dockerized (and now TLS-secured) applications. Examples:

* [Nextcloud](https://github.com/nextcloud/docker) with [Passman](https://github.com/nextcloud/passman) extension and [MySQL](https://github.com/hypriot/rpi-mysql) (*tested*)
* [Nginx](https://github.com/armhf-docker-library/nginx) hosting your web sites (*tested*)
* Own Mailserver, e.g. [tomav/docker-mailserver](https://github.com/tomav/docker-mailserver), [hardware/mailserver](https://github.com/hardware/mailserver) or [Poste.io](https://poste.io/) (*not tested*)

### Usage
Built image is hosted on [Dockerhub](https://hub.docker.com/r/alexanderkrause/rpi-nginx-proxy). You can use

    $ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro alexanderkrause/rpi-nginx-proxy:alpine`

to start a container, **but** SSL support (see below) is recommended.

### Self-Build

1. Clone this repository `$ git clone https://github.com/Alexander-Krause/rpi-nginx-proxy.git`
2. `$ cd rpi-nginx-proxy`
3. `$ docker build -t alexanderkrause/rpi-nginx-proxy:latest .`
4. `$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro alexanderkrause/rpi-nginx-proxy`

Then start any containers you want proxied with an env var `VIRTUAL_HOST=subdomain.youdomain.com`

    $ docker run -e VIRTUAL_HOST=foo.bar.com  ...

### SSL Support using letsencrypt (recommend)

[rpi-docker-letsencrypt-nginx-proxy-companion](https://github.com/Alexander-Krause/rpi-docker-letsencrypt-nginx-proxy-companion) is a lightweight companion container for the nginx-proxy. It allows the creation/renewal of Let's Encrypt certificates automatically.

### SSL Support

SSL is supported using single host, wildcard and SNI certificates using naming conventions for
certificates or optionally specifying a cert name (for SNI) as an environment variable.

To enable SSL:

    $ docker run -d -p 80:80 -p 443:443 -v /path/to/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro alexanderkrause/rpi-nginx-proxy:alpine

The contents of `/path/to/certs` should contain the certificates and private keys for any virtual
hosts in use.  The certificate and keys should be named after the virtual host with a `.crt` and
`.key` extension.  For example, a container with `VIRTUAL_HOST=foo.bar.com` should have a
`foo.bar.com.crt` and `foo.bar.com.key` file in the certs directory.

### DynDNS

You can use for example https://www.duckdns.org to expose your Nextcloud container or something else. See [here](https://github.com/Alexander-Krause/rpi-docker-letsencrypt-nginx-proxy-companion/blob/master/README.md#dyndns) for more details.

repository: rsmithsa/rpi-docker-nginx-proxy

repo_name: rsmithsa/rpi-docker-nginx-proxy


text:
**VisualStudio Code server** images based on https://github.com/cdr/code-server

* Hosted on [GitHub Container Registry](https://github.com/orgs/MaastrichtU-IDS/packages/container/package/code-server) ([ghcr.io](https://ghcr.io)) to avoid DockerHub pull limitations, and easily deploy on clusters (such as Kubernetes).
* Additionally installed on the CPU image: Python3, NodeJS (npm, yarn), Java JDK 11, PHP, Fortran

> Alternative: [jefferyb code-server image for OpenShift](https://github.com/jefferyb/code-server-openshift)

## Automatically updated

[![Publish Docker image](https://github.com/MaastrichtU-IDS/code-server/workflows/Publish%20Docker%20image/badge.svg)](https://github.com/MaastrichtU-IDS/code-server/actions) [![Publish GPU Docker image](https://github.com/MaastrichtU-IDS/code-server/actions/workflows/publish-docker-gpu.yml/badge.svg)](https://github.com/MaastrichtU-IDS/code-server/actions/workflows/publish-docker-gpu.yml)

The image on [ghcr.io](https://ghcr.io) is automatically updated every week (Monday at 3:00 GMT+1) by a GitHub Actions workflow to match the `latest` tag of [codercom/code-server](https://hub.docker.com/r/codercom/code-server)

This image extends the [`Dockerfile`](https://github.com/cdr/code-server/blob/main/ci/release-image/Dockerfile) defined at https://github.com/cdr/code-server

## Code server on CPU

### Run

```bash
docker run --rm -it -p 8080:8080 -e PASSWORD=password -v $(pwd):/home/coder/project ghcr.io/maastrichtu-ids/code-server:latest
```

In the container:

* User, with `sudo` privileges: `coder`
* Workspace path: `/home/coder`

You can also provide the URL of a git repository to be cloned at start, if a `requirements.txt`, `yarn.lock` or `package-lock.json` are present, they will be automatically installed

```bash
docker run --rm -it -p 8080:8080 -e PASSWORD=password -e GIT_URL=https://github.com/MaastrichtU-IDS/play-fair ghcr.io/maastrichtu-ids/code-server:latest
```

### Build

Feel free to edit the `Dockerfile` to install additional packages in the image.

```bash
docker build -t ghcr.io/maastrichtu-ids/code-server:latest .
```

### Push

```bash
docker push ghcr.io/maastrichtu-ids/code-server:latest
```

## Code server on Nvidia GPU

Images hosted on the GitHub Container Registry: https://github.com/orgs/MaastrichtU-IDS/packages/container/package/code-server-gpu

Based on Docker images provided by Nvidia:

* Tensorflow: https://ngc.nvidia.com/catalog/containers/nvidia:tensorflow
* PyTorch: https://ngc.nvidia.com/catalog/containers/nvidia:pytorch

The best way to update the images is to update the version of the environment variables `TENSORFLOW_IMAGE` and `PYTORCH_IMAGE` in the [`publish-docker-gpu.yml` workflow](https://github.com/MaastrichtU-IDS/code-server/blob/main/.github/workflows/publish-docker-gpu.yml), and push the changes to the `main` branch, the new images version will be built and published by GitHub Actions

You can also build the images locally.

Build Tensorflow:

```bash
docker build --build-arg NVIDIA_IMAGE=nvcr.io/nvidia/tensorflow:21.05-tf2-py3 -t ghcr.io/maastrichtu-ids/code-server-gpu:tensorflow-21.05-tf2-py3 -f Dockerfile.gpu .
```

Build PyTorch:

```bash
docker build --build-arg NVIDIA_IMAGE=nvcr.io/nvidia/pytorch:21.05-py3 -t ghcr.io/maastrichtu-ids/code-server-gpu:pytorch-21.05-py3 -f Dockerfile.gpu .
```

Test to run it locally:

```bash
docker run -it --rm -p 8081:8081 -e PASSWORD=password ghcr.io/maastrichtu-ids/code-server-gpu:tensorflow-21.05-tf2-py3
```

Push:

```bash
docker push ghcr.io/maastrichtu-ids/code-server-gpu:tensorflow-21.05-tf2-py3
```

license: MIT

repository: MaastrichtU-IDS/code-server

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: MaastrichtU-IDS/code-server


text:
---
layout: article
title: "Introduction to Machine Learning"
intro: |
    This is an introductory course on various ML techniques. You learn about the distinction of supervised and unsupervised learning as well as some key algorithms in each of these areas. This course has become a de-facto standard for people wanting to break into ML. It is free of charge which might attribute to its immense popularity. The exercises in this course are all done in Matlab. A lot of universities have student licenses to give away, so you might ask your tech department for one if you’re currently enrolled in a university. If not you can also use Octave (Matlab’s open-source twin).
permalink: /ml/intro
---

branch_name: refs/heads/master


text:
# Bebras Platform

This repository contains everythin you need to run the *Bebras* Task Platform, historically developped for (and run at) [French Beaver Contest](http://castor-informatique.fr/).

## Installation

Copy `config_local_template.php` into `config_local.php`, and set the parameters for urls and database.

Visit `dbv/index.php`.

Get composer dependencies:

    composer install

Run `php commonFramework/modelsManager/triggers.php`.

Get Bower dependencies: run `bower install` in both `contestInterface` and `teacherInterface`.

If you want to test the platform, import `sampleDatabase/database_content.sql`.

For translation and country-specific features, please refer to the [documentation](teacherInterface/i18n/README.md).

For installation on [AWS](https://aws.amazon.com/), see [README.AWS.md](README.AWS.md).

## Initial configuration

*Create an admin user:* go to /teacherInterface/, register
through the link "Register!". For the first user, you need to
validate it manually through the database. A record should have been
created in the "user" table, and you need to set the fields
"validated" and "isAdmin" to 1. You can then log in on the
`/teacherInterface/index.php` page.

*Generating contests:* contests need to be "generated", which means compiling all of the
questions into a single html file, a css file, a js file and a php
file. You do that as an admin in the "Contest" tab by selecting a
contest in the first grid, and clicking on "Regenerate selected contest".
Make sure php has read/write access to the contests
folder, where it will create a sub-folder for each contest that you
generate. The interface doesn't say anything if there is an error, so
you have to check that the folder has been created.

Once contests have been generated, you can try them as a contestant :
go to contestInterface/index_en.html in the root folder. It should look exactly the same
as [http://concours.castor-informatique.fr](http://concours.castor-informatique.fr), and you can click on any
contest that has been generated.

Note that if it were a production server, you would want to put an
.htaccess file or equivalent in the questions folder, otherwise people
will be able to access questions before the contest. You will need to
input the corresponding login/password if you want to preview
questions from the admin interface.

Teachers use a reduced version of the admin interface, so you might
want to create a different user, that is not an admin to see how it
looks. For that, register a new user through the interface, and set
"validated" to 1 from the interface of the admin user. Teachers can
create groups, and get a password that students input to participate
in the corresponding contest. (This is explained in detail in the
"Explanations" tab). When a contestant participates through a group,
there are two extra steps compared to the public contest : she is
asked for the number of students doing the contest as a team (1 or 2),
then each student is prompted for her firstname, lastname and gender.
Other than that, everything works the same way as public contests.

# TODO

- prepare gulp files for contestInterface and teacherInterface to compile all needed dependencies into one big uglified js (see [this example](https://github.com/France-ioi/fioi-editor/blob/master/gulpfile.js)) and document it into the installation
- tests!
- make task directory configurable (now it's certainly hardcoded as beaver_tasks)
- tracking/ has unmet external dependencies (should probably link to external CDNs)
- use something else than jqGrid, which is buggy as hell in all recent versions

repository: BebrasTeam/BebrasContestServer

repo_name: BebrasTeam/BebrasContestServer


text:
# dstpop
 Stata program for importing the Danish population by year, area, sex, age, and marital status, using Statistics Denmark's API.

## Introduction
Statistics Denmark (DST or "Danmarks Statistic") offer a free and open API for downloading public data, including the Danish population since 1971. The population is available in total, by area, sex, age, or marital status, or by a combination of those. Due to different data breaches, population data is stored in several registries (BEF1, BEF1A, BEF1A07, and FOLK1A) with slightly different data structures.

This makes it rather time-consuming to get Danish population numbers over a long time period. Also, due to the Structural Reform ("Kommunalreformen") in 2007, the 298 old municipalities were combined into 98 new municipalities, making the process even more cumbersome.

The purpose of this package is to enable easy download of the Danish population 1971-2020 with options for downloading population by area, sex, age, and marital status. The included **dkconvert** package also provide the option of converting old pre-2007 municipalities into new municipalities or regions.

## Installation
```stata
net install github, from("https://haghish.github.io/github/")
github install andreasebbehoj/dstpop
```

## Syntax
`dstpop, clear year(numlist) [area(c_kom|c_reg|total)] [sex] [age] [maritalstatus] [noconvert] [other options]`

For detailed documentation and examples, install **dstpop** in Stata and type `help dstpop`.

## Dependencies
**dstpop**  requires the **dkconvert** and **labutil** packages. Both should be installed automatically with but can otherwise be manually installed in Stata:

```stata
ssc install labutil
github install andreasebbehoj/dkconvert
```

## Update
```stata
github uninstall dstpop
github uninstall dkconvert
github install andreasebbehoj/dstpop
```

repository: andreasebbehoj/dstpop

repo_name: andreasebbehoj/dstpop


text:
# InterpolatedCamera3D add-on

This addons is a backport of [InterpolatedCamera3D](https://github.com/godot-extended-libraries/godot-interpolated-camera3d)
for Godot 3.x, for easier porting project to godot 4.0 as this addon can simply be swapped to its 4.0 version
due it being fully compatible API-wise. Use this instead of deprecated built-in InterpolatedCamera node.


text:
# Sending Email using ASP.NET Core
A simple example of a sending email project using ASP.NET Core.

Configure this file using the data in the table below (or other server), Gmail and Hotmail worked with me:

| Server Name  | SMTP Address | Port  | SSL |
| ------------- | ------------- | ------------- | ------------- |
| Gmail | smtp.gmail.com | 587 | Yes |
| Hotmail | smtp.live.com | 587 | Yes |

HOST
```
https://localhost:44340/mail/send
```

REQUEST
```
{
    "Content": {
        "Emails"<EMAIL_ADDRESS>        "Subject": "Subject",
        "Message": "Message",
        "Attachments": null
    },
    "Sender": {
        "FromName": "Display Name",
        "FromAddress"<EMAIL_ADDRESS>        "ToEmail": null,
        "CcEmail": ["bekirhangultoplayan<EMAIL_ADDRESS>        "BccEmail": null,
        "ServerAddress": "mail.bekirhangultoplayan.com..tr",
        "ServerPort": 587,
        "ServerUseSsl": true,
        "Username"<EMAIL_ADDRESS>        "Password": "password"
    }
}
```

License
-------

This example application is [MIT Licensed](https://github.com/bekirhangultoplayan/Bekirhan.Microservice/master/LICENSE).

About the author
----------------

Hello everyone, my name is Bekirhan Gultoplayan. I'm a .NET developer from Turkey. I hope you will enjoy this simple example application as much as I enjoy developing it. If you have any problems, you can post a [GitHub issue](https://github.com/bekirhangultoplayan/Bekirhan.Microservice/issues). You can reach me out at<EMAIL_ADDRESS>


text:
# Petshop
This document describes the containerization of a typical traditional application: Petshop 4.0 is an ASP.NET 2.0 web application with an SQL Server database.

# tl:dr; How do I run this?
For instructions on how to run this containerized petshop, check out [this page](./running.md)

## History
Microsoft Petshop 4.0 was released over 10 years ago as a sample application to demonstrate specific challenges from that time, like upgrading from .NET Framework 1.1 to 2.0. Since it is quite old, it is hard to find information about it. This post contains some more details  https://blog.codinghorror.com/net-pet-shop-4/ and the msi was available for download here at time of writing http://download.microsoft.com/download/8/0/1/801ff297-aea6-46b9-8e11-810df5df1032/Microsoft%20.NET%20Pet%20Shop%204.0.msi. For compleness a copy of the msi is also available in this repo.

## TODO

repository: pdebruin/petshop

repo_name: pdebruin/petshop


text:
# Problem I - Pachinko Probability

### Problem statement

https://open.kattis.com/contests/q7qhgd/problems/pachinkoprobability

### Solution

#### Dynamic programming approach

- States: the nodes
- Transitions: the pointers to the next nodes
For every node we sum the number of paths to reach it from its parents, and summing over both good gates and all gates this way.

#### DFS approach

The idea is similar to the DP approach presented above, but now we start our DAG traversal from nodes with indegree = 0 instead.

Let the total number of paths to all leaf nodes in a DAG starting from a node u be `P(u)`. One observation is that if the graph has only 1 node, i.e u is both the root and leaf, then `P(u) = 1`. We can show that for every u, `P(u) = sum of P(v)` where v is a child of node u. Our answer is the sum of all `P(u)` where `indegree(u) = 0`

### Note

A concern that the keen-eyed observer might see is that the answer can explode outside the range of a 64-bit integer with a cleverly made graph. This does not occur in the test cases, but one shouldbe aware of weird edge cases when solving the problem.

### Complexity

`O(n+m)`


text:
# Prerequisites
1. docker daemon
2. `curl`
3. A (sub-)domain which is attached to the docker host
4. The ports 80 and 443 have to be exposed

# Installation

1. `$ git clone https://github.com/bastiandg/docker-nextcloud && cd docker-nextcloud`
2. edit install.sh and set `DOMAIN_NAME`, `EMAIL` and `DATADIR` (`DATADIR` has to be non existent for the first time setup)
3. `bash install.sh`

# Caveats

1. The first user to access the site automatically gets admin access. The developers are aware of this, but say it's the intended behavior. See: https://github.com/nextcloud/server/issues/8653
2. Data base passwords are provided via environment Variables to the containers. So they can be read by all users with access to the docker daemon by doing `docker inspect db`.

# Update

```bash
cd $DATADIR && . config.env && docker-compose down && docker-compose pull && docker-compose up -d
```

# Inspiration

This is heavily inspired by https://github.com/mihaics/docker-nextcloud.git

repository: bastiandg/docker-nextcloud

repo_name: bastiandg/docker-nextcloud


text:
# Baseboard #

Baseboard is a better place to start your stylesheets.

## Details ##

Baseboard is an alternative to *Reset* and *Normalize*. It uses a semantic base to make future styling and inheritance easy to debug; no more mile-long tag-chaining.

## Usage ##

Grab `baseboard.css` from the src directory and copy it into your resources.

Alternatively, you can install it from:

`npm install baseboard.css`

## License ##

Baseboard is released under the [MIT License](https://opensource.org/licenses/MIT) and is intended for students, artists, and small start-ups.

repository: taylor-vann/baseboard

repo_name: taylor-vann/baseboard


text:
# minimal-flask-praw-oauth
This repository contains three minimal(ish) examples for using Flask in combination with PRAW to perform an Oauth signin on Reddit. Before we dive in, it is *very important* that it's specified that I am by no means an expert with Flask, PRAW,  OAuth, or SQLAlchemy; the files offered present a way that I've found works through a tedious process trial and error - they may not be a **good** way to do any of this, but it's a way I've found that works. With that out of the way, let's dive in to what I've got to offer and how to run them:

### Requirements and First Steps
* Make sure you have python 3.6 or greater, and pip. You need at least python 3.6 because all the string formatting is done with f-Strings; if you're stuck on an older version of python3 you *should* be able to easily convert the strings to the `str.format()` format. Information on python string formatting may be found [here](https://realpython.com/python-f-strings/).
* Install requirements in requirements.txt. This can be done with `pip install -r requirements.txt`. You may wish to do this in a virtual environment.
* create an app on Reddit using [this link](https://www.reddit.com/prefs/apps).
	* The name can be whatever you'd like.
	* "web app" should be selected from the radio buttons
	* description can be left blank, or include whatever you want
	* about url should be set to an about page on your site, or the repo you're pulling this from
	* redirect uri must be set to the *exact* URI your authorization callback link will be located at. For this tutorial, we'll assume you're running flask on your local machine, on port 5000, and that your authorization path is `authorize_callback`. As such, your redirect uri should be `http:<IP_ADDRESS>/authorize_callback`
* Once you've created your application, make note of the client id (the string of text immediately below "web app"; your client secret, which can be found listed as "secret" if you hit the edit button on your app, and your redirect uri, should you be using different values than the tutorial.

### example.py
This file is *loosely* based on the oauth example in the [example webserver section of the praw v3.6.2 documentation](https://praw.readthedocs.io/en/v3.6.2/pages/oauth.html#an-example-webserver).
##### To Run
Fill in your Client ID on [line 10](https://github.com/adhesivecheese/minimal-flask-praw-oauth/blob/main/example.py#L10), and your Client Secret on [line 11](https://github.com/adhesivecheese/minimal-flask-praw-oauth/blob/main/example.py#L11). If using a different redirect uri, fill those values in on lines 13-15. Once this is done, you may run the script in several ways
* `python3 example.py`
* If "python" is set to python 3 on your system, you may instead run `python example.py`
* You may also set the script as executable (`chmod a+x example.py`) and run it as `./example.py`
##### To use
After it's running, navigate to http:<IP_ADDRESS>:5000 in your browser to begin the authorization process.

##### Important Notes
* I commit a couple rather grave sins for the sake of simplicity and demonstration in setting up the token manager and storing the saved state. These examples are addressed in the more fleshed out project version of the example. using FileTokenManager instead of BaseTokenManager would make more sense in this example; however, there's documentation in PRAW [for using FileTokenManager](https://praw.readthedocs.io/en/latest/tutorials/refresh_token.html#using-and-updating-refresh-tokens), and I couldn't find any good examples of BaseTokenManager, so a bad, hacky example usage is inserted here.
* This is the only version of the examples that also offers a temporary authorization option.

### golfing_example.py
While well-documented code can certainly help explain a subject, oftentimes I find myself trying to strip a thing down to the bare minimum to see what actually needs to be done to do a thing, and what's extra. This is that example. Comments have been stripped, the state is statically defined so there's no defense against xsrf attacks, variables that are just used once are stripped and tossed directly inside the calls they're needed for. This is a TERRIBLE way to authorize with OAuth, but it *will* authorize you.

This example is based on the concept of [Code Golf](https://en.wikipedia.org/wiki/Code_golf). While not the shortest possible version of a script that lets you authenticate with Reddit, it is a stripped down version of example.py aiming to present the minimum amount of code you need to perform an authorization while still being legible.
##### To Run
* Fill in the variables on lines 5-7. Make sure your REDIRECT_URI appears exactly as it does in your app
* if you changed the path, make sure the app.route is changed to match on [line 23](https://github.com/adhesivecheese/minimal-flask-praw-oauth/blob/aadfbb32e6eb3c1439b9852509be3c37d6720a7e/golfing_example.py#L23)
* Set your flask app variable to golfing_example.py while in the directory containing the file: `export FLASK_APP=golfing_example.py`
* Run the script with `flask run -p 5000`
* Navigate to http://<IP_ADDRESS>:5000 to begin the authorization process
##### Important Notes
I cannot stress this enough, **DO NOT** use this code in a production environment. It's terrible, and is only presented for educational purposes.

### project (folder)
As I mentioned earlier, I'm not an authority here, so I won't claim that this is the *right* way to do PRAW OAuth with Flask, but it seems to at least be a *viable* way to do it that doesn't have anything obviously terrible about it.

This example offers a webserver with an sqlite3 backend, allowing user signup and saved authorization for multiple users. As refresh tokens aren't saved in code in this example, it can actually be used by multiple users at once! It uses [Bulma](https://Bulma.io) for styling, but if you do webdev you should easily be able to port it to Bootstrap or whatever other CSS framework you'd like.

##### Setup
As this is a much more fleshed out example, slightly more setup is needed.
* Fill in the SECRET_KEY on [line 11 of \_\_init\_\_.py](https://github.com/adhesivecheese/minimal-flask-praw-oauth/blob/aadfbb32e6eb3c1439b9852509be3c37d6720a7e/project/__init__.py#L11). This is the key used to sign cookies; if this changes it'll invalidate your passwords.
* Set your desired scopes, as well as your Client ID, Client Secret, User Agent, and Redirect URI in `constants.py`. Available scopes will be found at the end of this Readme.
* run `python3 create_db.py` in the root directory to generate an empty database for use by the app.

##### To Run
* From the directory containing the project directory, run `export FLASK_APP=project`
* Run the script with `flask run -p 5000`
* Navigate to http://<IP_ADDRESS>:5000/signup to create an account; after account creation and login, you'll be directed to Reddit to authorize your account. Authorization will persist across signouts and script restarts.

##### Important Notes
* If you look in project/main.py, you'll see a (maybe?) proper implementation of BaseTokenManager! It's definitely a *working* version of BaseTokenManager, in any case.

### Available scopes
(fetched from https://www.reddit.com/api/v1/scopes.json on 11 June 2021)

* **account** - Update preferences and related account information. Will not have access to your email or password.
* **creddits** - Spend my reddit gold creddits on giving gold to other users.
* **edit** - Edit and delete my comments and submissions.
* **flair** - Select my subreddit flair. Change link flair on my submissions.
* **history** - Access my voting history and comments or submissions I've saved or hidden.
* **identity** - Access my reddit username and signup date.
* **livemanage** - Manage settings and contributors of live threads I contribute to.
* **modconfig** - Manage the configuration, sidebar, and CSS of subreddits I moderate.
* **modcontributors** - Add/remove users to approved user lists and ban/unban or mute/unmute users from subreddits I moderate.
* **modflair** - Manage and assign flair in subreddits I moderate.
* **modlog** - Access the moderation log in subreddits I moderate.
* **modmail** - Access and manage modmail via mod.reddit.com.
* **modothers** - Invite or remove other moderators from subreddits I moderate.
* **modposts** - Approve, remove, mark nsfw, and distinguish content in subreddits I moderate.
* **modself** - Accept invitations to moderate a subreddit. Remove myself as a moderator or contributor of subreddits I moderate or contribute to.
* **modtraffic** - Access traffic stats in subreddits I moderate.
* **modwiki** - Change editors and visibility of wiki pages in subreddits I moderate.
* **mysubreddits** - Access the list of subreddits I moderate, contribute to, and subscribe to.
* **privatemessages** - Access my inbox and send private messages to other users.
* **read** - Access posts and comments through my account.
* **report** - Report content for rules violations. Hide & show individual submissions.
* **save** - Save and unsave comments and submissions.
* **structuredstyles** - Edit structured styles for a subreddit I moderate.
* **submit** - Submit links and comments from my account.
* **subscribe** - Manage my subreddit subscriptions. Manage "friends" - users whose content I follow.
* **vote** - Submit and change my votes on comments and submissions.
* **wikiedit** - Edit wiki pages on my behalf
* **wikiread** - Read wiki pages through my account

additionally:

* **\*** - Access all scopes

repository: adhesivecheese/minimal-flask-praw-oauth

repo_name: adhesivecheese/minimal-flask-praw-oauth


text:
keyboard-builder-server

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![GitHub Issues](https://img.shields.io/github/issues/bubao/keyboard-builder-server.svg)](https://github.com/bubao/keyboard-builder-server/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/bubao/keyboard-builder-server.svg)](https://github.com/bubao/keyboard-builder-server/pulls)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)

---

 Few lines describing your project.

## 📝 Table of Contents

-   [About](#about)
-   [Getting Started](#getting_started)
-   [Deployment](#deployment)
-   [Usage](#usage)
-   [Built Using](#built_using)
-   [TODO](./docs/TODO.md)
-   [Contributing](../CONTRIBUTING.md)
-   [Authors](#authors)
-   [Acknowledgments](#acknowledgement)

## 🧐 About

Write about 1-2 paragraphs describing the purpose of your project.

## 🏁 Getting Started

### Prerequisites

#### install nvm

```sh
# use curl to install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
# or wget
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
```

and make it work

```sh
soure ~/.bashrc
# if you use zsh
soure ~/.zshrc
```

#### install nodejs and npm

```sh
nvm install node
```

#### install pm2

```sh
sudo npm install -g pm2
```

### Installing

```sh
git clone https://github.com/bubao/keyboard-builder-server.git
cd keyboard-builder-server
npm install
pm2 start index.js -n builder-server
# npm run start
```

if you want to start the server when system is booted.

```sh
pm2 save
pm2 startup
```

## 🔧 Running the tests

no tests to run.

## 🎈 Usage

## 🚀 Deployment

## ⛏ Built Using

-   [Express](https://expressjs.com/) - Server Framework
-   [NodeJs](https://nodejs.org/en/) - Server Environment
-   [body-parser](https://nodejs.org/en/) - Node.js Body Parsing Middleware

## ✍ Authors

-   [@bubao](https://github.com/bubao) - Initial work

## 🎉 Acknowledgements


text:
Draws a cone with specified radius and height starting from the specified position (x, y and z coordinates). The cone is drawn with the current color, e.g. set with ofSetColor(). The cone is drawn filled by default; change this with ofFill();

```cpp
void ofApp::draw(){

    //  Draw a red cone at the center of the canvas.
    ofSetColor(255, 0, 0);
    ofFill();
    ofDrawCone(ofGetWidth() * .5, ofGetHeight()* .5, 0, 200, 300);

    //NOTE: to better see the 3D shape you need to create a light spot...
    //check `ofLight' documentation

}

```

gha_language: Ruby


text:
Sniffy Contribution
============
You are most welcome to contribute to Sniffy!

Basic
============
- Fork the repo
- Create a new branch
- Create a pull request

Code style
============
Make sure to follow the code style of the existing code.

More information
============
Read more about best practices in [this github guide](https://guides.github.com/activities/contributing-to-open-source/)

repository: sniffy/sniffy

branch_name: refs/heads/develop

gha_language: Java

gha_license_id: MIT

repo_name: sniffy/sniffy


text:
# GitHub Branch Renamer

A tool to rename the `master` branch for an entire account at once.

## Installation

### macOS

Install with Homebrew.

```sh
brew install erbridge/tap/github-branch-renamer
```

### Everything else

You're on your own, I'm afraid. Refer to the [`Brewfile`](Brewfile) for clues
about required dependencies.

## Usage

```
$ gbr
Rename the 'master' branch for an entire account at once.

This tool will find all repositories on GitHub belonging to an account that:

  - aren't forks
  - aren't archived or disabled
  - have their default branch set to 'master'

It will then rename the master branch to 'main' by default, and set that as the
default branch on GitHub instead of 'master'.

By default, the 'master' branch will be left untouched to prevent any accidental
data loss. If you'd like to delete those branches, set the '--delete' flag.

You must choose to either do a dry run ('--dry-run') or force the changes
('--force'). You must also specify one of '--org' or '--user' (but not both) to
select the account to collect repositories from.

USAGE
  gbr [flags]

FLAGS
  -u, --user string         The username to collect repositories in
  -o, --org string          The organization to collect repositories in
  -t, --team string         The team within the organization (optional)
  -b, --new-branch string   The new name for the master branch (defaults to
                              'main')
  -d, --delete              Delete the master branch from GitHub
  -n, --dry-run             Report what will happen, without making any changes
                               on GitHub
  -f, --force               Run for real, making changes on GitHub
```

## Why?

The conversation about the origin of "master" as a term in technology has come
back around again recently. It's clear that Git's default branch name, `master`,
[originated from a master-slave metaphor](https://mail.gnome.org/archives/desktop-devel-list/2019-May/msg00066.html),
and even if it didn't, it still has that connotation for some people. We should
rename our branches to something else to reduce the harm our language causes.

Renaming branches can be a time consuming, manual process, especially if your
repositories are counted in the hundreds. It would be preferable to automate as
much of that as possible. This tool attempts to do that.

This tool is limited to existing repositories. Until Git changes its defaults,
new repositories will still be created with a `master` branch. See
[Leigh Brenecki's post](https://leigh.net.au/writing/git-init-main/) for how to
override that default behaviour.


text:
A collection of R Shiny apps that display WaDE data

Issue:
dblodgett-usgs opened this issue on Aug 14, 2017 · 3 comments
States based report unit selection map #2

I just ginned up a little test to see what we need to do to get state by state selection maps working.

Using, leaflet, this code will work.
```
library(leaflet.esri)
library(maps)
data(state)
state_center_lng <- state.center$x[which(state.name == "Washington")]
stae_center_lat <- state.center$y[which(state.name == "Washington")]
leaflet() %>%
  addTiles() %>%
  setView(lng = state_center_lng, lat = stae_center_lat, zoom = 6) %>%
  addEsriFeatureLayer(
    url='https://services.arcgis.com/dFb8rUV8WxUeyMa2/arcgis/rest/services/Washington_WRIAs/FeatureServer/0',
    useServiceSymbology = TRUE)
```
That looks like this:
<img width="630" alt="screen shot 2017-08-14 at 1 23 38 pm" src="https://user-images.githubusercontent.com/1492803/29285464-380470c2-80f4-11e7-86c0-d4f5d6da93e9.png">

If I implement the code above in shiny and capture click events like [I do here](https://github.com/WSWCWaterDataExchange/Apps/blob/master/USGSDataApp/map.R#L40) the click properties are like:
```
Browse[2]> names(clk$properties)
[1] "OBJECTID"      "WRIA_ID"       "WRIA_NR"       "WRIA_AREA_"    "WRIA_NM"       "Shape_Leng"
[7] "WADE_URL"      "Shape__Area"   "Shape__Length"
Browse[2]> clk$properties$WRIA_ID
[1] 7
Browse[2]> clk$properties$WRIA_NR
[1] 48
Browse[2]> clk$properties$WADE_URL
[1] "https://fortress.wa.gov/ecy/wade/v0.2/GetCatalog/GetCatalog?loctype=REPORTUNIT&loctxt=48&orgid=WAECY&state=1"
```

I think the pattern implemented over in the USGS App should work for WaDE state-based apps.

Probably won't need the [mapData reactive function](https://github.com/WSWCWaterDataExchange/Apps/blob/master/USGSDataApp/map.R#L2) unless you want to set up the ability to switch states.

We will need a [renderLeaflet output like this.](https://github.com/WSWCWaterDataExchange/Apps/blob/master/USGSDataApp/map.R#L17) but it won't need to do any data stuff -- just the leaflet.esri call pasted above.

Something along the lines of the [observe function here](https://github.com/WSWCWaterDataExchange/Apps/blob/master/USGSDataApp/map.R#L36) will be needed to capture the click events and pass up some new variable values.

To actually get the variables out of the observer, we'll need [to do this](https://github.com/WSWCWaterDataExchange/Apps/blob/master/USGSDataApp/server.R#L15) for each variable we need to pass out of the click observer.

I think that's the bones of it. This shouldn't be too bad. I'd be willing to take a crack at implementing this in one of the apps. Which one would be a good starting point?

# Sara commented
Thank you! Looks great, and yeah, not too bad. My preference would be to try it out on the CA data because that one is a little bit more complex than Utah/Wyoming. There are many Detailed Analysis Units (DAUs) in that one for which we need an easier sorting method, plus they have water supply estimates as well as water use (might be nice if we could include that also - just a change in the web service datatype parameter). It might be easier to tackle this for Utah because they should have water use estimates at the HUC-8 scale included in WaDE shortly, which is where you'd like to head eventually, right Dave? Ima let Carly chime in here too. Carly, given your experience with the R/shiny apps so far, which app would you think would be best for Dave to adjust first?

Carly commented
Just catching up on the leaflet/leaflet.esri updates. Looks awesome! Utah would probably be the easiest one to try out first.

*Edit: Wyoming is actually the easiest to try out - I've been playing with it this afternoon to see if I could get this leaflet to work. Utah or CA would probably more interesting to work with though (multiple data types/report years to work with).

Carly commented
Revisiting this now that Utah has multiple types of Reporting Units available for selection... the Utah App now includes this functionality to select by reporting unit type on a map.

repository: WSWCWaterDataExchange/Apps

gha_language: R

repo_name: WSWCWaterDataExchange/Apps


text:
# CSS structure

## One component per file

?> 💬 In BEM, every class selector is either the block name itself or uses the block name as a prefix, and the rules for each block live in their own dedicated file. Since file systems do not allow two files to have the same name, the OS is actually helping to prevent accidental duplication. If you follow all of the BEM naming conventions, and you ensure all block code resides in its own file, you will never have naming collisions. - [Philip Walton article on the side effects of css](https://philipwalton.com/articles/side-effects-in-css/)

  * filename matches the component name.
  * breakpoint variations also have their own file.

  ```scss
  /* ./components/search/search-form.scss */
  .search-form { /* ... */ }
    .search-form__button { /* ... */ }
    .search-form__field { /* ... */ }
    .search-form__label { /* ... */ }

    // variants
    .search-form--small { /* ... */ }
    .search-form--wide { /* ... */ }
  ```

## One media query per file
Component styles for different media queries have separate files.

```scss
.search-form {
  width: 100%;

  @media breakpoint-gt(#{$small}) { /* ✖ Bad */
    width: rem-calc(256px);
  }
}
```

  Instead keep styles for each breakpoint in a separate file, repeating only just enough in order to override rules from small screen files.

  * `./components/search/search-form` : all sizes, small up **required**
  * `./components/search/search-form--smallonly`: small only
  * `./components/search/search-form--largeup`: large up
  * `./components/search/search-form--largeup-portrait`: large up, but only portrait
  * `./components/search/search-form--print`: print styles

## Use media queries at the component root level
Component screen and print media queries are bundled together in the root of the component folder:

```bash
 components/
    search/
        screen.scss
        print.scss
```

In scss it looks like:

  ```scss
  // ./components/screen.scss
  @import './search-form/screen';
  ```

In your `./component/search-form/screen.scss` file, it looks like:

```scss
@import "./search-form";

@media #{breakpoint-lte(small)} { // less than or equal to small topend
    @import "./search-form--smallonly";
}

@media #{breakpoint-gt(small)} { // greater than small topend
    @import "./search-form--mediumup";
}
```

## Print styles separate from screen styles

Components should a component level  `print.scss` file:

```scss
// ./components/search-form/print.scss
@media print {
    @import "./search-form--print";
}
```

Then if we're using a root `print.scss`:

```scss
@import "./components/search-form/search-form--print";
```

Otherwise we'll lazyload the print style with either `System.import` or using it as an entrypoint.

## Avoid over-nesting
Use no more than 1 level of nesting. It's easy to get lost with too much nesting.

  ```scss
  /* ✖ Avoid: 3 levels of nesting */
  .image-frame {
    > .description {
      /* ... */

      > .icon {
        /* ... */
      }
    }
  }
  ```

**What's wrong?**

This creates problems later in a projects life (or for other project team members).
Maintenance is usually performed long after the mental model of the project has left your mind, or in fact it was never there.

Consider the steps to identify where such code could be found amongst the codebase:

* a search for `.image-frame > .description > .icon` results in zero matches.
* searching for `.description` results in far too many false matches.
* searching for `.icon` is now soaking up precious time and mental energy.

## Be more explicit

```scss
/* 🆗 OK: 2 levels */
.image-frame {
  .image-frame__description { /* ... */ }
  .image-frame__description-icon { /* ... */ }
}
```

```scss
/* ✔ Idea: 1 level */
.image-frame { /* ... */ }
  .image-frame__description { /* ... */ }
  .image-frame__description-icon { /* ... */ }
```

When we use BEM, then often a css rule becomes very obvious in its purpose.

Consider the following same scenarios from above:

* A search for `.image-frame`, reveals only a few files. If we are following the file naming convention set out here, one of those files should be an obvious choice.
* searching for `.image-frame__description-icon` is again even more specific.

repository: fusion-com-au/frontend-styleguide

repo_name: fusion-com-au/frontend-styleguide


text:
---
title: Merz Schwanen Hooded Zip
tags:
  - loopwheeled
  - german
  - over $200
  - high-end
  - full-zip
  - 13oz
  - 200gsm
layout: layouts/post.njk
img: merz-schwanen-01.jpg
price: 233
product_link: https://shop.merz-schwanen.com/collections/sweats/products/17694636?variant=19949925767
buy_link: https://shop.merz-schwanen.com/collections/sweats/products/17694636?variant=19949925767
brand_link: https://shop.merz-schwanen.com
---

This hooded jacket never lets you down!

Proper material, solid haptics and a useful zip make this your favorite garment for all those really good moments.

Just wear it over a T-Shirt or sweatshirt, for both training or casual - it is always right.

The useful hood, robust, but soft material and the triangular patches under the arms guarantee a natural fit and maximum comfort. The 3-count organic-cotton is soft to the touch and mild to the skin. At the same time, the durable material will impress you with its haptic feel.

#### Material:
* 100% pure bio-cotton
* 3-count, sturdy sweatshirt material - in other words: more "Futterware" (loopwheeled sweatshirt material)
* soft, comfortable haptics, at the same time durable and tactile
#### Form & Fit:
* sportive casual
* useful zip in front
* practical hood
* ca. 2cm extra length, as garment will shrink during first wash
#### Details:
* tactile, slightly irregular surface structure
* durable waistband made of ribware on hem and sleeves
* maximum comfort: triangular patch under the arms
* mild to the skin, no chemical additives
* ecofriendly: no industrial prewash
* made in Germany

    <button class="button-primary-outlined button-round">BUY ONLINE - ${{price}}</button>
    <button class="button-primary-outlined button-round">VISIT WEBSITE</button>

### Merz B Schwanen

Originally from the Swabian Alps, the loopwheel machines were moved to Berlin after the original company went bankrupt and new owners of the company reopen production in 2011. The site has a full page of history with a lot of pictures.

repository: joeldg/hoodiehunt

repo_name: joeldg/hoodiehunt


text:
# Douglas-Peucker algorithm
The Ramer–Douglas–Peucker algorithm implemented by JavaScript.

The purpose of the algorithm is, given a curve composed of line segments (which is also called a Polyline in some contexts), to find a similar curve with fewer points. The algorithm defines 'dissimilar' based on the maximum distance between the original curve and the simplified curve (i.e., the Hausdorff distance between the curves). The simplified curve consists of a subset of the points that defined the original curve.

# Install
Download the ```douglas-peucker.js``` file and add it into your projects.
# Example
https://eclipseglory.github.io/rdp/

# How to use
In your js code , import the ```douglasPeucker``` method from the library file you downloaded:
```javascript
import { douglasPeucker} from 'SOME_PATH/douglas-peucker.js';
...

    // The curve points array
    let points = [.....];

    let epsilon = 20;

    // caculate and get the new points
    let newPoints = douglasPeucker(points, epsilon);

...
```

User can use ```smoothLines``` method to change the ```points``` array to bezier points array:
```javascript
import { douglasPeucker,smoothLines} from 'SOME_PATH/douglas-peucker.js';
...

    // The curve points array
    let points = [.....];

    let epsilon = 20;

    // caculate and get the new points
    let newPoints = douglasPeucker(points, epsilon);

    // smoothing...
    let bps = smoothLines(newPoints);

...
```

## Method parameters
```javascript
function douglasPeucker(points, epsilon, start, end)
```
- ```points``` (*required*) : The curve points array. The array item is ```[x,y]``` array format, for example :
```
    points = [[0,0],[100,100]....[200,200]];
```

- ```epsilon``` (*option*) : Default value is ```10```. It means the min distance between a point project to a line segment.
- ```start``` (*option*) : The start index of the ```points``` array. If it's ```null``` , it will be assigned to ```0```.
- ```end``` (*option*) : The end index of the ```points``` array. If it's ```null``` , it will be assigned to ```points.length-1```.

repository: eclipseglory/DouglasPeucker

repo_name: eclipseglory/DouglasPeucker


text:
# [Layers](https://spacevim.org/layers) > lang#lisp

This layer is for lisp development.

## Install

To include this layer, add `SPLayer 'lang#lisp'` to your custom configuration file.

## Requirement

- Vim 8.0+ with +channel, or Neovim 0.2.0+ with ncat
- ASDF
- Quicklisp
- An Internet connection to install other dependencies from Quicklisp

## mappings

all the language special mappings is begin with `[SPC] l`, please checkout it in mapping guide.

branch_name: refs/heads/dev

gha_language: Vim script


text:
# Burger_Zilla [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Description

This project is a full stack application that allows users to input the names of burgers they'd like to order. Whenever a user submits a burger's name, your app will display the burger on the left side of the page, waiting to be devoured. Each burger in the waiting area also has a Devour it! button. When the user clicks it, the burger will move to the right side of the page, indicating the burger has been devoured. The app will store every burger in a database, whether devoured or not.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Contributions](#contributions)
- [Tests](#tests)
- [Questions](#questions)

### Installation

In order to install dependencies, user must run:

```
npm i.
```
User should install the following dependencies:

- express
- mysql
- express- handlebars

After performing all of the setup steps, user should navigate to the project root directory (burger) and run the following command to start the server:
```
node server.js
```
To verify that the server has started and the application is working locally on your computer, open Chrome and go to http://localhost:8080.

### Usage

This project uses MySQL, Node, Express, Handlebars, ORM (Object Relational Mapper). Node and MySQL are used to query and route data in the application. Express is the backend web framework used for this application, and Handlebars is a templating language that is used to generate the HTML.

### License

This project is licensed under an MIT license.

## Contributions

N/A

## Tests

To run test, run the following commands:

```
node server.js

```

## Screenshot of application
![Burger-Zilla](/./public/assets/img/screenshot1.png)
![Burger-Zilla](/./public/assets/img/screenshot2.png)

## Links:

1. https://boiling-cove-33195.herokuapp.com/
2. https://github.com/itz-essie/burger_zilla

## Questions

- If you have any questions regarding this repository, contact me either by email at<EMAIL_ADDRESS>or you can find more of my work within my github account attached below:
**[itz-essie](https://github.com/itz-essie)**.


text:
---
title: "Remove todos - mutation"
---

In this part of the tutorial, you will learn how to remove existing todos by using GraphQL Mutations.

Let's define a graphql query to do a mutation into todos.

```graphql
mutation ($id: Int) {
  delete_todos (
    where: {
      id: {
        _eq: $id
      }
    }
  ) {
    affected_rows
  }
}
```

[Try](https://learn.hasura.io/graphql/graphiql?tutorial=react-native) this mutation in GraphiQL against the application database to see what the response looks like.

Let's now integrate this graphql mutation into our react app.

gha_license_id: NOASSERTION


text:
# babel-plugin-optimize-react-import [![Travis Status](https://travis-ci.org/mochiya98/babel-plugin-optimize-react-import.svg?branch=master)](https://travis-ci.org/mochiya98/babel-plugin-optimize-react-import) [![Coverage Status](https://coveralls.io/repos/github/mochiya98/babel-plugin-optimize-react-import/badge.svg?branch=master)](https://coveralls.io/github/mochiya98/babel-plugin-optimize-react-import?branch=master) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> reduce your bundle size

```js
import Hoge, { Foo, Bar } from "react";
```

converted to :

```js
import * as Hoge from "react";
import { Foo, Bar } from "react";
```


text:
---
metaTitle: "SQL - DROP Table"
description: "Check for existence before dropping, Simple drop"
---

# DROP Table

## Check for existence before dropping

```sql
DROP TABLE IF EXISTS MyTable;

```

```sql
DROP TABLE IF EXISTS MyTable;

```

```sql
If Exists(Select * From Information_Schema.Tables
          Where Table_Schema = 'dbo'
            And Table_Name = 'MyTable')
  Drop Table dbo.MyTable

```

```sql
DROP TABLE IF EXISTS MyTable;

```

## Simple drop

```sql
Drop Table MyTable;

```

#### Remarks

DROP TABLE removes the table definition from the schema along with the rows, indexes, permissions, and triggers.

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
build-sencha-deploy-phonegapbuild
=================================

Build an app with Sencha Cmd and deploy to PhoneGap Build.

This is a build script originally written for Gitlab CI but should be fine for whatever CI server you're using.

The script does the following:

- compile the app with sencha cmd ("app build package")
- push the "build" subdirectory to PhoneGap Build using REST APIs

If you just need the first or second part you can comment out in the script the section you don't need, it should be pretty straightforward.

HOWTO
-----

- (one-time) configure the script editing it and filling in the "### Config ###' section
- chdir to your sencha app root
- execute the script

Dependancies
------------

- JSON.sh from https://github.com/dominictarr/JSON.sh
- XMLLint from http://xmlsoft.org/xmllint.html (or libxml2-utils on Debian-based distros)

License
-------

This script is licensed under MIT Expat, i.e. you can do anything including commercial purposes, just don't blame it on me if anything goes wrong! :)


text:
#This is project to match you resume with our job description from different job resources.

The project is based on Django and include following parts:

1.	Crawl website to get job descriptions
2.	A content based recommendation algorithm to match job and JD using Spark MLlib
3.	Store the result in Elastic Search
4.	Push related Jobs to users based on their resume

### Job Description database is implemented in Elasticsearch for the convenience of search. ES host is http://es-nicejob.cloudapp.net:9200/

Contact me if you want to login in ES : Hao<EMAIL_ADDRESS>

repository: hanhaohh/jobhelp

repo_name: hanhaohh/jobhelp


text:
# Backend API

## Getting started

First run docker compose in parent directory

``` sh
docker-compose up -d
```

This should start the api in reload mode.  Any changes to code will reload the
api.

To follow logs:

``` sh
docker-compose logs -f
```

## Testing

To run tests

``` sh
docker-compose exec backend pytest
```

## Debugging

To debug, place a debug point somewhere in your code:

``` python
a = 3
print('before')
breakpoint()  # add this line
print('after')
```

attach to the docker image:

``` sh
docker attach wirvsvirus_backend_1
```

now you should be in the debugger in the docker container.

repository: embiem/WirVsVirus

gha_language: CSS

repo_name: embiem/WirVsVirus


text:
---
layout: default
---

# 1994-07-15 - Re: Key length security (calculations!)

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Timothy C. May)

Message Hash: e5ca6852f50a280812128f40bd00a9291176b43c01ba82f618e8398e3d102b8c

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-07-15 07:29:01 UTC

Raw Date: Fri, 15 Jul 94 00:29:01 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Fri, 15 Jul 94 00:29:01 PDT
To<EMAIL_ADDRESS>(Timothy C. May)
Subject: Re: Key length security (calculations!)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

> > Still sounds pretty safe so far... if it really takes at least 20,000 times
> > as long to crack a 1024 bit modulus, then it would still take the 7400 C.E.
> > (Cray Equivalent) computer 24 years to crack a 1024 bit number.  BUT, the
> > biggest worry is that no one knows how good the NSA's factoring algorithms
> > are.  I read recently that the NSA is the world's largest employer of
> > mathematicians.  The relative improvement in factoring algorithms since the
>
> Not to attack Doug's point, which has validity here (that we don't
> know what factoring advances NSA may have made), but I personally
> think the combined capabilities of "public domain mathematicians" are
> now far greater than what NSA has. Shamir, Odzylko, Blum, Micali,
> Rackoff, Goldwasser, Solovay, Berlenkamp, etc., are top-flight
> researchers, publishing many papers a year on these topics. It is
> unlikely that some GS-14 mathematicians at the Fort, not able to
> publish openly, have made much more progress. I think the resurgence
> of crypto in the 70s, triggered by public key methods and fueled by
> complexity theory breakthrough, caused a "sea change" in inside
> NSA-outside NSA algorithm expertise.

I disagree with this, and I would site as a case and point the fact
that differential cryptanalytic attacks were not "discovered" until
1990 while a relatively small team of IBM cryptologists had it back
in 1974 when they made DES. NSA apparently had it before then.
This is why I would rather find a fast secure mulitple DES method
based on spliting and not have to use IDEA which us so new. Before I
was born, NSA knew all of these things which were not figured out
by the academic community until this decade. (of course they could
also know of some sort of back door, but I think that the fact that
NSA knew of differential cryptography and let an algorithm immune to
it pass while they lowered the key size says something about DES's
security against attacks the academic community hasn't figured out yet.

The bottom line is that NSA has demonstrated that they can outperform
academia without public reviews of their method (LEAFs aside for the
moment [government agencies are after all required to do several stupid
things each year])

Cheers,

JWS

{% endraw %}
```

## Thread

+ Return to [July 1994](/archive/1994/07)

+ Return to<EMAIL_ADDRESS>(Doug Cutrell)](/authors/doug_at_openmind_com_doug_cutrell_)"
+ Return to<EMAIL_ADDRESS>(Eric Hughes)](/authors/hughes_at_ah_com_eric_hughes_)"
+ Return to<EMAIL_ADDRESS>(James A. Donald)](/authors/jamesd_at_netcom_com_james_a_donald_)"
+ Return to<EMAIL_ADDRESS>(Arsen Ray Arachelian)](/authors/rarachel_at_prism_poly_edu_arsen_ray_arachelian_)"
+ Return to "[solman@MIT.EDU](/authors/solman_at_mit_edu)"
+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_netcom_com_timothy_c_may_)"

+ 1994-07-14 (Thu, 14 Jul 94 10:40:18 PDT) - [Key length security (calculations!)](/archive/1994/07/f7eafc5510b51df00152ed4f01e4e1798ccd4b3607ae60786713a11a937753c8) -<EMAIL_ADDRESS>(Doug Cutrell)_
  + 1994-07-14 (Thu, 14 Jul 94 12:10:14 PDT) - [Re: Key length security (calculations!)](/archive/1994/07/9800bda9350e98972c137df98faf04ce3382ab4c228dac9229279bfb5d049789) -<EMAIL_ADDRESS>(Timothy C. May)_
    + 1994-07-15 (Thu, 14 Jul 94 22:44:14 PDT) - [Re: Key length security (calculations!)](/archive/1994/07/1f3fba9e1b4901c664f02dd893931bf4cf0d01adbdb866ed91c945e4c9ce559d) -<EMAIL_ADDRESS>(James A. Donald)_
      + 1994-07-15 (Fri, 15 Jul 94 13:51:13 PDT) - [Key length security (calculations!)](/archive/1994/07/334f9de9b2262fe00416d4d8d4f340c0ff6f9550e50e4468a5bdb731e514655b) -<EMAIL_ADDRESS>(Eric Hughes)_
    + 1994-07-15 (Fri, 15 Jul 94 00:29:01 PDT) - Re: Key length security (calculations!) -<EMAIL_ADDRESS>    + 1994-07-17 (Sun, 17 Jul 94 09:38:53 PDT) - [Re: Key length security (calculations!)](/archive/1994/07/6ca4f6e63fa40c0a2c3959f5691d5a2e895b2396f05f67b630e7481a3315aac7) -<EMAIL_ADDRESS>(Arsen Ray Arachelian)_
      + 1994-07-17 (Sun, 17 Jul 94 10:19:47 PDT) - [Can NSA and PKP Suppress Breakthroughs?](/archive/1994/07/ea19b559f2f69765b7df421672f2c555c41f398579913df9e7d0c0f0688c7a61) -<EMAIL_ADDRESS>(Timothy C. May)_
      + 1994-07-17 (Sun, 17 Jul 94 11:58:52 PDT) - [Re: Key length security (calculations!)](/archive/1994/07/85331f0379063c37bd0d1da92efce50663b66624d6ff2683b2bce4eb49f106fb) -<EMAIL_ADDRESS>


text:
# spanner-lab

This project contains a collection scripts and demos for use with
[Google Spanner](https://cloud.google.com/spanner/).

## Disclaimer
This is not an official Google product (experimental or otherwise), it is just
my personal play grounds for all things [Spanner](https://cloud.google.com/spanner/).

## Content

This repo includes cluster and database management scripts as well few
Data Definition Language (DDL) files which I use to create schemas.

### Dependencies

The only dependency to use this lab is the [gcloud](https://cloud.google.com/sdk/gcloud/) utility. Is a command-line tool
for Google Cloud Platform. You can use this tool to perform many common platform tasks

### Configuration

All lab configuration files are in the `config.sh` file:

* `GCLOUD_PROJECT` = Google Cloud Project ID (Only required change)
* `SPANNER_INSTANCE` = Spanner instance ID ["spanner-lab"]
* `SPANNER_INSTANCE_SIZE` = Size of the Spanner cluster [1]
* `SPANNER_DB` = Name of the database in your Spanner cluster ["db"]
* `SPANNER_DB_ZONE` = Default region/zone where the cluster will be created ["regional-us-central1"]
* `SPANNER_DB_DDL` = Path to your schema DDL ["ddl/tpch-v2-17-3.ddl"]

### Setup

Assuming you already updated the configuration file and have defined

Use `./cluster-up.sh` to creates cluster. Once finished, execute `./db-up.sh`
to creates database in the previously created cluster

### Cleanup

Execute `./cluster-down` to delete the entire cluster (after prompt)

### DDLs

So far only one DDL, working on it

#### TPC H 2.17.3

Transaction Processing Performance Council (TPC) - [Benchmark H Standard Specification Revision 2.17.3](http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-h_v2.17.3.pdf)

![TPC H Schema](/../master/img/tpc-h.png?raw=true "TPC H Schema")

To accommodate Spanner specific DDL requirements this schema modifies TPC H tables in following ways:

* Column prefixes removed to enable interleaves
* FKs were refactored as table interleaves
  * REGION < NATION
  * CUSTOMER < ORDERS < LINEITEM
* Data types were remapped
  * int = INT64
  * varchar(n) = STRING(n)
  * decimal(n,2) = FLOAT64 (double precession)
  * date = DATE

## TODO

* Data loader, probably modified version of the [cockroachdb one](https://github.com/cockroachdb/loadgen/blob/master/tpch/load.go)
* Distributed configuration demo (FT)

repository: rekha-balan/spanner-lab

repo_name: rekha-balan/spanner-lab


text:
# F1TENTH gym environment ROS communication bridge
This is a containerized ROS communication bridge for F1TENTH gym environment.

This project is still under heavy developement.

# Overview

<img src="f1tenth_gym_ros.png" width="600">

# Different Benchmarks
In our virtual race, there will be three benchmark tasks.

1. **Benchmark 1** is a single agent time trial without obstacle on the track. The objective is to achieve lower lap times.
2. **Benchmark 2** is a single agent task with unknown obstacles in the map before hand. The objective is to finish laps without crashing.
3. **Benchmark 3** is a task where two agents compete simultaneously on the same track. The objective is to finish a certain number of laps before the other agent.

We provide several branches for different benchmarks. On the **master** branch, the simulator is created for Benchmarks 1 & 2, where only a single agent (the ego agent) will spawn in the map. On the **multi_node** branch, the simulator is modified for Benchmark 3, where two agents will spawn in the map. We'll go over how these agents are controlled in a following section.

# Installation
<!---Before cloning this repo, you'll need to install Docker. Note that this environment is only tested on Ubuntu. You'll also need ROS on your host system. --->

**System Requirements:**
- Ubuntu (tested on 18.04)
- ROS (tested on Melodic)
- Docker (Follow the instructions [here](https://docs.docker.com/install/linux/docker-ce/ubuntu/) to install Docker. A short tutorial can be found [here](https://docs.docker.com/get-started/) if you're not familiar with Docker.)

1. Clone this repo into the ```src/``` directory in your workspace,
2. Build the docker image by:
```bash
$ cd f1tenth_gym_ros
$ sudo ./build_docker.sh
```
This will take around 5 minutes to build depending on your system

3. To run the containerized environment, start a docker container by:
```bash
$ sudo ./docker.sh
```
4. Next, in a new terminal in the host system, check everything is working by:
```bash
$ rostopic list
```
You should a see a few topics like the usual ```/rosout``` etc. And topics provided by the environment like ```/scan``` etc.

> **When you're creating your own launch file to launch your node, please include ```gym_bridge_host.launch``` in the ```launch``` directory in your own launch file by putting this line in your launch file:**
> ```xml
> <include file="$(find f1tenth_gym_ros)/launch/gym_bridge_host.launch"/>
> ```

5. An example agent launch file is in ```launch/agent_template.launch```. After you build your workspace after ```catkin_make```, you can run the agent template by running:
```bash
$ roslaunch f1tenth_gym_ros agent_template.launch
```
You should see an rviz window show up, showing the map, the two cars (ego is blue and opponent is orange), and the LaserScan of the ego car. The opponent is running pure pursuit around the track, and the ego agent is not moving.

# Available Topics for subscription

```/scan```: The ego agent's laser scan

```/odom```: The ego agent's odometry

```/opp_odom```: The opponent agent's odometry

```/opp_scan```: The opponent agent's laser scan (only available on the multi_node branch)

```/map```: The map of the environment

```/race_info```: Information of the environment including both agents' elapsed runtimes, both agents' lap count, and both agents' collsion info. **Currently, the race ends after both agents finish two laps, so the elapsed times will stop increasing after both lap counts are > 2**

# Developing and creating your own agent in ROS
A basic dummy agent node is provided in ```scripts/dummy_agent_node.py```. Launch your own node in your launch file, and don't forget to include ```gym_bridge_host.launch``` in your own launch file.

On the **master** branch for single agent simulation, publish your drive message on the ```/drive``` topic using the AckermannDriveStamped message type. The simulation is stepped by a callback function subscribed to the drive topic.

On the **multi_node** branch for two-agent simulation, publish the ego agent's drive commands to ```/drive```, and the opponent agent's drive commands to ```/opp_drive```. At this point, we're not providing any agents built in for testing. A good way to start test your algorithms in this setting is to use another algorithm that you've created, or even the same algorithm.

# Changing maps
After you've ran the ```build_docker.sh``` script, you can copy the corresponding .yaml and image file into two directories: ```f1tenth_gym_ros/maps``` and ```f1tenth_gym_ros/f1tenth_gym/maps```. Then change the ```map_path``` and ```map_img_ext``` parameters in ```f1tenth_gym_ros/params.yaml``` to the corresponding paths. Lastly, change the ```map``` argument in ```f1tenth_gym_ros/launch/gym_bridge.launch``` to the new map.

After making all the changes, make sure you run ```build_docker.sh``` to rebuild the container.

You can find a collection of maps including the ones from past competitions here: https://github.com/f1tenth/f1tenth_simulator/tree/master/maps

# TODO
- [x] Two-way comm tests
- [x] RobotModel state update
- [x] Some way to notify collision between agents
- [x] Some way to notify two cars finishing fixed number of laps
- [x] Since we have timer update instead of action stepping, what is the notion of 'done'?
- [x] Publish more topics on collsions, laptime, and done
- [x] Integrate example test agents
- [ ] ~~Integrate competent racing agents (with random order when testing)~~
- [x] Fix mismatch between ray casted scan and robot model
- [ ] ~~Add instruction in README for rebuilding image when remote repo updates~~
- [ ] Handle env physics when collisions happen (agent-agent, agent-env)
- [ ] ~~Add some parameterization on racing scenarios~~

gha_language: Python


text:
# python-blogging
#### Elijah Grubb

A simple blogging application built in python on top of the django framework. Functions as an example of my ability to build effective web applications as well as a place I can write about my experiences on.

It is live at [blog.grubbit.net](http://blog.grubbit.net).

At some point I hope to rewrite this readme with instruction on how you can easily clone this and get an empty version of my blog running for free on Heroku within an hour. Another day perhaps.

repository: judgegrubb/python-blogging

repo_name: judgegrubb/python-blogging


text:
# Plan

* Deep neural networks for classification of multispectral images
* Niklas Lindorfer
* 2265846l
* Professor Roderick Murray-Smith

Week-by-week plan for the whole project.

## Winter semester

* **Week 1**
  * initial environment setup
  * first research into technologies and applications
* **Week 2**
  * continue research
* **Week 3**
  * continue research
* **Week 4**
  * acquire some dataset for testing
  * explore some traditional classification methods (Logistic Regression, SVM)
* **Week 5**
* **Week 6**
  * reproduce previous project for testing and training purposes
* **Week 7**
  * find off-the-shelf dataset for initial development
* **Week 8**
* **Week 9**
  * Image registration problem
* **Week 10**
* **Week 11 [PROJECT WEEK]**
  * Develop mobile application
* **Week 12 [PROJECT WEEK]**
  * Status report submitted.

## Winter break

## Spring Semester

* **Week 13**
  * Select application
* **Week 14**
  * Capture dataset
* **Week 15**
* **Week 16**
* **Week 17**
  * Evaluate different models
* **Week 19**
* **Week 20**
* **Week 21**
  * Dissertation writing time
* **Week 22**
* **Week 23 [TERM ENDS]**
* **Week 24**
  * Dissertation submission deadline and presentations.

gha_language: Jupyter Notebook


text:
# azure-iot-demo
Demo application of a virtual device running on the Azure IoT Hub, publishing events to a Spring Cloud Data Flow (SCDF) server and receiving commands back.

# Description
This demo is composed of the following applications:

# azure-iot-device
This application represents a virtual wind speed device which shows the current wind speed as a dial on the UI, and also
sends the current wind speed to the Azure IoT Hub.  It also listens for commands sent to the device from the Azure IoT Hub.

![Azure Demo App](/images/azureapp.jpeg)

# azure-iot-create
This application is used to add a device to the Azure IoT Hub.  You supply the connection string and device id to add, and the application will display the device key.

# azure-iot-hub
This application listens for messages send to the Azure IoT Hub, and publishes them to the Spring Cloud Data Flow (SCDF) pipeline.  This application
is an SCDF source app.

# azure-iot-output
This application is an SCDF sink which listens on the pipeline for messages, calculates the average wind speed over the last 30 seconds or so, and stores the results in Redis.  If
the average wind speed is less than 10 mph, it sends a command to the virtual device to set the background color to yellow.  Likewise, an average between
10 and 30 is green, and above 30 is red.  Commands are sent to the device only when the color needs to be changed.

# azureiothub-spring-boot-autoconfigure
Spring boot starter auto config project.  It contains the azure libraries as well as components that
can be autowired to your application.  You don't include this project directly as a dependency - instead
you specify the azureiothub-spring-boot-starter dependency, which brings this project along for the ride.

# azureiothub-spring-boot-starter
Spring boot starter project for the Azure IoT Hub.  Any applications wanting to use the azure library
and/or common components just need to include this starter as a maven POM dependency.

# Azure IoT Hub setup
You'll need an Azure account, and an IoT Hub to use. The free tier works fine for this demo.  Follow the directions [here]( https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-java) up to but not including the first sample application to create a device identity.  As you go along, be sure to capture:
* IoT Hub Name
* Device ID
* IoT Hub Hostname
* Device Connection String
* Event Hub Compatible Endpoint
* Event Hub Compatible Path
* IOT Hub owner Primary Key
* IoT Hub Connection String

Here is an example of the Azure CLI commands in the link above, and the results of each command:

```
// Add required extension
az extension add --name azure-cli-iot-ext

// Create the device - the IoT Hub Name is mjeffries-iot-hub, and the Device ID is MyJavaDevice:
az iot hub device-identity create --hub-name mjeffries-iot-hub --device-id MyJavaDevice
{
  "authentication": {
    "symmetricKey": {
      "primaryKey": "2kX/eAIsbhPFzsCVzs8FuSm2/Ajute85uTa4Fkt1H5I=",
      "secondaryKey": "CBhs/fmu8Don1hMbGocNsyxK5aAN61K72hHXp7ORVpE="
    },
    "type": "sas",
    "x509Thumbprint": {
      "primaryThumbprint": null,
      "secondaryThumbprint": null
    }
  },
  "capabilities": {
    "iotEdge": false
  },
  "cloudToDeviceMessageCount": 0,
  "connectionState": "Disconnected",
  "connectionStateUpdatedTime": "0001-01-01T00:00:00",
  "deviceId": "MyJavaDevice",
  "etag": "ODQxNDA5NDU1",
  "generationId": "636633062050290058",
  "lastActivityTime": "0001-01-01T00:00:00",
  "status": "enabled",
  "statusReason": null,
  "statusUpdatedTime": "0001-01-01T00:00:00"
}

// Device Connection String - the IoT Hub Name is mjeffries-iot-hub, and the Device ID is MyJavaDevice:
az iot hub device-identity show-connection-string --hub-name mjeffries-iot-hub --device-id MyJavaDevice --output table
-------------------------------------------------------------------------------------------------------------------------------
HostName=mjeffries-iot-hub.azure-devices.net;DeviceId=MyJavaDevice;SharedAccessKey=2kX/eAIsbhPFzsCVzs8FuSm2/Ajute85uTa4Fkt1H5I=

Note that the Hostname is the first part of the connection string, ex, mjeffries-iot-hub.azure-devices.net

// Events hub compatible Endpoint - the IoT Hub Name is mjeffries-iot-hub:
az iot hub show --query properties.eventHubEndpoints.events.endpoint --name mjeffries-iot-hub
"sb://ihsuproddmres020dednamespace.servicebus.windows.net/"

// Events Hub Compatible path - the IoT Hub Name is mjeffries-iot-hub:
az iot hub show --query properties.eventHubEndpoints.events.path --name mjeffries-iot-hub
"iothub-ehub-mjeffries-488688-1cf9d45391"

// IOT Hub owner Primary Key- the IoT Hub Name is mjeffries-iot-hub:
az iot hub policy show --name iothubowner --query primaryKey --hub-name mjeffries-iot-hub
"yvtBsXWJxEntKfiHWV5wBRuOTZpgidIFXx54NMc8IXc="

// IoT Hub Connection String - the IoT Hub Name is mjeffries-iot-hub:
az iot hub show-connection-string --hub-name mjeffries-iot-hub --output table
-----------------------------------------------------------------------------------------------------------------------------------------
HostName=mjeffries-iot-hub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=yvtBsXWJxEntKfiHWV5wBRuOTZpgidIFXx54NMc8IXc=

```

# Build the projects
To build all the projects, just open a shell in the root of the project, and run
```
cd azure-iot-demo
mvn clean package
```

# Upload the SCDF components JAR files
After building the azure-iot-hub and azure-iot-output projects, upload the jar files to the Azure blob store (or S3 or maven repo).  Be sure to
allow public read access to the uploaded files.
```
Example:
- https://mjeffries.blob.core.windows.net/scdf/azure-iot-hub-0.0.1-SNAPSHOT.jar
- https://mjeffries.blob.core.windows.net/scdf/azure-iot-output-0.0.1-SNAPSHOT.jar
```

# Get your virtual device key from the Azure IoT Hub
Use the azure-iot-create application to add a device to your IoT Hub account.  Supply the entire IoT Hub connection string in double quotes for the first argument, and the new device ID as the second argument (ex. myFirstJavaDevice).  The device should already exist from a previous step, but it will be created if it doesn't already exist.

```
java -jar azure-iot-create/target/create-device-identity-1.0-SNAPSHOT.jar [IoT Hub Connection String] [Device ID]

For example:
java -jar azure-iot-create/target/create-device-identity-1.0-SNAPSHOT.jar  "HostName=mjeffries-iot-hub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=yvtBsXWJxEntKfiHWV5wBRuOTZpgidIFXx54NMc8IXc=" MyJavaDevice

conn: HostName=mjeffries-iot-hub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=yvtBsXWJxEntKfiHWV5wBRuOTZpgidIFXx54NMc8IXc=

Device id: MyJavaDevice

Device already exists!

Device id: MyJavaDevice

Device key: 2kX/eAIsbhPFzsCVzs8FuSm2/Ajute85uTa4Fkt1H5I=

```
Please sure to capture the displayed Device Key that was generated, you'll need it for your application manifest below.

# Spring Cloud Data Flow (SCDF)
Spring Cloud Data Flow (https://cloud.spring.io/spring-cloud-dataflow/) is a great tool for creating data microservices which can be deployed to Pivotal Cloud Foundry(PCF).  This demo runs SCDF on Pivotal Web Services (PWS), our hosted version of Pivotal Cloud Foundry.

# PWS setup
You'll need to have or create an account on PWS (https://run.pivotal.io), and enter a credit card number in order get an organization with sufficient quota (~10 GB) for the demo.  Once you're logged in, go ahead and create the services instances you'll need (RabbitMQ, Redis, MySQL):
```
cf create-service rediscloud 30mb redis
cf create-service cloudamqp lemur rabbit
cf create-service cleardb spark my_mysql
```

# SCDF setup
To start this section, create a new folder on your local machine, outside of this Github project, such as ~/scdf.  Then open your terminal and change to that directory.

Now dowload the SCDF files you'll need.  We're using SCDF release 1.5 for this demo.
```
wget http://repo.spring.io/release/org/springframework/cloud/spring-cloud-dataflow-server-cloudfoundry/1.5.0.RELEASE/spring-cloud-dataflow-server-cloudfoundry-1.5.0.RELEASE.jar

wget http://repo.spring.io/release/org/springframework/cloud/spring-cloud-dataflow-shell/1.5.0.RELEASE/spring-cloud-dataflow-shell-1.5.0.RELEASE.jar
```

# Deploy the dataflow server
In the same folder, create a deployment manifest for the application, and edit it to include your PWS account information.  The file should be
named "manifest.yml":
```
---
applications:
- name: data-flow-server
  host: data-flow-server-YOUR_INITIALS
  memory: 2G
  disk_quota: 2G
  instances: 1
  path: ./spring-cloud-dataflow-server-cloudfoundry-1.5.0.RELEASE.jar
  env:
    SPRING_APPLICATION_NAME: data-flow-server
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_URL: https://api.run.pivotal.io
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_ORG: YOUR_ORG
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SPACE: YOUR_SPACE
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_DOMAIN: cfapps.io
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_USERNAME: YOUR_USERNAME
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_PASSWORD: YOUR_PASSWORD
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_STREAM_SERVICES: rabbit
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_TASK_SERVICES: my_mysql
    SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SKIP_SSL_VALIDATION: false
    SPRING_APPLICATION_JSON: '{"maven": { "remote-repositories": { "repo1": { "url": "https://repo.spring.io/libs-release"} } } }'
services:
- my_mysql
```
Now go ahead and deploy the dataflow server to PCF:
```
cf push
```

When the application deployment is completed, note the URL for the application (ex. http://data-flow-server-mj.cfapps.io), which you'll need below.

# Start the dataflow Shell locally
In the same folder, run the following command to start the shell, then enter the URL of the dataflow server application when prompted:

```
java -jar spring-cloud-dataflow-shell-1.5.0.RELEASE.jar
  ____                              ____ _                __
 / ___| _ __  _ __(_)_ __   __ _   / ___| | ___  _   _  __| |
 \___ \| '_ \| '__| | '_ \ / _` | | |   | |/ _ \| | | |/ _` |
  ___) | |_) | |  | | | | | (_| | | |___| | (_) | |_| | (_| |
 |____/| .__/|_|  |_|_| |_|\__, |  \____|_|\___/ \__,_|\__,_|
  ____ |_|    _          __|___/                 __________
 |  _ \  __ _| |_ __ _  |  ___| | _____      __  \ \ \ \ \ \
 | | | |/ _` | __/ _` | | |_  | |/ _ \ \ /\ / /   \ \ \ \ \ \
 | |_| | (_| | || (_| | |  _| | | (_) \ V  V /    / / / / / /
 |____/ \__,_|\__\__,_| |_|   |_|\___/ \_/\_/    /_/_/_/_/_/

1.5.0.RELEASE

Welcome to the Spring Cloud Data Flow shell. For assistance hit TAB or type "help".
server-unknown:>dataflow config server http://data-flow-server-mj.cfapps.io
Shell mode: classic, Server mode: classic
dataflow:>
```

Now enter the line below to install the default apps to SCDF:
```
app import --uri http://bit.ly/Celsius-SR1-stream-applications-rabbit-maven
```

# Install your custom apps
Now you are ready to create the azure source and sink apps.  Run these commands to install the apps, referencing the blobstore location.

```
app register --name azure-iot-hub --type source --uri https://mjeffries.blob.core.windows.net/scdf/azure-iot-hub-0.0.1-SNAPSHOT.jar
app info --id source:azure-iot-hub
```

```
app register --name azure-iot-output --type sink --uri https://mjeffries.blob.core.windows.net/scdf/azure-iot-output-0.0.1-SNAPSHOT.jar
app info --id sink:azure-iot-output
```

# Create your new SCDF Stream
Now you are ready to create and deploy the stream to use these apps.  Just substitute the values from when you set up your IoT hub
on Azure.

```
stream create --name iot-stream --definition "azure-iot-hub --hubendpoint=[Event Hub Compatible Endpoint] --hubkey=[IOT Hub owner Primary Key] --hubname=[Event Hub Compatible Path] | azure-iot-output --hostname=[IoT Hub Hostname] --hubkey=[IOT Hub owner Primary Key]"

Example:
stream create --name iot-stream --definition "azure-iot-hub --hubendpoint=sb://ihsuproddmres020dednamespace.servicebus.windows.net/ --hubkey=yvtBsXWJxEntKfiHWV5wBRuOTZpgidIFXx54NMc8IXc= --hubname=iothub-ehub-mjeffries-488688-1cf9d45391 | azure-iot-output --hostname=mjeffries-iot-hub.azure-devices.net --hubkey=yvtBsXWJxEntKfiHWV5wBRuOTZpgidIFXx54NMc8IXc="
```

# Deploy your SCDF Stream
Now you can deploy the stream.  This will take a few minutes as the dataflow server will create and deploy 2 new apps to PCF, one for each of the
new SCDF components you created above.

```
stream deploy --name iot-stream --properties "deployer.azure-iot-hub.memory=2g,deployer.azure-iot-output.memory=2g,deployer.azure-iot-output.services=redis"

stream list
```

# View the apps in PCF
Use the "cf apps" command to view the apps in PCF.  There should be 3 apps displayed for this demo, the data-flow-server, the azure-iot-hub, and
the azure-iot-output apps.  Note the SCDF component app names are generated by SCDF, and start with the name of the data-flow-server app, plus
a random word (ex. k1ur8ZH) to make each app name unique.

```
cf apps
name                                                   requested state   instances   memory   disk   urls
data-flow-server                                       started           1/1         2G       2G     data-flow-server-mj.cfapps.io
data-flow-server-k1ur8ZH-iot-stream-azure-iot-hub      started           1/1         2G       1G     data-flow-server-k1ur8ZH-iot-stream-azure-iot-hub.cfapps.io
data-flow-server-k1ur8ZH-iot-stream-azure-iot-output   started           1/1         2G       1G     data-flow-server-k1ur8ZH-iot-stream-azure-iot-output.cfapps.io
```

# Validate that the azure-iot-output app was bound to Redis
The deploy command above should deploy the azure-iot-output app, and bind it to the Redis service instance we created earlier.  You can run the "cf services"
 command to see if the azure-iot-output app is listed as a bound app for the redis service:
```
cf services

name       service      plan    bound apps                                                                                last operation
my_mysql   cleardb      spark   data-flow-server                                                                                create succeeded
rabbit     cloudamqp    lemur   data-flow-server-0VmmHoy-iot-stream-azure-iot-hub, data-flow-server-0VmmHoy-iot-stream-azure-iot-output   create succeeded
redis      rediscloud   30mb    data-flow-server-0VmmHoy-iot-stream-azure-iot-output                                                      create succeeded
```

If not bound, go ahead and bind explicitly and restart the app.  Both apps should start successfully after a few minutes.
```
cf bs data-flow-server-0VmmHoy-iot-stream-azure-iot-output redis
cf restage data-flow-server-0VmmHoy-iot-stream-azure-iot-output
```

# Deploy your Device app to PCF
Now you can build and push the azure-iot-device demo app to PCF.  Here is a sample manifest.yml content, just create this file in the azure-iot-device folder and again substitute your values.  Use the output of the "create-device-identity" app (above) to get the value for [Device Key]

Login to your PCF environment and run "cf push" from the azure-iot-device folder.

```
---
applications:
- name: azure-device-[Your Initials]
  memory: 1G
  buildpack: https://github.com/cloudfoundry/java-buildpack
  path: ./target/azure-iot-device-0.0.1-SNAPSHOT.jar
  env:
    HOSTNAME: [IoT Hub Hostname]
    DEVICE_ID: [Device ID]
    SHARED_ACCESS_KEY: [Device Key]

Example:
---
applications:
- name: azure-device-mj
  memory: 1G
  buildpack: https://github.com/cloudfoundry/java-buildpack
  path: ./target/azure-iot-device-0.0.1-SNAPSHOT.jar
  env:
    HOSTNAME: mjeffries-iot-hub.azure-devices.net
    DEVICE_ID: MyJavaDevice
    SHARED_ACCESS_KEY: 2kX/eAIsbhPFzsCVzs8FuSm2/Ajute85uTa4Fkt1H5I=
```

Once the device app is deployed, note the URL from the output, and load the app into your browser.  Click the "Start" button to start sending data to the Azure IoT Hub, and "Stop" to pause the data.  You can use the "+" and "-" buttons to adjust the wind speed, then wait around 30 seconds for the background color to change (at 10 and 30 mph).  Use the "Reset" button to clear the list of values from the Redis cache.

Use "cf apps" to get the name of the apps deployed to PCF by SCDF, and use "cf logs" to see the messages processed by each component application.


text:
# projlist

A short and simple program for recursively listing git repositories.

Unlike POSIX `find`, it recurses to arbitrary depth while efficiently detecting
git repositories, making it faster and more reliable than cobbled-together shell
scripts.

## Building

### Prerequisites

* Development headers and binaries for boost/system and boost/filesystem.
  (Ubuntu/Debian APT package name: `libboost-system-dev` and
  `libboost-filesystem-dev`)
* A C++ compiler compatible with the C++11 standard.
* GNU make

In order to build from git, you will additionally need

* GNU Autotools (Ubuntu/Debian APT package name: `autoconf` and `automake`)

#### Why boostlib?

C++17 will finally be adding a standard filesystem library (in fact, they
actually just standardized the boost filesystem library). However, in C and in
previous versions of C++, there was no standard way to iterate over files in a
directory, i.e. everything this program does.

Since C++17 support is limited at the moment, this program will continue to use
boost/filesystem for the foreseeable future.

### Build instructions

If building from git:

* `autoreconf -i`

Then:

* `./configure`
* `make`

### Installation

* `make install`

You can set the installation prefix in the usual way (i.e. `./configure
--prefix=/path/to/dir`)

### Building a distribution

* `make dist`

## Running

Usage is `projlist /path/to/root/directory`. The program will search that
directory recursively, printing each git repository it finds. In my experience,
the first usage on any given session will be slow as the kernel has to retrieve
the directory inodes from the disk, but subsequent uses will be
near-instantaneous because the inodes are already cached.

Since it will recurse to arbitrary depth, running it on a directory like, say,
`~` is ill-advised.

## Example usages

Assuming the executable is named `projlist` and is on the PATH:

### bash/zsh function

This pipes the output of `projlist` into
[selecta](https://github.com/garybernhardt/selecta), then switches to the
selected directory:

```sh
proj() {
    # or whatever directory you want
    cd $( projlist ~/Projects | selecta )
}
```

### Emacs Helm source

This uses the output of `projlist` to build a
[helm](https://github.com/emacs-helm/helm) session for fuzzy matching on the
results, and opens a dired buffer on the selected directory:

```elisp
(defun helm-projlist ()
  (interactive)
  (find-file
   (helm :sources (helm-build-sync-source "Projects tree"
                    :candidates (split-string
                                 (shell-command-to-string "projlist ~/Projects")
                                 "\n"
                                 t)
                    :fuzzy-match t)
         :buffer "*helm projlist*")))
```

You can then bind `helm-projlist` to a key as desired.

## To-do list

* Adding support for a maximum depth for sanity purposes is probably a good
  idea, especially if someone has a really messy project directory (e.g. their
  projects are stored directly in `~`).
* Perhaps a few more features of `find` - I don't intend this to become a
  full-on `find` replacement, but I could see some `find` options like `-print0`
  being useful enough to be worth implementing.

license: Unlicense

repository: curtmack/projlist

repo_name: curtmack/projlist


text:
# TableColumnsService

An abstract TypeScript/JavaScript class for manipulating display table columns.
It is not specific to any particular GUI.  It supports the re-ordering of columns, and the
hiding of columns.

## Installation

You must have npm installed first. Then, in the command line:

    npm install @writetome51/table-columns-service

## Loading

    // if using TypeScript:
    import {  TableColumnsService } from '@writetome51/table-columns-service';
    // if using ES5 JavaScript:
    var  TableColumnsService =  require('@writetome51/table-columns-service').TableColumnsService;

## Properties

### columns :  {visible: boolean}[]  (read-writable)

### className : string (read-only)
##### (Not important. Inherited from BaseClass (see Inheritance Chain below).)

## Methods
```
moveColumn(oldIndex, newIndex): void
    // moves column in this.columns from oldIndex to newIndex.

toggleColumnVisibility(columnIndex): void
    // sets column's 'visible' property to the opposite of its current value.
```
The methods below are not important to know about in order to use this
class.  They're inherited from [BaseClass](https://github.com/writetome51/typescript-base-class#baseclass) .
```
protected   _createGetterAndOrSetterForEach(
                  propertyNames: string[],
                  configuration: IGetterSetterConfiguration
            ) : void
     /*********************
     Use this method when you have a bunch of properties that need getter and/or
     setter functions that all do the same thing. You pass in an array of string
     names of those properties, and the method attaches the same getter and/or
     setter function to each property.
     IGetterSetterConfiguration is this object:
     {
         get_setterFunction?: (
             propertyName: string, index?: number, propertyNames?: string[]
         ) => Function,
             // get_setterFunction takes the property name as first argument and
             // returns the setter function.  The setter function must take one
             // parameter and return void.

         get_getterFunction?: (
             propertyName: string, index?: number, propertyNames?: string[]
         ) => Function
             // get_getterFunction takes the property name as first argument and
             // returns the getter function.  The getter function must return something.
     }
     *********************/

protected   _returnThis_after(voidExpression: any) : this
    // voidExpression is executed, then function returns this.
    // Even if voidExpression returns something, the returned data isn't used.

protected   _runMethod_and_returnThis(
    callingObject,
    method: Function,
    methodArgs: any[],
    additionalAction?: Function // takes the result returned by method as an argument.
) : this
```

## Inheritance Chain

 TableColumnsService<--[BaseClass](https://github.com/writetome51/typescript-base-class#baseclass)

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


text:
---
page_title: "snowflake_stage_grant Resource - terraform-provider-snowflake"
subcategory: ""
description: |-

---

# Resource `snowflake_stage_grant`

## Schema

### Required

- **database_name** (String, Required) The name of the database containing the current stage on which to grant privileges.
- **schema_name** (String, Required) The name of the schema containing the current stage on which to grant privileges.
- **stage_name** (String, Required) The name of the stage on which to grant privileges.

### Optional

- **id** (String, Optional) The ID of this resource.
- **privilege** (String, Optional) The privilege to grant on the stage.
- **roles** (Set of String, Optional) Grants privilege to these roles.
- **shares** (Set of String, Optional) Grants privilege to these shares.
- **with_grant_option** (Boolean, Optional) When this is set to true, allows the recipient role to grant the privileges to other roles.


text:
# weatherly

![weathrly-video-screenshot](https://user-images.githubusercontent.com/479463/43278965-d51179f6-90c9-11e8-8ad2-bea5bda60019.gif)

## Overview

It’s important to know what Mother Nature is going to throw at you each day – what if you wear flip flops because it’s sunny and 65 degrees in the morning and then it snows all afternoon (this is Colorado, after all).

As web developers you’re going to be living in the context of the web. With this next project you will be interacting with a web-api. Ultimately this is going to be a preview for what the real world is going to look like for most of you. Data is important and thats what the API provides. As a web-developer you will be giving value to that data by visualizing and organizing that data for your user base.

## Our Experience

In this project we were given our first real interactions with ReactJS, asynchronous javascript, and managing the state of the application. Our Weathrly app fetches for API requests to provide real-time weather information and a drop down autocomplete featuring a limited data set of cities.

## Wireframe

<img width="460" alt="screen shot 2018-04-17 at 9 27 12 am" src="https://user-images.githubusercontent.com/479463/38879892-a415e540-4221-11e8-815a-1954fc585d4e.png">

gha_language: JavaScript


text:
Parse JSON as typed instances.

## Installation

`npm install ts-parse`

## Prereqs

- TypeScript (for Decorator support)
- Enable `emitDecoratorMetadata` and `experimentalDecorators` in `tsconfig.json`:

  ```json
  {
    "compilerOptions": {
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true
    }
  }
  ```

## Approach

Typed parsing utilizes constructor-based injection to create actual class instances from JSON or plain JavaScript objects.  The [Reflect Metadata](https://github.com/rbuckton/reflect-metadata) shim, which is currently a ECMAScript proposal, exposes the type information of a constructor's parameters making it possible to instantiate objects from their real constructors.

For example:

```ts
@Constructable()
class Address {

  constructor(private city: string, private state: string, private zip: string) {

  }

  getCityStateZip(): string {
    return `${this.city}, ${this.state} ${this.zip}`;
  }
}

let address = TSON.parse('{"city":"Richmond","state":"VA","zip":"23230"}', Address);

address instanceof Address; // true
address.getCityStateZip(); // "Richmond, VA 23230"
```

The constructor in this example uses accessibility modifiers on the constructor args so that a corresponding instance member is also created, [a nice feature of TypeScript](https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties).

## Features

- Serialize JSON or POJOs to actual class instances
- Instantiation through construction injection
- Fully supports inheritance through super constructors
- Missing arguments in the constructor will be passed as NULL
- Extra JSON properties are set to the class instance via Object.assign

## Array Support

Array support is built-in, but, it requires a cast for compile-time type support.  This is necessary to
support a simplified API and it eliminates the needs for an extra parsing method for Nth-degree Arrays (e.g. parseArray, parseArrayOfArrays, etc.).

```ts
@Constructable()
class Foo { }

const json = "[{},{}]";

// extra cast is required and can't be inferred
let foos = <Foo[]> TSON.parse(json, Foo);
foos[0] instanceof Foo; // true
```

```ts
@Constructable()
class Bar { }

const json = "[[{},{}]]";

// there's no limit to the amount of arrays that can be nested
let bars = <Bar[][]> TSON.parse(json, Bar);
bars[0][0] instanceof Bar; // true
```

## Alternative Approach

Another approach is to creating instances would be member injection which this project does not support.

Tradeoffs and difficulties to field assignment:
 - Annotate every member (the "code bloat" is a net zero tradeoff to the constructor "bloat")
 - No support for inheritance - why? because we can't clearly define what properties to exclude getOwnProperties
 - Assign to -> fields and setters
 - How to handle -> readonly, private, protected, const

## Contributing

- Fork and/or clone repo.
- Then `npm install`.
- Run a quick test `npm run test`.
- Make changes and run linter `npm run lint`.
- Submit a Pull Request!

For local testing, you may need to install globals:

- `npm install mocha chai ts-node typings -g`
- `typings install dt~mocha --global --save`
- `typings install npm~chai --save`

repository: johnstrickler/ts-parse

repo_name: johnstrickler/ts-parse


text:
# schema-registry-ui

Web UI for Confluent's Schema Registry built in angular - https://github.com/confluentinc/schema-registry

### Features

* Dynamic searches
* Avro + Table views
* Landing page and routed urls
* Schema registration and compatibility checks
* Curl commands

## Preview

## Development

Download the latest, install `bower` dependencies and serve the app

    git clone https://github.com/Landoop/schema-registry-ui.git
    cd schema-registry-ui
    bower install
    http-server app

Web UI will be available at http://localhost:8080

## Configuration

* By default `schema-registry-ui` points to the schema-registry at http://localhost:8081 To point it to a different schema-registry, update `app/src/env.js`
* Enable CORS in the schema-registry by adding to `/opt/confluent-2.0.1/etc/schema-registry/schema-registry.properties` the following and restart the service

```
access.control.allow.methods=GET,POST,OPTIONS
access.control.allow.origin=*
```

## Nginx config

If you use `nginx` to serve this ui, let angular manage routing with

    location / {
        try_files $uri $uri/ /index.html =404;
        root /folder-with-schema-registry-ui/;
    }

## License

The project is licensed under the Apache 2 license.

repository: apsaltis/schema-registry-ui

repo_name: apsaltis/schema-registry-ui