text:
---
title: React.lazy! Friend or Foe
date: "2019-03-27"
spoiler: Coping with context switching as a full stack web developer
draft: false
keywords: frontend-development, loading, suspense, project complexity, webpack, files structure
---

Recent versions of [ReactJS](https://reactjs.org/docs/code-splitting.html#reactlazy), i.e **from 16.6.0 to date**, introduced `React.lazy()`, a new api for handling dynamic loading of components.

While this helps in ensuring small bundles, the complexity of the project grows.

## Complexity case 1
Compare
```jsx
import React from 'react';
import { Route, BrowserRouter as Router } from "react-router-dom";
import LoadableComponent from './my-component';

const App = () => {
  return (
    <Router>
      <Route
        path="/holla"
        component={LoadableComponent} />
      ...
    </Router>
  );
};
```

to

```jsx
import React from 'react';
import Loading from "./my-loading-component";
import { Route, BrowserRouter as Router } from "react-router-dom";

const LoadableComponent = React.lazy(()=>import("./my-component"));

const App = () => {
  return (
    <Router>
      <Route
        path="/holla"
        render={props => (
          <React.Suspense fallback={<Loading />}>
            <LoadableComponent {...props} />
          </React.Suspense> )}
        />
      ...
    </Router>
  );
};
```

>This isn't a critique to `React.lazy`, it is just something to be aware of as a developer especially when working with in a team with varying grasp/understanding of how ReactJS works.

[Error boundaries](https://reactjs.org/docs/error-boundaries.html) would also need to be introduced since there is the possibility of modules failing to load as a result of network outage.

The implementation looks as follows
```jsx
import React from 'react';
import Loading from "./my-loading-component";
import { Route, BrowserRouter as Router } from "react-router-dom";

const LoadableComponent = React.lazy(()=>import("./my-component"));

class ErrorBoundary extends React.Component{
    state = {
        hasError:false
    }
    static getDerivedStateFromError(error) {
        // Update state so the next render will show the fallback UI.
        return { hasError: true };
    }
    componentDidCatch(){
        logErrorToMyService(error, info);
    }
    render() {
    if (this.state.hasError) {
      // You can render any custom fallback UI
      return <h1>Something went wrong.</h1>;
    }

    return this.props.children;
  }
}

const App = () => {
  return (
      <ErrorBoundary>
        <Router>
          <Route
            path="/holla"
            render={props => (
              <React.Suspense fallback={<Loading />}>
                <LoadableComponent {...props} />
              </React.Suspense> )}
            />
        ...
        </Router>
      </ErrorBoundary>
  );
};
```
[https://reactjs.org/docs/error-boundaries.html](https://reactjs.org/docs/error-boundaries.html)

## Complexity case 2
This complexity is further compounded when dealing with **Named Export**

Compare this
```jsx
import React from 'react';
import { Route, BrowserRouter as Router } from "react-router-dom";
import {LoadableComponent} from './my-component';

const App = () => {
  return (
    <Router>
      <Route
        path="/holla"
        component={LoadableComponent} />
      ...
    </Router>
  );
};
```

to

```jsx
// l-my-components.js
export { LoadableComponent as default } from "./my-component";
```
```jsx
import React from 'react';
import Loading from "./my-loading-components";
import { Route, BrowserRouter as Router } from "react-router-dom";

const LoadableComponent = React.lazy(()=>import("./l-my-component"));
...
const App = () => {
  return (
      <ErrorBoundary>
        <Router>
          <Route
            path="/holla"
            render={props => (
              <React.Suspense fallback={<Loading />}>
                <LoadableComponent {...props} />
              </React.Suspense> )}
            />
        ...
        </Router>
      </ErrorBoundary>
  );
};
```
[https://reactjs.org/docs/code-splitting.html#named-exports](https://reactjs.org/docs/code-splitting.html#named-exports)

Because `React.lazy` only supports **default exports**, a temporary file is required to make the **named export** a **default export**, as well as ensuring that tree shaking occurs at the webpack layer.

> Like I mentioned earlier, this is a price you end up paying for better loading performance.

## Complexity case 3
The cherry at the top, when it comes to complexity, is when control as to when the modules are fetched, is required. Since [Webpack](https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules), which [Create React App]() is built on top of, supports both prefetching and preloading  of JavaScript modules, We would need to annotate our code with special comments, in dynamic `import` functions, that lets Webpack know how it should generate the bundles and also determine what point the bundles are to be loaded, i.e either at idle time (**prefetch**) or during current navigation (**preload**)

```jsx
import React from 'react';
import Loading from "./my-loading-components";
import { Route, BrowserRouter as Router } from "react-router-dom";

const LoadableComponent = React.lazy(()=>import(/*webpackPrefetch: true */"./l-my-component"));
...
const App = () => {
  return (
      <ErrorBoundary>
        <Router>
          <Route
            path="/holla"
            render={props => (
              <React.Suspense fallback={<Loading />}>
                <LoadableComponent {...props} />
              </React.Suspense> )}
            />
        ...
        </Router>
      </ErrorBoundary>
  );
};

```

In a large codebase, where performance is important, the codebase would be filled with such annotation comments. Knowing which loading strategy to use, is a deciding factor as regards to loading performance.

## In summary

Thinking about loading performance is almost as hard as building features of the application. It appears impractical to obsess over loading performance when the application isn't functional yet as it requires fundamental understanding of the following

1. **Default Exports** and **Named Exports**: this dictates how one structures code in a JavaScript file
2. **Webpack**: Knowing how the module should be loaded i.e *(prefetch, preload)*, naming the modules *(named chunks)* etc

`React.lazy` appears to be a friend when it comes to improving loading performance of our applications. But it appears to be an enemy, when it comes to keeping the codebase simple.

Does this mean it is impossible for a *Performant ReactJS Application* to be simple?


text:
# leapmotion_telemanipulation
This repo provides a series of source codes for robot telemanipulation using a Leap motion.

(1) ["Intuitive Bare-Hand Teleoperation of a Robotic Manipulator Using Virtual Reality and Leap Motion (TAROS 2019)"](https://github.com/inmo-jang/leapmotion_telemanipulation/blob/master/01_taros.md)

(2) ["Virtual  Kinesthetic  Teaching  for  Bimanual  Telemanipulation (SII2021)"](https://github.com/inmo-jang/leapmotion_telemanipulation/blob/master/02_virtualmarker.md)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# NP Project4
__This is a project based on NP Project3__
__In this project, I write two new program:__
*	__sock4_server.c__
*	__hw4_cgi.c__
__Which are placed in folder sock4_server__

## socks.conf:
configureation file for sock4_server.c.
It indicate which IP the sock4_server.c could accept. IPs not indicated in it would not be accept.
The format seems like following:
`permit [cb] xxx.xxx.xxx.xxx`
where c means connect mode, b means bind mode, and xxx could be "\*", meaning all. For example, 140.113.\*.\* means allowing all IPs starting with 104.113.
## sock4_sever.c:
It's a proxy server with protocol socks 4. It support *connect mode* and *bind mode*, with time limit set to 2 minutes for each connecton. When one of server and client close socket, close all connection.
It requires a file named "socks.conf" in the same folder to function as firewall well.
It scans socks.conf for each connection, so modification of socks.conf would take into effect without restarting sock4_server.
### form_get2.htm:
It works like form_get.htm in Project3. While it add two columns, shN, spN.
Only rows which does not miss any element(ie.hx, px, fx, shN, spN must not miss) would be recard.
*	shN:the proxy server for hN to connect.(sock4_server).
*	spN:the port proxy server for hN to connect.

## hw4_cgi.c
  It is a cgi based on *mycgi.c* in Project3. There are some difference:
*	it parse http request such that "shN=xxxxx" and "spN=xxx", where N is a number between 1 and 5, reprsenting proxy server host and port for N'th connection respectively.
*	after analyzing http request, it send sock 4 request to proxy server assigned in http request instead of connect to host directly.


text:
---
title: Khaos Starter Kit
date: 2021-05-07
permalink: /{{ locale }}/developers/tools/khaos-starter-kit/index.html
eleventyNavigation:
  key: khaos-starter-kit
  parent: developers_tools
  order: 3560
  title: Khaos Starter Kit
---

## What is Khaos Starter Kit?

Provides a template for building a developer-owned oracle called Khaos Functions using Khaos.

|        | Source                                            |
| ------ | ------------------------------------------------- |
| GitHub | https://github.com/dev-protocol/khaos-starter-kit |

## Usage

Clone and install dependencies.

```bash
git clone git@github.com:YOUR/khaos-starter-kit.git
cd khaos-starter-kit
yarn
```

### Referencies

The following guide describes a comprehensive way to build your own oracle with Khaos. In the Khaos Starter Kit section, you can learn how to use the Khaos Starter Kit specifically.

https://initto.devprotocol.xyz/en/deep-dive-khaos/

branch_name: refs/heads/main

gha_license_id: MIT


text:
# zx_vmo_read

## NAME

vmo_read - read bytes from the VMO

## SYNOPSIS

```
#include <zircon/syscalls.h>

zx_status_t zx_vmo_read(zx_handle_t handle, void* data, uint64_t offset, size_t len);

```

## DESCRIPTION

**vmo_read**() attempts to read exactly *len* bytes from a VMO at *offset*.

*data* pointer to a user buffer to read bytes into.

*len* number of bytes to attempt to read. *data* buffer should be large enough for at least this
many bytes.

## RETURN VALUE

**zx_vmo_read**() returns **ZX_OK** on success, and exactly *len* bytes will
have been written to *data*.
In the event of failure, a negative error value is returned, and the number of
bytes written to *data* is undefined.

## ERRORS

**ZX_ERR_BAD_HANDLE**  *handle* is not a valid handle.

**ZX_ERR_WRONG_TYPE**  *handle* is not a VMO handle.

**ZX_ERR_ACCESS_DENIED**  *handle* does not have the **ZX_RIGHT_READ** right.

**ZX_ERR_INVALID_ARGS**  *data* is an invalid pointer or NULL.

**ZX_ERR_OUT_OF_RANGE**  *offset* starts at or beyond the end of the VMO,
                         or VMO is shorter than *len*.

**ZX_ERR_BAD_STATE**  VMO has been marked uncached and is not directly readable.

## SEE ALSO

[vmo_create](vmo_create.md),
[vmo_clone](vmo_clone.md),
[vmo_write](vmo_write.md),
[vmo_get_size](vmo_get_size.md),
[vmo_set_size](vmo_set_size.md),
[vmo_op_range](vmo_op_range.md).
[vmo_set_cache_policy](vmo_set_cache_policy.md)


text:
---
description: Used by ActiveJobs/state.
solution: Experience Manager
title: Active Job States
feature: Dynamic Media Classic,SDK/API
role: Developer,Admin
exl-id: d4a7ef64-ab7f-4f8f-9c61-2aa67e67b609
---
# Active Job States{#active-job-states}

Used by ActiveJobs/state.

 Syntax

## Values {#section-02fb36bc14bb4286abff5480753200de}

* [!DNL `Unknown`]
* [!DNL `New`]
* [!DNL `WaitingClient`]
* [!DNL `WaitingCoordinator`]
* [!DNL `Running`]
* [!DNL `Stopping`]
* [!DNL `Done`]


text:
### [CVE-2017-2910](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-2910)
![](https://img.shields.io/static/v1?label=Product&message=libxls&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=out%20of%20bounds%20write&color=brighgreen)

### Description

An exploitable Out-of-bounds Write vulnerability exists in the xls_addCell function of libxls 2.0. A specially crafted xls file can cause a memory corruption resulting in remote code execution. An attacker can send malicious xls file to trigger this vulnerability.

### POC

#### Reference
- https://talosintelligence.com/vulnerability_reports/TALOS-2017-0417

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Joao's dotfiles
My collection of macOS & Linux dotfiles.

This repo will set up:

* Custom bashrc/bash_profile
* Custom terminal prompt
* (Very basic) Screen and Vim configuration
* ipython config and jupyter custom css
* Git configuration
* SSH configuration
* Homebrew with common packages, including Sublime Text 3
* Sublime Text 3 settings and theme

## Installation

1. **Clone repo**: `$ git clone https://github.com/jagmoreira/dotfiles.git`

1. **Run installation script**: `./setup_dev_env.sh`

    Any group of files from the above list can be skipped during installation. The script will prompt you to overwrite any existing dotfiles. During the Git and SSH configurations, you will be prompted for username/email.

## Acknowledgements

When writing my own dotfiles I relied heavily on these great sources:

* Mathias Bynens: [https://github.com/mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles)
* Nicolas Gallagher: [https://github.com/necolas/dotfiles](https://github.com/necolas/dotfiles)

repository: jagmoreira/dotfiles

gha_language: CSS

repo_name: jagmoreira/dotfiles


text:
## [0.0.1]

* First release, see usage for details.

## [0.0.2]

* Added example.

## [0.3.0]

* Modified comments.

## [0.4.0]
* Fixed bug.

## [0.5.0]

* Fixed bug
* Modified interfaces
* 1.'headerWidget' => 'headerWidgetBuilder'
* 2.'footerWidget' => 'footerWidgetBuilder'

## [0.6.0]

* Added loadMoreWidgetBuilder property.

## [0.7.0]

* Fixed loadMoreWidgetBuilder property.

## [0.8.0]

* Removed required property limit.

## [0.9.0]

* Modified example and screenshot.

## [1.0.0]

* Added jumpTo(section,index) and animateTo(section,index,animation) functions.

## [1.1.0]

* Fixed jumpTo and animateTo function offset bug.

## [1.2.0]

* Support for horizontal scrolling by jumpTo and animateTo.


text:
# ESMValCore package

[![Documentation Status](https://readthedocs.org/projects/esmvaltool/badge/?version=latest)](https://esmvaltool.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3387139.svg)](https://doi.org/10.5281/zenodo.3387139)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ESMValGroup?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![CircleCI](https://circleci.com/gh/ESMValGroup/ESMValCore/tree/main.svg?style=svg)](https://circleci.com/gh/ESMValGroup/ESMValCore/tree/main)
[![codecov](https://codecov.io/gh/ESMValGroup/ESMValCore/branch/main/graph/badge.svg?token=wQnDzguwq6)](https://codecov.io/gh/ESMValGroup/ESMValCore)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5d496dea9ef64ec68e448a6df5a65783)](https://www.codacy.com/gh/ESMValGroup/ESMValCore?utm_source=github.com&utm_medium=referral&utm_content=ESMValGroup/ESMValCore&utm_campaign=Badge_Grade)
[![Docker Build Status](https://img.shields.io/docker/cloud/build/esmvalgroup/esmvalcore)](https://hub.docker.com/r/esmvalgroup/esmvalcore/)
[![Anaconda-Server Badge](https://anaconda.org/esmvalgroup/esmvalcore/badges/installer/conda.svg)](https://conda.anaconda.org/esmvalgroup)

ESMValCore: core functionalities for the ESMValTool, a community diagnostic
and performance metrics tool for routine evaluation of Earth System Models
in the Climate Model Intercomparison Project (CMIP).

# Getting started

Please have a look at the
[documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/quickstart/install.html)
to get started.

## Using the ESMValCore package to run recipes

The ESMValCore package provides the `esmvaltool` command, which can be used to run
[recipes](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/recipe/overview.html)
for working with CMIP-like data.
A large collection of ready to use
[recipes and diagnostics](https://docs.esmvaltool.org/en/latest/recipes/index.html)
is provided by the
[ESMValTool](https://github.com/ESMValGroup/ESMValTool)
package.

## Using ESMValCore as a Python library

The ESMValCore package provides various functions for:

-   Finding data in a directory structure typically used for CMIP data.

-   Reading CMIP/CMOR tables and using those to check model and observational data.

-   ESMValTool preprocessor functions based on
    [iris](https://scitools-iris.readthedocs.io) for e.g. regridding,
    vertical interpolation, statistics, correcting (meta)data errors, extracting
    a time range, etcetera.

read all about it in the
[API documentation](https://docs.esmvaltool.org/projects/esmvalcore/en/latest/api/esmvalcore.html).

## Getting help

The easiest way to get help if you cannot find the answer in the documentation
on [readthedocs](https://docs.esmvaltool.org), is to open an
[issue on GitHub](https://github.com/ESMValGroup/ESMValCore/issues).

## Contributing

Contributions are very welcome, please read our
[contribution guidelines](https://docs.esmvaltool.org/projects/ESMValCore/en/latest/contributing.html)
to get started.

repository: BSC-ES/ESMValCore

repo_name: BSC-ES/ESMValCore


text:
# Tasks
Tasks Project

Vague Idea is to build an application which is Usable for managing projects.

You can use whatever tools you want, whatever languages you want. The basic design of the project is at the design_base_0.00 branch.

The base project, which is an android app is in base_0.00.

The project you are going to build need not necessarily be an android app. You can also build a website, Desktop application or any kind of application which will provide the same functionality as mentioned.

Feel free to use whatever tools and softwares you like.

Note -

1>> While making the app, please fork it to your library or create a diffrent branch with your username_branchName and push all the changes to that branch. It will be your "master" Branch.

2>> If you want to create another branch, create it from the branch you created instead of the master branch of the project.

3>> For viewing design more efficiently, I suggest using the Adobe XD program. Download link - https://creativecloud.adobe.com/apps/download/xd?promoid=BRLW38VW&mv=other

4>> If you are not able to download the XD, Please refer to the branch "design_base_0.00_components" branch for viewing snapshots of the sample design.

Have Fun.


text:
#Scala Music API Client

This project contains base classes for all music API projects.

##Dependencies

###SBT (0.7.x)

	val guardianSnapshot = "Guardian GitHub Snapshot" at "http://guardian.github.com/maven/repo-snapshots"
  	val musicApiBase = "com.gu.arts" %% "music-api-base_2.8.1" % "0.1.X-SNAPSHOT"

repository: strogo/music-api-scala-client

repo_name: strogo/music-api-scala-client


text:
# Sanitize User Input

When using the `prompt` command in your Protocol you want to make sure that the user input is handled properly in your Macro. To avoid the Macro to fail, add clear instructions on what input you expect into the message as well as sanitize the received user input before processing it further.

The returned message for `prompt` and also `alert` is an `Array` with 3 items.

```javascript
// The message Array returned by the Protocol commands prompt or alert
[
    "prompt",           // Type of dialog "prompt" or "alert"
    "Prompt Message",   // The message displayed in the popup dialog
    "User Input"        // The returned user input
]
```

## Strings

When a `string` is expected, make sure to trim white spaces since some users might accidentally add one in front or behind their input. Also some users might use a different case than expected. You can use the JavaScript [trim](https://www.w3schools.com/jsref/jsref_trim_string.asp) method to remove unwanted white spaces and the [toLowerCase](https://www.w3schools.com/jsref/jsref_tolowercase.asp) method, to avoid case related issues.

```javascript
// The json.message content is an array linke:
// ["prompt", "Prompt message to the user", "Hello World"]

var message = json.message[2];

// Sanitize the string
message = message.trim().toLowerCase();

if( message == "hello world"){
    ...
}
else{
    ...
}

```

## Numbers

When the user is inputting a `number` it will still be returned as a string by the instrument. So you want to test if it is a `number` that is returned before moving on. You can use the JavaScript [isNaN](https://www.w3schools.com/jsref/jsref_isnan_number.asp) to test if the string is a number and use the method [Number](https://www.w3schools.com/jsref/jsref_obj_number.asp) to parse the string as a `number` for further use.

```javascript
// The json.message content is an array linke:
// ["prompt", "Prompt message to the user", "1"]

var message = json.message[2];

// Test if Input is not an empty string and if the string is a number
if( message !== "" && !isNaN( message ) ){
    // Parse message as Number
    message = Number(message)
}
else{
    ...
}
```

::: warning Note
It is important to parse the user input as a number when a number is expected, because `1+"1"` would return `11` and not `2`!
:::

## No Input or Cancel

It is important to test for these these two cases as well. If the user is selecting **cancel**, the returned string will be cancel, so a simple if statement should suffice. The same is true for the user selecting **ok**, but not providing any more information

```javascript
var message = json.message[2];

// Test if Input is an empty string and if the string is "cancel"
if( message == "" || message == "cancel" ){
    // Do something here
}
else if (...){
    // Continue if the input can be used further
}

```

repository: Photosynq/PhotosynQ-Documentation

gha_language: JavaScript

repo_name: Photosynq/PhotosynQ-Documentation


text:
# mygovbc

The structure of this repository is compatible with the build and deployment mechanisms in Red Hat OpenShift (Origin/Enterprise/Container Platform).

## Pre-requisites

In order to complete the steps below, the following pre-requisites must be fulfilled.

1. Project(s) must exist in which the build and deployment resources can be created
1. You must have edit or admin access to the projects
1. An imagestream must exist in the project that will host the build resrouce for the S2I image that will be used to build the wildfly image.  See below for the steps to do this.

### Pull and push an image

If no project exists that contains the S2I imagestream needed to build the wildfly project, you can:

 * (**RECOMMENDED**) use the script [here](https://github.com/BCDevOps/openshift-tools/blob/master/utils/import-image.sh) to import the image automatically into the OpenShift Docker registry

 or...

 * import the image manually from DockerHub following the instructions [here](https://github.com/BCDevOps/issues-and-solutions/wiki/Tips-and-Tricks#pushing-an-image-to-openshift-internal-registry)

## Initial Setup

There are two initial build/deployment models possible with OpenShift - please see below to determine which is apprpriate for your purposes.

### One Step Build and Deployment (combined build and deployment project)

**Note:** The model decribed here is primarily for validation/testing of the repository contents and structure. For example, use by developers within the Red Hat Container Development Kit  The "multi-project" process described below is the intended model for use within BC Gov.

- Assuming you have the OpenShift ```oc``` tools installed and you've authenticated against an OpenShift instance, the application in this repository can be built and deployed within your current OpenShift project using the following command line:

```
oc new-app openshift/wildfly-100-centos7~https://github.com/bcgov/mygovbc.git
```

- The command above will result in a BuildConfiguration, DeploymentConfiguration and other supporting resources being created in OpenShift. A build will also be triggered and the application will be deployed once the build completes. The build is performed using the [Wildfly S2I](openshift/wildfly-100-centos7) builder image.

### Multi-project Build and Deployment (separate build and deployment projects)

**Note:** This model is intended to be used for "official" BC Gov projects in OpenShift.  The pattern it uses is separate OpenShift projects for each logical deployment environment (e.g. DEV, TEST, PROD) **plus** and additional "TOOLS" project for build/CI tooling (such as Jenkins) and related OpenShift resources.

#### Build Configuration

- Assuming you have the OpenShift ```oc``` tools installed and you've authenticated against an OpenShift instance, a BuildConfiguration for this app can be created within your OpenShift "TOOLS" project using the following command line:

```
cd openshift/templates
oc project gcpe-mygovbc-tools
oc process -f ./mygov-wildfly-bc-template.json -v NAME=mygovbc-app -v BUILDER_IMAGESTREAM_TAG=wildfly-100-centos7:latest -v SOURCE_REPOSITORY_URL=https://github.com/bcgov/mygovbc.git | oc create -f -
```

**Note:** There are additional parameters available which can be seen in the "parameters" section of the file in this repo at openshift/templates/mygov-wildfly-bc-template.json

#### Performing Builds

Builds will be performed via an automated GitHub webhook (triggered on every push to the bcgov/mygovbc GitHub repository), or when manually requested the OpenShift web UI, the ```oc``` tools.

**Note:** The values of the "-v" parameters in the command above can be adjusted to suit your preferences, as well as the value "gcpe-mygovbc-tools", if you have names your "TOOLS" project differently.

#### Deployment Configuration

To configure a deployment environment (e.g. one of DEV, TEST, PROD) including database, storage, deployment triggers, etc. **within an appropriate OpenShift project** the commands below may be followed, adapting the values as appropriate for your target environment.  The example below is for a "DEV" environment, and the values for APPLICATION_DOMAIN, APP_DEPLOYMENT_TAG, "gcpe-mygovbc-dev" can be adjusted as needed.

```
cd openshift/templates
oc project gcpe-mygovbc-dev
oc process -f mygov-wildfly-environment-template.json -v APPLICATION_DOMAIN=mygovbc-dev.pathfinder.bcgov -v APP_DEPLOYMENT_TAG=dev -v DATABASE_VOLUME_CAPACITY=1Gi | oc create -f -
```

**Note:** There are additional parameters available which can be seen in the "parameters" section of the file in this repo at openshift/templates/mygov-wildfly-environment-template.json

#### Performing Deployments

Deployments are performed within each environment based on OpenShift "ImageChange triggers" that are activated when a tag associated with a deployment environment is applied to a different image revision.  By convention, the tag is the lowercase logical name of the environment (e.g. "dev", "test", or "prod").  The ```oc``` tools provide a "tag" command to apply tags.

As an example, to tag an image with the "dev" tag in order to cause a deployment in the gcpe-mygovbc-dev project, the following command would be used.  In order to deploy within another environment, "dev" would be replaced with the lowercase logical name of the environment (e.g. test or prod).

```
oc project gcpe-mygovbc-tools
oc tag mygovbc-app:latest mygovbc-app:dev
```

### First Deployment

Prior to a first deployment within an environment, some one-time steps are required.

 The first step is granting "image-puller" access to an environment's service account on the "TOOLS" project.  This is done as follows, adjusting the "gcpe-mygovbc-dev" to match the name of the target deployment environment.

  ```
  oc policy add-role-to-user system:image-puller system:serviceaccount:gcpe-mygovbc-dev:default -n gcpe-mygovbc-tools
  ```

The MyGovBC application will not deploy cleanly within Wildfly upon first deployment due to missing properties files required by the pspd/mygov app.  These must be loaded once manually, and will persist across subsequent deployments.  The command to put the files in place is as follows:

**Note:*** The command below assumes you have a local copy of the properties files in a local directory called "config". Adjust the command below as appropriate if this is not the case. Also, if you are not running in a bash shell, you will need to manually determine the name of the pod running the app and use it in place of the inline oc command.

```
oc rsync config/ $(oc get pods --no-headers -l deploymentconfig=mygovbc-app | awk '{print $1}'):/pspdConfig
```

#### Listing Values of Generated Environment Variables

Several values are dynamicall generated in the process of crating the deployment configuration described above.  Within components in the deployment these values are made available by shared environment variables and the components are confgured to use them without further intervention.  However, these values may be needed by developers to interact with application components.  The command below will list the values for use in these cases.  Note "gcpe-mygovbc-dev" should be replaced if not targeting the "dev" environment as each environment will have distinct values.

```
oc env dc/mygovbc-app --list -n gcpe-mygovbc-dev
```

The output will be similar to below.

~~~~
PSPD_CONFIGURATION=/pspdConfig
MYSQL_USER=******
MYSQL_DATABASE=*****
MYSQL_PASSWORD=*******
JAVA_OPTS=-Xms1024m -Xmx6g -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=64m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
WILDFLY_ADMIN_PASSWORD=*******
~~~~

The values may be changed using the ```oc env``` command.

repository: bcgov/mygovbc

gha_language: Shell

repo_name: bcgov/mygovbc


text:
# Ansible Training Lab
This lab can be used to get you comfortable with Ansible. The information is mainly related to the Lynda.com training "Ansible Essentials".

# Setup Your Lab Environment
A distinction can be made between 3 environments in this setup:
- The host: This is your laptop or similar where the Vagrant box is running on.
- The box or VM: This is the Vagrant box provisioning and hosting the systems.
- The lab: The provisioned systems and/or infrastructure on top of the VM.

## Starting the box/VM
Prepare and start the box (VM) as mentioned in the [main README.md](../../README.md)

## Building the lab: Infrastructure from the VM
The lab is provisioned and started from inside the VM by running the following commands:
```
vagrant ssh
sudo su -
cd /vagrant/labs/<your lab>/
terraform plan
terraform apply
```

This brings up the following LXD systems reachable from the host.
| Hostname 	| Private IP     	| Description 	|
|----------	|----------------	|-------------	|
| web1     	| <IP_ADDRESS> 	| Web Server  	|
| web2     	| <IP_ADDRESS> 	| Web Server  	|
| db1      	| <IP_ADDRESS> 	| Database    	|
| db2      	| <IP_ADDRESS> 	| Database    	|

## Ansible directly from the host
Ansible will be executed from the host system and will talk directly to the LXD systems. The Vagrant box can be seen as completely transient. This is automatically realized by forwarding the public SSH key from the Vagrant box to the LXD systems.

In the host system (e.g. on your MAC BookPro) install ansible via brew
```
brew install ansible
```

Get the ssh <vagrant_private_key> location as per the the description in the [main README.md](../../README.md)

Prepare the ssh keys in your `~./ssh/config`, where <vagrant_private_key> is the ssh <vagrant_private_key> location found above.
```
# web1
host <IP_ADDRESS>
 HostName <IP_ADDRESS>
 IdentityFile <vagrant_private_key>
 User root
# web2
host <IP_ADDRESS>
 HostName <IP_ADDRESS>
 IdentityFile <vagrant_private_key>
 User root
# db1
host <IP_ADDRESS>
 HostName <IP_ADDRESS>
 IdentityFile <vagrant_private_key>
 User root
# db2
host <IP_ADDRESS>
 HostName <IP_ADDRESS>
 IdentityFile <vagrant_private_key>
 User root
```

First, login manually to each host to add the footprint to the known_hosts.
```
ssh root@<ip>
```

At this point ansible can be executed directly against the above mentioned hosts.

# Training Notes
The most exercises are around creating temp files to demonstrate the functionality of ansible. What works well is to watch a directory on the LXD host for addition and removal of these files as follows:
```
ssh root@<ip>
watch -t 'ls -a /tmp/ | grep file'
```
Exercises are executed initially with something similar like (example):
```
ansible-playbook -i ../../inventory 2-1-tasks.yml -e file_state=touch
```

## Cleanup
The following steps should be taken to delete the entire lab setup.
- Delete entries from `~./ssh/config`
- Delete entries from `~./ssh/known_hosts`
- For destroying the lab itself, including the underlying VM/box, please refer to the [main README.md](../../README.md) for more information

repository: moondly/foglab

gha_language: Ruby

repo_name: moondly/foglab


text:
## What is this?

I'm making an HTTP(S) server from scratch mostly for fun.

**This is an experiment**, the code base changes a lot. There are no tests although I'm currently running against [h2spec](https://github.com/summerwind/h2spec).

## Features

- HTTP 1.1 and HTTP/2 server
- Writes and reads are all asynchronous
- Thread-safe
- TLS 1.2 support
- Streaming responses
- Compatibility with Rack through an adapter

## Roadmap

Currently being worked on:

- Make it pass all specs of [h2spec](https://github.com/summerwind/h2spec)

Next steps, from top priority to lesser:

- Make "gears" closeable
- Make "gears" thread-safe
- Write some docs
- Create reverse-proxy adapter
- Create a decent example and "Setup & run" docs
- Refactor code to create adapters
- Get it working with jruby and real threads
- Have a decent logging mechanism
- Write unit tests
- Support TLS 1.3
- Support for Websockets
- Support for let's encrypt ACME protocol

## Setup & run

Don't, it's an experiment. Or, read the code and figure it out yourself :)

repository: andrepiske/wowhttp

repo_name: andrepiske/wowhttp


text:
# {{cookiecutter.repo_name}}

    A summary phrase to catch attention!

## The Basic Idea

This is a template module collecting many utilities I have liked from other projects, to serve as a personal reference.

- [https://github.com/tiangolo/pydantic-sqlalchemy/](https://github.com/tiangolo/pydantic-sqlalchemy/)
- [https://github.com/cookiecutter/cookiecutter](https://github.com/cookiecutter/cookiecutter)

## Features

- Poetry (virtual environment and publish to PyPi, all with one tool)
- black (linting/formatter)
- autoflake (removing unused packages)
- isort (dependency organization)
- mypy (static type checking)
- pytest (including test coverage)
- [pre-commit](https://pre-commit.com/) (hooks on commit)
- GitHub Actions for CI/CD
- mkdocs for documentation (with material theme)

## Installing {{cookiecutter.package_name}}

Install the latest release:

```bash
pip install {{cookiecutter.package_name}}
```

Or you can clone `{{cookiecutter.package_name}}` and get started locally

```bash

# ensure you have Poetry installed
pip install --user poetry

# install all dependencies (including dev)
poetry install

# develop!

```

## Example Usage

```python
import {{cookiecutter.package_name}}

# do stuff
```

Only **Python 3.6+** is supported as required by the black, pydantic packages

## Publishing to Pypi

### Poetry's documentation

Note that it is recommended to use [API tokens](https://pypi.org/help/#apitoken) when uploading packages to PyPI.

>Once you have created a new token, you can tell Poetry to use it:

<https://python-poetry.org/docs/repositories/#configuring-credentials>

We do this using GitHub Actions' Workflows and Repository Secrets!

### Repo Secrets

Go to your repo settings and add a `PYPI_TOKEN` environment variable:

![Github Actions setup of Poetry token environment variable](images/Github-Secrets-PYPI_TOKEN-Setup.png)

### Inspect the GitHub Actions Publish Workflows

```yml
name: Publish

on:
  release:
    types:
      - created

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      ...
      ...
      ...
      - name: Publish
        env:
          PYPI_TOKEN: ${{ "{{" }} secrets.PYPI_TOKEN {{ "}}" }}
        run: |
          poetry config pypi-token.pypi $PYPI_TOKEN
          bash scripts/publish.sh
```

> That's it!

When you make a release on GitHub, the publish workflow will run and deploy to PyPi! 🚀🎉😎

## Contributing Guide

Welcome! 😊👋

> Please see the [Contributing Guide](CONTRIBUTING.md).

repository: scratchmex/pypackage

repo_name: scratchmex/pypackage


text:
---
hrs_structure:
  division: '2'
  volume: '8'
  title: '23'
  chapter: '414'
  section: 414-381
type: hrs_section
tags:
  - Business
menu:
  hrs:
    identifier: HRS_0414-0381
    parent: HRS0414
    name: 414-381 Dissolution by incorporators or initial directors
weight: 24800
title: Dissolution by incorporators or initial directors
full_title: 414-381 Dissolution by incorporators or initial directors
---
**PART XV. DISSOLUTION**

A. Voluntary Dissolution

**[§414-381] Dissolution by incorporators or initial directors.** A majority of the incorporators or initial directors of a corporation that has not issued shares or has not commenced business may dissolve the corporation by delivering to the department director for filing articles of dissolution that set forth:

(1) The name of the corporation;

(2) The date of its incorporation;

(3) Either:

(A) That none of the corporation's shares has been issued; or

(B) That the corporation has not commenced business;

(4) That no debt of the corporation remains unpaid;

(5) That the net assets of the corporation remaining after winding up have been distributed to the shareholders, if shares were issued; and

(6) That a majority of the incorporators or initial directors authorized the dissolution. [L 2000, c 244, pt of §1]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
#PROJ4JS

Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.
Originally a port of [PROJ.4](http://trac.osgeo.org/proj/) and [GCTCP C](http://edcftp.cr.usgs.gov/pub//software/gctpc) it is
a part of the [MetaCRS](http://wiki.osgeo.org/wiki/MetaCRS) group of projects.

##Installing

Depending on your preferences

```bash
npm install proj4
bower install proj4
jam install proj4
component install proj4js/proj4js
```

or just manually grab the file `dist/proj4.js`

##Using

the basic signature is:

```javascript
proj4(fromProjection[, toProjection2, coordinates])
```

Projections can be proj or wkt strings, or a proj4.Proj object.

Coordinates may be proj4.Point objects, an object of the form `{x:x,y:y}`, or an array of the form `[x,y]`.

When all 3 arguments  are given, the result is that the coordinates are transformed from projection1 to projection 2. And returned in the same format that they were given in.

```javascript
var firstProjection = 'PROJCS["NAD83 / Massachusetts Mainland",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","26986"],AXIS["X",EAST],AXIS["Y",NORTH]]';
var secondProjection = "+proj=gnom +lat_0=90 +lon_0=0 +x_0=6300000 +y_0=6300000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs";
//I'm not going to redefine those two in latter examples.
proj4(firstProjection,secondProjection,[2,5]);
// [-2690666.2977344505, 3662659.885459918]
```

If only 1 projection is given then it is assumed that it is being projected *from* WGS84 (fromProjection is WGS84).

```javascript
proj4(firstProjection,[-71,41]);
// [242075.00535055372,<PHONE_NUMBER>0043]
```

If no coordinates are given an object with two methods is returned, its methods are `forward` which projects from the first projection to the second and `inverse` which projects from the second to the first.

```javascript
proj4(firstProjection,secondProjection).forward([2,5]);
// [-2690666.2977344505, 3662659.885459918]
proj4(secondProjection,firstProjection).inverse([2,5]);
// [-2690666.2977344505, 3662659.885459918]
```

and as above if only one projection is given, it's assumed to be coming from wgs84

```javascript
proj4(firstProjection).forward([-71,41]);
// [242075.00535055372,<PHONE_NUMBER>0043]
proj4(firstProjection).inverse([242075.00535055372,<PHONE_NUMBER>0043]);
//[-71, 40.99999999999986]
//the floating points to answer your question
```

##Developing
to set up build tools make sure you have node installed and run `npm install`

to build run `grunt` if that doesn't work try:

```bash
npm install -g grunt-cli #you may need a sudo in front of that
```

repository: ggolikov/cities-comparison

repo_name: ggolikov/cities-comparison


text:
## Euclidean algorithm

The euclidean algorithm is a recursive algorithm tha is often used at gcd and lcm algorithms (gcd and lcm is also in this repository, if you want to read about)

The pseudocode:

```
funtion euAlg(integer a, integer b)
    if b is 0
        return b

    return euAlg(a, a % b)
end

integer a
integer b

a = input()
b = input()

write(euAlg())
```


text:
# linear-preset-any-to-any

[![Build Status](https://travis-ci.org/javiercejudo/linear-preset-any-to-any.svg)](https://travis-ci.org/javiercejudo/linear-preset-any-to-any)
[![Coverage Status](https://coveralls.io/repos/javiercejudo/linear-preset-any-to-any/badge.svg?branch=master)](https://coveralls.io/r/javiercejudo/linear-preset-any-to-any?branch=master)
[![Code Climate](https://codeclimate.com/github/javiercejudo/linear-preset-any-to-any/badges/gpa.svg)](https://codeclimate.com/github/javiercejudo/linear-preset-any-to-any)

Generate linear presets for any to any conversions

## Install

    npm i linear-preset-any-to-any

## Usage

```js
var Decimal = require('linear-arbitrary-precision')(require('floating-adapter'));
var anyToAny = require('linear-preset-any-to-any')(Decimal);
var temp = require('linear-presets-temperature').conversions;

// all numbers are Decimal
anyToAny(temp, 'kelvin', 'fahrenheit');  // => [[273.15, 373.15], [32, 212]]
anyToAny(temp, 'celsius', 'fahrenheit'); // => [[0, 100], [32, 212]]
anyToAny(temp, 'fahrenheit', 'celsius'); // => [[32, 212], [0, 100]]
anyToAny(temp, 'celsius', 'celsius');    // => [[0, 1], [0, 1]]
```

## Related projects

- [linear-presets](https://github.com/javiercejudo/linear-presets): linear presets for common units.
- [linear-converter](https://github.com/javiercejudo/linear-converter): flexible linear converter.

repository: javiercejudo/linear-preset-any-to-any

repo_name: javiercejudo/linear-preset-any-to-any


text:
# Peziza muralis Sowerby, 1800 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Man. Brit. Discomyc. (London) 48 (1887)

#### Original name
Geopyxis muralis (Sowerby) Sacc., 1889

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Pezizomycetes/Pezizales/Pezizaceae/Peziza/Peziza cerea/ Syn. Peziza muralis/README.md

repo_name: mdoering/backbone


text:
# Contributing
Contributions are welcome and greatly appreciated!

You can contribute in many ways:

Please ensure you follow our Code of Conduct.

# Types of Contributions

## Report Bugs
Report bugs at https://github.com/ClointFusion/ClointFusion/issues.

If you are reporting a bug, please include:

Your operating system name and version, if applicable.
Any details about your local setup that might be helpful in troubleshooting.
Detailed steps to reproduce the bug.

## Fix Bugs
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.

## Implement Features
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.

## Write Documentation
ClointFusion could always use more documentation, whether as part of the official ClointFusion docs, in docstrings, or even on the web in blog posts.

The best way to send feedback is to file an issue at https://github.com/ClointFusion/ClointFusion/issues.

If you are proposing a feature:

1. Explain in detail how it would work.
2. Keep the scope as narrow as possible, to make it easier to implement.
3. Remember that this is a volunteer-driven project, and that contributions are welcome :)

# Get Started!
Ready to contribute? Here's how to set up ClointFusion for local development.
1. Fork the ClointFusion repo on GitHub.
2. Clone your fork locally
3. Install your local copy into a virtual environment
4. Create a branch for local development
5.  Submit a pull request through the GitHub website.

## Currently we are supporting only Windows OS

All the dependent packages would be installed automatically in a separate virtual environment

## pip install ClointFusion

Usage: Open a new Python file and type:

## import ClointFusion as cf

#Get all mouse related functions, by typing below code and hit CTRL+Space (intellisense in your favourite IDE)

cf.mouse_

#window operations :

cf.window_

## Pull Request Guidelines
Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
3. The pull request should work for Python 3.8 and for PyPi.

# Reachout to us<EMAIL_ADDRESS>

gha_license_id: NOASSERTION


text:
# CN-MALAYSIA BOT

This is a bot consuming DSteem and SteemJS API.
The bot will comment on the post of users that used #cn-malaysia without fulfilling the prerequisite set.

Current Version: v2.0.0
License: MIT

## Current Rules
- The post must at least contains 20% of chinese words, or else, the bot will comment on the post.

## Feature
- Whitelisted list.
- A data.json is generated to store data of a post in case the bot had already commented.

## Update History

- [v1.0.0](https://steemit.com/utopian-io/@superoo7/cn-malaysia-bot-a-bot-that-automates-moderating-cn-malaysia-community)
- [v2.0.0](https://steemit.com/utopian-io/@superoo7/cn-malaysia-bot-v2-0-0-release-complete-rewrite-added-testing-added-whitelist-remove-duplicate-comment)

## Developer notes

Library used

* 'steem'
* 'dsteem'
* 'typescript'
* 'dotenv'
* 'nodemon'

## How to use it

Create a `.env` to store your posting key and username.

```
ACCOUNT_KEY=POSTING_KEY_HERE
ACCOUNT_NAME=STEEM_NAME
```

Change variables in `config.ts`

Starting the server for development `npm run dev`
> I did not use babel or any minify work flow

For production, I would suggest using PM2 Library. (Install with `npm install -g pm2`)

Then, run `pm2 start src/index.js`


text:
This step allows you execute some basic numeric funcions with two decimal numbers.

For using this activity you must access here and select Numeric Functions.
Then in the activity you can fill all the parameters:

![](Numeric%20Functions_wf1.gif)

The parameters are two decimal numbers:

![](Numeric%20Functions_wf2.gif)

The Output Parameters are:
* Add: sum of the numbers.
* Subtract: subtraction of the numbers
* Multiply: multiplication of the numbers
* Divide: divide of the numbers

Then you can use the output numbers in other steps:
![](Numeric%20Functions_wf3.gif)

license: MS-PL

path: /docs/Numeric Functions.md

filename: Numeric Functions.md

gha_license_id: MS-PL


text:
---
title: 'EoN (Epidemics on Networks): a fast, flexible Python package for simulation, analytic approximation, and analysis of epidemics on networks'

tags:
  - SIR
  - SIS
  - Epidemic
  - Network
  - Stochastic simulation
  - Python

authors:
 - name: Joel C. Miller
   orcid: 0000-0003-4426-0405
   affiliation: "1, 2"
 - name: Tony Ting
   affiliation: "2"

affiliations:
 - name: La Trobe University, Melbourne, Australia
   index: 1
 - name: Institute for Disease Modeling, Seattle, Washington, USA
   index: 2

date: 19 July 2019

bibliography: paper.bib

---

# Summary

EoN (EpidemicsOnNetworks) is a pure-Python package designed to study
infectious processes spreading in networks.  It rose out of the
book *Mathematics of Epidemics on Networks* [@kiss:EoN], and now consists of over
100 user-functions.  EoN relies on the networkx package [@hagberg2008exploring].

EoN provides methods for

- Susceptible-Infected-Susceptible (SIS) and Susceptible-Infected-Recovered
(SIR) disease
  - Stochastic simulation of disease spread in networkx graphs
    - continuous time Markovian
    - continuous time nonMarkovian
    - discrete time
  - Numerical solution of over 20 differential equation models, including
    - individual and pair-based models
    - pairwise models
    - edge-based compartmental models
- Stochastic simulation of a wide range of Simple and Complex contagions
- Visualization and analysis of stochastic simulations

The documentation is maintained at
https://epidemicsonnetworks.readthedocs.io/en/latest/
including numerous examples at
https://epidemicsonnetworks.readthedocs.io/en/latest/Examples.html.  This paper
briefly describes a few of EoN's main tools.  The online documentation gives
full detail, including examples.

## SIR and SIS disease

### Stochastic simulation
The main stochastic simulation tools allow the user to investigate
standard SIS and SIR dynamics:

- Markovian SIS and SIR simulations  (``fast_SIS``, ``Gillespie_SIS``, ``fast_SIR``, and ``Gillespie_SIR``).
- non-Markovian SIS and SIR simulations (``fast_nonMarkovian_SIS`` and ``fast_nonMarkovian_SIR``).
- discrete time SIS and SIR simulations where infections last a single time step
  (``basic_discrete_SIS``, ``basic_discrete_SIR``, and ``discrete_SIR``).

For both Markovian and non-Markovian methods it is possible for the transition
rates to depend on individual or partnership properties.

The continuous-time stochastic simulations have two implementations: a
Gillespie implementation [@gillespie1977exact; @doob1945markoff] and an event-driven
implementation.  They have similar speed if the dynamics are Markovian
(depending on network and disease parameters either may be faster than the
other), but the event-driven implementations also handle
non-Markovian dynamics.  In earlier versions, the event-driven simulations were
consistently faster, leading to the names `fast_SIR` and `fast_SIS`.  The
Gillespie simulations have been optimized using ideas from [@holme2014model]
and [@cota2017optimized].

The algorithms typically handle an SIR epidemic spreading on
hundreds of thousands of individuals in well under a minute on a laptop.
SIS versions are slower because the number of events that happen is typically much
larger.

### Differential Equations Models

EoN also provides tools to numerically solve about 20 differential equations
models for SIS or SIR disease spread in networks using SciPy integration tools.
The models use different information about the network to predict the
number of infected individuals as a function of time.  Model derivations and explanations of
their simplifying assumptions are in [@kiss:EoN].

## Simple and Complex Contagions

Other contagious processes in networks have received attention.
Many of these can be classifed as either "simple contagions" or "complex
contagions".

In a "simple contagion," an individual ``u`` may be induced to change status by
an interaction with its partner ``v``.  This status change occurs with the same
rate regardless of the statuses of other partners of ``u`` (there may be a race
between partners to determine which transmits first).  SIS, SIR, SEIR, and SIRS
diseases are special cases of simple contagions.

In "complex contagions," however, the rate at which ``u`` changes
from one status to another may depend on the statuses of others in more
complex ways.  Two infected individuals may work synergistically to cause a
susceptible individual to become infected.  This is frequently thought to
model social contagions where an individual may only believe something if
multiple partners believe it [@centola:cascade].

Simple and complex contagions are currently implemented only in a
Gillespie framework, so they require Markovian assumptions.  It would
typically be feasible to make a bespoke algorithm that runs significantly faster.

### Simple contagions

EoN provides a function ``Gillespie_simple_contagion`` that allows a user to
specify the rules governing an arbitrary simple contagion.  The implementation
requires the user to separate out two distinct ways in which
transitions occur: those that occur spontaneously from an individual's current state
and those that are induced by a partner.  To help demonstrate, consider an
"SEIR" epidemic, where individuals begin susceptible, but when they interact
with infectious partners they may enter an exposed state.  They remain in that
exposed state for some period of time before transitioning into the infectious
state independently of the status of any partner.
They remain infectious and eventually transition into the recovered state, again
independently of the status of any partner.  Here the "E" to "I" and "I" to "R"
transitions occur spontaneously given the individual's state, while the "S" to "E"
transition is induced by a partner.

### Complex contagions

Complex contagions are implemented through ``Gillespie_complex_contagion`` for which
the user specifies the rules governing a relatively arbitrary complex
contagion.  There is a constraint that there is no memory: an individual
will change from one status to another based on the current statuses of its
neighbors, and not based on previous interactions with some neighbors who may
have since changed status.

The Gillespie implementation requires a user-defined function that
calculates the rate at which ``u`` will change status given the current system
state and another function which chooses its new status.  It also needs a
function that determines which nodes have their  rate change due to ``u``'s
transition.  With these functions defined, the Gillespie algorithm can simulate
the complex contagion.

### Visualization & Analysis

By default, simulations return NumPy arrays providing counts of each state.
However, if we set a flag ``return_full_data=True``, the simulations return a
``Simulation_Investigation`` object.  This provides
access to complete information about the simulation, including the transmission
chains.

The ``Simulation_Investigation`` object can create a snapshot of the network
at a given time.  By default the visualization includes the time series
(e.g., S, I, and R) plotted beside the network snapshot, with flexibility
about what (or if) other time series appear.  With appropriate additional
packages for Matplotlib's animation tools, it can produce animations as well.

## Discussion

EoN provides tools for contagious processes spreading in contact networks, including
SIR and SIS diseases and more generally simple and complex contagions.  It also
provides tools for visualizing stochastic simulation output.
Full documentation is available at https://epidemicsonnetworks.readthedocs.io/en/latest/

# Dependencies:

Scipy
NumPy
networkx
Matplotlib

# Related Packages

Several alternative software packages allow for simulation of
epidemics on networks.  Here we briefly review some of these.

### epydemic

The Python package Epydemic simulates SIS and SIR epidemics in
networks.  It is built on networkx.  It handles both discrete-time or
continuous-time Markovian simulations for which it uses a
Gillespie-style algorithm.  It can handle any process which can be simulated using
``EoN.simple_contagion``.

The documentation is available at https://pyepydemic.readthedocs.io/en/latest/

### Graph-tool

The Python package Graph-tool [@peixoto_graph-tool_2014] serves as a networkx
alternative.  Its underlying processes are written in C++,
so it is often much faster.

Graph-tool has a number of built-in dynamic models, including the SIS, SIR,
and SIRS models.  The disease models are currently available only in
discrete-time versions.

The disease model documentation is available at
https://graph-tool.skewed.de/static/doc/dynamics.html.

### EpiModel

The R package EpiModel [@jenness:EpiModel] can handle SI, SIS, and SIR
disease spread.  It is possible to extend EpiModel to other processes.  EpiModel
is built around the StatNet package.  More details are available
at https://www.epimodel.org/

# Funding and Support

The development of EoN has been supported by Global Good and by La Trobe
University.

# References

gha_language: Python


text:
# processing.js + Arduino
Sample code showing processing.js with Arduino using Node and Socket.io

To run this:

1) Install the Arduino code in potSense onto your Arduino and build the circuit

2) Run `mpn install` to get the required node packages

3) In `/public` run `bower install` to get proessing.js

4) Start the code using `node server.js arduinoSerialPort` where the `arduinoSerialPort` will be something like `/dev/tty.usbmodem1421`

repository: clrengif/processingJSArduinoTest

repo_name: clrengif/processingJSArduinoTest


text:
title: Lars Leijten
name: Lars Leijten
template: people-single
picture: people/Lars_Leijten.jpg
position: PhD Candidate
active: yes
groups: diag
default_group: diag
email<EMAIL_ADDRESS>office: Route 767
type: phd

Lars Leijten is a PhD Candidate at the Medical Imaging department of Radboudumc, where he works in the [Diagnostic Image Analysis Group (DIAG)](https://www.diagnijmegen.nl/). Lars is focused on developing AI solutions for Intervention Oncology as part of the [IMAGIO](https://www.diagnijmegen.nl/projects/imagio/) project. Specifically, he is working on developing an automatic malignancy risk estimation tool for lung nodules using CT and FDG-PET/CT imaging. His research is supervised by a team consisting of [member/colin-jacobs], [Roel Verhoeven](https://www.linkedin.com/in/roel-verhoeven-377050a6/), [Erik Aarntzen](https://www.radboudumc.nl/personen/erik-aarntzen), and [Erik van der Heijden](https://www.radboudumc.nl/en/people/erik-van-der-heijden).

Lars holds a Bachelor's and Master's degree in Biomedical Sciences from Radboud University, where he completed projects in Medical Deep Learning and Health Technology Assessment. His work involved simulating scoliosis CT data and conducting a prospective cost-effectiveness analysis of Minimally Invasive Cervical Esophagectomy.

repository: DIAGNijmegen/website-content

gha_language: TeX

repo_name: DIAGNijmegen/website-content


text:
Traclight
---------
- version 0.2
- author: Ry Wharton
- url: http://tech.howcast.com
- source: http://github.com/ryland/traclight/tree/master

Why hello, you have stumbled upon a simple script to import a trac.db database file into Lighthouse.

## Requirements
- activerecord
- activeresource
- activesupport
- lighthouse-api (http://github.com/Caged/lighthouse-api/tree/master)

## Limitations
- The tickets will show up as being reported by the owner of the account you specify in the ticket, not the original reporter. The original Trac reporter will show up in the description for the ticket.
- It is not possible to set the original date the ticket was reported in Lighthouse. The original reporting date of the Trac ticket will appear in the Lighthouse ticket description.
- Attachments are _not_ imported, as support currently doesn't exist in the API.

## Tips
- Starting with an empty Lighthouse project will maintain your ticket numbers, assuming your Trac tickets start at 1 and none have been deleted.
- If you need to do a selected import, check out the convert method, which allows you to pass an options parameter to an ActiveRecord.find() call. (At some point this will be available via the command line...)

## Use

Please read the LICENSE.

1. Create all milestones and users for your project before running the script. You will need the ID numbers for these to convert them correctly.

2. The export your trac database. You should have a copy of trac.db to run the script on. See http://trac.edgewall.org/wiki/TracFaq#is-there-any-way-to-migrate-tickets-from-one-trac-installation-to-another for more info.

3. You will need to edit the commented sections at the beginning of the traclight.rb file in order to add your project related info.

4. Once you have entered your information in the script, you can simply run:
    traclight.rb PATH_TO_YOUR_TRAC_DB

Thanks to Florian Muellner for comment migration code.

repository: ryland/traclight

extension: markdown

repo_name: ryland/traclight


text:
# Back End of Housing Insights
This portion of the project holds the "back end" of the website implemented in python. It contains the following:

* `app.py`: The main application file and ultimate server-side logic for the tool.
* `mailer.py`: Contains code to send e-mails related to the tool automatically.
* `test.py`: Contains tests for the back end portion of the project. Run `python test.py` to run all tests.
* `Dockerfile`: Sets up the deployment environment.
* `Dockerfile-development`: Sets up the development environment.
* `environment.yml`: A conda environment template run by the Dockerfile
* `secrets.yml`: Holds API keys and other secret information.
* `secrets.sample.yml`: A template for `secrets.yml`.
* `ETL`: Extract, Transform, Load. Code is responsible for loading in data sources into the tool.
    * `__init__.py`: Allows specific imports for `app.py`.
    * `acs.py`: Handles American Community Suvey data.
    * `crime.py`: Handles crime data from Open Data DC.
    * `permit.py`: Handles building permit data.
    * `project.py`: Collects projects, REAC, and TOPA information for the database.
    * `subsidy.py`: Adds subsidy data to the subsidy table in the database.
    * `utils.py`: Miscellanious functions that are needed for the ETL process.
    * `wmata.py`: Handles bus stop and rail station data.
    * `wmata_helper.py`: Handles bus stop and rail station data grouping for the API output format.
    * `make_geographic_weights.py`: Creates weights for demographics calculations. This should only be run if the census boundaries have changed.
    * `make_zone_facts.py`: Creates the zone facts table from ACS, crime, and permit data.
    * `filter_view_query.py`: The SQL query for the filter API route.

## Reference and Common Changes
* E-mail functionality can be changed `mailer.py`
* API routes can be added to `app.py`
* User table loading routes can be added to `app.py`
* Raw data ingestion occurs in a file within `ETL`
* Specific columns are sent to the database via `ETL` as well
* `ETL` functions can be exposed to the app in `ELT/__init__.py`

## Data Sources

#### Downloaded From the S3
* Preservation Catalog Projects
* Preservation Catalog Subsidies
* Preservation Catalog REAC Information
* TOPA Information

#### Collected From External Source
* [American Community Survey Data](https://www.census.gov/programs-surveys/acs/data.html)
* [Open Data DC Crime](https://opendata.dc.gov/datasets/crime-incidents-in-2019)
* [Open Data DC Building Permits](https://opendata.dc.gov/datasets/building-permits-in-2019)
* [Open Data DC Affordable Housing Projects](https://opendata.dc.gov/datasets/34ae3d3c9752434a8c03aca5deb550eb_62)
* [Open Data DC Integrated Tax System Public Extract](https://opendata.dc.gov/datasets/integrated-tax-system-public-extract)
* [The DC Master Address Repository](https://opendata.dc.gov/datasets/address-points)
* [Open Data DC Census Tract Shapefiles](https://opendata.dc.gov/datasets/census-tracts-by-population-2000)
* [Open Data DC Neighborhood Cluster Shapefiles](https://opendata.dc.gov/datasets/neighborhood-clusters)
* [WMATA API](https://developer.wmata.com/)
* [Bus Stops](https://opendata.dc.gov/datasets/e85b5321a5a84ff9af56fd614dab81b3_53)
* [Rail Stations](https://opendata.dc.gov/datasets/metro-stations-in-dc)

#### ACS Detail Tables Used
| Detail Table  | Description                       |
|---------------|-----------------------------------|
| `B01003 001E` | Total population                  |
| `B02001 003E` | African American population       |
| `B17020 002E` | Population in poverty             |
| `B23025 002E` | Labor force population            |
| `B16008 019E` | Foreign born population           |
| `B09002 015E` | Single mom households             |
| `B19025 001E` | Aggregate household income        |
| `B25057 001E` | Lower rent quartile in dollars    |
| `B25058 001E` | Median rent quartile in dollars   |
| `B25059 001E` | Upper rent quartile in dollars    |

## API Routes
* `/api/project`: Returns all projects.
* `/api/project/nlihc_id`: Returns project information for a single project.
* `/api/project/<nlihc_id>/subsidies/`: Returns subsidies for a single project.
* `/api/projects/<dist>`: Returns projects within half a mile of a set of coordinates.
* `/api/filter`: For the filter view, returns just about everything.
* `/api/wmata/<nlihc_id>`: Returns transit information for all transit within half a mile of a project.
* `/api/zone_facts/<column_name>/<grouping>`: Returns the zone fact for a specific zone type.

## Database Connection
This project uses a PostgreSQL database, with the development version using a Docker image and the production database hosted on AWS.
Connecting to the database happens two ways:

1. A SQLAlchemy engine sent through pandas functions. The pandas function `to_sql` allows clean and simple data loading for entire tables as
they are crafted in `ETL`. The function only takes a SQLAlchemy engine object or SQLite connection, so this was necessary.
2. The API creates a new `psycopg2` connection with each call and closes it appropriately. This ensures there are no hung connections to the production database.

**Why not SQLAlchemy throughout?**

An earlier of this project used SQLAlchemy to reflect the database, but did not consistently use the ORM for querying. It actually had the data loading process entirely separate from the Flask application, so
having the ORM and infrastructure to make migrations did not exists. After consideration, it was revealed the front end required a flat and wide return of data that made using the ORM over raw SQL
a little cumbersome. If this changes in the future, refactoring using an ORM may be more appropriate.

## Environments / Dependencies
The Dockerfile creates and maintains a conda enviroment with the necessary python dependencies. While this set up was used in a previous iteration of the project, it is required moving forward.
As this project uses the `geopandas` package, conda allows the collection and use of non-python dependencies that would be more difficult to set up without it.

The following packages are used in this project:
- `sqlalchemy`
- `numpy`
- `pandas`
- `geopandas`
- `flask`
- `pyyaml`
- `requests`
- `xlrd`
- `flask-cors`
- `flask-sqlalchemy`
- `flask-restless`
- `flask-marshmallow`
- `psycopg2-binary`
- `flask-apscheduler`

### Running the code
All code is ultimately called and used from `app.py`, therefore, running code should be done at this top level (`back_end`) inside the Docker container.
To do adhock testing of code within ETL, you may need to adjust the imports, such as `import utils` rather than `from . import utils`.

For development do the following.
1. Use the appropriate `docker-compose` command to start the containers.
2. Run `docker-compose exec sandbox bash` to enter the python container.
3. Navigate to the application by running `cd /repo/back_end/`.
4. Run `python app.py` to start the application.

### Elastic Beanstalk Deployment Setup
- Install the Elastic Beanstalk Command Line Interface: `$ pip install awsebcli`
- Configure a profile that uses the AWS credentials for our Code for DC API account: `aws configure --profile codefordc`
- Enter the public and secret keys provided to you by an admin; default location and output format can be None (just press enter)

### Elastic Beanstalk Deployment Overview
1. Reference the [documentation](https://docs.aws.amazon.com/en_pv/elasticbeanstalk/latest/dg/single-container-docker.html#single-container-docker.deploy-local)
2. Navigate to the `back_end` folder in your local repo
3. Create the environment with `eb init -p docker housinginsights-codefordc`
4. Test it locally with `eb local run --port 5000`
3. Actually deploy with `eb deploy housinginsights-codefordc --profile codefordc`
4. Wait a few minutes while the server restarts with the new version of the project.
5. Double check your work at [http://housinginsights.us-east-1.elasticbeanstalk.com/](http://housinginsights.us-east-1.elasticbeanstalk.com/)

#### Deploy to staging enviroment to test
1. Do steps 1 - 3 above.
2. run `eb create --profile codefordc --instance_type t2.small --single`
3. At the prompt, enter the name housinginsights-staging
4. DNS CNAME can be default (i.e. housinginsights-staging)
5. Select classic load balancer type. This will both create and deploy the current code. Wait while the server starts up, and then test the api url to make sure your changes behave as expected.
6. If you need to make any edits and deploy to a running test server, use: `eb deploy housinginsights-staging --profile codefordc`
7. **Important!** be sure to terminate the staging environment when you're done! You should only have this staging environment running while you're actively working on testing your live code.
8. Run `eb terminate housinginsights-staging`, or visit the Elastic Beanstalk instance in the [web console](https://codefordc.signin.aws.amazon.com/console).  Note, be sure to include the name of the instance to terminate, since the default if none is specified is the production server.
9. Use `eb list --profile codefordc` to verify that the instance has been terminated

repository: ndtallant/housing-insights

branch_name: refs/heads/dev

repo_name: ndtallant/housing-insights


text:
A small thematic mod to make it more fun to sail around with friends.

## Features

- Each additional passenger increases the speed that ships move when in paddle mode (forward or back 1 arrow speed)
- Speed increase is configurable, and defaults to a geometric series sum with a = 1/2, r = 7/8, and n = passenger count

## Known issues

- All users on a server should have the mod installed to minimize issues
- Logging out or disconnecting while on the deck of a ship may cause the passenger count to be incorrectly increased until all players leave the area

## Pre-Requisites

This mod requires BepInEx. Follow the instructions here if you don't have it installed already: https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/

## Installation

- Extract the archive into a folder. Do not extract into the game folder.
- Move the contents of "plugins" folder into "<GameDirectory>\Bepinex\plugins"
- Start the game

## Configuration

Configuration file is located at "<GameDirectory>\Bepinex\config\ohmg.mods.paddlepower.cfg"

"enabled": enables or disables this plugin in its entirety
"debug_logging": enables or disables printing debug log messages. Kind of spammy and not necessary unless you're trying to figure out a particular issue

"counting_method": What players to count as contributing to ship speed
- ALL: All players on the deck of the ship
- ATTACHED: (default) Only count players on the ship that are seated or holding onto the mast or bow
- SEATED: Only count players that are seated (includes pilot)

"scaling_method" selects which formula to use for calculating player speed contributions
- GEOMETRIC: (default) Each additional player contributes a diminishing amount of extra speed
- LINEAR: Each additional player contributes the same amount of extra speed

GEOMETRIC specific configuration properties:
- Check out https://en.wikipedia.org/wiki/Geometric_series for a primer on geometric series
- The "coefficient" and "ratio" properties correspond to "a" and "r" in the article
- The "ratio" configuration property is constrained to between 0 and 1

LINEAR specific configuration properties:
- "base_amount": Paddle force contributed by the ship pilot
- "additional_amount": Paddle force contributed by each additional player
- "maximum_bonus": Maximum paddling force, regardless of player count

repository: mgway/ValheimMods

repo_name: mgway/ValheimMods


text:
# Honda Shadow OBD Display

This is a 'in-work'n project. Many aspects may not work yet!

A Teensy 3.2 based OBD display for a
2013 Honda Shadow 750 Aero.

There are 2 parts to this project:
1) A level converter/interface board that connects to the diagnostic connector on the motorcycle. This provides power and opto-isolates the OBD signal. The OBD signal is level shifted to a 3.3V logic level. The schmatic and Eagle PCB files are included.

2) A Teensy 3.2 microcontroller connected to a 240x320 LCD Touchscreen. This displays the various options and OBD values. GThe Teensy and LCD are from PRJC.com. It uses the PCB LCD adapter from PRJC to connect the LCD to the Teensy, and is available from the OSHPark.com.

repository: tbitson/Honda-Shadow-OBD-Display

repo_name: tbitson/Honda-Shadow-OBD-Display


text:
[![Stories in Ready](https://badge.waffle.io/sunForest/AviPost.png?label=ready&title=Ready)](https://waffle.io/sunForest/AviPost)
# AviPost

[![Circle CI](https://img.shields.io/circleci/project/sunForest/AviPost.svg)](https://circleci.com/gh/sunForest/AviPost) [![Coverage Status](https://img.shields.io/coveralls/sunForest/AviPost/master.svg)](https://coveralls.io/r/sunForest/AviPost?branch=master)

## Build Instruction for Development
------in progress------

1. install PostgreSQL, python (2.7 or 3.4), git and pip
2. install virtualenv
  ```
  sudo pip install virtualenv
  ```
3. create an isolated python environment
  `virtualenv [dirName]`
  `source [dirName]/bin/activate`
4. glone the git repository
  `cd [dirName]`
  `git clone https://github.com/sunForest/AviPost.git`
  `cd AviPost`
5. install python dependencies
  `pip install requirements/dev.txt`
6. create your own setting file and change the database config (e.g. avipost/settings/dev_ssen.py). There are two ways to use your own setting file:
  * change the `DJANGO_SETTINGS_MODULE` value in manage.py (but don't commit it back to the repo)
  * add `--settings=avipost.settings.dev_xx` to all the python manage.py commands
7. create tables in your database
  `python manage.py migrate`

repository: sunForest/AviPost

repo_name: sunForest/AviPost


text:
# SoftwareDesignPatterns
Examples of Software Design Patterns

## Behavioral

### Java

- [Strategy](https://github.com/Ragnarok540/SoftwareDesignPatterns/tree/master/java/01_strategy)
- [Observer](https://github.com/Ragnarok540/SoftwareDesignPatterns/tree/master/java/02_observer)

## Structural

### Java

- [Decorator](https://github.com/Ragnarok540/SoftwareDesignPatterns/tree/master/java/03_decorator)

## Creational

### Java

- [Factory Method](https://github.com/Ragnarok540/SoftwareDesignPatterns/tree/master/java/04_factory_method)


text:
# ml-study-group
Materials for the Machine Learning study group

# Installation Instructions
1. Download and install anaconda python - https://www.anaconda.com/download/#macos
2. Download the version of python3
2. Create a virtual environment for this project.
```bash
conda create -n ml python=3.6
```
3. Activate the virtualenv
```bash
source activate ml
```
4. Run the notebook
```
jupyter notebook
```
5. Deactivate the virtualenv
```bash
deactivate
```

repository: ArulselvanMadhavan/ml-study-group

repo_name: ArulselvanMadhavan/ml-study-group


text:
# Stigmella dryophila (Corda) Lindau, 1908 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Dicoccum dryophilum Corda, 1837

### Remarks
null

path: /life/Fungi/Ascomycota/Stigmella/Stigmella dryina/ Syn. Stigmella dryophila/README.md


text:
# triangle-game
Little project to solve the triangle peg board game, written in Java

# Required environment

* Java 8 or greater.  On ubuntu/debian linux systems `sudo apt install openjdk-8-jdk`.
You can also install later versions.
* Maven (just search for maven install YOUR_OPERATING_SYSTEM).  On ubuntu/debian
based linux systems, simply install `sudo apt install maven`

# Running

```
cd REPO/java
mvn exec:java
```

The output looks like:
```
8
false
false false
true true true
false false false false
true true true true true
Move: 0
X
o o
o o o
o o o o
o o o o o
Move: 1
E
o J
o o S
o o o o
o o o o o
```
This means:

1. We found a set of moves to leave 8 items.
2. The final state of the board is next, where false=no_peg, and true=peg
3. Move: 0 is the starting state, and the X indicates the open whole to leave
4. Move: 1 is the first jump, S indicates the the starting place of the peg to jump.
E is the ending place, and J is the peg jumped over, and the one that should be removed.

repository: wjladams/triangle-game

repo_name: wjladams/triangle-game


text:
# Databases-and-SQL-for-Data-Science-Final-Assignment
Final assignment solutions for Coursera course "Databases and SQL for Data Science"

Problem 1:
Find the total number of crimes recorded in the CRIME table

![sol1](https://user-images.githubusercontent.com/36910708/82351472-4115db00-9a1a-11ea-99e2-2d55fa4bb5a4.PNG)

Problem 2:
Retrieve first 10 rows from the CRIME table

![sol2](https://user-images.githubusercontent.com/36910708/82351446-39563680-9a1a-11ea-9edb-f888c3f37089.PNG)

Problem 3:
How many crimes involve an arrest?

![sol3](https://user-images.githubusercontent.com/36910708/82351448-3b1ffa00-9a1a-11ea-9a37-3f77d0377f91.PNG)

Problem 4:
Which unique types of crimes have been recorded at GAS STATION locations?

![sol4](https://user-images.githubusercontent.com/36910708/82351451-3bb89080-9a1a-11ea-84f4-635c8a38dfa2.PNG)

Problem 5:
In the CENUS_DATA table list all Community Areas whose names start with the letter ‘B’.

![sol5](https://user-images.githubusercontent.com/36910708/82351456-3ce9bd80-9a1a-11ea-8bf7-82a6140e9e42.PNG)

Problem 6:
Which schools in Community Areas 10 to 15 are healthy school certified?

![sol6](https://user-images.githubusercontent.com/36910708/82351460-3d825400-9a1a-11ea-922f-0ec7801a2c21.PNG)

Problem 7:
What is the average school Safety Score?

![sol7](https://user-images.githubusercontent.com/36910708/82351463-3e1aea80-9a1a-11ea-989f-02500cb2a7b9.PNG)

Problem 8:
List the top 5 Community Areas by average College Enrollment

![sol8](https://user-images.githubusercontent.com/36910708/82351465-3eb38100-9a1a-11ea-82d0-9bb60497a437.PNG)

Problem 9:
Use a sub-query to determine which Community Area has the least value for school Safety Score?

![sol9](https://user-images.githubusercontent.com/36910708/82351466-3f4c1780-9a1a-11ea-8402-74fb7e40a7f3.PNG)

Problem 10:
(Without using an explicit JOIN operator) Find the Per Capita Income of the Community Area which has a school Safety Score of 1.

![sol10](https://user-images.githubusercontent.com/36910708/82351468-407d4480-9a1a-11ea-985c-1c7bfd284692.PNG)


text:
# [save_entity](save_entity.hpp)

```cpp
nlohmann::json save_entity(entt::const_handle e) noexcept;
```

Returns a JSON object generated by serializing the entity.

For components to be serializable, the [save](../functions/save.md) `meta component` must first have been registered for them.

repository: phisko/kengine

repo_name: phisko/kengine


text:
# Plenar.io

RESTful API for geospatial and time aggregation across multiple open datasets.

This project is funded by the [NSF Computer and Information Science and Engineering (CISE) Directorate](http://www.nsf.gov/dir/index.jsp?org=CISE) through a grant to the [Urban Center for Computation and Data](https://urbanccd.org/) (UrbanCCD) at the [Computation Institute](http://ci.uchicago.edu) of the [University of Chicago](http://uchicago.edu) and [Argonne National Laboratory](http://www.anl.gov). It is being implemented by [DataMade](http://datamade.us) and UrbanCCD.

For more details, see the presentation slides from [Exploring Open Civic Data Through Time and Space](https://docs.google.com/presentation/d/1Une-A1k0mUAIYac5UlmeSDLw4VyHYsaw1NW5f4YKWas/edit#slide=id.p) given in June 2014.

## Running locally

* Get the Plenario source:

``` bash
git clone git@github.com:UrbanCCD-UChicago/plenario.git
```

Install support libraries for Python:

``` bash
cd plenario
pip install -r requirements.txt
```

Create a PostgreSQL database for Plenario. (If you aren't
  already running [PostgreSQL](http://www.postgresql.org/), we recommend
  installing version 9.3 or later.)

```
createdb plenario_dev
```

Make sure your local database has the [PostGIS](http://postgis.net/) extension:

```
psql plenario_dev
plenario_test=# CREATE EXTENSION postgis;
```

Create your own `settings.py` file:

```
cp plenario/settings.py.example plenario/settings.py
```

You will want to change, at the minimum, the following `settings.py` fields:

* `DATABASE_CONN`: edit this field to reflect your PostgreSQL
  username, server hostname, port, and database name.

* `DEFAULT_USER`: change the username, email and password on the administrator account you will use on Plenario locally.

If you want your datasets hosted on an S3 bucket, edit the fields
`AWS_ACCESS_KEY`, `AWS_SECRET_KEY`, and `S3_BUCKET`. Otherwise,
datasets will be downloaded locally to the directory in the `DATA_DIR`
field.

Additionally, create your own `celery_settings.py` file:

```
cp plenario/celery_settings.py.example plenario/celery_settings.py
```

You probably do not need to change any values in `celery_settings.py`,
unless you are running redis remotely (see `BROKER_URL`).

Before running the server, [Redis](http://redis.io/) and
[Celery](http://www.celeryproject.org/) also need to be running.

* To start Redis locally (in the background):
```
redis-server &
```

* To start Celery locally (in the background):
```
celery -A plenario.celery_app worker --loglevel=info &
```

Initialize the plenario database by running `python init_db.py`.

Finally, run the server:

```
python runserver.py
```

Once the server is running, navigate to http://localhost:5001/ . From
the homepage, click 'Login' to log in with the username and password
from `settings.py`. Once logged in, go to 'Add a dataset' under the
'Admin' menu to add your own datasets.

## Running with Docker
Additionally, we support installing Plenario using Docker containers. Because of the variety of PostgreSQL/Docker configuration options, there are two containers needed for Plenario. One is a Plenario web server Docker container, which we provide a Dockerfile for. The other is a PostgreSQL+PostGIS database Docker container. We recommend using [helmi03/docker-postgis](https://github.com/helmi03/docker-postgis). Please read carefully about persisting data to the database.

1. Boot a PostGIS/PostgreSQL setup. See above.
2. Alter settings in settings.py.docker.
3. Run `docker build .`
4. Run `docker run`
5. Congrats! Plenario should now be running in the container.

# Data

New datasets are actively being added to the Plenario API. We keep track of them in this [Google Doc](https://docs.google.com/spreadsheet/ccc?key=0Au-2OHnpwhGTdGJzUWJ2SERwVXZLeDU4Y3laWFJvNEE&usp=sharing#gid=0).

# Dependencies
We used the following open source tools:

* [PostgreSQL](http://www.postgresql.org/) - database version 9.3 or greater
* [PostGIS](http://postgis.net/) - spatial database for PostgreSQL
* [Flask](http://flask.pocoo.org/) - a microframework for Python web applications
* [SQL Alchemy](http://www.sqlalchemy.org/) - Python SQL toolkit and Object Relational Mapper
* [Green Unicorn](http://gunicorn.org/) - Python WSGI HTTP Server for UNIX
* [psycopg2](http://initd.org/psycopg/) - PostgreSQL adapter for the Python
* [GeoAlchemy 2](http://geoalchemy-2.readthedocs.org/en/0.2.4/) - provides extensions to SQLAlchemy for working with spatial databases
* [Celery](http://www.celeryproject.org/) - asynchronous task queue
* [Redis](http://redis.io/) - key-value cache

## Team

### UrbanCCD
* Charlie Catlett
* Brett Goldstein
* Svetlozar Nestorov
* Jonathan Giuffrida
* Maggie King
* Jiajun Shen

### DataMade
* Derek Eder
* Eric van Zanten
* Forest Gregg
* Michael Castelle

## Join Our Community

Join our community to hear about platform updates, new features and discuss the potential uses of Plenario. We want to start a conversation with you, the users, about what Plenario can do for you - whether you're a city manager, an app developer, a researcher, or a citizen interested in exploring open data.

[Join our Google Group](https://groups.google.com/forum/#!forum/plenariodataportal)

## Errors / Bugs

If something is not behaving intuitively, it is a bug, and should be reported.
Report it here: https://github.com/UrbanCCD-UChicago/plenario/issues

## Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Send us a pull request. Bonus points for topic branches.

## Copyright

Copyright (c) 2014 University of Chicago and DataMade. Released under the [MIT License](https://github.com/UrbanCCD-UChicago/plenario/blob/master/LICENSE).

repository: dssg/plenario

repo_name: dssg/plenario


text:
# bitrise-api-sim-crash-detector
Detect iOS Simulator Crashes in Logs using Bitrise API

To run this against your own Bitrise Apps just update the settings in js/app.js

```
const WORKFLOWS = ['primary'];
const PERSONAL_ACCESS_TOKEN = '';
const APP_SLUG = '';
const LAST_BUILD_SLUG = '';
const MIN_BUILD_NUMBER = 0;
```

## WORKFLOWS

An array of workflows to query in your Bitrise app

## PERSONAL_ACCESS_TOKEN

Generate a Personal Access Token following the guide here:

- https://devcenter.bitrise.io/getting-started/account-security/#generating-personal-access-tokens-manually

## APP_SLUG

The Bitrise App Slug of the app you wish to query

You can get the APP_SLUG from the Bitrise URL when viewing your App & Build.

## LAST_BUILD_SLUG

You can get the LAST_BUILD_SLUG from the Bitrise URL when viewing your App & Build.

The LAST_BUILD_SLUG should be the Bitrise build slug of the last build you want to load data up to.

## MIN_BUILD_NUMBER

The last build number to query.

I would recomend to set the MIN_BUILD_NUMBER no more than 1000 below your current build number so it loads fully faster.


text:
# Coding style guide

## Installing the OpenKilda coding style settings in IntelliJ IDEA

Download the intellij-java-openkilda-style.xml file from the [https://github.com/telstra/open-kilda/tree/master/services/src/checkstyle](https://github.com/telstra/open-kilda/tree/master/services/src/checkstyle) repo.

Go into Settings -> Editor -> Code Style. Click on Import Scheme and choose the downloaded style file.

Select OpenKildaStyle as actual coding style.

repository: gauravchug/open-kilda

branch_name: refs/heads/develop

gha_language: Java

repo_name: gauravchug/open-kilda


text:
## ibm

highlights
1. federation : general knowledge vs domain knowledge
2. lineage maintained
3. polymorphic store

The Discovery use case creates new knowledge that is not directly present in domain documents or data sources.
This new knowledge can be surprising and anomalous. While search and exploration tools access knowledge
that is already available in the sources available to the system, they are necessary but not sufficient
for Discovery.

Nonobvious discovery includes new links between entities (for example, a new side effect of a drug,
an emerging company as an acquisition target or sales lead), a potential new important entity in the
domain (for example, a new material for display technologies, a new investor for a particular investment area),
or changing significance of an existing entity (an increasing stake by an investor in an organization, or
increasing interaction between a person of interest and some criminal in an intelligence-gathering scenario).

Polymorphic stores offer a solution. The IBM Watson Knowledge Graph uses a polymorphic store, supporting
multiple indices, database structures, in-memory, and graph stores. This architecture splits the actual data
(often redundantly) into one or more of these stores, allowing each store to address specific requirements and workloads.

Evidence must be primitive to the system. The main link between the real world (which developers often try
to model) and the data structures holding the extracted knowledge is the "evidence" of the knowledge.
This evidence is often the raw documents, databases, dictionaries, or image, text, and video files from
which the knowledge is derived. When it comes to making pointed and useful contextual queries during
a discovery process, the metadata and other associated information often play a role in inference of the knowledge.
Thus, it is critical not to lose the linkage between the relationships stored in the graph and where those relationships come from.

Federation of global, domain-specific, and customer-specific knowledge. In a case like IBM clients, who build
their own custom knowledge graphs, the clients are not expected to tell the graph about basic knowledge.
For example, a cancer researcher is not going to teach the knowledge graph that skin is a form of tissue,
or that St. Jude is a hospital in Memphis, Tennessee.
This is known as "general knowledge," captured in a general knowledge graph.

The next level of information is knowledge that is well known to anybody in the domain for example, carcinoma
is a form of cancer or NHL more often stands for non-Hodgkin lymphoma than National Hockey League
(though in some contexts it may still mean thatsay, in the patient record of an NHL player). The client
should need to input only the private and confidential knowledge or any knowledge that the system does not
yet know. Isolation, federation, and online updates of the base and domain layers are some of the major
issues that surface because of this requirement.

https://cacm.acm.org/magazines/2019/8/238342-industry-scale-knowledge-graphs/fulltext

repository: sanjosh/csdocs

repo_name: sanjosh/csdocs


text:
### How to proceed

1.  Prepare a coffee
1.  Run: `npm i` to install the dependencies
1.  Run: `npm run dev` to build and watch
1.  Start coding!

### Notes:
* To add a new page to the site, you must add the mapping to the `gulpfile.js` inside the `handlebars` gulp task, modify the `files` variable and add the mapping to URL.

The following is an example to adding a `contact-us` page:
```
var files = [
  ['source/index.html', 'public/index.html'],
  ['source/contact-us.html', 'public/contact-us/index.html']
];
```

### Deploy

1.  Run: `npm run deploy` to build

You only need to deploy the server code and the public folder.

### [Changelog](CHANGELOG.md)


text:
# Com.Aspose.Omr.Model.OmrResponseContent
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TemplateId** | **string** | GUID string that is used to identify template on server This value is assigned after Template Correction and used later in Template Finalization and Image Recognition | [optional]
**ExecutionTime** | **double?** | Indicates how long it took to perform task on server. |
**ResponseFiles** | [**List<FileInfo>**](FileInfo.md) | This structure holds array of files returned in response Type and content of files differes depending on action | [optional]
**Info** | [**OmrResponseInfo**](OmrResponseInfo.md) |  | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

gha_language: C#


text:
---
title: 'Well-Known Problems With Neural Machine Translation'
date: 2018-09-05
permalink: /posts/2018/nmt-problems
tags:
  - NMT
---

In addition to the *six challenges* listed in [1], here're the other well-known problems with Neural Machine Translation:

### Label Bias

Label bias was originally identified in HMMs and CRFs. And in the NMT literature, it mostly denotes the problem of *local normalization*. Since the baseline model of NMT [2,3] is trained with cross-entropy loss with teacher forcing, the loss is inevitably normalized on *locally* each step. Nowadays, several global training approaches have been adopted to solve this problem, e.g. Reinforcement Learning[4] and Minimal-Risk Training[5].

### Exposure Bias

Exposure bias denotes the problem that during decoding time, the model could reaches states where it hasn't been exposed in training time. Same as label bias, it's inevitable with local training with teacher forcing, and global training methods (i.e. RL, MRT) could alleviate this problem.

### Train/Test Evaluation Inconsistency

In the baseline of NMT systems [2,3], training loss is calculated by cross-entropy, while testing measurement are always non-differentiable metric (e.g. BLEU). Again, RL could solves this problem by calculating the loss directly from rewards (e.g. BLEU) it got from references. At the same time, an trial[6] to bring *brevity penalty* into log-likelihood is also intuitive for drawing connections between traditional model score with BLEU score.

**As a conclusion, RL method and other global training methods are the keys to solve above problems, and I think they are the future of NMT.**

### References:

1. Koehn, P., & Knowles, R. (2017). Six challenges for neural machine translation. *arXiv preprint arXiv:1706.03872*.
2. Bahdanau, D., Cho, K., & Bengio, Y. (2014). Neural machine translation by jointly learning to align and translate. *arXiv preprint arXiv:1409.0473*.
3. 4.Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I. (2017). Attention is all you need. In *Advances in Neural Information Processing Systems*(pp. 5998-6008).
4. Ranzato, M. A., Chopra, S., Auli, M., & Zaremba, W. (2015). Sequence level training with recurrent neural networks. *arXiv preprint arXiv:1511.06732*.
5. Shen, S., Cheng, Y., He, Z., He, W., Wu, H., Sun, M., & Liu, Y. (2015). Minimum risk training for neural machine translation. *arXiv preprint arXiv:1512.02433*.
6. Yang, Y., Huang, L., & Ma, M. (2018). Breaking the Beam Search Curse: A Study of (Re-) Scoring Methods and Stopping Criteria for Neural Machine Translation. arXiv preprint arXiv:1808.09582.


text:
# Meal Tracker ![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)
> **By Farnoosh Johnson**

#### _Epicodus JavaScript class, June 2016_

###### _[Angular JS](https://www.learnhowtoprogram.com/javascript/angular-js/angular-2-basics-independent-project)_

###### **Meal Tracker, code review number 2**

## __Description__

###### This is an application to receive three inputs from user and displaying then in a view. This app let user to edit the information listed by using two-way-data-binding. Moreover, user has the option to select view all foods, healthy food that has less than 500 calories or unhealthy foods that contains 500 and more calories. The color for healthy food is green and color for unhealthy food is red, also there is an image attached to each food category based on healthiness. Information shown by this app are;
1. food name
2. food calories
3. food details
4. total calories
5. show all foods
6. show only healthy foods (below 500 calories)
7. show only unhealthy foods (500 calories and above)

<img id="screen-1" src="https://s26.postimg.org/l930kpnzt/Screen_Shot_2016_07_27_at_6_14_53_PM.png" title="main screen" />

## Known Bugs

Total calories are show only for the data listed on the page, once the user edit a calories input, the total functionality calories wont word correctly.

> You may use this application as an example to show the proficiency of a level 2 student in Epicodus.

## Setup

This website build tools:
* Compiling JavaScript using typescript.
* Managed frontend dependencies with Bower.
* Manage all other dependencies with npm.
* Asset pipeline with a live reloading development server in gulp.

and also include gulp tasks for:
* Concatenation, minification, and running the browserify package on JavaScript.
* Building and cleaning.
* Running the development server with live reloading.
* Automatically including Bower dependencies as vendor.min.js and vendor.css.

###### Thanks

**Accessing to the remote repository on account :** [farnoosh63](https://github.com/Farnoosh63/Meal-Tracker.git)

**Accessing to github pages for this application :**
> there is no github page created for this app

![image](https://developer.chrome.com/static/images/sample-default-icon.png)
```
clone repo
npm install
bower install
install globals if needed (gulp, bower, sass, typescript, typescript packages.)
  $ npm install gulp -g
  $ npm install bower -g
  $ gem install sass
  $ npm install typescript -g
  $ apm install atom-typescript
run $gulp build
$gulp serve
enjoy!
```

Legal
------

_*Copyright (c) 2016 Farnoosh Johnson- Student in Epicodus*_

###### This software is licensed under the MIT license.

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

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

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


text:
# ttyusb-enabler
Make ttyUSB accessible for your current account
[中文説明](https://ralf.ren/2751)

## Screenshot
![](https://raw.githubusercontent.com/Catboy96/ttyusb-enabler/master/screenshot.png)

## Introduction
When you are working on an embedded linux or FPGA project using Vivado, you must change ttyUSB permission to `666` to make it accessible for non-root account.
Files included in this repository make a easy way for you to do the thing by clicking a icon.

## Usage
1. Put `ttyusb-enabler` in `~/.local/bin`
2. Change `[USERNAME]` to your username in `ttyusb-enabler.desktop`
3. Give these two files execution permission by:
`chmod +x ~/.local/bin/ttyusb-enabler && chmod +x ttyusb-enabler.desktop`

Double-click `ttyusb-enabler.desktop` whenever you want.
Also you can move `ttyusb-enabler.desktop` wherever you want.