text:
#LazyProperty [![Build Status](https://travis-ci.org/nicolasgoutaland/LazyProperty.png?branch=master)](https://travis-ci.org/nicolasgoutaland/LazyProperty)

One line lazy property definition, with auto triggering, custom selectors

ARC only, Xcode 4.4 minimum (For auto synthesized properties)

##Description
Dealing with lazy properties can be cumbersome sometimes, copy/pasting same code again and again.

This code can be disturbing when reading source file.

Sometimes, you have to execute some code on property initialisation.

More information on lazy instantiation [on Wikipedia](http://en.wikipedia.org/wiki/Lazy_instantiation)

##Usage
* Declare a __strong nonatomic property__ for an __object type__
  * @property (nonatomic, strong)
* Add one of these macros at the end of your file with property name, before end of class implementation __@end__
  * LAZY_PROPERTY(propertyName)
  * LAZY_PROPERTY_CUSTOM_SELECTOR(propertyName, @selector(customSelectorName:), @[@"parameter"])
* Optionally declare autotriggered methods. Auto triggered methods are named after property name, camelcase style, prefixed by __configure__
  * - (void)configurePropertyName ...
* Triggered method can take an optional parameter, that is the object parameter of LAZY_PROPERTY_CUSTOM_SELECTOR macro.
  * - (void)configurePropertyName:(MyParameter *)aParameter ...

##Example
_RootViewController.m_

    @interface DemoViewController ()
    ...

    // Lazy properties
    @property (nonatomic, strong) SimpleViewController *simpleViewController; // Will be used modally
    @property (nonatomic, strong) DetailViewController *detailViewController; // Will be pushed from tableview
    @end

    @implementation DemoViewController
    ...

    #pragma mark - UITableViewDelegate methods
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
        // No need to worry about detail view controller instantiation. It will be created at first call
        // This allows you to keep your code super clear
        [self.navigationController pushViewController:self.detailViewController
                                             animated:YES];
    }

    #pragma mark - UIActions
    - (IBAction)showModal:(id)sender
    {
        // No need to worry about view controller instantiation here too. It will be created at first call
        // First configuration was moved to a dedicated method, auto triggered on object creation
        [self presentViewController:self.simpleViewController
                           animated:YES
                         completion:nil];
    }

    #pragma mark - Configuration methods
    // This method will be autotriggered when simpleViewController will be instantiated
    - (void)configureSimpleViewController
    {
        // This methods will be called only once, so you can perform initial configuration here
        _simpleViewController.backgroundColor = [UIColor redcolor];
    }

    // Magic happens here. Write macros at the end of the file, to keep it clean. Use property name
    LAZY_PROPERTY(simpleViewController);
    LAZY_PROPERTY(detailViewController);
    @end

You will find more examples in provided sample, such as using custom selector.

##Use case
* View controller to be presented modally
* View controller to be pushed after selecting a row in a table view, to display a detail
* UserInfo NSMutableDictionary associated to a class
* MoviePlayer used in a detail view controller, needing customisation when initialised
* To infinity and beyond

Let me know if you have some other use cases

##Advantages
* Type less, do more
* Reduce amount of typed code
* Be focused on logic / business code instead of memory management
* Split configuration code from workflow
* Perform fastidious initialisation in less lines of code
* Reduce memory footprint, by not allocating unused objects

##Consideration
* Be careful, especially with UI Object, because initialisation will be on calling thread
* Generated ivar will remain __nil__ until property is accessed once
* You can directly access to generated __ivar__ (_propertyName), without triggering initialisation
* __init__ constructor is used by default
* Don't add @synthesize on your code
* Don't declare ivar

##Limitations
Only __strong__ properties are supported. Lazy __weak__ properties may instantiate a new instance at each call.
__atomic__ properties are not supported. When overriding __atomic__ properties, you have to override getter and setter.
Using LazyProperty on an atomic property will result in compiler a warning message.

##Installation
__CocoaPods__: `pod 'LazyProperty'`

__Manual__: Copy the __Classes__ folder in your project

Import header in your project. .pch is a good place ;)

    #import "LazyProperty.h"

##Versions
1.0 : Initial release

1.1 : Added some tests, triggered method can have a parameter, removed __@synchronized__ from generated getter

##Team
Nicolas Goutaland

repository: nicolasgoutaland/LazyProperty

gha_language: Objective-C

repo_name: nicolasgoutaland/LazyProperty


text:
# Unsupervised Feature Learning for Point Cloud by Contrasting and Clustering With Graph Convolutional Neural Network
We propose an unsupervised learning approach to learn features from unlabeled point cloud "3D object" dataset by using part contrasting and object clustering with deep graph neural networks (GNNs).

