text:
<!--
.. title: Import part or full git repository to another repository
.. slug: import-part-or-full-repository-to-another-repository
.. date: 2017-07-22 00:00:00 UTC
.. tags: git, split repository
.. link:
.. description: how to import sub folder of a git repository with full history
.. type: text
-->

Import part of git repository to another repository in order to keep history of the imported files.

<!-- TEASER_END -->

Suppose you have 2 projects (A and B) and you want to move some files from a A to B without losing history of the files.
Prepare the subfolder you are interested to import in B

```
pushd A
git subtree split -P <name-of-folder> -b <name-of-new-branch>
popd
```

Ready to import?

```
pushd /path/to/project/B
mkdir -p folder/to/import/other/repository
git remote add projectA /path/to/project/A
git fetch projectA
git read-tree --prefix=folder/to/import/other/repository -u projectA/$branch_name
git merge -s ours --allow-unrelated-histories --no-commit projectA/$branch_name

... review if needed
git commit
```


text:
# NOTICE!
This project has been archived. The ever changing structure of Amazon reviews and the newer mechansisms in place to prevent web scraping are formidable.

# Scrape Amazon Review Pages

Amazon has a system in place to keep you from scraping their pages. What this Python app does is scrape a page from a headless Chrome browser instance using the [Selenium WebDriver](http://www.seleniumhq.org/download/) for Chrome.

This allows you to feed a list of Amazon ASINs in as a .csv (no header) and
scrape the number of reviews received and the number of stars as well.

Each page of reviews will be scraped, so if you provide a large number of ASINs and/or ASINs with a large number of reviews, it could take some time.

Fields that will be retrieved are: `'asin', 'product_title', 'rating', 'review_title', 'variation', 'review_text', 'review-links'`

#### Fair Warning

Web scraping is not an exact science at times, so if a web page's structure changes, or even if something as simple as a class is renamed or a `data-hook` type attribute removed, this code will break. This repo could use some foolproofing and more thought, but for now it works - and we're definitely happy to have any contributions.

#### Debugging Tip

If you're running/testing and having errors, your chromedriver process is likely still running so make sure to Force quit or kill the process in your OS task/process manager.

#### Setup with pipenv

Install all dependencies from the `pipfile`

```
pipenv install
```

#### Usage

Just pass the path to your csv of ASINs (no header) as a command line argument as such

```
# Windows
py amzreviewscrape.py --asins="C:\PATH\TO\ASINS\FILE.CSV" --driverpath="C:\PATH\TO\CHROMEDRIVER"

# Mac OSx/Linux
py amzreviewscrape.py --asins="/path/to/asins/csv" --driverpath="/path/to/chromedriver"
```

To pass additional options to chromedriver such as:

```
--disable-dev-shm-usage
--no-sandbox
```

You can pass the options with `--options` and separated by commas:

```
py amzreviewscrape.py --asins="/path/to/asins/csv" --driverpath="/path/to/chromedriver" --options="disable-dev-shm-usage,no-sandbox"
```

#### Dependencies:

Requires >= [Python version 3.6.3](https://www.python.org/downloads/release/python-363/)

This requires the Selenium Web Driver for Google Chrome which can be found [here](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver).

You will need to install separately and provide to amzreviewscrape.py via the `--driverpath` argument or install to
either `usr/local/bin/chromedriver` for OSx/Linux or `C:\chromedriver\chromedriver\` for Windows to have it sourced automatically.

#### The CSV Output currently looks like:

![output][screenshot]

[screenshot]: https://github.com/aflansburg/amzreviewsscrape/blob/master/scrape-output.png 'CSV Output Screen Shot'

license: MIT

repository: aflansburg/amzreviewsscrape

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: aflansburg/amzreviewsscrape


text:
# Learning models and model definitions for DAFNI

[DAFNI](https://dafni.ac.uk/) is the Data & Analytics Facility for National
Infrastructure.

This repository contains toy models and model definitions to test and learn
basic functionality:
- define a container image to wrap a model
- run images locally
- write configuration to run images on DAFNI
- add parameters
- add input datasets
- save outputs

See the [DAFNI docs](https://docs.secure.dafni.rl.ac.uk/docs/how-to/models/how-to-create-a-dafni-ready-model/)
for tutorial and reference documentation.

repository: nismod/learn-dafni

branch_name: refs/heads/main

repo_name: nismod/learn-dafni


text:
# React Listener Component

## Introduction

### 1. The Problem

When using React contexts, one has to be careful not to get out of sync. Context is not immutable, it can be changed during the components' lifetime (even though it is usually not the case).

Consider the following component tree:

```javascript
class ContextRoot extends React.Component {
  static propTypes = {
    myService: React.PropTypes.object
  }
  static childContextTypes = {
    myService: React.PropTypes.object
  }
  getChildContext() {
    return { myService: this.props.myService }
  }
  render() {
    return React.DOM.div(null, this.props.children)
  }
})

class Content extends React.Component {
  static contextTypes = {
    myService: React.PropTypes.object
  }
  componentDidMount() {
    this.context.myService.addListener(handleChange)
  }
  componentDidMount() {
    this.context.myService.removeListener(handleChange)
  }
  render() {
    return React.DOM.div(null)
  }
})

var myService = new MyService()
var tree = (
  <ContextRoot myService={myService}>
    <Content />
  </ContextRoot>
)
ReactDOM.render(tree, node)
```

The child context of `ContextRoot` is recalculated on each update to its props or state. If we were to swap the `myService` instance by passing in new props, the child context would reflect the change.

```javascript
var myDifferentService = new MyService()
var tree (
  <ContextRoot myService={myDifferentService}>
    <Content />
  </ContextRoot>
)
ReactDOM.render(tree, node)
```

The issue here is that the child component `Content` is now out of sync as it is still listening to the previous service instance even though it is no longer relevant.

### 2. The Solution

The component has to react to the context change by implementing `componentWillUpdate` or `componentDidUpdate` in which it compares the old and the new context.

NOTE: It's a good idea to implement both of these methods to gracefully handle update/render failures.

```javascript
class Content extends React.Component {
  // ...
  componentWillUpdate: function (nextProps, nextState, nextContext) {
    if (this.context.myService !== nextContext.myService) {
      this.context.myService.removeListener(handleChange)
    }
  }
  componentDidUpdate: function (prevProps, prevState, prevContext) {
    if (this.context.myService !== prevContext.myService) {
      this.context.myService.addListener(handleChange)
    }
  }
  // ...
})
```

This is quite a lot of boilerplate if we consider that there might be multiple services passed in.

### 3. The Solution, Reworked

The important pieces in the four lifecycle methods are really only the **context keys** and the **listeners** which should be registered. The rest is boilerplate which we should not have to write every time.

Let's request two services from the context and provide the listeners to register.

```javascript
class Content extends ListenerComponent {
  static contextTypes = {
    serviceA: React.PropTypes.object
    serviceB: React.PropTypes.object
  }
  getListeners() {
    return {
      serviceA: handleChangeA
      serviceB: handleChangeB
    }
  }
  render() {
    return React.DOM.div(null)
  }
}
```

Now that's awesome. The only limitation it the interface forced on these services: They both have to implement the `addListener` and `removeListener` methods.

There should be a way to specify the listener registration API for each service.

```javascript
class Content extends ListenerComponent {
  static contextTypes = {
    serviceA: React.PropTypes.object
    serviceB: React.PropTypes.object
  }
  getListeners(context) {
    return {
      serviceA: {
        listener: handleChangeA,
        add: context.serviceA.addMyListener,
        remove: context.serviceA.removeMyListener
      },
      serviceB: handleChangeB
    }
  }
  render() {
    return React.DOM.div(null)
  }
}
```


text:
# JSBelgrade.org

More info soon.

## How to run

Prerequests:

- [Node.JS](http://nodejs.org/).

Steps:

1. Clone this repository;
2. Run `npm install` from project directory;
3. Run `node server.js` to run the server.


text:
# Launch Presto on Compute Engine using Terraform

Terraform script to launch Presto on Compute Engine instances with Cloud
Dataproc as the Hive backend. Dataproc uses Cloud SQL as the Hive metastore and
Cloud Storage as the Hive warehouse.

# Architectural Diagram

![Alt text](presto_workflow.png?raw=true)

# Setup the environment
1. Clone the repository.
```
git clone <repo_link>
cd presto_terraform/
```
2. [Create a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating_a_service_account) and grant the following roles to the service account by following these [instructions](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
	1. Service Networking Admin - roles/servicenetworking.networksAdmin
	2. Service Account User - roles/iam.serviceAccountUser
    3. Compute Admin - roles/compute.admin
    4. Compute Security Admin - roles/compute.securityAdmin
    5. Storage Admin - roles/storage.admin
    6. Cloud SQL Admin - roles/cloudsql.admin
    7. Dataproc Editor - roles/dataproc.editor

3. [Download](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys) the service account key file to the root directory and replace the placeholder `KEY_FILE_NAME` with your json key file name in [provider_config.tf](provider_config.tf).

### Input variables

- `project` (required): GCP Project ID.
- `region` (optional): The region to create the resources in. Defaults to `us-central1`.
- `zone` (optional): The region to create the resources in. Defaults to `us-central1-a`.
- `bucket_name` (required): Name of the GCS bucket to act as the Hive warehouse.
- `cloud_sql_instance_name` (required): Name of the Cloud SQL instance to act as the Hive metastore.
- `tier` (optional): The machine tier for Cloud SQL instance. Defaults to `db-f1-micro`.
- `activation_policy` (optional): This specifies when the instance should be active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`. Defaults to `ALWAYS`.
- `cloud_sql_disk_size` (optional): The size of the disk attached to the Cloud SQL instance, in GB. Defaults to `10` GB.
- `cloud_sql_disk_type` (optional): The type of the disk attached to the Cloud SQL instance: `PD_SSD` or `PD_HDD`.  Defaults to `PD_SSD`.
- `network` (optional): VPC network to be used for resource creation. Defaults to `default`.
- `private_ip_name` (optional): VPC private network name to be created for Cloud SQL vpc peering. Defaults to `presto-private-network`.
- `dataproc_cluster_name` (required): Dataproc cluster name.
- `dataproc_master_count` (optional): Number of Dataproc master nodes to be created. Defaults to `1`.
- `dataproc_master_machine_type` (optional): Machine type for the Dataproc master instance. Defaults to `n1-standard-1`.
- `dataproc_master_boot_disk_size_gb` (optional): Boot disk size of the Dataproc master instance. Defaults to `15` GB.
- `dataproc_worker_count` (optional): Number of workers for the Dataproc cluster. Defaults to `2`.
- `dataproc_worker_machine_type` (optional): Machine type for the Dataproc worker instance. Defaults to `n1-standard-1`.
- `dataproc_worker_boot_disk_size_gb` (optional): Boot disk size of the Dataproc worker instance. Defaults to `15` GB.
- `presto_cluster_name` (required): Identifier to be used for the Presto cluster. Master name ends with `-m` and worker names end with `-w-<ID>`.
- `presto_cluster_image` (optional): The project/image to use for the Presto master and workers. Defaults to `ubuntu-os-cloud/ubuntu-1604-lts`.
- `presto_master_machine_type` (optional): Machine type for the Presto master instance. Defaults to `n1-standard-1`.
- `presto_master_boot_disk_size_gb` (optional): Boot disk size of the Presto master instance. Defaults to `15` GB.
- `presto_worker_count` (optional): Number of workers for the Presto cluster. Defaults to `2`.
- `presto_worker_machine_type` (optional): Machine type for the Presto worker instance. Defaults to `n1-standard-1`.
- `presto_worker_boot_disk_size_gb` (optional): Boot disk size of the Presto worker instance. Defaults to `15` GB.
- `dataproc_ip` (readonly): This variable is used internally to send the Dataproc IP addresss to the shell script [presto.sh](presto.sh).

