text:
# firesite_backend
Server-side code to accompany firesite repo

The [Firesite](https://github.com/dfb/firesite) project combines some code/steps I found myself repeating over and over while building some small websites on top of [Firebase](https://firebase.google.com/). The code in this repo assists in developing the server side / cloud functions. Ideally it'd live in the same repo as Firesite, but I spent way too much time battling Node and other tools trying to get that to work (I don't want websites to fork this project, but to just use the code in a way that's easy to keep them up to date as more features are added), so for now I'm punting and splitting things into two separate projects.

This project supplies a ready-made backend login function (assuming you are willing to abide by its conventions), some ease-of-use helpers, and some wrappers for making it easier to expose APIs to the client side of things.

# Setup
It is assumed that you've already been through the setup work for setting up a Firesite project.

1. Create a 'functions' directory if one does not already exist (and if it did not exist, run 'npm init' in it).
1. `cd` into the functions dir.
1. Run `git clone git@github.com:dfb/firesite_backend.git firesite`
1. Run `npm i uuid firebase-admin firebase-functions`
1. Run `cp firesite/starter_files/* .`

# Usage
If all you need to do is support logging in, the instructions in the Setup section are sufficient. If you want to expose additional cloud functions to call from your website, define them and expose them in the `firesite.jsonapis.Expose` line. See `jsonapis.js` for information on conventions, especially on controlling access. Be careful that you don't expose powerful functions to anonymous users!

To deploy modifications: `firebsae deploy --only functions`


text:
# redux-form-antd
This is  bindings for redux form and redux form antd.
This library should be compatible for both redux-form and react-final-form.
Stories for final form are welcome.

[![NPM Downloads](https://img.shields.io/npm/dm/redux-form-antd.svg?style=flat)](https://www.npmjs.com/package/redux-form-antd)
---
[`redux-form-antd`](https://github.com/zhdmitry/redux-form-antd) is a set of
wrappers to facilitate the use of antd components with
[`redux-form`](https://github.com/erikras/redux-form).

---

## [Live Demo](http://zhdmitry.github.io/redux-form-antd) :eyes:

## Installation

Using [npm](https://www.npmjs.org/):

```bash
  $ npm install --save redux-form-antd
```

## Available Components

- Select
- Radio Buttons
- DatePicker
- MonthPicker
- NumberField
- TextField
## Usage

Rather than import your component class from `antd`, import it from `redux-form-antd`
and then pass the component class directly to the `component` prop of `Field`.

```js
import { reduxForm, Field } from 'redux-form'
import {
  SelectField,
  TextField,
} from 'redux-form-antd'

class MyForm extends Component {
  render() {
    return (
      <form>
        <Field name="username" component={TextField} placeholder="Street"/>
      </form>
    )
  }
}

// Decorate with redux-form
MyForm = reduxForm({
  form: 'myForm'
})(MyForm)

export default MyForm
```
or you can check stories code [click](https://github.com/zhDmitry/redux-form-antd/blob/master/stories/TextInput.js)
## Instance API

#### `getRenderedComponent()`

Returns a reference to the UI component that has been rendered. This is useful for
calling instance methods on the UI components. For example, if you wanted to focus on
the `username` element when your form mounts, you could do:

```js
componentWillMount() {
  this.refs.firstField
    .getRenderedComponent()
    .getRenderedComponent()
    .focus()
}
```

as long as you specified a `ref` and `withRef` on your `Field` component.

```js
render() {
  return (
    <form>
      ...
      <Field name="username" component={TextField} withRef ref={r=>(this.textField = r)}/>
      ...
    </form>
  )
}
```

---
inspired by redux-form-material-ui by [erikras](https://github.com/erikras/redux-form-material-ui)

license: MIT

repository: FatalTouch/redux-form-antd

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: FatalTouch/redux-form-antd


text:
# git-feature

**Work in progress**

## Installation

**Homebrew (macOS)**

```
brew tap josa42/homebrew-git-tools
brew install git-feature
```

**Other**

```
go get github.com/josa42/git-feature
```

## Usage

```
Usage:
  git-feature
  git-feature create
  git-feature list
  git-feature sync
  git-feature publish
  git-feature delete

Options:
  -h --help          Show this screen.
  --version          Show version.
```

## License

MIT (See [license.md](license.md))


text:
![](https://img.shields.io/david/evertdespiegeleer/PrettyEarth.svg) ![](https://img.shields.io/github/languages/code-size/evertdespiegeleer/PrettyEarth.svg) ![](https://img.shields.io/github/license/evertdespiegeleer/PrettyEarth.svg) ![](https://img.shields.io/github/release/evertdespiegeleer/PrettyEarth.svg)

## :information_source: About The Project

Our planet is a beautiful place. The [Google Chrome Earth View extension](https://chrome.google.com/webstore/detail/earth-view-from-google-ea/bhloflhklmhfpedakmangadcdofhnnoh) by Google is a wonderful way to deliver stunning satellite images to us every time we open a new tab, inspiring us on our next web adventure. But why stop there? Why don't get impressed by these the wonders of the earth as well when gazing at this more important rectangle on our screen, our **wallpaper**. PrettyEarth now grants you the opportunity to bring our blue marble to your desktop.

PrettyEarth can be downloaded from the [website »](https://prettyearth.evertdespiegeleer.com)
## :city_sunrise: Screenshots

## :space_invader: Technitcal

### :hammer: Structure

PrettyEarth is [Electron](https://electronjs.org/) based. It is, to be more particular, based around the [menubar](https://www.npmjs.com/package/menubar)-package.

Currently, only macOS is supported. However, adaptation on other operating systems will be provided in the future. Few modifications are needed.

### :bug: Known issues and future developements
- [ ] Windows support

### :construction_worker: Build

Use the package manager [npm](https://www.npmjs.com/) to install dependencies and build PrettyEarth.

```bash
npm install
npm run package-mac
```

### :blue_heart: Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

### :page_facing_up: License
PrettyEarth is available under the [MIT](https://choosealicense.com/licenses/mit/) license.

### :coffee: Coffee!
[](https://www.buymeacoffee.com/evertds "Buy me a coffee")

repository: evertdespiegeleer/PrettyEarth

gha_language: JavaScript

gha_license_id: MIT

repo_name: evertdespiegeleer/PrettyEarth


text:
## How to use

```javascript
npm i
npm run dev
```

open http://localhost:3000/ in your browser

## Environment variables

You can access your .env variables by deconstructing 'process.env' object, both on client and server.
Just make sure that you reboot the server when updating .env file.

repository: Sebastp/lcpTest

repo_name: Sebastp/lcpTest


text:
---
title: xargs
description: Notes on 'xargs' command
first-published: 2013-12-27
---

*   [10 Xargs Command Examples in Linux / UNIX](http://www.thegeekstuff.com/2013/12/xargs-examples/)

repository: marios-zindilis/website-sources

branch_name: refs/heads/main

repo_name: marios-zindilis/website-sources


text:
---
layout: page
title: About
permalink: /about/
---

<img src="{{ site.baseurl }}/assets/profile-placeholder.gif" title="Profile Picture" class="profile">

Team Wisp is a student team from [Breda University of Applied Sciences](https://www.buas.nl/) working on a cutting-edge real-time ray-tracing framework. To showcase the power of their framework, they are actively developing a Maya plug-in.

This plug-in will bring real-time fully-lit rendered scene to the Maya viewport, eliminating the need to check a "slow" path tracer every time an artist would like to see the results of their work. This will result in a better workflow and more time spent iterating on the models instead of waiting for the existing "slow" renderers.

[Wisp](https://github.com/TeamWisp/Procedural-Ray-Tracing) is a real-time ray-tracing library built on top of [Direct3D 12](https://docs.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-graphics) and [DXR](https://blogs.msdn.microsoft.com/directx/2018/03/19/announcing-microsoft-directx-raytracing/). All low-level code is abstracted for the end-user, which makes it easier to integrate this framework in your own application without the need for a dedicated graphics programmer.

You can find out more about Wisp on the [Wiki page](https://teamwisp.github.io/).

---

- [Wisp Wiki](https://teamwisp.github.io/)
- [Wisp Framework](https://github.com/TeamWisp/Procedural-Ray-Tracing/)
- [Wisp Maya plug-in](https://github.com/TeamWisp/Maya-Ray-Traced-Viewport-Plugin/)

repository: TeamWisp/WispBlog

repo_name: TeamWisp/WispBlog


text:
# FIFO.js
Node.js module provides a class which handles a fifo file.

npm: https://www.npmjs.com/package/fifo-js

## Installation
```sh
npm install fifo-js
```

## Usage
### Example
```Javascript
const FIFO = require('fifo-js')

let fifo = new FIFO()

fifo.read(console.log.bind(console))

fifo.write('foo')

fifo.close()
```

### Create fifo
The constructor creates a new fifo in /tmp/ if a path isn't provided. If a path
is provided and there's an existing fifo with that name it uses that one.
Otherwise it creates a new one with that name.
```Javascript
let fifo = new FIFO([path])
```

### Read
#### Asynchronous
```Javascript
fifo.read(callback)

callback:Function(data:String)
```

#### Synchronous
```Javascript
fifo.readSync()
```

#### Example
```Javascript
fifo.read(text => {
    // 'text' contains the text which was read from the fifo.
})

let text = fifo.readSync()
// 'text' contains the text which was read from the fifo.
```

### Listener
This function will read and call the callback for each message until the fifo
is closed. If read or readSync is called after a reader is set a FIFOError is
thrown.
```Javascript
fifo.setReader(text => {
    // 'text' contains the text which was read from the fifo.
})
```

### Write
When writing the boolean flag 'trim' can be supplied. This prevents a
trailing new line to be added.

#### Asynchronous
```Javascript
fifo.write(data:String, trim:Boolean, callback:Function())
```

#### Synchronous
```Javascript
fifo.writeSync(data:String, trim:Boolean)
```

#### Example
```Javascript
fifo.write(text, () => {
    // The written text has been read.
})

fifo.writeSync(text, true)
// The written text has been read.
```

### Close
```Javascript
fifo.close()
```

## Contact
* http://oskarnyberg.com
*<EMAIL_ADDRESS>
## Licence
MIT: https://opensource.org/licenses/MIT

repository: raksooo/fifo-js

repo_name: raksooo/fifo-js


text:
---
title: 'Why I Love Pantheon for Drupal Hosting '
templateKey: blog-post
date: 2014-02-25T14:55:29.000Z
category:
  -Drupal, Tools of the Trade
alias: why-i-love-pantheon-drupal-hosting
summary: >
 We have been using Pantheon for several months now and I am ready to declare it a strong winner for us. If you haven't experienced it, Pantheon is a hosting platform that is optimized for Drupal.
author: JD Collier
image: /assets/1004449_627382883946367_495381272_n.jpg
---

We have been using [Pantheon](https://pantheon.io/) for several months now and I am ready to declare it a strong winner _for us_. If you haven't experienced it, Pantheon is a hosting platform that is optimized for Drupal.

I've used so many hosting platforms — from tiny GoDaddy hosting plans to beefy dedicated servers with Rackspace Cloud Sites and Rackspace Cloud servers in betweeen. I love several things about Pantheon and that is what I wanted to focus on today.

Time-savers
-----------

### Dev -> Test -> Live

![](/assets/dev-test-live-environments.png)Every site on Pantheon gets a Dev, Test and Live environment.

You edit your files and database and then migrate with a click into the Test environment. Then you can migrate to the Live environment.

At each stage, you can choose if you want to migrate only files or if you want to also migrate the Drupal database.

Of course, I can do this on my own on a server where I have command line and use Drush. It is simple with Drush as well, but it is not quite so point and click easy.

The biggest benefit comes from zero time setting up a server. I just fill out a wizard to create the new site and environments and the rest comes with it.

### Git version control

Git is baked in...with flexibility to use SFTP as well.

![](/assets/git-sftp-combined_0.png)

I can add theme files and modules through Git workflow and quickly add them via SFTP; Pantheon inserts the files into the Git workflow for me. I love this!

When I upload a file with SFTP, Pantheon sees it immediately and asks for the commit message to add the files into Git. Then, I can migrate the code from Dev to Production.

### Status checks

Pantheon automatically runs a number of status checks on your site. This is much more in-depth than a Drupal Status Report. It reports on Database usage, a few best practices in Drupal setups, caching (Pantheon uses Varnish), modules best practices, Views caching status, and error log warning.

The great part about this is the fact that they aren't just warnings. Each warning lists instructions and recommendations on fixes to your site.

![](/assets/status-checks.png)

### Backups

Backups are a simple click and they begin daily backups for Drupal, the file system and the database. A click or two — that is all it took.

Drawbacks
---------

I've only run into two issues so far with Pantheon.

**First**: Their Apache Solr implementation. The way Pantheon has Solr set up, you aren't able to modify the stopwords.txt files and a couple of other Solr settings. I can't imagine this being a large issue for 99% of the sites out there, but I have one where the word "will" is included in the stopwords.txt file that cannot be edited. This website has a lot of information about "Wills" (like after you die, you leave a will). Solr stop words help prevent common words from being searched like "I will" (used as a verb). Pantheon support says they have a solution for this issue coming in a few months.

**Second**: Pantheon's Varnish implementation is especially aggressive. This makes sites very responsive and that's awesome. On the downside, those outlier scenarios where you need customized data based on a cookie value require a little extra effort. They do have a few ways to [bypass cache](https://pantheon.io/docs/articles/sites/varnish/), but they don't work for all scenarios. I have a site where I had to implement [ESI](https://www.drupal.org/project/esi) (Edge Side Includes). ESI seems to be working, but we're still testing.

**Third**: Price. There is too much of a jump in price between the $25 plan and the next plan at $100/month. If you have a super simple site that happens to need SSL, you have to bump up to the $100 plan and then also pay $30 more for static IP, which can be too much for some clients.

Conclusion
----------

I expect a few issues in any server situation, and I love so many features of Pantheon that the few issues are not show-stoppers.

repository: alexander-digett/digett

repo_name: alexander-digett/digett


text:
#### Tensorflow on GPU : Pre-flight Check
This program prints the number of GPUs available for the Tensorflow runtime to utilize.

If it detects that GPUs *are* available, it performs a simple matrix multiplication task, making use of all GPUs available.

##### Running the program

Copy the program `gpurun.py` to a location which can be volume mounted into the Tensorflow docker. Then run a command (depending on *your* intended volume mount) like this: \
`docker run --gpus all -it -v ~/workspace:/workspace -shm-size=1g --ulimit memlock=-1 nvcr.io/nvidia/tensorflow:20.01-tf2-py3`

You will be dropped into a shell within the container. From the directory where the program was volume-mounted, run: \
`python gpurun.py` \
(We can run the program using `python3` also.)

![gpurun](https://github.com/techyugadi/dnn_gpu/blob/master/img/dnn03.png)

##### Expected Output

1. Firstly, it shows Tensorflow version and the number of GPUs available(*2*)

![tfver](https://github.com/techyugadi/dnn_gpu/blob/master/img/dnn04.png)

![numgpus](https://github.com/techyugadi/dnn_gpu/blob/master/img/dnn05.png)

2. It indicates that the matrix multiplication function (which is GPU-enabed) is actually executed over multiple GPUs.

![matmult](https://github.com/techyugadi/dnn_gpu/blob/master/img/dnn06.png)

3. While the computation is in progress, `nvtop` will indicate spikes in usage of both GPUs. (Ideally, if we had observed `nvtop` just before starting the program, it would have shown a flat line.)

![nvtop](https://github.com/techyugadi/dnn_gpu/blob/master/img/dnn07.png)

4. Finally the result of the matrix operation is printed.

![result](https://github.com/techyugadi/dnn_gpu/blob/master/img/dnn08.png)


text:
# jMetal 5 Development Site

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

**jMetal** is an object-oriented Java-based framework for multi-objective optimization with metaheuristics
The Web page of the project is: [http://jmetal.github.io/jMetal/](http://jmetal.github.io/jMetal/). Former jMetal versions can be found in [SourceForge](http://jmetal.sourceforge.net). The current version is jMetal 5.4.

The jMetal development version is hosted in this repository; this way, interested users can take a look to
the new incoming features in advance.

If you are interested in contributing with your ideas and comments, please take a look the current discussions in the [Issues section](https://github.com/jMetal/jMetal/issues).

## Changelog of the next incoming release (jMetal 5.5)

### Algorithms

* Improvements in algorithms [WASF-GA](https://github.com/jMetal/jMetal/tree/master/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga) and [GWASF-GA](https://github.com/jMetal/jMetal/tree/master/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/gwasfga). Contribution of Rubén Saborido.
* Algorithm MOEA/D and variants can now return a subset of evenly distributed solutions (see Miscelanea)
* Algorithm [ESPEA](https://github.com/jMetal/jMetal/tree/master/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea). Contribution of Marlon Braun.
* Algorithm [CDG-MOEA](https://github.com/jMetal/jMetal/blob/master/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/cdg/CDG.java). Contribution of Feng Zhang and Xinye Cai.

### Problems
* Problems of the [CEC 2018 competition on many-objective optimization](https://github.com/jMetal/jMetal/tree/master/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf). Contribution of Gian Mauricio Fritsche.

### Miscelanea

* Added class [KNearestNeighborhood](https://github.com/jMetal/jMetal/blob/master/jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/impl/KNearestNeighborhood.java).
* Added new neighborhood classes: C25, C49, L13, L25 and L41 (https://github.com/jMetal/jMetal/tree/master/jmetal-core/src/main/java/org/uma/jmetal/util/neighborhood/impl).
* Added method `getSubsetOfEvenlyDistributedSolutions()` to class [MOEADUtils](https://github.com/jMetal/jMetal/blob/master/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/util/MOEADUtils.java).

### Bugs
* Fixed a bug in the component of the experiment package that executes the algorithms in parallel. All the experiment classes in package jmetal-exec have been updated.
* Fixed a bug in the experiment framework which led to recompute quality indicators more times than needed.
* Fixed a bug in class `AbstractGenericSolution` caused by solutions stored as attributes. This issue might lead to infinite recursive calls when two solutions are compared.

## jMetal is available as a Maven Project in The Central Repository

The link to the modules is: https://search.maven.org/#search%7Cga%7C1%7Cjmetal

## jMetal documentation
The documentation is hosted in https://github.com/jMetal/jMetalDocumentation

## Publications
A.J. Nebro, J.J. Durillo, M. Vergne: "Redesigning the jMetal Multi-Objective Optimization Framework". Proceedings of the Companion Publication of the 2015 on Genetic and Evolutionary Computation Conference (GECCO Companion '15) Pages 1093-1100. DOI: http://dx.doi.org/10.1145/2739482.2768462

## Code coverage (4th April 2016)
Coverage data of the jmetal-core package reported by IntelliJ Idea:

|Class % |Method %| Line % |
|--------|--------|--------|
|51,8% (93/181) |	40.0% (375/393) | 37% (1183/5084)

repository: joelalvesoliver/AlgoritmosEvolutivos

gha_language: Java

repo_name: joelalvesoliver/AlgoritmosEvolutivos


text:
---
layout: post
title:  "Welcome CityJSON version 1.0.0 🎉"
categories: news
date: 2019-04-26 15:36
---

via GIPHY

Today we're happy to launch the version 1.0.0 of CityJSON!

It took us less than 2 years ([first commit](https://github.com/cityjson/specs/commit/affadcfcc44002b70d18ea023679fde39b8b111e) was 19 June 2017) to build a JSON-encoding of the CityGML data model 2.0.0.

It comes with several software packages, full open specifications, and all existing CityGML datasets can be converted in one-click to CityJSON (and vice-versa).

While CityJSON is mostly made and maintained by the [3D Geoinformation group at the TU Delft](https://3d.bk.tudelft.nl), everyone is welcome to [contribute by submitting new content and/or fixing errors]({{ "/contribute/" | prepend: site.baseurl }}).

repository: cityjson/website

gha_language: HTML

repo_name: cityjson/website


text:
# JILL.py

_The enhanced Python fork of [JILL](https://github.com/abelsiqueira/jill) -- Julia Installer for Linux (MacOS, Windows and FreeBSD) -- Light_

![](https://img.shields.io/badge/system-Windows%7CmacOS%7CLinux%7CFreeBSD-yellowgreen)
![](https://img.shields.io/badge/arch-i686%7Cx86__64%7CARMv7%7CARMv8-yellowgreen)

[![py version](https://img.shields.io/pypi/pyversions/jill.svg?logo=python&logoColor=white)](https://pypi.org/project/jill)
[![version](https://img.shields.io/pypi/v/jill.svg)](https://github.com/johnnychen94/jill.py/releases)
[![Actions Status](https://github.com/johnnychen94/jill.py/workflows/Unit%20test/badge.svg
)](https://github.com/johnnychen94/jill.py/actions)
[![codecov](https://codecov.io/gh/johnnychen94/jill.py/branch/master/graph/badge.svg)](https://codecov.io/gh/johnnychen94/jill.py)
[![release-date](https://img.shields.io/github/release-date/johnnychen94/jill.py)](https://github.com/johnnychen94/jill.py/releases)
[![中文README](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87-blue)](README_zh.md)

Why `jill.py`? Distro package managers (e.g., `apt`, `pac`) is likely to provide a broken Julia with
incorrect binary dependencies (e.g., `LLVM` ) versions. Hence it's recommended to download and
extract the Julia binary provided in [Julia Downloads](https://julialang.org/downloads/). `jill.py` doesn't
do anything magical, but just makes such operation even stupid.

Using Python to install Julia? This is because Python has became one of the main tool for sys admins and it's
available in all platforms; this makes a cross-platform installer for Julia possible.

Is it safe to use this? Yes, `jill.py` use GPG to check every tarballs after downloading. Also, `*.dmg`/`*.pkg` for macOS and
`.exe` for Windows are already singed.

## Installation

First you'll need to install `jill` using pip: `pip install jill --user -U`

Note that `Python >= 3.6` is required. For base docker images, you also need to make sure `wget` and `gnupg` are installed.

## Usage examples for most users

Basic usage:

`jill install [version] [--confirm] [--upstream UPSTREAM] [--unstable] [--reinstall] [--install_dir INSTALL_DIR] [--symlink_dir SYMLINK_DIR]`

For the first-time users of `jill.py`, you may need to modify `PATH` accordingly so that your shell can find the executables when you type `julia`.

installation demo

When you type `jill install` (the simplest usage), it does the following things:

1. query latest stable release, it's `1.6.1` at the time of writing.
2. download, verify and install julia `1.6.1`
3. make alias: `julia`, `julia-1`, `julia-1.6`
    * for nightly build, it only bind alias to `julia-latest`

Valid `version` syntax:

- `stable`: latest stable release
- `1`: latest stable `1.y.z` release
- `1.2`: latest stable `1.2.z` release
- `1.2.3`/`1.2.3-rc1`: as it is
- `nightly`/`latest`: nightly builds

At the time of writing, "1.6.1" and "1.7.0-beta1" are released, while "1.7.0" isn't yet.
There are two ways to install an unstable release version `1.7.0-beta1`:

- `jill install 1.7.0-beta1`, as you explicitly requested, installs "1.7.0-beta1" for you.
- `jill install 1.7 --unstable` will give you the latest 1.7.x version including those unstable ones.
  Because "1.7.0" is not released yet, it will gives you "1.7.0-beta1". The result may change when
  more releases are coming. Note that it won't include the "nightly" builds.

Here's a list of slightly advanced usages that you may be interested in:

* download only:
    - latest stable release for current system: `jill download`
    - specific system: `jill download --sys freebsd --arch x86_64`
    - download Julia to specific dir: `jill download --outdir another/dir`
* install Julia for current system:
    - (linux only) system-wide for root: `sudo jill install`
    - upgrade from older julia version: `jill install --upgrade` (copy and paste the root environment folder)
    - don't need interactive promopt: `jill install --confirm`
* upstream:
    - from specific upstream: `jill install --upstream Official`
    - find out all registered upstreams: `jill upstream`
    - add a private upstream: make a modifed copy of [public registry](jill/config/sources.json) at:
        * Linux, MacOS and FreeBSD: `~/.config/jill/sources.json`
        * Windows: `~/AppData/Local/julias/sources.json`

You can find a more verbose documentation using `jill [COMMAND] -h` (e.g., `jill download -h`)

For Julia (>= 1.5.0) in Linux with `musl` dependency, you can

- install it normally, i.e., using `jill install`; `jill` knows that you're using `musl`.
- download it by passing `--sys musl` command. In the meantime, `--sys linux` will give you Julia
  binaries built with `glibc` dependency.

Setting environment variable `JILL_UPSTREAM` will disable the fancy "find-the-nearest-upstream"
feature of `jill` and give you a faster download experience if you just know which upstream is the
fastest. (It has lower priorty than `--upstream` flag.)

## The Python API

`jill.py` also provides a set of Python API:

```python
from jill.install import install_julia
from jill.download import download_package

# equivalent to `jill install --confirm`
install_julia(confirm=True)
# equivalent to `jill download`
download_package()
```

You can read its docstring (e.g., `?install_julia`) for more information.

## Example with cron

If you're tired of seeing `(xx days old master)` in your nightly build version, then `jill` can
make your nightly build always the latest version using `cron`:

```bash
# /etc/cron.d/jill
PATH=/usr/local/bin:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin

# install a fresh nightly build every day
* 0 * * * root jill install latest --confirm
```

Similarly, you can also add a cron job for `jill install --confirm` so that you always get a
latest stable release for `julia`.  `jill` knows the existence of a new version of Julia once
it's released -- you don't even need to upgrade `jill`.

## For who are interested in setting up a new release mirror

Please check out [register new mirror](register_mirror.md).


text:
# Computational Chemistry Docker Images

[ ![Codeship Status for molecular-toolkit/chemistry-docker-images](https://app.codeship.com/projects/cabf3b40-8d0a-0135-07c8-724a96aff59c/status?branch=master)](https://app.codeship.com/projects/249637)
[![github release tag](https://img.shields.io/github/release/molecular-toolkit/chemistry-docker-images.svg?label=stable)](https://github.com/molecular-toolkit/chemistry-docker-images)

This repository stores definitions for building docker images for various open source computational chemistry packages.  These images are built from definitions contained in the DockerMakefiles in this directory (everythign with a `.yml` extension), and should be built with the [`DockerMake` program](https://github.com/avirshup/DockerMake).

# Using these images
These images are automatically built and pushed to [DockerHub](http://hub.docker.com). The images are pushed to dockerhub - https://hub.docker.com/u/chemdocker/ and can be run at the command line with `docker run -it chemdocker[image-name]:[version] bash`.

### Creating new images
Note: to use these images, we highly recommend simply pulling them from DockerHub (see above); it's only necessary to build them yourself if you want to make modifications.

##### Install DockerMake:
We use the `docker-make` command line utility to build and manage MDT's docker images. To install it:
```bash
pip install DockerMake
```

Run the following commands at the root of this repository:

##### List docker images:
```bash
docker-make --list
```

##### Build a specific image from that list:
```bash
docker-make nwchem
```

##### Build all docker images:
```bash
docker-make --tag dev --all
```

##### Build a new version of all docker images then push to an image registry:
```bash
docker-make --repo [registry url]/[registry organization] --push --tag [version tag]
```

# Legal
### Please note:
All licenses and copyright notices apply ONLY to the YML-format files in this directory. The docker images built using the instructions in these files are licensed separately; their licenses can be found in [the LICENSES directory](image-licenses/).

### License
Copyright 2015-2017 Autodesk Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

gha_language: Fortran


text:
# OOJS: Flower Garden

## Summary
This was an experiment with Object-Oriented JavaScript: a simple modelling of a garden with a collection of flowers, using constructor functions and object literals.


text:
---
layout: page
title : A Benchmark and a Data-Driven Solution for Facial Relighting
permalink: /seminars/FacialRelighting/
date: January 03, 2018
---

## A Benchmark and a Data-Driven Solution for Facial Relighting

### Speaker:

[Ahmed Hassanien]()

### Abstract:

Facial relighting is a problem that requires very high quality results due to its use in post-production as well as the high sensitivity of humans to artifacts and deformations on generated facial imagery. This problem has been examined in the literature for more than two decades. However, the quantitative evaluation of the state-of-the-art methods has been very limited due to the lack of a standard dataset. In this paper, we publicly release a large dataset covering many different lighting conditions, head poses and hundreds of subjects for the problem of facial relighting. We quantitatively and qualitatively evaluate the state-of-the art techniques and discuss their shortcomings. We also propose a generative network that takes a facial image as input and produces high quality results for target lighting configurations. Our architecture includes specific design decisions to ensure high-quality facial texture and realistic shadows in the results.

repository: dsqcri/old-ds-website

repo_name: dsqcri/old-ds-website


text:
## Solution
```java
public class Solution {
    public int wiggleMaxLength(int[] nums) {
        int len = nums.length;
        if (len < 2) return len;
        int k = 1;
        while ( k < len && nums[k] == num[k-1]) k++;
        if (k == len) return 1; //All elements are same in nums
        int result = 2;
        boolean needSmall = nums[k] > nums[k-1];
        for (int i = k; i < len - 1; i++) {
            if (needSmall && nums[i+1] < nums[i] || !needSmall && nums[i+1] > nums[i]) {
                nums[result++] = nums[i+1];
                needSmall = !needSmall;
            }
        }
        return result;
    }
}
```

## Analysis
The basic idea of this solution is that we assume the longest wiggle subsequence is from the first index. Then we compare the second one to first one to get the value of `needSmall`. We update the `num[result++]` if if follows wiggle pattern, otherwise, we just skip that number and continue the loop. The first if and while statement are to avoid some special cases (like they are all same).

repository: HeyDaniyar/Algorithms

repo_name: HeyDaniyar/Algorithms


text:
---
title: Live Share
description: Remote pair and mob programming - Share the happiness (the REPL) and enjoy Interactive Programming together
---

# Using Calva with Live Share

[Live Share][liveshare] is a Microsoft provided VS Code extension.
It allows you to share the workspace that you have open in your
computer with somebody else. Everybody is then working on the same source code
files, namely those on your computer. You can edit files at the same time,
everyone has their own caret. You can follow each other (i.e. when someone
switches to a different file, you will as well). This is great for remote pair
programming, for example.

An extra nice thing is that each participant is using their own VSCode configuration, including fonts, colors,
keyboard shortcuts, etc.

!!! Note "Disable Calva Spritz to get rid of Notebooks interference"
    The headline below **Calva Supports Live Share** is true. However, due to [a bug in LiveShare](https://github.com/MicrosoftDocs/live-share/issues/4765), guest participants always get their Clojure files opened in the Calva [Clojure Notebooks](notebooks.md) editor. To workaround this issue Calva uses a ”side-car” extension named **Calva Spritz** for the Notebooks associations of Clojure files. You can disable that extension when participating in LiveShare sessions.

## Calva Supports Live Share

When using Calva, you can use Live Share as well. Editing works exactly the same
as for any other programming language. What makes Calva a bit special, is the
REPL. When using Live Share, Calva allows the host to share the REPL with guests
as well. If you use any of the supported configuration, this will be pretty much
automatic.

!!! Note "You need to enable the LiveShare support"
    Due to [an issue in the LiveShare API](https://github.com/MicrosoftDocs/live-share/issues/4551), for some users, this feature stops Calva from connecting the REPL. Therefore the support is disabled by default. The setting is `calva.useLiveShare`.

This is what a typical scenario looks like:

1. **The host** jacks-in.
1. **The host** shares its workspace using Live Share. Calva will detect that
   the workspace is being shared, so it will offer to share the REPL port that
   was opened when jacking in. The host clicks "Allow" to start sharing the
   port. (Note: steps 1 and two can also be done in the reverse order.)
   ![Starting Live Share](images/howto/live-share-port.png)
3. **The host** sends the Live Share URL to the guest(s).
4. **The guest** joins the Live Share session using the URL it received.
5. **The guest** connects to the host's REPL using the command "Connect to a
   running REPL server in the project". If needed, the guest chooses the same
   build configuration as the host.

Voila! Both the guest and the host can now use the REPL that is running on the
host. Things like documentation lookup now also work on the guest's machine.

## Control Visibility of `.calva` Folder

Calva depends on the `output.calva-repl` file to be available. If you have the
`.calva` folder listed in your `.gitignore`, this also causes the folder to be
hidden from guests in Live Share by default. In order to make the folder
visible, you can put a file called `.vsls.json` in your project. In its simplest
form, the contents can be this:

```json
{
  "$schema": "http://json.schemastore.org/vsls",
  "hideFiles": [
    "!.calva"
  ]
}
```

Now the `.calva` folder is shared as well. But also any other file and folder
that you may have in your `.gitignore`. If you want to have more fine-grained
control, please refer to the section [Controlling file access and
visibility][visibility] of the Live Share documentation.

## Some Things To Keep In Mind

* As a guest, you're connected to a REPL running on the host's machine. With
  power comes responsibility; **be nice, and be careful**!
* There is only one `output.calva-repl` file, which all participants are
  sharing. It may work better to **evaluate things in the source code editors**
  instead of from the REPL window. Otherwise you will end up in a situation
  where one person is typing something in the `output.calva-repl` window, and
  somebody else is evaluating something (hence sending the output there) at the
  same time. That gets confusing quickly.
* When you're working on a **CLJS-based web development** project, things may
  get extra confusing. By default, Live Share will share any HTTP ports on the
  host automatically, and also offer to open the URL on the guest. (You can
  disable using the setting "Liveshare: Open Shared Servers".) As a guest, you
  **do not** want to open that browser window normally. Think about it: where is
  the REPL running? Yes: in the browser! But Calva connects to the REPL running
  in the browser on the host's machine, so if you open a browser as a guest, you
  will also get a REPL there, but you won't be connected to it in Calva.
* Currently Live Share does not allow Calva to know whether the workspace is
  shared read-only or read-write. If you share read-only, and you don't want the
  guests to have access to your REPL, don't click "Allow" when VSCode asks you
  to share the REPL port.

[liveshare]: https://docs.microsoft.com/en-us/visualstudio/liveshare/
[visibility]: https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/security#controlling-file-access-and-visibility

## Calva Spritz

Together with Calva there is an extension called [Calva Spritz](https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva-spritz) installed. All it does is to provide the association of Clojure file types to Clojure Notebooks. We do it this way because of the LiveShare issues mentioned above. So that you can disable the Notebook association when participating as a guest in LiveShare sessions. The issue is tracked here:

* Calva issue: [LiveShare participants incorrectly opening every Clojure file as if via "Open with Notebook"](https://github.com/BetterThanTomorrow/calva/issues/1850)
* LiveShare issue: [Guest opens Clojure file as a notebook (incorrectly)](https://github.com/MicrosoftDocs/live-share/issues/4765)

**Calva Spritz** can be disabled and enabled at will, and it will take immediate effect, without any reload of VS Code needed.

repository: BetterThanTomorrow/calva

branch_name: refs/heads/published

gha_language: TypeScript

gha_license_id: NOASSERTION

repo_name: BetterThanTomorrow/calva


text:
# Jekyll Resume

to compile:

bundle exec jekyll build
bundle exec jekyll serve
http://<IP_ADDRESS>:4000/

to deploy

## tl;dr

Paper resumes suck. This is a digital resume built in [Jekyll](http://jekyllrb.com) using [Google Web Starter Kit](https://github.com/google/web-starter-kit). See it live at [jekyll-resume.philipithomas.com](https://jekyll-resume.philipithomas.com).

Modify it to your needs and build the code in Ruby with:

```
    bundle install
    jekyll build
```

## Background

While in college searching for post-graduation job, I built myself a [digital resume in PHP that became popular](https://github.com/philipithomas/cv-philipithomas). It [looked cool](https://php-cv.herokuapp.com/), but was poorly executed.

Since then I try to build most basic sites in [Jekyll](http://jekyllrb.com), a static site generator written in Ruby. It has just enough features to be useful, but the generated sites are static.

There's a lot of [Bootstrap](http://getbootstrap.com/) code floating around, so I decided to try something a little different - Google's [Web Starter Kit](https://github.com/google/web-starter-kit).

## Design/Framework

This project loosely uses Google's [Web Starter Kit](https://github.com/google/web-starter-kit). I didn't do a good job of preserving the original code or making it maintainable, but it was fun to experiment with a different CSS framework.

The repo uses the [jekyll-assets project](https://github.com/ixti/jekyll-assets) to handle javascript and css. There is some custom scss in the `_assets/stylesheets/custom.scss` file.

## Config

Configure the basic parts of the website, including the name and description, using the `_config.yml` file.

## Resume Sections

The resume has sections defined by the `_data/sections.yml` file. The name is the title of the section. The ID is a globally unique ID for the section that is used as a CSS id for the menu scroller. In addition, this specifies the name of the yml file in `_data` that the section pulls its data from. If you want to add or modify sections, this is the **core file for resume logic.** The layout specifies which layout in `_includes/resume/` to use for the section - it is loosely a "macro," but I should refactor the implementation to use a correct [Liquid](http://liquidmarkup.org/) macro.

Modify the data for each section in `_data/` using [YAML](http://www.yaml.org/start.html). The bullet sections support [Markdown](http://commonmark.org/) formatting, e.g. for links.

## Deployment

I deploy the files on [AWS S3](https://aws.amazon.com/s3/) using [CircleCI](https://circleci.com/) (with [Cloudflare as a CDN](https://cloudflare.com). It can also be easily hosted for free on [Github Pages](https://pages.github.com/). Note that the circle.yml and deploy.sh files are unnecessary for Github Pages.

## Next Steps

If you have changes to this repo, please [open an issue or a pull request](https://github.com/philipithomas/jekyll-resume). Read the post introducing the project [on my website](https://www.philipithomas.com/jekyll-resume/), and [follow me on twitter](https://twitter.com/philipithomas) or [join my mailing list](http://eepurl.com/VkZXf) to stay up-to-date with my latest projects.

repository: gilleskratzer/curriculum

gha_language: CSS

repo_name: gilleskratzer/curriculum


text:
            Archived Repository

            This code is no longer maintained. Feel free to fork it, but use it at your own risks.

# PHPUnit d3 report

This visualization tool provides a quick way to monitor your PHPUnit test suites. With a single glance, you will be able to identify the slowest tests, helping you to improve the overall execution time of your tests.

Here is what Symfony2 test suite report looks like:

![Symfony2 test suite, analyzed by PHPUnit D3 report](screenshot.png)

For live demonstration and online report generation, here is the [demo page](http://marmelab.com/phpunit-d3-report/).

## How to generate a report?

To generate a report, simply execute your PHPUnit test suite including the `--log-junit` argument, such as:

``` sh
phpunit --log-junit report.xml
```

Then, simply copy-paste your XML report into the report form, and let the magic happen!

Note: if you want to open this project locally, you will have to create a VirtualHost to see the default Symfony2 report. Indeed, it is stored as a pre-computed JSON, and opening it will raise a cross-domain security issue from your browser.

## Installing the project locally

If you want to install this project locally, simply clone the [GitHub repository](https://github.com/marmelab/phpunit-d3-report) and install its Bower dependencies:

``` sh
# Cloning repository
git clone https://github.com/marmelab/phpunit-d3-report

# Installing dependencies
bower install
```

## Re-using the chart

This chart has been thought to be easily re-usable. This way, you can embed it and customize the resulting chart in your own application.

To create a new chart, simply prepare the PHPUnit XML report thanks to `ReportTransformer` class, pass resulting JSON to the container element and call the chart function:

``` js
var chart = d3.chart.phpunitBubbles();

d3.json("reports/report.xml", function(err, data) {
    d3.select("#bubbles")
        .datum(ReportTransformer.transform(data))
        .call(chart);
});
```

If you want to display a single report (for instance, on your project page), you do not need the `ReportTransformer`. Simply download the converted JSON report from the [GitHub page](http://marmelab.com/phpunit-d3-report/), just under the chart. Then, you can query directly the report, skipping the transformation process, and thus optimizing performances.

``` js
d3.json("reports/phpunit-d3-report.json", function(err, data) {
    d3.select("#bubbles").datum(data).call(chart);
});
```

### Parameters

If you want to customize the output report, several paramaters are available as functions, following the [Mike Bostock's re-usable chart pattern]. For instance, if you want to modify the padding of each bubble, use:

``` js
var chart = d3.chart.phpunitBubbles().padding(10);
```

Here is the list of all available parameters:

* **width**: width of report in pixels (default: 900)
* **height**: height of report in pixels (default: 900)
* **padding**: margin between each bubbles in pixels (default: 1)
* **className**: class name of bubbles container (default: bubbles)
* **sort**: sorting closure to order bubbles (default: random order)
* **onMouseOver**: event when mouse enters on a bubble (default: display a tooltip with test details)
* **onMouseMove**: event when mouse moves inside a bubble (default: update the tooltip describing the test)
* **onMouseOut**: event when mouse moves outside a bubble (default: hide the tooltip)

For instance, here is a full customized chart:

``` js
var chart = d3.chart.phpunitBubbles()
    .width(800)
    .height(600)
    .padding(3)
    .className("report")
    .sort(function(a, b) {
        return a.value - b.value;
    })
    .onMouseOver(function(test) {
        console.log("Entering " + test.name);
    })
    .onMouseMove(function() {})
    .onMouseOut(function(test) {
        console.log("Exiting " + test.name);
    });
```

## Licence

This project is released under the MIT licence (thanks to [Marmelab](http://www.marmelab.com) courtesy).

branch_name: refs/heads/gh-pages


text:
#Mapping Guide

##OpenStreetMap Mapping Best Practice
1. Respect existing mapped items, especially those that have been groundtruthed.
2. Make sure trails connect to allow for routing within the trail network.
3. Connect trails to roads at trailhead so that routing can continue from the road to the trail network.
4. Use aerial photography to assit you in your mapping, but groundtruthing is always the best way to verify map features. (time to hit the trails!)

##OpenStreetMap Taggin Reference
The National Parks Services have already created a [very detailed guide](https://wiki.openstreetmap.org/wiki/US_National_Park_Service_Tagging) for how best to tag outdoor features in OpenStreetMap. For the time being this is a good resource to use when thinking about how best to tag the features you are mapping. Eventually the project may create something like this but this is a great reference to use in the mean time.

repository: openchattanooga/chamap

repo_name: openchattanooga/chamap


text:
## Smart Contract API Document

Pleae reference to [API doc](https://apidoc.ont.io/smartcontract/).

Query the data by blockchain API:

| API                                      | Return Value         | Description               |
| ---------------------------------------- | ----------- | ---------------- |
| Blockchain.GetHeight()                   | uint        | Get the current block height         |
| Blockchain.GetHeader(uint height)        | Header      | Get block header by block height     |
| Blockchain.GetBlock(byte[] hash)         | Block       | Get block by block hash   |
| Blockchain.GetTransaction(byte[] txid)   | Transaction | Get transaction by transaction ID      |
| Blockchain.GetContract(byte[] script_hash) | Contract    | Get contract content by contract hash     |
| Blockchain.GetTransactionHeight(byte[] txid) | uint64      | Get transaction height by transaction ID |

Block API：

| API                             | Return Value           | Description                         |
| ------------------------------- | ------------- | -------------------------- |
| Header.Hash                     | byte[]        | Get the hash of a block                    |
| Header.Version                  | uint          | Get block version number                    |
| Header.PrevHash                 | byte[]        | Get the hash of the previous block               |
| Header.Index                    | uint          | Get the height of a block                   |
| Header.MerkleRoot               | byte[]        | Get the root of the Merkle Tree for all transactions in a block |
| Header.Timestamp                | uint          | Get block timestamp                   |
| Header.ConsensusData            | ulong         | Get consensus data of a block (Pseudo-random number generated by consensus nodes)    |
| Header.NextConsensus            | byte[]        | Get the hash of the next bookkeeping contract           |

| API                             | Return Value           | Description                         |
| ------------------------------- | ------------- | -------------------------- |
| Block.GetTransactionCount()     | int           | Get the number of transactions in the current block              |
| Block.GetTransactions()         | Transaction[] | Get all transactions in the current block              |
| Block.GetTransaction(int index) | Transaction   | Get the specified transaction in the current block               |

Transaction API：

| API                       | Return Value                    | Description           |
| ------------------------- | ---------------------- | ------------ |
| Transaction.Hash          | byte[]                 | Get the hash of the current transaction |
| Transaction.Type          | byte                   | Get the type of the current transaction     |
| Transaction.GetAttributes | TransactionAttribute[] | Query all attributes of the current transaction  |

Contract API：

| API                                      | Return Value            | Description          |
| ---------------------------------------- | -------------- | ----------- |
| Contract.Script                          | byte[]         | Get the script of a contract    |
| Contract.Create(byte[] script, bool need_storage, string name, string version, string author, string email, string desc) | Contract       | Create a smart contract      |
| Contract.Migrate(byte[] script, bool need_storage, string name, string version, string author, string email, string desc) | Contract       | Migrate / Update a smart contract |
| Contract.Destroy()                       | void           | Deatroy a smart contract        |
| Contract.StorageContext                  | StorageContext | Get the contract's storage context  |

Storage API：

| API                                      | Return Value            | Description                               |
| ---------------------------------------- | -------------- | -------------------------------- |
| Storage.CurrentContext                   | StorageContext | Get the current storage context                       |
| Storage.Get(StorageContext,string)       | byte[]         | Query operation, query the corresponding value by key in the persistent storage area   |
| Storage.Get(StorageContext,byte[])       | byte[]         | Query operation, query the corresponding value by key in the persistent storage area   |
| Storage.Put(StorageContext, string,string) | void       |Insert operation, inserting data as key-value format into a persistent storage area |
| Storage.Put(StorageContext, byte[],byte[]) | void       | Insert operation, inserting data as key-value format into a persistent storage area |
| Storage.Put(StorageContext, byte[],string) | void       | Insert operation, inserting data as key-value format into a persistent storage area |
| Storage.Put(StorageContext, string,byte[]) | void       | Insert operation, inserting data as key-value format into a persistent storage area |
| Storage.Put(StorageContext, string,BigInteger) | void       | Insert operation, inserting data as key-value format into a persistent storage area |
| Storage.Put(StorageContext, byte[],BigInteger) | void       | Insert operation, inserting data as key-value format into a persistent storage area |
| Storage.Delete(StorageContext, byte[])   | void           | Delete operation, delete the corresponding value by key in the persistent storage area  |
| Storage.Delete(StorageContext, string)   | void           | Delete operation, delete the corresponding value by key in the persistent storage area  |

Runtime API：

| API                          | Return Value  | Description                                       |
| ---------------------------- | ---- | ---------------------------------------- |
| Runtime.Time                 | uint | Get current block time                                |
| Runtime.CheckWitness(byte[]) | bool | Verify operational permissions of people or contract                   |
| Runtime.Notify(object[])     | void | In smart contract, sending notifications (including socket notifications or rpc queries) to clients that are executing this smart contract |
| Runtime.Log(string)          | void | In smart contract, sending logs ( including socket notifications) to clients that are executing this smart contract       |

System API：

| API                        | Return Value              | Description                         |
| -------------------------- | ---------------- | -------------------------- |
| ExecutionEngine.ScriptContainer     | IScriptContainer | Get script container of a smart contract              |
| ExecutionEngine.ExecutingScriptHash | byte[]           | Get the script hash that a smart contract executes          |
| ExecutionEngine.CallingScriptHash   | byte[]           | Get the script hash of the invoker of a smart contract         |
| ExecutionEngine.EntryScriptHash     | byte[]           | Get the script hash of the entry point (start of the contract invocation chain) of a smart contract |

System API：

| API                                      | Return Value    | Description                                       |
| ---------------------------------------- | ------ | ---------------------------------------- |
| Native.Invoke(byte version, byte[] address, byte[] method, object args) | byte[] | Invokes a native contract. 1. version - version number， 2. address - contract address 3. method - contract method 4. contract parameters |


text:
## Section 6: Solutions to Exercises

### Theory

1. The master/slave configuration allows to distribute builds in Jenkins and this has advantages in terms of:

    - Flexibility: the slave nodes can be customized to run specific jobs (for example build and test on a specific browser or operating system).
    - Resilience: the performance on the master node is improved as long running and resource consuming jobs are sent to slave nodes. Plus, even if a slave node fails, jobs running on other nodes are not affected.
    - Scalability: slave nodes free resources from the master node, allow to run jobs in parallel thus sharing the load across multiple machines, and scale automatically since the number of slave nodes is increased at peak build times and decreased during low activity times.

2. In a single master configuration Jenkins is deployed on a single, large master with multiple slave nodes connected to it. In a multiple master configuration Jenkins is deployed on multiple smaller masters with multiple slave nodes connected to each other.

    A single master configuration is easier to maintain and is well suited for a single team whereas the multi master configuration is more robust and is better suited for multiple teams.

3. VPC stands for virtual private cloud  and is an isolated virtual network inside AWS. It is a good security practice to launch AWS resources inside a VPC so that they are isolated from other projects deployed on AWS.

4. A security group is a virtual firewall for controlling inbound and outbound traffic to resources in a VPC.

5. IAM stands for Identity and Access Management and it enables to access AWS services and resources securely. In particular, IAM is used to create users, permissions, and roles.

    A IAM policy is a set of permissions usually attached to a user or a resource. IAM policies are expressed and stored as JSON files.

### Practice

1. To create a new slave node, add a new AMI in `Manage Jenkins` -> `Configure System` -> `Cloud` -> `Amazon EC2` -> `AMIs` -> `Add`. You can copy the same configuration used in video 6.4 but under `Labels` use a different label. Then create a new Jenkins job and in General thick the option `Restrict where this project can be run` and type in `Label expression` the label given to the new slave.

path: /Section 6/exercises/solutions.md


text:
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![HitCount](http://hits.dwyl.io/Niweera/wordhunter.svg)](http://hits.dwyl.io/Niweera/wordhunter)
![GitHub issues](https://img.shields.io/github/issues/Niweera/wordhunter)
![Website](https://img.shields.io/website/https/wordhunter.niweera.gq?down_color=lightgrey&down_message=offline&up_color=blue&up_message=online)
[![Build Status](https://travis-ci.com/Niweera/wordhunter.svg?branch=master)](https://travis-ci.com/Niweera/wordhunter)

# WordHunter

## WordHunter is now live on [WordHunter-V1](https://20200409t141418-dot-whunter.uc.r.appspot.com/)

## WordHunter-V2 is now live on https://wordhunter.niweera.gq

> WordHunter lets you to find the words for the letters you have when you are playing Scrabble.

The following is the basic architecture of the WordHunter application. (The web application will use the WordHunter-api to get the results according to the letters that the user has given.)

![](https://raw.githubusercontent.com/Niweera/wordhunter-api/master/w.png)

### Example use case

User wants to find words which can be created from `a, s, d`

The WordHunter service will provide the following results.

1. sad - Feeling or showing sorrow; unhappy.
2. ads - An advertisement.

(The initial version would only give the words which contains all the letters. Later versions would provide all the letter combinations.)

![](wh.gif)

## Meta

Nipuna Weerasekara – [@Niweera](https://twitter.com/Niweera) –<EMAIL_ADDRESS>
Distributed under the MIT license. See `LICENSE` for more information.

[https://github.com/Niweera/wordhunter](https://github.com/Niweera/wordhunter)

The back-end for this application is in [wordhunter-api](https://github.com/Niweera/wordhunter-api) repo.

This repo is a part of [`WordHunter`](https://github.com/users/Niweera/projects/2) project.

`WordHunter` uses [GoogleDict](https://dict.niweera.gq) Dictionary API service. Find its repo [here](https://github.com/Niweera/googledict).

## Contributing

1. Fork it (<https://github.com/Niweera/wordhunter/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

<!-- Markdown link & img dfn's -->

[npm-image]: https://img.shields.io/npm/v/datadog-metrics.svg?style=flat-square
[npm-url]: https://npmjs.org/package/datadog-metrics
[npm-downloads]: https://img.shields.io/npm/dm/datadog-metrics.svg?style=flat-square
[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics
[wiki]: https://github.com/yourname/yourproject/wiki

## Acknowledgement

Without the gigantic help from this guy [koolify](https://github.com/koolify), the development of WordHunter would be impossible...

repository: Niweera/wordhunter

repo_name: Niweera/wordhunter


text:
# Stretchy Line Plot
In this demo some random points are generated and scrolled (similar to numpy's [roll](https://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.roll.html) method).
* Although the result looks simple, there is some strong thought behind how this example is coded.
  * All the graphing code is encapsulated by the `ScottPlot` class of [swhPlot.cs](pixelDrawDrag2/swhPlot.cs).
  * The code of the GUI itself [Form1.cs](pixelDrawDrag2/Form1.cs) is virtually empty.
  * My thinking is that from here I'll work on the graphing class, keeping gui usage as simple as possible.
* _Note: plotting 321 data points I'm getting about 300Hz drawing rate with anti-aliasing off and 100Hz with it on_

![](demo.gif)

repository: swharden/Csharp-Data-Visualization

gha_language: C#

repo_name: swharden/Csharp-Data-Visualization


text:
- infos = Information about the shell plugin is in keys below
- infos/author = Thomas Waser<EMAIL_ADDRESS>- infos/licence = BSD
- infos/needs =
- infos/provides =
- infos/placements = postgetstorage postcommit postrollback
- infos/status = nodep configurable preview unfinished
- infos/description = executes shell commands

## Usage

The shell plugin executes shell commandos after set, get or error.

The configuration keys

- `execute/set`
- `execute/get`
- `execute/error`

are used to store the shell commands.

The configuration keys

- `execute/set/return`
- `execute/get/return`
- `execute/error/return`

can be compared against the return values of the shell commandos.

## Example

```sh
# Create temporary file
kdb set system:/tests/tempfile $(mktemp)

# Mount plugin and specify plugin configuration
sudo kdb mount shell.ini system:/tests/shell ni array= shell execute/set="echo set >> $(kdb get system:/tests/tempfile)"

cat $(kdb get system:/tests/tempfile)
#>

# Execute `set` command
kdb set system:/tests/shell ""
#> Create a new key system:/tests/shell with string ""

cat $(kdb get system:/tests/tempfile)
#> set

# Undo modifications
rm $(kdb get system:/tests/tempfile)
kdb rm -r system:/tests/shell
sudo kdb umount system:/tests/shell
```

repository: ElektraInitiative/libelektra

gha_language: C

repo_name: ElektraInitiative/libelektra


text:
# Use DutchX as an Oracle
For starting this guide, you should be already familiar with how to
[Build on top of the DutchX](./build-on-top-of-dutchx.html). Please, complete
first that guide before you start with this one.

Once you know how to create a project that depends on the DutchX, and you know
how to migrate the contracts for local development, we are ready to use the
contract from our project.

One simple use of the DutchX can be to use it as a onchain price oracle.

Learn how to get the price for any token pair from the DutchX following the
steps described in this project [Use DutchX as an Oracle](https://github.com/gnosis/dx-examples-dev/tree/master/02_use-dx-as-an-oracle)

repository: Rafanator/dx-docs

repo_name: Rafanator/dx-docs


text:
# Component Archetype Structure

In the previous component archetype, we use `demo-server` to demo and test react component inside of component itself, which has a risk of causing chicken-egg issues.  In order to avoid this, we removed `demo-server` for component archetype and let it focus more on build, eslint check and unit tests itself.

Meanwhile, in the [new electrode components](/chapter1/intermediate/create-a-electrode-component.md), we demo components through `<repo>/demo-app` where import components from `<repo>/packages/<componentName>`. The latest electrode components can be generated by the latest electrode-generator.

Below is the new structure of the Electrode React Component Archetype:

```markdown
- electrode-archetype-react-component
  |- config/
  |  |- babel
  |  |- browser_test
  |  |- dependencies
  |  |- eslint
  |  |- istanbul
  |  |- karma
  |  |- stylint
  |  |- webpack
  |    |- partial
  |      |- babel.js
  |      |- define.js
  |      |- fonts.js
  |      |- images.js
  |      |- json.js
  |      |- optimize.js
  |      |- sourcemaps.js
  |      |- styles.js
  |    |- webpack.config.coverage.js
  |    |- webpack.config.dev.js
  |    |- webpack.config.js
  |    |- webpack.config.test.js
  |  |- archetype.js
  |- scripts/
  |- archetype-clap.js
  |- xclap.js
  |- package.json
  ...
```

The Component Archetype still provides babel, eslint, karma and webpack config files as before, files can be found under `electrode-archetype-react-component/config` folder. But there are some updates for webpack config files, which can be found in the [next section](/chapter1/intermediate/component-archetype/webpack-config.md).

repository: vasanthk/electrode

repo_name: vasanthk/electrode


text:
# Tray Indicators
Displays your hitpoints, prayer or absorption in the system tray.

Icons can be disabled individually.
Colors are fully customizable.

![In-game screenshot](https://i.imgur.com/Zkd6zmC.png)


text:
# ms - metric spaces

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

A metric space is a set together with some notion of distance function which
obeys four laws. See
[the haddock](https://relrod.github.io/ms/Math-MetricSpace.html) for more
information.

We implement these not using a typeclass, but using a simple datatype. This
avoids needing to create newtypes for every metric implementation over a given
type, meaning that we gain more code re-use and an easier-to-use API.

**WARNING**: The triangle-inequality law does not necessarily hold in the
presence of `Floating a => a`, which we use. This is because `Double` and
`Float` both don't have arbitrary precision. However, some of our metrics, such
as that of `euclidean` distance, require the use of the `sqrt` function, which
requires a `Floating` constraint.

## Usage

```haskell
dist levenshtein "foo" "bar"   -- => 3.0
dist euclidean (V.fromList [3,2]) (V.fromList [2,3])  -- => 1.4142135623730951
```

# License

[BSD-2](LICENSE).

repository: relrod/ms

repo_name: relrod/ms


text:
Fencache.js
===========

This javascript function memoizer uses an array based structure for storage which gives it different performance characteristics to most javascript memoizers which use the native object type for storage.

#### Performance Differences

Fencache can memoize math functions in practice much faster than other popular memoizers, as it does not use native objects for storage. Native objects cast numeric keys to strings which is a big performance hit working with floating point values.

Fencache also does a sort step in its array based cache on every hit so the most frequently seen values are returned most quickly. It also sets a limit to the number of cached input/output pairs and it overwrites the most unused values instead of growing an excessive memory demand, which is a vulnerability that most object store based memoizers have.

#### Storage structure

Two arrays in parallel store the memoized functions input and output values. The arrays have a head section where entries are incrementally bubble sorted on every hit, and in the remaining space a ring buffer receives any missed calculations and swaps any hits into the last position of the sorting section. If this structure needed a name it could be called a "nose-ring cache". It is two different abstract data types combined for efficiency, done mostly in this private [function `nsrng`](https://github.com/strainer/fencache.js/blob/master/fencache.js#L118).

The best size for the cache depends on the speed of the function to memoize and on the degree of repetition of calculations which will run. A size of around 20 can often work well enough assuming there is a useful amount of repetition.

For testing and other occasions fencache.js also implements an object store option, but a Map() store option seems redundant here.

### Basic Usage

```
  fencache = require("fencache.js")

  enMathsin = fencache( Math.sin )

  enMathsin(x) === Math.sin(x) // always true
```

Default cache size is 20, any size can be set:
```
  enMathsin = fencache( Math.sin ,1 )
```
Cache size of 1 is streamlined with no cache management; ideal for when the calculation rarely changes, like:
```
  for( a=0; a<1000; a++ )
    for( b=0; b<1000; b++ )
      somesum += enMathsin(a) + Math.sin(b)
```

### Native store mode

Size 0 sets native storage mode, a negative value limits the native store size.
```
  enReply = fencache(reply, 0)     //use the native object as cache
  enReply = fencache(reply, -1000) //flushes half the cache after 1000 different entries
```

This mode may perform better for keeping thousands of equally distributed calculation results, and not requiring old results to be flushed. (Result flushing is relatively slow)

### Optional parameter for keying Objects and multiple arguments.

```
  enCalcObj = fencache(calcOnObj, 1000, ob=>ob.idstring )
```
In this case where calcOnObj takes objects and processes data within them,
a function in the third parameter can return a value to use as the storage key.
Without this function, in fencaches default mode objects are identified by their native reference (not contents), in the native object mode they are automatically stringified. Memoized functions can take up to 5 arguments but a keying function is then needed to id results to the multiple input arguments:

```
  enpow = fencache(Math.pow,30, (a,b)=>""+a+","+b )
  cando = enpow(2,8) //(result is keyed to "2,8")
  // here is a fast insecure way to key two numeric params:
  enpow = fencache(Math.pow,30, (a,b)=> a + b*888888887 )
```
When cache size is set to 1, the third parameter is ignored.

### Other Methods

```
  result = enMathsin.bypass(k) // returns calculation without caching it
  cchval = enMathsin.val(k)    // returns cached val without calculating
  oldval = enMathsin.put(val,key)   // sets val to key, returns old val
  sttobj = enMathsin.state()        // returns the whole state
  enMathsin.reset(/**sttobj**/)     // clears or replaces state (memory)
```

### Performance and Cache Size

Where 'mixed hit' means average time to randomly access and return
results from a full cache:

* Cache size 1 returns a previous hit about 3 times as fast as Math.sin
* Cache size 4 returns mixed hits about 2 times as fast as Math.sin
* Cache size 20 returns mixed hits about 1 times as fast as Math.sin
* Cache size 50 returns mixed hits about 75% as fast as Math.sin
* Cache size 500 returns mixed hits about 10% as fast as Math.sin

With 'Slowest hit' meaning time to return the lowest ranked result in
the cache:
* Slowest hit on size 15 is about 1 times as fast as Math.sin
* Slowest hit on size 500 is about 5% as fast as Math.sin

'Hit return speed' is not affected by the speed of the function to memoize as that function only runs on a cache miss. Cache misses take no longer than slow hits - plus the time which the function requires.

Basically, try values between 1 and a few hundred depending on the weight of the cached function and on the distribution of repetitive inputs.

In contrast, an object store's best return time of floating point keyed data is about 8 times slower than Math.sin (25 times slower than fencaches best). The native objects performance scales better with n items stored, but still can take until about n=400 to catch up with fencaches sorted list mode - when accessed uniformly. When some inputs recur more often than others, the sorted list mode can work a great deal faster, as more of the hits are found early in its list.

### Performance Micro-Optimizations

On the first call, fencache fills its two storage arrays with the first argument:result pair it sees. This allows the JS engine to make the arrays contiguous and monomorphic improving the subsequent performance. An 'init' method is also included to set the arrays up eg: `ensine.init(-0,-0)` will set the cache to non-integer number type. The reason for this method is, if the types are to be real numbers the first calculation might by chance be an integer, which would mix types in the array.

Fencache contains other obscure micro optimizations tested on several versions of Node and Firefox, which seem appropriate for a small performance orientated tool. I know its weirdly formatted but sure its all the same once minimized anyway.

### Version History
* 1.4.0 - Jan19 : Correct put method
* 1.3.0 - Jan19 : Fix bug in reset method
* 1.2.0 - Oct18 : Reduced optional parameters to 5
* 1.1.0 - Oct18 : A little fix to 'put' method
* 0.9.0 - Aug18 : Quite tested


text:
lp2-tp CHANGELOG
================

This file is used to list changes made in each version of the lp2-tp cookbook.

0.1.6
-----
- [Martin Barriviera] - Commented out deploy

0.1.5
-----
- [Miguel Landaeta] - TOOLS-1461: Monitor Apache with Datadog in production environments.

0.1.4
-----
- [Miguel Landaeta] - TOOLS-1425: Improve Datadog Tomcat monitoring capabilities by enabling JMX feature.

0.1.3
-----
- [Miguel Landaeta] - TOOLS-1392: Add new JVM parameters to improve low level logging.

0.1.2
-----
- [Miguel Landaeta] - Provide better notifications in monit recipe.

0.1.1
-----
- [Miguel Landaeta] - Add resource to undeploy default ROOT context in tomcat recipe.

0.1.0
-----
- [Miguel Landaeta] - Initial release of lp2-tp

- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.

The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.

repository: rudymccomb/Infrastructure

repo_name: rudymccomb/Infrastructure


text:
# Shopping list

Simple shopping list app based on [Meteor 1.0](https://www.meteor.com) to write
things you need in a shared space so that it's available online and to the
family or partner for example.

## Verion 0.3 - breaking changes

Meteor was updated from 1.1 to 1.8. This also requires an update of MongoDB.
Make sure you [backup your database before updating](https://stackoverflow.com/a/22201759/840238),
and restore after updated your MongoDB instance. (In development, if you don't
mind, just run `$ meteor reset` inside your project folder.)

### Alexa Skills interface

The new version implements a basic interface to interact with Alexa, though
language output is currently only in German and I haven't published the Alexa
Skill configuration.

### TODO

* Alexa Skill verification ([PHP example
here](https://philipp-guttmann.de/Blog/Alexa_Skill_Endpoint_PHP/))

## Installation

* [Install Meteor](https://www.meteor.com/install) if you haven't yet.
* Checkout the Git repo with `$ git clone https://github.com/robbash/shopping-list`
* Go to the project directory and simply start `$ meteor`.

## Customisation

### Users

There's not much at the moment, but I'm quite sure you want to customise the
users.

Have a look at `server/users.sample.js`, customise it and rename it to
`server/users.js` before you start your instance the first time.

(If you already did, start `$ meteor mongo` and delete the fake users with
`db.users.remove({})` or simply reset the instance with `$ meteor reset`.)

### I18n

While the interface is all English language, the Alexa API responses can match
your Alexa language. The Alexa Skill query specifies the current language, which
is used to respond. Currently I've provided English and German, but it's easy
to add more translations via `lib/locales.js`.

## Create your online shopping cart

You can easily deploy your instance to [meteor.com](https://www.meteor.com):

`$ meteor deploy <your-unique-subdomain>.meteor.com`

If your having your own domain and access to the DNS settings, you might want to
use it (or a sub domain) for the shopping list. Just set up a CNAME entry to
`<your-unique-subdomain>.meteor.com` in your (sub) domain's DNS settings and
deploy the app to the CNAME. (It still goes to
[meteor.com](https://www.meteor.com), but this way it's available under your
domain.)

## Amazon Alexa integration

Please refer to the [Alexa Skill docs](ALEXA.md) for details on how to use the
shopping list with an Alexa device.

repository: robbash/shopping-list

repo_name: robbash/shopping-list


text:
# react-native-calender-pn-wix-extended
This is the extend version of the calendar developed by wix. Find full documentation in the link below:
 https://github.com/wix/react-native-calendars

## IMPORTANT!!
Please install moment before installing the library for it uses moment for some features
## https://github.com/moment/moment

Please install react-native-vector-icons before installing project for the library uses ionicons
## https://github.com/oblador/react-native-vector-icons

The theme file will be missing in the /src/calendar/header/index.js so remember to remove it and add ur own color.

## Installation
add this to ur dependencies
```
          "dependencies": {
                    "react-native-calendars": "git+https://github.com/eals/react-native-calender-pn-wix-extended.git",
          }
```
then npm install

## Changes :
- The month title bar is removed above days of the week
- The month section now contain upcomming next three months
- The banner section is added
- Banner section contains current date from moment and icon from react-native-vector-icons
- The days of the week now contains colored dot at the top
- When date is set to selected it gives red background to day
- When date is set to marked it gives green background to day
- When it is current date the day will have green border
- When current date is set to selected it will give red dot at the bottom

for eg:
```
<Calendar
          style={styles.calendar}
          current={'2017-10-01'}
          minDate={'2017-10-10'}
          maxDate={'2019-05-29'}
          firstDay={1}
          markedDates={{
            '2017-10-10': {marked: true},
            '2017-10-11': {marked: true},
            '2017-10-12': {marked: true},
            '2017-10-13': {marked: true},
            '2017-10-14': {selected: true},
            '2017-10-15': {selected: true},
            '2017-10-16': {marked: true},
            '2017-10-17': {marked: true},
            '2017-10-18': {marked: true},
            '2017-10-19': {marked: true},
            '2017-10-20': {selected: true},
            '2017-10-21': {marked: true},
            '2017-10-22': {marked: true},
            '2017-10-23': {marked: true},
            '2017-10-24': {marked: true},
            '2017-10-25': {selected: true},
            '2017-11-26': {disabled: true},
            '2017-10-26': {marked: true},
            '2017-10-27': {selected: true},

          }}
          hideArrows={false}
          theme={{
            arrowColor:"#fff",
            selectedDayBackgroundColor:"#EE1B25",
            todayTextColor: '#333333',
            dotColor: '#00BEA1',
          }}
        />
```

<img src="/demo/Screenshot_1509097897.png" width="50%"/>


text:
---
name: Data Visualization Platform
subtitle: Data collection and visualization web app with integrated devices
external_url: http://srlink.infiswift.com/
image_path: /images/clients/srlink.gif
---

Mobile ready web application for collecting, organizing, and exploring timeseries data for customers with needs in renewable energy and energy management: eGauge, Pomerleau Real Estate, Champlain College, University of Vermont, Sandia, infiswift.

## Features

* Customizable charts for exploring timeseries data
* User and organization permissions
* Automated data collection with APIs for `eGauge, Draker, Campbell Scientific, infiswift`
* Downsampling of data with options for types of sampling

## Process

* Test Driven Development with RSpec and Capybara
* Agile Development with bi-weekly sprints
* User stories and prioritization with customers
* Deployment to Digital Ocean with Capistrano

## Technologies

* `Ruby on Rails`
* `Sidekiq, Redis`
* `JavaScript, jQuery`
* `PostgreSQL`
* `Digital Ocean`
* `Amazon Web Services`

path: /_clients/data platform.md

filename: data platform.md


text:
# Your First Simulation

This tutorial will show you how to build a simple simulation in the web browser
or in a nodejs script. Choose either
[Set up a simulation in the web browser](#set-up-a-simulation-in-the-web-browser)
or [Set up a simulation in nodejs](#set-up-a-simulation-in-nodejs) to get the
required template code, and then see
[Writing your simulation](#writing-your-simulation) to start using CPMjs in the
environment of your choice.

The simulation we will build is a simple CPM cell:

<div>
<iframe src="./manual/asset/SingleCell.html" width="350px" height="400px"> </iframe>
</div>

## Set up a simulation in the web browser

One way to use CPMjs is to build a simulation in HTML, to open directly in
your favourite web browser (as long as that favourite web browser is not
Internet Explorer). The advantage of this method is that it allows you to
visualize the simulation immediately, and that you can easily explore the
effect of changing parameters in this manner. However, if you wish to run a
simulation and store output to your computer, a simulation using nodejs may be
more appropriate – see [Set up a simulation in nodejs](#set-up-a-simulation-in-nodejs)
for details.

### An HTML template page
Unfortunately, writing an HTML page requires quite some boilerplate code. You
can mostly just copy-paste this for every simulation you build, but let's go
through it step by step so you know which parts you may have to adapt. If you
are familiar with HTML, you may want to just copy the template code and
continue [building your simulation](#writing-your-simulation).

```$xslt
<!-- Page setup and title -->
<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>PageTitle</title>
<style type="text/css">
body{
    font-family: "HelveticaNeue-Light", sans-serif; padding : 15px;
}
</style>

<!-- Sourcing the cpm build -->
<script src="../../build/cpm.js"></script>
<script>
"use strict"

            // Simulation code here.

</script>
</head>
<body>
<h1>Your Page Title</h1>
<p>
Description of your page.
</p>
</body>
</html>
```

We will now go through this step by step.

### Step 1 : Create a basic HTML page

A very simple html page looks like this:

```$xslt
<!DOCTYPE html>
<html>
<head> </head>
<body> </body>
</html>
```

The `<html>` tag shows where the page starts, and `</html>` shows where it ends.
The page consists of a *header*, which starts at `<head>` and ends at `</head>`,
and a *body*, starting at `<body>` and ending at `</body>`. (In general,
anything you place in your HTML file starts with `<something>` and ends with
`</something>`).

Copy the above code into a file called `MyFirstSimulation.html`, which you can
save in the `cpmjs/examples/html/` folder for now. If you wish to save the file
elsewhere, please read [these instructions](installation.md#additional-notes)
first.

### Step 2 : Configure the header

The header of the HTML page is the place that contains some meta-information
about that page, and will also contain the simulation code.

First, we will expand the header code above:

```$xslt
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PageTitle</title>
</head>
```

The additional code in the first line just includes some document settings into
the header that you will rarely need to change. The only thing you may want to
change is the second line, where you set the title that will be displayed
in the open tab in your web browser when you open the page.

### Step 3 : Add JavaScript

We will now add some JavaScript code to the header part of the page:

```$xslt
<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PageTitle</title>
<script src="path/to/cpmjs/build/cpm.js"></script>
<script>
"use strict"
// Simulation code will go here:

</script>
</head>
```

The first script just loads the CPMjs package for HTML, which is stored in
`cpmjs/build/cpm.js`. Please ensure that the path supplied here is the correct
path from the folder where you stored `MyFirstSimulation.html` to the file
`cpmjs/build/cpm.js`. If you have stored your simulation in `cpmjs/examples/html`,
you can use the path `../../build/cpm.js`

The second script is where your actual simulation code
will go later in [Writing your simulation](#writing-your-simulation).
For now, we'll leave it empty.

### Step 4: Write the body

Finally, we make some changes to the body of the page:

```$xslt
<body onload="initialize()">
<h1>Your Page Title</h1>
<p>
Description of your page.
</p>
</body>
```

In the first line, we tell the HTML page to run the JavaScript function
`intitialize()`, which we will define later in
[Writing your simulation](#writing-your-simulation) (between the
`<script></script>` tags of the page header we just set up).

The rest of the code just adds a title and a description to the web page.
The simulation will then be placed below (as in the example shown
at the top of this page).

### Step 5 (optional): Add CSS

The code we have now added is sufficient to make the page work once we have
[added a simulation](#writing-your-simulation), but to make it look better we
may want to add some CSS styling code to the header of the page. The header now
becomes:

```$xslt

<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PageTitle</title>

<style type="text/css">
body{
font-family: "HelveticaNeue-Light", sans-serif; padding : 15px;
}
</style>

<script src="path/to/cpmjs/build/cpm.js"></script>
<script>
"use strict"
// Simulation code will go here:

</script>
</head>
```

To see the final result, have a look again at the complete
 [template](#an-html-template-page). You can now proceed with
 [adding your simulation](#writing-your-simulation) to this file.

## Set up a simulation in nodejs

Another way to use CPMjs – besides using HTML – is to use nodejs from the
console. This method of running CPMjs allows you to print statistics to the
console and store them in external files, as well as to save images of the
simulation to create a movie later. To set up a more interactive version
of your simulation with a live animation, an HTML version may be more
appropriate – see
[Set up a simulation in the web browser](#set-up-a-simulation-in-the-web-browser)

In contrast to a browser simulation, a node simulation requires almost no
boilerplate code.

To set up your first node simulation, just create a file `MyFirstSimulation.js`
in the folder `cpmjs/examples/node/`
(or see [these instructions](installation.md#additional-notes) to create it
elsewhere). Then add the following line of code to the (still empty) script to
source the package:

```$xslt
/* Source the CPM module (cpm-cjs version because this is a node script).*/
let CPM = require("../../build/cpm-cjs.js")
```

Make sure that the path supplied to `require()` is the correct path from the
location of `MyFirstSimulation.js` to `cpmjs/build/cpm-cjs.js`.

You can now proceed with [adding your simulation](#writing-your-simulation).

## Writing your simulation

We are now ready to add some simulation code. The following code goes either
in between the `<script></script>` tags of your HTML page, or at the bottom of
your node script.

### Step 1: Create a simulation object

The easiest way to build a simulation in CPMjs is to use the
[Simulation class](../class/src/simulation/Simulation.js~Simulation.html).
This class provides some default methods for running the simulation and
producing outputs, so we won't have to worry about this yet.

To construct an object of class simulation, type:

```$xslt
let sim = new CPM.Simulation( config )
```

The `config` contains configuration options; we will take care of this in the
next step.

If you are writing an HTML page, you have to define an `initialize()` function -
as this is the function that will be run when the page is loaded (see
[this section](#step-4-write-the-body)):

```$xslt
let sim
function initialize(){
    sim = new CPM.Simulation( config )
}
```

### Step 2 : Configure the CPM & Simulation

The code above will not work yet because we still need to supply the `config`
object. A configuration object for a simulation should look like this:

```$xslt
let config = {

	ndim : 2,
	field_size : [50,50],
	conf : {

	},
	simsettings : {

	}
}
```

(Note: this piece of code should go above the code from the previous step,
as the `config` object is needed to construct the simulation object.)

Here, `ndim` is the number of dimensions of the grid, `field_size` is the
number of pixels in each dimension (in this case: 50 x 50 pixels), `conf` is
the configuration object parsed to the
[CPM class](../class/src/models/CPM.js~CPM.html), and `simsettings`
contains configuration options used directly by the simulation class.

First, we configure the CPM by setting values in the `conf` object:

```$xslt
conf : {
		T : 20,						// CPM temperature

		// Adhesion parameters:
		J: [[0,20], [20,100]] ,

		// VolumeConstraint parameters
		LAMBDA_V : [0,50],			// VolumeConstraint importance per cellkind
		V : [0,500]					// Target volume of each cellkind

	}
```

The `T` parameter is the CPM temperature, which determines how strongly the
model "listens" to the energy constraints given in the CPM. We then add
an [adhesion](../class/src/hamiltonian/Adhesion.js~Adhesion.html) and
[volume constraint](../class/src/hamiltonian/VolumeConstraint.js~VolumeConstraint.html)
by supplying their parameters. In this case, we will have only one type of cell
and the background, so parameters are arrays of length 2 (or a 2 by 2 matrix
for the adhesion parameters).

Finally, we need to supply some settings for the simulation class itself in
`simsettings`:

```$xslt
simsettings : {
	NRCELLS : [1],
    RUNTIME : 500,
	CANVASCOLOR : "eaecef",
	zoom : 4
}
```

This ensures that one cell is seeded on the grid before the simulation, the
simulation runs for 500 MCS (in node; in the browser it will just keep running),
the background of the grid is colored gray, and the grid is drawn at 4x zoom.

The full `config` object becomes:

```$xslt
let config = {

	// Grid settings
	ndim : 2,
	field_size : [100,100],

	// CPM parameters and configuration
	conf : {
		T : 20,								// CPM temperature

		// Adhesion parameters:
		J: [[0,20], [20,100]] ,

		// VolumeConstraint parameters
		LAMBDA_V : [0,50],				// VolumeConstraint importance per cellkind
		V : [0,500]						// Target volume of each cellkind
	},

	// Simulation setup and configuration
	simsettings : {
		// Cells on the grid
		NRCELLS : [1],					// Number of cells to seed for all
										// non-background cellkinds.

        RUNTIME : 500,                  // Only used in node

		CANVASCOLOR : "eaecef",
		zoom : 4						// zoom in on canvas with this factor.
	}
}
```

### Step 3 : Tell the simulation to run

We are now almost ready; the only thing still missing is a command in the script
that tells the simulation to start running. This works slightly differently in
the browser- and nodejs versions.

#### In nodejs

In nodejs, getting the simulation to run is easy: just call the `run()` method
of the simulation class after creating the simulation object. We get:

```$xslt
let config = {
    ...
}
let sim = new CPM.Simulation( config )
sim.run()
```

You are now ready to run your simulation. From your console, run the script with
node:

```$xslt
node path/to/MyFirstSimulation.js
```

#### In HTML

In HTML, we create a function that runs a single step, and then make sure that
this function is called from the `initialize()` function:

```$xslt
let config = {
    ...
}
let sim
function initialize(){
    sim = new CPM.Simulation( config )
}
function step(){
    sim.step()
    requestAnimationFrame( step )
}
```

To see your simulation, open your file MyFirstSimulation.html in the web
browser (any except Internet Explorer; but we recommend Chrome because it is fast).

repository: jtextor/cpmjs

repo_name: jtextor/cpmjs


text:
# Automatic Gekko trader
This bot will access the Gekko api and manage the strategies automatically - only using the best strategies and settings for maximum profit.

At every first interval it will search for better settings with the current config and at every second interval it will test all strategies again.

You will also be able to run it in backtest mode to see how it does.

Before beginning it will pull the latest candles and find the best strategy to run.

## THIS APP IS STILL IN ACTIVE DEVELOPMENT AND NOT YET FINISHED OR READY TO ROLL

## Install

Run these 3 commands from your Gekko repository:
```
$ cd [Gekko repository]
$ git clone https://github.com/DustinJSilk/reactive-trader
$ cd ./reactive-trader
$ npm install
$ cp ./config/sample-config.js ./config/config.js
```

## Running

This app will run in place of Gekko and on top of it. Make sure to shutdown any other trading instances first.

Make sure you configure ./config/config.js and ./config/strategies.js first.
```
$ npm run trade
```

## Frontend

This is still being built and not part of the full app just yet. For now it will
need to be run in a separate terminal window. (It's also an empty page still)

```
$ npm run build
$ npm run frontend
```

## Database

I had problems with SQLite. Switch to postgres or mongodb.

### Setup postgresql

First make sure you install and start Postgresql. Then in your Gekko folder:

Install the Postgres dependency.

```
$ npm install pg
```

In your Gekko config set:
```
config.adapter = 'postgresql'
config.tradingAdvisor.adapter = 'postgresql'
```

Set the connection string to your postgres user name / password combo:

```
postgres://user:password@localhost:5432
```

Now you need to create a database. If you have a GUI like pgAdmin 4 just right
click on databases and hit create. Otherwise run a postgresql terminal and run
something like this:

```
CREATE DATABASE gekko
    WITH
    OWNER = YOUR_USER_NAME
    ENCODING = 'UTF8'
    CONNECTION LIMIT = -1;
```

Now in your gekko config, set 'database' under postgresql to 'gekko'. (or the
name your used above.)

## Thresholds problem

Some strategies (~MACD) use threshold values that can vary a lot from coin to coin.
Some coins might need values between 0.05 and -0.05 while others will need them between 0.00000005 and -0.00000005.
This makes finding the correct Min and Max values time consuming and expensive.
These thresholds are linked to the individual markets currency value (I think).

Rather use the PPO strategy since I've been informed that it is MACD but with percentages.

## Roadmap

The basic future:

- ~~Setup and installation~~
- ~~Add importing~~
- ~~Create backtesting class for individual strategies~~
- ~~Properly run a single strategy~~
- ~~Create strategy finder class using a genetic algorithm~~
- ~~Add mutation to the genetic algorithm~~
- ~~Setup strategy updating intervals~~
- Setup backtesting for the whole bot.
- Fine tune the Genetic Algorithm
- Don't import data that already exists when running large backtests
- Fine tune the strategy updating loops
- Log and display trading results / stats
- Add proper logging
- Begin paper trading
- Add a UI layer to see running stats
- Begin live trading
- Find a way to to switch strategies without rebooting OR without messing up the end of the current / start of the next trading period
- Run a Genetic algorithm on this app to find the ultimate perfect settings.
- Profit.

Deadline: End of ~~the~~ next week

repository: cristoferdomingues/reactive-trader

repo_name: cristoferdomingues/reactive-trader


text:
---
title: "Strange Loop 2019 - Jagged, ragged, awkward arrays"
description: "Data processing languages, such as SQL, R, MATLAB, and Numpy/Pandas, implicitly loop over identically-typed objects (\"rows\") of a dataset (\"table\"). This makes for a succinct syntax in an interactive environment, but what do you do if your table doesn't have a regular shape?"
author: Blogy McBlogerson
authorUrl: https://heresblogy.com/
publishDate: 2019-09-14T00:00-14:30
tags: [
  strange-loop
]
slug: strange-loop-2019-jagged-ragged-awkward-arrays
heroImage: https://about.sourcegraph.com/blog/strange-loop-thumbnail-square-v2.jpg
published: false
---

        Jim Pivarski

---

## Overview

Data processing languages, such as SQL, R, MATLAB, and Numpy/Pandas, implicitly loop over identically-typed objects (\"rows\") of a dataset (\"table\"). This makes for a succinct syntax in an interactive environment, but what do you do if your table doesn't have a regular shape?

---

AWESOME LIVEBLOG CONTENT HERE!

repository: zag/about

repo_name: zag/about


text:
# F8 - Refresh Hackathon

![Facebook F8 Banner](images/f8-banner.png)

## Getting Started

Clone the project from `master` branch. This app is made for iOS, there is no Android support added to this project. If you try running it for Android, then it would crash.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

## Installation

#### Pre-requisites

* Install [Flutter](https://flutter.dev/docs/get-started/install/macos) for macOS.
* Xcode version should be 12.4 and above. Xcode 12.5 is highly preffered.
* VSCode IDE

#### Running the app

* Open the project in VSCode. Make sure that you have Flutter and Dart extensions for Flutter installed within the IDE.

* Connect your simulator and run `cmd+F5` to build the app onto the simulator. You can also connect your physical iPhone and run the build. If Xcode signing error pops up, cd into `ios` folder and open `Runner.xcodeproj` with Xcode and add a team.

## Troubleshooting
* If any error persists while build, then cd into `ios` and run `rm -rf Podfile.lock`. Go back to the root and run `flutter clean` to clean your Flutter builds. Now, cd into `ios` and run `pod install` to install fresh pods.

* If you try running `Runner.xcworkspace` with Xcode, there are chances that it might fail or pop up an error, such as:

```
Undefined symbol: _OBJC_CLASS_$_FlutterError
```
You can however try removing pods and deleting `Runner.xcworkspace` and try building it again, however it's likely that the error would still persists. Hence, there is no point in running `Runner.xcworkspace` with Xcode. This error is due to one of 3rd party pub.dev packages.

* You can also try building the iOS app by running `flutter build ios` and get the `Runner.xarchive` file to run manually on your iPhone.

gha_language: Dart