This paper is accepted by [3DV](http://3dv19.gel.ulaval.ca) 2019. [[Paper]](https://arxiv.org/abs/1904.12359)

The short version for this paper is accepted by [CVPRW](https://scene-understanding.com) 2019.  [[Short Version Paper]](https://scene-understanding.com/papers/ContrastNet_CVPRW.pdf)

## Pipeline
To learn features from unlabeled point cloud data, we propose to learn features by training networks to accomplish both of the part contrasting and the object clustering pretext tasks. The pipeline of our framework is illustrated in the Figure, which includes three major steps: ContrastNet for part contrast learning, clustering using the learned features, and then ClusterNet for object cluster learning using the cluster IDs.

<img src='./misc/pipeline.jpg' width=800>

## Requirements
* [TensorFlow](https://www.tensorflow.org/), Matlab

## Process Data

- For ModelNet40,  run script `gen_modelnet40_cut2_hdf5.m` using Matlab.

- For ShapeNet,  run script `gen_shapenet_cut2_hdf5.m`  using Matlab.
- Then run script `gen_filesnames.m`  using Matlab. Need to change the files path in gen_filesnames.m  file to the corresponding name of datasets.

## ContrastNet
* Run the training script:
``` bash
python train_contrastnet.py
```
* Run the evaluating script after training finished:
```
python evaluate.py
```

* Run the extracting script after training finished (uncomment the ContrastNet model):
``` bash
python extract_training_feat.py

python extract_testing_feat.py
```

- Run the classifier script after extracting finished:

```
python SVM.py
```

## ClusterNet

- Run the clustering script (for sure the train_feature.txt file in current pathway):

```
Python KMeans.py
```

- Run the training script:

```bash
python train_clusternet.py
```

- Run the extracting script after training finished (uncomment the ClusterNet model):

```bash
python extract_training_feat.py

python extract_testing_feat.py
```

- Run the classifier script after extracting finished:

```
python SVM.py
```

## Other Tools

- To visualize features using TSNE (for sure the feature.txt and label.txt files in current pathway), run the following code:

```
python visualize_TSNE.py
```

- To visualize the topk closest object (for sure the closed_index.txt file generated by KMeans.py in current pathway), run `visualize_closest.m` using matlab.

## License

MIT License

## Acknowledgement
This code is based on [PointNet](https://github.com/charlesq34/pointnet) and [DGCNN](<https://github.com/WangYueFt/dgcnn>).

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
title: Easy salt
tags:
  - salt
  - salt stack
  - easy
  - orchestration
  - grains
date: 2017-07-14
---
### Intro
I had idea to write this small post, quite a log time ago, but was busy.
Some people think that salt is difficult, but I can say one thing its easy in use. Yes, salt is easy in use, just hard to master. Main problem is, documentation point you at [formulas](https://github.com/saltstack-formulas) but in reality pre-made formulas could be over complexed, and that pillar thing may not work for you from the start.

### Just copy the file in the right location
And I prefer different approach. When you already have production configuration, you just need to install software, move files in the right location, and to reload/restart daemon/service.
For example, this how my postfix configuration(init.sls) looks like: <!--more-->

```bash
install_postfix_packages:
  pkg.installed:
    - pkgs:
      - postfix
      - postfix-pcre

/etc/postfix/generic:
  file.managed:
    - user: root
    - group: root
    - mode: 644
    - source: salt://postfix/files/generic

/etc/postfix/smtp_header_checks:
  file.managed:
    - user: root
    - group: root
    - mode: 644
    - source: salt://postfix/files/smtp_header_checks

/etc/postfix/password:
  file.managed:
    - user: root
    - group: root
    - mode: 600
    - source: salt://postfix/files/password

/etc/postfix/tls_policy:
  file.managed:
    - user: root
    - group: root
    - mode: 644
    - source: salt://postfix/files/tls_policy

/etc/postfix/master.cf:
  file.managed:
    - user: root
    - group: root
    - mode: 644
    - source: salt://postfix/files/master.cf

/etc/postfix/main.cf:
  file.managed:
    - user: root
    - group: root
    - mode: 644
    - source: salt://postfix/files/main.cf

/etc/netdata/health_alarm_notify.conf:
    file.managed:
    - user: netdata
    - group: netdata
    - mode: 660
    - source: salt://postfix/files/health_alarm_notify.conf

reload_postfix:
  cmd.run:
        - name: |
            postmap /etc/postfix/generic
            postmap /etc/postfix/password
            postmap /etc/postfix/tls_policy
            systemctl restart postfix
            systemctl enable postfix
```
And I dig this "place the right files in right place" approach. Congratulations, you already can use salt.

### Salt environments?

Its easy to explain with configuration file:
```bash
: salt master
...
file_roots:
  base:
    - /srv/salt/base
  development:
    - /srv/salt/development
  staging:
    - /srv/salt/staging
  production:
    - /srv/salt/production
...
```
So you can create postfix folder in `/srv/salt/production`, create init.sls and files folder in it. And run salt with `salt 'hostname' state.sls postfix \ saltenv=production`

### Grains?
Basically, grains is all useful and non really useful information that makes you every host uniq.
Good start: https://docs.saltstack.com/en/latest/topics/grains/

Real world examples:

```bash
/root/.duply/{{ grains['id'] }}/conf:
  file.managed:
    - user: root
    - group: root
    - mode: 600
    - source: salt://common/files/duply-conf
```

```bash
:cron
# min hour dom month dow command
0 4 * * * /usr/bin/duply /root/.duply/{{ grains.id }} full_verify_purge --force
0 */4 * * * /usr/bin/duply /root/.duply/{{ grains.id }} incr
```
Boom thats it!

### The end

I hope information was useful and saved you a lot of time, reader. Salt is easy, just hard to master!

repository: cryptofuture/hda-blog

repo_name: cryptofuture/hda-blog


text:
---
id: event
title: event
sidebar_label: event
---

Parses and responds to incoming events. Helps you create your own adapter
easily.

## `s3(event, s3 = new AWS.S3())`

Parses and contain the incoming S3 event into `S3Event` object.

Example:

```js
// Example creation of an adapter
const { s3 } = require("@laconia/event");

const adapter = app => (event, dependencies) => {
  const s3Event = s3(event);
  // Interact with s3Event object
  console.log(s3Event.bucket);
  console.log(s3Event.key);
};
```

### `S3Event.bucket`

Returns the S3 bucket name that has triggered the Lambda

### `S3Event.key`

Returns the S3 object key that has triggered the Lambda. The key will already be
normalized for you by handling the + sign and URL decoding it. For example, this
property will return "red flower.jpg" instead of "red+flower.jpg"

### `S3Event.getObject()`

Retrieves the object from the S3 bucket that has triggered the Lambda. It
returns only the `Body` returned by aws-sdk.

### `S3Event.getJson()`

Retrieves the object from the S3 bucket that has triggered the Lambda, and
parses it into JSON.

### `S3Event.getStream()`

Creates a read stream for the object that has triggered the Lambda.

### `S3Event.getText()`

Retrieves the object from the S3 bucket that has triggered the Lambda, and
parses it into a string.

## `sns(event)`

Parses and contain the incoming SNS event into `SnsEvent` object.

Example:

```js
// Example creation of an adapter
const { sns } = require("@laconia/event");

const adapter = app => (event, dependencies) => {
  const snsEvent = sns(event);
  // Interact with snsEvent object
  console.log(snsEvent.message);
  console.log(snsEvent.subject);
};
```

### `SnsEvent.subject`

Returns the subject of the SNS message.

### `SnsEvent.message`

Returns the body of the SNS message. The message will automatically be JSON
parsed.

## `sqs(event)`

Parses and contain the incoming SQS event into `SqsEvent` object.

Example:

```js
// Example creation of an adapter
const { sqs } = require("@laconia/event");

const adapter = app => (event, dependencies) => {
  const sqsEvent = sqs(event);

  // Create an array of SQS message body
  console.log(sqsEvent.records.map(r => r.body));
};
```

### `SqsEvent.records`

Returns an array of `SqsRecord`.

### `SqsRecord.body`

Returns the body of the SQS message. The message will automatically be JSON
parsed.

## `kinesis(event)`

Parses and contain the incoming Kinesis event into `KinesisEvent` object.

Example:

```js
// Example creation of an adapter
const { kinesis } = require("@laconia/event");

const adapter = app => (event, dependencies) => {
  // Create an array of kinesis data
  console.log(kinesis(event).records.map(r => r.jsonData));
};
```

### `KinesisEvent.records`

Returns an array of `KinesisRecord`.

### `KinesisRecord.jsonData`

Returns the record data in a form of JSON.

### `KinesisRecord.textData`

Returns the record data in a form of String.

### `KinesisRecord.data`

Returns the record data in a form of Buffer.

## `apigateway.req(event)`

Parses and contain the incoming API Gateway event into `ApiGatewayEvent` object.

Example:

```js
// Example creation of an adapter
const { req, res } = require("@laconia/event").apigateway;

const adapter = app => (event, dependencies) => {
  const r = req(event);
  console.log(r.body);
  const output = app(r.params.id, dependencies);
};
```

### `ApiGatewayEvent.body`

Returns the body of the request.

The returned HTTP request body is parsed according to the Content-Type header.
The currently supported Content-Types are:

- application/x-www-form-urlencoded
- application/json

When the Content-Type received is not supported, the body will not be parsed
(the original body from the API Gateway Lambda Integration event object will be
returned).

If `isBase64Encoded` set to true, the request body will be base64 decoded
automatically too.

### `ApiGatewayEvent.headers`

Returns the request headers object. You can access the header with the original
AWS case, or the lower case as per standard node HTTP standard (the canonical
format).

### `ApiGatewayEvent.params`

Returns the request params object, which is a combination of query string
parameters and path parameters.

## `apigateway.res(output, statusCode = 200, headers = {})`

Creates a new API Gateway Lambda Integration response object based on the
specified parameters.

You can specify the following output:

- Object
  - Response Content-Type will be set to application/json
  - Your app output will automatically be JSON stringified
- String
  - Response Content-Type will be set to text/plain
- Number
  - Response Content-Type will be set to text/plain
  - Your app output will automatically be JSON stringified
- Promise that wraps any of the above
- Buffer
  - Response Content-Type will be set to application/octet-stream
  - You app output will automatically be base64
- Stream - Unsupported yet

Example:

```js
// Example of adapter creation
const { req, res } = require("@laconia/event").apigateway;

const adapter = app => (event, dependencies) => {
  try {
    const output = app(id, dependencies);
    return res(output); // Returns 200
  } catch (err) {
    // Returns error response
    return res(err.message, 500);
  }
};

// Respond with 200
// Will print something like:
// {
//   body: 'Success message',
//   statusCode: 200,
//   headers: { 'Content-Type': 'text/plain' },
//   isBase64Encoded: false
// }
console.log(res("Success message"));

// Respond with 500
res("Some error message", 500);

// Respond with 404
res("Not found", 404);

// Respond with JSON body
res({ hello: "world" });

// Respond with headers
// Will print something like:
// {
//   body: '{"error":"not found"}',
//   statusCode: 404,
//   headers:
//     { 'Content-Type': 'application/json; charset=utf-8',
//       'Access-Allow-Control-Origin': '*' },
//   isBase64Encoded: false
// }
res({ error: "not found" }, 404, {
  "Access-Allow-Control-Origin": "*"
});
```

repository: laconiajs/website

gha_language: JavaScript

gha_license_id: MIT

repo_name: laconiajs/website


text:
# OSM-RouteXL

![screenshot](https://raw.github.com/routexl/osm-routexl/master/screenshot.png)

OSM-RouteXL is bright and light style for [OpenStreetMap][] data. It's based on [OSM Bright][] and inspired by [Pandonia][] and [Blossom][]. The style is written in the [Carto][] language.

This map style is mostly white and light grey, to put the focus on the content you wish to display on the map, e.g. roadtrips or routes for deliveries, collections and services. For a live setup see our [multi stop route planner](https://www.routexl.com)

## Setup

1. Get and install [OSM Bright][]
2. Replace the .mss style files with the OSM-RouteXL version of that file
3. Done

[OpenStreetMap]: https://www.openstreetmap.org/
[OSM Bright]: https://github.com/mapbox/osm-bright
[Blossom]: https://github.com/stekhn/blossom
[Pandonia]: https://github.com/flickr/Pandonia
[Carto]: http://github.com/mapbox/carto/

repository: routexl/osm-routexl

repo_name: routexl/osm-routexl


text:
---
title: "Vue Best Practice"
date: "2020-05-09"
description: "Vue Best Practice"
---

## Naming

1. No more than one component per file.
2. PascalCase for naming component files. (i.e. "MyComponent.vue" not "myComponent.vue")
3. Base components (that is, a "dumb" component that has no interactivity and just displays data) should begin with the prefix "Base", "V", or "App". (As in : "BaseButton.vue", "BaseTable.vue")
4. Components that are created and used only once should be prefixed with "The", as:
   "TheHeading.vue, "TheSidebar.vue"
5. Child components tightly coupled with their parent should include the parent component name as a prefix. For example, "TodoList.vue" has children "TodoListItem.vue" & "TodoListAddButton.vue".
6. Component names should start with the highest-level (often most general) words and end with descriptive modifying words.
7. Component names should always be multi-word, this prevents conflicts with existing and future HTML elements, since all HTML elements are a single word.

## Codding

1. Template expressions should only have basic Javascript expressions.
2. Always use :key inside v-for
3. Don't mutate props directly in a child component. They can still be mutated, but they should use the .sync/emit pattern.
4. Use kebab-case for events:

```javascript
this.$emit('close-window')
<parrent @close-window='handleEvent()' />

this.$emit('update:title', newTitle)
<parrent @title.sync='localProperty' />

```

5. Declare props with camelCase and use kebab-case in templates

```javascript
;<PopupWindow title-text="hello world" />

props: {
  titleText: String
}
```

6. Don’t use v-if with v-for elements. The problem with this is that VueJS prioritizes the v-for directive over the v-if directive. So under the hood, it loops through every element and then checks the v-if conditional.

```javascript

<div v-for='product in cheapProducts'>

computed: {
  cheapProducts: () => {
    return this.products.filter(function (product) {
      return product.price < 100
    })
  }
}
```

This is good for a few reasons:
a) Rendering is much more efficient because we don’t loop over every item.
b) The filtered list will only be re-evaluated when a dependency changes.
c) It helps separate our component logic from the template, making our component more readable.

7. It’s usually best to use key with v-if + v-else, if they are the same element type (e.g. both <div> elements). That means when switching between elements of the same type, it simply patches the existing element, rather than removing it and adding a new one in its place.

```javascript
<div v-if="error" key="search-error">
  Error: {{ error }}
</div>
<div v-else key="search-results">{{ results }}</div>
```

## Computed

It is better to use computed properties rather than using method invocation for any data changes.
Computed properties are cached based on their dependencies. A computed property will only re-evaluate when some of its dependencies have changed.
Complex computed properties should be split into as many simpler properties as possible.

## WATCHERS

Instead of fetching data in created livecycle, we can use watcher with handler() and set property immediate to true.

```javascript
 watch: {
    loadData: {
      immediate: true,
      handler() {
        this.fetchList();
      },
    },
  }
```

## PROPS

The prop is used to pass in an initial value; the child component wants to use it as a local data property afterwards. In this case, it’s best to define a local data property that uses the prop as its initial value:

```javascript
 props: ['initialCounter'],
  data: function () {
    return {
      counter: this.initialCounter
    }
  }
```

The prop is passed in as a raw value that needs to be transformed. In this case, it’s best to define a computed property using the prop’s value:

```javascript
 props: ['size'],
  computed: {
    normalizedSize: function () {
      return this.size.trim().toLowerCase()
    }
}
```

Validate your props with good definitions - It basically saves future you from current you.

```javascript
props: {
   propA: Number,
    // Multiple possible types
    propB: [String, Number],
    // Required string
    propC: {
      type: String,
      required: true
    },
    // Number with a default value
    propD: {
      type: Number,
      default: 100
    }
    // Props with validators function
    propE: {
      type: String,
      required: true,
      validator: function (value) {
        return [
          'ok',
          'false',
          'error'
        ].indexOf(value) !== -1
      }
    },
  // Object with a default value
    propB: {
      type: Object,
      // Object or array defaults must be returned from a factory function
      default: function () {
        return { message: 'hello' }
      }
    },

}
```

When we want to pass number or boolean we need v-bind to tell Vue that this is a JavaScript expression rather than a string. It's same for arrays and objects.

```javascript
  <child v-bind:number="42" :isBoolean="false"></child>
```

## Functional Component

A functional component is a basically a component that is stateless (meaning no script tag). It only accepts props in order to display data.

```javascript
<template functional>
  <h1>{{ props.title }}</h1>
  <p>{{ props.description }}</p>
</template>
```

The benefits of using a Functional Component over a Stateful Component: faster rendering and Lighter memory usage.

## Styling

Element selectors should be avoided with scoped. Prefer class selectors over element selectors in scoped styles, because large numbers of element selectors are slow.

## VUEX

1. As a general rule, data that interacts with the API should be stored in the Vuex store.
2. Keep all API calls in actions, and those actions then commit to the mutator, and thus to the state, you can ensure that:
   a) all components are pulling from the single source of truth, and that no data will be duplicated
   b) your front-end store will stay synced with your back-end data
   c) your application will update automatically as soon as the API call resolves.
3. Whenever you can, normalize data that comes in array form unless the order is important (such as when you're getting the top 20 most recent pages from your API.) Even if the data has come back from the API as an array of objects, AND your view needs to display it as an array mapped over with a v-for directive, you should consider storing it in the store as an object of objects, by some identifying key, and then just denormalizing the data back again inside the getter.
   a) Retrieiving something from an object by key is O(1), compared to O(n) if you use searches or filters to find the same data.
   b) You can easily use ES6+'s built in Object.keys, Object.values, and Object.entries methods to get an array back from any object, but it's a bit more complicated to go the other way around.
   c) Listing by key allows you to be able to access the correct data even as data is removed or added.