# Output variables

- `bucket_url`: The base URL of the Hive warehouse bucket, in the format `gs://<bucket-name>`.
- `sql_ip`: The IPv4 address assigned to the Cloud SQL Hive metastore instance.
- `private_network`: The URI of the private network created.
- `dataproc_master_name`: Name of the Dataproc master node.
- `presto_master_ip_op`: The internal ip address of the Presto master instance.
- `presto_worker_ip_op`: The internal ip addresses of the Presto worker instances.

# Resources created

- `google_compute_instance.presto-master`: Compute Engine VM instance to act as Presto coordinator.
- `google_compute_instance.presto-worker`: Compute Engine VM instance to act as Presto worker.
- `google_compute_firewall.presto-firewall`: Firewall rule to allow Presto VM instances with network tag `presto-service-discovery` to communicate internally via port 8080.
- `google_dataproc_cluster.dataproc-backend`: Dataproc cluster for Hive backend.
- `google_storage_bucket.hive-warehouse-dir`: Hive warehousing bucket and also served as staging bucket for the Dataproc cluster.
- `google_sql_database_instance.hive-metastore-instance`: Cloud SQL database instance with private network, acts as Hive metastore.
- `google_sql_user.root-user`: `root` user for the Cloud SQL database instance with empty password.
- `google_compute_global_address.private_ip_alloc`: Internal private network of prefix length of 20 from the network provided for VPC peering with Service Networking API.
- `google_service_networking_connection.googleservice`: It applies `servicenetworking.googleapis.com` service on provided internal network for Google's private services to communicate privately. It is used to access Cloud SQL with private IP address from the Dataproc cluster.

# Set Presto configuration parameters

Depending on the machine type you choose for Presto VM instances, set the
JVM memory parameter in `configure_jvm` function and Presto configuration
parameters in the `configure_master` and `configure_worker` functions with
appropriate values in [presto.sh](presto.sh).

# Run terraform

Set the required input variables in [input.tfvars](input.tfvars) and
the optional input variables in [variables.tf](variables.tf).
```
terraform init
terraform apply -var-file=input.tfvars
```

To see the output again, execute the following command from the `presto_terraform` folder.
```
terraform output
```

# Testing

Through the console, identify the Presto master instance using the internal IP
address from the terraform output and SSH into it. Launch Presto by running the
following command.
```
/usr/bin/presto --catalog hive
```
Run the command below in Presto shell to list down all the nodes and see if
they are active.
```
presto> select * from system.runtime.nodes;
```

