text:
# Contributing
Want to hack on XDAG? Awesome! Here are instructions to get you started.
They are not perfect yet. Please let us know what feels wrong or incomplete.

XDAG is an Open Source project and we welcome contributions of all sorts.
There are many ways to help, from reporting issues, contributing code, and
helping us improve our community.

## Topics

- [Security Issues](#security-issues)
- [Community Guidelines](#community-guidelines)
- [Reporting Issues](#reporting-issues)
- [Implementation Design](#implementation-design)
- [Community Improvement](#community-improvement)
- [Translations](#translations)
- [Contribution Guidelines](#contribution-guidelines)
- [Helping in other ways](#helping-in-other-ways)

## Security Issues

The xdag protocol and its implementations are still in heavy development. This means that there may be problems in our protocols, or there may be mistakes in our implementations. And many people are already running nodes on their machines. So we take security vulnerabilities very seriously. If you discover a security issue, please bring it to our attention right away!

If you find a vulnerability that may affect live deployments, please send your report privately to<EMAIL_ADDRESS>please DO NOT file a public issue.

If the issue is a protocol weakness or something not yet deployed, just discuss it openly.

## Community Guidelines

We want to keep the XDAG community awesome, growing and collaborative. We need your help to keep it that way. To help with this we've come up with some general guidelines for the community as a whole:

- Be nice: Be courteous, respectful and polite to fellow community members: no regional, racial, gender, or other abuse will be tolerated. We like nice people way better than mean ones!

- Encourage diversity and participation: Make everyone in our community feel welcome, regardless of their background and the extent of their contributions, and do everything possible to encourage participation in our community.

- Keep it legal: Basically, don't get anybody in trouble. Share only content that you own, do not share private or sensitive information, and don't break laws.

- Stay on topic: Make sure that you are posting to the correct channel and avoid off-topic discussions. Remember when you update an issue or respond to an email you are potentially sending to a large number of people. Please consider this before you update. Also remember that nobody likes spam.

## Reporting Issues

If you find bugs, mistakes, inconsistencies in the XDAG project's code or
documents, please let us know by filing an issue at the appropriate issue
tracker (we use multiple repositories). No issue is too small.

The main issues for bug reporting are as follows:
- [xdag/issues](https://github.com/XDagger/xdag/issues) - Issues related to xdag.
- [DaggerGpuMiner/issues](https://github.com/XDagger/DaggerGpuMiner/issues) - Issues related to DaggerGpuMiner.
- [xDagWallet/issues](https://github.com/XDagger/xDagWallet/issues) - Issues related to xdag wallet C lib.
- [xdag-ios/issues](https://github.com/XDagger/xdag-ios/issues) - Issues related to xdag iOS wallet.
- [android-wallet/issues](https://github.com/XDagger/android-wallet/issues) - Issues related to xdag Android wallet.
- [XDagWalletforMac/issues](https://github.com/XDagger/XDagWalletforMac/issues) - Issues related to xdag Mac wallet.
- [QtXdagWallet/issues](https://github.com/XDagger/QtXdagWallet/issues) - Issues related to QtXdagWallet.
- [openxdagpool-scripts/issues](https://github.com/XDagger/openxdagpool-scripts/issues) - Issues related to scripts to open pool.
- [openxdagpool/issues](https://github.com/XDagger/openxdagpool/issues) - Issues related to xdag pool website.
- [XDagger.github.io/issues](https://github.com/XDagger/XDagger.github.io/issues) - Issues related to xdag.io website.
- [explorer/issues](https://github.com/XDagger/explorer/issues) - Issues related to block explorer.

The [xdag](https://github.com/XDagger/xdag) issues use a template that will guide you through the process of reporting a bug. We will be adding this kind of issue template to other repositories as bug reports become more common.

## Implementation Design

When considering design proposals for implementations, we are looking for:

- A description of the problem this design proposal solves
- Discussion of the tradeoffs involved
- Discussion of the proposed solution

## Community Improvement

The XDAG community requires maintenance of various "public infrastructure" resources. These include documentation, github repositories and more. There is also helping new users with questions, spreading the word about XDAG, and so on. We will be planning and running conferences. Please get in touch if you would like to help out.

## Translations

This community moves very fast, and documentation swiftly gets out of date. For now, we are encouraging would-be translators to hold off from translating large repositories. If you would like to add a translation, please open an issue and ask the leads for a given repository before filing a PR, so that we do not waste efforts.

If anyone has any issues understanding the English documentation, please let us know! If you would like to do so privately, please email @Sofar. We are very sensitive to language issues, and do not want to turn anyone away from hacking because of their language.

## Contribution Guidelines
#### Discuss big changes as Issues first

Significant improvements should be documented as GitHub issues before anybody starts to code. This gives other contributors a chance to point you in the right direction, give feedback on the design, and maybe point out if related work is under way.

Please take a moment to check whether an issue already exists. If it does, it never hurts to add a quick "+1" or "I have this problem too". This helps prioritize the most common problems and requests.

### Pull Requests always welcome

We are always thrilled to receive pull requests, and do our best to process them as quickly as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it.

We're also trying very hard to keep XDAG focused. This means that we might decide against incorporating a new feature. However, there might be a way to implement that feature on top of (or below) XDAG.

If your pull request is not accepted on the first try, don't be discouraged! If there's a problem with the implementation, hopefully you received feedback on what to improve.

### Git

We use a simple git branching model:

- `master` must always work
- `develop` is the branch for development
- create feature-branches to merge into `develop`
- all commits must pass testing so that git bisect is easy to run

Just stay current with `develop` (rebase).

### Commit messages

Commit messages must start with a short subject line, followed by an optional,
more detailed explanatory text which is separated from the summary by an empty
line.

### Code

Write clean code. Universally formatted code promotes ease of writing, reading, and maintenance.

### Documentation

Update documentation when creating or modifying features. Test your documentation changes for clarity, concision, and correctness, as well as a clean documentation build.

### Pull Requests

Pull requests descriptions should be as clear as possible. Err on the side of overly specific and include a reference to all related issues. If the pull request is meant to close an issue please use the Github keyword conventions of [closes, fixes, or resolves]( https://help.github.com/articles/closing-issues-via-commit-messages/). If the pull request only completes part of an issue use the [connects keywords]( https://github.com/waffleio/waffle.io/wiki/FAQs#prs-connect-keywords). This helps our tools properly link issues to pull requests.

### Code Review

We take code quality seriously; we must make sure the code remains correct. We do code review on all changesets. Discuss any comments, then make modifications and push additional commits to your feature branch. Be sure to post a comment after pushing. The new commits will show up in the pull request automatically, but the reviewers will not be notified unless you comment.

### Merge Approval

We use `Thank you for your efforts.` in comments on the code review to indicate acceptance. A change **requires** `Thank you for your efforts.` from the maintainers of each component affected. If you know whom it may be, ping them.

## Helping in other ways

To be continue.


text:
@property {Object} can-query-logic.UNKNOWABLE UNKNOWABLE
@parent can-query-logic.static-types

Represents a non-answer.

@type {Object} Use `QueryLogic.UNKNOWABLE` to signal that __no__ answer to the problem
can be figured out.

Consider the following difference:

```js
queryLogic.difference({
    filter: {age: 35},
    sort: "name"
},{
    filter: {name: "Justin"},
    sort: "age"
}) //-> {filter: {age: 35, name: {$not: "Justin"}}, sort: "name"}
```

There might be records in the first set that are not in the second set. So there is a result.

Now consider a similar example, but with pagination added:

```js
queryLogic.difference({
    filter: {age: 35},
    sort: "name",
    page: {start: 0, end: 10}
},{
    filter: {name: "Justin"},
    sort: "age",
    page: {start: 0, end: 12}
}) //-> QueryLogic.UNKNOWABLE
```

Because we added pagination,
the answer should paginated data in the result. This means we would have to know
what the actual data set looked like to make a determination if the value
was `EMPTY` or `UNDEFINABLE`. Because we don't have the actual data set, we return `UNKNOWABLE`.

Think of:

- `UNDEFINABLE` as representing a set between `EMPTY` and `UNIVERSAL`
- `UNKNOWABLE` as a set that could be `EMPTY`, `UNIVERSAL` or anywhere between.

license: MIT

repository: jeroencornelissen/steal-test

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: jeroencornelissen/steal-test


text:
#Example Flask

This example is based upon a gist from Nadako (Dan Korostelev)

_The code used in this example can be found [here](https://github.com/MatthijsKamstra/haxepython/tree/master/08flask/code)._

## How to start

Create a folder named **foobar** (please use a better name; any name will do) and create folders **bin** and **src**.
See example below:

```
+ foobar
	+ bin
	+ src
		- Main.hx
	- build.hxml
```

## The Main.hx

Open your favorite editor, copy/paste the code and save it in the `src` folder.

```
import haxe.Constraints.Function;

@:pythonImport("flask", "Flask")
extern class Flask {
    function new(module:String);
    function run():Void;
    function route<T:Function>(path:String):T->T;
}

class Main {
    static function main() {
    	trace('Close server with CTRL + C');

        var app = new Flask(untyped __name__);
        app.route("/")(index);
        app.run();
    }

    static function index() {
        return "Hello, world!";
    }
}

```

## The Haxe build file, build.hxml

There are a lot of different arguments that you are able to pass to the Haxe compiler.
These arguments can also be placed into a text file of one per line with the extension hxml. This file can then be passed directly to the Haxe compiler as a build script.

```
# // build.hxml
-cp src
-main Main
-python bin/example.py
-dce full
-cmd cd bin
-cmd python3 example.py
```

## Build Python with Haxe

To finish and see what we have, build the file and see the result

1. Open your terminal
2. `cd ` to the correct folder where you have saved the `build.hxml`
3. type `haxe build.hxml`
4. press enter

repository: MatthijsKamstra/haxepython

repo_name: MatthijsKamstra/haxepython


text:
# Spherical Harmonics Representation of Environment Lighting
Compute the Spherical Harmonics(SH) coefficients and representation of given
environment map.
For details of SH, please refer to:
* [Spherical Harmonics](https://en.wikipedia.org/wiki/Spherical_harmonics)
* [Spherical Harmonics Lighting](https://en.wikipedia.org/wiki/Spherical_harmonic_lighting)

### Demo
**Original environment map:**

---
**Degree 4:**

---
**Degree 11:**

---
**Degree 21:**

---
**Degree 51:**

---


text:
# maptalks.geo2img

A tool to get base64 data src for html-tag< img > by geometry.

## Examples

### [DEMO](https://cxiaof.github.io/maptalks.geo2img/demo/index.html)

## Install

-   Install with npm: `npm install maptalks.geo2img`.
-   Install with yarn: `yarn add maptalks.geo2img`.
-   Download from [dist directory](https://github.com/cXiaof/maptalks.geo2img/tree/master/dist).
-   Use unpkg CDN: `https://cdn.jsdelivr.net/npm/maptalks.geo2img/dist/maptalks.geo2img.min.js`

## Usage

As a plugin, `maptalks.geo2img` must be loaded after `maptalks.js` in browsers. You can also use `'import { Geo2img } from "maptalks.geo2img"` when developing with webpack.

```html
<!-- ... -->
<script src="https://cdn.jsdelivr.net/npm/maptalks.geo2img/dist/maptalks.geo2img.min.js"></script>
<!-- ... -->
```

```javascript
const geo2img = new maptalks.Geo2img()
const base64src = geo2img.convert(geometry)
// <img src=base64src >
```

## API Reference

```javascript
new maptalks.Geo2img(options)
```

-   options
    -   useGeoExtent **boolean** set true to use geometry extent and false to use map extent, default be true.

`convert(geometry, map)` The result is base64 data for img src="%s", geometry should be add to layer, the second attr is unessential.
`setMap(map)` if you geometry has not add to layer, you need set map for plugin(or push map to the second attr of **convert** ).
`remove()`

## BUG Already

-   svg-path often exceed boundary of SVG-tag

## Contributing

We welcome any kind of contributions including issue reportings, pull requests, documentation corrections, feature requests and any other helps.

## Develop

The only source file is `index.js`.

It is written in ES6, transpiled by [babel](https://babeljs.io/) and tested with [mocha](https://mochajs.org) and [expect.js](https://github.com/Automattic/expect.js).

### Scripts

-   Install dependencies

```shell
$ npm install
```

-   Watch source changes and generate runnable bundle repeatedly

```shell
$ gulp watch
```

-   Package and generate minified bundles to dist directory

```shell
$ gulp minify
```

-   Lint

```shell
$ npm run lint
```

## More Things

-   [maptalks.autoadsorb](https://github.com/cXiaof/maptalks.autoadsorb/issues)
-   [maptalks.multisuite](https://github.com/cXiaof/maptalks.multisuite/issues)
-   [maptalks.geosplit](https://github.com/cXiaof/maptalks.geosplit/issues)
-   [maptalks.polygonbool](https://github.com/cXiaof/maptalks.polygonbool/issues)
-   [maptalks.geo2img](https://github.com/cXiaof/maptalks.geo2img/issues)
-   [maptalks.control.compass](https://github.com/cXiaof/maptalks.control.compass/issues)
-   [maptalks.autogradual](https://github.com/cXiaof/maptalks.autogradual/issues)

gha_language: JavaScript

gha_license_id: MIT


text:
###Dependencies

[Truffle framework](https://truffleframework.com/)

[Ganache local blockchain](https://github.com/trufflesuite/ganache-cli)

###Installation
- `cd PROJECT_DIR`
- `npm install knex -g`
- `npm install`
- `cd client`
- `npm install`

### Commands

#### DB deploy
##### To create DB
- `knex migrate:latest`
- `knex migrate:latest --env rinkeby`
- `knex migrate:latest --env live`

##### To remove DB
- `knex migrate:rollback`
- `knex migrate:rollback --env rinkeby`
- `knex migrate:rollback --env live`

#### Blockchain deploy
- `truffle migrate --network development`
- `truffle migrate --network rinkeby`
- `truffle migrate --network live`

#### Start server
- `node server.js`
- `node server.js rinkeby`
- `node server.js live`

### How to deploy to live:
- create a new account in MetaMask
- import mnemonics from MetaMask
- Add mnemonics to `.env` key `MNEMONIC_MAINNET`
- Set first mnemonic address to `FROM_ADDRESS_MAINNET` in `.env`
- Transfer some ether to first mnemonic account
- execute `truffle migrate --network live`
- deploy the code to a production server
- create a new database and configure db MAINNET section in `.env`
- execute `knex migrate:latest --env live` from `PROJECT_DIR/client/backend`
- start server `node server.js live`


text:
react-materialize
=================

[![Join the chat at https://gitter.im/react-materialize/react-materialize](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-materialize/react-materialize?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Material design components for react, powered by [materializecss](http://materializecss.com/)

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

Get started
===========

You'll have to load `materialize.css` and `materialize.js` globally in the page.

CommonJS
--------

```
$ npm install react-materialize

var Button = require('react-materialize').Button;

// with ES6 modules
import {Button, Card, Row, Col} from 'react-materialize';

```

Docs && Examples
---------

See [documentation](https://react-materialize.github.io) for live examples.

How does it compare to X.Y.Z?
=============================

The main goal of this project is to provide react component for
[materializecss](https://materializecss.com), at the current stage, I am
trying to implement all possible widgets that are supported by materializecss.
Please create an issue on github if you find you desired component is not
available.

There are other material design components for react.js, e.g. [material-ui](http://material-ui.com/),
which is more mature and popular than this one.
The main advantage of this project over e.g. material-ui is that it provides a
grid system similar to react-bootstrap.

Contributions
===========

> Yes, please!

repository: nbdavies/mic-drop

gha_language: Ruby

repo_name: nbdavies/mic-drop


text:
# QtRWExcelFile
Reads an excel file from the desired location and either writes information to its cells or opens it for reading or manual editing.

This project was last compiled using Qt Creator 5.9.1

repository: Predhelt/QtRWExcelFile

repo_name: Predhelt/QtRWExcelFile


text:
Android Resource Tool (art):
  Finds android resource references, and manipulates them.

Example usage:
```
# Build indices (speed up subsequent commands, required).
art -j java -r res index

# Counts defined, used, and unused string resources:
art -j java -r res counts

# Lists unused string resources
art -j java -r res ls-unused

# Lists unused string resources with definition locations
art -j java -r res ls-unused -s

# Deletes all references to unused string resources with the prefix foo_
art -j java -r res rm-unused -p foo_
```

repository: brianduff/xdel

repo_name: brianduff/xdel


text:
# UnitTestSCAD
Unit Testing for OpenSCAD

![UnitTestSCAD](../master/docs/banner.png)

UnitTestSCAD brings forth unit testing capabilities to OpenSCAD. Unit testing enables you to check for regressions, accuracy and robustness of code in a fast, repeatable manner. Speed of development increases as unit tests will worry about your regressions, and allow you to plow ahead with your vision.

# Contents
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Change Log](#change-log)
- [API Reference](#api-reference)
- [Uninstalling](#uninstalling)
- [Contribuing](#contributing)
- [License](#license)

# Getting Started
## Installing OpenSCAD
UnitTestSCAD has a very strong dependency on OpenSCAD. This is because UnitTestSCAD uses some of the features from OpenSCAD to perform some of its underlying testing.

Simply start by installing OpenSCAD if you have not done so already:

[OpenSCAD Home](http://www.openscad.org/)

## Adding OpenSCAD to PATH
In order for UnitTestSCAD to take advantage of OpenSCAD's features, the folder which contains the OpenSCAD files must be added to the PATH environment variable on your machine.

While the path will generally be the same on all platforms (Windows, Linux, Mac), the file they point to specifically is different. If you have moved the respective file manually, you will need to point at:
- Windows: `openscad.com`
- Linux: `openscad.exe`
- Mac: `openscad.exe`

These files will be in the location where you installed OpenSCAD. For example, by default on Windows: `C:/Program Files/OpenSCAD`.

Note: **The path to the folder containing the files is to be added to the PATH environment variable.**

## Installing NodeJS and NPM
UnitTestSCAD is powered by NodeJS and distributed by NPM. They are distributed together and complement each other well.
Follow the installation from the NodeJS website if you do not have these installed:

[NodeJS Home](https://nodejs.org/en/)

## Installing UnitTestSCAD
If all has gone well, then installing UnitTestSCAD will be a simple command to run in the command line/terminal.

To install UnitTestSCAD, run the command:

`npm install -g unittestscad`

Test the installation has succeeded by executing a following command:

`unittestscad`

You should see the output:

```
usage: unittestscad <file>
The supplied path to the configuration file does not point to a valid configuration file.
```

Congratulations! UnitTestSCAD has successfully been installed.

# Usage
## Configuration File
To use UnitTestSCAD, you will first need a configuration file which will specify which files to run. The configuration file should be in the JSON format, and contain the following properties:

- `openScadDirectory`: This should be a string which points to the directory containing your OpenSCAD files. This can be a relative path (from the configuration file), or an absolute path.
- `testFiles`: This should be an array of strings, which points to JavaScript specification files. These are the files which run your tests. These can be relative paths (from the configuration file), or an absolute path.
- `customReporters`: This should be an array of strings, which points to JavaScript custom reporter files. These are the files which run your tests. These can be relative paths (from the configuration file), or an absolute path. More information can be found at [Reporters](#reporters).
- `reporters`: This should be an array of objects, which specifies which reporters to use, along with additional options. These specify the output of the results of the test run. These can be relative paths (from the configuration file), or an absolute path. If omitted, this defaults to use the `console` reporter only. More information can be found at [Reporters](#reporters).

Some example configuration files are provided.

```javascript
// Relative paths
{
  "openScadDirectory": "../../JointSCAD/dist",
  "testFiles": [
    "./jointScadSpec.js",
    "./shoulderSpec.js",
    "./dowelJointSpec.js"
  ],
  "customReporters": [
    "./CustomisedOutput.js",
    "./NyanCat.js"
  ],
  "reporters": [
    {"name": "console", "options": {}},
    {"name": "json", "options": {"dest": "./JsonOutput.json"}},
    {"name": "CustomisedOutput", "options": {}},
    {"name": "NyanCat", "options": {"anyGenericData": true}}
  ]
}
```

```javascript
// Absolute paths
{
  "openScadDirectory": "E:/Developer/JointSCAD/dist",
  "testFiles": [
    "E:/Developer/JointSCAD/spec/jointScadSpec.js",
    "E:/Developer/JointSCAD/spec/shoulderSpec.js",
    "E:/Developer/JointSCAD/spec/dowelJointSpec.js"
  ],
  "customReporters": [
    "E:/Developer/JointSCAD/spec/CustomisedOutput.js",
    "E:/Developer/JointSCAD/spec/NyanCat.js"
  ],
  "reporters": [
    {"name": "console", "options": {}},
    {"name": "json", "options": {"dest": "E:/Developer/JointSCAD/spec/JsonOutput.json"}},
    {"name": "CustomisedOutput", "options": {}},
    {"name": "NyanCat", "options": {"anyGenericData": true}}
  ]
}
```

## Specification Files
Specification detail what assertions and tests to run. Let's look at the example below, before deconstructing it.

```javascript
testSuite("JointSCAD", {
  "use": [],
  "include": ["JointSCAD.scad"]
}, function() {
  it("should plot a shoulder's corners correctly", function() {
    assert.openScadFunction("getShoulderCorners([5, 5, 5])").outputToBe("[[0, 0, 0], [5, 0, 0], [5, 0, 5], [0, 5, 0], [5, 5, 0], [5, 5, 5]]");
    assert.openScadFunction("getShoulderCorners([3, 3, 3])").outputToBe("[[0, 0, 0], [3, 0, 0], [3, 0, 3], [0, 3, 0], [3, 3, 0], [3, 3, 3]]");
  });

  it("should model a shoulder correctly", function() {
    assert.openScadModule("shoulder([3, 3, 3])")
    .toHaveVertexCountOf(6)
    .and.toHaveTriangleCountOf(8)
    .and.toBeWithinBoundingBox([[0, 0, 0], [3, 3, 3]]);
  });
});
```

A specification begins with the declaration of a `testSuite`, which takes three parameters. A name, some options, and a callback function.

A test suite is used to describe a set of tests, thus a meaningful name is recommended.

The options contains a `use` and an `include`. Both of these are arrays of strings, which specify which OpenSCAD files should be imported as `use` and `include` respectively. See [OpenSCAD User Manual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Include_Statement) for more details.

Within the callback function, we can declare as many tests as we like using the `it` function. This function takes a string which describes the test to be done, and a callback function which executes the test itself.

Inside the test, we can test the outcome of an OpenSCAD function or module using `assert.openScadFunction` or `assert.openScadModule`. Both of these functions take a string which should be the OpenSCAD function or module respectively. They can then be chained with another function to test and assert the result with an expected outcome.

While specific details can be found in the [API Reference](#api-reference).

## Reporters
Reporters can be customised and specified by two properties in the configuration file: `customReporters`, and `reporters`.

### Custom Reporters
The `customReporters` field is used to include custom reporters into UnitTestSCAD. Within these files, there are several key points of note in order to correctly create a reporter.

First, the reporter must be registered by using `global.ReporterRegistry.add(name, reportingCallback)`. This function takes two parameters: a name for the reporter, which will be needed to refer to later, and a function which executes the reporting itself.

The reporting function itself takes two parameters: the summary of test results, and additional options passed from the configuration file. The options are passed exactly as they are specified in configuration file. The following is an example of the summary format:

```javascript
{
  "assertions": 3,
  "failures": 0,
  "testSuites": [
    {
      "name": "Shoulder",
      "assertions": 3,
      "failures": 0,
      "tests": [
        {
          "name": "should have 6 corners",
          "assertions": 2,
          "failures": []
        },
        {
          "name": "should print the corners of the shoulder",
          "assertions": 1,
          "failures": []
        }
      ]
    }
  ]
}
```

Finally, as follows, is an example of a custom reporter's definition.

```javascript
global.ReporterRegistry.add('json', function(summary, options) {
  fs.writeFileSync(options.dest, JSON.stringify(results, null, '  '));
  console.log('Results written to ' + options.dest);
});
```
### Reporters
UnitTestSCAD comes with two reporters by default: `console`, and `json`.

`console` is a very simple reporter; It takes no options and simply prints the output to the console.
`json` takes a `dest` option; This option should specify where to write the contents of the summary to on the file system.

# Change Log
See the [Change Log](../master/CHANGELOG.md) document for more information on changes.

# API Reference
## General
### `testSuite(name, options, callback)`

| Parameter | Data Type | Description |
|---|---|---|
| name | String | The name of the test suite. Used to report failures. A descriptive name which describes the collection of tests is recommended. |
| options | Object | Specifies which files to `use` and `include` for each test in the given test suite. |
| callback | Function | A function which is used to specify the execution of the test suite. |

### `it(name, callback)`

| Parameter | Data Type | Description |
|---|---|---|
| name | String | The name of the test. Used ot report failures. A descriptive name which describes the test is recommended. |
| callback | Function |  A function which is used to specify the execution of the test. |

## OpenSCAD Function Assertions
### `assert.openScadFunction(openScadFunction)`

**Returns:**

```javascript
{
  'outputToBe': function(expectedOutput) {...}
}
```

Begins an assertion or multiple assertions on an OpenSCAD function.

| Parameter | Data Type | Description |
|---|---|---|
| openScadFunction | String | The OpenSCAD function to be run (excluding the line-ending semi-colon). e.g. `getShoulderCorners([3, 3, 3])` |

### `not()`

**Returns**
```javascript
{
  'not': function() {...},
  'outputToBe': function(expectedOutput) {...}
}
```

Inverts the expectation of the following assertion. This is used in a chain of commands such as `not().outputToBe()`.

### `outputToBe(expectedOutput)`

**Returns:**
```javascript
{
  'and': {
    'not': function() {...},
    'outputToBe': function(expectedOutput) {...}
  }
}
```

Performs an equality check on the returned value of an OpenSCAD function.

| Parameter | Data Type | Description |
|---|---|---|
| expectedOutput | String | The expected output of the previously specified OpenSCAD function as a string. |

## OpenSCAD Module Assertions
### `assert.openScadModule(openScadModule)`

**Returns:**

```javascript
{
  'not': function(),
  'stlFileToBe': function(expectedFile) {...},
  'toHaveTriangleCountOf': function(expectedTriangles) {...},
  'toHaveVertexCountOf': function(expectedVertices) {...},
  'toBeWithinBoundingBox': function(bounds) {...}
}
```

Begins an assertion or multiple assertions on an OpenSCAD module.

| Parameter | Data Type | Description |
|---|---|---|
| openScadModule | String | The OpenSCAD module to be run (excluding the line-ending semi-colon). e.g. `shoulder([3, 3, 3])` |

### `not()`

**Returns:**

```javascript
{
  'not': function(),
  'stlFileToBe': function(expectedFile) {...},
  'toHaveTriangleCountOf': function(expectedTriangles) {...},
  'toHaveVertexCountOf': function(expectedVertices) {...},
  'toBeWithinBoundingBox': function(bounds) {...}
}
```
Inverts the expectation of the following assertion. This is used in a chain of commands such as `not().stlFileToBe()`.

### `stlFileToBe(expectedFilePath)`

**Returns:**

```javascript
{
  'and': {
    'not': function(),
    'stlFileToBe': function(expectedFile) {...},
    'toHaveTriangleCountOf': function(expectedTriangles) {...},
    'toHaveVertexCountOf': function(expectedVertices) {...},
    'toBeWithinBoundingBox': function(bounds) {...}
  }
}
```

Compares the generated STL file of the OpenSCAD file, with a pre-existing known file.

| Parameter | Data Type | Description |
|---|---|---|
| expectedFilePath | String | Path to an STL file. The OpenSCAD module will be converted to an STL, and the compared to the given file for equality. |

### `toHaveVertexCountOf(expectedVertices)`

**Returns:**

```javascript
{
  'and': {
    'not': function(),
    'stlFileToBe': function(expectedFile) {...},
    'toHaveTriangleCountOf': function(expectedTriangles) {...},
    'toHaveVertexCountOf': function(expectedVertices) {...},
    'toBeWithinBoundingBox': function(bounds) {...}
  }
}
```

Compares the number of vertices produced by the module, against an expected value.

| Parameter | Data Type | Description |
|---|---|---|
| expectedVertices | Integer | The expected number of vertices, to be compared against the model created by the given OpenSCAD module. |

### `toHaveTriangleCountOf(expectedTriangle)`

**Returns:**

```javascript
{
  'and': {
    'not': function(),
    'stlFileToBe': function(expectedFile) {...},
    'toHaveTriangleCountOf': function(expectedTriangles) {...},
    'toHaveVertexCountOf': function(expectedVertices) {...},
    'toBeWithinBoundingBox': function(bounds) {...}
  }
}
```

Compares the number of 'triangles' created by the OpenSCAD module, against an expected value.

| Parameter | Data Type | Description |
|---|---|---|
| expectedTriangles | Integer | The expected number of triangles, to be compared against the model created by the given OpenSCAD module. Triangles in this case refers to the number of facets used to create the surfaces of the model. |

### `toBeWithinBoundingBox(bounds)`

**Returns:**

```javascript
{
  'and': {
    'not': function(),
    'stlFileToBe': function(expectedFile) {...},
    'toHaveTriangleCountOf': function(expectedTriangles) {...},
    'toHaveVertexCountOf': function(expectedVertices) {...},
    'toBeWithinBoundingBox': function(bounds) {...}
  }
}
```

Checks that every vertex produced by the OpenSCAD module lie between two bounds in each dimension ([x, y, z]).

| Parameter | Data Type | Description |
|---|---|---|
| bounds | Array<Array<Integer>[3]>[2] | The bounds, described by an array, of two arrays of three integers. The array follows the format of `[[minX, minY, minZ], [maxX, maxY, maxZ]]`. The model will be considered within bounds if ALL vertices are within or equal to either bounds. |

# Uninstalling
To uninstall UnitTestSCAD, run the command:

`npm uninstall -g unittestscad`

Upon completion of the command, UnitTestSCAD will be uninstalled from the machine.

# Contributing
See the [Contributing](../master/CONTRIBUTING.md) document for more information on contributing.

# License
See the [License](../master/LICENSE) document for more information on licensing.

repository: gitter-badger/UnitTestSCAD

repo_name: gitter-badger/UnitTestSCAD


text:
# On Evaluation Metrics for Graph Generative Models

```
@inproceedings{ggmem_iclr22,
title = {On Evaluation Metrics for Graph Generative Models},
author = {Rylee Thompson and Boris Knyazev and Elahe Ghalebi and Jungtaek Kim and Graham W. Taylor},
booktitle = {International Conference on Learning Representations (ICLR)},
year = {2022}
}
```

links
- [openreview](https://openreview.net/forum?id=EnwCZixjSh)

gha_language: Jupyter Notebook


text:
# Azure Voting App -  Rolling deployment
This sample creates a multi-container application in an Azure Kubernetes Service (AKS) cluster. It has been forked from https://github.com/Azure-Samples/azure-voting-app-redis and used in this repo for personal education purpose.
The application interface has been built using Python / Flask. The data component is using Redis.

# nd9991-Capstone
Capstone project solution. ND9991 Cloud DevOps using AWS.  Here is the directory structure of the curreent repo:
```bash
.
├── LICENSE
├── README.md
├── azure-vote                  # Multi-container application
│   ├── Dockerfile              # Dockerfile that encapsulates the azure-vote app
│   ├── Makefile                # For setup, installation, and linting
│   ├── app_init.supervisord.conf
│   ├── azure-vote
│   │   ├── config_file.cfg
│   │   ├── main.py
│   │   ├── static
│   │   │   └── default.css
│   │   └── templates
│   │       └── index.html
│   └── requirements.txt        # package dependencies
├── docker-compose.yaml         # To test the app locally
└── voting-app.yaml             # To deploy the app on k8s cluster
```

## Step 0. Prerequisites
1. AWS CLI should be configured locally.
2. An AWS EKS cluster should be in place. I have already create a cluster using EKSCTL utility, which internally uses Cloudformation. Alternatively, it can be created using AWS web console.
```bash
# Install EKSCTL on Mac
# Check Homebrew
brew --version
# If you do not have Homebrew installed - https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install eksctl
brew tap weaveworks/tap
brew install weaveworks/tap/eksctl
# Assming eksctl is installed in the local
eksctl create cluster --name my-eks-demo --region=us-east-2
```
3. kubectl should also be installed locally. See the instructions [here](https://kubernetes.io/docs/tasks/tools/).
4. Create two repos in Docker hub - `voting-app-backend` and `voting-app-frontend`.

## Step 1. Test the application locally [Optional]
```bash
# Run from the project directory
docker-compose up -d
```
The command above will fetch the public images:
- mcr.microsoft.com/oss/bitnami/redis
- mcr.microsoft.com/azuredocs/azure-vote-front

and create the following containers correspondingly:
- `azure-vote-back` - It is a Redis backend.
- `azure-vote-front` - It is a Flask frontend.

Later, I have retagged the local images to match my Dockerhub repo name.
```bash
# Tag the backend image
docker tag mcr.microsoft.com/oss/bitnami/redis:6.0.8 sudkul/voting-app-backend:latest
# Tag the frontend image
docker tag mcr.microsoft.com/azuredocs/azure-vote-front:v1 sudkul/voting-app-frontend:latest
# Check the new tags
docker image ls
# Login and push the images to the Docker hub
docker login --username=sudkul<EMAIL_ADDRESS>docker push sudkul/voting-app-backend:latest
docker push sudkul/voting-app-frontend:latest
```

Once the containers are up and running, the application can be accessed at http://localhost:8080 locally.  To stop the running containers, run:
```bash
docker-compose down
```

## Step 2. CircleCI Pipeline
There are three prime jobs in the CircleCI config file:
1. **build-application** - This job installs the required dependeencies, and lints the application. It basically runs:
```bash
cd azure-vote
# Check the azure-vote/Makefile
# Installs dependencies mentioned in the requirements.txt
make install
# Lints the Dockerfile and the main Python file
make lint
```

2. **push-images** - Once the *build-application* job succeeds, the CircleCI will rebuild the Docker image (backend only) and push to the Dockerhub using the following code:
```bash
cd azure-vote
docker build . -t sudkul/voting-app-frontend:latest
docker image ls
echo "$DOCKER_PASS" | docker login --username $DOCKER_USER --password-stdin
docker push sudkul/voting-app-frontend:latest
```

3. **deploy-application** - Once the *push-images* job succeeds, this job will install kubectl, aws cli, install IAM authnticator for kubernetes, update kubectl configuration file to use the IAM authnticator for kubernetes, and finally deploy the application using the `voting-app.yaml` file using these commands:
```bash
kubectl get services
ls -l
kubectl apply -f voting-app.yaml
kubectl get pods,svc,deployments
```

branch_name: refs/heads/main


text:
## About

```
Attributes:
	access 		-- "public" or "private"
	address 	-- the IP address (string)
	ptr_record 	-- the reverse DNS name (string)
	server 		-- the UUID of the server this IP is attached to (string)
```

The only updateable attribute is the `ptr_record`.
`ptr_record` and `server` are present only if /server/uuid endpoint was used.

## List / Get

CloudManager returns IP-address objects.

```python

manager.get_IPs()
manager.get_IP("<IP_ADDRESS>")

```

## Create

The new IP-address must be attached to a server and has a random address.

```python

# param: server uuid or a Server object
manager.attach_IP(server_uuid)
manager.attach_IP(Server)

# or use Server instance
server = manager.get_server(uuid)
server.add_IP()

```

## Update

At the moment only the ptr_record (reverse DNS) of an IP can be changed.

```python

ip = manager.get_IP("<IP_ADDRESS>")
ip.ptr_record = "the.new.ptr.record"
ip.save()

```

## Destroy

```python

ip = manager.get_IP("<IP_ADDRESS>")
ip.destroy()

```

repository: derega/upcloud-python-api

gha_language: Python

repo_name: derega/upcloud-python-api


text:
# Entertainment Center

Entertainment Center builds a static webpage using information obtained from
IMDb's Top 250 and youtube. The generated website displays the movie title
and poster image. Clicking on the poster image will play a video that
represents the first result returned from a youtube search using the search
term `{movie title} official trailer`.

## Prerequisites

*   Python 2.7.14 or greater
*   The pip package management tool
*   The Google APIs Client Library for Python >= 1.6.4:
    ```
    pip install --upgrade google-api-python-client
    ```
*   The IMDbPY Library for Python >= 5.2:
    ```bash
    curl -L -O https://github.com/alberanid/imdbpy/archive/master.zip
    unzip master.zip
    cd imdbpy-master/
    python ./setup.py --without-sqlobject --without-sqlalchemy install
    ```

## Usage

```
usage: entertainment_center.py [-h] -k KEY [-M MAX_RESULTS]

optional arguments:
  -h, --help                                    show this help message and exit
  -k KEY, --key KEY                             Google API developer key
  -M MAX_RESULTS, --max-results MAX_RESULTS     Max results

```
### References

* [IMDbPY](https://imdbpy.sourceforge.io/downloads.html)
* [google/google-api-python-client](https://github.com/google/google-api-python-client)
* [Youtube API Search Sample](https://github.com/youtube/api-samples/blob/master/python/search.py)
* [Google Cloud Platform](https://console.cloud.google.com/)

## License

Entertainment Center is distributed under the MIT license.


text:
---
layout: article
title: using freedns to obtain a free subdomain
cover: /img/dns.webp
tags: website network domain dns
category: dns
---

get your login by choosing starter
<https://freedns.afraid.org/pricing/>
finish the form and verify by email

<https://freedns.afraid.org/domain/registry/>
pick a domain listed (better a public one, if you choose a private one, you will need the admin to confirm your subdomain registry)

enter your subdomain and destination IP, usually we don't need wildcard enable


text:
fields available:
firstName
lastName
fullName
title
family
image
imageUrl

run file notes:

#environment file will have all of our files and gems

#we have required all of the files needed in `environment.rb` so everything is defined by the time the program starts with CLI.new.start
#with code below we are instantiating a new instance of the CLI object and running the start method

api file notes:

#this file retrieves data from a website

game_of_thrones file notes:
#this class represents the data

cli file notes:

#the purpose of the cli file is for the user interaction and to control the flow of the program

api - #the only time we want to connect to the API is during the process of loading the data

 # def self.find_by_name(name)
    #   #iterate through my list of characters and return a specific character
    #   all.select {|character| character.name == name}

    # end

    # def character_entry_menu_options
    #     puts "Type name of character to learn more"
    #     puts "Or type " + "'exit' ".bold.red + "to exit program"
    # end

    # def character_entry_menu
    #     #if whatever the user inputs matches the find_by_name method, return that characters details
    #     # character_names = Character.find_by_name(name)
    #     # array = Character.all.to_a
    #     # new_array = array.each_slice(1).to_a
    #     # .include?
    #     #how to access name(string) in array
    #     # binding.pry
    #     input = get_input
    #     character = Character.all
    #     if input == "#{character.name}"
    #         Character.find_by_name(character)
    #         #access name index in array but as a string == character name
    #         #prints out character details
    #     else
    #         invalid_choice
    #         menu_options

    #     end

    # def character_entry_with_details
    #     input = gets.chomp
    #     character_array = []
    #     Character.all.to_a
    #     character_array.select.each do |name|

    #     end
    #     if input ==
    #         Character.find_by_name()
    #         print_out_character_details()
    #     else
    #         invalid_choice
    #     end
    # end
        #type in the name of the character
        #query the character
        #return the details of that character

        # def list_characters_with_details
    #     Character.all.each.with_index(1) do |character, index|
    #         puts "#{index}. #{character.name} - #{character.title} - #{character.family}"
    #     end
    # end

     # def select_again_or_exit_2
    #     puts "Type " + "character name ".bold.blue + "to continue"
    #     puts "Or type " + "'menu' ".bold.blue + "to return to the main menu"
    #     puts "Or type " + "'exit' ".bold.red + "to exit program"

    #     input = get_input

    #     Character.all.each.with_index(1) do |char, i|
    #         if input == char.name
    #             character = Character.all[i-1]
    #             print_out_character_details(character)
    #             find_by_name
    #         elsif input == "menu"
    #                 menu_options
    #         elsif input == "exit"
    #             puts "See you next time!".bold
    #             exit
    #         # else
    #         #     find_by_name
    #         end
    #     end
    # end


text:
## Sagas

This package makes it easy to setup [sagas](https://github.com/broadway/broadway-saga).

### Configuration

As always sagas can be configured through the `broadway.php` configuration file. We ship with support for `inmemory` and `mongodb` drivers

#### `inmemory`

*No extra configuration is required*

#### `mongodb`

If you want to use the `mongodb` driver you need to add the connection details to `database.php`.

```
<?php

'connections' => [
        'mongodb' => [
            'driver'   => 'mongodb',
            'host'     => '<IP_ADDRESS>',
            'port'     => 27017,
            'database' => 'cqrs',
            'username' => '',
            'password' => '',
            'options'  => [
                'database' => 'admin' // sets the authentication database required by mongo 3
            ]
        ],
],
```

### Adding sagas

Refer to [Broadway's example](https://github.com/broadway/broadway-saga/blob/master/examples/ReservationSaga.php) on how to write a saga. Once you've written it you can add the saga's class to the `broadway.saga.sagas` array and it will be loaded:

```
<?php

'saga' => [
    'sagas' => [
        ReservationSaga::class,
    ],
],
```

repository: jasondmoss/laravel-cqrs-es

branch_name: refs/heads/develop

repo_name: jasondmoss/laravel-cqrs-es


text:
# History

## v1.0.3 July 11, 2014
- Fixed log error
- Updated dependencies

## v1.0.2 June 27, 2014
- Added `chainy-cli` executable alias for `chainy` executable

## v1.0.1 June 23, 2014
- Fixed missing `inquirer` error
- Can now install multiple plugins and bundles at once

## v1.0.0 June 23, 2014
- Initial official release

repository: chainyjs/chainy-cli

repo_name: chainyjs/chainy-cli


text:
Getting started with Objective-Zip
==================================

Objective-Zip exposes basic functionalities to read and write zip files,
encapsulating both ZLib for the compression mechanism and MiniZip for
the zip wrapping.

Adding Objective-Zip to your project
------------------------------------

The library is distributed via CocoaPods, you can add a dependency in you pod
file with the following line:

    pod 'Objective-Zip', '~> 1.0'

You can then access Objective-Zip classes with the following import
statement if you plan to use exception handling:

```objective-c
#import "Objective-Zip.h"
```

Alternatively you can use the following import statement if you plan to use
Apple's NSError pattern:

```objective-c
#import "Objective-Zip+NSError.h"
```

More on error handling at the end of this document.

Main concepts
-------------

Objective-Zip is centered on a class called (with a lack of fantasy)
OZZipFile. It can be created with the common Objective-C procedure of an
alloc followed by an init, specifying in the latter if the zip file is
being created, appended or unzipped:

```objective-c
OZZipFile *zipFile= [[OZZipFile alloc]<EMAIL_ADDRESS>    mode:OZZipFileModeCreate];
```

Creating and appending are both write-only modalities, while unzipping
is a read-only modality. You can not request reading operations on a
write-mode zip file, nor request writing operations on a read-mode zip
file.

Adding a file to a zip file
---------------------------

The ZipFile class has a couple of methods to add new files to a zip
file, one of which keeps the file in clear and the other encrypts it
with a password. Both methods return an instance of a OZZipWriteStream
class, which will be used solely for the scope of writing the content of
the file, and then must be closed:

```objective-c
OZZipWriteStream *stream= [zipFile<EMAIL_ADDRESS>    compressionLevel:OZZipCompressionLevelBest];

[stream writeData:abcData];
[stream finishedWriting];
```

Reading a file from a zip file
------------------------------

The OZZipFile class, when used in unzip mode, must be treated like a
cursor: you position the instance on a file at a time, either by
step-forwarding or by locating the file by name. Once you are on the
correct file, you can obtain an instance of a OZZipReadStream that will
let you read the content (and then must be closed):

```objective-c
OZZipFile *unzipFile= [[OZZipFile alloc]<EMAIL_ADDRESS>    mode:OZZipFileModeUnzip];

[unzipFile goToFirstFileInZip];

OZZipReadStream *read= [unzipFile readCurrentFileInZip];
NSMutableData *data= [[NSMutableData alloc] initWithLength:256];
int bytesRead= [read readDataWithBuffer:data];

[read finishedReading];
```

Note that the NSMutableData instance that acts as the read buffer must
have been set with a length greater than 0: the readDataWithBuffer API
will use that length to know how many bytes it can fetch from the zip
file.

Listing files in a zip file
---------------------------

When the ZipFile class is used in unzip mode, it can also list the files
contained in zip by filling an NSArray with instances of FileInZipInfo
class. You can then use its name property to locate the file inside the
zip and expand it:

```objective-c
OZZipFile *unzipFile= [[OZZipFile alloc]<EMAIL_ADDRESS>    mode:ZipFileModeUnzip];

NSArray *infos= [unzipFile listFileInZipInfos];
for (OZFileInZipInfo *info in infos) {
    NSLog(@"- %@ %@ %d (%d)", info.name, info.date, info.size,
        info.level);

    // Locate the file in the zip
    [unzipFile locateFileInZip:info.name];

    // Expand the file in memory
    OZZipReadStream *read= [unzipFile readCurrentFileInZip];
    NSMutableData *data= [[NSMutableData alloc] initWithLength:256];
    int bytesRead= [read readDataWithBuffer:data];
    [read finishedReading];
}
```

Note that the OZFileInZipInfo class provide two sizes:

- **length** is the original (uncompressed) file size, while
- **size** is the compressed file size.

Closing the zip file
--------------------

Remember, when you are done, to close your OZZipFile instance to avoid
file corruption problems:

```objective-c
[zipFile close];
```

Notes
=====

File/folder hierarchy inide the zip
-----------------------------------

Please note that inside the zip files there is no representation of a
file-folder hierarchy: it is simply embedded in file names (i.e.: a file
with a name like "x/y/z/file.txt"). It is up to the program that
extracts files to consider these file names as expressing a structure and
rebuild it on the file system (and viceversa during creation). Common
zippers/unzippers simply follow this rule.

Memory management
-----------------

If you need to extract huge files that cannot be contained in memory,
you can do so using a read-then-write buffered loop like this:

```objective-c
NSFileHandle *file= [NSFileHandle fileHandleForWritingAtPath:filePath];
NSMutableData *buffer= [[NSMutableData alloc]
    initWithLength:BUFFER_SIZE];

OZZipReadStream *read= [unzipFile readCurrentFileInZip];

// Read-then-write buffered loop
do {

    // Reset buffer length
    [buffer setLength:BUFFER_SIZE];

    // Expand next chunk of bytes
    int bytesRead= [read readDataWithBuffer:buffer];
    if (bytesRead > 0) {

        // Write what we have read
        [buffer setLength:bytesRead];
        [file writeData:buffer];

    } else
        break;

} while (YES);

// Clean up
[file closeFile];
[read finishedReading];
[buffer release];
```

Error handling
--------------

Objective-Zip provides two kinds of error handling:

- standard exception handling;
- Apple's NSError pattern.

With standard exception handling, Objective-Zip will throw an exception of
class OZZipException any time an error occurs (programmer or runtime errors).

To use standard exception handling import Objective-Zip in your project with
this statement:

```objective-c
#import "Objective-Zip.h"
```

With Apple's NSError pattern, Objective-Zip will expect a NSError
pointer-to-pointer argument and will fill it with an NSError instance
whenever a runtime error occurs. Will revert to throwing an exception (of
OZZipException class) in case of programmer errors.

To use Apple's NSError pattern import Objective-Zip in your project with this
statement:

```objective-c
#import "Objective-Zip+NSError.h"
```

Apple's NSError pattern is of course mandatory with Swift programming
language, since it does not support exception handling.


text:
# picture-this
school assignment to build an Instagram clone in PHP and Javascript.

# Install
1. Clone the repo
2. Install PHP
3. Navigate to the root in the terminal and open a php server on localhost:8000 (php -S localhost:8000)
4. Open localhost:8000 in your browser.

# Testers
Andreas Lindberg

Mikaela Lundsgård

# Requirements

As a user I should be able to create an account.

As a user I should be able to login.

As a user I should be able to logout.

As a user I should be able to edit my account email, password and biography.

As a user I should be able to upload a profile avatar image.

As a user I should be able to create new posts with image and description.

As a user I should be able to edit my posts.

As a user I should be able to delete my posts.

As a user I should be able to like posts.

As a user I should be able to remove likes from posts.

# Extra

As a user I'm able to comment on a post.

As a user I'm able to reply to comments.

# Code review

1. PHP code within multiple <?php ?> tags at top of document that could be within same php tags. Line 1-7 in editpost.php for example.

2. You use rgba format colors, hex format colors and name format colors in your css files. For consistency in your files you could use one single format when using colors.

3. You sometimes leave spaces between your properties in your css-files. You can trim away the spaces for the files to look cleaner.

4. In your PHP files you seem to use mainly camelcasing and in your html you use kebab-case. This may be intentional and is more of personal preference but to keep consistent you could use the same casing for your php and html classes.

5. You could add session_destroy(); to your logout.php file so that the current session is removed when the user logs out.

6. The "send" text in the comment button cuts off in mobile. You could increase the width of the button in order for the text to fit within the button.

7. In your css you often select elements like this ".comment .show-replies-form button". To increase readability you could for example give the button a class of "show-replies-button" and use that when you select it in your css.

8. You could remove comments like "" from the final pushed version in your github repo to make the code look cleaner.

9. In update.php you push "not your post" to your session errors if the post user id is not the same as the session user id but you also have an else statement in your editpost.php that does the same thing: "<?php else : ?>
Not your post
", line 47.

10. You can rename echoErrorsAndMessages(); to something like displayErrorsAndMessages(); to make it more readable for someone not familiar with PHP and its syntax.

11. This was super difficult to review! Great job!

# Pull requests

https://github.com/OskarJoss/picture-this/pull/34

repository: OskarJoss/picture-this

gha_language: PHP

repo_name: OskarJoss/picture-this


text:
# Pyrethrum pulverulentum Lag. SPECIES

#### Status
SYNONYM

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

#### Published in
Varied. Ci. 2(4):40. 1805

#### Original name
null

### Remarks
null

repository: mdoering/backbone

path: /life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Leucanthemopsis/Leucanthemopsis pulverulenta/ Syn. Pyrethrum pulverulentum/README.md

repo_name: mdoering/backbone


text:
# NASA's SPICE Toolkits for C
> An Observation Geometry System for Space Science Missions

[**NASA's Navigation and Ancillary Information Facility**](https://naif.jpl.nasa.gov/naif/) (NAIF) offers NASA flight projects and NASA funded researchers an observation geometry information system named [**"SPICE"**](https://naif.jpl.nasa.gov/naif/) to assist scientists in planning and interpreting scientific observations from space-based instruments aboard robotic spacecraft. SPICE is also widely used in mission engineering tasks associated with these missions.

## Attribution

This repository simply collects (and compiles) official [**SPICE Toolkit C sources**](https://naif.jpl.nasa.gov/naif/toolkit_C.html) (version N0066) available to the public at [**naif.jpl.nasa.gov**](https://naif.jpl.nasa.gov) maintained by Charles Acton, Nathaniel Bachman, Boris Semenov, Edward Wright, Maria Liukis and Fraser Thompson (see corresponding [Credit and References](https://naif.jpl.nasa.gov/naif/credit.html) for more).

All the C source is wrapped up into a macOS Dynamic Library (with `bundle` extension), (also has a C# source that bridges some subset of the library functionality).

## License

> Licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).

repository: jiaozilong/SPICE

repo_name: jiaozilong/SPICE


text:
# _Doctor API_

#### _Search for doctors who specialize in your condition in your state._

#### By _**Max Larson**_

## Description

_This program takes in your medical condition and state you are in and finds doctors near you._

## Setup/Installation Requirements
* _Download or clone project files_
* _Run the following in terminal_
    * _npm install_
    * _bower install_
    * _gulp build_
    * _gulp serve_

## Known Bugs
_This program has fewer bugs than the center of a fire_

## Support and contact details

_Call Rob at 1-800-TEAM-ROB._

## Technologies Used
* _Javascript_
* _JQuery_
* _Node JS_
* _Bower_
* _Sass_
* _Browserify_
* _Gulp_
* _Others..._

### License

*This project is licensed under the MIT license*

Copyright (c) 2017 **_Max Larson_**


text:
# SwiftyIllustrator

A tool for quickly converting Adobe Illustrator shapes into SwiftUI code.

## Description

This tool utilizes the built-in scripting of Adobe Illustrator ("AI") to convert shapes drawn with AI into swift code. The included [javascript](./Illustrator/IllustratorToSwiftUIShape.js) iterates over each point of an AI shape and converts the shape into a series of CGPaths that are wrapped in a SwiftUI view for easy implementation into your XCode project.

## Installation

Just grab a copy of this repo.

## Usage Outline

1) Create a custom shape or shapes in the included [AI file](./Illustrator/ExampleIllustratorContent.ai)
2) Center the custom shape(s) on the artboard
3) Select the custom shape(s) to be converted to swift code
4) Run the included [javascript](./Illustrator/IllustratorToSwiftUIShape.js) using Illustrator's built in scripting (for more info, see [Adobe's guide](https://www.adobe.com/devnet/illustrator/scripting.html))
5) Save the script's output text as a .swift file
6) Import the .swift file into your XCode project
7) Implement the generated SwiftUI view as you please

## Detailed Usage Example

In this example, we'll be converting the SwiftyIllustrator icon (drawn using AI) into a SwiftUI view.

| Description                                                                                | Examples Images                                     |
| ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| To begin, open the included [AI file][1], which has the SwiftyIllustrator icon already drawn on the lone artboard   |  |
| Select all of the logo elements (_e.g._, using the Group Selection Tool)                                            |  |
| Navigate to AI's built in scripting dialog via File -> Scripts -> Other Script...                                   |  |
| Select the included [javascript](./Illustrator/IllustratorToSwiftUIShape.js) file and run it                        |  |
| Choose a name and destination for the script's output (_e.g._, "ShapeView.swift")                                   |  |
| If successful, you should see the provided alert                                                                    |  |
| Then, add the new .swift file to your XCode project                                                                 |  |
| Open XCode's canvas to preview the new SwiftUI view. You should see a wireframe of the SwiftyIllustrator icon       |  |
| In the new .swift file, you'll notice a single SwiftUI view comprising the 7 elements of the SwiftyIllustrator icon |  |
| Here, in the SwiftUI View, you can change the appearance of the individual shape elements (_e.g._, adding fills, strokes etc.) as you please, as well as adding animations to the individual elements, to create compelling, dynamic content in pure Swift code!                                        |  |

## Caveats
* To simplify the AI javascript, **it is assumed that your artboard and your custom shapes are centered about (x:0, y:0) in AI's coordinate space.** You can use your own AI file to run the script, but please take this into consideration. Otherwise, the shapes of your generated SwiftUI view may not be positioned as you'd expect.

## Other Info

This project was tested using:
* Illustrator 24.2
* XCode 12.2

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

## License
SwiftyIllustrator is available under the MIT license. See the [LICENSE](./LICENSE) file for more info.

[1]: ./Illustrator/ExampleIllustratorContent.ai


text:
# wishbone: Go Implementation of the ola sphincter-rfid

## Overview

This script is used in the OpenLab Augsburg as the unlock mechanism for rfid based unlocking of the sphincter-rfid.

## Install

```
go get github.com/craftamap/wishbone
```

repository: craftamap/wishbone

gha_language: Go

repo_name: craftamap/wishbone


text:
---
layout: post
title: Drowning in a Spotlight
score: Harrison Red Bull 2 - 1 NYCFC
tags:
  - Harrison Red Bull
image: 2015-05-10-harrison-red-bull.jpg
quote: |
  According to Brueghel

  when Icarus fell

  it was spring

  a farmer was ploughing

  his field

  the whole pageantry

  of the year was

  awake tingling

  near

  the edge of the sea

  concerned

  with itself

  sweating in the sun

  that melted

  the wings' wax

  unsignificantly

  off the coast

  there was

  a splash quite unnoticed

  this was

  Icarus drowning

text: 'Landscape with the Fall of Icarus
(from Pictures from Bruegel)'
text-author: William Carlos Williams
categories:
  - Williams, William Carlos
form: poetry
quotelength: long
---

Well, so obviously, we're not drowning. There is that.

Bruegel's Icarus is almost undetectable, hence the title of the poem: a landscape. He's a pair of heels kicking at the sky in the water of a---well despite Williams's "off the coast," it's more of a lagoon, actually. (Coast vs. lagoon---kind of reminds you of the criticisms of MLS, no?) Bruegel's brilliance is in relegating Icarus to an ignored, bare set of feet that will be gone in a moment. Williams's is in redirecting the "pageantry" to the "farmer...ploughing/his field" and the drama of arrogance to the "edge of the sea/concerned/with itself." At the same time, Williams does undo, a bit, the deemphasis of Icarus. He ends with his name and his drowning, almost as if he can't bear the very demythification he revels in.

The question that always gets me about this painting (not the myth itself) is whether failure is worse unnoticed, but after the inaugural derby, I found myself regreting nothing so much as the attention NYCFC has gotten in its inaugural season. I recognize that the ship only keeps sailing if that attention is maintained: no eye of (a bit of) the world, no Villa, no Lampard, no Mix; no neutrals clicking on articles to see if we collapse, nobody watches the victory lap when this turns itself around. When a slow start is almost guaranteed by the nature of the task, though, one could be forgiven for not wanting it to be on many front pages right from the beginning. More than that, it's worth asking how much of the slow start comes from the attention itself.

The two subs Sunday (which made all the difference) tell the story of the peculiar pressure the team is under. Villa's frustration was evident long before he was subbed off, and it manifests itself most when the team looks most lost. It is the frustration of one who has to carry a weight that used to be significantly more distributed, and one who might worry just a bit that the fortunes of the group in its first two seasons will be what too many people remember him for. Mix's anonymity is what happens when the inobjectivity of banter gives way to having to live up to it. The point is that an image-conscious team may be savvy, but it gives itself a tall order on the pitch. No team with as much to prove as NYCFC is ever going to prove as much as it needs to.

After several minutes of hurling jubilant abuse at the TV when Miazga disgraced himself for the second time, I calmed down and my stomach sank. Now, if anything, the stakes were higher, the very opposite of what I knew needed to happen. Before Harrison went down to ten, we could lose with dignity. After they did, no fewer than three points would do. The pressure this put us under was worse for us than a red the other way would have been, given the scrutiny we've been subject to since the start and especially for the particular match in question. There was more than one kind of pressure game going against us in the Hudson River Derby, and we failed to withstand both.

Simply put, this kind of attention is poison. Garnering the scrutiny is still a good PR strategy, and the PR strategy gets us the stadium, the players, the TV coverage. But the perils of being an expansion team, especially one built from scratch, go deeper than has been recognized, especially for a team based in the best-known city since Rome and legends on the payroll. Here there be dragons, but there are more of them than anybody said there would be and they aren't in the caves we thought they'd be in, licking their heaps of jewels or whatever, purring. They're less predictable, and they're kind of everywhere you look.

***

Here's why eight games without a win is the best thing that could happen to us if it stops here. Villa said in an interview that we've hit "rock bottom," which I regret to say is ridiculous. It could get a lot worse, and it might.[^1] But at this point, the narrative is set at "When they started out, they struggled," and the liberation that comes with the *inevitability* of that narrative (now that we've accepted it) could make this slump as short it can be. We were never going to sail into easy success---nor would anyone in our position---and now everyone knows that. What happened Sunday was mental, through and through (though maybe a little bit of formation problems on top), and it can't be ignored that the high-profile nature of our venture almost guarantees how it's been going.

With Red Bull behind us, the major tests are done, albeit failed, and the real work can start. The work of building can start now, without the short-term pressure that obscures what most matters in the long run.

Williams and Bruegel both redirect attention from the individual fall to the atmosphere, the landscape, the random-ass farmer staring at the clouds. I think the press has been doing the same thing, and I have been, too. For every stumble the team has, another article goes to press about authenticity (see last week from 90+, for example) or the club's strategy in establishing itself in the New York sports market. Rightly so. At this point, the performances are obscured by the accumulation of results, just like the results of the season will be obscured by what the team eventually becomes. In Bruegel's version, Icarus's ignominy in the moment of his splash is obscured by the myth he becomes.[^2] The self-conscious "sea/concerned/with itself//sweating in the sun" has nothing to do with Icarus himself: it's all environment. And for all its worry, the sea can't prevent his apotheosis.

[^1]: A big part of me worries that the subtext there was "It's hit rock bottom *for me*."

[^2]: That mythification apparently happens against the run of play, given the wax wings and stuff.


text:
# ETCD Source Provider

Asparagus has built-in support for high-availability and distributed execution
configuration.

ETCD is used as its backend, to ensure all cluster members share the same information.
It can be used alonside other source providers like the crontab provider, for example.

## Installation

This module is included in the core of asparagus. As such, you can just go to your
`asparagus.conf` and enable it.

```toml
[scheduler.provider-etcd]
  # Required: Enable the ETCD Provider. Without this flag all following settings would be
  # ignored.
  enabled = true

  # Optional: Define a registry url.
  # Alternatively you can enable dns discovery and skip this entry.
  registry-url = ["http://<IP_ADDRESS>:4001"]

  # Optional: Enable DNS Discovery itself
  # Guide:
  # https://coreos.com/etcd/docs/latest/v2/clustering.html#dns-discovery
  discovery-enabled = false

  # Optional: Define a discovery domain (leave the SRV record parts out)
  discovery-domain = "example.com"

  # Optional: Define a CA-Cert, used to connect to the ETCD nodes.
  connect-ca-cert = ""

  # Optional: define an alternate folder location, where your cronjobs will be
  # stored.
  source-folder = "/cron/Jobs"
```

## Job Configuration

All jobs must be stored under an unique key inside the `source-folder`, configured
inside your `asparagus.conf`.

### Configuration

```json
{
  "executor": "string",
  "schedule":"cron-expr",
  "execution_config": {

  },
  "is_running": false,
  "last_run_at": "rfc3339 date format",
  "name": "optional string"
}
```

### Example

```bash
etcdctl set /cron/Jobs/TestJob '{"executor": "http", "schedule":"* * * * *", "execution_config":{"URL": "https://httpbin.org/get", "Method": "GET"}}'
```

repository: nirnanaaa/asparagus

repo_name: nirnanaaa/asparagus


text:
---
layout: post
title: Leetcode 1657. Determine if Two Strings Are Close
permalink: /Leetcode Problems/1657/
---

Let us look more carefully at this problem:
1. Operation 1 allows us to swap any two symbols, so what matters in the end not order of them, but how many of each symbol we have. Imagine we have `(6, 3, 3, 5, 6, 6)` frequencies of symbols, than we need to have the same frequencies for the second string as well. So, we need to check if we have the same elements, but in different order (that is one is anagramm of another), how we can efficiently check it? We can sort both of them and compare, or we can use Counter again to check if these two lists have the same elements! Yes, we use here Counter of Counter and to be honest I see it first time, but it is not that diffucult.
2. Operation 2 allows us to rename our letters, but we need to use the same letters: it means, that set of letters in first and second strings should be the same.

**Complexity**: time complexity is `O(n)`: we create counters, and then again create counters. Space complexity is `O(m)`, where `m` is size of alphabet to keep our counters.

```
class Solution:
    def closeStrings(self, w1, w2):
        return set(w1) == set(w2) and Counter(Counter(w1).values()) == Counter(Counter(w2).values())
```

path: /Leetcode Problems/1657.md


text:
---
layout: post
title: Hidden cows
categories:
- japan
- misc
- photos
- tokyo-cow-parade
comments: true
---
I went looking for [cows]({{root_url}}/{{site.category_dir}}/tokyo-cow-parade/) 10 and 12, since I knew roughly what area to look in. I found cow 10 without too much trouble, it was at street level opposite cows 9 and 11, and open to the footpath, but in a corner under a recessed building entrance.

After about 15 minutes looking for cow 12 I broke down and checked the map, which showed it was in the Kokusai building. Even then it took me another 10 minutes to find it, since it was in the basement (there are about a dozen restaurants down there).

{% avpimgcenter /wp-content/uploads/2008/10/cow_10.jpg 480 384 'Cow number 10' %}

{% avpimgcenter /wp-content/uploads/2008/10/cow_10_closeup_2.jpg 480 640 'Close-up of cow number 10' %}

{% avpimgcenter /wp-content/uploads/2008/10/cow_10_closeup.jpg 480 640 'Close-up of cow number 10' %}

{% avpimgcenter /wp-content/uploads/2008/10/cow_10_closeup_3.jpg 480 360 'Close-up of cow number 10' %}

{% avpimgcenter /wp-content/uploads/2008/10/cow_12_2.jpg 480 640 'Cow number 12' %}

{% avpimgcenter /wp-content/uploads/2008/10/cow_12_closeup.jpg 480 640 'Close-up of cow number 12' %}

Today's cows: 10, 12.

Today's mini-moos: none.

Total cows to date: __64 of 65__ cows, __3 of 8__ mini-moos, __10 of 10__ cows of europe.

__Remaining Cows: 64, 66, 67, 71, 72, 73.__

extension: markdown


text:
## Tools

#### Name two dependency managers, can you name three ?

  Solution

Swift Package Manager, Cocoa Pods and Carthage.

#### What's the difference between `git` and `Github`?

  Solution

`git` is an open source versioning system. `Github` is an online versioning platform for project collaboration now owned by Mr. Softie. Other competitors to `Github` are: `BitBucket` and `GitLab`.

#### What is Continuous Integration (CI) / Continuous Deployment (CD) ?

  Solution

Continuous Integration (CI) / Continuous Deployment (CD) is the automation process of connecting your software stack along with testing to ease versioning and deploying software, in our case automatically creating TestFlight builds or App Store builds.

#### What is the terminal command for creating a local `git` repository ?

  Solution

`git init`

#### What is the terminal command for creating a Podfile in an Xcode project?

  Solution

`pod init`

#### What is the `Podfile.lock`?

  Solution

This `Podfile.lock` tracks the versions of installed `pods` in your project.

#### What is Postman?

  Solution

Postman is an API development platform, as iOS developers this is our go to for testing JSON payload data from Web APIs.

Example endpoint
`GET https://itunes.apple.com/search?media=podcast&limit=200&term=swift`

Example JSON

```json
{
	"resultCount": 171,
	"results": [{
		"wrapperType": "track",
		"kind": "podcast",
		"artistId":<PHONE_NUMBER>,
		"collectionId":<PHONE_NUMBER>,
		"trackId":<PHONE_NUMBER>,
		"artistName": "Spec, JP Simard, Jesse Squires",
		"collectionName": "Swift Unwrapped",
		"trackName": "Swift Unwrapped",
		"collectionCensoredName": "Swift Unwrapped",
		"trackCensoredName": "Swift Unwrapped",
		"artistViewUrl": "https://podcasts.apple.com/us/artist/spec/1019380766?uo=4",
		"collectionViewUrl": "https://podcasts.apple.com/us/podcast/swift-unwrapped/id1209817203?uo=4",
		"feedUrl": "https://feeds.simplecast.com/3pGv88mm",
		"trackViewUrl": "https://podcasts.apple.com/us/podcast/swift-unwrapped/id1209817203?uo=4",
		"artworkUrl30": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts123/v4/4f/33/5c/4f335ccf-a9b8-672b-9c79-635925a70787/mza_3481066685613843705.jpg/30x30bb.jpg",
		"artworkUrl60": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts123/v4/4f/33/5c/4f335ccf-a9b8-672b-9c79-635925a70787/mza_3481066685613843705.jpg/60x60bb.jpg",
		"artworkUrl100": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts123/v4/4f/33/5c/4f335ccf-a9b8-672b-9c79-635925a70787/mza_3481066685613843705.jpg/100x100bb.jpg",
		"collectionPrice": 0.00,
		"trackPrice": 0.00,
		"trackRentalPrice": 0,
		"collectionHdPrice": 0,
		"trackHdPrice": 0,
		"trackHdRentalPrice": 0,
		"releaseDate": "2020-09-14T17:26:00Z",
		"collectionExplicitness": "cleaned",
		"trackExplicitness": "cleaned",
		"trackCount": 89,
		"country": "USA",
		"currency": "USD",
		"primaryGenreName": "Technology",
		"contentAdvisoryRating": "Clean",
		"artworkUrl600": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts123/v4/4f/33/5c/4f335ccf-a9b8-672b-9c79-635925a70787/mza_3481066685613843705.jpg/600x600bb.jpg",
		"genreIds": [
			"1318",
			"26"
		],
		"genres": [
			"Technology",
			"Podcasts"
		]
	}]
}
```

repository: KarimMetawea/iOS-Interview-Preparation

repo_name: KarimMetawea/iOS-Interview-Preparation


text:
# CakePHP Code Sniffer

[![Build Status](https://img.shields.io/travis/cakephp/cakephp-codesniffer/master.svg?style=flat-square)](https://travis-ci.org/cakephp/cakephp-codesniffer)
[![Coverage Status](https://img.shields.io/codecov/c/github/cakephp/cakephp-codesniffer.svg?style=flat-square)](https://codecov.io/github/cakephp/cakephp-codesniffer)
[![Total Downloads](https://img.shields.io/packagist/dt/cakephp/cakephp-codesniffer.svg?style=flat-square)](https://packagist.org/packages/cakephp/cakephp-codesniffer)
[![Latest Stable Version](https://img.shields.io/packagist/v/cakephp/cakephp-codesniffer.svg?style=flat-square)](https://packagist.org/packages/cakephp/cakephp-codesniffer)

This code works with [phpcs](http://pear.php.net/manual/en/package.php.php-codesniffer.php)
and checks code against the coding standards used in CakePHP.

:warning: The `master` branch contains codesniffer rules that are based on the
PSR2 standard. If you want to check against the historical CakePHP coding
standard use any of the `1.x` releases.

## Installation

You should install this codesniffer with composer:

	composer require --dev "cakephp/cakephp-codesniffer"
	vendor/bin/phpcs --config-set installed_paths /path/to/your/app/vendor/cakephp/cakephp-codesniffer

The second command lets `phpcs` know where to find your new sniffs. Ensure that
you do not overwrite any existing `installed_paths` value.

## Usage

Depending on how you installed the code sniffer changes how you run it. If you have
installed phpcs, and this package with PEAR, you can do the following:

	vendor/bin/phpcs --standard=CakePHP /path/to/code

:warning: Warning when these sniffs are installed with composer, ensure that
you have configured the CodeSniffer `installed_paths` setting.

## Running Tests

You can run tests with composer. Because of how PHPCS test suites work, there is
additional configuration state in `phpcs` that is required.

```bash
composer test
```

Once this has been done once, you can use `phpunit --filter CakePHP` to run the
tests for the rules in this repository.

## Contributing

If you'd like to contribute to the Code Sniffer, you can fork the project add
features and send pull requests.

## Releasing CakePHP Code Sniffer

* Create a signed tag
* Write the changelog in the tag commit


text:
# Project TrainSite Frontend

This repository contains the Frontend for the new version of The Coding Train Website. Brainstorming, feature suggestions new ideas should be done at https://github.com/CodingTrain/project-trainsite instead.

## Project Setup

To setup this project locally, follow these steps:

- Fork or clone this repository
- Install dependencies with `npm install`
- Run `npm start` to run the project

## Storybook

This project has a Storybook set up that should allow you to develop presentational components separately from the complete front-end. This is useful to build up components when we don't have the page they should be in or similar. You can [find out more about Storybook here](https://storybook.js.org/).

You can launch the Storybook for this repository by doing the following:

- Fork or clone this repository
- Install dependencies with `npm install`
- Run `npm run storybook` to run the storybook server

## Contributing

Contributions to this project are more than welcome!
You can contribute in many different ways:

- contribute to the codebase and submit a pull request (see [`CONTRIBUTING.md`](https://github.com/CodingTrain/project-trainsite-frontend/blob/master/CONTRIBUTING.md))
- suggest features you'd like to see [here](https://github.com/CodingTrain/project-trainsite)
- track bugs you've found related to the frontend [here](https://github.com/CodingTrain/project-trainsite-frontend/issues)

---

## Code of Conduct

Please refer to The Coding Train's [Code of Conduct](https://github.com/CodingTrain/Code-of-Conduct).

repository: CodingTrain/project-trainsite-frontend

gha_language: TypeScript

repo_name: CodingTrain/project-trainsite-frontend


text:
[![MIT Licensed][icon-mit]][license]
[![Awesome][icon-awesome]][awesome]

# Git for Team Collaboration

Yeh, we know that it's Git again and you a bit tired of it.
But! It's a great new course. It'll help you a lot to understand better
the git and operate with it and you'll benefit from it on your future job
and projects!

**Note to students of previous courses who have already done this task**
You don't need to do this task again.

1. Finish the course [GitHub & Collaboration](https://classroom.udacity.com/courses/ud456)

When complete do the following:

1. Make screenshots of your finished lessons (1)
   and put the screenshots in `task_git_collaboration` folder in
   your `kottans-backend` repo
1. In your `kottans-backend` repo `README.md`:
   - add header `## Git Collaboration`
   - embed the screenshots or add links to the screenshots
   - list your reflections on all subtasks
     (_what was new to you_, _what surprised you_, _what you intend to use in future_)
1. You did lot already! If you honestly finished all the previous steps then go ahead
   and share it with others –
   post a message in [course channel](https://t.me/joinchat/Dqrdixe1c2K9bXUFBzNWtg):
   `Git Collaboration — #done` (or `Git Collaboration — #p2p_done` if you are p2p course student) and add the link to your repo. **This step is important, as it helps mentors to track your progress!**
1. Study Extra Materials below to improve your skills.
   If you feel it affects your overall course performance consider
   reverting to those later e.g. when you have all mandatory tasks completed.
1. You may skip Optional materials from this task (if any).

You have completed **General basics** tasks section. We shall appreciate your feedback
on this section especially if you're doing this course from Ukraine. Please, grant us
10-15 minutes of your time to complete [this form](https://goo.gl/forms/O80XcZwxhMhGmQKq2).

When you finish this task you can proceed to the next one.

## Extra materials

- [An Introduction to Git and GitHub by Brian Yu (CS50 course), video, ~40 min.](https://youtu.be/MJUJ4wbFm_A)
- [Oh shit, git!](http://ohshitgit.com/)
- [Flight rules for git](https://github.com/k88hudson/git-flight-rules)
- [GitHub Learning Lab](https://lab.github.com/courses)

## Done?

➡ Go forward to [Language-specific Topics: Part I](language_basics.md)

⤴ Back to [Contents](../contents.md)

[icon-chat]: https://img.shields.io/badge/chat-on%20telegram-blue.svg
[icon-mit]: https://img.shields.io/badge/license-MIT-blue.svg
[icon-awesome]: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
[license]: https://github.com/Kottans/web/blob/master/LICENSE.md
[awesome]: https://github.com/sindresorhus/awesome

repository: kottans/backend

repo_name: kottans/backend


text:
# Rapid
This repo contains code, data and jupyter notebook related to RAPID.

Click this button to access the jupyter notebook without downloading/installing [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/darkreactions/rapid/master?filepath=RAPID.ipynb)

If the above link does not launch. Try an alternative server: [![Binder](https://notebooks.gesis.org/binder/badge_logo.svg)](https://notebooks.gesis.org/binder/v2/gh/darkreactions/rapid/HEAD?filepath=RAPID.ipynb)

## Repository contents
The following sections indicate the folders which contain code and related data

### Jupyter notebooks

1. RAPID.ipynb - Notebook containing all visualizations
2. Visualization and Statistical Analysis.ipynb - Initial analysis notebook
3. Perovskite learning curve.ipynb - ML code and visualizations notebook

### Raw data
All raw data files are located in the ```data``` folder

1. cifs - Contains the Crystallographic Information Files
2. images - Contains side vial images of each experiment performed
3. xrd/xy - Contains xy files for XRD data
4. 0042.perovskitedata_RAPID.csv - Escalate generated data file including 8 experimental features (with "_rxn_" as header prefix) and 67 chemical features (with "_feat_" as header prefix). The detailed explanations of these features are listed in "Explanation of Features-Descriptors" section in "Perovskite Dataset Description.pdf". This CSV file is used in visualization and machine learning.
5. 0042.perovskitedata_RAPID_full.csv - This escalate generated data file contains the same experiments as "0042.perovskitedata_RAPID.csv" but has all 787 features, including additional "_raw_" features describing experiment details (see "Explanation of Features-Descriptors" section in "Perovskite Dataset Description" for the explanations of "_raw_" prefix). The csv file is not used for visualization or machine learning.
6. image_list.json - Keeps track of all image files in the image folder
7. ml_data.pkl - Python pickle file containing ML results
8. inventory.csv - Chemical inventory data
9. organic_inchikey.csv - Inchi keys and chemical names
10. s_spaces.json - Co-ordinates of state space for each amine

### Scripts
The following python scripts are used in the RAPID.ipynb notebook to generate visualizations

1. plots.py - Generates the reaction outcomes 3D plot widget
2. xrd_plot.py - Generates the xrd plot widget
3. ml_section.py - Generates machine learning outcomes widget
4. cif_plots.py - Generates the cif plot widget. Note that jsmol is used to create the widget

repository: darkreactions/rapid

repo_name: darkreactions/rapid


text:
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/386bd76d161c4783955d79cac8d10f85)](https://www.codacy.com/app/alejgh/InciManager_i2b?utm_source=github.com&utm_medium=referral&utm_content=Arquisoft/InciManager_i2b&utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/Arquisoft/InciManager_i2b.svg?branch=master)](https://travis-ci.org/Arquisoft/InciManager_i2b)
[![CircleCI](https://circleci.com/gh/Arquisoft/InciManager_i2b.svg?style=svg)](https://circleci.com/gh/Arquisoft/InciManager_i2b)
[![codecov](https://codecov.io/gh/Arquisoft/InciManager_i2b/branch/master/graph/badge.svg)](https://codecov.io/gh/Arquisoft/InciManager_i2b)

# InciManager_i2b

## Authors
- Alejandro González Hevia (@alejgh)
- Carmen Sors González (@carmee-en)
- Eduardo Ulibarri Toledo (@uo251436)

## How to execute the module
There are two different possibilities in order to run the Incident Manager.

### Using Docker (recommended)
In order to run the module using Docker you just need to install just one dependency: Docker itself. You can download Docker from their [official site](https://www.docker.com/community-edition#/download).

Once you installed docker you have to start the Docker daemon and open a new command line if you are on Mac or Linux, or just open the Docker quickstart terminal if you are on Windows. After that, you execute `docker-compose up` inside the root directory of the Manager, where the docker-compose.yml file is located.

Once you execute this command, Docker Compose will launch three containers:
* A container running zookeper on port 2181.
* A container running kafka on port 9092.
* A container running the Incidence Manager application, listening on port 8081.

![ Once the images are pulled they are cached by docker, so the next time you run the application it won't download the images again, taking less than a minute to start all the containers.

Once the application is running you can connect to it using http://localhost:8081 if you are running on Mac or Linux. If you are running it on Windows you will have to use the private IP specified when you start running Docker:
![Private ip windows](img/ip-windows.jpg)

Finally, when you are done using the application, you can use Ctrl+C to gracefully stop all the containers run by Docker:
![Stop containers](img/docker-stop.png)

### Without using Docker
If you want to run the Incidence Manager without using Docker you will need to setup Kafka and Zookeper manually, as well as running the spring boot application using Maven.

#### Kafka
First of all, you need to download Apache Kafka.

---tar -xzf kafka_2.11-1.0.1.tgz

---cd kafka_2.11-1.0.1

Before starting Apache Kafka, as it uses Zookeeper, you need to first start a ZooKeeper server if you don't already have one. You can use a script packaged with kafka to get a quick single-node ZooKeeper instance.

---bin\windows\zookeeper-server-start.bat config/zookeeper.properties

Now, you can start the Kafka server.

---bin\windows\kafka-server-start.bat config/server.properties

#### Mongo DB
This is the database of the system, to run it you have to go to the folder where you downloaded it and then run it.

---bin/mongod —port 27018

#### Maven
To run the application with maven, you have to run Apache Kafka and Mongo DB before. Then you have to go to the projects folder(where you have the pom.xml file) and type:

---mvn spring-boot:run

## Posting a new Incident
Once you have the Incident Manager application up and running you can create a new Incident by sending a POST request to http://localhost:8081/incident/create. The format of the incident must be like this one:.
```json
{
  "agent": {
    "username": "sonny",
  	"password": "pass123",
    "kind": "Person"
  },
  "inciName": "My first incidence",
  "location": {
    "lat": 43.30,
    "lon": -5.68
  },
  "tags": ["Fire", "Important"],
  "moreInfo": ["myImage.jpg"],
  "properties": {
    "priority": 1,
    "temperature": "50ºC",
    "operators": ["Paco", "Carmen"]
  }
}
```
Inside the properties JSON object you can include any object you want.

You will need to have the [Agents_i2b module](https://github.com/Arquisoft/Agents_i2b) running in order to create the Incident, since the system has to check if the Agent exists before creating the incident.

## Querying the incidents of an agent
With you application running, you may need to query and list the incidents of a certain agent and retrieve these both in JSON format or with a more visual web interface.

### Retrieving incidents in JSON format
You can get the list of incidents by sending a post request to http://localhost:8081/incidentsinfo (or, in case you are using Docker, as said before, you may send the request to port 8001). The request body must contain the following parameters:
* username: Username of the agent
* password: Password of the agent
* kind: Kind of the agent

The output format will be as follows:
```
{
  "agent": {
    "username": "agentUsername",
    "password": "agentPassword",
    "kind": "agentKind"
  },
  "inciName": "incidentName",
  "location": {
    "lat": 1,
    "lon": 1
  },
  "tags": [
    "tag1",
    "tag2"
  ],
  "moreInfo": [
    "moreInfo1",
    "moreInfo2"
  ],
  "properties": {

  }
}
```
### Web interface
For a more visual output, you may also send a get request to http://localhost:8081/agentform that will lead you to a sample form where you must specify the agent's username, password and kind:

![Filling web form](img/agentform.png)

You can enter the following credentials to test the interface:
```
username: sonny
password: pass123
kind: Person
```

In case wrong login data is provided, an error message will pop up, else the agent's incidents will be displayed as follows:

![Web interface](img/web-interface.png)

You can also access a chat based interface to create an incident instead of doing a POST request. This interface can be accessed from the incidents view after you log in, or going directly to http://localhost:8081/incident/create.

gha_language: Java