text:
## Release Process

This is not yet a full automated process, so here are a few steps to get the thing properly released on github
and publish under npm registry.

### Setup (serve a local version to run tests against it)

1.  npm run dist:sandbox
2.  npm run start

### Release steps

1.  npm run dist
2.  npm run docs:lint (fix if errors)
3.  Update versioning in package.json
4.  npm run docs
5.  Small tweaks on documentation page (quicklinks)
6.  Replace current files in docs for the generated ones in gen-docs
7.  Generate CHANGELOG.md (github_changelog_generator -u GITHUB_USERNAME)
8.  git commit -m "Release x.x.x"
9.  Create release x.x.x in github
10. git pull (origin master)
11. npm publish


text:
# compe-latex-symbols

[nvim-compe] source for Unicode symbols insertion by LaTeX-like name. Just type `\pointright`,
invoke completion and enjoy your ☞.

Supports most symbols from this list: <http://milde.users.sourceforge.net/LUCR/Math/>

## Installation
Use your favorite package manager. Example for [packer.nvim]:

```lua
use 'GoldsteinE/compe-latex-symbols'
```

Requires [nvim-compe] to use.

## Configuration

```lua
require('compe').setup {
	-- Other options
	source = {
		-- Other sources
		latex_symbols = true;
	}
}
```

## Options

### Insert the code

You can customize to insert either the symbol or the code itself with `b:compe_latex_insert_code`.

```vim
" Always insert the code in markdown files
autocmd FileType markdown let b:compe_latex_insert_code = v:true
```

[nvim-compe]: https://github.com/hrsh7th/nvim-compe/
[packer.nvim]: https://github.com/wbthomason/packer.nvim/

repository: GoldsteinE/compe-latex-symbols

branch_name: refs/heads/master

extension: md

gha_language: Lua

gha_license_id: NOASSERTION

license_type: permissive

repo_name: GoldsteinE/compe-latex-symbols


text:
# aws-dlami-tensorflow

This demo illustrates working with TensorFlow using an Amazon Deep Learning AMI (DLAMI). It includes:

1. `src/basics.py` - Understand basic operations in TensorFlow
1. `src/nn.py` - Create a small neural network regression model in TensorFlow
1. `src/nn_with_summaries.py` - Show how to augment code with TensorFlow summaries to visualize the graph and learning process in TensorBoard
1. `src/nn_export.py` - Illustrates how to save a TensorFlow model to disk so that it can be served by TensorFlow Serving
1. `src/nn_client.py` - Example of how to consume the model served by TensorFlow Serving