# Connecting with UI
Presto is configured to run on port 8080 on the Presto master node (though you
can change this in the script). To connect to the Presto web interface,
you will need to create an SSH tunnel and use a SOCKS 5 Proxy as described
in the [documentation](https://cloud.google.com/dataproc/docs/concepts/accessing/cluster-web-interfaces#top_of_page).

repository: pupamanyu/professional-services

repo_name: pupamanyu/professional-services


text:
# Use cases

The workflow has two pre-processing options: `mapping` and `recalibrate`.
Using the `mapping` directive one will have a pair of mapped, deduplicated and recalibrated BAM files in the `Preprocessing/Recalibrated/` directory.
This is the usual option you have to give when you are starting from raw FASTQ data:

```bash
nextflow run nf-core/sarek --input mysample.tsv --tools <tool>
```

`mapping` will start by default, you do not have to give any additional parameters, only the TSV file describing the sample (see below).

During the execution of the workflow a `execution_trace.txt`, a `execution_timeline.html` and a `execution_report.html` files are generated automatically.
These files contain statistics about resources used and processes finished.
If you start a new workflow or restart/resume a sample, the previous version will be renamed as `execution_trace.txt.1`, `execution_timeline.html.1` and `execution_report.html.1` respectively.
Also, older version are renamed with incremented numbers.

## Starting from raw FASTQ - pair of FASTQ files

The workflow should be started in this case with the smallest set of options as written above:

```bash
nextflow run nf-core/sarek --input mysample.tsv --tools <tool>
```

The TSV file should look like:

```text
SUBJECT_ID  XX    0    SAMPLE_ID    1    /samples/normal_1.fastq.gz    /samples/normal_2.fastq.gz
```

See the [input files documentation](docs/input.md) for more information.

## Starting from raw FASTQ - a directory with normal sample only

The `--input` option can be also used to point Sarek to a directory with FASTQ files:

```bash
nextflow run nf-core/sarek --input path/to/FASTQ/files --tools <tool>
```

The given directory is searched recursively for FASTQ files that are named `*_R1_*.fastq.gz`, and a matching pair with the same name except `_R2_` instead of `_R1_` is expected to exist alongside.
All of the found FASTQ files are considered to belong to the sample.
Each FASTQ file pair gets its own read group (`@RG`) in the resulting BAM file.

### Metadata when using `--input` with a directory

When using `--input` with a directory, the metadata about the sample that are written to the BAM header in the `@RG` tag are determined in the following way.

- The sample name (`SM`) is derived from the the last component of the path given to `--input`.
That is, you should make sure that that directory has a meaningful name! For example, with `--input=/my/fastqs/sample123`, the sample name will be `sample123`.
- The read group id is set to *flowcell.samplename.lane*.
The flowcell id and lane number are auto-detected from the name of the first read in the FASTQ file.

## Starting from raw FASTQ - pair of FASTQ files for tumor/normal samples

The workflow command line is just the same as before, but the TSV contains extra lines.
You can see the second column is used to distinguish normal and tumor samples.
You can add as many relapse samples as many you have, providing their name in the third column is different.
Each will be compared to the normal one-by-one.
Usually there are more read groups - sequencing lanes - for a single sequencing run, and in a flowcell different lanes have to be recalibrated separately.
This is captured in the TSV file only in the following manner, adding read group numbers or IDs in the fourth column.
All lanes belonging to the same Sample will be merged together after the FASTQ pairs are mapped to the reference genome.
Obviously, if you do not have relapse samples, you can leave out the two last lines.

```text
SUBJECT_ID  XX    0    SAMPLE_ID_N    1    /samples/normal1_1.fastq.gz    /samples/normal1_2.fastq.gz
SUBJECT_ID  XX    0    SAMPLE_ID_N    2    /samples/normal2_1.fastq.gz    /samples/normal2_2.fastq.gz
SUBJECT_ID  XX    1    SAMPLE_ID_T    3    /samples/tumor3_1.fastq.gz    /samples/tumor3_2.fastq.gz
SUBJECT_ID  XX    1    SAMPLE_ID_T    4    /samples/tumor4_1.fastq.gz    /samples/tumor4_2.fastq.gz
SUBJECT_ID  XX    1    SAMPLE_ID_T    5    /samples/tumor5_1.fastq.gz    /samples/tumor5_2.fastq.gz
SUBJECT_ID  XX    1    SAMPLE_ID_R    7    /samples/relapse7_1.fastq.gz    /samples/relapse7_2.fastq.gz
SUBJECT_ID  XX    1    SAMPLE_ID_R    9    /samples/relapse9_1.fastq.gz    /samples/relapse9_2.fastq.gz
```

See the [input files documentation](docs/input.md) for more information.

## Starting from recalibration

```bash
nextflow run nf-core/sarek --input mysample.tsv --step recalibrate --tools <tool>
```

And the corresponding TSV file should be like:
Obviously, if you do not have tumor or relapse samples, you can leave out the two last lines.

```text
SUBJECT_ID  XX    0    SAMPLE_ID_N    /samples/SAMPLE_ID_N.bam    /samples/SAMPLE_ID_N.bai /samples/SAMPLE_ID_N.recal.table
SUBJECT_ID  XX    1    SAMPLE_ID_T    /samples/SAMPLE_ID_T.bam    /samples/SAMPLE_ID_T.bai /samples/SAMPLE_ID_T.recal.table
SUBJECT_ID  XX    1    SAMPLE_ID_R    /samples/SAMPLE_ID_R.bam    /samples/SAMPLE_ID_R.bai /samples/SAMPLE_ID_R.recal.table
```

See the [input files documentation](docs/input.md) for more information.

## Starting from a recalibrated BAM file

At this step we are assuming that all the required preprocessing is over, we only want to run variant callers or other tools using recalibrated BAM files.

```bash
nextflow run nf-core/sarek --step variantcalling --tools <tool>
```

And the corresponding TSV file should be like:

```text
SUBJECT_ID  XX    0    SAMPLE_ID_N    /samples/SAMPLE_ID_N.bam    /samples/SAMPLE_ID_N.bai
SUBJECT_ID  XX    1    SAMPLE_ID_T    /samples/SAMPLE_ID_T.bam    /samples/SAMPLE_ID_T.bai
SUBJECT_ID  XX    1    SAMPLE_ID_R    /samples/SAMPLE_ID_R.bam    /samples/SAMPLE_ID_R.bai
```

See the [input files documentation](docs/input.md) for more information.

If you want to restart a previous run of the pipeline, you may not have a recalibrated BAM file.
In this case, you need to start with `--step=recalibrate` (see previous section).

## Using Sarek with targeted (whole exome or panel) sequencing data

The recommended flow for targeted sequencing data is to use the workflow as it is, but also provide a BED file containing targets for all steps using the `--targetBED` option.
The workflow will pick up these intervals, and activate the `--exome` flag to process deeper coverage.
It is adviced to pad the variant calling regions (exons or the target) to some extent before submitting to the workflow.
To add the target BED file configure the flow like:

```bash
nextflow run nf-core/sarek --tools haplotypecaller,strelka,mutect2 --targetBED targets.bed --input my_panel.tsv
```

repository: PGP-UK/GenomeChronicler-Sarek-nf

gha_language: Nextflow

repo_name: PGP-UK/GenomeChronicler-Sarek-nf


text:
# Online skeleton-based action recognition with multi-feature early fusion

## Introduction
Existing skeleton-based action recognition methods input a whole segmented action sequence and adopt later fusion
to integrate the multi-stream results, which causes a large amount of computation and is not suitable for online application. This
paper proposed an online skeleton-based action recognition method with multi-feature early fusion. The approach integrated
different types of input feature through the early embedding layer and combined the max pooling and hierarchical pooling to
extract multi-semantic spatial information. Moreover, the selection strategy of skeleton sequences was carefully designed. A
new 3D skeleton dataset, NTU-GAST Skeleton, with 17 joint points was made to be compatible with existing 3D human pose
estimation methods for online action recognition. Experiments on two available benchmark datasets NTU60 and 120 RGB+D
indicate that the proposed method achieves competitive performance comparison to state-of-the-art results with more than
50×less computational complexity.

## Online Skeleton-based Action Recognition with A Single RGB Camera
- [Real-time online action recognition with a single RGB camera](https://www.bilibili.com/video/BV1e54y1i7iT/?spm_id_from=333.788.videocard.0)

![Online-Skeleton-base-Action-Recognition](./images/online_act_recog_one.gif)
![Online-Skeleton-base-Action-Recognition](./images/online_act_recog_two.gif)

## Prerequisites
The code is built with the following libraries:
- Python 3.6
- [PyTorch](https://pytorch.org/) 1.3

## Data Preparation

### NTU-GAST Skeleton dataset

- Download [NTU-GAST Skeleton](https://pan.baidu.com/s/1l-xAiTJq-9mOQpwf59naEA) dataset from Baidu drive. Extraction code:3bid. Google drive: [NTU-GAST Skeleton](https://drive.google.com/file/d/1y846b2SA3RqJYovHGfAEyQzMuEnXKVhx/view?usp=sharing)
- Extract the dataset to ./data/NTU-GAST-Skeleton
- We use the dataset of GAST60 (NTU-GAST60 Skeleton) as an example for description.
```bash
    cd ./data/gast60/
    # Preprocess .h5 file of skeletons to .pkl file
    python preprocess_gast60.py
    # Get the training and evaluation data
    python protocol_gast60.py
```

### NTU RGB+D dataset

We use the dataset of NTU60 RGB+D as an example for description. We need to first dowload the [NTU-RGB+D](https://github.com/shahroudy/NTURGB-D) dataset.

- Extract the dataset to ./data/ntu/nturgb+d_skeletons/
- Process the data
```bash
    cd ./data/ntu
    # Get skeleton of each performer
    python get_raw_skes_data.py
    # Remove the bad skeleton
    python get_raw_denoised_data.py
    # Transform the skeleton to the center of the first frame
    python seq_transformation.py
```

## Training

```bash
# For the CS setting
python  main.py --network ESN --train 1 --case 0
# For the CV setting
python  main.py --network ESN --train 1 --case 1
```

## Testing

- Test the pre-trained models (./results/NTU60/SGN/)
```bash
# For the CS setting
python  main.py --network ESN --train 0 --case 0
# For the CV setting
python  main.py --network ESN--train 0 --case 1
```

## Reference
- The NTU-GAST Skeleton dataset was generated by [GAST-Net](https://github.com/fabro66/GAST-Net-3DPoseEstimation)

- Note that some codes references [SGN](https://github.com/microsoft/SGN)


text:
Heretic
======

[![Build Status](https://travis-ci.org/jkloo/Heretic.png?branch=master)](https://travis-ci.org/jkloo/Heretic)
[![Coverage Status](https://coveralls.io/repos/jkloo/Heretic/badge.png?branch=master)](https://coveralls.io/r/jkloo/Heretic?branch=master)
[![PyPI Version](https://badge.fury.io/py/Heretic.png)](http://badge.fury.io/py/Heretic)

Heretic is a Generic Data model viewer and manipulator.

Why?
============
Traditionally any complex data that you might want to store gets dumped into a spreadsheet program with gobs of columns
and hosts of rows. Typically the first row in the spreadsheet contains descriptions of the fields below it. This is a
representation of some abstract object, a data model, and the rows below are instances of that object. This format
appeals to some due to the ability to hide and filter data you dont want out of the way, while still keeping multiple
entities visible on the screen at once. I think we can do better.

Spreadsheet programs fall short as your data grows. How well can you filter your data when you have 10 isntances, 100,
100000? What happens when your data model has 5 attributes, or 10, or 100. The answer is: you filter and hide information.

Ok, so I found the object that I wanted to look at after painstakingly filtering and hiding away information. But now I
want to see all similar objects. I want to see more information about this one instance that I worked so hard to find.
Insert more filtering, more hiding, more headaches.

We can do better, and we are just getting started.

> One data model should be able to reference other data models.

In ceratin software sects, projects begin with a requirements specification. This specification is a hierarchy of sorts
with usage/system level (read: general) requirements at the top, and generic descriptions of how the code will operate
at the bottom.

Here are data model is a hierarchy of data models. One data model should be able to reference other data models. Your
implementation details need to link all the way up to the usage requirements. To do this in a spreadsheet is maddening.
Spreadsheets have no means for an entire row of data (an instance) to reference another instance.

...

Getting Started
===============

Requirements
------------

* Python 3.3: http://www.python.org/download/releases/3.3.4/#download

Installation
------------

Heretic can be installed with 'pip':

    pip install Heretic

Or directly from the source code:

    git clone https://github.com/jkloo/Heretic.git
    cd Heretic
    python setup.py install

Basic Usage
===========

After installation, abstract base classes can be imported from the package:

    python
    >>> import heretic
    heretic.__version__

For Contributors
================

Requirements
------------

* GNU Make:
    * Windows: http://cygwin.com/install.html
    * Mac: https://developer.apple.com/xcode
    * Linux: http://www.gnu.org/software/make (likely already installed)
* virtualenv: https://pypi.python.org/pypi/virtualenv#installation
* Pandoc: http://johnmacfarlane.net/pandoc/installing.html

Installation
------------

Create a virtualenv:

    make env

Run the tests:

    make test
    make tests  # includes integration tests

Build the documentation:

    make doc

Run static analysis:

    make pep8
    make pylint
    make check  # pep8 and pylint

Prepare a release:

    make dist  # dry run
    make upload

repository: jkloo/Heretic

repo_name: jkloo/Heretic


text:
# Description
## Context
This dataset includes the crime agains women in India.

⭐ **RS_Session_246_AS11.csv**
#### About this file
Given dataset shows crime against women in India. It Contains two dataset including total and specific crime categories. It is dataset provided by Central Govt India.

#### Columns
1. States/UTs State Or Union Territory
2. Rape - 2015Rape in 2015
3. Rape - 2016Rape in 2016
4. Assaults (molestation) - 2015Assaults in 2015
5. Assaults (molestation) - 2016Assaults in 2016
6. Murder (women) - 2015Murder in 2015
7. Murder (women) - 2016Murder in 2016

⭐ **RS_Session_246_AU_98_1.1.csv**
#### About this file
Given dataset shows crime against women in India. It Contains two dataset including total and specific crime categories. It is dataset provided by Central Govt India.

#### Columns
1. State/UTState OR Union Territory
2. 2014 - Cases registeredCase registered in 2014
3. 2014 - Total rape CasesRape cases in 2014
4. 2015 - Cases registeredCase registered in 2015
5. 2015 - Total rape CasesRape cases in 2015
6. 2016 - Cases registeredCase registered in 2016
7. 2016 - Total rape CasesRape cases in 2016

#### Kaggle :
* [Kaggle Dataset](https://www.kaggle.com/martandsay/indian-women-rape-molestation-dataset)
* [Kaggle Kernel](https://www.kaggle.com/meemr5/safe-states-ut-for-women-in-india)

url: https://raw.githubusercontent.com/memr5/Machine-Learning-Portfolio/31a9430aa957949c3f9e05e696f25f7200e21263/Machine Learning/EDA/Crime Against Women in India/README.md


text:
# Forecat IO Api Client

Net core based REST API client for https://forecast.io/

Documentation and official API can be found by https://developer.forecast.io/

To use it please register and get API key

Latest changes:
* Added Azerbaijani language

repository: vgotra/MeteoClients

repo_name: vgotra/MeteoClients


text:
# Cash Launcher

[Video Demo][video demo] | [Live Demo][live demo]

This is the web app running on a user's mobile to control the custom-built
Cash Launcher.

## Architecture

This app connects to [the server][server] running in the Raspberry Pi that is
installed inside Cash Launcher. It uses WebSocket to transmit controlling data
like device orientation and swipe speed to the server in real-time. The server
uses such data to control the physical Cash Launcher, e.g. panning, tilting and
enabling the motor.

The app comes with 2 pages:

* Menu: provide a list of banknotes for users to choose.
* Stack: render the selected banknote as a stack of money. Users swipe up to
  dispense the banknote.

The app is built with Vue 3. Routing is handled by vue-router.
To achieve the best performance on mobile, the rendering of banknote stacks is
built with [konva][konva], an HTML 2d canvas library. rxjs is used to help
pipe data from user actions and device orientation events to WebSockets.

## UI Design

The original design can be found at [`design/design.sketch`][design].
The specimens of banknotes can be found in the
[`design/original-specimens`][specimens] folder.

## Development

### Available scripts

* Compiles and hot-reloads for development: `npm run dev`
* Compiles and minifies for production: `npm run build`
* Lints and fixes files `npm run lint`

### Customize configuration

See [Configuring Vite][conf].

[video demo]: https://www.youtube.com/watch?v=qdm6b15lcD4
[live demo]: https://cash.kiwiberry.nz/
[server]: https://github.com/rocwang/cash-launcher-server
[conf]: https://vitejs.dev/config/
[konva]: https://github.com/konvajs/konva
[design]: design/design.sketch
[specimens]: design

repository: rocwang/cash-launcher

repo_name: rocwang/cash-launcher


text:
- [ ] create a Python package structure
- [ ] generate chords
  - select base pitch
  - select chord type (a pitch class set)
  - make a chord of given type shifted by the base pitch
  - possibly duplicate some pitches
    - copy the root tone in the bottom octaves
    - copy any of the pitch classes to upper octaves

repository: yijiuzai/ml

repo_name: yijiuzai/ml


text:
# Machine Language Aids

This is a collection of aids to make programming in machine language easier.  It contains tables for the 6502 and generic 8-bit tables.  It is part of an accompanying article on the [TechTinkering](https://techtinkering.com) website:  [6502 Machine Language Tables and Aids](https://techtinkering.com/articles/6502-machine-language-tables-and-aids/).

# Contributions
Any corrections, advice or additions would be most welcome.  Please send a pull request. I would love to hear from you.

# Licence

  To the extent possible under law,

    Lawrence Woodman
  has waived all copyright and related or neighboring rights to
  this work.


text:
---
title: Media.GetMediaState()
layout: headunit-sdk
supported:
  - 2
  - 3
  - 4
type: api
---

### `Media.GetMediaState()`

| **Description** | Gets the state of the media currently connected.
| **Response** | *Number*  State of the media.
| **Parameter**   | *Void*

#### Example

```javascript
//Check the state of the media

if (Media.GetMediaState() === 2) {
	// Media currently playing
}
```

#### Remark

The possible values returned are the following :

Value | State
----|----
1 | stop
2 | play
3 | pause
4 | seek up
5 | seek down


text:
# Why Tuna

The need for scalable applications has been around for a long time, but it still requires effort and expertise to build scalable apps. It typically ends up looking like this:

![prototypical microservice](imgs/prototypical_microservice.png)

While this looks simple on the surface, it frequently is not. Complexity creeps in in many places. If you've built an app from scratch, you've likely had to cobble together Dockerfiles, build systems, containers, web servers, ORMs, and databases just to build some microservices.

This is where Tuna comes in. The goal of Tuna is to make microservice development as simple as possible. Given this goal, the following requirements emerge:
- Persisted and shared global state.
- NoQL: Developers should not have to use any query language to work with global state. This eliminates the need for developers to learn a query language.
- Easily define endpoints to expose business logic.
- Security primitives to easily secure endpoints.
- Gradual typing: Developers should be able to rapidly prototype and define types later.

As a result, developing scalable services in tuna is dramatically simplified. Developers may write code as if they have a [single system image](https://en.wikipedia.org/wiki/Single_system_image).

## Future Opportuntities
Looking ahead, a lot of exciting technical opportunities remain for Tuna:

### Static Analysis
Static analysis of Tuna can provide many interesting summaries. Tuna may be easily statically analyzed because Tuna compiles to the [Conder Intermediate Representation](https://github.com/Conder-Systems/conder). The intermediate representation is essentially a way to describe computations against global state and local state. This intermediate representation doesn't leak extra information like connecting to a database and query languages and is just JSON.

#### Capability Summary
Tuna can be reduced to a capability summary, a short description of what each role is capable of. Something like this is perfectly feasible:

Given code:

```
role user {
    name: string
}

const users = {}
...
user func delete() {
    users[caller.name].delete()
}

pub func delete(name) {
    users[name].delete()
}

```
We could summarize this to:
```
a user may:
    - delete
        - the value in users associated with the user's name
anyone may:
    - delete
        - any user
```

These summaries could be useful for ensuring that permissions are not unintentionally granted as code bases scale in size.

#### Stale State Warnings

Tuna could also warn users when they are performing some operation with stale state. Sometimes we are okay with using stale state.
Othertimes, we are definitely not. Consider:

```
const payments = {}
func process_payment(id) {
    const payment = payments[id]
    if payments[id].pending {
        ..send money
        payments[id].pending = false
    }
}
```
Stale state is used to make a literally costly decision here. Warning about conditions like this at compile time could reduce the number of race conditions in production.

### Data, Parallelism, and Performance Transparency
Data transparency means users don't know and are not concerned with where or how data is stored. This unlocks opportunities for optimization of microservices such as tiering cold data, caching hot data, and creating indexes.
Similarly, the parallelism transparency means execution of code is automatically parallelized. While Tuna doesn't have parallelism transparency today, the hope is to incrementally introduce it. One opporunitity for this is when some action is performed over very large datasets. For example:

```
...
for id in pending_payments.keys() {
    complete_payment(id)
}
...
```
Rather than loading the keys for all pending payments into memory on a single node and sequentially completing each payment. The dataset can be shared across many nodes and the payments can be performed in parallel.

These are optimizations that microservice developers manually implement, but in tuna it would be possible to automatically apply optimizations.

### Portability
One benefit of abstracting away query languages is that multiple underlying databases can be supported. If a user wanted to move their application from one database to another, they could do so without modifying any of their application code.

## Challenges

As Tuna grows in complexity, the challenge will be achieving performance equivalent to systems built by a developer making economical use of their query language. This challenge can be overcome by building a query planner into the compiler. Query planners exist in distributed query engines like Dremio or Presto. However, they are built to efficiently execute one query. The goal of the Tuna/Conder query planner would be to collapse actions against global state into the fewest number of requests possible.


text:
# Contributing to PSCache

You want to contribute to PSCache? That's awesome, thanks for taking the time to read this document! :tada:

## I've found a bug, how can I get it fixed?

Please [raise an issue](https://github.com/IISResetMe/PSCache/issues/new?assignees=&labels=bug&template=bug_report.md&title=) in this GitHub repo if you've found a bug, and fill in the bug report template.

repository: IISResetMe/PSCache

branch_name: refs/heads/development

gha_language: PowerShell

repo_name: IISResetMe/PSCache


text:
---
layout: post
title: "ASP.NET vNext on OSX and Linux Redux"
date: 2014-09-30 22:13:57 +0800
comments: true
categories: ASPNet vNext OSX Linux
---

Things have changed a fair bit since my last post back in May, and getting the latest and greatest ASP.NET vNext up and running with Mono is now reasonably straight forward,
so I thought I'd do a quick update on installing ASP.NET vNext on OSX and Linux.

### Install Mono

Xamarin now maintains Mono packages for OSX and most common Linux distributions, and are committed to a regular release schedule, so getting Mono up and running is now a much simpler affair. Currently, there are supported packages for Mono. Installation is generally as simple as adding the Xamarin repository to your packages sources, and importing their GPG key) and then installing. I am going to cover OSX and Ubuntu 14.04 here, but easy instructions for most distros can be found http://www.mono-project.com/docs/getting-started/install/linux/.

##### OSX

* Simply download the Mono MDK from http://www.mono-project.com/download/#download-mac and run the installer.

##### Ubuntu 14.04

* Add the Xamarin GPG key to apt
```
wget http://download.mono-project.com/repo/xamarin.gpg && sudo apt-key add xamarin.gpg
```
* Add the Xamarin repository to apt
```
sudo sh -c 'echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list'
```
* Update your package cache
```
sudo apt-get update
```
* Install the Mono development package
```
sudo apt-get install mono-devel
```

* We will need to install some certificates on Linux, to avoid getting an exception when downloading packages with nuget package restore. This is not required on OSX.
```
 sudo certmgr -ssl -m https://go.microsoft.com
 sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
 sudo certmgr -ssl -m https://nuget.org
 mozroots --import --sync
```

##### Check Your Mono Installation

* Open a new shell and type `mono --version`. You should be running Mono version 3.8.0 or newer.

    ![Mono Version](https://s3-ap-southeast-1.amazonaws.com/uploads-ap.hipchat.com/24631/1103057/CwcEnLnN2p3lZnh/upload.png)

If not, you probably still have an old version of Mono on your path. This might be the case if you had previously installed Mono from source (as per my last blog post). You will want to make sure you remove your old installation. Running `make clean` from the Mono source code folder is probably the best way to do this. Additionally, remove any other installation that may have been installed via a third party package manager such as homebrew on OSX.

### Install KVM and the K Runtime

* If your on Linux, you may need to install curl.
```
sudo apt-get install curl
```
_If you have any old (alpha) versions of kre installed, I recommend removing them from your system and starting fresh, and then starting a new shell. This will avoid any package sources being carried over in environment variables. I'm not going to paste the commands here, for fear of people nuking their LOLcats image collection accidentally and blaming me .. but effectively you just want to remove the `~/.kre` folder from your home directory, and start a new shell._

* Bootstrap your KVM installation by downloading and running the kvm install script from the [aspnet/Home](https://github.com/aspnet/Home) respository. We are using the `dev` branch here, which will download a kvm that is pointing at the feed for the latest beta packages. At the time of writing the master branch is still pointing at the alpha CTP.
```
curl https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.sh | sh && source ~/.kre/kvm/kvm.sh
```
* Install the latest K Runtime
```
kvm upgrade
```
* Verify the latest install
```
kvm list
k --version
```
![KVM installed](https://s3-ap-southeast-1.amazonaws.com/uploads-ap.hipchat.com/24631/1103057/Me72unTWXm3RF85/upload.png)

You should now have one of the latest betas installed. The active version from `kvm list` should reflect the actual version of kre that you see when you run `k --version`.

### Try out the Hello World vNext Demo from David Fowler's github repository

David Fowler has created a Demo app for OSX and Linux, and put it up in his [personal repository on GitHub](https://github.com/davidfowl/HelloWorldVNext). To check everything is working properly, we are going to clone it, and run it locally on our OSX or Linux installation.

* First, install "git" if you don't already have it. OSX users can get it from [git-scm.com](http://git-scm.com/download/mac), or on Ubuntu
```
sudo apt-get-install git
```
* Clone the HelloWorldVNext repository
```
git clone https://github.com/davidfowl/HelloWorldVNext.git
```
* Navigate into the HelloWorldVNext directory
```
cd HelloWorldVNext
```
* Restore Packages
```
kpm restore
```
* Navigate to the src/helloworldweb directory
```
cd src/helloworldweb
```
* Run the web application
```
k web
```
* Open a browser and go to http://localhost:5000. If everything is in order, you will see "Hello World" staring back at you ....

  ![Great Success](https://jabbrlive.blob.core.windows.net/jabbr-uploads/clipboard_cf58.png)

### Final Notes

The steps above are the bare minumum to get you up and running with vNext on Linux or OSX. The project is still (only barely) in beta, and is not ready the prime time yet. That being said, the ASP.NET vNext team at Microsoft have shown a huge commitment to cross platform support for the next iteration of ASP.NET. ASP.NET, running in production, on Linux, fully supported by Microsoft, __will be a thing__, and probably within the next twelve months. The time to get in there, get your hands dirty and kick the tires is now .. while the devs are ready and able to respond to your feedback.

If you have any problems or feedback, or just want to hang around and see what's going on, jump into the ASP.NET vNext chat channel at https://jabbr.net/#/rooms/AspNetvNext, there is almost always someone around.

repository: graemechristie/graemechristie

extension: markdown

repo_name: graemechristie/graemechristie


text:
---
title: DEX trades
author: Alex
date: 2021-12-08
description: Signal indicating a large trade occured on a DEX
---

## Definition

**DEX trade signal** indicates that an outstanding trade had happened on a DEX.

In order to identify "outstanding" trades the **top-7 trades over 7 days are considered**. If the new given trade amount is greater than the top-7 value, it's marked as "outstanding".

Provided metadata:
* dex_address  - DEX address
* dex_name  - DEX name
* tx_hash  - Transaction Hash
* taker_asset_id - Taker_token
* taker_amount  - Amount of taker_token  (measured in token units)
* taker_amount_usd - Amount of taker_token's in USD
* taker_address  - Taker's address
* maker_asset_id - Maker_token's
* maker_amount  - Amount of maker_token (measured in token units)
* maker_amount_usd - Amount of maker_token's in USD
* maker_address - Maker's address. Null if the trade happens via liquidity pool
* taker_token  - Taker_token  contract address
* maker_token  - Maker_token contract address

## Currently supported  DEXes:
* 0x
* Airswap
* Balancer
* Bancor
* Curve
* DDEX
* DEX.Top
* Etherdelta
* Gnosis
* IDEX
* KyberNetwork
* OasisDEX
* Synthetix
* TokenStore
* Uniswap
* dYdX
* Sushiswap

repository: santiment/academy

gha_language: JavaScript

repo_name: santiment/academy


text:
#The Bootstrap for Seaside project
## Introduction
### The project
The **[Bootstrap for Seaside][1]** helps you to easily use the [Bootstrap][2] library within your [Seaside][3] web application.

![Bootstrap for Seaside][4]
### Demo

A browsable **demo** can be found at [http://pharo.pharocloud.com/bootstrap][5].

### Project repository

Project repository can be found at [http://smalltalkhub.com/#!/~TorstenBergmann/Bootstrap][6]

There you will also find the documentation and install instructions.

#### Why should you use it
[Bootstrap][7] is a front-end toolkit for rapidly developing web applications. It is a collection of CSS and HTML conventions and design templates for typography, forms, buttons, navigation and other interface components. It helps to enforce a common and professional looking style for your own web application.

[Seaside][8] is one of the most powerful web framework ever invented - with its heretic approach it allows for reusability and by using the underlying language and tools it makes you very productive.

By combining the two frameworks using the **[Bootstrap for Seaside][9]** project (or "Bootstrap" for short) the advantages are on your side:

 - As a ***Seaside developer*** you can continue with your power framework and easily give your components a modern and fresh look with Bootstrap which can also be styled independently by a designer afterwards.

 - As a ***Bootstrap user*** you can use the power of Seaside to write reusable components and combine them to full working applications easily.

#### Did'nt we have similar projects in the past already

There were already two projects for Bootstrap and Seaside provided in the past:

  1. [http://ss3.gemstone.com/ss/TwitterBootstrap.html][10]
  2. [http://smalltalkhub.com/#!/~GastonDallOglio/TBootstrap][11]

Both can still be used but are outdated. They dont have a full test suite, provide no examples and do not rely on the latest Bootstrap version. So we would recommend to use the  **[Bootstrap for Seaside][12]** project since it comes with more than 160 tests and is up to date.

#### Migration

If you use one of the two before mentioned projects you can easily migrate your code. While project (1) uses the "TWBS" prefix and (2) the "TB" prefix for classes and selectors we use "TBS" as the prefix for classes and method selectors.

## Installation

### Installation using config browser

You can install the project from the Pharo configuration browser. [Just install and open a fresh Pharo 3.0 image][13], click on the desktop and select *"Tools"* -> *"Configuration Browser"* from the world menu. Select "Bootstrap" and click on install.

Note that by default it loads the Seaside3 framework as a dependent project - so if you started from a fresh and clean Pharo image you end up in a full Seaside development environment with the project on top of it.

### Installation using Gofer

You can also install the project using the built in *Gofer* class that allows you to automate the loading. Just open a workspace and evaluate:

    Gofer new
        url: 'http://smalltalkhub.com/mc/TorstenBergmann/Bootstrap/main';
        package: 'ConfigurationOfBootstrap';
        load.

    (Smalltalk at: #ConfigurationOfBootstrap) project stableVersion load

### Running the examples

The project comes with a set of examples that you can open in the webbrowser. First start the webserver:

     ZnZincServerAdaptor startOn: 8080

and then browse the examples at the following location: [http://localhost:8080/bootstrap][14]

![Project Intro page][15]

As you will see you will find nearly all Bootstrap components:

 - Well
 - Jumbotron
 - Panels
 - Alarms
 - Buttons
 - Breadcrumbs
 - Navs and Navbars
 - Tables
 - Pagination
 - ...

![Component example][16]

The examples are oriented towards the HTML examples given on the [Bootstrap website][17] and also show the according Smalltalk code. So you can easily see how to use the component set in your own projects.

## Architecture

### Package structure and naming conventions

The project contains three basic packages:

 - Bootstrap-Core
 - Bootstrap-Widgets
 - Bootstrap-Tests
 - Bootstrap-Examples

The classes use a "TBS" prefix and the method extensions the "tbs" prefix. The  "Bootstrap-Core" package includes core classes and styles, while "Bootstrap-Widgets" include additional widgets useful when working with Seaside.

The "Bootstrap-Tests" package includes tests in the form of SUnit tests. The example package "Bootstrap-Examples" include an examples browser and some demos that may give an understanding on how to use the components.

### Using the project in own applications

If you want to use the project in your own web project only the "Bootstrap-Core" package is required.

#### Registering the file libraries
To use the project just add the bootstrap file library to your Seaside application, depending on state of your project use either the ***TBSDevelopmentLibrary*** (for development) or ***TBSDeploymentLibrary*** (for production). Also note that the JQuery library is required.

    |app|
	app := WAAdmin register: self asApplicationAt: 'mykillerwebapp'.
	app
		addLibrary: JQDeploymentLibrary;
		addLibrary: TBSDeploymentLibrary

#### Write your code

You can now use the additional methods in your usual ***renderContentOn:*** methods for Seaside. Here is an example:

    renderContentOn: html
        html tbsContainer: [
            html text: 'A text within a bootstrap container']

Have a look at the various examples - they will show you how to use the components.

#### Tips & Tricks
Bootstrap has an easy and powerful mechanism to work with layouts. Have a look at the "Grid" examples that come with the project.

By default the Bootstrap positioned rows/columns are invisible. To easily find out if the layout is correct just use the message #showGrid: for a #tbsColumn. This will make the layout visible by adding a background color and border - so you can control the placement on the screen and resizing behavior. Note that this only works with the ***TBSDevelopmentLibrary*** file library, so it is not activated in production.

### Code Contributions

The project is MIT licensed and accepts contributions. If you want to contribute just check that your contributed code is covered by automatic tests and keeps the projects test suite green.

Also note that the Bootstrap library itself is under the Apache 2.0 license and adds a "*Copyright 2013 Twitter, Inc*".

### CI

The project is controlled by a CI server under: [https://ci.inria.fr/pharo-contribution/job/Bootstrap/][18]

![Build Status](https://ci.inria.fr/pharo-contribution/buildStatus/icon?job=Bootstrap)

## Thanks

**Thanks go to**

 - the Bootstrap team who invented the Bootstrap framework at Twitter (Mark Otto, Jacob Thornton and contributors)
 - the contributors of the first Seaside based [TwitterBootstrap][19] project (Nick Ager, Jan van de Sandt, Gastón Dall' Oglio, Tobias Pape, Tudor Girba, Paul DeBruicker, Francois Stephany, Philippe Marschall, Norbert Hartl, Yanni Chiu, Diego Lont)
 - to Gaston Dall Oglio (creator of [TBootstrap][20])
 - [pharocloud.com][21] for hosting the demo of the open source project

  [1]: http://smalltalkhub.com/#!/~TorstenBergmann/Bootstrap
  [2]: http://getbootstrap.com/
  [3]: http://www.seaside.st/
  [4]: http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131003/19ec8929/attachment-0007.png
  [5]: http://pharo.pharocloud.com/bootstrap
  [6]: http://smalltalkhub.com/#!/~TorstenBergmann/Bootstrap
  [7]: http://getbootstrap.com/
  [8]: http://www.seaside.st/
  [9]: http://smalltalkhub.com/#!/~TorstenBergmann/Bootstrap
  [10]: http://ss3.gemstone.com/ss/TwitterBootstrap.html
  [11]: http://smalltalkhub.com/#!/~GastonDallOglio/TBootstrap
  [12]: http://smalltalkhub.com/#!/~TorstenBergmann/Bootstrap
  [13]: http://files.pharo.org/platform
  [14]: http://localhost:8080/bootstrap
  [15]: http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131003/19ec8929/attachment-0005.png
  [16]: http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131003/19ec8929/attachment-0006.png
  [17]: http://getbootstrap.com
  [18]: https://ci.inria.fr/pharo-contribution/job/Bootstrap/
  [19]: http://ss3.gemstone.com/ss/TwitterBootstrap.html
  [20]: http://smalltalkhub.com/#!/~GastonDallOglio/TBootstrap
  [21]: http://www.pharocloud.com

repository: jecisc/Seaside-Bootstrap

repo_name: jecisc/Seaside-Bootstrap


text:
---
layout: default
language: en
title: Huayu Zhang

---
I am a Software Engineer in Facebook. I was a graduate student in the [Department of Electrical and Computer Engineering](http://www.engr.wisc.edu/ece.html) and [Computer Sciences](https://www.cs.wisc.edu/) at [University of Wisconsin-Madison](http://www.wisc.edu/). Before coming to UW-Madison, I received my B.E. from [Department of Engineering Physics](http://www.tsinghua.edu.cn/publish/ep/index.html), [Tsinghua University](http://www.tsinghua.edu.cn/publish/newthu/index.html).

- - -
# [News](#news)
* 03/2018 I joined [Facebook](https://www.facebook.com) as a software engineer.
* 12/2017 I graduated from University of Wisconsin-Madison.
* 05/2017-08/2017 I interned in [Facebook](https://www.facebook.com) traffic infrastructure team.
* 05/2016-08/2016 I interned in [Toshiba Medical Research Institute, USA](http://www.tmru.com/). I worked on PET image segmentation and registration.

- - -
# [Education](#edu)

- University of Wisconsin-Madison
    - Master of Science Computer Sciences, 2016 - 2017
    - Master of Science Electrical Engineering, 2015 - 2016
- Tsinghua University
    - B.E. Engineering Physics 2011-2015.
    - Outstanding undergraduate thesis. Advisor: [Yuxiang Xing](http://www.tsinghua.edu.cn/publish/epen/1733/2010/20101211172428918347272/20101211172428918347272_.html)

---
# [Projects](#prj)
1. [F2 Simulator](https://github.com/GUG11/F2-Simulator)
1. [High-dynamic-range Imaging](https://gug11.github.io/HDR/)
1. [Lock-Free Parallel Stochastic Gradient Descent(SGD) on dense data](https://gug11.github.io/parallelSGD/)
1. [Hacking xv6 kernel](https://github.com/GUG11/CS537-xv6)

---
# [Publications](#pub)
1. [Limited-angle Multi-energy CT using Joint Clustering Prior and Sparsity Regularization](http://dx.doi.org/10.1117/12.2214312)
  __Huayu Zhang__, Yuxiang Xing. SPIE Medical Imaging, San Diego, USA, 2016 (oral).
\[[paper](assets/papers/CPSR.pdf)\] \[[slides](assets/papers/CPSR_slides.pdf)\]
1. [Reconstruction of Limited-angle Duel-Energy CT Using Mutual Learning and Cross-Estimation (MLCE)](http://dx.doi.org/10.1117/12.2211224)
 __Huayu Zhang__, Yuxiang Xing. SPIE Medical Imaging, San Diego, USA, 2016 (poster).
 \[[paper](assets/papers/MLCE.pdf)\] \[[poster](assets/papers/MLCE_poster.pdf)\]
1. [Iterative Residual Based Deconvolution Partial Volume Correction for Brain PET-MR](assets/papers/IRD.pdf)
 Peng C, __Zhang H__, Wu J, Shao X, Chen Y, Li Q, Fakhr E G, and Ying. ISMRM 23rd Annual Meeting, Toronto, Canada, 2015, 2475.

gha_language: SCSS


text:
# HATEOASDualLayer
HATEOAS Dual Layer Proof-of-concept

## Modules
* `hateoas-dual-layer-backend` - REST HATEOAS API for single domain (here for simplicity one app for both Application and Security domain)
* `hateoas-dual-layer-frontend-facade` - REST HATEOAS front-end facade API

## Profiles

* `standalone` - run as standalone application
* `tomcat`- run in Tomcat server container
* `mock_data` - use mocked data
* `jpa_data` - use JPA to fetch data (must be used with one of database-specific profiles)
* `h2` - use h2 database (must be used in conjunction with profile `jpa_data`)

To run application correctly either `standalone` or `tomcat` profile and either `mock_data` or `jpa_data` profile must be enabled. If `jpa_data` profile is enabled, one of the database-specific profiles
should be enabled as well.

## Usage

Run

```bash
./mvnw clean package
java -Dspring.profiles.active=standalone -jar hateoas-dual-layer-backend/target/hateoas-dual-layer-backend-0.0.1-SNAPSHOT.war &
java -Dspring.profiles.active=standalone -jar hateoas-dual-layer-frontend-facade/target/hateoas-dual-layer-frontend-facade-0.0.1-SNAPSHOT.war &
```

or

```shell
mvnw clean package
start "" java -Dspring.profiles.active=standalone -jar hateoas-dual-layer-backend/target/hateoas-dual-layer-backend-0.0.1-SNAPSHOT.war
start "" java -Dspring.profiles.active=standalone -jar hateoas-dual-layer-frontend-facade/target/hateoas-dual-layer-frontend-facade-0.0.1-SNAPSHOT.war
```

to start the applications and navigate to [http://localhost:8000/swagger-ui.html](http://localhost:8000/swagger-ui.html) and [http://localhost:7000/swagger-ui.html](http://localhost:7000/swagger-ui.html)
to access Swagger UI for the Backend and Frontend Facade respectively.

### Tomcat deployment

#### By setting up local Tomcat installation

* Download Tomcat 8.5 or above.
* Create (or open if it already exists) file ${catalina.home}/bin/setenv.{bat,sh} depending on operating system.
* On Windows: Add line `set "CATALINA_OPTS=%CATALINA_OPTS% -Dspring.profiles.active=tomcat"` to file setenv.bat.
* On Unix/Linux/MacOSX: Add line `export CATALINA_OPTS="$CATALINA_OPTS -Dspring.profiles.active=tomcat"` to file setenv.sh.
* Copy hateoas-dual-layer-backend-0.0.1-SNAPSHOT.war to ${catalina.home}/webapps directory and rename it to backend.war
* Copy hateoas-dual-layer-frontend-facade-0.0.1-SNAPSHOT.war to ${catalina.home}/webapps directory and rename it to frontend-facade.war
* Start Tomcat using startup.{bat,sh} or catalina.{bat,sh} startup script depending in your operating system and personal preference.
* Navigate to [http://localhost:8080/backend/swagger-ui.html](http://localhost:8080/backend/swagger-ui.html) and [http://localhost:8080/frontend-facade/swagger-ui.html](http://localhost:8080/frontend-facade/swagger-ui.html)
to access Swagger UIs for both APIs.

#### Via Cargo Plugin

Run

```bash
./mvnw --projects hateoas-dual-layer-cargo-deployer cargo:run
```

or

```shell
mvnw --projects hateoas-dual-layer-cargo-deployer cargo:run
```

depending on your operating system to automatically download, setup and run Tomcat 9.0.1 with both backend and frontend facade applications deployed.

repository: Forinil/hateoas-dual-layer

gha_language: Java

repo_name: Forinil/hateoas-dual-layer


text:
### Directions

_Before opening an issue, search for similar bug reports or feature requests on GitHub Issues._
_If no similar issue can be found, fill out either the "Bug Report" or the "Feature Request" section below.
_Erase the other section and everything on and above this line._

### Bug report

__System info:__ [Including version, operating system name, and other relevant details]

__Steps to reproduce:__

1. [First Step]
2.

*Please note, the quickest way to fix a bug is to open a Pull Request.*

### Feature Request

Opening a feature request kicks off a discussion.
Requests may be closed if we're not actively planning to work on them.

__Proposal:__ [Description of the feature]

__Current behavior:__ [What currently happens]

__Desired behavior:__ [What you would like to happen]

__Use case:__ [Why is this important (helps with prioritizing requests)]

repository: nirnanaaa/asparagus

gha_language: Go

repo_name: nirnanaaa/asparagus


text:
---
title: Mixed-Integer Model Predictive Control
summary: Mixed-integer program to perform path-planning with model predictive control for simplified 2-D quadrotor environment
tags:
- Robotics
date: "2020-09-30T00:00:00Z"

# Optional external URL for project (replaces project detail page).
external_link: ""

image:
  caption: Image by Alan Papalia
  focal_point: Smart

links:
- icon: github
  icon_pack: fab
  name: GitHub
  url: https://github.com/alanpapalia/miqcp-planning

url_code: ""
url_pdf: ""
url_slides: ""
url_video: ""

# Slides (optional).
#   Associate this project with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides: ""
---

As part of MIT's course 16.413 I worked on a team to derive a model-predictive controller for a simulated quadrotor in a non-convex planning space. I used  SCIP, an open-source optimization software in conjunction with simplified quadrotor dynamics model to perform the path-planning subject to obstacle avoidance constraints.

Because objects could be placed arbitrarily within the environment, the planning problem was inherently non-convex. For this reason the problem was modeled as a mixed-integer problem.

In  this repo all of our work is shown in a Jupyter Notebook, along with a brief explanation of some relevant topics in optimization and a derivation of the quadrotor dynamics.

repository: alanpapalia/starter-academic

repo_name: alanpapalia/starter-academic


text:
---
layout: default
---

# 1993-12-30 - Paranoia Strikes Deep...

## Header Data

From: "L. Detweiler"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 3d4e5c88ef807d765de8ba30da2ac69353c675e2150f44a7133a8df188967e61

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-12-30 04:37:53 UTC

Raw Date: Wed, 29 Dec 93 20:37:53 PST

## Raw message

```
{% raw  %}From: "L. Detweiler"<EMAIL_ADDRESS>Date: Wed, 29 Dec 93 20:37:53 PST
To<EMAIL_ADDRESS>Subject: Paranoia Strikes Deep...
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Hello, I have been hearing some rumors about the cypherpunks
being `penetrated' by some spies and areas of the Internet
(mailing lists, newsgroups, private mail, journal articles, etc.)
being targeted with `tentacle' infiltrations. I thought this was
kind of fascinating to contemplate how they would behave. It
seems to me that loyalty is very hard to judge by mere email
messages alone, and that these hypothetical spies might take that
to their advantage. Here are some of the things that either
cypherpunk loyalists (cyberanarchists) or cy{b,ph}erwonk spies
might say to gain credibility and further `intelligence' from
insiders:

- L.Detweiler is insane, has sent death threats, is behind
S.Boxx, is involved in cyberspatial guerrila warfare, is the
mastermind of a spy plot, etc. He is the only person in the world
who cares about pseudospoofing. (All the complete ad hominem
fantasy stuff).

- `T.C. May and E.Hughes and J.Gilmore are all outstanding and
upstanding net citizens, have never pseudospoofed or done
anything wrong, and are the target of an anonymous smear campaign
by terrorists.'

- `I have been to cypherpunk meetings and parties, and I have met
all the people who have been accused of being tentacles, and they
are all real. In fact, I saw their drivers licenses.' `Someone
accused of being a tentacle actually lives with me.'

- There are no conspiracies whatsoever going on inside the
cypherpunks, including drug use by `leaders' or pseudospoofing or
other illegitimate activities.

-  Lies are liberating. `We have a right to lie to the media and
other people through tentacles.' One can make a game out of
infecting respectable media outlets like Wired and NYT with
elaborate deceptions.

- Pseudospoofing is liberating. `You are only as good as the
number of identities you can project on the internet; this is a
feature, not a bug.' The Enders Game book (Orson Scott Card?) is
an example of the liberating effect of pseudospoofing on freeing
people from their arbitrary prejudices about human identity and
accountability.

- There's no big deal about black marketeering or tax evasion.
Everyone does it. It's a survival tactic in a brutal world of
corrupt governments and massive corporations out to oppress the
little guy. We are entering a New World Order where anarchy will
rule and all governments will crumble.

- Blacknet is a harmless and visionary cyberspatial experiment
done by T.C.May.

- `Please take these annoying discussions about secret
conspiracies elsewhere.'

Of course, if any of these statements are by the spies, they are
just trying to build up your trust so that they can betray you
later when they have the proper opportunity. Or, sometimes, there
is the dictum that `intelligence is more valuable than
liquidation' and they may continue to deceive you just for the
valuable intelligence indefinately.

* * *

Then there may be some `tentacles' out there that are being
driven by the counterrevolutionaries bent on destroying the
Cyberanarchist movement and interested in getting some of their
own propaganda out there. These would be indistinguishable from
cy{b,ph}erwonk loyalists.

- L.Detweiler is brilliant, has made stellar net contributions,
has never sent death threats, no evidence exists that he is
behind S.Boxx, he has spoken out against cyberspatial guerrila
warfare, is the mastermind of a new mailing list but talk of a
spy plot is preposterous, etc. He is one of many in the world who
cares very seriously about pseudospoofing as all his writing in
e.g. RISKS and CUD attests.

- `Very little is know about T.C. May and E.Hughes and J.Gilmore
as far as their personalities, and in fact J.Gilmore has admitted
publicly to drug use, and all vehemently resist making
unequivocal public or private statements on pseudospoofing,
although they do seem to be the target of an anonymous smear
campaign by the anonymous person S.Boxx, but with some disturbing
elements of truth.'

- `I have never been to cypherpunk meetings and parties, and I am
suspicious of the behavior of many of the `people' L.Detweiler
has accused of being tentacles, because of the lack of verifiable
information and a sort of `cardboard cutout' flavor to their
personalities. There seems to be some desperate damage control
going on.'

- There seem to be some actual conspiracies going on inside the
cypherpunks, including drug use by `leaders' or pseudospoofing or
other illegitimate activities.

-  Lies are lies. `No one has a right to lie to the media or
other people through tentacles.' Anyone who makes a game out of
infecting respectable media outlets like Wired and NYT with
elaborate deceptions is malicious, depraved, and perverted.

- Pseudospoofing is perverted. Statements like `You are only as
good as the number of identities you can project on the internet;
this is a feature, not a bug.' are depraved and deluded. The
Enders Game book (Orson Scott Card?) is an example of the very
dangerous effect of pseudospoofing on manipulating people in
their assumptions and presumptions about human identity and
accountability, and for mind control and brainwashing.

- Black marketeering and tax evasion are evil. Though many
promote it, it is toxic to social harmony. Those that promote it
are all hypocrites who claim that they have found new societies
that are free of it, but have found only societies of poisonous
distrust and paranoia. The whole purpose of governments and
corporations is to serve people, and if they fail to do so they
need to be adjusted but not destroyed.

- `Please don't censor these fascinating discussions about secret
conspiracies and cyberanarchists.'

* * *

It's quite a pity that in Cyberspace, to borrow a phrase that is
rapidly becoming a cliche, no one knows if you are a spy. Perhaps
we can work together to build systems that minimize this kind of
rampant paranoia. It's really a shame that someone with a grudge
against any mailing list or its leaders could so disrupt its
smooth flowing operation with no repercussions. I have some ideas
for preventing this, and in fact I encourage anyone else who does
to join the Cy{ph,b}erwonks list and discuss these issues
associated with Electronic Democracy.

``The first casualty in war is the truth.'' There is a saying in
war, `shoot them all and let God sort them out.' Perhaps in these
turbulent times, this message represents a `list all the rumors
and let the People sort them out.' I hope the truth prevails in
Cyberspace as it does in the real world. Our own controversies,
such as those above, will serve as an interesting experiment.

{% endraw %}
```

## Thread

+ Return to [December 1993](/archive/1993/12)

+ Return to "["L. Detweiler" <ld231782@longs.lance.colostate.edu>](/authors/l_detweiler_ld231782_at_longs_lance_colostate_edu_)"

+ 1993-12-30 (Wed, 29 Dec 93 20:37:53 PST) - Paranoia Strikes Deep... - _"L. Detweiler"<EMAIL_ADDRESS>


text:
---
layout: default
---

# 1996-09-23 - RE: USA_exe

## Header Data

From: Brian D Williams<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: ee7441ef064ce4a450d79cb78b8c5d419d48f62130a3b7e5f645b79f8e4eaeed

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-09-23 20:52:26 UTC

Raw Date: Tue, 24 Sep 1996 04:52:26 +0800

## Raw message

```
{% raw  %}From: Brian D Williams<EMAIL_ADDRESS>Date: Tue, 24 Sep 1996 04:52:26 +0800
To<EMAIL_ADDRESS>Subject: RE: USA_exe
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

John<EMAIL_ADDRESS>posts:

>The Washington Post reports at length today on the Defense
>Department's disclosure yesterday of heretofore classified
>training manuals used in the School of the Americas to instruct
>Latino troops on killing a wide range of civilians for political
>purposes.

This is not particularly new news, I have a copy at home of one of
these manuals, it was put out by a humans rights group that got
their hands on it during all the El Salvador business.

It's as nasty as it sounds...

Further info on request.

Brian

"Semiautomatic's and Boundless Love."

{% endraw %}
```

## Thread

+ Return to [September 1996](/archive/1996/09)

+ Return to "[Brian D Williams <talon57@well.com>](/authors/brian_d_williams_talon57_at_well_com_)"

+ 1996-09-23 (Tue, 24 Sep 1996 04:52:26 +0800) - RE: USA_exe - _Brian D Williams<EMAIL_ADDRESS>


text:
# Google Http Client - Feign Client

This module is a feign [Client](https://github.com/OpenFeign/feign/blob/master/core/src/main/java/feign/Client.java) to use the java [Google Http Client](https://github.com/googleapis/google-http-java-client).

To use this, add to your classpath (via maven, or otherwise). Then configure Feign to use the GoogleHttpClient:

```java
GitHub github = Feign.builder()
                     .client(new GoogleHttpClient())
                     .target(GitHub.class, "https://api.github.com");
```

repository: OpenFeign/feign

repo_name: OpenFeign/feign


text:
# Command-line library for writing rust style shell scripts

Common rust command-line macros and utilities, to write shell-script like tasks
easily in rust programming language.
Available at [crates.io](https://crates.io/crates/cmd_lib).

## run_cmd! --> CmdResult
```rust
let name = "rust";
run_cmd!(echo $name)?;
run_cmd!(|name| echo "hello, $name")?;

// pipe commands are also supported
run_cmd!(du -ah . | sort -hr | head -n 10)?;

// or a group of commands
// if any command fails, just return Err(...)
let file = "/tmp/f";
let keyword = "rust";
if run_cmd! {
    cat ${file} | grep ${keyword};
    echo "bad cmd";
    ls -l /nofile;
    date;
}.is_err() {
    eprintln!("Run group command failed");
}
```

## run_fun! --> FunResult
```rust
let version = run_fun!(rustc --version).unwrap();
eprintln!("Your rust version is {}", version);

// with pipes
let n = run_fun!(echo "the quick brown fox jumped over the lazy dog" | wc -w).unwrap();
eprintln!("There are {} words in above sentence", n);
```

## Builtin commands
### cd
cd: set procecess current directory
```rust
run_cmd! {
    cd /tmp;
    ls | wc -l;
};
```
Notice that builtin `cd` will only change with current scope
and it will restore the previous current directory when it
exits the scope.

Use `std::env::set_current_dir` if you want to change the current
working directory for the whole program.

## Complete Example
See `examples` directory, which contains a tetris game converted from bash implementation.

## Related

See [rust-shell-script](https://github.com/rust-shell-script/rust-shell-script/), which can compile
rust-shell-script scripting language directly into rust code.


text:
### Automated Visual/Layout Testing

The purpose of automated visual/layout testing is to help you determine when something has changed the layout of a web page. Rather than comparing screenshots, a more effective way is to compare HTML tags at different points in time on the same web page. If a change is detected, it could mean that something broke on the webpage, or it might be something harmless like a website redesign or dynamic content loading on the web page. To handle automated visual/layout testing, SeleniumBase uses the ``self.check_window()`` method, which can set visual baselines for comparison and then compare the latest versions of web pages to the existing baseline.

The first time a test calls ``self.check_window()`` for a unique "name" parameter provided, it will set a visual baseline, meaning that it creates a folder, saves the URL to a file, saves the current window screenshot to a file, and creates the following three files with the listed data saved:
* tags_level1.txt  ->  HTML tags from the window
* tags_level2.txt  ->  HTML tags + attributes from the window
* tags_level3.txt  ->  HTML tags + attributes/values from the window

Baseline folders are named based on the test name and the name parameter passed to ``self.check_window()``. The same test can store multiple baseline folders.

If the baseline is being set/reset, the "level" doesn't matter.

After the first run of ``self.check_window()``, it will compare the HTML tags of the latest window to the one from the initial run.
Here's how the level system works:
* level=0 ->
    DRY RUN ONLY - Will perform a comparison to the baseline, and
                   print out any differences that are found, but
                   won't fail the test even if differences exist.
* level=1 ->
    HTML tags are compared to tags_level1.txt
* level=2 ->
    HTML tags are compared to tags_level1.txt and
    HTML tags/attributes are compared to tags_level2.txt
* level=3 ->
    HTML tags are compared to tags_level1.txt and
    HTML tags + attributes are compared to tags_level2.txt and
    HTML tags + attributes/values are compared to tags_level3.txt

As shown, Level-3 is the most strict, Level-1 is the least strict. If the comparisons from the latest window to the existing baseline don't match, the current test will fail, except for Level-0 tests.

You can reset the visual baseline on the command line by using:
    ``--visual_baseline``
As long as ``--visual_baseline`` is used on the command line while running tests, the ``self.check_window()`` method cannot fail because it will rebuild the visual baseline rather than comparing the html tags of the latest run to the existing baseline. If there are any expected layout changes to a website that you're testing, you'll need to reset the baseline to prevent unnecessary failures.

``self.check_window()`` will fail with "Page Domain Mismatch Failure" if the page domain doesn't match the domain of the baseline.

If you want to use ``self.check_window()`` to compare a web page to a later version of itself from within the same test run, you can add the parameter ``baseline=True`` to the first time you call ``self.check_window()`` in a test to use that as the baseline. This only makes sense if you're calling ``self.check_window()`` more than once with the same name parameter in the same test.

Automated Visual/Layout Testing with ``self.check_window()`` is not very effective for websites that have dynamic content that changes the layout and structure of web pages. For those, you're much better off using regular SeleniumBase functional testing.

Example usage:
```
    self.check_window(name="testing", level=0)
    self.check_window(name="xkcd_home", level=1)
    self.check_window(name="github_page", level=2)
    self.check_window(name="wikipedia_page", level=3)
```


text:
### Staging Environment

Delivers a release to a pre-production environment.

![Pipeline - Staging](img/pipeline-staging.svg) <!-- .element: style="border:0;background-color:inherit;box-shadow:none;height:3em" -->

Note:
* production-like
* see site before it published


text:
## Introduction

Ever heard of Frosty the Snowman? He’s like a winter Frankenstein’s monster, product of some children’s handiwork and a magical top hat. Let’s depict this legend with a bit of ascii art.

For this problem there will be no input.
Print out the ascii art of a snowman exactly as below.

## Sample Output

```
   _[_]_
    (")
'--( : )--'
  (  :  )
""'-...-'""
```


text:
# playful-design

> React components for playful applications

[![NPM](https://img.shields.io/npm/v/playful-design.svg)](https://www.npmjs.com/package/playful-design) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save playful-design
```

## Usage

```tsx
import * as React from 'react'

import MyComponent from 'playful-design'

class Example extends React.Component {
  render () {
    return (
      <MyComponent />
    )
  }
}
```

## License

MIT © [nildo](https://github.com/nildo)

repository: nildo/playful-design

gha_language: TypeScript

repo_name: nildo/playful-design


text:
+++
Title = "Location"
Type = "event"
Description = "Location for DevOpsDays Copenhagen 2018"
+++

<br/>
**DevOps Days Copenhagen is being hosted at [Mogens Dahl Koncertsal](http://www.mogensdahl.dk/en/konferencer-events/event-2/ "Website of Mogens Dahl"), Snorresgade 22, 2300 Copenhagen S.**

### Parking

There are parking spots right outside the venue at Copenhagen's cheapest parking rates.

### Public transport

The **Bus 250S** goes straight to the venue: stop at **Kigkurren**.
The Metro stop **Islands Brygge** is a 8-minute walk from the venue.

{{< event_map >}}

repository: xiaotianguo/devopsdays-web

gha_language: HTML

repo_name: xiaotianguo/devopsdays-web


text:
# stock-market-python-utils
Python util functions to capture and evaluate stock market data

## License

**stock-market-python-utils** is licensed under an Apache-2.0 license

repository: smiguelnet/stock-market-python-utils

repo_name: smiguelnet/stock-market-python-utils


text:
# mining

## Setup
Installing dependencies:
```bash
pip install -r requirements.txt
```

## Gephi
In order to visualize computed betweenness centrality in Gephi use `*.gml` files
You may also try loading `ed_plot.gephi`, though it will probably not work because of differing paths between systems.

## Recomputing .gml files
In case you wanted to recompute one of the .gml files.

1. Specify, which file you want to use as input dataset
```python
MAP_FILE: str = SMALL_KRK
# or
MAP_FILE: str = KRK
```

2. Run the computations
```bash
python main.py
```

repository: mrapacz/mining

repo_name: mrapacz/mining


text:
# [Bits Battle](https://www.codewars.com/kata/bits-battle "https://www.codewars.com/kata/58856a06760b85c4e6000055")

The odd and even numbers are fighting against each other!

You are given a list of positive integers. The odd numbers from the list will fight using their `1` bits from their binary representation, while the even numbers will fight using their `0` bits. If present in the list, number `0` will be neutral, hence not fight for either side.

You should return:

* `odds win` if number of `1`s from odd numbers is larger than `0`s from even numbers
* `evens win` if number of `1`s from odd numbers is smaller than `0`s from even numbers
* `tie` if equal, including if list is empty

Please note that any prefix that might appear in the binary representation, e.g. `0b`, should not be counted towards the battle.

## Example:

For an input list of `[5, 3, 14]`:

* odds: `5` and `3` => `101` and `11` => four `1`s
* evens: `14` => `1110` => one `0`

Result: `odds win` the battle with 4-1

repository: ParanoidUser/codewars-handbook

repo_name: ParanoidUser/codewars-handbook


text:
# Contributing

Contributions are very welcome in many forms :)

## Issues

If you find a problem with any of the examples, please [file an issue on Github](https://github.com/brianegan/flutter_architecture_samples/issues).

## Merge Requests / New Apps

If you would like to fix a bug or make an improvement, please [file a pull request](https://github.com/brianegan/flutter_architecture_samples/pulls) explaining your changes!

For larger changes, such as a including a new app, please submit an Issue before you
begin or submit a "Work In Progress" Merge request that gives an overview of the changes you'd
like to make and the reasoning behind it!

### Code Hygiene

  * Ensure your updates follow the app spec
  * Ensure your code is properly formatted with `dartfmt`
  * Please ensure tests are up to date
  * Verify `dartanalyzer` isn't throwing any warning or errors/

gha_language: Dart


text:
[![!Build Status](https://travis-ci.org/sanity-io/litter.svg?branch=master)](https://travis-ci.org/sanity-io/litter)

# Litter

**Litter is a pretty printer library for Go data structures to aid in debugging and testing.**

---

Litter is provided by

	Sanity: The Headless CMS Construction Kit

---

Litter named for the fact that it outputs *literals*, which you *litter* your output with. As a side benefit, all Litter output is syntactically correct Go. You can use Litter to emit data during debug, and it's also really nice for "snapshot data" in unit tests, since it produces consistent, sorted output. Litter was inspired by [Spew](https://github.com/davecgh/go-spew), but focuses on terseness and readability.

### Basic example

This:

```go
type Person struct {
	Name   string
	Age    int
	Parent *Person
}

litter.Dump(Person{
	Name:   "Bob",
	Age:    20,
	Parent: &Person{
		Name: "Jane",
		Age:  50,
	},
})
```

will output:

```
Person{
	Name: "Bob",
	Age: 20,
	Parent: &Person{
		Name: "Jane",
		Age: 50,
	},
}
```

### Use in tests

Litter is a great alternative to JSON or YAML for providing "snapshots" or example data. For example:

```go
func TestSearch(t *testing.T) {
	result := DoSearch()

	actual := litterOpts.Sdump(result)
	expected, err := ioutil.ReadFile("testdata.txt")
	if err != nil {
		// First run, write test data since it doesn't exist
		if !os.IsNotExist(err) {
			t.Error(err)
		}
		ioutil.Write("testdata.txt", actual, 0644)
		actual = expected
	}
	if expected != actual {
		t.Errorf("Expected %s, got %s", expected, actual)
	}
}
```

The first run will use Litter to write the data to `testdata.txt`. On subsequent runs, the test will compare the data. Since Litter always provides a consistent view of a value, you can compare the strings directly.

### Circular references

Litter detects circular references or aliasing, and will replace additional references to the same object with aliases. For example:

```go
type Circular struct {
	Self *Circular
}

selfref := Circular{}
selfref.Self = &selfref

litter.Dump(selfref)
```

will output:

```
Circular { // p0
	Self: p0,
}
```

## Installation

```bash
$ go get -u github.com/sanity-io/litter
```

## Quick start

Add this import line to the file you're working in:

```go
import "github.com/sanity-io/litter"
```

To dump a variable with full newlines, indentation, type, and aliasing information, use `Dump` or `Sdump`:

```go
litter.Dump(myVar1)
str := litter.Sdump(myVar1)
```

### `litter.Dump(value, ...)`

Dumps the data structure to STDOUT.

### `litter.Sdump(value, ...)`

Returns the dump as a string

## Configuration

You can configure litter globally by modifying the default `litter.Config`

```go
// Strip all package names from types
litter.Config.StripPackageNames = true

// Hide private struct fields from dumped structs
litter.Config.HidePrivateFields = true

// Hide fields matched with given regexp if it is not nil. It is set up to hide fields generate with protoc-gen-go
litter.Config.FieldExclusions = regexp.MustCompile(`^(XXX_.*)$`)

// Sets a "home" package. The package name will be stripped from all its types
litter.Config.HomePackage = "mypackage"

// Sets separator used when multiple arguments are passed to Dump() or Sdump().
litter.Config.Separator = "\n"

// Use compact output: strip newlines and other unnecessary whitespace
litter.Config.Compact = true

// Prevents duplicate pointers from being replaced by placeholder variable names (except in necessary, in the case
// of circular references)
litter.Config.DisablePointerReplacement = true
```

### `litter.Options`

Allows you to configure a local configuration of litter to allow for proper compartmentalization of state at the expense of some comfort:

``` go
	sq := litter.Options {
		HidePrivateFields: true,
		HomePackage: "thispack",
		Separator: " ",
	}

	sq.Dump("dumped", "with", "local", "settings")
```

## Custom dumpers

Implement the interface Dumper on your types to take control of how your type is dumped.

``` go
type Dumper interface {
	LitterDump(w io.Writer)
}
```

Just write your custom dump to the provided stream, using multiple lines divided by `"\n"` if you need. Litter
might indent your output according to context, and optionally decorate your first line with a pointer comment
where appropriate.

A couple of examples from the test suite:

``` go
type CustomMultiLineDumper struct {}

func (cmld *CustomMultiLineDumper) LitterDump(w io.Writer) {
	w.Write([]byte("{\n  multi\n  line\n}"))
}

type CustomSingleLineDumper int

func (csld CustomSingleLineDumper) LitterDump(w io.Writer) {
	w.Write([]byte("<custom>"))
}
````

repository: jesseduffield/lazygit

repo_name: jesseduffield/lazygit


text:
# AWS CloudFormation Linting in Team City and GitHub

> TLDR; Use cfn-lint in your build pipeline to ensure the quality of AWS CloudFormation templates as part of your code build and deployment process.

It's important to ensure the quality of **all** the code artifacts your team is creating.  Even if it's configuration as code.   We have been using CloudFormation templates for provisioning our AWS environments.  There's a great Python package provided by AWS called [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) that you can use to lint your CloudFormation templates and ensure they are syntactically correct and well-formed.

We integrated this tool into our build pipeline in Team City and GitHub by adding a PowerShell build step:

```powershell
$yamlErrors = cfn-lint **/*.yaml -i W

if ($yamlErrors)
{
    $yamlErrors | Foreach { $errorString = $errorString + "$($_) `r`n"}
    write-error $errorString
}
```

This runs cfn-lint against all files ending with .yaml in any subdirectories of the current folder.  This works well since our CloudFormation templates are currently under the same root folder.  If you have CloudFormation templates distributed differently you may need different directory and glob patterns.

> The -i W tells cfn-lint to ignore warnings so that only errors are reported in the build pipeline.

### Team City VCS Trigger
In our Team City  build we have a VCS build trigger that watches for new branches or commits to existing branches and kicks off the build task to lint the templates.   You can even configure this build trigger to only run when the file matches a given expression and only run it when there are changes to CloudFormation templates.

### Team City Commit Status Publisher
Then we use a commit status publisher build feature to report the results of the build back to GitHub.  These show up in GitHub as checks and can even be used as branch constraints.  Allowing you to prevent merging into the main branch without a successful run of the build.

repository: essenceofcode/BlogPosts

repo_name: essenceofcode/BlogPosts