text:
[![Unix Build Status][travis-image]][travis-link]
[![Package Control Downloads][pc-image]][pc-link]
![License][license-image]
# HexViewer

HexViewer is a plugin for Sublime Text that allows the toggling of a file into a hex viewing mode.  HexViewer also supports limited hex editing.

![Preview](docs/src/markdown/images/preview.png)

## Installation

### By Package Control

1. Download & Install **`Sublime Text 3`** (https://www.sublimetext.com/3)
1. Go to the menu **`Tools -> Install Package Control`**, then,
    wait few seconds until the installation finishes up
1. Now,
    Go to the menu **`Preferences -> Package Control`**
1. Type **`Add Channel`** on the opened quick panel and press Enter
1. Then,
    input the following address and press Enter
    ```
    https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json
    ```
1. Go to the menu **`Tools -> Command Palette...
    (Ctrl+Shift+P)`**
1. Type **`Preferences:
    Package Control Settings – User`** on the opened quick panel and press Enter
1. Then,
    find the following setting on your **`Package Control.sublime-settings`** file:
    ```js
    "channels":
    [
        "https://packagecontrol.io/channel_v3.json",
        "https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json",
    ],
    ```
1. And,
    change it to the following, i.e.,
    put the **`https://raw.githubusercontent...`** line as first:
    ```js
    "channels":
    [
        "https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json",
        "https://packagecontrol.io/channel_v3.json",
    ],
    ```
    * The **`https://raw.githubusercontent...`** line must to be added before the **`https://packagecontrol.io...`** one, otherwise,
      you will not install this forked version of the package,
      but the original available on the Package Control default channel **`https://packagecontrol.io...`**
1. Now,
    go to the menu **`Preferences -> Package Control`**
1. Type **`Install Package`** on the opened quick panel and press Enter
1. Then,
    search for **`HexViewer`** and press Enter

See also:

1. [ITE - Integrated Toolset Environment](https://github.com/evandrocoan/ITE)
1. [Package control docs](https://packagecontrol.io/docs/usage) for details.

# Features

- View any file (that exist on disk) in a hex format showing both byte and ASCII representation.
- Command to jump to a specific address.
- In place editing of bytes or ASCII chars.
- Highlight selected byte **and** ASCII code.
- Inspection panel showing different integer representation at the cursor position.
- Configurable display of byte grouping, bytes per line, endianness.
- Export hex view to a binary file.
- Get the checksum of a given file (various checksums are available).
- Generate checksum/hash from input via panel or text selection.
- Optionally auto convert binary to hex view.

# Documentation

http://facelessuser.github.io/HexViewer/

# License

Hex Viewer is released under the MIT license.

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

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

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

[travis-image]: https://img.shields.io/travis/facelessuser/HexViewer/master.svg
[travis-link]: https://travis-ci.org/facelessuser/HexViewer
[pc-image]: https://img.shields.io/packagecontrol/dt/HexViewer.svg
[pc-link]: https://packagecontrol.io/packages/HexViewer
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg

repository: evandroforks/HexViewer

repo_name: evandroforks/HexViewer


text:
# Mavenlink
- https://www.mavenlink.com/
- Mavenlink API documentation
	- http://developer.mavenlink.com/beta/

## API Calls
- Schema
	- Requests must be sent via HTTPS and can be in either
		- JSON
		- Rails structured x-www-form-urlencoded
- base API URL
	- https://api.mavenlink.com/api/v1/
- Authentication
	- must be authenticated with an OAuth bearer token
	- authenticate using the `Authorization` header, set the header's value to Bearer `<token>`
	- e.g. `curl -H "Authorization: Bearer abc123" "https://api.mavenlink.com/api/v1/workspaces.json"`
- Rate limiting
	- reply has "HTTP code 429 'Too Many Requests'"

## Schema parts

### Errors
```json
{
  errors: [
    {
      type: "oauth"
      message: "Invalid OAuth 2 Request"
    }
  ]
}
```

### Response Format
- always use the returned results array to retrieve the canonical results from an API request.
	```json
	{
	"count": 2,
	"results": [{ key: "workspaces", id: "10" }, { key: "workspaces", id: "11" }],
	"workspaces": {
		"10": {
		id: "10",
		title: "some project",
		participant_ids: ["2", "6"],
		primary_counterpart_id: "6"
	},
		"11": {
		id: "11",
		title: "another project",
		participant_ids: ["2", "8"],
		primary_counterpart_id: "8"
	}
	},
	"users": {
		"2": { id: "2", full_name: "bob" },
		"6": { id: "6", full_name: "chaz" },
		"8": { id: "8", full_name: "jane" }
	}
	}
	```

## OAuth 2.0 Workflow

### Registering your application
- Register and manage OAuth2 applications that can connect to Mavenlink
- at the application management page as a Mavenlink account administrator.
- Applications have a name and a callback URL for OAuth2.
- https://app.mavenlink.com/oauth/applications

### Obtaining tokens for users
1. Send your user to https://app.mavenlink.com/oauth/authorize with the REQUIRED parameters client_id, response_type, and redirect_uri.
    - client_id is the ID assigned to your application by Mavenlink
    - response_type must be set to "code"
    - redirect_uri must be set to a URL where your application can accept codes and then exchange them for access tokens. It should match the redirect_uri specified when you registered your application.
    - Error as query parms
    - `$REDIRECT_URI?error=access_denied&error_description=The+resource+owner+or+authorization+server+denied+the+request.`
2. Get User Authorization
	- If the user allows your application, then Mavenlink will redirect to the redirect_uri with query parameters providing your application with a time-limited code that your application can exchange for an access token within the next 5 minutes.
	- `$REDIRECT_URI?code=abc123`
3. exchanges the code for an access token
	- make a POST request directly to Mavenlink at https://app.mavenlink.com/oauth/token to exchange the code for an access token
	- request must include the client_id, client_secret, grant_type, code, and redirect_uri parameters
    	- `client_id` is the ID assigned to your application by Mavenlink
    	- `client_secret` is the secret token assigned to your application by Mavenlink
    	- `grant_type` must be set to "authorization_code" in order to exchange a code for an access token
    	- `code` is the value that was returned in the code query parameter when Mavenlink redirected back to your redirect_uri
    	- `redirect_uri` is the exact same value that you used in the original request to /oauth/authorize
4. response body, encoded in JSON, containing access_token and token_type
    - `access_token` is the token that your application will use to authenticate requests to the Mavenlink API as this user
    - `token_type` will be "bearer"
    - Error in the response body, encoded as JSON
5. uses the access token to make authenticated requests

license: MIT

repository: firament/mavenlink-integration

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: firament/mavenlink-integration


text:
# GoogleColabPDF
A work around for nbconvert on Google Colab to save files as pdfs.

## Known Issues
 - Does not convert images. Will not include images. Chance of complete Failure if the image link is too long
 - Trailing filename with spaces occasionally causes issues

## Coming Updates
- Error handling on Nbconversion for large image files

repository: HorningT/GoogleColabPDF

branch_name: refs/heads/main

repo_name: HorningT/GoogleColabPDF


text:
# Displaying DotKernel API endpoints using dot-cli

## Usage

Run the following command in your application’s root directory:

    php ./bin/cli.php route:list

The command runs through all routes and extracts endpoint information in realtime.
The output should be similar to the following:
```text
+--------+---------------------------------+--------------------------------+
| Method | Name                            | Path                           |
+--------+---------------------------------+--------------------------------+
| DELETE | admin.delete                    | /admin/{uuid}                  |
| DELETE | user.my-account.delete          | /user/my-account               |
| DELETE | user.my-avatar.delete           | /user/my-avatar                |
| DELETE | user.delete                     | /user/{uuid}                   |
| DELETE | user.avatar.delete              | /user/{uuid}/avatar            |
| GET    | home                            | /                              |
| GET    | account.reset-password.validate | /account/reset-password/{hash} |
| GET    | admin.list                      | /admin                         |
| GET    | admin.my-account.view           | /admin/my-account              |
| GET    | admin.role.list                 | /admin/role                    |
| GET    | admin.role.view                 | /admin/role/{uuid}             |
| GET    | admin.view                      | /admin/{uuid}                  |
| GET    | user.list                       | /user                          |
| GET    | user.my-account.view            | /user/my-account               |
| GET    | user.my-avatar.view             | /user/my-avatar                |
| GET    | user.role.list                  | /user/role                     |
| GET    | user.role.view                  | /user/role/{uuid}              |
| GET    | user.view                       | /user/{uuid}                   |
| GET    | user.avatar.view                | /user/{uuid}/avatar            |
| PATCH  | account.activate                | /account/activate/{hash}       |
| PATCH  | account.modify-password         | /account/reset-password/{hash} |
| PATCH  | admin.my-account.update         | /admin/my-account              |
| PATCH  | admin.update                    | /admin/{uuid}                  |
| PATCH  | user.my-account.update          | /user/my-account               |
| PATCH  | user.update                     | /user/{uuid}                   |
| POST   | account.activate.request        | /account/activate              |
| POST   | account.recover-identity        | /account/recover-identity      |
| POST   | account.register                | /account/register              |
| POST   | account.reset-password.request  | /account/reset-password        |
| POST   | admin.create                    | /admin                         |
| POST   | error.report                    | /error-report                  |
| POST   | security.generate-token         | /security/generate-token       |
| POST   | security.refresh-token          | /security/refresh-token        |
| POST   | user.create                     | /user                          |
| POST   | user.my-avatar.create           | /user/my-avatar                |
| POST   | user.activate                   | /user/{uuid}/activate          |
| POST   | user.avatar.create              | /user/{uuid}/avatar            |
+--------+---------------------------------+--------------------------------+
```

## Filtering results

The following filters can be applied when displaying the routes list:
* Filter routes by name, using: `-i|--name[=NAME]`
* Filter routes by path, using: `-p|--path[=PATH]`
* Filter routes by method, using: `-m|--method[=METHOD]`

The filters are case-insensitive and can be combined.

Get more help by running this command:

    php ./bin/cli.php route:list --help

repository: dotkernel/api

gha_language: PHP

gha_license_id: MIT

repo_name: dotkernel/api


text:
# Exercise 4.19

Explain the meaning of the following five definitions. Identify any illegal definitions.

(a) `int i;`
(b) `const int ic;`
(c) `const int *pic;`
(d) `int *const cpi;`
(e) `const int *const cpic;`

**Answer**:

(a) defines a `int` type object;
(b) defines a `int` type object which is a `const`, while it doesn't initialize `ic`, so it is **illegal**;
(c) defines a pointer to `int` object, and the pointer thinks that the `int` object it points to is a `const`;
(d) defines a `const` pointer that points to a `int` object, while it doesn't initialize `cpi`, so it is **illegal**;
(e) defines a `const` pointer that points to a `int` object, and the pointer thinks that the `int` object it points to is a `const`, while it doesn't initialize `cpic`, so it is **illegal**.


text:
---
layout: post
title:  "Mid-sized Black Holes are not Boring!"
author: abhijeet
categories: [ blackholes ]
image: /assets/images/abhi4.jpg
---

> Scientists finally spotted the strongest evidence of a Mid-sized Black Hole far beyond our Galaxy.

### What are they?

A lot fewer research papers are published for the Mid-sized Black Holes as compared to those for the study of stellar Black Holes or the supermassive Black Holes. The recent results published on March 31, 2020, in The *Astrophysical Journal Letters* looks like the most promising evidence of such Black Holes as of now. The so-called **Intermediate-mass Black Holes** (IMBHs) are with the mass in the range 102 to 105 solar masses, significantly more than stellar black holes but insignificant in comparison to about 105 to 109 solar masses heavy supermassive Black Holes.

Why always "*middle-ish*" things ought to be boring? However, it is not in the case of Black Holes, at least from now :). They are often sought out as the "missing link" in the theory of Black Hole evolution; In fact, there are many theories that idealize their formation. Some prominent ones are:

- Runaway collisions in stellar clusters.
- During the merger of stellar Black Holes.
- Formed as primordial Black Holes after the Big-Bang.

### Why so difficult to spot?

This object isn't the first to be considered a likely candidate for an intermediate-mass black hole. It often bugs me when I think quite a lot of is missing between these two extremities.

Since they don't have as strong a gravitational pull to draw stars and other cosmic material which would produce telltale X-ray glows and are smaller and less active than supermassive black holes; IMBHs are particularly difficult to find. It is easier to detect the stellar ones since they exist in large numbers (as far as we know) in our vicinity, so we can observe their effects they cause on their surroundings.
As our algorithms and detectors keep on improving, I hope we detect a lot of them using their Gravitational Waves; till now we don't have any detection of such Black Holes through **LIGO/VIRGO**.

The power of NASA's **Chandra X-ray Observatory** and ESA's **X-ray Multi-Mirror Mission** along with the keen vision of **Hubble Space Telescope** helped Scientists to nail down this preparator of a cosmic homicide. The archives of these X-ray observatories were searched and matched with the HST image to suffice as evidence of this Mid-sized Black Hole.

![Hubble image for the identified IMBH]({{ '/assets/images/abhi5.jpg' | relative_url }})

*The Hubble image for the identified IMBH (Credits: NASA, ESA and D. Lin (University of New Hampshire))*

This Hubble image identified the location of an intermediate-mass black hole and the X-ray glow from the shredded star allowed astronomers to estimate its mass. The black hole, named `3XMM J215022.4−055108` is indicated by the white circle. The elusive type of black hole was first identified in a burst of X-rays emitted by hot gas from a star as it was captured and destroyed by the black hole. Hubble's deep, high-resolution imaging shows that the black hole resides inside a dense cluster of stars that is far beyond our Milky Way galaxy. The star cluster is near to the Galaxy visible in the center of the image.

### In the future...

The study of Mid-sized Black Holes will improve our understanding of the formation of Super-massive blackholes and, of course, IMBHs itself. After these findings, we move one step towards postulating the fact that globular clusters may favor the formation of IMBHs.

![Mass Chart for Dead Stars and Black Holes]({{ '/assets/images/abhi6.jpg' | relative_url }})

*Mass Chart for Dead Stars and Black Holes (Credits: NASA/JPL-Caltech)*

So stay tuned, because over the next few years, we may be able to find to a strong theory for their evolution and existence, or who knows completely rule out the possibility that they even can exist!

### References

- [Wikipedia](https://en.wikipedia.org/wiki/Intermediate-mass_black_hole)
- [NASA mission pages](https://www.nasa.gov/feature/goddard/2020/hubble-finds-best-evidence-for-elusive-mid-sized-black-hole)
- [The original research paper at arxiv.org](https://arxiv.org/abs/2002.04618)

repository: STAC-IITMandi/Blog

gha_language: JavaScript

repo_name: STAC-IITMandi/Blog


text:
# General Syllabus

* Basics: Scopes, closures, `this`, `bind`, `apply` and types.
  * [You Don't Know JS: Scopes & Closures](https://github.com/getify/You-Dont-Know-JS/tree/2nd-ed/scope-closures)
  * [You Don't Know JS: this & Object Prototypes](https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/this%20&%20object%20prototypes/README.md#you-dont-know-js-this--object-prototypes)
  * [You Don't Know JS: Types & Grammar](https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/types%20&%20grammar/README.md#you-dont-know-js-types--grammar)
  * [MDN Closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures)
* Intermediate: promises, iterators, generatos, async/await and template literals.
  * [You Don't Know JS: Async & Performance](https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/async%20&%20performance/README.md#you-dont-know-js-async--performance)
  * [MDN Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)
  * [MDN Iterator and generatos](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators)
  * [MDN Template Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
* Bonus: Proper use of objects and arrays and control flow.
  * [MDN Reintroduction to Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)
  * [MDN Equality comparisons and sameness](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness)
  * [MDN Array Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
  * [MDN Control flow and error handling](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling)

# Functional Programming Syllabus

* Basics: First-class Function, Pure Functions, Side-effects, High-order functions
  * [Mostly Adequate Guide to Functional Programming](https://mostly-adequate.gitbooks.io/mostly-adequate-guide/)
  * [MDN First-class Function](https://developer.mozilla.org/en-US/docs/Glossary/First-class_Function)
  * [Higher-Order Functions :: Eloquent JavaScrip](https://eloquentjavascript.net/05_higher_order.html)
  * [First-class and Higher Order Functions: Effective Functional JavaScript](https://hackernoon.com/effective-functional-javascript-first-class-and-higher-order-functions-713fde8df50a)
* Currying and Partial Application, Composing
  * [Javascript- Currying VS Partial Application](https://codeburst.io/javascript-currying-vs-partial-application-4db5b2442be8)
  * [Currying in JavaScript ES6](https://blog.benestudio.co/currying-in-javascript-es6-540d2ad09400)
  * [Functional JavaScript: Function Composition For Every Day Use.](https://hackernoon.com/javascript-functional-composition-for-every-day-use-22421ef65a10)
* Mondas and Fuctors: Maybe
  * [Advanced functional programming in TypeScript: Maybe monad](https://codewithstyle.info/advanced-functional-programming-in-typescript-maybe-monad/)
  * [Functional Programming in JavaScript, Part 3: Introduction to Functors and Monads](https://marmelab.com/blog/2018/09/26/functional-programming-3-functor-redone.html)

repository: iliya-sodaboom/best-practices

repo_name: iliya-sodaboom/best-practices


text:
# Goal

Create an easy-to-use manager for all already existing VirtualBox VMs residing in taskbar notification area

#Requirements

Java >= 7 (1.7)

VirtualBox >= 5.0 (I assume the api is backwards compatible)

vboxjxpcom.jar - you get it inside the VirtualBox SDK
* Download it from https://www.virtualbox.org/wiki/Downloads, unzip the file and copy it from sdk/bindings/xpcom/java/ to the applications jar directory

cron4j.jar - you get it from http://www.sauronsoftware.it/projects/cron4j/
* unzip it and copy the cron4j.jar to the applications jar directory

# How to Run

change to the application-directory
run "java -cp vboxjxpcom.jar:cron4j.jar:VirtualBoxTrayManager.jar virtualboxtraymanager.VirtualBoxTrayManager"

# Setup

On first Startup you will be asked to enter all Settings, if they are not provided the application will not run correctly.
To clarify things:
* Xpcom Service Executable refers on Linux to /usr/lib/virtualbox/VBoxSVC
* VirtualBox install directory refers to your Install directory, on Linux usually /usr/lib/virtualbox
* Library Path refers to the applications directory, the directory you placed the .jar-Files in
* Backup save directory is the directory where your VMs are exported to if you choose backup. Please be sure you have write permissions and enough diskspace available.

# Scheduler

Enter in the grid the minute, hour etc. where you want to execute the task, then enter the mode and finally the VM you want to execute the command with.
On "OK" or close your changes will be saved and immediately added to the scheduler.
Add a new row via "+" and delete the marked row via "-"

# Problems

If you get exceptions on startup or during control of vms regarding vboxjxpcom missing in java.library.path you need to install the official package of VirtualBox, I had this issue when installing the package from openSuse because they omitted some files for unkown reasons. Uninstall and install from Oracle fixed it for me.

repository: tobihille/virtualbox-tray-manager

repo_name: tobihille/virtualbox-tray-manager


text:
---
title: "Tracking in Notebooks"
sub_link: "tracking/in-notebooks"
meta_title: "Introduction to Polyaxon tracking in a notebook session - Tracking - Experimentation"
meta_description: "Polyaxon's Python library provides utilities and modules for logging and tracking of your machine learning code, artifacts, and results, and allows to perform multi-run tracking inside a single notebook session."
visibility: public
status: published
tags:
  - client
  - api
  - polyaxon
  - python
  - tracking
  - reference
  - sdk
  - notebook
sidebar: "experimentation"
---

## Tracking in a notebook session

Polyaxon's Python library provides utilities and modules for logging and tracking of your machine learning code, artifacts,
and results, and allows to perform multi-run tracking inside a single notebook session.

If you need to track some experiments running inside a notebook, you need to start and end the experiments manually:

```python
from polyaxon import tracking

# Start run1
tracking.init(name="run1", is_new=True)

# ...

# End run1
tracking.end()

# ...

# Start run2
tracking.init(name="run2", is_new=True)

# ...

# End run2
tracking.end()
```

If you are running the notebook [in-cluster](/docs/experimentation/tracking/in-cluster/), you do not need to provide the authentication and owner/project context because it will be resolved automatically using the same notebook session.

If you the notebook is running outside of Polyaxon or managed manually, you might need to provide the context manually, see the [instantiation guide](/docs/experimentation/tracking/instantiation/) for more details.

repository: polyaxon/polyaxon

gha_language: Python

repo_name: polyaxon/polyaxon


text:
Model Specification
===================

Variable types
--------------

The following types of variables can be used in models:

> -   `exogenous` (`m`)
> -   `states` (`s`)
> -   `controls` (`x`)
> -   `auxiliaries` (`y`)
> -   `rewards` (`r`)
> -   `values` (`v`)
> -   `expectations` (`z`)
> -   `parameters` (`p`)

Symbol types that are present in a model are always listed in that
order.

### State-space

Decisions are characterized by a vector $m$ of *exogenous* variables (exogenous states)
and by a vector $s$ of endogenous *states*.
The unknown vector of controls $x$ is a
function $\varphi$ of the states such that:

> $x = \varphi(m,s)$

The function $\varphi$ is typically approximated by the solution
algorithm. It can be either a Taylor expansion, or an interpolating
object (splines, smolyak). Once obtained, it can be evaluated at any point of the
the state space (represented by a couple of vectors), or at a list of points (of couple of matrices):

``` {.sourceCode .julia}
dr = time_iteration(model)
m0 = model.calibration[:states]
s0 = model.calibration[:states]
dr(m0,s0)                               # evaluates at the steady-state
dr([0.0;-0.01;-0.1], [2.5;2.5;2.5])     # evaluates at a list of points
```

A decision rule is defined on two discretized grids: one for the exogenous states
and one for the endogenous ones. If the exogenous grid points are numbered by $i$,
we can define non-ambiguously $x = \varphi(i,s)$ as  $\varphi(m_i,s)$, which corresponds to the following code:
``` {.sourceCode .julia}
dr(2,s0)                 # evaluates at the second exogenous point
dr(2, [2.5;2.5;2.5])     # evaluates at a list of points
```

### Valid equations

The various equations understood by Dolo are descrbed below:

<!-- would be cool to know how to make comments ;-) -->

#### Transitions

    - name: `transition`
    - short name: `g`

Transitions are given by a function $g$ such that at all times:

$$s_t = g(m_{t-1}, s_{t-1}, x_{t-1}, m_t)$$

where $m_t$ is a vector-valued exogenous process.

> **note**
>
> In the RBC model, the vector of endogenous states is $s_t=(a_t,k_t)$. The
> transitions are:
>
> > $a_t = \rho a_{t-1} + \epsilon_t$
> > $k_t = (1-\delta)k_{t-1} + i_{t-1}$
>
> If $\epsilon_t$ follow a normal distribution with variance $\sigma_{\epsilon}$, the yaml file is amended with:
>
> ``` {.sourceCode .yaml}
> symbols:
>     states: [a,k]
>     controls: [i]
>     exogenous: [epsilon]
>     ...
> equations:
>     transition:
>         a = rho*a(-1) + e
>         k = k(-1)*(1-delta) + i(-1)
> exogenous: !Normal
>     Sigma: [[sigma_epsilon]]
> ```
>
> Note that transition equations must list states in declaration order.
> Also, in this example the productivity process $a_t$ is essentially an exogenous
> AR1 process. Declaring it as such (instead of $\epsilon$), provides additional
> information to the solvers and can lead to faster solution time.

#### Auxiliary variables / Definitions

    - name: `auxiliary`
    - short name: `a`

In order to reduce the number of variables, it is useful to define
auxiliary variables $y_t$ using a function $a$ such that:

$$y_t = a(m_t, s_t, x_t)$$

These variables are defined in a special `definitions` block, outside of `equations`.
When auxiliary variables appear in an equation they are automatically substituted by
the corresponding expression in $m_t$,$s_t$ and $x_t$.

> **note**
>
> In the RBC model, three auxiliary variables are defined
> $y_t, c_t, r_{k,t}$ and $w_t$. They are a closed form function of
> $a_t, k_t, i_t, n_t$. Defining these variables speeds up computation
> since they don't need to be solved for or interpolated.

#### Utility function and Bellman equation

    - name: `utility`
    - short name: `u`

The (separable) value equation defines the value $v_t$ of a given policy
as:

$$v_t = u(m_t,s_t,x_t) + \beta E_t \left[ v_{t+1} \right]$$

This gives rise to the Bellman eqution:

> $$v_t = \max_{x_t} \left( u(m_t, s_t,x_t) + \beta E_t \left[ v_{t+1} \right] \right)$$

These two equations are characterized by the reward function $u$ and the
discount rate $\beta$. Function $u$ defines the vector of symbols
`rewards`. Since the definition of $u$ alone is not sufficient, the
parameter used for the discount factor must be given to routines that
compute the value. Several values can be computed at once, if $U$ is a
vector function and $\beta$ a vector of discount factors, but in that
case in cannot be used to solve for the Bellman equation.

> **note**
>
> Our RBC example defines the value as
> $v_t = \frac{(c_t)^{1-\gamma}}{1-\gamma}-\chi \frac{(n_t)^{1+\eta}}/{1+\eta} + \beta E_t v_{t+1}$. This
> information is coded using:
> ``` {.sourceCode .yaml}
> symbols:
>     ...
>     rewards: [r]
>
> equations:
>     ...
>     utility:
>         - r = c^(1-gamma)/(1-gamma)- chi*n^(1+eta)/(1+eta)
>
> calibration:
>     ...
>     beta: 0.96   # beta is the default name of the discount
> ```

#### Value

    - name: `value`
    - short name: `w`

A more general updating equation can be useful to express non-separable
utilities or prices. The vector of (generalized) values $v^{*}$ are
defined by a function `w` such that:

$$v_t = w(m_t,s_t,x_t,v_t,m_{t+1},s_{t+1},x_{t+1},v_{t+1})$$

As in the separable case, this function can either be used to compute
the value of a given policy $x=\varphi()$ or in order solve the
generalized Bellman equation:

$$v_t = \max_{x_t} \left( w(m_t,s_t,x_t,v_t,m_{t+1},s_{t+1},x_{t+1},v_{t+1}) \right)$$

> **note**
>
> Instead of defining the rewards of the RBC example, one can instead
> define a value updating equation:
>
> ``` {.sourceCode .yaml}
> symbols:
>     ...
>     values: [v]
>
> equations:
>     ...
>     value:
>         - v = c^(1-gamma)/(1-gamma)*(1-n...) + beta*v(1)
> ```

#### Boundaries

    - name: `controls_lb` and `controls_ub`
    - short name: `lb` and `ub`

The optimal controls must also satisfy bounds that are function of
states. There are two functions $\underline{b}()$ and $\overline{b}()$
such that:

$$\underline{b}(m_t, s_t) \leq x_t \leq \overline{b}(m_t, s_t)$$

> **note**
>
> In our formulation of the RBC model we have excluded negative
> investment, implying $i_t \geq 0$. On the other hand, labour cannot be
> negative so that we add lower bounds to the model:
>
> ``` {.sourceCode .yaml}
> equations:
>     ...
>     controls_lb:
>         i = 0
>         n = 0
> ```
>
> Specifying the lower bound on labour actually has no effect since
> agents endogeneously choose to work a positive amount of time in order
> to produce some consumption goods. As for upper bounds, it is not
> necessary to impose some: the maximum amount of investment is limited
> by the Inada conditions on consumption. As for labour `n`, it can be
> arbitrarly large without creating any paradox. Thus the upper bounds
> are omitted (and internally treated as infinite values).

#### Euler equation

    - name: `arbitrage` (`equilibrium`)
    - short name: `f`

A general formulation of the Euler equation is:

$$0 = E_t \left[ f(m_t, s_t, x_t, m_{t+1}, s_{t+1}, x_{t+1}) \right]$$

Note that the Euler equation and the boundaries interact via
"complementarity equations". Evaluated at one given state, with the vector
of controls $x=(x_1, ..., x_i, ..., x_{n_x})$, the Euler equation gives
us the residuals $r=(f_1, ..., f_i, ...,
f_{n_x})$. Suppose that the $i$-th control $x_i$ is supposed to lie in
the interval $[ \underline{b}_i, \overline{b}_i ]$. Then one of the
following conditions must be true:

-   $f_i$ = 0
-   $f_i<0$ and $x_i=\overline{b}_i$
-   $f_i>0$ and $x_i=\underline{b}_i$

By definition, this set of conditions is denoted by:

-   $f_i = 0 \perp \underline{b}_i \leq x_i \leq \overline{b}_i$

These notations extend to a vector setting so that the Euler equations
can also be written:

$$0 = E_t \left[ f(m_t, s_t, x_t, m_{t+1}, s_{t+1}, x_{t+1}) \right] \perp \underline{b}(m_t, s_t) \leq x_t \leq \overline{b}(m_t, s_t)$$

Specifying the boundaries together with the Euler equation, or providing
them separately is exactly equivalent. In any case, when the boundaries
are finite and occasionally binding, some attention should be devoted to
write the Euler equations in a consistent manner. In particular, note
that the Euler equations are order-sensitive.

The Euler conditions, together with the complementarity conditions
typically often come from Kuhn-Tucker conditions associated with the
Bellman problem, but that is not true in general.

> **note**
>
> The RBC model has two Euler equations associated with investment and
> labour supply respectively. They are added to the model as:
>
> ``` {.sourceCode .yaml}
> arbitrage:
>     - 1 - beta*(c/c(1))^(sigma)*(1-delta+rk(1))   | 0 <= i <= inf
>     - w - chi*n^eta*c^sigma                       | 0 <= n <= inf
> ```
>
> Putting the complementarity conditions next to the Euler equations,
> instead of entering them as separate equations, helps to check the
> sign of the Euler residuals when constraints are binding. Here, when
> investment is less desirable, the first expression becomes bigger.
> When the representative agent is prevented from investing less due to the
> constraint (i.e. $i_t=0$), the expression is then *positive*,
> consistent with the complementarity equations.

#### Expectations

    - name: `expectation`
    - short name: `h`

The vector of explicit expectations $z_t$ is defined by a function $h$
such that:

$$z_t = E_t \left[ h(m_{t+1}, s_{t+1},x_{t+1}) \right]$$

``` {.sourceCode .}
In the RBC example, one can define the expected value tomorrow of one additional unit invested tomorrow:

.. math::

    m_t=\beta*(c_{t+1}^(-\sigma)*(1-\delta+r_{k,t+1})

 It is a pure expectational variable in the sense that it is solely determined by future states and decisions. In the model file, it would be defined as:

.. code: yaml

    symbols:
        ...
        expectations: [z]

    equations:
        ...
        - z = beta*(c(1))^(-sigma)*(1-delta+rk(1))
```

#### Generalized expectations

    - name: `expectation_2`
    - short name: `h_2`

The vector of generalized explicit expectations $z_t$ is defined by a
function $h^{\star}$ such that:

$$z_t = E_t \left[ h^{\star}(m_t,s_t,x_t,m_{t+1},s_{t+1},x_{t+1}) \right]$$

#### Euler equation with expectations

    - name: `arbitrage_2` (`equilibrium_2`)
    - short name: `f_2`

If expectations are defined using one of the two preceding definitions,
the Euler equation can be rewritten as:

$$0 = f(m_t, s_t, x_t, z_t) \perp \underline{b}(m_t, s_t) \leq x_t \leq \overline{b}(m_t, s_t)$$

> **note**
>
> Given the definition of the expectation variable $m_t$, today's
> consumption is given by: $c_t = z_t^\left(-\frac{1}{\sigma}\right)$ so the Euler
> equations are rewritten as:
>
> ``` {.sourceCode .yaml}
> arbitrage_2:
>     - 1 - beta*(c)^(sigma)/m   | 0 <= i <= inf
>     - w - chi*n^eta*c^sigma    | 0 <= n <= inf
> ```
>
> Note the type of the arbitrage equation (`arbitrage_2` instead of
> `arbitrage`).
>
> However $c_t$ is not a control itself,
>
> > but the controls $i_t, n_t$ can be easily deduced:
>
> ..math:
>
>     n_t = ((1-\alpha) z_t k_t^\alpha m_t/chi)^(1/(eta+\alpha))
>     i_t = z_t k_t^\alpha n_t^(1-\alpha) - (m_t)^(-1/\sigma)
>
> This translates into the following YAML code:
>
> ``` {.sourceCode .yaml}
> equations:
>     - n = ((1-alpha)*a*k^alpha*m/chi)^(1/(eta+alpha))
>     - i = z*k^alpha*n^(1-alpha) - m^(-1/sigma)
> ```

#### Direct response function

    - name: `direct_response`
    - short name: `d`

In some simple cases, there a function $d()$ giving an explicit
definition of the controls:

$$x_t = d(m_t, s_t, z_t)$$

Compared to the preceding Euler equation, this formulation saves
computational time by removing the need to solve a nonlinear system to
recover the controls implicitly defined by the Euler equation.

gha_language: Julia

gha_license_id: NOASSERTION


text:
CHANGELOG
=========

0.4.1 (2019-04-03)
------------------

- Fix 0.4.0 changelog
- Fix package python version compatibility advertising
- Make wheels for python 3 only

0.4.0 (2019-03-20)
------------------

- Added vault dump-config
- Added vault bootstrap-env
- API break : `client.get_all(paths)` becomes `client.get_all_secrets(*paths)`
- Added vault delete-all
- Added context manager interface for lib usage
- Drop official support for python 2.7
- Drop unofficial support for python 3.5 (wrongly advertised as supported, see #53)
- Add support for python 3.7

0.3.9
-----

Fix Click to version 7 to avoid env precedence problem

0.3.8
-----

- Added `--ca-bundle` flag to specify location of CA bundle
- Environment variables when using vault_cli as lib
- Return empty list instead of crashing when listing an empty dir

0.3.7
-----

SNI compatibility is built directly into requirement environmental markers

0.3.6
-----

Added sni extras requirements for old OSes (`pip install 'vault-cli[sni]'`)

0.3.5
-----

Add flag --stdin to vault set

0.3.4
-----

- Add Jacques Rott as an author
- Configure vault_cli using environment variables

0.3.3
-----

Add `--config-file` option

0.3.2
-----

Fix locale issue

0.3.1
-----

Redo release

0.3.0
-----

Usable as a library too.

0.2.1
-----

* [BUGFIX] Fix Python 2 compatibility (#20)
* Created this changelog

repository: pombredanne/vault-cli

repo_name: pombredanne/vault-cli


text:
---
title: Pay Money
action: org.openintents.action.PAY_TO
uri: Specifying the receiver of the money
extras:
  -
    name: org.openintents.extra.AMOUNT
    type: float
    var: amount
    sample: 10.00
  -
    name: org.openintents.extra.CURRENCY
    type: String
    var: currency
    sample: USD
  -
    name: android.intent.extra.TEXT
    type: String
    var: message
    sample: invoice 123
output:
---
Intent to pay some one a specified amount of money.

The receiver of the money could be specified by an email address (mailto://) or through content like "content://com.visa/savedreceivers/1", or mime type "text/x-bancAccount" or by additional information of a contact.

gha_language: SCSS


text:
`css-transitioner` is a small footprint React wrapper component that is used to transitioning between different React components. It is designed to work with client side routing to switch between pages.
It all started out when we wanted to add transition to our page routing, instead of switching pages in a flash. However, we couldn't find an easy way to make `react-transition-group` to work with `redux-little-router`.
We had to build a custom component to make it work and ended up with a little library to perform transition using css.

Check out a simple [DEMO](https://alanocoder.github.io/demos/css-transitioner/) in action. [Demo code](https://github.com/alanocoder/demos/tree/master/css-transitioner) is hosted at github.

# Install:
```
npm install --save css-transitioner
```
# Dependencies:
There is no dependencies other than React and React-dom.
# Usage:
```
<Transitioner active={true} transitionStyle='fade-in-out'><YourComponent /></Transitioner>
```
**active**: show the component when set to true, and hide the component when set to false

**transitionStyle**: css class name to be used for the transition. You can have different style for showing and hiding.

**sample css definitions**:
```
.appeared {
    position: relative;
    left: 0;
    width: 100%;
}

.disappeared {
    position: absolute;
    opacity: 0;
}

.fade-in-out {
    position: absolute;
    width: 100%;
    transition: opacity .3s ease-out;
}

.fade-in-out.appearing {
    opacity: 1;
}

.fade-in-out.disappearing, .fade-in-out.disappeared {
    opacity: 0;
}
```
There are 4 transition states. Each with a corresponding css class to define the desire transition effect:

**appeared**: when the transition is completed and the component is shown.

**disappeared**: when the transition is completed and the component is hidden.

**appearing**: when the component becomes active and transitions from state '**disappeared**' to '**appeared**'.

**disappearing**: when the component becomes inactive and transitions from state '**appeared**' to '**disappeared**'.

There are several transition examples (zoom in/out, fade in/out, slide in/out) can be found at [Transitions.css](https://alanocoder.github.io/demos/css-transitioner/Transitions.css).
# How it works with multiple route pages:
```
const App = (props: { page: string }) => (
    <div>
        <Transitioner active={props.page === 'HOME'} transitionStyle='fade-in-out'><div>Home page</div></Transitioner>
        <Transitioner active={props.page === 'ABOUT'} transitionStyle='fade-in-out'><div>About page</div></Transitioner>
        <Transitioner active={props.page === 'CONTACT'} transitionStyle='fade-in-out'><div>Contact page</div></Transitioner>
    </div>
);
```
One `Transitioner` per route page (a react component), only 1 is shown (active) at a time. When the property `page` is changed (through link click or route change), the corresponding `Transitioner` will perform the transitions and gracefully switch between different pages.
# Scroll positions:
`Transitioner` remembers scroll positions by default. So yes, it will transition with current scroll position of the page. If you don't want scroll position, add property `ignoreScroll={true}` to `Transitioner`.
# Does it work with TransitionGroup from react-transition-group?
Yes. While `Transitioner` does not make use of `CssTransition`, with `Transitioner_TG` (a simple wrapper provided), it works with `TransitionGroup`:
```
const Pages = {
  HOME: <div>Home page</div>,
  ABOUT: <div>About page</div>,
  CONTACT: <div>Contact page</div>
};

const App = (props: { page: string }) => (
  <TransitionGroup component={null}>
    <Transitioner_TG key={props.page} id={props.page} transitionStyle='fade-in-out'>{Pages[props.page]}</Transitioner_TG>
  </TransitionGroup>
);
```
Note that property `id` is required if scroll positions are maintained.

repository: alanocoder/css-transitioner

repo_name: alanocoder/css-transitioner


text:
# # BulkCreateKeywordRequest

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**requests** | [**\TNT\Ebay\Sell\Marketing\V1\Model\CreateKeywordRequest[]**](CreateKeywordRequest.md) | This array is used to pass in multiple keywords for one or more ad groups that belong to a campaign that uses the Cost Per Click (CPC) funding model. Up to {max value} keywords can be created with one call. | [optional]

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


text:
# Monotone

Gem to generate increasing numbers. Numbers are stored on the local filesystem, in ~/.monotone.
Also includes a CLI. I use it for generating BUILD_NUMBER-like numbers outside of the context of Jenkins jobs.

## Installation

Add this line to your application's Gemfile:

    gem 'monotone'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install monotone

## Usage
### Ruby
```ruby
require 'monotone'
Monotone.next 'key'     # Returns 0
Monotone.next 'key'     # Returns 1
Monotone.set  'key', 0  # Returns 0
Monotone.next 'key'     # Returns 1
```

### CLI
```bash
monotone next key    # Prints 0
monotone next key    # Prints 1
monotone set  key 0  # Prints 0
monotone next key    # Prints 1
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
Consider the network for car diagnosis shown in
Figure car-starts-figure
.

1.  Extend the network with the Boolean variables ${IcyWeather}$ and
    ${StarterMotor}$.

2.  Give reasonable conditional probability tables for all the nodes.

3.  How many independent values are contained in the joint probability
    distribution for eight Boolean nodes, assuming that no conditional
    independence relations are known to hold among them?

4.  How many independent probability values do your network tables
    contain?

5.  The conditional distribution for ${Starts}$ could be described as
    a noisy-AND distribution. Define this
    family in general and relate it to the noisy-OR distribution.

gha_language: HTML


text:
---
layout: engineering-education
status: publish
published: true
url: /how-crypto-mining-works/
title: How Does Cryptocurrency Mining Work?
description: This article will talk about what cryptocurrency mining is and how it works. Mining can be thought of as the “processor” for transactions on the blockchain.
author: gregory-manley
date: 2020-11-19T00:00:00-13:00
topics: [Blockchain]
excerpt_separator: <!--more-->
images:

  - url: /engineering-education/how-crypto-mining-works/hero.jpg
    alt: cryptocurrency Mining example image
---
It is hard to talk about cryptocurrency without mentioning mining. Mining cryptocurrency is a complex mathematical system, generally utilizing cryptographic hashing algorithms. Since hashing is extremely complicated, we will only be looking at what is hashed in the mining process. For this article, we will examine Bitcoin mining at a high level.
<!--more-->
Before continuing, be sure to be familiar with:

- What is a [blockchain](https://www.investopedia.com/terms/b/blockchain.asp)?

### What does mining do for a cryptocurrency?
Mining can be thought of as the “processor” for transactions on the blockchain. [Bitcoin.org](https://bitcoin.org/en/how-it-works) describes the process of mining as “a distributed consensus system that is used to confirm pending transactions by including them in the block chain”. Transactions are packaged into a block and then mined. This process of “mining” includes the transactions and verifies them in the chain. By continuing to mine, these transactions are confirmed and become nearly unmodifiable by attacks on the chain.

In Bitcoin, every block is connected, as the previous block hash is used to generate a new block. If a hacker wanted to modify or “double-spend” they would need to modify the previous block and rehash it before they find the next block or it becomes extremely difficult.

### What does a user get out of mining?
While the chain and the cryptocurrency itself, benefits from users mining, users also benefit. A “miner” receives a reward for their work. This reward is a set amount per block (currently 6.25 coins for Bitcoin) and the fees of transactions that are included in the block.

The distributed mining power of the network also protects the blockchain from attacks. These attacks may include double spending or any other transaction modifying attacks. In order for these attacks to be successful, the attacker would have to rehash the block they want to modify and make the longest valid chain of blocks (highest combined difficulty of the chain of blocks). This not only becomes harder the more blocks added after the attack block, but would likely require 51% of the total hashing power.

### What is proof-of-work?
Bitcoin uses a proof-of-work algorithm. These algorithms provide a computational proof that can be easily checked. Most often, proof of work is implemented using various hashing algorithms with a target value (a hexdecimal number set by the blockchain). In order to successfully mine a block, a miner must generate a hexademical hash that is less than the target value.

With Bitcoin, it adjusts the target value every 2016 blocks (about 2 weeks) in order to try to achieve 10 minute block times. By limiting the rate of blocks through a proof-of-work system, the coin supply is controlled and some attacks become impractical.

### How does Bitcoin mining work?
In the case of mining Bitcoin, transactions are hashed and packaged to be included in a block. They are organized into a Merkle Tree. The following image from [Escape Velocity](https://chrispacia.wordpress.com/2013/09/02/bitcoin-mining-explained-like-youre-five-part-2-mechanics/) shows that transactions are initially hashed and then paired and hashed together. These resulting hashes may be paired again and hashed until it leaves one hash. In this type of tree, the root is called the Merkle Root.

![](/engineering-education/how-crypto-mining-works/merkle-tree.jpg)

[Image Source](https://chrispacia.wordpress.com/2013/09/02/bitcoin-mining-explained-like-youre-five-part-2-mechanics/)

Once this root hash is found, it now attempts the block hash. First, it adds the previous block hash to the Merkle Root. Then a nonce value is added and hashing can begin. The nonce value is a random number that is added in order to generate a different hash when the algorithm is run. To see this in practice, you can run the simple Python program.

```python
import hashlib

#Create string to be hashed
string = 'secret'

#Hash the string 10 times and display the output
for i in range(0,10):
	hash_sha = hashlib.sha256(string.encode()).hexdigest()
	print(hash_sha)
```

---

If you wish to learn more about the specifics of SHA256 hash algorithm, visit [Movable Type Scripts](https://www.movable-type.co.uk/scripts/sha256.html).

---

By running the program, you can see that the hash is the same every time ‘secret’ is hashed. Without the nonce value, the block hash would look similar.

Every time the miner would attempt to create a valid hash, they would just be generating the same value repeatedly. The following Python shows adding a random nonce to the string and hashing.

```python
import hashlib
from random import seed, randint

seed(1)

#Create string to be hashed
string = 'secret'

#Hash the string 10 times with a different nonce added each time, and display the output
for i in range(0,10):
    	#Generate a random nonce and add it to string
        nonce = randint(0,10000)
        string = string + str(nonce)

        hash_sha = hashlib.sha256(string.encode()).hexdigest()
        print(hash_sha)
```

In this simple example, let’s say that the target value is: 0f00000000000000000000000000000000000000000000000000000000000000

And our output from the program may show the following hashes.

![](/engineering-education/how-crypto-mining-works/hashingexampe.PNG)

The second hash: 0e6878e44ef7b460869034d35acd8cfda70330841dd71f24e559b45d01a035fe is less than the target value and would be a valid block.

If the resulting hash is less than the target value, it's valid. It’s then submitted to the network and other nodes check the block. If other nodes accept the block as valid, it’s added to the chain.

The process then starts again and continues repeating.

### Conclusion
In this article we have looked at how Bitcoin mining is completed from a higher level. We discussed how mining can be thought of as the “processor” for transactions on the blockchain. We looked at what a person gets from mining. We also looked at a simple example code snippet.

### Additional Resources

- [How to Build Your Own Private Blockchain](/engineering-education/how-to-build-your-own-private-blockchain/)

- [What is ablockchain](https://www.investopedia.com/terms/b/blockchain.asp)

- [What are transactions](https://en.bitcoin.it/wiki/Transaction)

---
Peer Review Contributions by: [Lalithnarayan C](/engineering-education/authors/lalithnarayan-c/)

repository: mbuguac/engineering-education

repo_name: mbuguac/engineering-education


text:
![][header-image]

[![CircleCI][circleci-image]][circleci-url]
[![NPM version][npm-version]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
![License][license]
![Issues][issues]

`objection-graphql-relay` is a collection of helpers used for combining [Objection][objection] models
with [GraphQL Relay.][graphql-relay]

## Get Started

```sh
npm install --save objection-graphql-relay objection
```

Below is a full-featured example of how to use the helpers in the library. You should
only use the functions you require.

### Setup Models

```js
const { Model } = require('objection')
const { relayModel } = require('objection-graphql-relay')

@relayModel // Or you can use module.exports = relayModel(Card)
class Card extends Model {
  static tableName = 'cards'
  static get relationshipMappings () {
    return {
      tags: {
        relation: Model.ManyToManyRelation,
        modelClass: Tag,
        join: {
          from: 'cards.id',
          to: 'tags.id',
          through: {
            from: 'card_tags.card_id',
            to: 'card_tags.tag_id'
          }
        }
      },
      organization: {
        relation: Model.BelongsToOneRelation,
        modelClass: Organization,
        join: {
          from: 'cards.organization_id',
          to: 'organizations.id'
        }
      }
    }
  }
  paginatedTags (first, after) {
    // Simple many-to-many or has-many relationships.
    return this.pagedRelationQuery('tags', first, after)
  }
  paginatedRelatedCards (first, after) {
    // More complicated deep relationships with an optional filter.
    return this.pagedRelationQuery('tags.cards', first, after, (builder) => {
      // You can leave out this entire argument if you don't need extra filtering.
      if (builder._modelClass.tableName === Card.tableName) {
        builder.where(`${builder._modelClass.tableName}.should_show_related`, true)
      }
    })
  }
}

@relayModel
class Organization extends Model {
  static tableName = 'organizations'
  static get relationshipMappings () {
    return {
      cards: {
        relation: Model.HasManyRelation,
        modelClass: Card,
        join: {
          from: 'organizations.id',
          to: 'cards.organization_id'
        }
      }
    }
  }
}

@relayModel
class Tag extends Model {
  static tableName = 'tags'
  static get relationshipMappings () {
    return {
      cards: {
        relation: Model.ManyToManyRelation,
        modelClass: Card,
        join: {
          from: 'tags.id',
          to: 'cards.id',
          through: {
            from: 'card_tags.tag_id',
            to: 'card_tags.card_id'
          }
        }
      }
    }
  }
}

module.exports = { Card, Tag, Organization }
```

### Setup Helper Functions

cards.js
```js
const getCards = (first, after) => {
  const query = Card.query().limit(first)
    .orderBy('id', 'asc') // Cursors are ID-based currently (will have to support sorting later).
  if (after) {
    return query.offset(after).range()
  } else {
    return query.range() // Adding .range() makes sure the result includes "results" and "total"
  }
}

module.exports = { getCards }
```

### Setup Resolvers

cards_resolver.js
```js
const { idWrapper, connectionWrapper, singleRelationshipWrapper } = require('objection-graphql-relay')
const { cursorToOffset, toGlobalId } = require('graphql-relay')
const { getCards } = require('./cards.js')

module.exports = {
  Query: {
    cards: async (parent, args) => {
      const after = args.after ? cursorToOffset(args.after) : null
      const cards = await getCards(args.first, after)
      return connectionWrapper({ collectionInfo: cards, args })
    }
  },
  Card: {
    id: idWrapper(),
    organization: singleRelationshipWrapper('organization'),
    tags: connectionWrapper('Tags'), // This will call paginatedTags() on the model.
    relatedCards: connectionWrapper('RelatedCards') // This will call paginatedRelatedCards() on the model.
  }
}
```

## API Reference

### `relayModel(ModelClass): ModelClass`

This is a decorator function that attaches the proper QueryBuilder to the passed
model class and adds the `pagedRelationQuery()` helper method. It returns the same
class with the prototype and static properties modified.

### `idWrapper(modelName): function`

Returns a resolver that automatically generates an ID for the parent model, using
the class name as the type. Alternatively, if the parent is not a model, you can
pass in the model name as the first argument.

### `fromGlobalId(modelName, globalId): string`

Verifies that the GraphQL ID (globalId) is of the type `modelName` and returns the
`modelName`-specific ID. Throws an error if `globalId` is not of the type `modelName`

This function is useful for grabbing arguments on inputs where you must reference
other nodes. It handles parsing the ID and verifying that it is the class you're expecting.

### `pagedRelationQuery(instance, field, first, after, [extraFilter, orderBy]): Promise<object>`

_The `pagedRelationQuery()` method on the Model has the same definition minus the first argument._

Loads the `field` relationship on the passed model instance (or the current model instance if
using the model method), limiting based on the `first` and `after` arguments. Optionally filters
with the `extraFilter` argument (which is an Objection relationship filter), and ordering by
the `orderBy` filter (which is also an Objection relationship filter).

`field` can have one of two types of values:

- `relationship` (example: `tags`) - This fetches the single-depth relationship. In this case,
    the current model has multiple tags related to it. This will fetch all of those tags and
    support pagination.
- `relationship.otherRelationship` (example: `tags.cards`) - This fetches the multi-depth
    relationship. In this case, the current model has multiple tags related to it, and those
    tags relate to other `cards` (assuming the current model is a `card`). This will fetch
    all unique `cards` (that are not the current `card`) related through their common `tags`.

## Other Questions

### Overriding QueryBuilder

If you have to override the QueryBuilder, make sure you extend it from the QueryBuilder
exported from this module.

### What is going on inside `pagedRelationQuery()`?

This is a rather complicated method, but the purpose of it is to help resolve
relationships in models. It's used if you have a many-to-many, belongs-to-many,
or has-many relationship defined on the model. If you're interested in resolving
relationships for a single-model relationship, you'll want to use the
`singleRelationshipWrapper()` function instead. With that said, here we go with
the explanation:

For this example, let's say we have a "tag" model and a "card" model, and they are
related through a many-to-many relationship. In the example, we are trying to find
all other cards that are related to the current card through the same tags (so the
relationship path would be `tags.cards` because we want all the cards related to
the tags that are related to the current card).

To start with, we'll explain this line:

```js
const results = field.split('.').reduce(...)
```

This section is responsible for gathering all of the second+-level relationships
and flattening them into a single array, also reducing duplicates. We start by
splitting the field (so maybe something like "tags.cards" to find all other cards
with at least one common tag with the current card) into segments. So we end up with
`["tags", "card"]`, and then we reduce with those segments starting with the initial
result object inside an array.

Then, inside the `reduce()`, we process each of the relationships for the current item,
flatten the results, and remove duplicates. In the case of the example above, result
contains a key called "tags" (since result is a card in this example). So segment is
currently "tags" and finalResult is currently `[result]`.

We loop through each item in finalResult and pull out the "tags" array, and then flatten
to remove duplicates.

In the second iteration of this function, finalResult is equal to all of the tags in the
original result (the original card), and segment is equal to "cards."

So we loop through each tag, and pull out the "cards" inside each tag. Then we flatten
all of them into a single array, and then remove duplicates based on the ID.

Once that's done, that'll be the final iteration of our example and we'll end up with a flat
array of unique cards that are related to the current card through the tags the current card
is associated with.

[header-image]: https://raw.githubusercontent.com/sammarks/art/master/objection-graphql-relay/header.jpg
[circleci-image]: https://img.shields.io/circleci/project/github/sammarks/objection-graphql-relay.svg
[circleci-url]: https://circleci.com/gh/sammarks/objection-graphql-relay/tree/master
[npm-version]: https://img.shields.io/npm/v/objection-graphql-relay.svg
[npm-downloads]: https://img.shields.io/npm/dm/objection-graphql-relay.svg
[npm-url]: https://www.npmjs.com/package/objection-graphql-relay
[license]: https://img.shields.io/github/license/sammarks/objection-graphql-relay.svg
[issues]: https://img.shields.io/github/issues/sammarks/objection-graphql-relay.svg
[objection]: https://www.npmjs.com/package/objection
[graphql-relay]: https://www.npmjs.com/package/graphql-relay

repository: sammarks/objection-graphql-relay

repo_name: sammarks/objection-graphql-relay


text:
# SANTO

System to gather data for ontology-driven **S**lot filling tasks with a web-based **AN**notation **TO**ol.

## Description

Supervised machine learning algorithms require training data whose generation for complex relation extraction tasks tends to be difficult. Being optimized for relation extraction at sentence level, many annotation tools lack in facilitating the annotation of relational structures that are widely spread across the text. This leads to non-intuitive and cumbersome visualizations, making the annotation process unnecessarily time-consuming. We propose SANTO, an easy-to-use, domain-adaptive annotation tool specialized for complex slot filling tasks which may involve problems of cardinality and referential grounding. The web-based architecture enables fast and clearly structured annotation for multiple users in parallel. Relational structures are formulated as templates following the conceptualization of an underlying ontology. Further, import and export procedures of standard formats enable interoperability with external sources and tools.

![slotfilling mode](examples/screenshot.png "Screenshot of the SANTO system in slot filling mode")

## Citation

If you use this project please cite
> Hartung M, ter Horst H, Grimm F, Diekmann T, Klinger R, Cimiano P (In Press)
> In: Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (System Demonstrations). Association for Computational Linguistics.
available at https://pub.uni-bielefeld.de/publication/2919923

## Online Demo

A demo instance that is routinely reset is available at http://psink.techfak.uni-bielefeld.de/santo/

## Requirements

- Apache >= 2.4
- PHP 5.6
- MySQL / MariaDB 5.5

## Installation

### System setup

1. Clone this repository into your web root.
    ```bash
     git clone https://github.com/ag-sc/SANTO.git
    ```
    Alternatively, you can also download a zipped version  of the repository and unzip it in your webservers root directory.
    ```bash
    wget https://github.com/ag-sc/SANTO/archive/master.zip
    unzip master.zip -d SANTO/
    ```
2. Create a MySQL database and user for the project.
    ```bash
    mysql -u<user> -p
    ```
    ```sql
    CREATE DATABASE anno;
    ```
    Please ensure to create a user with access privileges to the newly created database.
    Test your login at https://serveruri/
3. Import schema.sql into the database you created induring step 2.
    ```bash
    mysql -u<user> -p <database name> < schema.sql
    ```
4. Adjust config/annodb.config and provide connection details (hostname, username, password, schema (= database name))  for your installation.
    ```
    [database]
    host=localhost
    user=anno_username
    password=anno_password
    schema=anno
    ```
### Adding users and ontology data
5. In the repository root, create an admin user (replace admin by a username and secret by a password):
    ```bash
    php php/cli_createuser.php admin secret 1
    ```
    The "1" indicates that the created user should be granted curator privileges.
6. For the slot filling functionality to be more useful, you need to specify which groups of ontology classes should be visible on the right hand side. For this, create a file called `groups.txt` in which you specify (tab-delimited, see file [examples/groups.csv](examples/groups.csv)): (internal) group name, the heading of the section in the UI, the name of the Class and a numeric order (1-N) in which the sections will be rendered.
    ```Person Persons Person 1
    Country Countries Country 2
    ```
    The above would generate two sections of persons and country objects with the respective plural form as their heading.
7. Upload your ontology descriptor files (see [examples/](examples/) folder) under https://serveruri/Upload.html
    The descriptor files, containing tab-separated fields are:
    * **[examples/dbpedia_2014_classes.csv](classes.csv)** Classname, "true"/"false", Description, where the boolean indicates whether or not the class describes individual names
    * **[examples/dbpedia_2014_subclasses.csv](subclasses.csv)** Superclass, Subclass
    * **[examples/dbpedia_2014_relations.csv](relations.csv)** domainClass, relation, rangeClass, from ("1", "m"), to ("1", "m"), isDataTypeProperty ("true", "false"), mergedName, description
    * **groups.csv** from step 6.

    Several notes here:
    * Please be aware that this drops all existing data, we will likely provide a more convenient upgrade mechanism in the future.
    * Since there is quite a mismatch between ontologies and what annotators are actually required to utilize, you currently have to provide those files manually. We are working on an addon that let's you pick and choose which parts of an ontology file you want to import.

    The configuration also let's you configure URI prefixes for the triples in the RDF and annotation export files (examples are for dbpedia URIs).
### Adding your (pre-annotated) corpus
8. Import a zipped dataset (tokenized publication + annotations). The bulk import script will automatically assign users to their respective publications. Filenames follow the scheme `PublicationName_username.extension`, where extension is `csv` for tokenizations and `annodb`for pre-existing annotations (see example files).
    ```bash
    php php/cli_import.php /path/to/importfile.zip
    ```

    The import script automatically maps tokenized publications and their annotations to existing users by following the naming convention: `<Publication Name>_<Username>.<Extension>`. Make sure to add users beforehand (see step 5). Note that existing annotations must match class names as defined in the ontology.

## Acknowledgements

This work has been funded by the Federal Ministry of Education and Research (BMBF, Germany) in the PSINK project (grant 031L0028A).

## License

See the LICENSE file in the root directory of this repository.

repository: floatSDSDS/SANTO

repo_name: floatSDSDS/SANTO


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

Cachediff is a tool to study the effect of cache performance between two versions (differing from each other by a small diff/delta) of the same C/C++ program.
This is useful to students, educationist and professionals. Cachediff presents to the user a localized and global view of the cache and its statistics. It uses cache simulation based on instruction/memory tracing during execution. It can be extended to support n-versions of the same program.

##Usage
```
python cachediff.py program1.c program2.c input1.c input2.c
```
To run the test-suite

```
nosetests
```

##Example output
![Sample Cachediff output](http://i.imgur.com/BmHT8sV.png)

##Requirements
* [Intel Pin](https://software.intel.com/en-us/articles/pin-a-binary-instrumentation-tool-downloads)
```
export PIN=/path/to/pin/folder
```
* [DineroIV](http://pages.cs.wisc.edu/~markhill/DineroIV/)
```
export DINERO=/path/to/dinero/folder
```
* [Disable ASLR](http://askubuntu.com/questions/318315/how-can-i-temporarily-disable-aslr-address-space-layout-randomization)(Dont forget to revert once done, this is a **SECURITY HAZARD**)

repository: chubbymaggie/cachediff

repo_name: chubbymaggie/cachediff


text:
# Statseeker - Network Weathermap Integration

This project provides the files needed to use Network Weathermap to display interface utilization data from Statseeker.

## Prerequisites

* A Statseeker v5.2, or later, server
* A Network Weathermap server (cannot be installed on the Statseeker server), see https://network-weathermap.com/ for links to download packages and instructions on installation, and basic configuration of Network Weathermap for your environment.

## Installing

1. Extract the package to a directory on the Weathermap server
E.g. `/home/user1/ss-wm`

## Configuration
There are 4 files to be edited:

* etc/ss-wm.cfg
* bin/ss-wm.sh
* bin/ss-wm-api.php
* lib/WeatherMapDataSource_statseeker.php

### ss-wm.cfg

Parameter | Value
---- | ----|
WEATHERMAP_BIN | Path to the Weathermap binary. E.g. ```/var/www/html/weathermap/weathermap```.
WEATHERMAP_CONF|Path to the Weathermap configuration file, this is created when you build your weathermap using the editor.php. E.g. ```/var/www/html/configs/statseeker.conf```.
WEATHERMAP_HTML|Path, relative to the weathermap binary, to the Weathermap html file. E.g. ```index.html```.
WEATHERMAP_IMG|Path, relative to the weathermap binary, to the Weathermap image (this is the image displayed when viewing your weathermap). E.g. ```statseeker.png```.
TMP_DIR|Path for temporary storage of graphs during processing. E.g. ```/tmp/statseeker/``` **Note:** the contents of this folder will be edited by the web server agent, typically this is *"www-data"*. For this to occur, the TMP_DIR directory permissions may need to be updated to assign ownership of the directory to this user agent, and to assign read/write access to the folder and its files to this user agent.
WEB_DIR | Root of the web tree where the weathermap exists. E.g. ```/var/www/html/weathermap```.
GRAPH_DIR | Final location of the popup graphs. E.g. ```/var/www/html/weathermap/graph```.
INSTALL_DIR | Directory where your ss-wm package is installed. E.g. ```/home/user1/ss-wm```.
USERNAME | The Statseeker user account employed to collect the data for the weathermap. The associated password will be kept in clear text in the config file so we suggest that you create a Statseeker user account specifically for this purpose. **Note:** ensure that the user account has access to the interfaces that will be used to populate the weathermap.
PASSWORD | Password of the Statseeker user account employed to collect the data for the weathermap.
GROUP | Statseeker group name. **Note:** to ensure the best performance, restrict the group contents to only contain those interfaces that are to be used to populate the weathermap.
STATSEEKER | Hostname or IP address of the Statseeker server.
URL | URL of the **Interfaces -> Top Utilization Graphs** report. To get this, run the report from Statseeker, and copy the URL.

E.g.:
```
WEATHERMAP_BIN="/var/www/html/weathermap/weathermap"
WEATHERMAP_CONF="/var/www/html/weathermap/configs/statseeker.conf"
WEATHERMAP_HTML="/var/www/html/weathermap/index.html"
WEATHERMAP_IMG="statseeker.png"
TMP_DIR="/tmp/statseeker"
WEB_DIR="/var/www/html"
GRAPH_DIR="/var/www/html/weathermap/graph"
INSTALL_DIR="/home/user1/ss_wm"
USERNAME=weathermap_user
PASSWORD=password123
GROUP=Weathermap-Interfaces
STATSEEKER="<IP_ADDRESS>"
URL="http://<IP_ADDRESS>/cgi/nimc02?rid=48377&sort=&report=77&group=36471&tfc_fav=&year=&month=&day=&hour=&minute=&duration=&wday_from=&wday_to=&time_from=&time_to=&tz=Australia%2FBrisbane&tfc=&regex=&top_n=400&group_selector=geto"
```

### ss-wm.sh
1. Set the CONFIG_FILE option to the path to your ss-wm.cfg file
2. E.g. ```CONFIG="/home/user1/ss-wm/ss-wm.cfg```

### ss-wm-api.php
1. Set the CONFIG_FILE option to the path to your ss-wm.cfg file
E.g. ```CONFIG="/home/user1/ss-wm/ss-wm.cfg```

### lib/WeatherMapDataSource_statseeker.php
1. Set the CONFIG_FILE option to the path to your ss-wm.cfg file
E.g. ```CONFIG="/home/user1/ss-wm/ss-wm.cfg```

2. Copy the file "lib/WeatherMapDataSource_statseeker.php" to the weathermap data-sources directory.
E.g. `cp lib/WeatherMapDataSource_statseeker.php /var/www/html/weathermap/lib/datasources/`

## Network Weathermap Configuration
The bulk of the weathermap configuration is exactly the same as standard weathermap, you can either edit the config files directly or use the graphical, **http://your.weathermap.server/editor.php**
Once the Statseeker to Weathermap integration is installed, a new **datasource** with the name of **"statseeker"** will be available.

Follow the Network Weathermap documentation with regard to configuring your weathermap via either the GUI, or directly editing the relevant configuration file.

## Link Configuration
A particular syntax must be used when specifying the links between nodes:
**DataSource:Device:ifName:DataType**

Parameter | Description
---| ---
DataSource | Name of the Data Source, must be set to **statseeker**.
Device |	The device name as it appears in Statseeker.
ifName | Interface name of the port. Visible in Statseeker via the **Interface -> Details** report, **Interface Name** column.
DataType |	Must be set to **Bps** (bits per second).
E.g. `statseeker:NewYork-swt1:Gi1/10:Bps`.

##### Editing the Config File
When directly editing the config file, the link between nodes is defined by the **TARGET** line.
##### Using the GUI Editor (editor.php)
The link between nodes refers uses the  **Data Source** field.

#### Bandwidth
Be sure to set the correct interface speed in the **BANDWIDTH** field, e.g. `BANDWIDTH 1000M`
#### Popup Graphs
You can optionally configure popup graphs to be displayed when the mouse hovers over a link between nodes.
**http://weathermap.server.url/GRAPH_DIR/DEVICE.PORT.png**
Parameter | Description
---| ---
http://weathermap.server.url | IP or Hostname of the Weathermap server.
GRAPH_DIR | The path within the Weathermap directory to where the graph will be found. E.g. GRAPH_DIR from *ss-wm.cfg*, without the WEB_DIR prefix.
DEVICE | Statseeker device name.
PORT | Statseeker ifName of the port. Forward-slash characters (*/*) must be replaced with dash characters (*-*), e.g. `Gi1/10` becomes `Gi1-10`.
E.g. `http://<IP_ADDRESS>/graph/NewYork-swt1.Gi1-10.png`.
##### Editing the Config File
When directly editing the config file, the link between nodes is defined by the **OVERLIBGRAPH** line.
##### Using the GUI Editor (editor.php)
The link between nodes refers uses the  **'Hover' Graph URL** field.

##### Sample Config File Link Entry
LINK node06633-node08576
	OVERLIBGRAPH http://<IP_ADDRESS>/graph/Brisbane-rtr.Gi0-2.png
	TARGET statseeker:Brisbane-rtr:Gi0/2:Bps
	NODES node06633 node08576
	BANDWIDTH 1000M

## Test
While configuring Weathermap, you can run a test to confirm that data/graphs are appearing as expected.
1. Change to your Weathermap server web directory.
E.g. `# cd /var/www/html/weathermap`
2. Manually run the ss-wm.sh script as the *www-data* user with
`#sudo -u www-data {INSTALL_DIR}/ss-wm.sh`
E.g. `#sudo -u www-data /home/user1/ss-wm/ss-wm.sh`

This script will attempt to:
- access the specified Statseeker group and collect ID's of each member
- use this information to retrieve:
-- link utilization data
-- graphs for mouse-over events and copy these graphs to a temporary directory
- move the retrieved graphs to the specified graph directory on the web-server (e.g. `/var/www/html/weathermap/graph`)
- create the html page for viewing the weathermap, as specified by the settings in *ss-wm.cfg*

Any errors encountered will be displayed in the CLI.

## Crontab
For the map and graphs to stay current by periodically retrieving up-to-date data, an entry must be placed in the weathermap servers crontab.
- Edit cron with the following command as the root user, where <username> is the user that the web server runs as (typically www-data)
`crontab -u <username> -e`
- Set the contents of the cron to
`*/5 * * * * <path_to_ss-wm.sh> > /dev/null 2>&1`
E.g. `*/5 * * * * home/user1/ss-wm/ss-wm.sh > /dev/null 2>&1`

## Version History

## Authors

Developed by Statseeker.

## License
Copyright (c) 2017 Statseeker

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

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

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

## Acknowledgments

We'd like to acknowledge the effort of those responsible for developing, and maintaining, Network Weathermap.

repository: statseeker/php-weathermap-statseeker

repo_name: statseeker/php-weathermap-statseeker


text:
# grkstyle 0.2.1

* Added `grk_reindent_auto_pkg()` function, which I messed when adding the auto
  re-indentation functions.

# grkstyle 0.2.0

* `grk_style_*()` text, file, directory and package styling functions will now
  follow the tabs or spaces settings from the RStudio project file. You can
  choose this setting in the Code Editing panel of the Project Options settings.

* Added `grk_reindent_auto_*()` to automatically re-indent text, file,
  directory or package code according to the RStudio project file setting (or
  the `grkstyle.use_tabs` global R option).

# grkstyle 0.1.1

* Added `grk_reindent_tabs_*()` and `grk_reindent_spaces_*()` helper functions
  that re-indent text, files, directories or packages using tabs or spaces. The
  output uses the option in the function name: `grk_reindent_tabs_pkg()` will
  re-indent package code using a single tab for indentation.

# grkstyle 0.1.0

* Tabs are now preferred by default over spaces (#7).

repository: tjmahr/grkstyle

repo_name: tjmahr/grkstyle


text:
# covid_19_python

## Ploting and analyzing covid-19 ontario data.

## Output
![alt text](https://raw.githubusercontent.com/kanulp/covid_19_python/master/chart.png)

## Code
```python

import pandas as pd
import matplotlib.pyplot as plt
import geopandas

link = "https://data.ontario.ca/dataset/f4112442-bdc8-45d2-be3c-12efae72fb27/resource/455fd63b-603d-4608-8216-7d8647f43350/download/conposcovidloc.csv"
data = pd.read_csv(link)

world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))

ax = world[world.continent == 'Canada'].plot(
    color='white', edgecolor='black')

gdf = geopandas.GeoDataFrame(
    data, geometry=geopandas.points_from_xy(data['Reporting_PHU_Longitude'], data['Reporting_PHU_Latitude']))
gdf.plot(ax=ax, color='red')

plt.show()

```

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install some libraries.

```bash
pip install pandas
pip install geopandas
```
Run Python Covid.py

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

Please make sure to update tests as appropriate.

## License
MIT License

Copyright (c) [2020] [Karan Gajjar]

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

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

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


text:
# README for McsUsbNet.dll

This repository contains the `McsUsbNet.dll` for accessing MCS devices directly, as well as documentation and examples.

It does not contain any support for reading and writing specific MCS file formats like the `MSRD` file format of [Multi Channel Experimenter](https://www.multichannelsystems.com/software/multi-channel-experimenter), the `MCD` file format of [MC_Rack](https://www.multichannelsystems.com/software/mc-rack) or the `STM` file format of [MC_Stimulus II](https://www.multichannelsystems.com/software/mc-stimulus-ii).

## Repository Structure
- 32-Bit and 64-Bit binaries of the `McsUsbNet.dll` can be found in the `\McsUsbNet\x86` and  `\McsUsbNet\x64` folders, respectively.

> Please note that you need to have **.NET Framework 4.7.2** and **Microsoft Visual C++ Redistributable for Visual Studio 2019** installed to interact with the dll.

> Please note as well: If you download this repository as a .zip archive, GitHub doesn't include the McsUsbNet submodule. Please download the [McsUsbNet](https://github.com/multichannelsystems/McsUsbNet) repository as well and copy its contents into the McsUsbNet_Examples/McsUsbNet folder.

- Documentation for the McsUsbNet API is located in the `\McsUsbNet\docu` folder.

> Please note : The dll comes with an xml file `McsUsbNet.xml`, that allows, for example in Visual Studio, to have a **code completion**. We regard this a **part of the documentation** and you should use a tool that allows for code completion at least in parallel to you actual target development system.

- Usage examples for the `McsUsbNet.dll` in C#, Python and Matlab are located in the `\Examples\CSharp`, `\Examples\Python` and `\Examples\Matlab` folders, respectively.

## Example Code

### C#

> All example projects require **.NET 4.7.2** or later.

| Folder | Purpose |
|--------|---------|
| `\Examples\CSharp\MEA_Recording` | Data acquisition from MEA devices |
| `\Examples\CSharp\MEA2100_Stimulation` | Stimulation for the MEA2100 device platform |
| `\Examples\CSharp\STG_Stimulation` | Stimulation for [STG](https://www.multichannelsystems.com/products/stimulus-generators) devices |

### Python

> All examples require **.NET 4.7.2** or later.
> Tested with Python 3, use `pip install pythonnet`

| File | Purpose |
|--------|---------|
| `\Examples\Python\Recording.py` | Data acquisition from MEA devices |
| `\Examples\Python\Stimulation.py` | Stimulation for [STG](https://www.multichannelsystems.com/products/stimulus-generators) devices |
| `\Examples\Python\DeviceList.py` | Enumerate MCS devices |

### Matlab

> All examples require **.NET 4.7.2** or later. Tested on Matlab 2019b.

| Folder | Purpose |
|--------|---------|
| `\Examples\Matlab\MEA_Recording` | Data acquisition from MEA devices |
| `\Examples\Matlab\MEA2100_Stimulation` | Stimulation for the MEA2100 device platform |
| `\Examples\Matlab\STG_Stimulation` | Stimulation for [STG](https://www.multichannelsystems.com/products/stimulus-generators) devices |


text:
---
title: PWA with Typescript
desc: How to use Typescript with Quasar PWA
---

In order to support PWA with Typescript, you will need to:

1. Make sure that you are using `@quasar/app` v3.0.0-beta.8+
2. Edit quasar.conf.js > supportTS. Set it to `true` or use the Object form.
3. Rename the extension for your files in /src-pwa from `.js` to `.ts` and make the necessary TS code changes.

More info: [Supporting TS](/quasar-cli/supporting-ts)

branch_name: refs/heads/dev