4. Getters should not mutate data. They should only return the data you need.
   Getters are great for taking the data from the store then formatting it the way you need it before handing it off to the Vue component. This keeps transformation logic outside of the presentational Vue component. You can also use this pattern to create different transforms on the same data without mutating that data.

```javascript
const getters = {
  partnersList: state => state.partnersList, // gets the partner list.
  getPartnerById: state => id => state.partnersList[id], // returns a function which returns any partner by id.
  currentPartnerId: state => state.currentPartnerId, // gets the current partner object
  currentPartner: state => state.partnersList[state.currentPartnerId], // (even though that object isn't stored directly in the state)
}
```

5. An action is a function which takes as it's first parameter an object with a "commit" function. This commit function, in turn, takes a string as it's first parameter - that string determines what command the mutator should run.
   Actions can be synchronous or asynchronous. Because the commit is passed in as a callback, you can wait for other functions to resolve before dispatching the data to the store.

```javascript
const actions = {
  setCurrentPartner: ({ commit }, partnerId) => {
    commit('SET_CURRENT_PARTNER_ID', partnerId);
  },
  grabPartnerList: ({ commit }) => {
    return api.get.partnersList()
      .then(partnersList => {
        commit('SET_PARTNER_LIST', normalizePartners(partnersList));
      })
      .catch((err) => {
        console.error(err);
      });
  },

```

Actions don't actually change the store data - that's what mutators are for - but they send the command to change data so that it's ready for inclusion in the store.

**If you need to transform data before it gets to the store, transform it in the action, if you need to transform data after it comes from the store, transform it in the getter.**

6. Mutations is an object with different methods that take the Observable state as the first parameter. It is here, and ONLY here that any part of the state should be changed.

```javascript
const mutations = {
  ["SET_PARTNER_LIST"](state, partnersList) {
    state.partnersList = partnersList
  },
  ["SET_CURRENT_PARTNER_ID"](state, partnerId) {
    state.currentPartnerId = partnerId
  },
}
```

repository: Mildza/blog

gha_language: CSS

repo_name: Mildza/blog


text:
### A crisp and descriptive summary of the issue

### A more detailed description of what happens and why it doesn't work

### The expect result, actual behaviour and how the current is not correct.

### A step-by-step set of instructions explaining how the developer can reproduce the problem.

### A list of details about the user's system (e.g., operating system, version of the software, and any other details

gha_language: Python


text:
# Passport-BodyMedia