![Lab environment](https://user-images.githubusercontent.com/3911650/36124280-b53215ca-100c-11e8-86b5-7cdac414b7e9.png)

## Getting Started

Deploy the CloudFormation stack in the template in `infrastructure/`. The template creates a user with the following credentials and minimal required permisisons to complete the Lab:

- Username: _student_
- Password: _password_

## Instructions

- Connect to the instance using the SSH username: _ubuntu_.
- Run the Jupyter notebook server that comes pre-installed on the [Amazon Deep Learning AMI](https://aws.amazon.com/marketplace/pp/B01M0AXXQB): `jupyter notebook`
- SSH tunnel to the notebook server running on port 8888
- Open a browser to the notebook server on localhost. Get the URL with token from the command `jupyter notebook list`
- Create a new python 2.7 and TensorFlow environment notebook for each file in the `src/` directory
- Paste the code in from each script in the `src/` directory into a cell
- Run the notebooks
  - To view the summaries of `src/nn_with_summaries.py` in TensorBoard, run the command: `tensorboard --logdir /tmp/tensorflow/nn`
  - To serve the model saved by `src/nn_export.py` with TensorFlow Serving, run the command: `tensorflow_model_server --port=9000 --model_name=nn --model_base_path=/tmp/nn`

## Cleaning Up

Delete the CloudFormation stack to remove all the resources. No resources are created outside of those created by the template.

license: MIT


text:
# CLI

Files in this folder define the common framework for defining and parsing CLI
commands, options and properties such as `inApp` or `inPackage`.

It is encouraged to split out theme sharing commands into separate files.

An example of a command:

```javascript
main.registerCommand({
  name: 'some-command',
  requiresRelease: false,
  requiresApp: true,
  // requiresPackage: true,
  // requiresAppOrPackage: true,
  pretty: true, // optional
  minArgs: 1, // optional
  maxArgs: 10, // optional
  options: {
    'long-option': { type: Boolean, short: 's', default: true, required: true },
    'with-string': { type: String, short: 'w' }
  }
}, function (options) {
  var {appDir, packageDir, args} = options;
  var longOption = options['long-option'];
  var withString = options['with-string'];
  ...
});
```

This command will handle the following examples:

```bash
meteor some-command --long-option
meteor some-command -s
meteor some-command -s --with-string "some value"
meteor some-command -s -w "some value"
```

Note: don't pick a short key for an option unless it is very common to use it.
The commands parser makes sure the same short key for an option is used
consistently for the same kind of option across all commands. So two commands A
and B can share a short option "c" only if it stands for the same long option in
both cases.

## Catalog refresh policy

You might notice that some commands are marked to never refresh the catalog.
This is useful to make the command fast, if the command doesn't involve any
network communication to the package server, it might be a good idea to forbid
the preemtive refresh:

```javascript
main.registerCommand({
  ...
  catalogRefresh: new catalog.Refresh.Never()
});
```

## Command return code

For some reason there are two ways to terminate the command with a non-standard
exit code (non-zero, unix process exit code).

First way is just the return value of the command function, which should be a
number.

The second way is to throw a special kind of exception:

```javascript
main.registerCommand({...}, function (options) {
  throw new main.ExitWithCode(2);
})
```

In case of additional options check, you can throw another special exception to
show the help text for the command:

```javascript
main.registerCommand({...}, function (options) {
  if (options.bla === 'bad-value')
    throw new main.ShowUsage;
})
```

There is also `main.WaitForExit` used for terminating after the subprocesses are
done. (XXX more info)

## help.txt

The `help.txt` file contains all the information printed to the user when the
`meteor help` command is run. It has its own syntax where every command is
separated by a marker `>>>` with the name of the command.

Commands are parsed so the help text for an individual command could be
separated from the rest.

Sadly, these commands need to be redocumented in the docs app as well. The docs
text is not shared between these two places, yet.

## Admin commands

Given that `self-test` is the only reliable way to test code in Meteor Tool, you
might need to create special "admin" commands. Since "admin" commands don't show
up in the help text, this namespace is abused to store all sorts of one-of
commands to run in automated and manual tests.

repository: meteor/meteor

branch_name: refs/heads/devel

gha_language: JavaScript

repo_name: meteor/meteor


text:
# [zshred][repo-link]
> A theme for zsh via [oh-my-zsh][omz-link].

## Notice
I have replaced this theme with a configuration of [powerlevel19k][p10k-link], which you can find
in my [dotfiles][dotfiles-link].

[![MIT License](https://img.shields.io/github/license/redxtech/zshred)](/LICENSE)
[![oh-my-zsh](https://img.shields.io/github/stars/robbyrussell/oh-my-zsh?label=oh-my-zsh)][omz-link]

## install
> There's probably a better way to do it, but this will get the job done.

```zsh
$ git clone https://github.com/redxtech/zshred.git
$ cp zshred/themes/zshred.zsh-theme $ZSH_CUSTOM/themes/
```

## features

* current directory shown in prompt
* full path shown in right prompt
* git branch and status shown
* exit status shown in right prompt
* current time shown in right prompt
* title set to current prompt
* even more!

## screenshot

### screenshot details
* terminal emulator: [`alacritty`][alacritty]
* terminal colour scheme: [one dark][a-one-dark]
* status bar: [tmux one dark theme][tmux-one-dark]
* syntax highlighting: [zsh-syntax-highlighting][syntax]

## author

**zshred** © [redxtech][author], released under the [MIT][mit] license.

[mit]:              https://opensource.org/licenses/MIT
[author]:           https://github.com/redxtech
[omz-link]:         https://github.com/robbyrussell/oh-my-zsh
[repo-link]:        https://github.com/redxtech/zshred
[alacritty]:        https://github.com/jwilm/alacritty
[a-one-dark]:       https://github.com/jwilm/alacritty/wiki/Color-schemes#one-dark
[tmux-one-dark]:    https://github.com/odedlaz/tmux-onedark-theme
[syntax]:           https://github.com/zsh-users/zsh-syntax-highlighting
[p10k-link]:        https://github.com/romkatv/powerlevel10k
[dotfiles-link]:    https://github.com/redxtech/dotfiles/blob/master/.config/zsh/p10k.zsh

repository: redxtech/zshred

repo_name: redxtech/zshred


text:
---
layout: post
title: "April 18, 2017 ggplot2  Pre-Class"
tags: [R, ggplot2, shiny]
---

## Part 1: Graphics in R

### Reading

For your Reading:

- [ggplot Cheatsheet](https://www.rstudio.com/wp-content/uploads/2015/03/ggplot2-cheatsheet.pdf)
- [ggplot page](http://statseducation.com/Introduction-to-R/modules/graphics/ggplot2/)

### Videos

1. Complete the DataCamp assignment you have received.
2. Make sure you have read the [ggplot page](http://statseducation.com/Introduction-to-R/modules/graphics/ggplot2/)

## Part 2: Starting Shiny Project

Go to the [Shiny](http://shiny.rstudio.com/) website.
  - Explore the [gallery](http://shiny.rstudio.com/gallery/) of Project ideas.
  - Follow the [Tutorial](http://shiny.rstudio.com/tutorial/)
  - Go through this [Walkthrough by Dean Attali](http://deanattali.com/blog/building-shiny-apps-tutorial/)
  - To show you have done this, create a simple app that takes a standard normal statistic and displays the probability of achieving that value or greater in a standard normal distribution. In other words it takes a \(z\) value and gives a p-value.


text:
# Work-Day-Scheduler

## Description
Why did you build this project?
- To create a functional web day planner

What problem does it solve?
- It allows me and fellow workers to plan our day and save it if necessary

What did you learn?
- Originally I created many different getElementByid queries, then I changed route and instead used a system to get the id clicked and then got the element by that which required only one query.
- This was way easier with all the html and css done for me (that's what I typically spend half my time developing)
- I didn't really need or want jquery
- Moment is kind of cool
- For loops are pretty cool if you can use them correctly

Comments
- I was originally using the clear all button for testing purposes but it actually seemed pretty functional so I left it.

## Usage
![screenshot of pages](assets/screenshot.jpg?raw=true)

## Credits
Trilogy Education

Me

Anthony Briglia and Tom Woods

## License
MIT License

Copyright (c) [2021] [Alex Bradshaw]

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

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

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

## Links to finished project

- https://alexbradshaw.github.io/Work-Day-Scheduler/

- https://github.com/alexbradshaw/Work-Day-Scheduler

## Contact Info

- Email<EMAIL_ADDRESS>

repository: alexbradshaw/Work-Day-Scheduler

branch_name: refs/heads/main

repo_name: alexbradshaw/Work-Day-Scheduler


text:
The Mellow Programming Language
===============================

[![Build Status](https://travis-ci.org/Mellow-Programming-Language/Mellow.svg?branch=master)](https://travis-ci.org/Mellow-Programming-Language/Mellow)

Mellow is an imperative language that draws influence from D, Go, and functional
languages, among others. This implementation exclusively targets x86-64 Linux.

Building
--------

The build process assumes that the D Language compiler `dmd`, `gcc`, `git`, and
the Netwide Assembler `nasm` are installed.

To build the compiler, run `make` in the toplevel project directory. With the
proper dependencies installed, and an internet connection, a simple `make`
should build the full compiler. Note that the `make` process will attempt to
`git clone` a secondary repository (the parser generator project at
https://github.com/Mellow-Programming-Language/ParserGenerator), which is
necessary to build the compiler.

Help
----

`./compiler --help` will provide a summary of options.

Examples
--------

The programs under examples/ demonstrate the syntax and semantics of the Mellow
language.

List of working features:
------------------------------------

  * variables
  * functions
  * function arguments
  * function return values (including multiple-return)
  * `if`, `else if`, `else` statements
  * `while` loops
  * `foreach` loops
  * `for` loops
  * strings
  * bools
  * integers
  * floats can be declared
  * array literals
  * array slice ranges
  * array append semantics
  * green threads (`spawn`, `yield`)
  * channels (both read and write, with implicit yield)
  * expressions
  * `extern func` FFI semantics
  * integer comparison operators
  * logical operators (&&, ||, !)
  * array `.length` property
  * templated structs
  * templated, recursively-defined variants (ADTs)
  * `is` expressions
  * string comparison operators
  * function templating
  * `match` statements
  * full M:N multithreading scheduler
  * module system
  * `then`, `else`, `coda` "end block" control-flow blocks

List of unimplemented or broken features:
-----------------------------------------

  * closures
  * garbage collection
  * most op-equals operators
  * `in` blocks
  * `out` blocks
  * `const` semantics
  * sets
  * hashes
  * function pointers
  * float comparison operators
  * float arithmetic
  * lambdas

repository: darby-cairns/Mellow

repo_name: darby-cairns/Mellow


text:
## Reference

Xiuming Zhang, Elizabeth C. Mormino, Nanbo Sun, Reisa A. Sperling, Mert R. Sabuncu, B. T. Thomas Yeo. [**Bayesian model reveals latent atrophy factors with dissociable cognitive trajectories in Alzheimer's disease**](http://dx.doi.org/10.1073/pnas.1611073113). *Proceedings of the National Academy of Sciences of the USA*, 2016.

----

## Updates

- Release v0.1.3 (26/04/2017): fixing a bug in wrapper CBIG_LDA_est.sh

- Release v0.1.2 (03/04/2017): removing hardcoded image dimensions

- Release v0.1.1 (11/06/2016): adding README for each internal folder

----

## Data Release

Factor compositions of the ADNI subjects involved in this study are released as a spreadsheet in the `ADNIDataRelease` folder. Specifically, the spreadsheet includes 810 ADNI1-enrolled subjects’ baseline factor compositions and their factor compositions 24 months after baseline (N = 560).

Folder `ADNIDataRelease/inferNew/files_LDA/model_K3` contain the probabilistic atrophy maps of the atrophy factors for the three-factor model. Maps for the two- and four-factor models are also released (folders `model_K2` and `model_K4`). You can also view or download all of these atrophy maps online at [http://neurovault.org/collections/1917/](http://neurovault.org/collections/1917/).

In folder `ADNIDataRelease/inferNew/`, we provide instructions and code for inferring factor compositions of your own subjects.

Note that this project uses generic functions from other folders, which may be updated over time. To download the exact code utilized for the PNAS paper, you can either

- visit this link:
[https://github.com/ThomasYeoLab/CBIG/releases/tag/v0.1.3-Zhang2016_ADFactors](https://github.com/ThomasYeoLab/CBIG/releases/tag/v0.1.3-Zhang2016_ADFactors)

or

- run the following command, if you have Git installed

```
git checkout -b Zhang2016_ADFactors v0.1.3-Zhang2016_ADFactors
```

----

## Bugs and Questions

Please contact Xiuming Zhang at<EMAIL_ADDRESS>and Thomas Yeo at<EMAIL_ADDRESS>

repository: winsonfzyang/CBIG

repo_name: winsonfzyang/CBIG


text:
# Gallagbus

Gallagbus is a simple event bus written in Go

## License

Gallagbus is free and released under the [MIT License](https://github.com/K4L1MA/gallagbus/blob/master/LICENSE)

# Authors

* [Eduardo R. Golding](https://github.com/K4L1Ma)

About [Mateo Gallagher](https://es.wikipedia.org/wiki/Mateo_Gallagher)

repository: chiguirez/GallagBus

repo_name: chiguirez/GallagBus


text:
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Search photo app

![Images app](public/img/images.gif)

Simple app to search photo images.
You need to register on pixabay.com in order to receive the API KEY to fetch photo images.
Inside the project root, you need to create a .env file with your API KEY:

```
REACT_APP_PIXABAY_API_KEY=your-api-key
```

## Docs Link

https://pixabay.com/api/docs/

In the project directory, you can run:

### `npm start`

Builds the app for production to the `build` folder.

It correctly bundles React in production mode and optimizes the build for the best performance.

### `npm run build`

The build is minified and the filenames include the hashes.

Your app is ready to be deployed!

### Author
@lexpaper
### licence
MIT

repository: alexpaper/photo-app

gha_language: CSS

repo_name: alexpaper/photo-app


text:
---
title: Tome
repo: drupal-tome/tome-project
homepage: https://tome.fyi
language:
  - PHP
license:
  - MIT
templates:
  - Twig
description: A static site generator lovingly crafted with Drupal 8.
startertemplaterepo: drupal-tome/netlify-template
---

Tome is a static site generator built in Drupal 8. If you're a fan of Drupal,
or are interested in working with structured content instead of flat Markdown
files, you should try Tome!

### Features

- Take advantage of a mature content management system to build static sites.
- Re-use structured JSON exports in other static site generators like
  [GatsbyJS](https://github.com/drupal-tome/tome-gatsby).
- Use Drupal without security or performance concerns.
- Choose from a large library of Drupal 8 themes and modules.
- Join one of the largest open source communities in the world and use Drupal
  in a new, fun way!

gha_license_id: MIT


text:
# Docker image with gpg for exec, and with a long sleep as entrypoint.

## What?

For integration tests against GPG we want to use docker exec, and so the entrypoint of `sleep 99999` just gives us a container to exec against.

tini is used to handle the signal properly.

## Really?

Yup.

license: Unlicense

repository: robshep/docker-gpg-exec

repo_name: robshep/docker-gpg-exec


text:
# Download

PrimeFaces has a single jar called **primefaces-{version}.jar**. There are two ways to download this
jar, you can either download from PrimeFaces homepage or if you are a maven user you can define
it as a dependency.

## Download Manually
Manual downloads are actually links to the maven repository, for more information please visit;

http://www.primefaces.org/downloads

## Download with Maven
Group id is _org.primefaces_ and artifact id is _primefaces._

```xml
<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>8.0</version>
</dependency>
```

repository: primefaces/primefaces

gha_language: Java

repo_name: primefaces/primefaces


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "Deep Reinforcement Learning for Portfolio Management"
subtitle: ""
summary: "This is a course project done in Fall 2017 CSCI 599 Deep Learning and its Applications at USC."
authors: ["Chi Zhang", "Corey Chen", "Limian Zhang"]
tags: ["Deep Learning", "Reinforcement Learning",
"Portfolio Management", "Convolutional Neural Networks",
"Long Short-Term Memory"]
categories: []
date: 2017-11-22T12:26:16-08:00
lastmod: 2019-09-07T13:02:04-07:00
featured: false
draft: false
math: true

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: ""
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
---
{{% toc %}}

## Problem Formulation

In this project, we would like to manage portfolio by distributing our investment into a number of stocks based on the market. We define our environment similar to this paper [Jiang et al](https://arxiv.org/abs/1706.10059).

Concretely, we define $N$ to be the number of stocks we would like to invest.
Without losing generality, at initial timestamp, we assume our total investment volume is 1 dollar. We define `close/open relative price vector` as:
$$
\begin{equation}
y\_t=[1, \frac{v\_{1,t, close}}{v\_{1,t, open}}, \frac{v\_{2,t, close}}{v\_{2,t, open}},\cdots,\frac{v\_{N,t,close}}{v\_{N,t, open}}]
\end{equation}
$$
where $\frac{v\_{i, t, close}}{v\_{i, t, open}}$ is the `relative price` of stock $i$ at timestamp $t$.
Note $y[0]$ represents the relative price of cash, which is always 1. We define `portfolio weight vector` as:
$$
\begin{equation}
w\_t=[w\_{0,t}, w\_{1, t}, \cdots, w\_{N, t}]
\end{equation}
$$
where $w\_{i,t}$ represents the fraction of investment on stock $i$ at timestamp $t$ and
$\sum\_{i=0}^{N}w\_{i, t}=1$. Note that $w\_{0,t}$ represents the fraction of cash that we maintain. Then the profit after timestamp $T$ is:
$$
\begin{equation}
\label{profit}
p\_T=\prod\_{t=1}^{T}y\_t\cdot w\_{t-1}
\end{equation}
$$
where $w\_0=[1, 0, \cdots, 0]$. If we consider a trading cost factor $\mu$, then the trading cost of each timestamp is:
$$
\begin{equation}
{\mu}\_t=\mu\sum{|\frac{y\_t \odot w\_{t-1}}{y\_t \cdot w\_{t-1}} - w\_{t}|}
\end{equation}
$$
where $\odot$ is element-wise product. Then equation \ref{profit} becomes:
$$
\begin{equation}
\label{profit_mu}
p\_T=\prod\_{t=1}^{T}(1-\mu\_t) y\_t\cdot w\_{t-1}
\end{equation}
$$

### Key Assumptions and Goal

To model real world market trades, we make several assumptions to simplify the problems:

- We can get any information about the stocks before timestamp $t$ for stock $i$. e.g. The previous stock price, the news and tweets online.
- Our investment will not change how the market behaves.
- The way we calculate profit in equation \ref{profit} can be interpreted as: At timestamp $t$, we buy stocks according to the `portfolio weight vector` $w_{t-1}$ computed by history data at **open** price and sell all the stocks at **close** price. This may not be true in practice because you will not always be able to **buy/sell** the stock at **open/close** price.

The **goal** of portfolio management is to maximum $p\_T$ by choosing portfolio weight vector $w$ at each timestamp $t$ based on history stock information.

### MDP formulation
#### State and Action
We define state $s\_t$ as $o\_t$, where $o\_t$ is the obseration of timestamp $t$. As the time goes by, the impact of history data decreases. Thus, we only consider the history price and news in a fixed window length $W$. Hence,
$$ o\_t=[\vec{v\_{1,t}},\vec{v\_{2,t}},\cdots,\vec{v\_{N,t}}] $$
where
$\vec{v\_{i,t}} =\begin{bmatrix}v\_{i,t-W} \\\ v\_{i,t-W+1} \\\ \vdots \\\ v\_{i,t-1}\end{bmatrix}$
and $N$ is the number of stocks. The action $a\_{t}$ is just `portfolio weight vector` $w\_{t}$.
Note that this is a continuous state and action space problem.
We try to directly solve it in continuous space instead of using discretization in previous work [Du et al](http://cs229.stanford.edu/proj2009/LvDuZhai.pdf) and [Jin et al](http://cs229.stanford.edu/proj2016/report/JinElSaawy-PortfolioManagementusingReinforcementLearning-report.pdf).
Essentially, we want to train a policy network $\pi\_\theta(a\_t|o\_t)$.

#### State Transition
The underlining state evolution is determined by the market, which we don't have any control. What we can get is the observation state, which is the price. Since we will collect history price of various stocks, $o\_t$ is given by the dataset instead of $o\_{t-1}$.

#### Reward
Instead of having reward 0 at each timestamp and $p\_T$ at the end, we take logarithm of equation \ref{profit_mu}:
$$\log{p\_T}=\log{\prod\_{t=1}^{T}\mu\_t y\_t\cdot w\_{t-1}}=\sum\_{t=1}^{T}\log(\mu\_t y\_t\cdot w\_{t-1})$$
Thus, we have $\log(\mu\_t y\_t\cdot w\_{t-1})$ reward each timestamp, which avoids the sparsity of reward problem.

### Datasets
**Stocks used:**
We choose 16 target stocks from NASDAQ100 that we feel are representative of different sectors in the index fund. They include "AAPL", "ATVI", "CMCSA", "COST", "CSX", "DISH", "EA", "EBAY", "FB", "GOOGL", "HAS", "ILMN", "INTC", "MAR", "REGN" and "SBUX".\\
**Price Data:**
We collected history price of the stocks from 2012-08-13 to 2017-08-11. The price on each day contains open, high, low and close. We use 2012-08-13 to 2015-08-12 as training data and 2015-08-13 to 2017-08-11 as testing data.\\
**News Data:**
We gather all tweets referencing the stocks from 2016-03-28 to 2016-06-15.\\
**Additional Testing Data:**
As another form of backtesting, we randomly select 16 stocks from NASDAQ100 the network has never seen and test whether the network can generalize well.

## Methods
We mainly consider model-free approach in our project. First, we train a predictor given a fixed history window length $W$ of price and news.
With the predicted price, we can train a policy network $\pi\_{\theta}(a\_t|s\_t)$ to maximize our portofolio value at the end of the trading period.
Note that in practice, they are trained end-to-end instead of separately.

### Data Preprocessing
#### Numerical Data
Instead of using the raw open, high, low and close price, we normalize the history price as $(\frac{close}{open} - 1)\times scale$. There are two main advantages:

1. The history price are all in the same scale regardless of their actual price.
2. Since the final portfolio is determined by the close/open ratio of each timestamp, it serves as a better feature compared with raw price.

The `scale` factor is heuristically set to 100 in our experiments. For missing data, we pad all open, high, low, close as the close price of previous day.

#### News Data
The steps to proprocess the news data are:

1. First, we filter each tweets by the most frequenct 2000 words.
2. We pad each word with end of sentence mark to make them equally long.
3. We use a sequence of end of sentence mark to fill the missing days.

### Predictor Network
{{< figure src="predictor_cnn.pdf" title="CNN predictor based on numerical history" >}}
The rationale behind the CNN predictor is adpated from [Jiang et al](https://arxiv.org/abs/1706.10059). For each timeseries of each stock,
we use a $1\times3$ kernel to gather information in each window, then combine all the information to produce a single vector for each stock.
Note that these convolutional windows doesn't cover information across any two stocks.
{{< figure src="predictor_lstm.pdf" title="LSTM predictor based on numerical history" >}}
The LSTM predictor based on numerical history is very straight forward. Note that all the stocks share the same LSTM.
{{< figure src="predictor_lstm_news.pdf" title="LSTM predictor based on history of news" >}}
For news based approach, we try to predict the $\frac{close-open}{open}$ ratio. We use pretrained 50d-GloVe to initialize the embedding layer followed by a LSTM and a fully-connected layer.

### Policy Network
{{< figure src="actor.pdf" title="Policy Network" >}}
All the policy network follows the same topology with different predictors.

### Optimal Action and Imitation Learning
Suppose we know the stock price of tomorrow, we greedily choose the stock with the highest close/open ratio (taking into account trading cost of changing stocks),
buying as much as possible on the open and selling all at the close and it will yield the maximum portfolio value.

Given this fact, we can collect ground truth labels for each timestamp by choosing the optimal action. (e.g. $[0, 0, 1, \cdots, 0, 0]$,
the stock with highest close/open to be 1 and all the others to be 0) Then, we can train a policy network by imitating optimal action conditioned on the current observation of history prices $o_t$.

### Deep Deterministic Policy Gradient (DDPG)
{{< figure src="ddpg.png" title="Deep Deterministic Policy Gradient Algorithm [Lillicrap et al](https://arxiv.org/abs/1509.02971)" >}}
We try to directly learn a policy network $\pi\_{\theta}(a\_t|s\_t)$ by continuous action space reinforcement learning algorithm [Lillicrap et al](https://arxiv.org/abs/1509.02971).
We show the algorithm above. The configurations are:

- Actor Network: The same as policy network.
- Critic Network: A linear combination of actor network structure of state (observation) and action.
- Exploration noise: Ornstein-Uhlenbeck with zero mean, 0.3 sigma and 0.15 theta.
- For fairness, we train models with different settings in 500 episodes. Some of the models are not fully converged at that time though.

## Results
### Imitation Learning
{{< figure src="imitation_result.png" title="Results of trading on testing data using policy trained by imitation learning" >}}
The market value is obtained by equally distributing your investment to all the stocks. It turns out that smaller windows work better.
Larger window means larger models and it tends to overfit very quickly since the training data is just around 1000.

### DDPG
{{< figure src="ddpg_result.png" title="Results of trading on testing data using policy trained by DDPG" >}}
We find that LSTM predictor based models have better performance than the CNN predictor based models.
It is not surprising that smaller windows perform best because of the temporaral relationship among price in a short window.

### Imitation Learning vs DDPG
Generally, models trained by DDPG is better than models trained by imitation learning.
The difficulty of training good policy networks by imitation learning lies in the extreme tendency to overfit while DDPG doesn't suffer from this problem
because each episode during training is sampled from the whole training period with different starting date and lengths.

### Testing on Unseen Stocks
{{< figure src="unknow_stocks_performance.png" title="Results of trading on 16 unseen stocks using best two policies trained by imitation learning and DDPG" >}}
To see how the network generalizes, we choose another 16 unseen stocks including
'FOX', 'FISV', 'EXPE', 'FAST', 'ESRX', 'DLTR', 'CTSH', 'CSCO', 'QCOM', 'PCLN', 'CELG', 'AMGN', 'WFM',
'WDC', 'NVDA' and 'STX'. The result shows that these models generalizes pretty well and CNN-based predictor outperforms
LSTM-based predictor in both cases.

### Related Work
In [Du et al](http://cs229.stanford.edu/proj2009/LvDuZhai.pdf) and [Jin et al](http://cs229.stanford.edu/proj2016/report/JinElSaawy-PortfolioManagementusingReinforcementLearning-report.pdf),
the author proposes to use DQN to trade in 2 stocks market with discreted state and action space.
Their settings are far simpler than ours. In [Jiang et al](https://arxiv.org/abs/1706.10059), the author proposes to use Deterministic Policy Gradient (DPG) to trade in bitcoin market.
It's very hard to compare with them because of different dataset. But DDPG is strictly better than DPG in terms of performance and convergence time.

### Future Work
- Combine news based predictor with numerical base predictor and train on a larger dataset with finer timestamp end-to-end with policy network.
- Model ensemble: combine the result of models trained by DDPG and imitation learning.
- Online learning: automatic scrapper news and data each day, update the network and make the action.
- Instead of optimizing portfolio value, we consider risk aware portfolio by optimizing the sharpe ratio define as $\frac{\text{Mean}(r\_t)}{\text{Variance}(r\_t)}$, where $r\_t$ is the rate of return in the period.
  It turns out to be a very difficult problem since it is not a standard MDP anymore.

### Pretrained Network
Our [code](https://github.com/vermouth1992/drl-portfolio-management) containing pretrained network is open source on Github.


text:
# lunchbox
Version 1.0.0

An app to help Codefellow students pick lunch.

## Collaborators:
Cait Rowland

Ken Dickey

Matthew Johnson

## Installing/Getting Started

### Clone
* Clone this repo to your local machine using: https://github.com/Codefellows-Team-GET/lunchbox.git

### Setup
Run command in terminal:

$ npm install

This will install all necessary packages and dependencies

cd into folder

Run commmand in terminal:

## Developing
### Built with
* EJS
* Express
* Superagent
* MethodOverride
* Postgres

## Deployed App
https://codefellows-lunchbox.herokuapp.com/

## API references
* Yelp: https://www.yelp.com/developers/documentation/v3
* Mapbox: https://www.mapbox.com/

### Wireframe
https://docs.google.com/document/d/1hq4M_KtpNEvarGNVprkY8tf16XGHjn5DZIzww7HpR3g/edit?usp=sharing

### User Stories --

View Local Restaurants - large
As a user, I would like to view local restaurants around campus.
	Feature Tasks:
User can view a list of restaurants around Code Fellows from an API (Yelp)
User will have the ability to click to restaurant website to view additional info
User will be able to get directions to a restaurant
	Acceptance Tasks:
Ensure that the user is presented with all restaurant options in the area

Add Details - large
As a user, I would like to add details about local restaurants around campus including time to walk there, how long it took to get food and price.
	Feature Tasks:
Show a form that allows user to input walk time, wait time and price
Allow user to save the details of selected restaurant
	Acceptance Tasks:
Ensure that user is able to compile relevant info over time to refer back to

View Detailed List - small
As a user, I would like to see a list of all the restaurants where details have been added
	Feature Tasks:
Render a full list of restaurants that have been added to a database with details
	Acceptance Tasks:
Ensure that the user is able to review a list of restaurants that have already been reviewed
Add a like feature
As a user, I would like the ability to favorite restaurants
	Feature Tasks:
Add a like button to restaurant options
Saved ‘liked’ restaurant to the database
	Acceptance Tasks:
Ensure that user is able to find their favorite restaurants easily
Update Details - medium
As a user, I would like to update details about each restaurant when needed
	Feature Tasks:
A button that takes the user to page to update details
Shows form with current details populated, but ability to write in new info
	Acceptance Tasks:
Allows user to keep details up to date

Delete Restaurants -small
As a user, I would like to delete restaurants from the list
	Feature Tasks:
User can delete restaurants from list/database
	Acceptance Tasks:
Ensures that user can keep list up to date with restaurants that are open/haven’t moved

## Domain Modeling
https://docs.google.com/document/d/1yn9zz5VLHTQgVthCnbmCPVSj_a-IIGrYkvllDjHMiT0/edit?usp=sharing

## Database Entity-Relationship-Diagram
https://docs.google.com/document/d/1LNPzYVGHxVjAHakoFidQAQtXeGmfxHrpKE9Rh8MJuEQ/edit?usp=sharing

repository: Codefellows-Team-GET/lunchbox

branch_name: refs/heads/development

gha_language: HTML

repo_name: Codefellows-Team-GET/lunchbox


text:
No more.

This is my opinionated template for starting a new Rails 4.2 application with Ruby 2.1.
I'll change things up as my opinions change.

Instructions TBD. Will include:
* If you want to start on the GitHub side (recommended),
  [fork the repo and clone the new repo](https://guides.github.com/activities/forking/)
* If not
  * `git clone https://github.com/andycox/rails-template.git <your-app-directory>`
  * `git remote rename origin upstream`
  * To share your code later, create a new remote repository (on GitHub or elsewhere)
  * Follow the directions to push an existing repository from the command line
* Customize your new application
  * Remove or modify `LICENSE` as desired
  * `script/bootstrap`
    * Replace `rails-template-` with your application
    * Pick a port in `script/bootstrap`
  * `script/cibuild`
    * Replace `rails_template_` with your application
  * `config/database.yml`
    * Replace `rails[_-]template[_-]` with your application
    * Replace `RAILS_TEMPLATE_` with your application
  * `config/application.rb`
    * Replace `RailsTemplate` with your application in CamelCase
  * `app/views/layouts/application.html.erb`
    * Change default application title if desired
  * `config/initializers/session_store.rb`
    * Replace `rails-template` with your application q
  * **TODO: AUTOMATE THESE**
* Get your PG running with the right permissions (Homebrew on OS X)
* `script/bootstrap`
* Code away!

repository: andycox/rails-template

gha_language: Ruby

repo_name: andycox/rails-template


text:
# Real-Time Vehicle License Plate Recognition For Android

Detection and recognition of vehicle license plate done in real-time.

This is a simple mobile app version of the [vrpdr](https://github.com/andreybicalho/vrpdr/tree/emnist-ocr) project for Android devices.

![screenshot](screenshot_vrpdrapp.jpg)

# Requirements

* Android SDK 28
* OpenCV 3.4.6
* PyTorch 1.4.0


text:
# livejournal-ips

Chrome extension to show geo-ip information on Livejournal pages

Usage:

1. clone this directory to local machine;
2. in Chrome browser, go to Extensions page and enable Developer Mode (checkbox in top right corner);
3. click "Load unpacked extension" button, select downloaded directory - installation complete;
4. visit livejournal.com to see user comments (in your own journal). Geoip info will be appended with some network related delay.

repository: orleanz/livejournal-ips

repo_name: orleanz/livejournal-ips


text:
# Idempotent Ubuntu Setup for 20.04 / amd64

A collection of (more or less) idempotent shell scripts for easy setting up a dev machine on 20.04.
Theses scripts fulfill our needs, YMMV.
They come with no warranties attached.

## Idempotency

All scripts use marker files to check if they already ran, so they should only run again if the previous attempt didn't succeed.
You can set the location of these files, they will contain the date of the successful run.
Most scripts don't clean up if they fail so idempotency isn't guaranteed.

## How to use it

See `setup-example.sh` for how to use it.
Just add the scripts you want the the variable `SCRIPTS`.
The name of the script is its filename without its extension.
You can override default settings, see a script for the available/needed environment variables.

## License
MIT. See LICENSE.

repository: netzgut/ubuntu-setup

repo_name: netzgut/ubuntu-setup


text:
# Bucket Sort

#### Algorithms

1. Create a bucket for a interval of values.

2. Sort items in each bucket using Collections.sort

3. Iterate all buckets to get sorted array.

Time Complexity: O(n + m + m * n/m(log(n/m)))  m is num of buckets

Space Complexity: O(m + n)

repository: weiranfu/algorithms

repo_name: weiranfu/algorithms


text:
+++
# title = "Example Page"
# title = "Experiences"
  title = ""

date = 2018-09-09T00:00:00
# lastmod = 2018-09-09T00:00:00

draft = false  # Is this a draft? true/false
# toc = true  # Show table of contents? true/false
toc = false  # Show table of contents? true/false
type = "docs"  # Do not modify.

# Add menu entry to sidebar.
# linktitle = "Example Page"
linktitle = "Research"
[menu.tutorial]
  # parent = "Example Topic"
  # parent = "Experiences"
  parent = ""
  weight = 1
+++

<!-- In this tutorial, I'll share my top 10 tips for getting started with Academic: -->

# Research Experiences
------------------------
### Graduate Student Researcher: University of California, Santa Cruz
- Professor [Nirvikar Singh](https://people.ucsc.edu/~boxjenk/) ([UCSC](https://www.ucsc.edu/))

### Doctoral Internship: International Monetary Fund (IMF)
- Institute for Capacity Development (ICD): Asian and African Division
- With [Nicholas Spatafora](https://sites.google.com/site/nspatafora/) ([IMF](https://www.imf.org/external/index.htm)) & [Seung Mo Choi](https://sites.google.com/site/seungmochoi/) ([IMF](https://www.imf.org/external/index.htm))


text:
---
title: tcp_server
type: input
status: deprecated
---

<!--
     THIS FILE IS AUTOGENERATED!

     To make changes please edit the contents of:
     lib/input/tcp_server.go
-->

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

:::warning DEPRECATED
This component is deprecated and will be removed in the next major version release. Please consider moving onto [alternative components](#alternatives).
:::

```yaml
# Config fields, showing default values
input:
  label: ""
  tcp_server:
    address: <IP_ADDRESS>:0
    multipart: false
    max_buffer: 1000000
    delimiter: ""
```

Creates a server that receives messages over TCP. Each connection is parsed as a
continuous stream of line delimited messages.

If multipart is set to false each line of data is read as a separate message. If
multipart is set to true each line is read as a message part, and an empty line
indicates the end of a message.

If the delimiter field is left empty then line feed (\n) is used.

The field `max_buffer` specifies the maximum amount of memory to
allocate _per connection_ for buffering lines of data. If a line of data from a
connection exceeds this value then the connection will be closed.

## Fields

### `address`

Sorry! This field is missing documentation.

Type: `string`
Default: `"<IP_ADDRESS>:0"`

### `multipart`

Sorry! This field is missing documentation.

Type: `bool`
Default: `false`

### `max_buffer`

Sorry! This field is missing documentation.

Type: `int`
Default: `1000000`

### `delimiter`

Sorry! This field is missing documentation.

Type: `string`
Default: `""`


text:
# Microsoft Quantum Development Kit Samples #

 [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Microsoft/Quantum/master)

These samples demonstrate the use of the Quantum Development Kit for a variety of different quantum computing tasks.

Each sample is self-contained in a folder, and demonstrates how to use Q# to develop quantum applications.

A small number of the samples have additional installation requirements beyond those for the rest of the Quantum Development Kit.
These are noted in the README.md files for each sample, along with complete installation instructions.

You can find instructions on how to install the Quantum Development Kit in [our online documentation](https://docs.microsoft.com/quantum/install-guide/), which also includes
an introduction to [quantum programming concepts](https://docs.microsoft.com/en-us/quantum/concepts/).
A [Docker](https://docs.docker.com/install/) image definition is also provided for your convenience, see below for instructions on how to build and use it.

## Getting started ##

If you're new to quantum or to the Quantum Development Kit, we recommend starting with the [Getting Started samples](./samples/getting-started/).

## Going further ##

As you go further with quantum development, we provide several different categories of samples for you to explore:

- **[Algorithms](./samples/algorithms)**:
  These samples demonstrate various quantum algorithms, such as database search and integer factorization.
- **[Arithmetic](./samples/arithmetic)**:
  These samples show how to coherently transform arithmetic data.
- **[Characterization](./samples/characterization)**:
  These samples demonstrate how to learn properties of quantum systems from classical data.
- **[Chemistry](./samples/chemistry)**:
- **[Diagnostics](./samples/diagnostics)**:
  These samples show how to diagnose and test Q# applications.
- **[Error Correction](./samples/error-correction)**:
  These samples show how to work with quantum error correcting codes in Q# programs.
- **[Interoperability](./samples/interoperability)**:
  These samples show how to use Q# with different host languages.
- **[Numerics](./samples/numerics)**:
  The samples in this folder show how to use the numerics library.
- **[Runtime](./samples/runtime)**:
  These samples show how to work with the Q# simulation runtime.
- **[Simulation](./samples/simulation)**:
  These samples show how to simulate evolution under different Hamiltonians.

We also encourage taking a look at the [unit tests](./samples/tests) used to check the correctness of the Quantum Development Kit samples.

## Docker image

You can use the included [Dockerfile](./Dockerfile) to create a docker image
with all the necessary libraries to use the Quantum Development Kit to build
quantum applications in C#, Python or Jupyter.

Once you have installed [Docker](https://docs.docker.com/install/), you can
use the following commands to get you started:

To build the docker image and tag it `iqsharp`:
```sh
docker build -t iqsharp .
```

To run the image in the container named `iqsharp-container` with interactive command-line and
redirect container port 8888 to local port 8888 (needed to run jupyter):
```sh
docker run -it --name iqsharp-container -p 8888:8888 iqsharp /bin/bash
```

From the corresponding container command line, you can run the C# version of the Teleportation sample using:
```sh
cd ~/samples/getting-started/teleportation && dotnet run
```

Similarly, you can run the Python version of the Teleportation sample using:
```sh
cd ~/samples/getting-started/teleportation && python host.py
```

Finally, to start jupyter notebook within the image for the Teleportation sample, use:
```sh
cd ~/samples/getting-started/teleportation && jupyter notebook --ip=<IP_ADDRESS> --no-browser
```

Once Jupyter has started, you can open in your browser the Teleportation notebook (you
will need a token generated by jupyter when it started on the previous step):

> http://localhost:8888/notebooks/Notebook.ipynb

Once you're done, to remove container named `iqsharp-container`:
```sh
docker rm --force iqsharp-container
```

repository: cgranade/Quantum

repo_name: cgranade/Quantum


text:
# fastbook setup code

This code is a modified version of the code installed with you install fastbook

`pip install fastbook`

For more information, refer to the [original repository](https://github.com/fastai/fastbook) by fastai or the [book](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527).


text:
---
layout: song
has_video_lesson: true
title: Guitar lesson for "Audition (The Fools Who Dream)" from La La Land -- playsongnotes.com
song_title:  Audition (The Fools Who Dream)
artist: La La Land
year: 2016
categories: guitar
---

## Video lesson

<iframe width="560" height="315" src="https://www.youtube.com/embed/h_Ac0xIfsII?showinfo=0" frameborder="0" allowfullscreen></iframe>

## Chord progressions

### Capo 3 "simple" version

Verse:

    D  . . A . . G  . . Gm . .
    Bm . . D . . Em . . A7 . .

Chorus:

    Em . . A7 . . D . . Dmaj7 . .  x4

Bridge:

    Bm . . F# . . G . . G . .
    Bm . . F# . . G . . G . .
    Em . . A7 . . D . . Dmaj7 . .
    Em . . A7 . . D . . Dmaj7 . .

Outro:

    D . . D . . B7 . . B7 . .
    D . . D . . B7 . . B7 . .
    G . . G . . Gm . . Gm . .
    D

### No capo version

Coming soon! Hint: it's in the key of F.

## Lyrics

    Barefoot, she smiled... leapt without looking
    And tumbled into----- the Seine
    The water was freezing, she spent a month sneezing
    But said she would do it  again

        Here's to the ones who dream
        Foolish as they may seem
        Here's to the hearts that ache
        Here's to the mess we make

    She captured a feeling, sky with no ceiling
    The sunset inside a frame
    She lived in her liquor, and died with a flicker
    I'll always remember the flame

        Here's to the ones who dream
        Foolish as they may seem
        Here's to the hearts that ache
        Here's to the mess we make

            She told me...
            A bit of madness is key
            To give us new colors to see
            Who knows where it will lead us?
            And that's why they need us

    So bring on the rebels, the ripples from pebbles
    The painters, and poets, and plays

        And here's to the fools who dream
        Crazy as they may seem
        Here's to the hearts that break
        Here's to the mess we make

                I trace it all back to then
                Her, and the snow, and the Seine
                Smiling through it
                She said she'd do it again

## Stay tuned for more!

I'll be updating this lesson in the next few weeks, but in the meantime I hope this helps. Let me know what questions you have! Have a great day.

url: https://raw.githubusercontent.com/madflow/playsongnotes/9b2b47005263e54a3ab475c73b061c8332231336/_songs/[La La Land] Audition (The Fools Who Dream).md

repository: madflow/playsongnotes

repo_name: madflow/playsongnotes


text:
VisualNYC

Interactive heatmap of New York City featuring data visualizations of crime statistics based on NYC open data.

---

---

**Capstone Presentation**: [https://youtu.be/wW63u2Y1gsk](https://youtu.be/wW63u2Y1gsk)

---

Description

---

![](./visualnyc-init.png)

_VisualNYC grab's user's current day and time and automatically filters into a two hour window from your current time._

---

**Filter**: Highlighted borough buttons on top left allow for easy switch in borough view. Default view is Manhattan.

![Map displaying criminal activity in 2018 on Tuesdays between 12 and 2 p.m.](./VisualNYC.png)

Map can be adjusted to display only crimes by: **1**. time of day, **2**. day of the week, **3**. crime class, **4**. crime category, etc.

---

![](./visualnyc-search.png)

**Search**: Need to find a specific place, restaurant, or meet up spot? Use our search feature to pinpoint your location in any borough in Greater NYC Area. Geolocation available.

---

![](visualnyc-zoomed.png)

**Zoom**: As you zoom in the heatmap will continue to update and render to show you crime density based on your location and crime filter settings.

---

![](visualnyc-pinpoint.png)

**View** Once zoomed in enough, visualNYC will transform the user's view into a pin point map with color and radius indicators based on the type of crime and class of crime.

User can click on a pinpoint to see specific crime related details such as severity, location, date and time of crime occurence.

**Play Feature**: By clicking the blue play button next to Time of Day, user can see an automatic progression of crime data over time in both heat map view and pinpoint view.

---

![](visualnyc-layer.png)

_**Don't like a specfic layer or view?**_ Filter through our layers, and choose your best eye candy.

---

### Future Endeavors - 3D data visualization with custom csv, json, geojson files.

![](./visualnyc-3dout.png)

![](./visualnyc-3din.png)

---

Data is based off of NYC historical crime from beginning of 2018 until end of 2018.

This project will help users decide if their is a risk of crime when moving to or visiting a location and answer the age old question, is this area safe to be in?

_Example:_

1.  Is it safe to walk in a neighborhood at 1am?
2.  Do I want to move to this neighborhood?
3.  Should I get an Uber or walk to the closest subway stop?
4.  Is this neighborhood safe to let my kid's go trick or treating?

## Tech Stack

1.  ArcGIS
2.  React.js
3.  Redux.js
4.  Node.js
5.  Travis
6.  Git
7.  GitHub
8.  Heroku

## Dev Team

* Ricky Lau ([LinkedIn](https://www.linkedin.com/in/rickylaudev) | [GitHub](https://github.com/erick805))
* Michael Siciliano ([LinkedIn](https://www.linkedin.com/in/michael-siciliano-1904/) | [GitHub](https://github.com/msicil))
* Justin Kichler ([LinkedIn](https://www.linkedin.com/in/justinkichler/) | [GitHub](https://github.com/jkichler))
* Alexander Mann ([LinkedIn](https://www.linkedin.com/in/alexandermann2015/) | [GitHub](https://github.com/AlexanderMann2015))


text:
# Code

Inherits from: [Item](../Base/Item.md)

## Description

A language independent set of letters, numbers of symbols that represent a concept whose meaning is described in a natural language.

## Attributes

### Inherited

**id** (*string*): The unique identifier of the object.

**uri** (*Url*): Universal resource identifiers that may or may not be resolvable.

**urn** (*Urn*): Universal resource name - this is for use in registries: all registered objects have a urn.

## References

### Inherited

**child** ([Code](Code.md) - 0..*): A child of this Code

**name** ([InternationalString](../Base/InternationalString.md) - 1): A multi-lingual name is provided by this role via the InternationalString class.

**description** ([InternationalString](../Base/InternationalString.md) - 0..1): A multi-lingual description is provided by this role via the InternationalString class.

**contains** ([Annotation](../Base/Annotation.md) - 0..*): No description

## Referenced By

[Codelist](Codelist.md) (as items)

[Code](Code.md) (as child)

[HierarchicalCode](HierarchicalCode.md) (as code)

[CodeMap](../Mapping/CodeMap.md) (as source)

[CodeMap](../Mapping/CodeMap.md) (as target)

[CodedAttributeValue](../DataStructure/CodedAttributeValue.md) (as value)

[CodedKeyValue](../DataStructure/CodedKeyValue.md) (as value)

[CodedObservation](../DataStructure/CodedObservation.md) (as value)

[EnumeratedAttributeValue](../MetadataStructure/EnumeratedAttributeValue.md) (as value)

[SourceCode](../Mapping/SourceCode.md) (as code)

[TargetCode](../Mapping/TargetCode.md) (as code)


text:
---
layout: home
feature_row:
  - title: Configurable, Safe
    excerpt: "Spinnaker helps codify the process of safely and reliably deploying artifacts to the cloud, leveraging industry best practices out-of-the-box.\n\n_**Configure once, run anytime.**_"
  - title: Multi-cloud
    excerpt: "Deploy across multiple cloud providers: AWS EC2, Google Compute Engine, Microsoft Azure, OpenStack and Cloud Foundry.\n\n_**Deploy anywhere, manage centrally.**_"
  - title: Vibrant Community
    excerpt: "Strong community engagement, and contributions from partners including: Netflix, Google, Microsoft, Pivotal, Veritas, Target, Schibsted and Kenzan.\n\n_**Pull requests are gladly accepted.**_"
---

# Deliver your software changes to production with high velocity and confidence

Spinnaker is an open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence.

{% include feature_row %}

## Supported Cloud Providers


text:
---
title: 'Embed stories'
---

<YouTubeCallout id="2tqRpBcV8ug" title="Your Storybook EVERYWHERE | Embeds with Chromatic" />

Embed stories to showcase your work to teammates and the developer community at large. In order to use embeds, your Storybook must be published and publicly accessible.

Storybook supports `<iframe>` embeds out of the box. If you use Chromatic to [publish Storybook](./publish-storybook.md#publish-storybook-with-chromatic), you can also embed stories in Notion, Medium, and countless other platforms that support the oEmbed standard.

## Embed a story with the toolbar

Embed a story with the toolbar, and paste the published story URL. For example:

```js
// oEmbed
https://5ccbc373887ca40020446347-wtuhidckxo.chromatic.com/?path=/story/shadowboxcta--default

// iframe embed
<iframe
  src="https://5ccbc373887ca40020446347-wtuhidckxo.chromatic.com/?path=/story/shadowboxcta--default&full=1&shortcuts=false&singleStory=true"
  width="800"
  height="260"
></iframe>
```

## Embed a story without the toolbar

To embed a plain story without Storybook's toolbar, click the "open canvas in new tab" icon in the top-right corner of Storybook to get the canvas URL. For example:

```js
// oEmbed
https://5ccbc373887ca40020446347-wtuhidckxo.chromatic.com/iframe.html?id=/story/shadowboxcta--default&viewMode=story

// iframe embed
 <iframe
  src="https://5ccbc373887ca40020446347-wtuhidckxo.chromatic.com/iframe.html?id=shadowboxcta--default&viewMode=story&shortcuts=false&singleStory=true"
  width="800"
  height="200"
></iframe>
```

## Embed documentation

Embed a documentation page by replacing `viewMode=story` with the uniquely auto-generated documentation entry for the story.

```js
// oEmbed
https://5ccbc373887ca40020446347-wtuhidckxo.chromatic.com/iframe.html?id=shadowboxcta--docs&viewMode=docs&shortcuts=false&singleStory=true

// iframe embed
 <iframe
  src="https://5ccbc373887ca40020446347-wtuhidckxo.chromatic.com/iframe.html?id=shadowboxcta--docs&viewMode=docs&shortcuts=false&singleStory=true"
  width="800"
  height="400"
></iframe>
```

## Embed stories on other platforms

Every platform has different levels of embed support. Check the documentation of your service to see how they recommend embedding external content.

How to embed in Medium

Paste the Storybook URL into your Medium article, then press Enter. The embed will automatically resize to fit the story's height.

While editing an article, Medium renders all embeds non-interactive. Once your article is published, it will become interactive. [Preview a demo on Medium](https://medium.com/@ghengeveld/embedding-storybook-on-medium-ce8a280c03ad).

<video autoPlay muted playsInline loop>
  <source
    src="embed-medium-optimized.mp4"
    type="video/mp4"
  />
</video>

How to embed in Notion

In your Notion document, type /embed, press Enter, and paste the story URL as the embed link. You can resize the embed as necessary.

![Embed Notion](./embed-notion.png)

How to embed in Ghost

Type `/html` in your Ghost post, press Enter and paste the iframe URL. You can resize the embed via the width and height properties as required.

![Embed Ghost](./embed-ghost.png)

repository: storybookjs/storybook

branch_name: refs/heads/next

gha_language: TypeScript

repo_name: storybookjs/storybook


text:
![contributor shield](https://img.shields.io/badge/Contributors-1-%23c24d89?style=for-the-badge)
![license shield](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)

# pig-game

A simple dice game built to practice DOM manipulation. It sllows to roll dice, switch players, hold current score, start new game. The game uses prewritten CSS styles and HTML. It was written as a learning project for studying purposes through the Udemy course - The Complete JavaScript course by Jonas Schmedtman.

## Technologies

-- HTML, CSS, JavaScript

## Contributors

## Aknowledgements
Jonas Shcmedtman

repository: julia-ediamond/pig-game

repo_name: julia-ediamond/pig-game


text:
# What is this?

This is a UTD dissertation template.
To see how the resulting PDF looks, [click here](http://bmccary.github.io/utd-dissertation-template/utd-paper.pdf). Feel free to use the template according to the terms in the LICENSE file.

# How do I use this?

1. Download the [template](https://github.com/bmccary/utd-dissertation-template/archive/master.zip).
2. Unpack the template zip on a computer with TeX (I use linux, but MiKTeX on Windows works fine).
3. Start editing.
4. Each file contains comments which describe its usage.

# Notes

1. This template encodes the exact format requirements (page geometries, line spacings, and punctuation) of the graduate office as of 2012-04-10.
2. This template requires a recent version of TeX. I use PDFLaTeX on a recent linux distribution.
3. Please inform me if you find errors in the formatting. I intend to keep this template up-to-date with respect to the graduate office's requirements.
3. If you have a feature request then please contact me. For example, if you need an example of doing X (for some interesting task X) in the template then please let me know.
4. This template assumes that you are using PDFLaTeX (or something very similar).
5. MiKTeX uses PDFLaTeX, so MiKTeX is OK. However, you MUST make sure you are compling directly to PDF, not to DVI and then converting to PDF.

```
    Yes: TeX -> PDF

    No : TeX -> DVI -> PDF
    No : TeX -> PS  -> PDF
```

  The reason for this requirement is that page geometries (especially margins) get mangled in the intermediate steps.

6. To compile your dissertation in linux, just type make at the command line.

```
     $ make
```
7. You will have to study the structure of this template in order to understand it. Comments in the individual files should help you along your way.

repository: bmccary/utd-dissertation-template

gha_language: TeX

repo_name: bmccary/utd-dissertation-template


text:
# spawn-default-shell

> Spawn shell command with platform default shell

[![Build Status](https://travis-ci.org/kimmobrunfeldt/spawn-default-shell.svg?branch=master)](https://travis-ci.org/kimmobrunfeldt/spawn-default-shell) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/kimmobrunfeldt/spawn-default-shell?branch=master&svg=true)](https://ci.appveyor.com/project/kimmobrunfeldt/spawn-default-shell) *master branch status*

[![NPM Badge](https://nodei.co/npm/spawn-default-shell.png?downloads=true)](https://www.npmjs.com/package/spawn-default-shell)

Like `child_process.spawn` with `shell: true` option but a bit more
convenient and customizable. You can just pass the command as a string,
and it will be executed in the platform default shell. Used in [concurrently](https://github.com/kimmobrunfeldt/concurrently).

```js
// If we are in Linux / Mac, this will work
const defaultShell = require('spawn-default-shell');
const child = defaultShell.spawn('cat src/index.js | grep function');
```

Platform | Command
---------|----------
Windows  | `cmd.exe /c "..."`. If `COMSPEC` env variable is defined, it is used as shell path.
Mac      | `/bin/bash -c "..."`
Linux    | `/bin/sh -c "..."`

You can always override the shell path by defining these two environment variables:

* `SHELL=/bin/zsh`
* `SHELL_EXECUTE_FLAG=-c`

## Install

```bash
npm install spawn-default-shell --save
```

## API

### .spawn(command, [opts])

Spawns a new process of the platform default shell using the given command.

For all options, see [child_process](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)
documentation.

## License

MIT

repository: fractor/nntailoring

repo_name: fractor/nntailoring


text:
---
layout: default
---

# 1998-01-20 - Ocean going cities

## Header Data

From: Robert Hettinga<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 134d5664461a0283f63f1afe6299c9aee1aae6c2adb4f91bfd701a927596e999

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-01-20 04:11:36 UTC

Raw Date: Tue, 20 Jan 1998 12:11:36 +0800

## Raw message

```
{% raw  %}From: Robert Hettinga<EMAIL_ADDRESS>Date: Tue, 20 Jan 1998 12:11:36 +0800
To<EMAIL_ADDRESS>Subject: Ocean going cities
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

--- begin forwarded text

Date: Fri, 16 Jan 1998 16:32:41 -0500
From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Subject: Ocean going cities

Just read in an architecture rag called "Metropolis" about floating
cities for the rich!  I guess being a nomad is becoming chic.

Anyways, the two ships are

ResidenSea   958ft long with 250  1100-3200 sq ft homes ranging from
$1.2-$4.3 million each.  driving range putting green 2 pools, helipad
gardens, retractable marina.  According to the mag, this one looks like it
will get built with construction to start soon.

Freedom Ship  4320 ft  25 stories  for 65,000 people starting at
$93,000  includes library school bank hotel hospital, light
manufacturing and 2 landing strips!!!  How Stephensonesque.

I'll be very depressed if the commercial folks do this before the
hackers.  Now, I wonder where I put that decommissioned aircraft
carrier?   :-)

						Thad Starner
						MIT Media Laboratory
						Wearable Computing Project

--- end forwarded text

-----------------
Robert Hettinga (rah@shipwright.com), Philodox
e$, 44 Farquhar Street, Boston, MA 02131 USA
"... however it may deserve respect for its usefulness and antiquity,
[predicting the end of the world] has not been found agreeable to
experience." -- Edward Gibbon, 'Decline and Fall of the Roman Empire'
The e$ Home Page: http://www.shipwright.com/
Ask me about FC98 in Anguilla!: <http://www.fc98.ai/>

{% endraw %}
```

## Thread

+ Return to [January 1998](/archive/1998/01)

+ Return to "[Christian Goetze <cg@miaow.com>](/authors/christian_goetze_cg_at_miaow_com_)"
+ Return to "[Robert Hettinga <rah@shipwright.com>](/authors/robert_hettinga_rah_at_shipwright_com_)"

+ 1998-01-20 (Tue, 20 Jan 1998 12:11:36 +0800) - Ocean going cities - _Robert Hettinga<EMAIL_ADDRESS>  + 1998-01-20 (Tue, 20 Jan 1998 13:58:24 +0800) - [Re: Ocean going cities](/archive/1998/01/4c46bf2a3cbaf92c6547b95dd90c5084a683cff923394747dfbb3b029e7a1b3d) - _Christian Goetze<EMAIL_ADDRESS>


text:
# report-portal-report
Generate reports from Report Portal data

# To generate
Before generating, please look at the /src/main/resources/default.properties to change the information accordingly

Run `./gradlew run` or `TERM=cygwin ./gradlew run`

# Output file
The report file is `output/FeaturesResult.xlsx`

repository: thuongdv/report-portal-report

repo_name: thuongdv/report-portal-report


text:
# zerod

Software broadband access server (BBRAS)

### Features

- User sessions AAA (Authentication, Authorization and Accounting)
- Rich set of various rules for user service customization
  - Firewall (restrict or grant access to specific ports)
  - Forwarding rules (as DNAT)
  - Deferred rules
  - Bandwidth limiting rules
- Realtime traffic monitoring
- Dynamic ARP inspection
- IP source verify
- HTTP URL blacklisting
- Virtual instances

### Build instructions

You need the following libraries installed:
- [cmake](http://www.cmake.org/), >= 2.8, cross-platform, open-source build system
- [libevent](http://libevent.org/), >= 2.0, event-based network I/O library
- [libconfig](https://github.com/hyperrealm/libconfig), >= 1.4, configuration management library
- [netmap](https://github.com/luigirizzo/netmap), >= 20131019, fast network packet I/O framework
- [libfreeradius-client](https://github.com/FreeRADIUS/freeradius-client), >=1.7, framework and library for writing RADIUS Clients
- [libbson](https://github.com/mongodb/libbson), >= 1.0, building, parsing, and iterating BSON documents
- [python](https://www.python.org/), >= 3.0, interactive high-level object-oriented language
- [pymongo](https://github.com/mongodb/mongo-python-driver), BSON implementation for python
- [libpcap](https://github.com/the-tcpdump-group/libpcap), the LIBpcap interface to various kernel packet capture mechanism
- [libpcre](http://www.pcre.org/), Perl Compatible Regular Expressions
- [jemalloc](https://github.com/jemalloc/jemalloc), >= 3.0, general purpose malloc(3) implementation

Build using cmake:
```bash
mkdir build
cd build
cmake ..
make
```

repository: kaowul/zerod

repo_name: kaowul/zerod


text:
# GithubSearch
This project the  users can enter a GitHub username into a form, submit it, and see names and descriptions of that person's public repositories. A person can also look for repositories.

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.1.2.

## Built With

- HTML
- CSS
- Bootstrap
- Javascript
- Typescript
- Angular CLI version 12.1.2

## Live Demo

[Live Demo Link]()

## Getting Started

To get a local copy, follow these simple example steps.

### Prerequisites

A computer with a working and up to date web browser.

### Setup

- Clone the repository to your folder of choice using Git (or just download all the files)

```
$ git clone https://github.com/Barrack-coder/Github-search.git

```

- Open the index.html file (in the root folder) and the website should show up.

## Author

👤 **Author**

- Barrack Odhiambo

- GitHub:[Barrack-coder](https://github.com/Barrack-coder)
- twitter: [@Barry Lemayian](https://twitter.com/Barrylemayian)
- Email<EMAIL_ADDRESS>

## 🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](ISSUE_TEMPLATE/feature_request.md).

## Acknowledgments

- I am appreciating Moringa school for the skills and opportunity to learn :)

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

## Show your support

Give a ⭐ if you like this project!

## 📝 License
This project is [MIT](LICENSE) licensed.

repository: Barrack-coder/Github-search

repo_name: Barrack-coder/Github-search


text:
#     Github

Delete a self-hosted runner group from an enterprise

Deletes a self-hosted runner group for an enterprise.

You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.

Method: Delete

OperationID: enterprise-admin/delete-self-hosted-runner-group-from-enterprise

EndPoint:

/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}

repository: Ayehu/custom-activities

gha_language: C#

repo_name: Ayehu/custom-activities


text:
Factory pattern falls under creational design pattern which solves the problem of creating the objects without
specifying their concrete classes.

It provides a way to hide the creation logic of the instance being created. Client interacts with the factory class & tells the kind of instance that
needs to be created. The factory class interact with the correct concrete class and returns the proper instance to the client.

In this example program,

1.  we have the `Mobile` interface which exposes all the methods that client needs related to the mobile.
2.  `mobile` struct that implements that interface.
3.  Two concrete classes `Android` & `IOS` both embeds `mobile` type, so indirectly implements all the methods belongs to the `Mobile` interface.
4.  we have `getMobile` struct which creates instance based on the input mobile device (either android or iOS).

![UML diagram](./factory.png)

repository: sibis/design-patterns-golang

repo_name: sibis/design-patterns-golang


text:
# IBM Watson Developer Cloud Android SDK [![Build Status](https://travis-ci.org/watson-developer-cloud/android-sdk.svg?branch=master)](https://travis-ci.org/watson-developer-cloud/android-sdk)

Android client library to assist with using the [Watson Developer Cloud][wdc] services, a collection of REST
APIs and SDKs that use cognitive computing to solve complex problems.

## Table of Contents

  * [Installation](#installation)
    * [Gradle](#gradle)
  * [Usage](#usage)
  * [Service Credentials](#service-credentials)
    * [Getting the Credentials](#getting-the-credentials)
    * [Adding the Credentials](#adding-the-credentials)
  * [Questions](#questions)
  * [Examples](#examples)
  * [Testing](#testing)
  * [License](#license)
  * [Contributing](#contributing)

## Installation

##### Gradle

```gradle
'com.ibm.watson.developer_cloud:android-sdk:0.4.2'
```

##### AAR

Download the aar [here][aar].

-----
The minimum supported Android API level is 19. Now, you are ready to see some [examples](https://github.com/watson-developer-cloud/android-sdk/tree/master/example).

## Usage

The examples below assume that you already have service credentials. If not, you will have to create a service in [Bluemix][bluemix].

## Service Credentials

#### Getting the Credentials

You will need the `username` and `password` (`api_key` for AlchemyAPI) credentials, as well as the `url` for each service. Service credentials are different from your Bluemix account username and password.

To get your service credentials, follow these steps:

 1. Log in to Bluemix at [https://console.bluemix.net](https://console.bluemix.net).

 1. Create an instance of the service:
     1. In the Bluemix **Catalog**, select the service you want to use.
     1. Under **Add Service**, type a unique name for the service instance in the Service name field. For example, type `my-service-name`. Leave the default values for the other options.
     1. Click **Create**.

 1. Copy your credentials:
     1. On the left side of the page, click **Service Credentials** to view your service credentials.
     1. Copy `username`, `password`(`api_key` for AlchemyAPI), and `url`.

#### Adding the Credentials

The credentials should be added to the `example/res/values/credentials.xml` file shown below.

```xml
<resources>
  <!-- Paste Language Translator information here -->
  <string name="language_translator_username"></string>
  <string name="language_translator_password"></string>
  <string name="language_translator_url"></string>

  <!-- Paste Speech to Text information here -->
  <string name="speech_text_username"></string>
  <string name="speech_text_password"></string>
  <string name="speech_text_url"></string>

  <!-- Paste Text to Speech information here -->
  <string name="text_speech_username"></string>
  <string name="text_speech_password"></string>
  <string name="text_speech_url"></string>
</resources>
```

## Questions

If you are having difficulties using the APIs or have a question about the IBM
Watson Services, please ask a question on
[dW Answers](https://developer.ibm.com/answers/questions/ask/?topics=watson)
or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson).

You can also check out the [wiki][wiki] for some additional information.

## Examples

This SDK is built for use with the [java-sdk][java-sdk].

The examples below are specific for Android as they use the Microphone and Speaker; for actual services refer to the [java-sdk][java-sdk]. Be sure to use the provided example app as a model for your own Android app using Watson services.

### MicrophoneHelper

Provides simple microphone access within an activity.

```java
MicrophoneHelper microphoneHelper = new MicrophoneHelper(this);
```

The MicrophoneHelper object allows you to create new MicrophoneInputStream objects and close them. The MicrophoneInputStream class is a convenience class for creating an `InputStream` from device microphone. You can record raw PCM data or data encoded using the ogg codec.

```java
// record PCM data without encoding
MicrophoneInputStream myInputStream = microphoneHelper.getInputStream(false);

// record PCM data and encode it with the ogg codec
MicrophoneInputStream myOggStream = microphoneHelper.getInputStream(true);
```

An example using a Watson Developer Cloud service would look like

```java
speechService.recognizeUsingWebSocket(new MicrophoneInputStream(),
getRecognizeOptions(), new BaseRecognizeCallback() {
  @Override
  public void onTranscription(SpeechResults speechResults){
    String text = speechResults.getResults().get(0).getAlternatives().get(0).getTranscript();
    System.out.println(text);
  }

  @Override
  public void onError(Exception e) {
  }

  @Override public void onDisconnected() {
  }

});
```

Be sure to take a look at the example app to get a working example of putting these all together.

### StreamPlayer

Provides the ability to directly play an InputStream

```java
StreamPlayer player = new StreamPlayer();
player.playStream(yourInputStream);
```

### CameraHelper

Provides simple camera access within an activity.

```java
CameraHelper cameraHelper = new CameraHelper(this);
cameraHelper.dispatchTakePictureIntent();

@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == CameraHelper.REQUEST_IMAGE_CAPTURE) {
      System.out.println(cameraHelper.getFile(resultCode));
    }
  }
```

### GalleryHelper

Like the CameraHelper, but allows for selection of images already on the device.

To open the gallery:

```java
GalleryHelper galleryHelper = new GalleryHelper(this);
galleryHelper.dispatchGalleryIntent();

@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == GalleryHelper.PICK_IMAGE_REQUEST) {
      System.out.println(galleryHelper.getFile(resultCode, data));
    }
  }
```

## Testing

Testing in this SDK is accomplished with [Espresso](https://google.github.io/android-testing-support-library/docs/espresso/).

To run the tests, in Android Studio:

Within the example package, right-click the androidTest/java folder and click Run 'All Tests'.

## Build + Test

Use [Gradle][] (version 1.x) to build and test the project you can use

Gradle:

  ```sh
  $ cd android-sdk
  $ gradle test # run tests
  ```

## Open Source @ IBM

Find more open source projects on the [IBM Github Page](http://ibm.github.io/)

## License

This library is licensed under Apache 2.0. Full license text is
available in [LICENSE](LICENSE).

## Contributing

See [CONTRIBUTING.md](.github/CONTRIBUTING.md).

[wdc]: http://www.ibm.com/watson/developercloud/
[java-sdk]: https://github.com/watson-developer-cloud/java-sdk
[bluemix]: https://console.bluemix.net
[Gradle]: http://www.gradle.org/
[OkHttp]: http://square.github.io/okhttp/
[gson]: https://github.com/google/gson
[releases]: https://github.com/watson-developer-cloud/android-sdk/releases
[wiki]: https://github.com/watson-developer-cloud/android-sdk/wiki

[aar]: https://github.com/watson-developer-cloud/android-sdk/releases/download/v0.4.2/library-release.aar


text:
# Nginx Logs

The Time-Info header can be written to logs by creating a [log_format](http://nginx.org/en/docs/http/ngx_http_log_module.html) in your nginx config:

	log_format inc_info '$remote_addr - $remote_user [$sent_http_x_log_info] [$time_iso8601] [$request_time/$sent_http_x_time_info] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';

Where the "server" can use this with:

	server {
		...
		access_log /path/to/access_log inc_info;
		...
	}

You will notice that I've added a Log-Info value as well; this can be used to record the UserID, timing for specific actions, etc.

repository: craigfrancis/r-stats

repo_name: craigfrancis/r-stats


text:
# Professional README Generator

## Description

This application generates README.md file using command-line application that runs with Node.js.  It guides user through prompts of questions and options and based on user's input, it dynamically generates a markdown file which in this application defaulted to sampleREADME.md.

## Installation
### Steps required:
In the terminal mode, user must first run __npm install__ to have its package dependecies. Then, user can run the index.js file in Node environment by running __node index.js__.

## Usage
### Demo of README generator:
![demo](./assets/demo.gif)
* Link to preview demo: https://drive.google.com/file/d/1YCM5FXpCp6cVJKbCBF6lfXlzw6hiWgsZ/view

### Still images preview:
* User is presented with a series of questions.
* ![sample questions](./assets/sampleQnA.PNG)
* Then a sampleREADME.md file is generated with the following preview:
* ![sampleREADME.md preview](./assets/sampleREADME.PNG)

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

## MAINTAINER
This is an individual assignment created by Carolina Yoedhana.
* GitHub Link: https://github.com/CarolinaYo/readme-gen.git

repository: CarolinaYo/readme-gen

repo_name: CarolinaYo/readme-gen


text:
# Troubleshooting

NOTE: If you are having problems, first consult our [known issues doc](known-issues.md).

### Checking Logs

* Discovering All CF Networking Logs:

  All cf-networking components log lines are prefixed with `cfnetworking` (no hyphen)
  followed by the component name. To find all CF Networking logs, run:
  `grep -r cfnetworking /var/vcap/sys/log/*`

  The log lines for the following components will be returned:
  * `silk-daemon` (from [silk-release](code.cloudfoundry.org/silk))
  * `silk-controller` (from [silk-release](code.cloudfoundry.org/silk))
  * `vxlan-policy-agent` (from [silk-release](code.cloudfoundry.org/silk))
  * `policy-server`
  * `policy-server-internal`
  * `netmon` (from [silk-release](code.cloudfoundry.org/silk))

  The log lines for the following components will be not returned:
  * `iptables`(from [silk-release](code.cloudfoundry.org/silk)): We have limited room to add an identifier, and these logs are high-volume.
  * `garden-external-networker`: Garden will only print errors if creating a container fails.
  * `cni-wrapper-plugin`(from [silk-release](code.cloudfoundry.org/silk)): Only stdout and stderr are printed in garden logs.

* Container Create is Failing:

  If container create is failing check the garden logs, located on the cell VMs at `/var/vcap/sys/log/garden/garden.stdout.log`.
  Garden logs stdout and stderr from calls to the CNI plugin, you can find any errors related to the CNI ADD/DEL there.

  Unsuccessful create will say things like `exit status 1` in the `stderr` field of the log message.

* Problems Creating Policies:

  Problems creating policies are usually related to issues on the policy server VM(s). Check the logs at `/var/vcap/sys/log/policy-server/policy-server.stdout.log`

### Enabling Debug Logging

  The policy server log at the `info` level by default. The log level can be adjusted at runtime by making a request to the debug server running on the VM.
  To enable debug logging ssh to the VM and make this request to the debug server:
  ```
  curl -X POST -d 'DEBUG' localhost:31821/log-level
  ```
  To switch back to info logging make this request:
  ```
  curl -X POST -d 'INFO' localhost:31821/log-level
  ```
  For the policy server, the debug server listens on port 31821 by default, it can be overridden by the manifest property `cf_networking.policy_server.debug_port`.

### Metrics

  CF networking components emit metrics which can be consumed from the firehose, e.g. with the datadog firehose nozzle. Relevant metrics have theses prefixes:
  -   `policy_server`

### Diagnosing and Recovering from Subnet Overlap

This section describes how to recover from a deploy of CF Networking with Silk which has an overlay network configured which conflicts with the entire CF subnet. We set `network` on the `silk-controller` to the same subnet as CF and BOSH (<IP_ADDRESS>/16). When we deploy we fail to bring up the first diego cell

  ```
  17:31:56 | Updating instance diego-cell: diego-cell/4abb639b-33a9-4d8d-8a95-21c3863c7b0c (0) (canary) (00:03:25)
              L Error: Timed out sending 'get_state' to baa8bc66-df64-4c2f-80d0-c090559ac28d after 45 seconds

  17:35:22 | Error: Timed out sending 'get_state' to baa8bc66-df64-4c2f-80d0-c090559ac28d after 45 seconds
  ```

  bosh vms shows:
  ```
  $ bosh vms
  Using environment 'https://<IP_ADDRESS>:25555' as client 'admin'

  Task 44. Done

  Deployment 'cf'

  Instance                                          Process State       AZ  IPs          VM CID                                   VM Type
  api/45e92d63-905b-4659-8400-3df97b97850b          running             z1  <IP_ADDRESS>   vm-bd55a96c-e4b4-4a33-53d0-7297e63d5bed  m3.large
  api/f381c70a-58b7-4972-96d0-5a717122ce1e          running             z2  <IP_ADDRESS>    vm-3579ec81-6cad-4e44-42f7-170545c11dc2  m3.large
  blobstore/a4c314e9-1b79-46bc-b572-c57e1be563b3    running             z1  <IP_ADDRESS>    vm-6a787749-9f7b-4fb7-7565-2f0b66ed1794  m3.large
  cc-bridge/1999c3c2-7b4c-4ac0-8b43-189561edc7d6    running             z1  <IP_ADDRESS>   vm-ee138dd7-e01c-473b-402e-2a5896746e1f  m3.medium
  cc-bridge/fb02bc5b-5b75-4e3b-8e1c-451b4baaafe6    running             z2  <IP_ADDRESS>   vm-5ddb0e3d-6c44-4bd0-5232-04c5d28e9151  m3.medium
  cc-clock/d2a40e2f-b93f-4821-8d9e-b5e7f2fafec5     running             z1  <IP_ADDRESS>   vm-a94c4a98-ece2-4ad5-68f5-aa53f4c988c5  m3.large
  cc-worker/ed3655bf-0d6a-4ea7-bd21-060d7c7146b7    running             z1  <IP_ADDRESS>   vm-f5f3f577-80fe-43b9-554f-7ea55f954c82  m3.medium
  cc-worker/feb22fc9-a701-4dff-9c44-e920a03d8520    running             z2  <IP_ADDRESS>    vm-8465f4e3-d3c5-453a-7b88-0392e3efd160  m3.medium
  consul/00d7d425-6291-4f8a-8313-7deae2fbd3c9       running             z2  <IP_ADDRESS>    vm-d61b76e9-45ae-432b-504d-f3290f7b09e6  m3.medium
  consul/906080b6-28d2-411f-9a96-88d1556f0d82       running             z3  <IP_ADDRESS>    vm-0ba6eed9-20fa-4375-53ac-e6911fd60b49  m3.medium
  consul/d2c6612c-cad6-412d-bac7-ac35c08895c5       running             z1  <IP_ADDRESS>    vm-a03136b0-e769-468a-6848-2ab8347782d1  m3.medium
  diego-bbs/800ab3a6-529a-476d-ab07-95ee5847ad8f    running             z1  <IP_ADDRESS>    vm-c96eec32-b644-4c42-7e46-90a054eb6bbb  m3.large
  diego-bbs/c99ce96a-1e4e-4e33-b972-3add40a831db    running             z2  <IP_ADDRESS>    vm-29d36c97-d372-4b7c-4cfd-ff58e4046107  m3.large
  diego-brain/2a81d157-3e65-4335-b661-0393f867d252  running             z2  <IP_ADDRESS>   vm-fd18327e-5044-4056-4d23-c5c8a833c172  m3.medium
  diego-brain/9811e507-4b3e-490a-839e-147f3eaa9089  running             z1  <IP_ADDRESS>   vm-04482d80-97cc-4eb8-44e2-0756f45529e1  m3.medium
  diego-cell/460d0ead-a1b4-40c5-9f88-70327b536aa8   running             z2  <IP_ADDRESS>   vm-de76fbd8-cd3c-44ab-6ccc-bc0755909a91  r3.xlarge
  diego-cell/4abb639b-33a9-4d8d-8a95-21c3863c7b0c   unresponsive agent  z1  <IP_ADDRESS>   vm-323a3988-5671-4b0d-4939-622d1886185f  r3.xlarge
  doppler/0108ae24-b3ca-4d14-9cd6-c5640ffc359c      running             z1  <IP_ADDRESS>   vm-30645eea-47cd-428c-52a7-116ce26d46e9  m3.medium
  doppler/05d36944-d4ee-4c40-9eba-f8abce03d942      running             z2  <IP_ADDRESS>   vm-97fc113f-d0b1-4bf4-6b2c-b99a82e88c74  m3.medium
  etcd/2bef16f1-ce6e-4049-a3b9-728966135072         running             z1  <IP_ADDRESS>    vm-0b59d1db-bf0b-4a22-43ad-d4e04edad572  m3.medium
  etcd/ca1a776d-405c-4687-800b-ea707d015abb         running             z3  <IP_ADDRESS>    vm-b671dcea-6235-4217-6f50-8172a414fd98  m3.medium
  etcd/f7171ac1-d760-4e79-986f-52409f22008a         running             z2  <IP_ADDRESS>    vm-268b024e-00ee-4fe0-5dd7-5cd36a975661  m3.medium
  log-api/3e8f0f29-1dfe-4620-ba26-6d51db8254ed      running             z1  <IP_ADDRESS>   vm-29a20458-fc53-426f-47ff-293394fbf416  t2.small
  log-api/4bc34462-5ae8-4cc1-82d2-bc74ef2866f5      running             z2  <IP_ADDRESS>   vm-560e68ef-0629-4457-41b4-fbc76b2d09e6  t2.small
  mysql/e448ba11-5f14-46f2-876c-e0e926fef2d5        running             z1  <IP_ADDRESS>    vm-3be727a8-da1c-427a-6701-16ee19be6264  m3.large
  nats/5fd2bb98-f384-4bbf-86b9-b5e888543b1a         running             z2  <IP_ADDRESS>  vm-5d271164-c9db-44d8-6dd2-a014ff075eaa  c3.large
  nats/b977aa7e-ced3-4e68-8dd9-bd5bb5640dec         running             z1  <IP_ADDRESS>  vm-86297c9b-19b5-45db-5dbc-dd3ed5638d42  c3.large
  router/40f14eb0-47f2-4b1e-831d-6f1c9620c5ef       running             z3  <IP_ADDRESS>    vm-8590c4d2-2e89-4d72-7841-6d191d36a31a  m3.medium
  router/7a932987-5a50-4a2e-a221-c9ad1d601e6f       running             z2  <IP_ADDRESS>   vm-91df6232-7572-479f-51d8-5d0b24f8cdc3  m3.medium
  router/a947e6e0-d814-434f-a66b-2b610e9eae93       running             z1  <IP_ADDRESS>   vm-afeed179-d644-441b-7f49-add45d73b905  m3.medium
  uaa/15d93dba-7b04-4d25-a244-7d1a93712e47          running             z1  <IP_ADDRESS>    vm-715d445e-117d-4fd3-710a-7e92b028ec1b  m3.medium
  uaa/4c334724-7362-47b6-917e-3502566a8fad          running             z2  <IP_ADDRESS>    vm-e8cb1c9a-02c8-4b2b-7c9c-21261cb5e5a0  m3.medium
  ```

  Trying to roll back fails since the deployment lock is still being held.

  These commands get the deployment unstuck, so the operator can roll back to a previous version or correct the configuration:
  ```
  bosh update-resurrection off
  bosh ignore diego-cell/4abb639b-33a9-4d8d-8a95-21c3863c7b0c
  bosh delete-vm vm-a4f6c259-c1f8-4b35-746e-f1db3359fad6
  ```

  Once the deploy is complete run:
  ```
  bosh update-resurrection on
  bosh unignore diego-cell/4abb639b-33a9-4d8d-8a95-21c3863c7b0c
  ```

### Inspecting VTEP configuration
The VXLAN tunnel endpoint can be inspected using the `ip` utility from the `iproute2` package.

From the Diego cell, install a recent version of `iproute2` and its dependency `libmnl`:
```
curl -o /tmp/iproute2.deb -L http://mirrors.kernel.org/ubuntu/pool/main/i/iproute2/iproute2_4.3.0-1ubuntu3_amd64.deb
curl -o /tmp/libmnl0.deb -L http://mirrors.kernel.org/ubuntu/pool/main/libm/libmnl/libmnl0_1.0.3-5_amd64.deb
dpkg -i /tmp/*.deb
```

Then you can see details of the VTEP device by running
```
ip -d link list silk-vtep
```
which should resemble
```
250: silk-vtep: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1410 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/ether ee:ee:0a:ff:58:00 brd ff:ff:ff:ff:ff:ff promiscuity 0
    vxlan id 1 local <IP_ADDRESS> dev eth0 srcport 0 0 dstport 4800 nolearning ageing 300 gbp
```

To parse the last line, look at:

```
ip link help vxlan
```

which shows

```
Usage: ... vxlan id VNI [ { group | remote } ADDR ] [ local ADDR ]
                 [ ttl TTL ] [ tos TOS ] [ dev PHYS_DEV ]
                 [ dstport PORT ] [ srcport MIN MAX ]
                 [ [no]learning ] [ [no]proxy ] [ [no]rsc ]
                 [ [no]l2miss ] [ [no]l3miss ]
                 [ ageing SECONDS ] [ maxaddress NUMBER ]
                 [ [no]udpcsum ] [ [no]udp6zerocsumtx ] [ [no]udp6zerocsumrx ]
                 [ gbp ]

Where: VNI := 0-16777215
       ADDR := { IP_ADDRESS | any }
       TOS  := { NUMBER | inherit }
       TTL  := { 1..255 | inherit }
```

In particular, the `dstport PORT` value is the external UDP port used by the VTEP for all encapsulated VXLAN packets.

### Debugging C2C Packets

  To determine a failure on a c2c packet, `bosh ssh` onto a cell suspected of hosting an app that is not receiving failing packets.

  To find relevant packets, run the following command
  ```
  tcpdump -T vxlan -v -XX -i <interface>
  ```
  where `<interface>` is the lowest level BROADCAST address found from running
  ```
  ip link
  ```
  For the example output of this command below, interface is `eth0`.
  ```
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc mq state UP mode DEFAULT group default qlen 1000
      link/ether 42:01:0a:00:10:0e brd ff:ff:ff:ff:ff:ff
  349: silk-vtep: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1410 qdisc noqueue state UNKNOWN mode DEFAULT group default
      link/ether ee:ee:0a:ff:0f:00 brd ff:ff:ff:ff:ff:ff
  353: s-010255015002@if352: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
      link/ether aa:aa:0a:ff:0f:02 brd ff:ff:ff:ff:ff:ff
  ```

  If packet capture is already set up, a packet is distinguished as VXLAN in the packet header.

  C2C packets should contain `vni 1` in the header, similar to
  ```
  3:26:56.211447 IP (tos 0x0, ttl 64, id 60857, offset 0, flags [none], proto UDP (17), length 110)
    cell-z1-0.node.dc1.cf.internal.57703 > cell-z1-1.node.dc1.cf.internal.8472: VXLAN, flags [I] (0x88), vni 1
  ```

  We can now use to VXLAN packet to find information about the app that sent it.

  First, find the GBP tag in the body of the packet.
  Information concerning the GBP tag will be 4 bytes after the VXLAN port, which is always `0x2118`.

  In the example below, the relevant information is `0x8800 0001`.
  The first two bytes (`0x88`) tell us that a GBP tag exists.
  If a GBP tag does not exist, the two bytes will be `0x08`.

  ```
  0x0000:  0e4e b0d2 3b72 96de b050 aa1a 0800 4500  .N..;r...P....E.
	0x0010:  006e edb9 0000 4011 56d1 0af4 1004 0af4<EMAIL_ADDRESS>	0x0020:  1009 e167 2118 005a 0000 8800 0001 0000  ...g!..Z........
	0x0030:  0100 32fe ee1f 5bc6 dec2 c712 ac75 0800  ..2...[......u..
	0x0040:  4500 003c 18dd 4000 3f06 80d4 0aff 4003  E..<<EMAIL_ADDRESS>	0x0050:  0aff 4c0a dd62 1f90 4cc9 3652 0000 0000  ..L..b..L.6R....
	0x0060:  a002 6e28 a239 0000 0204 0582 0402 080a  ..n(.9..........
	0x0070:  0071 2e8f 0000 0000 0103 0307            .q..........
  ```

  If there is a tag, the next six bytes represent the tag. For the same example, the tag is `0x000001`.

  With a GBP tag, app information can be found by running
  ```
  cf curl /networking/v0/external/tags
  ```
  and parsing the output based on the GBP tag. The associated `id` is the application guid.

  Example of `cf curl` output:
  ```
  {
  "tags": [
    {
      "id": "f028b20b-7203-4743-ab96-da2bf05fae45",
      "tag": "0001"
    },
    {
      "id": "aa4117a2-5e34-4648-9d42-8260380267cc",
      "tag": "0002"
    }
  ]
  }
  ```

  If the VXLAN packet does not have a GBP tag, continue to examine the packet.

  Twenty bytes before the VXLAN port is the eight byte hex representation of the source ip for the cell that hosts the application.
  In the example above, this value is `0x0af41004`.

  Thirty bytes after the GBP tag (forty-six bytes after the VXLAN port) is the eight byte hex representation of the source ip for the application.
  In the example above, this value is `0x0aff4c0a`.

  Now `bosh ssh` onto the cell with the source ip just found. Run
  ```
  less /var/vcap/data/container-metadata/store.json
  ```
  and search the resulting output for an entry with the same ip as the application source ip found.
  The relevant application guid can be found in the associated metadata as `app_id`.

  Example of `store.json` output:
  ```
  {
   "6d2131bb-fe5e-47d7-7e46-d925cf6db115" : {
      "ip" : "<IP_ADDRESS>",
      "metadata" : {
         "policy_group_id" : "dc947050-d073-4a8f-8693-be10a1ae8553",
         "org_id" : "98ad4a19-2a9f-412e-9431-54b0f9dfede1",
         "space_id" : "756e1478-3a30-48a5-a308-93aaa1dd178f",
         "app_id" : "dc947050-d073-4a8f-8693-be10a1ae8553"
      },
      "handle" : "6d2131bb-fe5e-47d7-7e46-d925cf6db115"
   }
  }
  ```

### Debugging Non-C2C Packets

  To capture non-c2c packets (destination is an external address), run the following:

  ```
  tcpdump -v -XX -i any
  ```

  The packets that you are interested in will be packets with the source ip being in the container network.

  To filter by destination address, you may add `-n dst host <destination-ip>` to the `tcpdump` command. For example:

  ```
  tcpdump -v -XX -i any -n dst host <IP_ADDRESS>
  ```

  Once you have a packet and want to find information about the application,
  find the assigned container ip in the packet header. For the example below, the ip is <IP_ADDRESS>.
  ```
  18:49:04.749158 IP (tos 0x0, ttl 64, id 25116, offset 0, flags [DF], proto TCP (6), length 114)
    <IP_ADDRESS>.34638 > lax17s05-in-f14.1e100.net.http: Flags [P.], cksum 0xda6f (incorrect -> 0x5709), seq 1:75, ack 1, win 28200, length 74: HTTP, length: 74
	GET / HTTP/1.1
	User-Agent: curl/7.35.0
	Host: google.com
	Accept: */*

	0x0000:  0a58 0aff 1d01 0a58 0aff 1d03 0800 4500  .X.....X......E.
	0x0010:  0072 621c 4000 4006 fe5e 0aff 1d03 d83a  .rb<EMAIL_ADDRESS>	0x0020:  d9ce 874e 0050 3a0f 5211 3aa9 9402 5018  ...N.P:.R.:...P.
	0x0030:  6e28 da6f 0000 4745 5420 2f20 4854 5450  n(.o..GET./.HTTP
	0x0040:  2f31 2e31 0d0a 5573 6572 2d41 6765 6e74  /1.1..User-Agent
	0x0050:  3a20 6375 726c 2f37 2e33 352e 300d 0a48  :.curl/7.35.0..H
	0x0060:  6f73 743a 2067 6f6f 676c 652e 636f 6d0d  ost:.google.com.
	0x0070:  0a41 6363 6570 743a 202a 2f2a 0d0a 0d0a  .Accept:.*/*....
  ```

  On the same cell which the packet was captured, run
  ```
  less /var/vcap/data/container-metadata/store.json | json_pp
  ```
  and find the entry with the ip. If no entry exists, check the `store.json` on other cells.

  The associated `app_id` is the application guid.

  Example of `store.json` output:
  ```
  {
   "9bce657c-b92f-422b-60e0-227a66ad8b48" : {
      "metadata" : {
         "space_id" : "601577f3-7c2d-4d98-8029-0bd03b6a0682",
         "app_id" : "aa4117a2-5e34-4648-9d42-8260380267cc",
         "policy_group_id" : "aa4117a2-5e34-4648-9d42-8260380267cc",
         "org_id" : "ff585363-1164-49b2-bbf3-55dd0cb06597"
      },
      "ip" : "<IP_ADDRESS>",
      "handle" : "9bce657c-b92f-422b-60e0-227a66ad8b48"
   },
   "cf760bdc-ebf9-414e-4a88-29dc8820643e" : {
      "ip" : "<IP_ADDRESS>",
      "metadata" : {
         "policy_group_id" : "f028b20b-7203-4743-ab96-da2bf05fae45",
         "space_id" : "601577f3-7c2d-4d98-8029-0bd03b6a0682",
         "app_id" : "f028b20b-7203-4743-ab96-da2bf05fae45",
         "org_id" : "ff585363-1164-49b2-bbf3-55dd0cb06597"
      },
      "handle" : "cf760bdc-ebf9-414e-4a88-29dc8820643e"
   }
  }
  ```

repository: edwardbadboy/cf-networking-release

repo_name: edwardbadboy/cf-networking-release


text:
# Socket.IO Cloud

A cloud server for socket.io

## How to use

```
$ cd socket.io-cloud
$ npm install
$ node bin/cloud
```

After the socket.io cloud server is running, set up your application to connect to it on `http://localhost:3000`.
You can change the port from 3000 for the cloud server by supplying the `PORT` env variable.

Afterwards, provide the socket.io resources to your application.
```
<script src="http://localhost:3000/socket.io/socket.io.js"></script>
```

Then, create the socket connection by placing the following into the client-side javascript.
```
var socket = io("http://localhost:3000/namespace.id");
```

Communications are done via `POST` requests to the socket.io cloud server.
See socket.io-cloud-examples for a simple app example that uses the socket.io cloud.

Note: Cloud Server is running on port 3000 and the Client Server is running on 3001 in the examples

## Features

- Enables developers to create dynamic content without loading the resources for socket.io on their own servers