[Passport](https://github.com/jaredhanson/passport) strategy for authenticating
with [BodyMedia](http://www.bodymedia.com/) using the OAuth 1.0a API.

This module lets you authenticate using BodyMedia in your Node.js applications.
By plugging into Passport, BodyMedia authentication can be easily and
unobtrusively integrated into any application or framework that supports
[Connect](http://www.senchalabs.org/connect/)-style middleware, including
[Express](http://expressjs.com/).

## Install

    $ npm install passport-bodymedia

## Usage

#### Configure Strategy

The BodyMedia authentication strategy authenticates users using a BodyMedia account
and OAuth tokens.  The strategy requires a `verify` callback, which accepts
these credentials and calls `done` providing a user, as well as `options`
specifying a consumer key, consumer secret, and callback URL.

    passport.use(new BodyMediaStrategy({
        consumerKey: BODYMEDIA_CONSUMER_KEY,
        consumerSecret: BODYMEDIA_CONSUMER_SECRET,
        callbackURL: "http://localhost:3000/auth/bodymedia/callback"
      },
      function(token, tokenSecret, profile, done) {
        User.findOrCreate({ bodymediaId: profile.id }, function (err, user) {
          return done(err, user);
        });
      }
    ));

#### Authenticate Requests

Use `passport.authenticate()`, specifying the `'bodymedia'` strategy, to
authenticate requests.

For example, as route middleware in an [Express](http://expressjs.com/)
application:

    app.get('/auth/bodymedia',
      passport.authenticate('bodymedia'));

    app.get('/auth/bodymedia/callback',
      passport.authenticate('bodymedia', { failureRedirect: '/login' }),
      function(req, res) {
        // Successful authentication, redirect home.
        res.redirect('/');
      });

## Credits

  - [Chris Quartier](http://github.com/cquartier)
  - [Jared Hanson](http://github.com/jaredhanson) - Shamelessly borrowed a lot of his work on other passport strategies

## License

[The MIT License](http://opensource.org/licenses/MIT)

Copyright (c) 2014 Christopher Quartier

repository: cquartier/passport-bodymedia

repo_name: cquartier/passport-bodymedia


text:
# Pre-Trained Multi-Modal Text and Image Classification in Sparse Medical Data Application

## This Directory File Organization

This directory contains the following python scripts:

* __init__.py is necessary to make files in this directory importable to script files outside of this directory
* image.py contains the modified implementation of the ImageEncoder submodule based on DenseNet121
* mmbt.py implements Kiela et al. (2020) MMBT Model, following the original
  implementation and Huggingface's implementation.
* mmbt_config.py contains MMBTConfig class to specify MMBTModel instantiation
* mmbt_utils.py contains the JsonlDataset class to define torch Dataset, and dataset related utility functions for
  batching

## Supervised Multimodal BiTransformers for Classifying Images and Text (MMBT)

In our project, we experiment with the Supervised Multimodal BiTransformers for Classifying Images and Text
(MMBT) presented by Kiela et al. (2020). This is a BERT-based model (Devlin et al., 2019) that can accommodate multi-modal inputs.
The model aims to fuse the multiple modalities as the input data are introduced to the Transformers
architecture so that the model's attention mechanism can be applied to the multimodal inputs. This is
based on the idea supported by other works that multimodal fusion yields better performance
than simply concatenating multimodal inputs.

This is in contrast to a baseline model to which we are comparing our work by Aydin et al. (2019).
In the CNN-based model in Aydin et al. (2019), the CNN classifier reasons
over a concatenation of CNN features for both the pre-trained text and image submodules. We are comparing
our experiments to Aydin's (2020) work for the following reasons:

1. Similar transfer learning application of pre-trained multimodal model in binary classification on sparse medical data
2. We are able to experiment on the same dataset
3. Aydin's (2020) model provides a contrastive baseline for the multimodal concatenation approach to our
early fusion approach

The text module in MMBT is the standard BERT pre-trained model (Devlin et al., 2019); we use the `'bert-base-uncased'`
model. The other modalities are encoded as 'embedded tokens' generated from the pre-trained image encoder submodule
that are then projected to the same the dimensionality size as in the BERT text embeddings.

In the case of an image input modality, the image encoder is a pre-trained image
model. While the original model in Kiela et al. (2020) utilized a pre-trained ResNet51
model, we modified the image encoder submodule to be based on a pre-trained DenseNet121
model instead to be comparable to the best model used in Aydin et al. (2019). The image encoder submodule
modifies the pre-trained ResNet51/DenseNet121 to extract feautures prior to the final pooling layer as
described in Kiela et al. (2020). We also modified this image encoder submodule to accept intermediary
fine-tuned weights from the ChexNet14 Chest X-ray experiment (Rajpurkar, 2017).

## Notes on Implementation

* We implemented the MMBT model in Huggingface PyTorch with modifications as described

* For training the MMBT model, we used the default settings for hyperparameters as in the original
  [Huggingface Implementation](https://github.com/huggingface/transformers/blob/master/examples/research_projects/mm-imdb/run_mmimdb.py)

* We trained with the batch size of 32 and in some cases where memory is insufficient, 16.

* We extended our training to 10.0 epochs instead of the default = 3.0 in the `run_mmimdb.py`. We noticed that our
model's validation starts to worsen (overfit) only after 6 epochs.

## Bibliography

>Aydin, F., Zhang, M., Ananda-Rajah, M., & Haffari, G. (2019).
>      Medical Multimodal Classifiers Under Scarce Data Condition. ArXiv:1902.08888.
>      http://arxiv.org/abs/1902.08888

>Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019).
>      BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. ArXiv:1810.04805.
>      http://arxiv.org/abs/1810.04805

>Kiela, D., Bhooshan, S., Firooz, H., Perez, E., & Testuggine, D. (2020).
>      Supervised Multimodal Bitransformers for Classifying Images and Text. ArXiv:1909.02950.
>      http://arxiv.org/abs/1909.02950

>Rajpurkar, P., Irvin, J., Zhu, K., Yang, B., Mehta, H., Duan, T., Ding, D., Bagul, A., Langlotz, C., Shpanskaya, K.,
> Lungren, M. P., & Ng, A. Y. (2017).
>      CheXNet: Radiologist-Level Pneumonia Detection on Chest X-Rays with Deep Learning. ArXiv:1711.05225.
>      http://arxiv.org/abs/1711.05225

repository: pokarats/LAP-final-project

repo_name: pokarats/LAP-final-project


text:
---
layout: post
title: Axonomy 4th Voting Round Winner
subtitle: Community Collaboration

---

MixMarvel Foundation states that reported in October 2018, the MixMarvel operation team participated in Axonomy 4th Voting Round and became the winner.

In October 2018, MixMarvel participated in Axonomy 4th and became the first place in the 4th Voting Round. This result signifies the recognition of MixMarvel project within the Axonomy community.

The Axonomy event lasted around two weeks and was successful, reached the goal of raising MixMarvel recognition within Axonomy community and drive Axonomy community members to experience MixMarvel games and the platform.

The MixMarvel Foundation very much agrees with MixMarvel's participation in Axonomy 4th Voting Round. This is very helpful with MixMarvel's brand and awareness.

The MixMarvel Foundation has a back-up funding support for the event. The funding will include but not limited to marketing, PR, community events etc.

gha_language: HTML

gha_license_id: NOASSERTION


text:
---
title: |
    151. O Love Divine, What Hast Thou Done! - Church Hymnal 1941
metadata:
    description: |
        Church Hymnal 1941 151. O Love Divine, What Hast Thou Done!.  O Love divine, what has thou done!  Th'incarnate God hath died for me!  The Father's wellbeloved Son  Bore all my sins upon the tree!  The Son of God for me hath died;  My Lord, my Love, is crucified.
    keywords:  |
        Church Hymnal 1941, adventhymnals, advent hymnals, O Love Divine, What Hast Thou Done!, O Love divine, what hast Thou done!.
    author: Brian Onang'o
---

#### Advent Hymnals
## 151. O LOVE DIVINE, WHAT HAST THOU DONE!
####  Church Hymnal 1941,

```txt

1.
O Love divine, what has thou done!
Th'incarnate God hath died for me!
The Father's wellbeloved Son
Bore all my sins upon the tree!
The Son of God for me hath died;
My Lord, my Love, is crucified.

2.
Is crucified for me and you,
To bring us rebels back to God;
Believe, believe the record true,
Ye all are bought with Jesus' blood;
Pardon for all flows from His side;
My Lord, my Love, is crucified.

3.
Behold him, all ye that pass by,
The bleeding Prince of life and peace!
Come, sinners, see your Saviour die,
And say, was ever grief like his?
Come, feel with me His blood applied;
My Lord, my Love, is crucified.

```

- |   -  |
-------------|------------|
Title | O Love Divine, What Hast Thou Done! |
Key | D Major |
Titles | undefined |
First Line | O Love divine, what hast Thou done! |
Author | Charles Wesley (1707-1788)
Year | 1941
Composer| undefined |
Hymnal|  - |
Tune| STELLA (ENGLISH) |
Metrical pattern | |
# Stanzas |  |
Chorus |  |
Chorus Type |  |
Subjects | Jesus Christ: His Love and Sympathy |
Texts | undefined |
Print Texts |
Scripture Song |  |

repository: GospelSounders/adventhymnals

repo_name: GospelSounders/adventhymnals


text:
# Mastering Advanced Scala

This is the companion code repository for the [Mastering Advanced Scala](https://leanpub.com/mastering-advanced-scala) book published by Leanpub.

## Description

The code is organized into several subprojects. Each subproject corresponds to one specific chapter in the book and contains source files of featured standalone examples:

|subproject|featured library|chapter|status|
|--------|-------------|------|------|
|`typeclasses`|[Simulacrum](https://github.com/mpilquist/simulacrum)|Advanced language features|published|
|`scalaz`|[ScalaZ](https://github.com/scalaz/scalaz)|Exploring ScalaZ|published|
|`cats`|[Cats](https://github.com/typelevel/cats)|Exploring Cats|published|
|`iteratees`|[iteratee.io](https://github.com/travisbrown/iteratee)|Understanding iteratees|published|
|`monix`|[Monix](https://github.com/monixio/monix)|Working with asynchronous code|published|
|`monocle`|[Monocle](https://github.com/julien-truffaut/Monocle/)|Lenses and other optics|published|
|`fs2`|[FS2](https://github.com/functional-streams-for-scala/fs2)|Stream processing|published|
|`circe`|[Circe](https://github.com/travisbrown/circe)|Working with JSON|published|
|`shapeless`|[Shapeless](https://github.com/milessabin/shapeless)|Generic programming with Shapeless|published|
|`finch`|[Finch](https://github.com/finagle/finch)|Purely functional HTTP services|published|
|`http4s`|[http4s](https://github.com/http4s/http4s)|Purely functional HTTP services|published|
|`doobie`|[doobie](https://github.com/tpolecat/doobie)|Database access with doobie|published|

Also, we're using [Cats Effect](https://typelevel.org/cats-effect/) throughout the book for capturing effects, [Spire](https://github.com/non/spire) for precise arithmetic and [ScalaTags](https://github.com/lihaoyi/scalatags) for constructing HTML pages.

repository: Angeldude/advanced-scala-code

gha_language: Scala

repo_name: Angeldude/advanced-scala-code


text:
---
title: "Fast, extensible, configurable, and beautiful linter for Go"
author: 'blog.mgechev.com'
date: '2018-05-28'
slug: fast-extensible-configurable-a
link: https://blog.mgechev.com/2018/05/28/revive-golang-golint-linter/
categories:
- bloglink
tags:
  - modeling
  - blogmgechevcom
---

About a year ago I decided to polish my Go skills. Although the language is pretty small compared to most others that I use on a daily basis, it still has some useful syntax constructs that I didn't use enough. What a better way to brush up your skills in a programming language other than building tools with it..[... <i class="fas fa-external-link-alt"></i>](https://blog.mgechev.com/2018/05/28/revive-golang-golint-linter/)

repository: mkearney/data-scribers

repo_name: mkearney/data-scribers


text:
Kanso
============================================================

Kanso is a light-weight state-management library for web applications. Kanso's philosophy is to provide simple mechanics that can be used at your own discretion. You can use these patterns in many ways. Kanso molds to the skill of the user.

["By removing the non-essential and ornate, we can express a bare and honest simplicity."](http://web.archive.org/web/20120225201014/http://aentan.com/design/wabi-sabi-and-japanese-aesthetics/)

Install
------------------------------------------------------------

    npm install --save @zenwolf/kanso

Overview
------------------------------------------------------------

### Encapsulated state
Kanso focuses on encapsulating state and logic, separating them from any UI layer. State is maintained in a single place and can be passed into another system for processing
or rendering.

Kanso shapes the world: something else can render it into the visible realm.

### No Defined UI layer
Kanso defines no specific UI, allowing you to use any UI technology you like. Your UI of choice will need to accept the entire state and use it as it sees fit. The UI will need to be able to create actions and dispatch them on the app object using the `App#dispatch` method.

### Core concepts

1. Unidirectional data flow that operates solely on actions/commands.
2. Immutable state managed by state data stores.
3. Interceptors to extend the core system:
    * action interceptors -- allow you to act upon an action or change the action/replace it before it is passed to stores and used to modify state.
    * state interceptors -- allow you to act upon a new state before it is set, or change it/replace it, before change listeners are called.
4. Standard way to define state queries using `QueryApi` generator, which can be used statelessly(static methods) or statefully(bound to a specific state snapshot).

Responding to changes
------------------------------------------------------------

Kanso gives you different ways to respond to changes:

1. Intercept actions.
2. Listen to state changes.

### Interceptors
Interceptors are all composed into a single function call. The intial value is passed as the argument, and each function returns the same value type that is passed as the arugment to the next interceptor, until you end up with a single, resulting value which is then processed by the application.

### Action Interceptors
An action interceptor is a function that allows you to receive an action before it is used to change state. The required function signature is:

    action => action

You can return the same action, you could return a different action, or you could return a modified version of the same action. This is an extremely flexible system, hopefully allowing you to perform any number of things in response to an action.

### State Interceptors
A state interceptor is a function that allows you to receive a new state before it is set. The required function signature is:

    state => state

Much like an action interceptor, you can return the same state, return a different state, or return a modified version of the same state.

UI Strategies
------------------------------------------------------------
Here are [some strategies](docs/UIStrategies.md) related to working with UI.

Build
------------------------------------------------------------

### Code generation
Kanso is written in ES6 and uses Babel to generate ES5 JS code. You run a build command to generate the resulting library from `src` into the `lib` folder.

    npm run build

### Code linting
Kanso uses eslint to lint code.

    npm run lint

### Run tests
Kanso uses mocha for unit tests.

    npm test

### Run verification (lint + test)

    npm run verify

repository: Zenwolf/kanso

repo_name: Zenwolf/kanso


text:
# Using the Historic Data site

---
The [Betfair Historic Data site](https://historicdata.betfair.com/#/home) includes complete historic data for nearly all markets offered on the Exchange since 2016, when the new APING was launched. The data available includes prices, volume traded, winning status, average weighted price, BSP, and a variety of other details that are valuable for modelling and strategy development.

We know that the process of downloading and extracting these data files can be a bit intimidating the first time round, so here's a walk through of one way to go about it to help make it more accessible.

!!! note "Data tiers"
    There are three tiers of historic data available on this site. You can download samples of each tier of data [here](https://historicdata.betfair.com/#/help).

    The biggest difference is between the free and paid data. The free data includes a lot of information about the market, but no volume, and only last traded price per minute, not a full price ladder. The two paid tiers include the same data, just at different frequencies. If your strategy isn't particularly price sensitive and doesn't need volume as a variable then you'll probably be fine with the free tier, however if you need to see a more granular view of the market then you should probably consider the paid advanced or pro tiers.

    A full catalogue of the values included in each data tier is available [here](https://historicdata.betfair.com/Betfair-Historical-Data-Feed-Specification.pdf).

|**Basic**    |**Advanced**    |**Pro**      |
|:------------|:---------------|:------------|
|
1 minute intervals

last traded price

no volume
 |
1 second intervals

price ladder (top 3)

volume
 |
API tick intervals (50ms)

price ladder (full)

volume
 |

---
### Purchasing the data

Start by going to [the Betfair Historic Data site](https://historicdata.betfair.com/#/home) and log in using your Betfair account.

On the [Home](https://historicdata.betfair.com/#/home) page select the data set you want to download.

!!! note "Free data"

    - You need to 'purchase' the data set you want to download, even if it's from the free tier
    - You can only 'purchase' each time period of data once. For example, if you had previously 'purchased' all Greyhound data for January 2018, then tried to download Greyhound data for January to March 2018 you would receive an error, and would need to purchase the data for February to March instead.

Once you 'purchase' your choice of data it's recommended that you go to the [My Data](https://historicdata.betfair.com/#/mydata) page, and choose the subset of data to then download.

![Betfair Historic Data](./img/historicDataDownload2.png)

---
### Downloading the data

On the [My Data](https://historicdata.betfair.com/#/mydata) page you can filter the purchased data to the actual markets you're interested in. You can filter by Sport, Date range, EventId, Event Name, Market Type, Country & File Type (M = market, E = Event), which will cut down the size of the data you need to download.

For example, if you wanted the win market for Australian and New Zealand greyhound races you'd use these filters.

![Betfair Historic Data](./img/historicDataDownload3.png)

!!! note "File type"
    The file type filter has two options that you can choose from:

    - **E = Event** - includes event level data, i.e. Geelong greyhounds on x date
    - **M = Market** - includes market level data, i.e. the win market for Geelong greyhounds race 3 on x date

The site can be pretty slow to download from, and you'll generally have a better experience if you download the data a bit at a time, say month by month. Alternatively if you're going to download a lot of data it might be worth having a look at the historic data API, that can automate the download process and speed it up significantly. There's a guide available [here](https://historicdata.betfair.com/#/apidocs), and some [sample code](https://github.com/betfair/historicdata) the help get you started.

---
### Unzipping the files

You'll need to download a program to unzip the TAR files. Here we'll be using [7Zip](https://www.7-zip.org/), which is free, open source and generally well respected. Once you've downloaded it make sure you also install it onto the computer you'll be using to open the data files.

Locate the data.tar file in your computer's file explorer program. Right click on the file, select '7-Zip' from the menu then choose 'Extract files...'.

![Betfair Historic Data](./img/historicDataUnzip2.png)

In the model that pops up change the path mode to 'No pathnames'. You can also change the name and/or path of the folder you want the files extracted to if you want to.

![Betfair Historic Data](./img/historicDataUnzip3.png)

You now have a collection of .bz2 files. The final step is to select all the files, right click, select '7-Zip' from the menu then choose 'Extract here'. This will then extract all the individual zipped files which you can then either open in a text editor - you can use something basic like Notepad (installed on basically all computers by default) or a more complete program like [Visual Studio Code](https://code.visualstudio.com/) (my go to), [Vim](https://www.vim.org/) or [Notepad++](https://notepad-plus-plus.org/) - or you can parse over the using a program to do the work for you. We'll explore how to parse the data another time. If you're opening the files with a text editor you might need to right click, choose 'open with' and select your preferred program.

![Betfair Historic Data](./img/historicDataUnzip4.png)

---
### What's it for?

The data available on the Historic Data site is extensive, and can be a really valuable tool or input. For example, you can include some of the columns as variables in a predictive model, compare BSP odds against win rates, or determine the average length of time it takes for 2 year old horses to run 1200m at Geelong. Quality data underpins the vast majority of successful betting strategies, so becoming comfortable working with the data available to you is a really important part of both the modelling and automation processes.

---
### Extra resources

Here are some other useful resources that can help you work with this Historic Data:

- [Historic Data FAQs](https://historicdata.betfair.com/#/help)
- [Data Specification](https://historicdata.betfair.com/Betfair-Historical-Data-Feed-Specification.pdf)
- [API for downloading historic data files](https://historicdata.betfair.com/#/apidocs) (quicker than manually downloading)
- [Sample code for using the historic data download API](https://github.com/betfair/historicdata)

gha_language: Jupyter Notebook


text:
# Collabriculture vineyard logical data model
#### This repository contains a set of scripts for creating an instance of the Collabriculture logical data model for vineyards in a PostgreSQL/PostGIS relational database.

## Set up the database
#### Create a blank database called `vineyard_db` (or any other name you like).
``` sh
psql -c 'create database vineyard_db;'
```

#### Create related tables using the SQL script `logical-schema.sql`.
``` sh
psql -d vineyard_db -f logical-schema.sql
```

#### You should now have a database with a structure like this:
![Vineyard logical model ERD](doc/logical-model.png "Vineyard logical model ERD")

#### Load varieties lookup table with external data.
``` sh
psql -d vineyard_db -f load-varieties.sql
```

#### Create example views, transposing the attributes into columns, joining them to core tables, and producing stats from the core data.
``` sh
psql -d vineyard_db -f example-views.sql
```

#### Alternatively, run the shell script `create-and-setup-db.sh` with a single argument for the name of the database you want to create, eg:
``` sh
./create-and-setup-db.sh 'vineyard_db'
```

branch_name: refs/heads/main


text:
# Antennaria plantaginifolia var. arnoglossa (Greene) Cronquist VARIETY

#### Status
SYNONYM

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

#### Published in
RHodora 47:183. 1945

#### Original name
null

### Remarks
null

repository: mdoering/backbone

path: /life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Antennaria/Antennaria parlinii/ Syn. Antennaria plantaginifolia arnoglossa/README.md

repo_name: mdoering/backbone


text:
# Getting started

## What is Sphinx

Sphinx is a tool that makes writing and publishing documentation a lot more easier.
With the way it works, Sphinx helps publishing documentation to different destinations and formats.
It can publish pdf version of your documentation to make it easy to share with customers or third parties
without having to worry about access, at the same time it keeps your confluence pages up-to-date.

## How to use Sphinx

Sphinx is easy to setup, it requires couple of packages to install and couple of commands to run to be able to start building your documentation.
Sphinx uses a `conf.py` file to configure itself and to know what steps to perform when building your documentation for the the specified destination.
For example by setting `confluence_server_url` you are telling it where to look for your confluence server and where to send requests to update it.

### Writing doc files

To be able to use Sphinx to generate your documentation, you need to structure your documentation, the quick start cli will walk you though the basic folder structure.

```bash
sphinx-quickstart

```

the quickstart wizard should create a folder structure similar to the following

```bash
$ tree ./

./
├── Makefile
├── build
├── make.bat
└── source
    ├── _static
    ├── _templates
    ├── conf.py
    └── index.rst

4 directories, 4 files
```

The entry point to the documentation is the top level `index.rst` file, it is called the master document and servers as a welcome page.
RST files are reStructuredText files it is a special markdown language to help build complex structure documentation. Thanks to `m2r2` extension we won't be using it much through out this demo. The main source will be standard MD files. For more information about reStructuredText check [Sphinx documentation](https://www.sphinx-doc.org/en/master/glossary.html#term-reStructuredText)

### Sphinx is extendable

Sphinx comes baked in with lots of extension, for the sake of this demo we will be using the following extensions

* m2r2: This extension let import md files into reStructuredText(rst) files easily, this would reduce the time it would take to adopt sphinx.
* sphinxcontrib.confluencebuilder: This extension allows sphinx to push to Confluence using the API.

repository: modamod/sphinx-demo

repo_name: modamod/sphinx-demo


text:
# Cartographers map generator

The Cartographers is a modern board game where your goal is to sketch the most efficient maps. More on Board Game Geek https://boardgamegeek.com/boardgame/263918/cartographers.

This project is a simple map generator that you can use as a base for your games.

You can check it here: http://zofiakorcz.pl/cartographers

![Image of Cartographers map](./public/cartographers.png)

It's a PWA which means it is intended to work on any platform that uses a standards-compliant browser, including both desktop and mobile devices. Users can add a shortcut to their Home screen so they can access it with a single tap.

# How to run

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

In the project directory, you can run:

`yarn start`

which runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

# License

Cartographers map generator is licensed under the MIT license.

repository: ZurgInq/cartographers

repo_name: ZurgInq/cartographers


text:
# Using DALI with Ignite:

In this example we can see how to build an all-GPU data loading pipeline with DALI and feed it into an Ignite trainer.

DALI does a lot of things that are useful on the data loading and augmentation side - including image decode, transformation, and even multi GPU data pipelining. It is unique in that once DALI applies any GPU operation to a batch, the batch remains on GPU for further transformations. It stays there after the transformations for training until Ignite is done with it - meaning you can save costly CPU-GPU communication.

# Requirements:

- NVIDIA GPU with appropriate drivers
- CUDA 9.0 or later
- PyTorch (make sure it is properly configured to work with your GPU)
- Ignite
- DALI (https://docs.nvidia.com/deeplearning/sdk/dali-developer-guide/docs/installation.html)

### Alternatives:

Google Colabs give users access to free GPU Jupyter environments - the notebook works in those!
https://colab.research.google.com/notebooks/welcome.ipynb

Specifically, there is a Colab friendly version of the notebook here:
https://colab.research.google.com/drive/1F_7DihE8YUzirvWV8xn1aMe0EMAP9iB6

You can also skip a lot of the environment/setup stuff if it is giving you trouble with Docker. There is a PyTorch image that works with this notebook here
https://ngc.nvidia.com/catalog/containers/nvidia:pytorch

The one liner to get into Jupyter (once nvidia-docker is installed) looks like:
```bash
nvidia-docker run -it --net=host -v $(pwd):/workspace/content nvcr.io/nvia/pytorch:20.01-py3 jupyter notebook --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' content/
```

(the 'nvidia-docker' part may be different based on your nvidia-docker version, e.x. "docker run --gpus all" or similar)

# Files:

__Ignite+DALI.ipynb__

The main example notebook. Walks through construction of a DALI pipeline the same way you would Compose() a normal PyTorch transform pipeline, and then feed it into Ignite. Compares loading images from folders using DALI and PyTorch's respective ImageFolder loaders.

__dali_transform_utilities.py__

Some useful DALI utilities that let you `ComposeOps()` DALI operations easily, and then turn it into a DALI graph. Specifically, `ComposeOps`, `TransformPipeline`, `DALILoader`.

__dali_example_utilities.py__

A custom trainer that allows for MovingAverage metrics and prepare_batch logic that allow Ignite to consume DALIIterators. Additionally, add a progressbar and timers for visualization of performance and for fun.

# Thanks:

Great work and many thanks to user chicham, who put together the excellent DALI transformation utilities this example pulls from in Ignite pull 493 (https://github.com/pytorch/ignite/pull/493)!

repository: dnola/ignite

repo_name: dnola/ignite


text:
# feathers-reactive ReactJS real-time Todo example

This folder contains an example for a real-time Todo list using `feathers-reactive` and ReactJS. In this folder run:

```
npm install
npm start
```

Then go to [localhost:3030](http://localhost:3030).

repository: ometra/feathers-reactive

repo_name: ometra/feathers-reactive


text:
WiN
===

WiN (Wireless Inter-Home Network) is designed to do what crowd-funding did for projects but for mobile networks. Uses of this could be in businesses to replace wired phone extensions or in place of a pager at a hospital. It could even be used to call your son to dinner! It doesn't require an Internet connection or traditional cellular coverage so it can be completely free.

###Where are you in development?
You can see everything and vote/comment at our public Trello here: https://trello.com/b/xTcyUVmY

###How do I use this as of now?
NOTE: This is still in super early development so expect everything to change.

**Sending a message**

To send a message run "python send.py" and fill out your desired username, the target's username and the message.

**Receiving messages**

Run "python client.py *myusername*"

###What do I need to run this?
Currently WiN is only avalible on GNU/Linux. It requires Python 2.7 and Zenity to run.

###Frequent problems
**I'm not getting messages!**

Check you are on the same WiFi network *and* the same subnet. Also check that your firewall is not blocking port 8946 and 1501.

**I get _____ error!**

Leave a bug report on this GitHub page.

repository: JJJollyjim/WiN

repo_name: JJJollyjim/WiN


text:
# {Accessible documents} SCULPT

[SCULPT](https://www.worcestershire.gov.uk/WCCSculpt) is created and maintained by [Worcestershire County Council](https://www.worcestershire.gov.uk). It is a set of guidance for creating accessible documents. Before you save your document, you check it against the tips outlined in the SCULPT documentation to make sure you haven't introduced any accessibility issues.

SCULPT stands for:
- S: Structure
- C: Colour and contrast
- U: Use of images
- L: Links
- P: Plain English
- T: Tables

repository: solidgoldpig/accessibility-manual

repo_name: solidgoldpig/accessibility-manual


text:
# S2I Sample Applications for Perl Builder Image

This is a very basic sample application repository that can be built and deployed
on [OpenShift](https://www.openshift.com) using the [Perl builder image](https://github.com/sclorg/s2i-perl-container).

The application serves a single static html page via perl, while also installing Math::Round package from cpan.

To build and run the application:

```
$ s2i build --context-dir=examples/sample-test-app https://github.com/sclorg/s2i-perl-container centos/perl-524-centos7 myperlimage
$ docker run -p 8080:8080 myperlimage
$ # browse to http://localhost:8080
```

You can also build and deploy the application on OpenShift, assuming you have a
working `oc` command line environment connected to your cluster already:

`$ oc new-app --context-dir=examples/sample-test-app centos/perl-524-centos7~https://github.com/sclorg/s2i-perl-container`

You can also deploy the sample template for the application:

`$ oc new-app -f https://raw.githubusercontent.com/sclorg/s2i-perl-container/master/examples/templates/sample-test-app.json`

gha_language: Shell


text:
Btrfs on Whole Drive
====================

Installing Btrfs on the whole drive simplifies setup of a new system.  In this
setup, Btrfs occupies the entire storage device, including the partition table,
and Btrfs subvolumes can be used to simulate partitions.  There are some
limitations to this, however.

* You cannot use whole disk encryption (to my knowledge).
* You cannot create swap space since Btrfs doesn't support swap files and there
  is no room to create a swap partition.
* You cannot use UEFI to boot.

Setup
-----

The following are commands I used to set Btrfs up on the whole drive:

    mkfs.btrfs -L nixos /dev/sda
    mount -o discard,compress=lzo /dev/sda /mnt
    nixos-generate-config --root /mnt

    nano /mnt/etc/nixos/hardware-configuration.nix

When editing `hardware-configuration.nix` I include the following...

    fileSystems."/" = {
      device = "/dev/disk/by-label/nixos";
      fsType = "btrfs";
      options = [ "discard" "compress=lzo" ];
    };

Next I replace the default `configuration.nix` with my own bootstrap
configuration.

    curl -o /mnt/etc/nixos/configuration.nix \
    https://raw.githubusercontent.com/KibaFox/nixos/master/bootstrap.nix

Install...

    nixos-install

Notes
-----

ArchWiki suggests not to enable compression during installation, but does not
explain why.  I haven't had an issue installing NixOS with compression on during
installation.

If you decide to have compression off during installation, then before you
restart you can apply compression to the installed files like so:

    btrfs filesystem defragment -r -v clzo /mnt

See Also
--------

* [Btrfs article on ArchWiki](https://wiki.archlinux.org/index.php/Btrfs)

license: Unlicense

repository: KibaFox/nixos

repo_name: KibaFox/nixos


text:
---
title: "86 - JSON Import"
menu:
  main:
    name: "JSON Import"
    identifier: "technical/datamanagement/jsonimport"
    parent: "technical"
---
# Object Import with JSON Payloads

Using the [frontend JSON Importer](../../../webfrontend/datamanagement/lists/jsonimport), objects can be imported into the Easydb by uploading files with objects that are conform to the [API requirements of objects](../../types/object).

## Server Lookups for IDs

When objects and basetypes are imported, they are not saved in the database yet and have no ID yet. To link to objects and basetypes in the migration payloads, instead of using IDs lookups for these IDs can be defined. In the server, these lookup keywords are used to replace the lookup object with the correct ID of the object.

A lookup is a JSON object that is used instead of the ID (integer). It defines a column in the database that contains the unique value that is referenced. The reference value must exist in the database during the time of the import, must be unique, and known when the payloads are created.

The column can be a standard reference column (`"reference"` for all basetypes Tag, Tag Group, User, Group, Pool, Collection and Message), any unique text field in a user object, or an extra reference field. The name of the reference column must be known during the creation of the payloads.

### General structure

The structure of all lookup objects is

```javascript
"lookup:<type of id>": {
  "<reference column>": "<reference value>"
}
```

The use of more keys in the lookup object would cause an API Error, since the server can not determine which of the keys would be the name of the reference column in the database. The only exception is a lookup for an object with an arbitrary objecttype (used for example when objects are linked to collections).

In this case, the keyword `"_objecttype"`, which defines the table, is also allowed in the lookup object:

```javascript
"lookup:_id": {
  "<reference column>": "<reference value>",
  "_objecttype": "<objecttype = reference table name>"
}
```

The server performs a lookup in the database by returning the ID of the object or basetype that has the value `"reference_to_linked_object_5804d0ce"` in the column `"reference"`.

If there is no result for this query, or more then one, the lookup failed and an API Error is thrown. In this case, the complete batch failed and the lookup must be fixed.

#### Example:

To create a link to an object in the payload

```javascript
{
  "lk_linkedobject_id": {
    "linkedobject": {
      "lookup:_id": {
        "reference": "reference_to_linked_object_5804d0ce"
      }
    },
    "_objecttype": "linkedobject",
    "_mask": "_all_fields"
  }
}
```

would be used instead of referencing the linked object with its ID:

```javascript
{
  "lk_linkedobject_id": {
    "linkedobject": {
      "_id": 87654
    },
    "_objecttype": "linkedobject",
    "_mask": "_all_fields"
  }
}
```

### Lookup Keywords

The JSON keys for the lookups are keywords that can not be used for other keys, else the import would fail.

#### `lookup:_id`

Perform a lookup for the ID of an object or basetype in the current table. Objects with arbitrary object types require the key `"_objecttype"` as well.

Lookups for an ID can be performed for:

- Linked objects
- Pools
  - Add an object to a pool
- Tags
  - Add a tag to an object
- Tag Groups
  - Add a tag to a tag group
- Groups
  - Add a user to a group

#### `lookup:_id_parent`

Perform a lookup for the parent ID of an object or basetype in the current table. This is used to add the parent-child-relation to a hierarchical basetype or user object.

Lookups for a parent ID can be performed for:

- Hierarchical objects
- Pools
  - Set a pool as the child of another pool
- Collections
  - Set a collection as the child of another collection

#### `lookup:_global_object_id`

Perform a lookup for the global object ID of a user object.

Lookups for a parent ID can be performed for:

- Objects in a collection
  - This also requires the key `"_objecttype"`

Inside `webfrontend_props` for presentations of collections, the format is `lookup:global_object_id`, without the underscore. See example below.

## manifest.json

This file is useful to fill the JSON Importer form, therefore all values are optional.

```javascript
{
  "source": "Some name",
  "batch_size": 100,
  "payload_base_uri": "",
  "payloads": [
    "payload_1.json",
    "payload_2.json"
  ]
}
```

## Basetypes payloads

### Groups

```javascript
{
  "import_type": "group",
  "groups": [ { <group object> } ]
}
```

#### Default References for System Groups

All System Basetypes have predefined, read only references. The references have the form `system:<internal name>`.

For example the group "All users" (internal name `:all`) has the reference `system::all`.

### Users

```javascript
{
  "import_type": "user",
  "users": [ { <user object> } ]
}
```

#### Default References for System Users

The references have the form `system:<login name>`.

For example the root user (login name `root`) has the reference `system:root`.

### Pools

```javascript
{
  "import_type": "pool",
  "pools": [ { <pool object> } ]
}
```

#### Default References for System Pools

The references have the form `system:<internal_unique_id>`.

For example the standard pool (internal_unique_id `standard`) has the reference `system:standard`.

### Tags

Tags and Taggroups are sent together in one package to the server. All existing Taggroups and Tags are replaced.

```javascript
{
  "import_type": "tags",
  "tags": [ { <tags object> } ]
}
```

### Collections

```javascript
{
  "import_type": "collection",
  "collections": [
    {
        "_basetype": "collection",
        "collection": {
            "displayname": {
                "de-DE": "Neue Mappe"
            },
            "description": {
                "de-DE": "Eine freigegebene Mappe für Ticket: #44450"
            },
            "webfrontend_props": {
                "presentation": {
                  "settings": {
                    "show_info": "no-info"
                  },
                  "slide_idx": 0,
                  "slides": [
                    {
                      "type": "start",
                      "data": {
                        "info": "",
                        "title": "A title"
                        }
                    },
                    {
                      "type": "duo",
                      "left": {
                        "lookup:global_object_id": {
                            "_objecttype": "bilder",
                            "reference_column": "reference-value"
                        }
                      },
                      "right": {
                        "global_object_id": "58@b40f205b-fa95-48cc-b9f2-dfad8fcaa641"
                      }
                    },
                    {
                      "type": "one",
                      "center": {
                        "global_object_id": "58@b40f205b-fa95-48cc-b9f2-dfad8fcaa641"
                      }
                    }
                  ]
                }
            }
        },
        "_objects": [
          {
            "_global_object_id": "14@e84132d0-9173-444c-ab66-cbd7cce0baf4",
            "_webfrontend_props": null
          },
          {
            "_global_object_id": "14@e84132d0-9173-444c-ab66-cbd7cce0baf4",
            "_webfrontend_props": null
          },
          {
            "lookup:_global_object_id": {
              "_objecttype": "bilder",
              "reference": "Bilder:15"
            },
            "_webfrontend_props": null
          }
        ]
    }
  ]
}
```

### Objects

The "import_type" for objects is always "db", and it is necessary to add a new attribute to specify the object type.

```javascript
{
  "objecttype": "bilder",
  "import_type": "db",
  "objects": [
    {
      "bilder": {
         "_id": null,
         "_version": 1,
         "file": [{
            "preferred": true, // mark image as the preview version
            "eas:url": "http://<IP_ADDRESS>:8887/json/image.jpg",
            "eas:preview:url": "http://<IP_ADDRESS>:8887/image-preview.jpg",
            "eas:filename": "image.jpg" // overwrite http header
         }],
         "titel": "Title"
      },
      "_mask": "bilder__all_fields",
      "_objecttype": "bilder",
      "_idx_in_objects": 1
    }
  ]
}
```

#### Default References for System Collections

The references have the form `system:<internal_unique_id>`.

For example the collection "All Collections" (internal_unique_id `root`) has the reference `system:root`.

#### Default References for User Collections

User collections are system collections that are created when a new user is created. Also all system users have user collections.

##### System User Collections

The references for system user collections have the form `user:ref:<user reference>`.

For example the user collection of the root user (user reference `system:root`) has the reference `user:ref:system:root`.

##### User Collections

The references for other (non-system-user) user collections have the form `user:<user reference type>:<unique user identification>`. The user identification is formed from three user fields, that are unique and at least one of them is always set:

1. **User reference**
 - If the user reference is set, the user collection reference has the format `user:ref:<user reference>`

2. **User login**
 - Fallback, if user reference is not set
 - If the user login is set, the user collection reference has the format `user:login:<user login>`

3. **User ID**
 - Fallback, if user reference and user login are not set
 - If the user ID is set, the user collection reference has the format `user:id:<user ID>`

For example the user collection of a user with the ID `123`, but without reference and login, has the reference `user:id:123`

<!--
### References for

... coming ...
-->

### Update objects

It is possible to update existing objects by adding the attributes **_id** and **"_version:auto_increment": true**. When the attribute **_version:auto_increment** is set, the client will fetch the existing object by its **_id** and the version will be incremented.

```javascript
{
  ...
    "bilder": {
      "_id": 1,
      "_version:auto_increment": true,
      "file": [{
         "eas:url": "http://<IP_ADDRESS>:8887/json/image.jpg",
         "eas:preview:url": "http://<IP_ADDRESS>:8887/image-preview.jpg"
      }],
      "titel": "Title"
    },
  ...
}
```

If the **_id** is not available, it is posible to use the lookup feature by adding the attribute **lookup:_id** instead of **_id**. This **lookup** has a client side implementation, where the object's **_id** will be fetched from the server by using the given reference, and then the version will be incremented.

```javascript
{
  ...
    "bilder": {
      "lookup:_id": {
         "reference_field": "reference_value"
      },
      "_version:auto_increment": true,
      "file": [{
         "eas:url": "http://<IP_ADDRESS>:8887/json/image.jpg",
         "eas:preview:url": "http://<IP_ADDRESS>:8887/image-preview.jpg"
      }],
      "titel": "Title"
    },
  ...
}
```

repository: yorickreum/easydb-documentation

repo_name: yorickreum/easydb-documentation


text:
# 0.5.10

* Notify on ID duplication
* Fixed duplicating strings when adding tags with update-ids

# 0.5.9

* Fixed purging suite ids in feature files

# 0.5.8

- Added `--no-empty` option to delete empty suites after import

# 0.5.7

* Fixed adding extra spacing when updating ids

# 0.5.6

* Fixed working with duplicate scenarios

# 0.5.5

* Fixed `--update-ids` to add ids as tags
* Fixed `--purge` to clean up ids in tags

# 0.5.4

* Fixed puring in empty feature files

# 0.5.3

- Added `--create` option to create a test or suite by ID when they are not found in a project

# 0.5.2

* Fix analyzing empty feature files

# 0.5.1

* Added `--purge` command
* Fixed cleaning and updating empty feature files

# 0.5.0

* Added `--keep-structure` option to prefer source code structure over the structure in Testomat.io
* Uses `TESTOMATIO_BRANCH` env variable to import tests to a branch:

```
TESTOMATIO_BRANCH=dev TESTOMATIO=123456 npx check-cucumber ...
```
* Don't mark tests as "detached" when importing a single file

# 0.4.0

* Added `--update-ids` option to automatically assign test ids
* Added `--no-detached` option to not mark tests on detached on import
* Added `--clean-ids` command to remove automatically set ids with `--update-ids` command
* Added `--unsafe-clean-ids` command to remove automatically set ids, without server verification
* Added `TESTOMATIO_PREPEND_DIR="MyTESTS"` param to import tests into a specific folder/suite.

# 0.2.1

* Throw error when importing features & scenarios with empty titles

repository: testomatio/check-cucumber

repo_name: testomatio/check-cucumber


text:
## Future Binance API

![GitHub](https://img.shields.io/github/license/fman42/FutureBinanceAPI?logo=1)
![Nuget](https://img.shields.io/nuget/v/FutureBinanceAPI?logo=1)

<img src="./icon.png" width="200px">

This library allows to you use simply an API of crypto exchange **Future Binance**

In this moment the library supports main methods of API and has a custom request

## 0. Clients

There are 3 clients: **AuthClient**, **DefaultClient** and **StreamClient**.

AuthClient has API-key and Secret-Key for HTTP-request.
DefaultClient will use for non-auth request(**Endpoint's Market** and etc...)
StreamClient will use for stream events(see **4. Stream**)

**Note**:
To set parametr **"useTestnet"** in **true** for use API of Binance Futures Testnet(https://testnet.binancefuture.com). Else if you use the main exchange (https://www.binance.com/ru/futures/BTCUSDT) then set **"useTestnet"** in **false** or just ignore it

In depending of type a constructor has another arguments:
```csharp
AuthClient(string _APIKey, string _SecretKey, bool useTestnet = false)
...
DefaultClient(bool useTestnet = false)
...
StreamClient(string userListenKey, bool useTestnet = false)
...
StreamClient(string userListenKey, string webSocketUrl)
```

Create a client:
```csharp
AuthClient authClient = new AuthClient("my_api_key", "my_secret_key"); // Create the client for an auth request
DefaultClient defaultClient = new DefaultClient(); // Create the client for no auth request
StreamClient streamClient = new StreamClient("listener_key"); // Create the client for stream events
```

You can change **RecvWindow** for a client
```csharp
...
authClient.RecvWindow = 5000;
```

## 1. EndPoints

Using a client object(**IClient**) you can use anymore endpoint. A list of endpoints:

1) TickerEndPoint
2) TradeEndPoint
3) OrderEndPoint
4) AccountEndPoint
5) StreamEndPoint

### 1.1. TickerEndPoint
```csharp
DefaultClient client = new DefaultClient(true); // Create a default client
TickerEndPoint market = new TickerEndPoint(client); // Create a market endpoint
```

The endpoint has methods:

**GetPriceTicker**

Fetch latest price for a symbol or symbols.

```csharp
public async Task<IEnumerable<PriceTicker>> GetPriceTickerAsync()
public async Task<PriceTicker> GetPriceTickerAsync(TraidingPair symbol)
```
Example:
```csharp
...
IEnumerable<PriceTicker> priceSymbols = await market.GetPriceTickerAsync();
PriceTicker priceSymbol = await market.GetPriceTickerAsync(TraidingPair.BTCUSDT);
```

**GetBookTicker**

Fetch best price/qty on the order book for a symbol or symbols.
```csharp
public async Task<IEnumerable<BookTicker>> GetBookTickerAsync()
public async Task<BookTicker> GetBookTickerAsync(TraidingPair symbol)
```

Example:
```csharp
...
IEnumerable<BookTicker> bestPriceForSymbols = await market.GetBookTickerAsync();
BookTicker bestPrice = await market.GetBookTickerAsync(TraidingPair.BTCUSDT);
```

### 1.2. TradeEndPoint

**AuthClient is mandatory for this endpoint**
```csharp
AuthClient client = new AuthClient("API_key", "Secret_key", true); // Create an auth client
TradeEndPoint trade = new TradeEndPoint(client); // Create a trade endpoint
```

The endpoint has methods:

**SetLeverage**

Will set a leverage for a given symbol
```csharp
public async Task<Leverage> SetLeverageAsync(TraidingPair symbol, int value)
```

Example:
```csharp
...
Leverage setLeverage = await trade.SetLeverageAsync(TraidingPair.BTCUSDT, 25); // Set 25 leverage for BTCUSDT
```

**SetMarginType**

Will set a margin type(**CROSSED** or **ISOLATED**) for a given symbol
```csharp
public async Task<bool> SetMarginTypeAsync(TraidingPair symbol, MarginType marginType)
```

Example:
```csharp
...
public bool changedMarginType = trade.SetMarginTypeAsync(TraidingPair.BTCUSDT, MarginType.CROSSED); // Set a margin type CROSSED
```

**ModifiyIsolatedPositionMarge**
```csharp
public async Task<bool> ModifiyIsolatedPositionMarge(TraidingPair traidingPair, decimal amount, int type, PositionSide positionSide = PositionSide.BOTH)
```

**GetMarginChangesAsync**

Get history of changes margin positions.
**startTime** and **endTime** have unix format

**limit** can contain a number at most 500
```csharp
public async Task<IEnumerable<MarginChange>> GetMarginChangesAsync(TraidingPair traidingPair, int limit = 100)

public async Task<IEnumerable<MarginChange>> GetMarginChangesAsync(TraidingPair traidingPair, int type, int limit = 100)

public async Task<IEnumerable<MarginChange>> GetMarginChangesAsync(TraidingPair traidingPair, int type, long startTime, long endTime, int limit = 100)
```

### 1.3. OrderEndPoint
**AuthClient is mandatory for this endpoint**

```csharp
AuthClient client = new AuthClient("API_key", "Secret_key", true); // Create an auth client
OrderEndPoint order = new OrderEndPoint(client); // Create an order endpoint
```

**Set**

Will send a new order to exchange. To create an order in code, you need create an object from **FutureBinanceAPI.Models.Orders** namespace. **_Each an order has own class_** (See **1.3.1**)

```csharp
public async Task<Order> SetAsync(Orders.IOrder order)
```

Example:
```csharp
...
MarketOrder marketOrder = new MarketOrder(TraidingPair.BTCUSDT, 0.100m); // Create a market order
Order newOrder = await order.SetAsync(marketOrder); // Send our market order to an exchange

Console.WriteLine(newOrder.OrderId); // We received response from exchange and will write in a console
```

#### 1.3.1. Types of orders:
**-MarketOrder**
```csharp
public MarketOrder(TraidingPair symbol, Side side, decimal quantity)
```

**-LimitOrder**
```csharp
public LimitOrder(TraidingPair symbol, Side side, decimal quantity, decimal price, TimeInForceType timeInForce)
```

**-StopOrder**
```csharp
public StopOrder(TraidingPair symbol, Side side, decimal quantity, decimal price, decimal stopPrice)
```

**-TakeProfit**
```csharp
public TakeProfit(TraidingPair symbol, Side side, decimal quantity, decimal price, decimal stopPrice)
```

**-StopMarket**
```csharp
public StopMarket(TraidingPair symbol, Side side, decimal quantity, decimal stopPrice)
```

**-TakeProfitMarket**
```csharp
public TakeProfitMarket(TraidingPair symbol, Side side, decimal quantity, decimal stopPrice)
```

**-TrailingStopMarket**
```csharp
public TrailingStopMarket(TraidingPair symbol, Side side, decimal quantity, decimal callbackRate)
```

**Get**

Fetch info of order from an exchange
```csharp
public async Task<Order> GetAsync(TraidingPair symbol, long orderId)
```

Example:
```csharp
...
Order order = await order.GetAsync(TraidingPair.BTCUSDT, 10000045);
```

**Cancel**

Will cancel a given order or all
```csharp
public async Task<Order> CancelAsync(TraidingPair symbol, long orderId)
public async Task<bool> CancelAsync(TraidingPair symbol)
```

Example:
```csharp
...
Order canceledOrder = await order.CancelAsync(TraidingPair.BTCUSDT, 10000045);
bool AreCanceledAllOrders = await order.CancelAsync(TraidingPair.BTCUSDT);
```

### 1.4. AccountEndPoint

**AuthClient is mandatory for this endpoint**
```
AuthClient client = new AuthClient("API_key", "Secret_key", true); // Create an auth client
AccountEndPoint account = new AccountEndPoint(client); // Create an account endpoint
```

**Get**
```csharp
public async Task<Account> GetAsync()
```

```csharp
...
Account account = await account.GetAsync();
```
### 1.5. StreamEndPoint

This endpoint has methods for working with stream FutureBinance. You can start stream, delete strean and update stream's key

```csharp
AuthClient client = new AuthClient("apikey", "secretkey");
StreamEndPoint streamPoint = new StreamEndPoint(client); // only AuthClient
```

To get **your_listened_key** you need use method:

**StartAsync**

Close old connection tokens and create a new connection with token(listenKey)
```csharp
public Task<string> StartAsync()
```

Example
```csharp
AuthClient client = new AuthClient("apikey", "secretkey");
StreamEndPoint streamPoint = new StreamEndPoint(client); // only AuthClient
string listenKey = await streamPoint.StartAsync();
```

**DeleteAsync**

Close the connection
```csharp
public void DeleteAsync()
```

**KeepAliveAsync**

Update the connnection's token
```csharp
public void KeepAliveAsync()
```

Section with full description of stream located in page's bottom

## 2. Exception

In case of an error when requesting the exchange, an exception will be thrown **FutureBinanceAPI.Exceptions.APIException**

```csharp
try {
    ...
    Order newOrder = await order.SetAsync(marketOrder);
} catch (FutureBinanceAPI.Exceptions.APIException e)
{
    Console.WriteLine(e.Details.Msg);
    Console.WriteLine(e.Details.Code);
}
```

## 3. Custom requests

If a library doesn't have any methods, you can simple build your custom requests

**timestamp and recvWindow** will be set automatically

```csharp
public Request(Client client)
public Task<string> SendAsync(IEnumerable<KeyValuePair<string, string>> args, HttpMethod method, string endpoint)
```

```csharp
AuthClient authClient = new AuthClient("API_key", "Secret_key", true); // Create an auth client
DefaultClient defaultClient = new DefaultClient(true); // Create a default client

CustomRequest.Request customRequest = new CustomRequest.Request(authClient);
string response = await customRequest.SendAsync(null, HttpMethod.Get, "/fapi/v1/positionSide/dual");

Console.WriteLine(response); // Output in JSON
```

## 4. Stream

FutureBinance give an ability to listen events from their servers. And with a help this library, you can do it easily

First, create new API Client type - **StreamClient**. It use in conustrctor 2 parameters: **listenKey** and **webSocketUrl**

```csharp
StreamClient(string userListenKey)

StreamClient(string userListenKey, string webSocketUrl)
```

Examples:

```csharp
StreamClient client = StreamClinet("listenKey");
StreamClient specificClient = new StreamClient("listenKey", "newWebSocketUrl");
```

Second, create Stream object. It **allows** you register new event-callbacks
```csharp
StreamClient client = new StreamClient("listenKey");
Stream stream = new Stream(client);

stream.ConnectAsync((error) => {
    // You get created ClientWebSocket object
    Console.WriteLine('whoops..something error');
});

stream.Events.Add(new MarginListener((model) => {
    Console.WriteLine("event from marginListener");
    Console.WriteLine(model.EventType);
}));
```

A collection of Listeners:
```csharp
AccountUpdateListener
MarginListener
OrderTradeUpdateListener
StreamExpired
```

There are a basic listeners. You can create your custom listeners. Your listener need implemented interface **IEvent**

Important note: you have an ability to create custom listener, but they can implemented only basic event models: **StreamExpired, StreamMarginCall, OrderTradeUpdateCall, AccountUpdateCall**

In this example it shows custom listener
```csharp
public class MyListener : IListener
{
    #region Var
    public EventType Type => EventType.MARGIN_CALL;

    private Action<EventModel.StreamMarginCall> Callback { get; }
    #endregion

    #region Init
    public MyListener(Action<EventModel.StreamMarginCall> callback)
    {
        Callback = callback;
    }
    #endregion

    #region Methods
    public void Update(string message)
    {
        EventModel.StreamMarginCall parsedModel = JsonConvert.DeserializeObject<EventModel.StreamMarginCall>(message);

        // Here there is an ability to implemented somethings(check database, send request to api, change parsedModel and etc)

        UserCallback(parsedModel);
    }
    #endregion
}
```

```csharp
...
stream.Events.Add(new MyListener((model) => {
    Console.WriteLine(model);
});
```

repository: Coinist/FutureBinanceAPI

repo_name: Coinist/FutureBinanceAPI


text:
Nova::API
========
[![Circle Build Status](https://circleci.com/gh/coyosoftware/nova-api.png?style=shield)](https://circleci.com/gh/coyosoftware/nova-api)
[![Maintainability](https://api.codeclimate.com/v1/badges/4592d8beaac2e6a18839/maintainability)](https://codeclimate.com/github/coyosoftware/nova-api/maintainability)
[![Gem Version](https://badge.fury.io/rb/nova-api.svg)](http://badge.fury.io/rb/nova-api)
[![Downloads](https://img.shields.io/gem/dt/nova-api.svg?style=flat)](https://rubygems.org/gems/nova-api)

# Introduction

Gem to consume the [Nova.Money API](https://app.swaggerhub.com/apis-docs/coyosoftware/Nova.Money/v1)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'nova-api'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install nova-api

## Usage

First set your credentials and subdomain using the ```configure``` method of the ```Nova::API``` class:

```ruby
Nova::API.configure do |config|
  config.api_key = 'your-api-key'
  config.subdomain = 'your-subdomain'
end
```

After that you can start using the resources either by:

- Instantiating a new ```Nova::API::Client``` object;

or

- Using directly the available resource class (check the resources under [api/resource](lib/nova/api/resource) folder)

To know the operations that are supported by a resource, please check the resource source code under the [api/resource](lib/nova/api/resource) folder.

### Querying

For most of the query methods, you can pass either a Hash with the parameters described in the API documentation or, if you prefer an object oriented way, you can use the [SearchParams classes](lib/nova/api/search_params), that offer the same functionality but as an object.

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/coyosoftware/nova-api.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

repository: coyosoftware/nova-api

repo_name: coyosoftware/nova-api


text:
# HitWhileYouCan
---
[Prezi link to our presentation](https://prezi.com/view/KLqKBvHYRXNs3Kz3PKBh/ "Presentation")

---
## About the Game:
> This is the Game of two players, each getting 10 chances in which player have to score maximum.
> Player first have to roll the Dice, the number on which decides the number of chances player is going to get to hit the ball in order to score the goal.
> Player who scores maximum is declared as winner.

---
## To Run the program
* From Terminal, Clone this project into your PC:
    * git clone https://github.com/9sushantg/HitWhileYouCan---A-Game.git
* Change into the folder 'HitWhileYouCan' in the project directory and then run the following commands:
    * javac -d . *.java
    * java Game
* Check the video in the 'Sample Output' folder to watch the gameplay
---
This project has been done as a part of our OOPM Course Project.
## Members:
* 1711077 - Soham Gadhave
* 1711079 - Sushant Gharal
* 1711083 - Mohammedarshan Jada
---
## Thank You!


text:
---
title: Wavefront Release Notes
keywords:
tags: [release notes]
sidebar: doc_sidebar
permalink: wavefront_release_notes.html
summary: Learn about new and updated features in Wavefront.
---

These pages list new and updated features in the Wavefront service.
- [2020-30.x Release Notes](2020.30.x_release_notes.html)
- [2020-26.x Release Notes](2020.26.x_release_notes.html)
- [2020-22.x Release Notes](2020.22.x_release_notes.html)
- [2020-14.x Release Notes](2020.14.x_release_notes.html)
- [2020-10.x Release Notes](2020.10.x_release_notes.html)
- [2020-06.x Release Notes](2020.06.x_release_notes.html)
- [2019-52.x Release Notes](2019.52.x_release_notes.html)

For Wavefront Proxy, your go-to place is the [Wavefront proxy github page](https://GitHub.com/wavefrontHQ/java/releases). On that page, you can see releases in progress and GA versions. If proxy changes are important for the service, we update this doc set, for example, with new configuration parameters, ports, etc.

repository: srujann/docs

repo_name: srujann/docs


text:
---
layout: post
title: "1001 Martian Home - Venice Art Biennale 2017"
date: 2017-10-23
description:
image: /assets/images/2017_venice_biennale/venice_biennale_Italo_Rondinella3.jpg
author: Elian Daiva
tags:
  - Projection Mapping
  - TouchDesigner
  - RaspberryPi
  - Interactive Installations
---

One of the most significant project under Labtek Indie due to its high complexity and prestige. As part of production team for Tintin Wulia, representing Indonesian Pavilion for Venice Art Biennale 2017, we developed an identical, interactive contemporary art that was installed in Jakarta (Indonesia) and Venice (Italy). The more thorough explanation on the artwork can be read at this article on Jakarta Post. The artwork was built using Touchdesigner, network camera, raspberry pi, and thousands of LED.

![Placeholder](/assets/images/2017_venice_biennale/venice_biennale_Italo_Rondinella2.jpg)

Fig 1. The Under The Sun (Source: contemporaryartgroup/Italo Rondinella)

The systems were comprised of three separate installations. The Not Alone was built using Raspberry Pi which connects to led arrays, PIR sensors, and IoT comm protocols. PIR sensor senses every movement of attendance that sends message and light up the LEDs on another city simultaneously. People from different country could wave and try to communicate with each other from the "wormhole" projection that connects people in two countries. The camera and projection system was developed using a custom Touchdesigner program.

![Placeholder](/assets/images/2017_venice_biennale/venice_biennale_Italo_Rondinella.jpg#full)

Fig 2. Visitor Peeking the Hole (Source: contemporaryartgroup/Italo Rondinella)

"The Under The Sun" were built using Touchdesigner, connecting multi-arrays of big screens into the PC. The screen and its feeds were aligned with circular cutouts that were showing eyes videos, record the visitors who peek through the peephole at the end of staircases. The eyes recorded from the two countries were randomly distributed to the cutouts wall simultaneously.

![Placeholder](/assets/images/2017_venice_biennale/JakartaPost_Jerry Adiguna.jpg)

Fig 3. 1001 Martian Homes by Tintin Wulia (Source: The Jakarta Post/Jerry Adiguna)

The A Thousand and One Martian were built using Touchdesigner, playing a sequence of videos and narrations. The visitors are part of the stories when the videos are changed by the feed of the camera at site and/or camera at the other country.

1001 Martian Home by Tintin Wulia are presented from 13 May to 26 Nov 2017 on Biennale Arte 2017

Schedule :
Arsenale, Venezia 10.00 AM - 06.00 PM | Senayan City, Jakarta 16.00 - 22.00 WIB

Header Image Credit

1001 Martian Homes by Tintin Wulia (Source: contemporaryartgroup/Italo Rondinella)

Technical Team:

Adityo Pratomo - Tech Lead, Touchdesigner Programmer

Bagus Agung - Project Manager

Elian Daiva - Touchdesigner Programmer, Rapberry Pi Programmer

Aditya Rachman - Raspberry Pi Programmer, LEDs array system

Andyaningrum - LEDs array system

repository: elianalien/eliandaiva-site

extension: markdown

repo_name: elianalien/eliandaiva-site


text:
# Terraform::AWS::AutoscalingSchedule

Provides an AutoScaling Schedule resource.

## Properties

`AutoscalingGroupName` - (Required) The name or Amazon Resource Name (ARN) of the Auto Scaling group.

`ScheduledActionName` - (Required) The name of this scaling action.

`StartTime` - (Optional) The time for this action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ).
If you try to schedule your action in the past, Auto Scaling returns an error message.

`EndTime` - (Optional) The time for this action to end, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ).
If you try to schedule your action in the past, Auto Scaling returns an error message.

`Recurrence` - (Optional) The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format.

`MinSize` - (Optional) The minimum size for the Auto Scaling group. Default 0.
Set to -1 if you don't want to change the minimum size at the scheduled time.

`MaxSize` - (Optional) The maximum size for the Auto Scaling group. Default 0.
Set to -1 if you don't want to change the maximum size at the scheduled time.

`DesiredCapacity` - (Optional) The number of EC2 instances that should be running in the group. Default 0.  Set to -1 if you don't want to change the desired capacity at the scheduled time.

## See Also

* [aws_autoscaling_schedule](https://www.terraform.io/docs/providers/aws/r/autoscaling_schedule.html) in the _Terraform Provider Documentation_


text:
# Work-Day-Scheduler

A 9-to-5 work day planner made with JavaScript, JQuery, and Bootstrap.

When the user opens the planner the current day is displayed at the top. When the user scrolls down they are presented with time blocks for standard business hours. Each time block is color-coded to indicate whether it is in the past, present, or future. When a time block is clicked the user may enter an event. When the save button for the time block is clicked the information in the text box is saved to local storage. When the page is refreshed the saved event persists.

Link to deployed page HERE!

Technologies used:

JAVASCRIPT, HTML, CSS

Credits:

Helen Lindberg

Email<EMAIL_ADDRESS>GitHub Profile: https://github.com/HelenIL

repository: HelenIL/Work-Day-Scheduler

repo_name: HelenIL/Work-Day-Scheduler