text:
rog
===
![Rog Screenshot](http://github.com/ajhager/rog/raw/master/data/screenshot.png)

* 24bit color, unicode console with built in font.
* Cross platform windowing via github.com/skelterjohn/go.wde.
* Field of view, lighting, and pathfinding algorithms.

[Documentation](http://hagerbot.com/docs)

```go
package main

import (
    "github.com/ajhager/rog"
)

func main() {
    rog.Open(48, 32, "rog")
    for rog.IsOpen() {
        rog.Set(20, 15, nil, nil, "Hello, 世界")
        if rog.Key == rog.Escape {
            rog.Close()
        }
        rog.Flush()
    }
}
```

Notes
-----
* On Windows you can build your project with `go build -ldflags -Hwindowsgui` to inhibit the console window that pops up by default.

Thanks
------
* libTCOD [http://doryen.eptalys.net/libtcod/]
* John Asmuth [http://github.com/skelterjohn/go.wde]
* Yamamushi [http://www.theasciiproject.com/]

Plans
-----
* Better keyboard handling.
* World generation.
* User supplied font sets and tilemaps.
* Noise generators.
* Image scale and blitting.
* Console to console blitting.
* Move console out into a separate package.
* Fold lighting into the library.
* Test suite.
* Fixes to default font, especially box drawing glyphs.

repository: uriel/rog

repo_name: uriel/rog


text:
# Breath: a disolved oxygen sensor and air pump control system.

# Status: prototype

This example uses the Atlas Scientific dissolved oxygen sensor. See their website for more info.

* [Product page](https://www.atlas-scientific.com/product_pages/kits/do_kit.html)
* [Documentation](http://atlas-scientific.com/_files/_datasheets/_circuit/DO_EZO_Datasheet.pdf)

As for the air pump, we are currently using an aquarium air pump which we control through a relay. If you don't want to cut any wires, you can use: http://www.powerswitchtail.com/Pages/default.aspx

Other suggestions are welcome.

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Introduction to Build Processes

##### _(Part I, Chapter 1)_

Well, _hello there!_ You've arrived at the directory for the code samples in the first chapter of the book.

This chapter is pretty code-light, and it's supposed to be! It's just the introductory chapter. Don't worry, [the next chapter][1] makes up for that, with **tons of code samples** for you to look at!

All samples are self-contained, ready to use, and sensibly documented.

### Contents

- [Lint Sample](https://github.com/buildfirst/buildfirst/tree/master/ch01/01_lint-sample)

For questions or feedback refer to my [contact information](https://github.com/buildfirst/buildfirst#feedback).

  [1]: https://github.com/buildfirst/buildfirst/tree/master/ch02

license: MIT

repository: amikeliunas/buildfirst

repo_name: amikeliunas/buildfirst


text:
# mic2key
Bind microphone input to the keyboard.
Set an interval, threshold value and virtual key code to trigger. The peak level recorded by the microphone over the specified interval is compared with the threshold in order to determine whether the key should be toggled or not.

Requires Windows Vista or later due to reliance on Windows APIs (`WASAPI`).
Only 32-bit float audio input is currently supported. Only the first channel is processed on multi-channel recording devices.

Usage: `mic2key <interval> <threshold>`

Project files are generated with Visual Studio 2017.


text:
# To-Do Lists
To-Do Lists Plugin for [Mantis BugTracker](https://www.mantisbt.org/) v1.2.
Allows users (e.g. developers) to manage to-do tasks within a bug report. Uses ajax requests ([Vue.js](http://vuejs.org/)).

## Install
- Download or clone the repository and place it under the MantisBT plugins folder.
- Rename the folder to ToDoLists
- Go to Manage - Manage Plugins and install the plugin.

## Requirements
- PHP >=5.4.0


text:
Server-side Swift with Vapor
===

##Install##

1. Install Xcode
2. Install brew

Install Vapor via brew:

	brew tap vapor/homebrew-tap
	brew update
	brew install vapor

Confirm:

	vapor --help

##Create new project##

	vapor new projectName --template=twostraws/vapor-clean

- `projectName`: The name of the new project to create.
- `twostraws`: The git user which provides the template.
- `vapor-clean`: The template to use, in this case a minimal working one.

Build:

	vapor build

Run (terminate via Ctrl+C):

	vapor run

Update after adding packages (also creates a Xcode project):

	vapor update

Creating a Xcode project manually:

	vapor xcode

Running via Xcode:

- Select the `Run` target.
- Choose `My Mac` as device.
- ⌘R

repository: indieSoftware/ShortManuals

repo_name: indieSoftware/ShortManuals


text:
---
title: Netlify
homepage: https://www.netlify.com
description: Netlify is a static website hosting provider.
twitter: netlify
freeplan: true
autodeployment: true
cosmicapplink: https://www.cosmicjs.com/apps/simple-vue-blog
pricing: https://www.netlify.com/pricing
---

From their [about page](https://www.netlify.com/about/):

Netlify is a web developer platform that multiplies productivity.

By unifying the elements of the modern decoupled web, from local development to advanced edge logic, Netlify enables a 10x faster path to much more performant, secure, and scalable websites and apps.

Our bet on the Jamstack is quickly coming true. The web is rapidly changing away from monolithic to decoupled apps, and web developers are storming ahead with more power than ever. Netlify is built to cater to that movement, and in just a few years we’ve on-boarded more than half a million businesses and developers, and are building and serving millions of web projects daily around the globe.

Fun fact: in the time it took you to read the above, Netlify served over 350,000 requests.

repository: cvrajeesh/staticwebsitehosting

gha_license_id: MIT

repo_name: cvrajeesh/staticwebsitehosting


text:
Puppet
=========

Installs and configures hosts as either CA Masters or non-CA Masters.

Requirements
------------

Although there are no requirements for this role there are some for Puppet. Ensure your environment meets those requirements.

Role Variables
--------------

```yml
puppet_version_install: 3

puppet_ca_master:
  certname: "puppetmaster.localdomain"
  server: "puppetmaster.localdomain"
  alt_dns_names: "puppetmaster"

puppet_non_ca_masters:
  - hostname: "creation.localdomain"
    alt_dns_names: "creation"
  - hostname: "revenge.localdomain"
    alt_dns_names: "revenge"

puppet_modules:
  - name: puppetlabs-firewall
    version: 1.9.0

puppet_autosign_certificates:
  - "blade.localdomain"
  - "decapitron.localdomain"
  - "pinhead.localdomain"
  - "jester.localdomain"
```
- **puppet_version_install**: What version to install: 3, 4, or 5.
- **puppet_ca_master**: Contains configuration information pertaining to the CA master.
  - **certname**: Host name of the server.
  - **server**: The server name.
  - **alt_dns_names**: Alternative names of the server.
- **puppet_non_ca_masters**: A list containing the hostname and alternative DNS names for non-CA puppet servers.
- **puppet_modules**: A dictionary of puppet modules to install using `puppet module install {{ name }} --version={{ version }}`
- **puppet_autosign_certificates**: A list of a hosts that the master should sign the certificate for automatically.

Dependencies
------------

None.

Example Playbook
----------------

**Inventory File**
```
[puppetmasters]
puppetmaster
creation
revenge
```

**Playbook Example**
```
- name: Puppetmaster Playbook
  hosts: puppetmasters
  roles:
    - puppet
```

License
-------

BSD

repository: the-paulus/puppet

repo_name: the-paulus/puppet


text:
## Panoscene

A 360° video panoramic scenery explorer. Built with [A-Frame](https://aframe.io).

### Explore Panoscene

repository: BarakChamo/panoscene

repo_name: BarakChamo/panoscene


text:
<!--[meta]
section: tutorials
title: Custom fields
order: 5
[meta]-->

# Custom Field: `Stars`

In this tutorial we will be creating a simple custom Field Type for star ratings ⭐ ⭐ ⭐ ⭐ ⭐!

For this component, our data requirements are simple, we need to store an Integer that represents the number of stars. We can extend the built-in Integer type to leverage its implementation and provide only custom behaviour and UI components where necessary.

## Defining The Field Type

This is what our custom field's directory will look like once we're finished:

```sh
.
└── Stars
    ├── index.js
    ├── Implementation.js
    └── views
        ├── Cell.js
        ├── Field.js
        ├── Filter.js
        ├── Stars.js
        ├── star-empty.svg
        └── star-full.svg
```

Custom fields should have an `index.js` file which exports a field definition. The field definition pulls together all the parts that make up a field including front-end and back-end code.

For our Stars field it looks something like this:

```js
const { Stars, MongoIntegerInterface, KnexIntegerInterface } = require('./Implementation');

const { Integer } = require('@keystonejs/fields');

module.exports = {
  type: 'Stars',
  implementation: Stars,
  adapters: {
    mongoose: MongoIntegerInterface,
    knex: KnexIntegerInterface,
  },
  views: {
    Controller: Integer.views.Controller,
    Field: require.resolve('./views/Field'),
    Filter: Integer.views.Filter,
    Cell: require.resolve('./views/Cell'),
  },
};
```

The `implementation` and `adapters` reference back-end code used by Keystone, and everything under `views`, references front-end code used in either the Admin UI or GraphQL apps.

You may have realised now that front-end and back-end code cannot be bundled together in the same file. That's why we use `require.resolve` to provide a string value rather than importing front-end code. The string value is a reference to the location of the files. Keystone has a special build step that compiles front-end code for field types.

Note: If you want to package field types for use outside your own project, there are additional step involved, however these are outside the scope of this tutorial.

## Implementation

Let's start by looking at `Implementation.js`.

```js
const { Integer } = require('@keystonejs/fields');

class Stars extends Integer.implementation {
  extendAdminMeta(meta) {
    return { ...meta, starCount: this.config.starCount || 5 };
  }
}

module.exports = {
  Stars,
  MongoIntegerInterface: Integer.adapters.mongoose,
  KnexIntegerInterface: Integer.adapters.knex,
};
```

It's convention with existing field types to export the field implementation class, together with the adapter interfaces.

Adapters provide an interface between our field and the database. Here we define how a queries and mutations should be translated into SQL or MongoDB actions. Again, as our implementation for the Stars is going to be the same as the Integer field type, we can just re-export the adapters for the Integer field type.

We're not changing anything about how the data is stored, so for now we're just going to going to re-export the adapters for the `Integer` field.

The implementation class is used in the Keystone back-end. It defines a number of things. Firstly, the GraphQL interface including types, queries and resolvers; secondly, field properties such as if a field is orderable; and finally, what data Keystone should pass to the Admin UI.

For our Stars field, the only thing we want to change from the `Integer` implementation is to add configuration option for the number of stars. Because of this we can `extend` the `Integer` implementation class and override the method `extendAdminMeta`.

### Views

Now that we've got the back-end interface in place let's look at the UI components.

This normally starts with the controller. The controller defines how front-end features work, including: filtering, default values, serialization of data, label resolvers and some GraphQl options. In our example filtering, default values and controller aspect will all be the same as the `Integer` field. So once again, we're just going to reference the Integer controller.

**Note**: `Integer.views.Controller` will also resolve to a path within the `node_modules` folder and will also be bundled by Keystone at build time.

The rest of the views relate to React components rendered in the Admin UI. We can start by creating a generic `<Stars>` component that will render a number of stars, either solid or outlined, depending on the count and value props. So, a 3 stars out of 5 rating would look like this:

```jsx
  <Stars count={5} value={3}>
```

You can find an example of this component in the [custom-fields demo project](https://github.com/keystonejs/keystone/tree/master/examples/custom-fields/fields/Stars/views/Stars.js).

Once we have a component for star ratings we can use this in Keystone.

#### Cell

The cell component is rendered in a table that shows a list of items the in Keystone Admin UI. We're going to use the star component we made. Our cell component is going to make use of the data, which will be the integer value, and the `starCount` field config option we added in the Implementation.js file. You can interact with the cell so we don't provide any `onChange` prop to the component.

```jsx title=/views/Cell.js
/** @jsx jsx */

import { jsx } from '@emotion/core';
import Stars from './Stars';

export default function StarsCell({ field, data }) {
  const { starCount } = field.config;
  return <Stars count={starCount} value={data} />;
}
```

## Field

The field component provides the main interface used when creating or editing list items in Keystone. To get a consistent look, we're going to import some wrapping components from `@arch-ui/fields`, that's Keystone's UI library. This will render the labels and provided consistent spacing. Other than this we simply delegate the `onChange` event to the `Stars` so that values can be updated when a user clicks on the stars.

```jsx
/** @jsx jsx */

import { jsx } from '@emotion/core';
import { FieldContainer, FieldLabel, FieldInput } from '@arch-ui/fields';
import Stars from './Stars';

const StarsField = ({ field, value, errors, onChange }) => (
  <FieldContainer>
    <FieldLabel htmlFor={`ks-input-${field.path}`} field={field} errors={errors} />
    <FieldInput>
      <Stars count={field.config.starCount} value={value} onChange={onChange} />
    </FieldInput>
  </FieldContainer>
);
export default StarsField;
```

That's it, we now have a basic custom field.

## Next Steps

Take a look at this example and others in the [custom-fields demo project](https://github.com/keystonejs/keystone/tree/master/examples/custom-fields/) in the Keystone repository.

repository: ivawzh/keystone

repo_name: ivawzh/keystone


text:
# Pyrenula microtheca R. C. Harris SPECIES

#### Status
ACCEPTED

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

#### Published in
Mem. N. Y. bot. Gdn 49: 96 (1989)

#### Original name
Parathelium microcarpum Riddle

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Bitforce Jalapeno + Raspberry Pi + cgminer
- Sam
- darkFunction
- 2013/07/25
- Hardware
- published

My BFL Jalapeno finally arrived.  It's a cute little box but the fan is really whirring away, so I ordered [a replacement](http://www.amazon.co.uk/gp/product/B009LELXQG/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1).  It's sitting in the living room plugged into a Pi which is also acting as a backup file server.  I'm monitoring cgminer on this box through my VPS which has a tmux screen pane devoted to it, so that I can keep an eye on it without having to login all the time.  It's steady around 42°C and 5.3Gh/s.

![cgminer screenshot](images/cgminer.png)

[Web monitor for this miner](http://stinkydigit.darkfunction.com/miner.php)

repository: darkFunction/dropplets

repo_name: darkFunction/dropplets


text:
# Rapture JSON

## Features

 - Clean, intuitive, unintrusive, boilerplate-free Scala API
 - Trivial extraction and serialization to/from primitives, collections and case classes
 - Consistent and typesafe type-class-based interfaces
 - Works with a choice of JSON parsers and backends
 - Simple, efficient conversion between different backends
 - Support for both immutable and mutable JSON
 - Flexible choice of error handling strategies using
   [modes](https://github.com/propensive/rapture-core)
 - Can be easily extended using composable user-defined extractors and
   serializers

# Using Rapture JSON

## JSON Representation

Rapture JSON is designed to be agnostic about the JSON parser and choice of AST
representation used throughout the library. This means that a choice of JSON
backend must be made in order to use Rapture JSON. Whilst different backend
libraries provide different features, all features of Rapture JSON are
available with every backend (with the exception of Jackson, which does not yet
support mutable JSON operations).

The choice of backend should therefore depend on other characteristics such as
performance, memory usage, required dependencies, integration with existing
libraries, licensing and policy choices.

The following backends are available:

 - Argonaut (`argonaut`)
 - Jackson (`jackson`) [1]
 - Jawn (`jawn`)
 - JFC (`jfc`)
 - JSON4S (`json4s`)
 - Lift (`lift`)
 - Play (`play`)
 - Scala standard library JSON (`scalaJson`) [2]
 - Spray (`spray`)

Notes:
 [1] Jackson (`jackson`) is a read-only backend (does not support mutable JSON, i.e. `JsonBuffer` is not supported).
 [2] Scala standard library JSON (`scalaJson`) backend got removed in v2.0.0 because it is deprecated.

It is also possible to integrate with other JSON backends, though this is not
covered by this document. Anyone interested should look at the existing
integration type classes, and contact the Rapture mailing list or the Gitter
channel.

In the source code, you should import `rapture.json.jsonBackends.<backend>._`.

## The Json type

A JSON value, whether an array, object, boolean, number or string, is
represented by an instance of type `Json`. As JSON is inherently
dynamically-typed, the `Json` type is used to provide a safe and immutable
wrapper around the JSON tree, whose type is not known at compile time.

Instances of `Json` consist of three things:

 - a reference to the root of a dynamically-typed JSON tree
 - a path into a node within the JSON tree
 - a reference to the parser used to create, modify and read the JSON tree

Although using `Json` objects should seem very intuitive, it is important to
understand the purpose of this state.

```json
{
  "fruits": [
    {
      "name": "apple",
      "color": "red"
    },
    {
      "name": "banana",
      "color": "yellow"
    }
  ]
}
```

If we were to parse the above JSON source, we should get a tree consisting of
an object containing an array under the key "fruits", with two elements, each
of which is an object containing two fields, "name" and "color", both of which
are strings. Given this tree, we can refer to an element within with a path of
strings for indexing JSON objects, and integers for indexing JSON arrays, for
example, `fruits / 0 / name`, which would refer to the string `"apple"`.

We could also look into the same tree with the path `fruits / 3 / mass`, though
this wouldn't exist on account of there being only two elements in the `fruits`
list, but we would not know this until we attempted it at runtime.

A `Json` instance represents both the JSON tree, and a lazily-evaluated path
into that tree, which may or may not point to a value. If we assume the full
JSON tree is a starting point (most likely originating from being parsed from
source), `Json` instances can be created which hold the same reference to the
original tree, but point -- by means of a path -- to any subtree of the
original, without the performance cost of navigating the tree, or the
requirement to safely handle missing-value or type-mismatch errors which arise
because the path attempts to access a value which isn't available.

At some later point, if the JSON is to yield some useful data which we can do
interesting things with, we will need to perform the access, and assign a Scala
type to it, as it passes from the dynamic to the static world. It is at this
point that all access failures will arise, so by deferring them to a single
point, they can be handled just once.

Additionally, every `Json` instance stores a reference to the backend which was
used to create it, and which will be used to access it. As Rapture JSON permits
multiple different parsers to be used alongside each other, it is important
that the AST within each `Json` instance is always handled using the right
backend.

## Accessing JSON values

`Json` instances implement Scala's `Dynamic` trait, providing a very natural
way to refer to object fields within a `Json` value just by calling that field
name as if it were a method on the `Json` instance. Additionally, integers may
be applied to index into arrays.

For example, using the example JSON above, we can create a new `Json` instance
pointing to the string `"yellow"` as follows:

```scala
json.fruits(1).color
```

Remember, this is just creating a pointer into the `"yellow"` value; it's not
been accessed yet.  To extract a value from a `Json` value, the `as` method is
used. `as` takes a single type parameter, and is the single point at which a
JSON type-mismatch or missing-value exception can occur.

```scala
json.fruits(1).color.as[String]
```

Rapture JSON uses Rapture Core's modes on the `as` method, thus allowing
failure cases to be handled using the preferred exception-handling strategy,
for example by throwing an exception or returning a `Try`. See the section on
error messages below.

Note that calling `toString`, as happens automatically after every evaluation
in the Scala REPL, *will* cause the AST to be accessed, but any errors will be
suppressed, and the `toString` method will return the string `"undefined"`.

A variety of types may be extracted from a `Json` value, including the
following:

 - Primitive types, such as `String`, `Int`, `Double` and `Boolean`
 - Scala collections of other extractable types, e.g. `List[Int]` or `Set[Int]`
 - Case classes, extracted by the names of their parameters, provided the type
   of every parameter is extractable
 - `Option`s, where `None` will be extracted if the element is missing or the
   wrong type
 - `Json` types -- the no-op extractor
 - Any other type for which an implicit `Extractor` exists in scope

These types compose, so it is possible to extract values of complex types like
`Option[Vector[MyCaseClass]]`.

## Creating JSON values

JSON values can be created in a number of different ways. If starting with a
JSON source, which will often be a `String` (but may be another type -- the
Jawn backend can parse directly from ByteBuffers, for example), we can call
`Json.parse(src)` to attempt to parse the source `src`.

`Json` values can also be created directly in code, using the `json` string
context, like so:

```scala
json"""{
  "fruit": "apple",
  "variants": ["cox", "braeburn"]
}"""
```

Much like an interpolated string, Scala expressions may be substituted into a
`json` string context, provided the expressions evaluate to a type which is
serializable to Json. Generally speaking, all types which can be extracted from
a `Json` value (primitives, collections, case classes, Json) can also be serialized,
like so:

```scala
val f = "apple"
json"""{
  "fruit": $f,
  "variants": ${List("cox", "braeburn")}
}"""
```

Any serializable type can also be converted to `Json` by applying it to the
`Json` object, for example this,

```scala
case class Fruit(name: String, variants: Set[String])
Json(Fruit("apple", Set("cox", "braeburn")))
```

will produce the same JSON as the previous examples.

An instructive compile error will be displayed in the event of an attempt to
serialize a type which cannot be serialized to `Json`.

## Pattern matching on JSON

An alternative way of extracting values from `Json` types in to use pattern
matching. A `Json` value can be pattern matched against JSON literals defined
inline in the case clause, like this:

```scala
val json: Json = Json.parse(src)
json match {
  case json""" { "fruit": $name }""" =>
    name.as[String]
  case json""" { "vegetable": $name }""" =>
    name.as[String]
}
```

This will first attempt to match any JSON object which contains a key called
`fruit`, and bind the value to the identifier `name`. If that match fails, it
will attempt to match any JSON object which contains a key called `vegetable`,
and likewise bind its value to `name`. In each case, we return the name as a
`String`. The call to `.as[String]` is necessary because, as before, the
compiler will no know nothing about the nature of the type at compile time, so
it must be explicitly specified.

Literal match values may also be explicitly specified, for example:

```scala
val json: Json = Json.parse(src)
json match {
  case json""" { "fruit": "apple", "variety": $vs }""" =>
    vs.as[Set[String]]
  case json""" { "fruit": "lemon" }""" =>
    Set()
}
```

Multiple values may be extracted, and the pattern match expression may involve
arbitrarily-deep object and array nesting.

The examples above use the default configuration for structural pattern
matching, however three configuration explicits control the strictness of
structural pattern matching.

 - `patternMatching.exactObjects._`
 - `patternMatching.exactArrays._`
 - `patternMatching.exact._`

If it is required that pattern matching on JSON objects should match the entire
object, i.e. the existence of any keys in the object which are not specified in
the pattern should result in failure to match, then include the following
import somewhere within the scope of the pattern match:

```scala
import patternMatching.exactObjects._
```

By default, array elements specified in a pattern are matched positionally, and
superfluous array elements in the tail of the array are ignored, and the match
will be successful. If strict array matching is required, include:

```scala
import patternMatching.exactArrays._
```

If exact matching of both arrays and objects is required, then it is sufficient
to import

```scala
import patternMatching.exact._
```

## Modifying `Json`

Whatever underlying backend is used, the `Json` type is immutable. A small
number of methods are provided to create new `Json` values from existing
values. Given a `Json` value, a new key may be added using the following
syntax:

```scala
val j = json"""{ "fruit": "plum" }"""
j.copy(_.color = "purple")
```

This syntax is designed to resemble the syntax for adding a value to a
`scala.collection.Map`, whereby the tuple passed to the `+` operator contains a
key and a value, resulting in the addition of this value to the map. However,
with `Json` types, the "key" is a path into the `Json` structure, and the
"value" is the value to be serialized to JSON and stored at that position in
the JSON tree.

The `++` operator can be used to combine two JSON structures, like so:

```scala
val j1 = json"""{ "fruit": { "name": "grape" } }"""
val j2 = json"""{ "fruit": { "color": "white" } }"""
val json = j1 ++ j2
```

The resultant `json` value would be

```json
{
  "fruit": {
    "name": "grape",
    "color": "white"
  }
}
```

Currently, when merging, object keys from both sides will be merged, favoring
the right side in the event of a clash, and arrays will be concatenated. If the
types of corresponding values do not match, the value from the right side will
clobber that from the left. In a later version of Rapture JSON, more control
over mechanisms for combining and merging `Json` values may be provided through
configuration implicits.

## Error messages

By default, failures in Rapture JSON operations will result in an exception
being thrown, however, alternative exception handling methods can be used with
a simple import from the Rapture Core project which will determine the return
type of all fallible methods such as `Json.parse` and `as`. For example,

```scala
import rapture.core._
import modes.returnTry._
Json.parse(src)
```

will result in the return type of `Json.parse` changing from `Json` to
`Try[Json]`, safely capturing any failures which may result from the operation.

All Rapture JSON methods will throw a limited set of possible exceptions, which
are implemented as case classes inheriting from a sealed trait. If choosing to
use the `captureExceptions` mode, or another mode which captures the exception
and tracks the exception type in its signature, this allows exhaustivity
checking to be performed on errors, for example:

```scala
import modes.returnEither._
json.fruit.as[String] match {
  case Right(f) =>
    s"Found fruit $f"
  case Left(TypeMismatchException(found, _, _)) =>
    s"Fruit was the wrong type: $found"
  case Left(MissingValueException(path)) =>
    s"Fruit value was missing at path $path"
}
```

If either of the final two case clauses were omitted from this pattern match,
the compiler will issue a warning that the match may not be exhaustive.

## Mutable JSON

In the same way that the `List` type from the Scala collections library has a
corresponding mutable `ListBuffer` type, the `Json` type has a corresponding
`JsonBuffer` type, which supports mutability in addition to the operations
described above. The functionality of `JsonBuffer` is a strict superset of the
functionality of `Json`.

An empty `JsonBuffer` may be created with

```scala
val jb = JsonBuffer.empty
```

and can be mutated with instructions such as

```scala
jb.fruit.name = "apple"
jb.fruit.color = "green"
jb.fruit.varieties = List("cox")
```

resulting in

```json
{
  "fruit": {
    "name": "apple",
    "color": "green",
    "varieties": ["cox"]
  }
}
```

Note that the top-level `fruit` object gets automatically created by the first
instruction, and that the right-hand side of the assignment is serialized to
JSON using Rapture's standard serialization scheme, causing a compile-time
error if the type cannot be serialized.

It is additionally possible to append items to the end of an array using the
`+=` operator, like this:

```scala
jb.fruit.varieties += "braeburn"
```

Note that it is required to
```scala
import rapture.json.dictionaries.dynamic._
```
or define a dictionary
```scala
implicit val dict = rapture.data.Dictionary.define("name", "color", "varieties", ...)
```
in order to compile your code. It goes part of the way towards ensuring you don't write `colour` when you meant `color`.

Mutable JSON is not yet available for all backends, though this work is in
progress. Note that the underlying JSON backend does not need to be inherently
mutable to support mutable JSON. If a backend which uses an immutable AST is
used, Rapture JSON will efficiently perform the necessary tree manipulations,
updating references as necessary to give the impression of a mutable data
structure. However, using a backend which uses a mutable JSON representation
will likely result in better performance.

## Converting JSON

All JSON values are represented by the same Scala type, `Json`, regardless of
whether they represents a JSON object, array, string, number or boolean, and
regardless of which backend was used to create it.

In order to combine two `Json` values, which may be represented using different
ASTs, it is sometimes necessary to convert the internal representations of the
JSON values from one backend to another. In all cases, this happens seamlessly
when required.

For example, given the two values `j1` and `j2`,

```scala
import jsonBackends.jawn._
val j1: Json = json"""{ "foo": "bar" }"""
import jsonBackends.jfc._
val j2: Json = json"""{ "baz": "quux" }"""
```

the two JSON objects can be merged with `j1 ++ j2`. This will traverse the AST
of the value `j2`, converting it from a JFC to a Jawn representation, and then
merge it with the value `j1` to produce a `Json` value, represented as a Jawn
AST.

Likewise, substitutions into other JSON values will invoke conversions, as
necessary. So, given the previous two values `j1` and `j2`, we could substitute
both into a new JSON object (represented by some third backend AST), and each
will be converted to the new AST representation.

```scala
import jsonBackends.argonaut._
val j3 = json"""{ "j1": $j1, "j2": $j2 }"""
```

Sometimes it is useful to eagerly force conversion of a `Json` value to the
current JSON backend. This can be achieved in one of two ways:

 - extract a `Json` type from the existing `Json` value, i.e.
   `jsonValue.as[Json]`
 - construct a new `Json` value from the existing `Json` value, i.e.
   `Json(jsonValue)`

These operations are equivalent, and usage is a matter of personal taste. If
the value `jsonValue` is already represented by the currently-scoped JSON
backend, these operations will be no-ops.

Given that conversion happens seamlessly, on demand, the detail of which AST is
used to represent the JSON is abstracted away from the user. It can, however,
be revealed in a couple of ways:

 - extracting an `Any` from the `Json` value using `jsonValue.as[Any]`; this
   returns the underlying representation of the JSON value
 - getting the `JsonAst` from the `Json` value using `Json.ast(jsonValue)`

## Outputting JSON

Often, the easiest way to output JSON from the `Json` type is to call
`.toString` on the `Json` value. Although simple, this has the disadvantages
that it does not offer any flexibility in how the JSON is formatted, and it
always returns a `String` whereas other types, such as an input stream may be
more appropriate for some applications.

The more general method is to use the `Json.format` method, with an appropriate
implicit `Formatter` in scope. Two formatters are provided as standard:

 - `formatters.humanReadable._`, which formats the JSON with newlines and
   indentation, attempting to make it as readable as possible,
 - `formatters.compact._`, which includes no unnecessary whitespace

Both formatters return `String`s, though it is possible for other backends to
provide their own formatters for outputting to other types.

For example,

```scala
import formatters.compact._
val out = Json.format(json)
```

## Defining custom extractors and serializers

In order to be able to extract or serialize values of a particular Scala type,
`T` to or from JSON, an implicit instance of `Extractor[T]` or `Serializer[T]`
must be available in scope.

### Extractors

The easiest way to define an `Extractor` for a particular type is to start with
an existing extractor, e.g. the `String` extractor, by summoning it with
`Json.extractor[String]`. Extractors are functors, so you can `map` across the
extractor to produce a new extractor for a different type. For example, to
create an extractor for `java.util.Date`s, where these are stored as numbers in
the JSON, we can write:

```scala
implicit val dateExtractor = Json.extractor[Long].map(new java.util.Date(_))
```

and it then becomes possible to extract a date, e.g.

```scala
val j = json"""{ "start":<PHONE_NUMBER>000 }"""
val d = j.start.as[java.util.Date]
```

Often, the most useful starting point for defining a new extractor is the no-op
`Json` extractor, `Json.extractor[Json]`. This allows definitions such as:

```scala
implicit val rangeExt = Json.extractor[Json].map { j =>
  Range(j.start.as[Int], j.end.as[Int])
}
```

or

```scala
implicit val msgExtractor = Json.extractor[Json].map {
  case json"""{ "ignore": true }""" =>
    None
  case json"""{ "message": $msg, "ignore": false }""" =>
    Some(Message(str.as[String]))
}
```

### Serializers

Likewise, `Serializer`s are cofunctors, so new serializers may be created by
`contramap`ping across an existing serializer. We can summon the serializer for
a type `T` with `Json.serializer[T]`. To produce a serializer for a type `S`
from this serializer, we need to provide the `contramap` method with a function
`S => T`, though because Scala's type system can't infer the type `S` from a
function literal, we need to specify this type explicitly to the `contramap`
method.

Here's an example:

```scala
implicit val exceptionSerializer = Json.serializer[String].contramap[Exception] { e =>
  s"${e.getClass.getName}: ${e.getMessage}"
}
```

The existence of this implicit serializer will then result in any `Exception`
being serialized to a representative `String`, anywhere it needs to be
converted into a `Json` value.

As with `Extractor`s, the `Json` serializer is often a useful starting point:

```scala
implicit val eitherSerializer = Json.serializer[Json].contramap[Either[String, Int]] {
  case Left(s) =>
    json"""{ "branch": "left", "value": $s }"""
  case Right(i) =>
    json"""{ "branch": "right", "value": $i }"""
}
```

### Fallback extractors

Extractors may sometimes encounter JSON data that doesn't fit their expected
pattern, and result in failure. It can be useful to provide alternative
extractors for JSON in the event that the first one fails. Extractors can be
composed in this way using the `orElse` combinator.

For example, the following extractor redefines the `Int` extractor to also
accept integers provided as JSON strings as a fallback option:

```scala
implicit val intExt = Json.extractor[Int] orElse Json.extractor[String].map(_.toInt)
```

Hopefully this demonstrates the concise and readable syntax Rapture JSON uses
for defining extractors and serializers, and the ease with which they can be
composed and transformed.

repository: propensive/rapture

branch_name: refs/heads/dev

gha_language: Scala

repo_name: propensive/rapture


text:
# nur-packages

**My personal [NUR](https://github.com/nix-community/NUR) repository**

[![Build and populate cache](https://github.com/plabadens/nur-packages/actions/workflows/build.yml/badge.svg)](https://github.com/plabadens/nur-packages/actions/workflows/build.yml)
[![Cachix Cache](https://img.shields.io/badge/cachix-plabadens-blue.svg)](https://plabadens.cachix.org)

repository: nix-community/nur-combined

gha_language: Nix

repo_name: nix-community/nur-combined


text:
{
  "title": "This fig in the Appendix of @kjhealy's data-viz 📕is great! 👉 \"How to read an R help page\" https://t.co/jW5udmmHz3 #rstats (cc @kierisi) https://t.co/pKkPu45vgV",
  "date": "2018-04-07"
}

# rstats

> **** (@; 99/24): This fig in the Appendix of @kjhealy's data-viz 📕is great!
👉 "How to read an R help page"
https://t.co/jW5udmmHz3 #rstats (cc @kierisi) https://t.co/pKkPu45vgV  [↪](https://twitter.com/dataandme/status/982664813443715072)

<!-- -->

> **** (@; 50/32): Writing better R functions part one – April 6, 2018 https://t.co/JFoyk2St4Z #rstats #DataScience  [↪](https://twitter.com/dataandme/status/982682027496497152)

<!-- -->

> **** (@; 30/10): #rstats echarts4r built-in brush & sliders: https://t.co/CLap7TBAtv https://t.co/TcaCdQWMHa  [↪](https://twitter.com/dataandme/status/982616561184903168)

<!-- -->

> **** (@; 29/15): Access your data in Google BigQuery with Python and R https://t.co/L6lQgDLz6y #rstats #DataScience  [↪](https://twitter.com/dataandme/status/982674425630904321)

<!-- -->

> **** (@; 20/16): Disproportionality between votes that parties win in parliamentary #elections and seats they are given
>
idea: @medzihorsky
fyi @littvay @simonjhix  @johncarey03755
>
#hungaryelections  #Valasztas2018 #valasztas  #Europe
#rstats #data #dataviz #maps #DataScience https://t.co/bisnAYLKYd  [↪](https://twitter.com/dataandme/status/982645725078147076)

<!-- -->

> **** (@; 13/21): MapD Adds Cloud-Scale Infrastructure.  #BigData #DeepLearning #MachineLearning #DataScience #AI #Cloud #CloudComputing #Analytics #Python #TensorFlow #RStats #RLang #ApacheKafka #Hadoop #BI #GeoSpatial #GIS #BlockChain #CryptoCurrency #FinTech #BitCoin
https://t.co/LcIrudclQy https://t.co/rWn2XGNEj8  [↪](https://twitter.com/dataandme/status/982657256276791296)

<!-- -->

> **** (@; 12/9): Review of #MachineLearning A-Z™ Hands-On #Python & #R in #DataScience
>
https://t.co/qKEopzf8Cm
>
#DataScientist #DataScientists #DeepLearning #rstats #AI #ArtificialIntelligence #Hadoop #Review #education #development #BigData #Analytics #IoT #IIoT #Training https://t.co/HqGk1BWUzv  [↪](https://twitter.com/dataandme/status/982686947608027136)

<!-- -->

> **** (@; 11/6): magrittr and wrapr Pipes in R, an Examination https://t.co/dF9fsIDUPN #rstats #DataScience  [↪](https://twitter.com/dataandme/status/982701168534138881)

<!-- -->

> **** (@; 11/3): ggseqlogo by @omarwagih :
>
"ggseqlogo offers native illustration of publication-ready DNA, RNA and protein sequence logos in a highly customizable fashion with features including multi-logo plots, qualitative and quantitative colour schemes...."
>
https://t.co/WCS9dCuLdi
>
#rstats https://t.co/VD2TXoqf1n  [↪](https://twitter.com/dataandme/status/982645502683566080)

<!-- -->

> **** (@; 10/10): #Review of #DeepLearning A-Z™ Hands-On Artificial #NeuralNetworks
>
https://t.co/eto1VuRdnM
>
#DataScience #DataScientist #rstats #AI #ArtificialIntelligence #Analytics #BigData #IoT #IIoT #tech #ML #dataviz #DataAnalytics #BusinessIntelligence #IndustrialIoT #InternetOfThings https://t.co/pjmXt3UGDh  [↪](https://twitter.com/dataandme/status/982694504221126656)

<!-- -->

> **** (@; 9/10): The smaller the p-value, the higher the likelihood ratio: true or false? https://t.co/vtIMAtcfke #rstats #DataScience  [↪](https://twitter.com/dataandme/status/982691943011553280)

<!-- -->

> **** (@; 9/5): Amazing data analysis for social good. #rstats #bigdata #statistics  #rbloggers  https://t.co/HvfMJusQhs https://t.co/cMY9kqyO5A  [↪](https://twitter.com/dataandme/status/982622263789760512)

<!-- -->

> **** (@; 7/5): Keep up with new developments from @NumFOCUS sponsored projects — join our monthly email newsletter: https://t.co/DQ8VOTWYun
>
#python #pydata #julialang #rstats #bayesian #bigdata #machinelearning #dataviz #openscience #opendata #opensource #oss #datascience https://t.co/Jvp3w1xdjq  [↪](https://twitter.com/dataandme/status/982706230216019970)

<!-- -->

> **** (@; 6/6): AdTech on #Azure. #BigData #MachineLearning #DataScience #AI #HDInsight #Hadoop #AzureSQLDatabase #AzureSQLWarehouse #IoT #DataLakes #RStats #RLang #MongoDB #NoSQL #EdgeComputing #EdgeAnalytics
https://t.co/dXxtGSCryO https://t.co/SEXh1yySlf  [↪](https://twitter.com/dataandme/status/982642161933053953)

<!-- -->

> **** (@; 5/3): A couple useful #rstats packages for downloading datasets from massive university repos
>
(Harvard) Dataverse: https://t.co/5fNOyDVVOV
(Michigan) ICPSR: https://t.co/ISKazxjDGY  [↪](https://twitter.com/dataandme/status/982656507492884481)

<!-- -->

> **** (@; 5/1): In 2008, I was introduced to #rstats for the first time.  It didn't click and I didn't touch it again for 4 years.
>
Now, I write #rstats code every day - and I imagine many others have similar stories thanks to the @rstudio crew and the #tidyverse https://t.co/rfHXtzrtZA  [↪](https://twitter.com/dataandme/status/982714792803741696)

<!-- -->

> **** (@; 4/2): Did you want to create deep learning models? Here's a  step-by-step tutorial using #TensorFlow and #rstats: https://t.co/UIiPOOAfgw via @n_ashutosh #datascience https://t.co/zkjidbMIVo  [↪](https://twitter.com/dataandme/status/982680676859342848)

<!-- -->

> **** (@; 3/3): Looking for some #PyData community? Join or launch a meetup chapter near you! 87 chapters, 38 countries and counting: https://t.co/78Dag9p2pw
>
#python #pydata #julialang #rstats #bayesian #ai #machinelearning #dataviz #openscience #opendata #opensource #datascience https://t.co/NJU5dSh3yi  [↪](https://twitter.com/dataandme/status/982702441299931136)

<!-- -->

> **** (@; 3/3): Como extrair comentários e os trechos de texto comentados de arquivos `.docx` pelo #rstats usando o pacote ` @hrbrmstr / docxtractr` https://t.co/HpJNQUROUJ  [↪](https://twitter.com/dataandme/status/982679335156043777)

<!-- -->

> **** (@; 3/3): #geostatistics simulation provides spatial heterogeneity models accounting for uncertainty. Here's a guided workflow in #rstats (#gstat) in #rmarkdown for sequential Gaussian simulation w. realization visualization & minimum acceptance checks, on #github for my students & ∀. https://t.co/NkAm9BIUsH  [↪](https://twitter.com/dataandme/status/982646837160169472)

<!-- -->

> **** (@; 3/2): This is amazing! @GlasgowQStep @sgallacher65 @JoFerrie @ExeterQStep @OxfordQstep @WQStep @QStepEdinburgh @QStepLeeds @qstepbristol #rstats #Qstep https://t.co/KK0faysGYo  [↪](https://twitter.com/dataandme/status/982672108441473025)

<!-- -->

> **** (@; 3/1): I can't wait! 😄😄😄
#RLadies #rstats https://t.co/MAnpkea0aq  [↪](https://twitter.com/dataandme/status/982664126051815424)

<!-- -->

> **** (@; 3/0): I got a msg asking q’s on my #RStats heatmap tutorial. He apologized for being a #noob. UM NO! we should all be noobs at many things to keep learning. Even the #rstars have to be noobs at many of the 14k packages on  CRAN! Ps I live my life in a constant state of noobness https://t.co/4baOn2Cn0l  [↪](https://twitter.com/dataandme/status/982646268274073601)

<!-- -->

> **** (@; 2/3): Year vs number of home runs: what's going on around 1920? @CMUAnalytics #baseball #Rstats https://t.co/oEG9S7dSS3  [↪](https://twitter.com/dataandme/status/982637026666262529)

<!-- -->

> **** (@; 2/2): There is a village on a hill
Where your dreams reside.
>
Climb.
>
Keep climbing.
>
Be bold.
>
Be courageous.
>
Make a difference in the world!!
>
.
.
.
.
https://t.co/7cFz5vXHLy
>
#innovation #chooselove #rstats #martech #fintech #marketing #DigitalTransformation #ceo #cio #cmo  [↪](https://twitter.com/dataandme/status/982694055606915072)

<!-- -->

> **** (@; 2/2): I've been keeping a running doc for a while of resources (mostly R) that I (or others) have found helpful in learning data science over the past couple of years. Now they are on Github! https://t.co/iaMSFxAZKK #DataScience #rstats  [↪](https://twitter.com/dataandme/status/982653598638145536)

<!-- -->

> **** (@; 2/1): 17 Best #ArtificialIntelligence Courses To Standout in The Future
>
https://t.co/nL1PCTYBh3
>
#AI #DataScientist #DataScientists #DataScience #BigData #Analytics #BigDataAnalytics #IoT #IIoT #Industry40 #rstats #R #tech #Python #Robots #Bots #Robotics #DeepLearning #MachineLearning https://t.co/uyqcg4VWUb  [↪](https://twitter.com/dataandme/status/982709609621327874)

<!-- -->

> **** (@; 2/1): Support the #opensource #datascience tools you use every day — become a NumFOCUS member!
>
https://t.co/1JT8FzHcnl
>
#python #pydata #julialang #rstats #bayesian #bigdata #machinelearning #dataviz #openscience #opendata https://t.co/nstjCBkh9i  [↪](https://twitter.com/dataandme/status/982702148000604164)

<!-- -->

> **** (@; 2/1): Not quite sure how I ended up spending the day playing in #rstats instead of leaving the house.  Even though it looks like "Stool" package.
https://t.co/fW1ZATUQgl https://t.co/EY5nvhdxLg  [↪](https://twitter.com/dataandme/status/982628918652952577)

<!-- -->

> **** (@; 1/3): #rstats #dataviz
>
R tutorials made with psychologists in mind
Testing Indirect Effects/Mediation in R
Testing Conditional Indirect Effects in R
Probing and Plotting Interactions in R
>
https://t.co/DIdiU74kG4  [↪](https://twitter.com/dataandme/status/982654012511092736)

<!-- -->

> **** (@; 1/2): "Create with Carol Heppner"  is out! https://t.co/1r5H9lUrYv Stories via @Boondockfinds @AthenaGreyson @Kmax2go #rstats #networkmarketing  [↪](https://twitter.com/dataandme/status/982677403196588032)

<!-- -->

> **** (@; 1/1): Starting to open source some of my Intro to #Sociology teaching materials - mostly local data from #StLouis and #Missouri - each repo will include #opendata, #rstats code, and pre-made maps/plots. First up - map blood lead level test results for #STL https://t.co/fdBagVb5xe  [↪](https://twitter.com/dataandme/status/982705760101720064)

<!-- -->

> **** (@; 1/1): A quick #rstats post on gsubfn’s anonymous function utilities: https://t.co/0HQDmBF3la h/t @BrodieGaslam  [↪](https://twitter.com/dataandme/status/982700452440608768)

<!-- -->

> **** (@; 1/1): Invited talk at conference in honor of Charlie Geyer.  I ☠Was☠ Terrified. #UMNStatistics #irsa #rstats #Rladies  [↪](https://twitter.com/dataandme/status/982668740524412929)

<!-- -->

> **** (@; 1/1): #NASA develops #DecisionTree #algorithm to assess risk of #landslides every half hour based on susceptibility map of terrain and #satellite imagery of #precipitation.
>
#ML #geology #python #Rstats
https://t.co/vuGcJ3IEAx  [↪](https://twitter.com/dataandme/status/982663226281226245)

<!-- -->

> **** (@; 1/1): The problem is often that “tinkering” to figure stuff out itself requires a fairly complete mental model for how the code is working in the first place. #rstats  [↪](https://twitter.com/dataandme/status/982655875021029376)

<!-- -->

> **** (@; 1/1): When making slide decks with xaringan, what are some favorite tool/ssoftware for making nice-looking graphics? I'm looking to convert some old PPTs but quick, decent graphics are one of the few advantages to WYSIWYG. #rstats  [↪](https://twitter.com/dataandme/status/982654418981216258)

<!-- -->

> **** (@; 1/1): When a student emails you with a question you answered in class, you: #rstats  [↪](https://twitter.com/dataandme/status/982647717422706689)

<!-- -->

> **** (@; 1/0): Just got the hex stickers for our elective in Applied Information Science for Healthcare Professionals @ucsflibdatasci #rstats https://t.co/ZYvBA32jpE  [↪](https://twitter.com/dataandme/status/982688582199472128)

<!-- -->

> **** (@; 1/0): Posted by R on https://t.co/VOHPMqApBQ, now on R-bloggers: Us Monthly Births #rstats https://t.co/Ban4Qk8oRG  [↪](https://twitter.com/dataandme/status/982687054302720000)

<!-- -->

> **** (@; 1/0): Putting actual data points on boxplots gives a better perspective on the data. An example from our working paper. #rstats #dataviz https://t.co/9bg4DHbyLk  [↪](https://twitter.com/dataandme/status/982657020292673538)

<!-- -->

> **** (@; 1/0): A very good presentation. Alex smoothly introduced the theoretical basis for his work, and gracefully explained niche modelling and boosted regression trees. #VTGBCB #seminar #Bioinformatics #rstats https://t.co/JktONrxwf5  [↪](https://twitter.com/dataandme/status/982629516068773889)

<!-- -->

> **** (@; 0/2): Apr 20-21 2018 NYC #Econometrics #Software #Rstats User #Conference @StatModeling and many others. #MachineLearning https://t.co/95tc85fyg9  [↪](https://twitter.com/dataandme/status/982670091115483137)

<!-- -->

> **** (@; 0/1): Hi , Does anybody here in #rstats community have a finance background and willing to help? I have a favor to ask :)  [↪](https://twitter.com/dataandme/status/982716383908827136)

<!-- -->

> **** (@; 0/1): This is a good viz summary of how to read/use R help page, thanks to @kjhealy #rstats https://t.co/adSCPtsULE  [↪](https://twitter.com/dataandme/status/982715748551405568)

<!-- -->

> **** (@; 0/1): Acaba de salir Ciencia EDocet  https://t.co/lhtC8CT0oM #rstats #datascience  [↪](https://twitter.com/dataandme/status/982713230224252928)

<!-- -->

> **** (@; 0/1): Im interested to discuss/talk to any Project manager + data scientists that have been involved in managing #datascience projects within the #lean #agile and #kanaban frames..
Im curios to see how my methodology is different or similar to what others are doing
#rstats  [↪](https://twitter.com/dataandme/status/982705897901383682)

<!-- -->

> **** (@; 0/1): Accediendo a BigQuery con #R, #rstats y #r4ds con los servicios de #GoogleCloud. Gracias a @GDGBurgos por enseñarnos el #GoogleCloudDay ....
 Very impressive line-up indeed. Happy to see there are quite a few folks with a #socialscience background.
#DataScience #mrx #rstats #rstatsnyc https://t.co/xlrS27tWsU  [↪](https://twitter.com/dataandme/status/982630293659160576)

<!-- -->

> **** (@; 0/1): Following Popper's thoughts on #falsifiability isn't it questionable that the null hypothesis often says that there is no relationship even our assumption is the opposite? How do you think about this? #rstats  [↪](https://twitter.com/dataandme/status/982622449215856641)

<!-- -->

> **** (@; 0/0): First tidy data, now list-columns - #rstats is making my brain hurt
 Luckily there are many great tutorials, like this one:
https://t.co/z6mOQtMhip  [↪](https://twitter.com/dataandme/status/982717321855819776)

<!-- -->

> **** (@; 0/0): Rbloggers R Spatial Resources https://t.co/dBGqRAFSrt #Rstats #DataScience  [↪](https://twitter.com/dataandme/status/982710778087313410)

<!-- -->

> **** (@; 0/0): New post: Five more SQL commands and their #rstats equivalents: https://t.co/AHnta3jelo  [↪](https://twitter.com/dataandme/status/982709893303078913)

<!-- -->

> **** (@; 0/0): Animation of #MLS Supporters' Shield Standings prior to #ATLvLAFC kickoff. #rstats https://t.co/3E3REH0INq  [↪](https://twitter.com/dataandme/status/982702891344584705)

<!-- -->

> **** (@; 0/0): However, I was pleased to find a new R Package by @cehkmop  - https://t.co/FKj6ayunjB which takes a simple concept of moving averages and makes them forecastable! #rstats https://t.co/C5LqQj5D85  [↪](https://twitter.com/dataandme/status/982702521771790338)

<!-- -->

> **** (@; 0/0): Immigration is a hot topic in most western countries - here is a closer look at the proportions in Denmark - now and projected until 2060. GIF adapted from @DataCamp (with some tweeks) using R and with publicly available data from Statistics Denmark #rstats #dataviz #dkpol https://t.co/lUiHPDxyZB  [↪](https://twitter.com/dataandme/status/982696802850955264)

<!-- -->

> **** (@; 0/0): A chart is worth a thousand coefficients. Visualizing regression models in #rstats. @stata @IBMSPSS  https://t.co/NySDpJMmok  [↪](https://twitter.com/dataandme/status/982695516294168577)

<!-- -->

> **** (@; 0/0): #rdata #rstats: Data From a Acoustic-Phonetic Continuous Speech Corpus - https://t.co/s1qn97ccEm  [↪](https://twitter.com/dataandme/status/982695349444898822)

<!-- -->

> **** (@; 0/0): Ever wanted to split up big commits retrospectively because you committed a mess? #git reset HEAD~ and the @rstudio git tool that let's you commit individual chunks is your friend. #rstats  https://t.co/wOCCDBuRST https://t.co/2s86nCWqfv  [↪](https://twitter.com/dataandme/status/982688223993520129)

<!-- -->

> **** (@; 0/0): @drob @robinson_es I think this is one the best examples why ggplot2 shines at plotting in #rstats.  [↪](https://twitter.com/dataandme/status/982680226823098368)

<!-- -->

> **** (@; 0/0): At a very informative and informative talk on Statcast data by @BaseballRstats  #rstats https://t.co/AdR8UcA56W  [↪](https://twitter.com/dataandme/status/982665932228177921)

<!-- -->

> **** (@; 0/0): #rstats https://t.co/weezvcYKoE  [↪](https://twitter.com/dataandme/status/982665338629144577)

<!-- -->

> **** (@; 0/0): The Travelling Salesman Portrait https://t.co/hJW8prrd9i via @aschinchon #DataScience #dataviz #rstats  [↪](https://twitter.com/dataandme/status/982664304829722627)

<!-- -->

> **** (@; 0/0): Proper application of this meme #rstats https://t.co/Oq9EYXS761  [↪](https://twitter.com/dataandme/status/982661758031507456)

<!-- -->

> **** (@; 0/0): A quick #rstats question: is it possible to use fuzzyjoin package to create a function that will act similar to dplyr::distinct() but in a fuzzy way for character columns? @drob  [↪](https://twitter.com/dataandme/status/982660627394187266)

<!-- -->

> **** (@; 0/0): Replication code with jittering: https://t.co/B6peGKyQnc #rstats #dataviz https://t.co/8tPo68zw9P  [↪](https://twitter.com/dataandme/status/982657408353931266)

<!-- -->

> **** (@; 0/0): @cathrine98 @RLangTip There are a lot of resources for R out there, but I haven’t seen one that addresses this specific issue yet... Can anyone help an #rstatsnewbie out? #rstats @dataandme @nicoleradziwill @hadleywickham  [↪](https://twitter.com/dataandme/status/982651274171645952)

<!-- -->

> **** (@; 0/0): Rbloggers New R job: Product Owner (Data Science) (m/f) https://t.co/gGxho3OxVV #rstats #DataScience #jobs  [↪](https://twitter.com/dataandme/status/982650345645133825)

<!-- -->

> **** (@; 0/0): #AprilTTRPGMaker Day 7. My workspace. Big computer, occult symbols, #rstats cheatsheets, rpg character sheets, custom Cthulhu homebrew of #Skull, toxic waste sour candy, one-armed cyberman mini, dice, inspirational books for osmosis into my mind. https://t.co/0wr97isTxR  [↪](https://twitter.com/dataandme/status/982644874309718016)

<!-- -->

> **** (@; 0/0): Read my Apr 7 Newsletter featuring “Take a Sad Plot & Make It Better” by @apreshill #DataViz @Rstats https://t.co/V50I38cfHJ  [↪](https://twitter.com/dataandme/status/982628273749352451)

<!-- -->

> **** (@; 0/0): Naming things might be one of computer science's hard things, but from naming your #rstats function or #Adwords campaign, to defining hierarchies for your #ecommerce site, names & taxonomy are important. That's why this book looks great: https://t.co/HFaSsRXGqS #PPC #DataScience  [↪](https://twitter.com/dataandme/status/982621559213973504)

<!-- -->

repository: batpigandme/twitter-blogdown

repo_name: batpigandme/twitter-blogdown


text:
# serial_bridge
Point-to-point UART through WiFi on esp8266.
Ready to use in PlatformIO with Arduino framework.

# Setting
  If setting not found or pin D0(GPIO16) pulled up to VCC been start "setting mode"
  esp start AP with name SSID password 12345678.

  Page with setting http://<IP_ADDRESS>/.

  AP - if checked, up Fi-Wi AP and create tcp-server(<IP_ADDRESS>:2000), else connect to WiFI and to tcp-server.

  for AP mode:
    host, port - not use.

  for STA mode:
    host, port - for tcp client by default use <IP_ADDRESS>:2000.


text:
[![PyPI Version](https://img.shields.io/pypi/v/KeynoteSlideStopwatch)](https://pypi.org/project/KeynoteSlideStopwatch/)
[![License](https://img.shields.io/github/license/casiez/KeynoteSlideStopwatch)](LICENSE)

# Keynote Slide Stopwatch

Allows to measure the time spent on each slide during a presentation with Apple Keynote.

Install using ```pip install keynoteSlideStopwatch --upgrade```

1. run ```keynoteSlideStopwatch``` from a terminal
1. play your presentation. The time spent on a slide is automatically measured from the previous slide change to the next one.

The time spent for each slide will appear in the terminal as such:

```
Press CTRL+C to quit
slide 8 - 00:16
slide 9 - 00:10
slide 10 - 00:03
slide 11 - 00:10
Total - 00:00:39
```

Limitations:
- the time for the first slide displayed is not measured
- navigating slides backwards is not supported yet

repository: casiez/KeynoteSlideStopwatch

repo_name: casiez/KeynoteSlideStopwatch


text:
# vt-nativescript-todo
A basic todo list application stub written for nativescript using typescript

## to start

install nativescript CLI:

`npm i -g nativescript`

run the NativeScript diagnostic to make sure that all dependencies are available
(this will require either/both the Android SDK (windows/mac/linux) and/or XCode and
CocoaPods (mac));

`tns doctor`

clone the repo

`git clone git@github.com:AdamAtri/vt-nativescript-todo.git`

start the app

`cd vt-nativescript-todo && npm install`

then

`tns run android` or `tns run ios`

repository: AdamAtri/vt-nativescript-todo

gha_language: JavaScript

repo_name: AdamAtri/vt-nativescript-todo


text:
---
layout: post
title:  "GovTech Partners with Eight Institutes of Higher Learning to Develop Deep Technical Capabilities in Students to Help Build a Smart Nation"
permalink: /media/media-releases/govtech-partners-with-eight-institutes-of-higher-learning-to-develop-deep-technical-capabilities
date: 2017-02-13
---
The Government Technology Agency of Singapore (GovTech) announced the signing of six individual Memorandums of Understanding (MOU), and two Memorandums of Intent (MOI) with eight Institutes of Higher Learning (IHLs) today.

These agreements between GovTech and each IHL will share a common goal – to develop the technology ecosystem by enhancing the capabilities and competencies of the students, IHLs, and commercial entities through opportunities offered by the public sector to work on smart technologies.

### **Providing Hands-on Opportunities for over 300 Students**
GovTech aims to provide training opportunities for over 300 students, through these agreements. GovTech will provide students exposure through internships, attachments, final-year projects, and tech-related competitions in which they will work on technological solutions for problems faced by public agencies. Students will also be invited to seminars, workshops and courses organised by GovTech. They will work on areas including cyber security, data analytics, internet-of-things and other emerging technologies. Such work exposure aims to complement the recent Committee on the Future Economy recommendations for young workers to attain deep skills and industry-relevant expertise in order to give them an edge in a technology driven future.

The IHLs (in alphabetical order) are:
* Institute of Technical Education
* Nanyang Polytechnic
* Ngee Ann Polytechnic
* Republic Polytechnic
* Singapore Institute of Technology
* Singapore Polytechnic
* Singapore University of Technology and Design
* Temasek Polytechnic

### **Integrating the IHLs into the Current Partnership Ecosystem**

GovTech will continue to tap on its current InnoLeap programme, which provides platforms for IHLs, Research Institutes (RIs) and commercial entities to work together to transform challenges faced by public agencies into innovative solutions in a technology ecosystem. The sharing of such challenges is carried out through thematic workshops, sharing sessions and one-to-one consultation clinics. Since its launch in August 2014, InnoLeap has conducted 21 sessions, involving about 1,000 participants from over 70 organisations and close to 90 public agencies. GovTech will work closely with these eight IHLs in the subsequent sessions.

Ms Jacqueline Poh, Chief Executive, GovTech, said, “We believe that an active partnership between public agencies, academia and commercial entities can help us create the best digital services for citizens and smart solutions for our city. This set of agreements will not only give us the opportunity to do that, but also allow us to help develop our next generation of tech talent, which is key to building Singapore into a Smart Nation. ”

---

**ISSUED BY GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE**

---

### **Related Resources:**
* [Annex A – Factsheet on MOU/MOIs with IHLs](/files/media/media-releases/2017/02/Annex A MOU Factsheet.pdf)
* [Annex B – Factsheet on InnoLeap](/files/media/media-releases/2017/02/Annex B InnoLeap Factsheet.pdf)
* [Annex C – Quotes from IHLs](/files/media/media-releases/2017/02/Annex C Quotes From IHLs.pdf)

### **About Government Technology Agency of Singapore**
The Government Technology Agency of Singapore (GovTech) is a statutory board formed in October 2016 after the restructuring of the Infocomm Development Authority.

GovTech works with public agencies to develop and deliver secure digital services and applied technology to individuals and businesses in Singapore. GovTech builds key platforms and solutions needed to support Singapore as a Smart Nation. As a leading centre for information communications technology and related engineering such as the Internet of Things, GovTech also enhances the capabilities of the Singapore Government in these domains.

For more information, please visit tech.gov.sg or follow us on Facebook.com/GovTechSG and Twitter @GovTechSG.

### **For media clarification**
Dexian WANG (Mr)

Assistant Manager, Communications & Marketing Group

GovTech

DID: (65) 6211 1666

Email<EMAIL_ADDRESS>

Kenneth TAN (Mr)

Manager, Communications & Marketing Group

GovTech

DID: (65) 6211 1600

Email<EMAIL_ADDRESS>

repository: isomerpages/isomerpages-govtech

branch_name: refs/heads/staging

gha_language: SCSS

gha_license_id: NOASSERTION

repo_name: isomerpages/isomerpages-govtech


text:
A json parser and path finding tool written in ocaml.

## Build from source
1. Clone this repository
2. Create opam switch
```
$ opam switch create . ocaml-base-compiler.4.09.0
```
3. Setup
```
$ make install
```
4. Build
```
$ make build
```
5. Use
```
$ ./jsn JSON_FILE PATH_SPECIFIER
```
where `JSON_FILE` is some json file which you would like to parse
and `PATH_SPECIFIER` is some xpath-like json path specifier which
you would like to find.

Ex:
```
// test.json

{
  "b": "bbb",
  "c": "ccc",
  "d": [ "a","d" ],
  "e": { "yes": "no" }
}
```
Running `./jsn json_samples/test.json ".d[0]"` would result in `"a"`

repository: tedpaulsen/jsn

branch_name: refs/heads/main

repo_name: tedpaulsen/jsn


text:
docker-sriov-plugin
=========================

### Overview

This network plugin allows to have direct/passthrough access to the native Ethernet networking device to the Docker container(s).
It provides two modes of operations.

(1) sriov (default)

    In this mode given netdev interface is used as PCIe physical function to define a network.
    All container instances will get one PCIe VF based network device when they are started.
    This mode uses PCIe SRIOV capability of the network devices.

    sriov mode provides native access to the actual PCIe based networking device without any overheads of virtual devices.
    With this mode, every container can get dedicated NIC Tx and Rx queues to send receive application data without any contention
    to other containers.

    In sriov mode, plugin driver takes care to enable/disable sriov, assigning VF based network device to container during
    starting a container. This will reduce administrative overheads in dealing with sriov enablement.

(2) passthrough

    In this mode given netdev interface is mapped to a container.
    Which means that there is one network device per network, and therefore every container gets one network.

    In some cases there would be need to map bonded device directly without additional layer and without consuming any
    extra mac address. In such cases this passthrough plugin driver will be equally useful.

In some sense both modes are similar to passthrough mode of KVM or similar virtualization technology.

With this plugin based interfaces, there is no limitation of IP address subnet for netdevice of container and netdevice of host.
Any container can have any ip address, same or different subnet as that of host or other containers.

In future more settings for each such netdevice and network will be added.

### Usecases

(a) In certain use cases where high performance networking application running as container can benefit from such native devices.

(b) It is probably good fit for NFV applications which can benefit of hardware based isolation, NIC adapter based switching, granular control of the device, possibly at lower cpu utilization.

(c) nested virtualization - where macvlan or ipvlan based nested containers on top of VF based network interface

(d) When using InfiniBand (not RoCE), IPoIB VF netdevices can be directly mapped as passthrough devices without creating additional virtual devices.

(e) RDMA vHCA can be used with Docker containers using this plugin.

### QuickStart Instructions

The quickstart instructions describe how to start the plugin and make use of it.

**1.** Make sure you are using Docker 1.9 or later

**2.** Get the new plugin

```
$ docker pull rdma/sriov-plugin
```

**3.** Run the plugin now
```
$ docker run -v /run/docker/plugins:/run/docker/plugins -v /etc/docker:/etc/docker -v /var/run:/var/run --net=host --privileged rdma/sriov-plugin
```
This will start the container and emits console logs of the plugin where its started.
The powerful aspect of this is, it doesn't require user/administrator to restart the docker engine.

This persists the network configuration in /etc/docker/mellanox directory.

**4.** Test it out - SRIOV mode

**4.1** Now you are ready to create a new network

Below ens2f0 is PF based netdevice.
Mode is set to sriov, so plugin driver will automatically assign right VF netdevice
to container when a container is started.
Subnet of the netdevice of container and host can be different.

```
$ docker network create -d sriov --subnet=<IP_ADDRESS>/24 -o netdevice=ens2f0 mynet
```

**4.2** Now you are ready run container to make use of passthrough-sriov network and its interface
```
$ docker run --net=mynet -itd --name=web nginx

```

**4.3** Multi tenant support in SRIOV mode

There might be a need to isolate containers to groups/tenants.
This plugin allows to create vlan based layer 2 networks.
Every new container started in a particular network is isolated from other network.
Below two commands creates two networks.
Each network is identified with vlan. vlan usage is completely transparent to running container applications.
customer1 has vlan 100.
customer2 has vlan 200.
All containers created in customer1 belong to vlan 100 and cannot talk to containers running in customer2 network which is in vlan 200.

```
$ docker network create -d sriov --subnet=<IP_ADDRESS>/24 -o netdevice=ens2f0 -o vlan=100 customer1
```

```
$ docker network create -d sriov --subnet=<IP_ADDRESS>/24 -o netdevice=ens2f0 -o vlan=200 customer2
```

```
$ docker run --net=customer1 -itd --name=web nginx
```

```
$ docker run --net=customer2 -itd --name=web nginx
```

**4.4** Secure networks

By default this plugin creates unprivileged networks. This means all containers in such network will not be able to perform spoof attack or sniff packets of other containers.
This plugin uses such hardware offload features for spoofing attacks.

However certain trusted network services running using DPDK or other frameworks would need to modify L2 addresses.
To enable access for trusted applications network should be created using 'privileged' option.
Below command created privileged network. All containers running in this network will have access to modify L2 addresses and also sniff traffic.

```
$ docker network create -d sriov --subnet=<IP_ADDRESS>/24 -o netdevice=ens2f0 -o vlan=100 -o privileged=1 customer1
```

**4.5** Selecting specific VF based on MAC address for a container

There might be a need for a user to choose a specific VF from the available pool.
This is supported based on specifing the MAC address while starting a container.

```
$ docker run --net=customer1 --mac-address=<valid_mac_address_of_desired_vf> -itd --name=web nginx
```

**5.** Test it out Passthrough mode

**5.1** Now you are ready to create a new network

```
$ docker network create -d sriov --subnet=<IP_ADDRESS>/24 -o netdevice=ens2f0 -o mode=passthrough mynet
```

**5.2** Now you are ready run container to make use of passthrough network and its interface
```
$ docker run --net=mynet -itd --name=web nginx

```

**6.** Network Creation options list

1. netdevice - PF/parent network device to use for creating netdevice interfaces
2. mode - passthrough/sriov
3. vlan - vlan offload to use for child netdevices
4. privileged - indicating privileged network that can sniff packets, and modify L2 addresses
5. prefix - prefix of the interface name within the container (default: "eth")

### Limitations

It supported on Linux environment on x86_64 and ppc64le platforms.

repository: psaab/docker-sriov-plugin

gha_language: Go

repo_name: psaab/docker-sriov-plugin


text:
pic-obstacle-mapping
====================

This is a PIC18 based robotic vehicle. The purpose of the vehicle is to explore an area for obstacles. Any found obstacle is reported to a PC via Bluetooth, and the PC in real time marks them on a map.


text:
---
layout: post
published: true
title: The Dark Monk by Oliver Pötzsch
subtitle: The Hangman's Daughter Series - Book Two by Oliver Pötzsch
date: '2017-07-03'
tags:
  - Books
  - Review
  - 'Pötzsch, Oliver'
---
## Book Review
### The Dark Monk (A Hangman's Daughter Tale Book 2) by Oliver Pötzsch
Purchase Price: **£1.00 - 16th August 2014**

Amazon Current Price: **Kindle £3.98 Paperback £8.99**

Other options are available.

###### Review of Kindle version

I purchased [The Dark Monk](http://amzn.to/2t5PwFc) after reading [The Hangman's Daughter](http://amzn.to/2teZCBZ).  I am loving this series set in seventeenth-century Bavaria.  I wonder if the books are made more enjoyable by the fact that the author is a descendant of the eponymous hangman, Jakob Kuisl.

The Dark Monk is an exploration of ancient churches, almost a treasure hunt of churches found through cryptic clues.  Lurking in the background is the mysticism of The Templars, and a race to find ancient treasure.

Of course, these books would be incomplete without depictions of medieval torture and execution.  There is a description of the horrors of execution on the wheel.  Jacob Kuisl is portrayed as a family man, just doing a job, and doing it as humanely as possible.

The book ends with a depiction of how to Rfind places in the book today.  This could be useful for anyone intending to tour Bavaria.

I am looking forward to reading the next episode of this great series.


text:
# Rack::XRay

This RubyGem provides a Rack middleware that collects HTTP request-tracing data
and sends it to an AWS X-Ray daemon via UDP.

X-Ray is most useful when timing information is transmitted from both the
client and server sides of a segment; although this gem provides no direct
support for client tracing, it populates thread-local storage with segment
information, readable via `Rack::XRay.segment`, which can be used as the
basis for client instrumentation.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rack-x_ray'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rack-x_ray

## Usage

Install it like any other Rack middleware by adding a line to your `config.ru`:

```ruby
use Rack::XRay, 'my_microservice'
```

If the X-Ray daemon is listening elsewhere than `localhost:2000`, you will
need to provide some options.

```ruby
use Rack::XRay, 'my_microservice', daemon_address: 'xray', daemon_port: 2020
```

To access segment information for use within your own app:

```ruby
seg = Rack::XRay.segment # returns a Rack::XRay::Segment

seg.id # or name, type, trace_id, parent_id, and so forth
```

The local segment can be used to create subsegments and add tracing headers
to requests made by your process.

## Development

**NOTE:** as this is an expermiental project, there are presently no tests.
Integration testing has proven it to work well with the X-Ray private beta.

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/xeger/rack-x_ray. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

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


text:
# PseudoKiosk

[![Build Status](https://travis-ci.org/jonmchan/pseudo_kiosk.svg?branch=master)](https://travis-ci.org/jonmchan/pseudo_kiosk/) [![Coverage Status](https://coveralls.io/repos/github/jonmchan/pseudo_kiosk/badge.svg?branch=master)](https://coveralls.io/github/jonmchan/pseudo_kiosk?branch=master) [![Gem Version](https://badge.fury.io/rb/pseudo_kiosk.svg)](https://rubygems.org/gems/pseudo_kiosk) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

PseudoKiosk is a play on words on the unix sudo command and the idea to provide a fake kiosk terminal. Instead of granting elevated privileges, PseudoKiosk gives the ability to limit access to the application during workflows which involve physically passing a device with elevated permissions to an unknown or untrusted user. PseudoKiosk provides the ability to lock down a rails application to only a specified whitelist of endpoints during a session. The kiosk can be quickly and easily unlocked by passing a kiosk passcode.

The motivating user scenario for this is a mobile, tablet, or kiosk device where data input must be received from an untrusted user while the device is mainly used by a privileged user (such as a cashier in a POS system). With PseudoKiosk, the device can be safely passed to the end customer to input his/her own information without fear of accidently or malicously utilizing the main user's elevated privileges.

After the form has been successfully submitted, a simple friendly unlock screen is provided for the privileged user to quickly unlock the kiosk and continue the workflow.

## Demo

![](doc/pseudo_kiosk_demo.gif)

You can also clone this repository and run the test application.

```
git clone https://github.com/jonmchan/pseudo_kiosk.git
cd pseudo_kiosk
bundle install
bundle exec rails s
```

Open http://localhost:3000 and you should see the same demo above. Passcode is `abc`.

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'pseudo_kiosk'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install pseudo_kiosk
```

## Usage

Add the PseudoKiosk::Engine to your `config/routes.rb`:

```
mount PseudoKiosk::Engine => "/pseudo_kiosk"
```

Add the before_action script to check all requests if it is in protected or not by putting it in your `app/controller/application_controller.rb` file:

```
before_action :secure_pseudo_kiosk
```

Create an initializer to configure pseudo_kiosk in `config/initializers/pseudo_kiosk.rb`:

The unlock mechanism can be a simple unlock string such as:
```
PseudoKiosk::Config.configure do |config|
  config.unlock_mechanism = "abc"
end
```

Or it can be a lambda function:
```
PseudoKiosk::Config.configure do |config|
  config.unlock_mechanism = ->(controller_context, params) {
    return Digest::SHA256.base64digest(params[:passcode]) == controller_context.current_user.passcode_hash ? true : false
  }
end
```

The lambda function receives an instance of the controller which can be used to call functions such as current_user or session and all the params passed from the authentication unlock action. By default, the only parameter passed is `passcode`.

If you wish to override the default unlock screen, copy the [built in view](https://github.com/jonmchan/pseudo_kiosk/blob/master/app/views/pseudo_kiosk/authentication/unlock.html.erb) and put it in `app/views/pseudo_kiosk/authentication/unlock.html.erb`. Edit it to your heart's content.

### Core Functions

You can call any of these functions to go in and out of kiosk mode (refer to [code documentation](https://github.com/jonmchan/pseudo_kiosk/blob/master/lib/pseudo_kiosk/controller.rb))

* pseudo_kiosk_start(url_whitelist, unauthorized_endpoint_redirect_url)
* pseudo_kiosk_exit(unlock_redirect_url)
* clear_pseudo_kiosk_session

## Contributing
Feel free to submit PRs or Issues to the project's github page - https://github.com/jonmchan/pseudo_kiosk.

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

gha_language: Ruby


text:
# crypyto

crypyto [_**kri**-pahy-toh_] is a Python package that provides simple usage of cryptography tools and ciphers on your programs.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

* Python >= 2.7 / Python >= 3.0
* Python packages:
	* (unidecode)[https://pypi.org/project/Unidecode/] to normalize strings

You can install **unidecode** with pip:
```
pip install unidecode
```

### Installing

For now, you can clone this repository using git

```
git clone https://github.com/yanorestes/crypyto.git
```

## Usage

Ciphers crypyto supports:
* [Polybius Square](https://en.wikipedia.org/wiki/Polybius_square)

```python
>>> from ciphers import PolybiusSquare
>>> ps = PolybiusSquare(width=5, height=5)
>>> ps.encrypt('EncryptedMessage')
'5x5#5-1;3-3;3-1;2-4;4-5;5-3;4-4;5-1;4-1;2-3;5-1;3-4;3-4;1-1;2-2;5-1'
>>> ps.decrypt('5x5#5-1;3-3;3-1;2-4;4-5;5-3;4-4;5-1;4-1;2-3;5-1;3-4;3-4;1-1;2-2;5-1')
'ENCRYPTEDMESSAGE'
```
* [Atbash](https://en.wikipedia.org/wiki/Atbash)

```python
>>> from ciphers import Atbash
>>> atbash = Atbash()
>>> atbash.encrypt('Hello, world!')
'SVOOL, DLIOW!'
>>> atbash.decrypt('SVOOL, DLIOW!')
'HELLO, WORLD!'
```

* [Caesar cipher](https://en.wikipedia.org/wiki/Caesar_cipher)

```python
>>> from ciphers import Caesar
>>> caesar = Caesar(key=5)
>>> caesar.encrypt('Hello, world!')
'MJQQT, BTWQI!'
>>> caesar.decrypt('MJQQT, BTWQI!')
'HELLO, WORLD!'
>>> caesar.brute_force('MJQQT, BTWQI!')
NKRRU, CUXRJ!
OLSSV, DVYSK!
...
HELLO, WORLD!
IFMMP, XPSME!
...
```

* [ROT13](https://en.wikipedia.org/wiki/ROT13)

```python
>>> from ciphers import ROT13
>>> ROT13.encrypt('Hello, world!')
'URYYB, JBEYQ!'
>>> ROT13.encrypt('URYYB, JBEYQ!')
'HELLO, WORLD!'
```

Cipher crypyto will soon support:
* AFFINE
* RAIL FENCE
* KEYWORD
* BEAUFORT
* TEMPLAR
* PORTA
* VIGENERE
* GRONSFELD
* AUTOKEY
* BACON
* CHAOCIPHER
* ADFGVX
* PLAYFAIR
* FOUR-SQUARE
* ONE-TIME PAD
* BIFID
* HILL CIPHER
* ENIGMA

## Authors

* **Yan Orestes** - *Initial work* - [yanorestes](https://github.com/yanorestes)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

repository: oyurimatheus/crypyto

repo_name: oyurimatheus/crypyto


text:
# Configuring diagnostic, method trace and transaction tracking
You can use environment variables to enable/disable method trace and transaction tracking capabilities.
## Diagnostic
By default, diagnostic is disabled. To enable it, set the `KNJ_ENABLE_DEEPDIVE` variable to `True`.
## Method trace
By default, method trace is disabled. To enable it, set the `KNJ_ENABLE_METHODTRACE` variable to `True`.
## Transaction tracking
By default, transaction tracking is disabled. To enable it, set the `KNJ_ENABLE_TT` variable to `True`.

**Parent topic:** [Node.js Data Collector for IBM Application Performance Management (APM)](../README.md)

repository: IBMStockTraderDemo/tradr

repo_name: IBMStockTraderDemo/tradr


text:
# BUS python notebooks

This repository contains example python notebooks for parsing and processing BUS format single-cell RNA-seq files.
To run the notebooks, make sure you have `kallisto >= 0.45` and `bustools` installed. The source and binaries are available at:

[kallisto](https://pachterlab.github.io/kallisto/download)

[bustools](https://github.com/BUStools/bustools)

## Getting started

We recommend beginners work through this notebook:
#### [10x v2 chemistry - 6k Mixture of Fresh Frozen Human (HEK293T) and Mouse (NIH3T3) Cells](https://github.com/BUStools/BUS_notebooks_python/blob/master/dataset-notebooks/10x_hgmm_6k_v2chem_python/10x_hgmm_6k_v2chem.ipynb)

## Complete notebooks
These notebooks can be used to completely process datasets, starting with downloading the raw data all the way to basic QC plots. They are intended as tutorials on the use of the BUS format.

#### [10x v2 chemistry - 100 1:1 Mixture of Fresh Frozen Human (HEK293T) and Mouse (NIH3T3) Cells](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/10x_hgmm_100_python/10x_hgmm_100.ipynb)

#### [10x v2 chemistry - 1k Brain Cells from an E18 Mouse](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/10x_neuron_1k_v2chem_python/10x_neuron_1k_v2chem.ipynb)

#### [10x v3 chemistry - 1k Brain Cells from an E18 Mouse](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/10x_neuron_1k_v3chem_python/10x_neuron_1k_v3chem.ipynb)

## Notebooks in progress
These notebooks are still a work in progress and may not have all the code needed to download and process data automatically.

#### [10x v2 chemistry - 1k PBMCs from a Healthy Donor](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/10x_pbmc_1k_v2chem_python/10x_pbmc_1k_v2chem.ipynb)

#### [10x v3 chemistry - 1k PBMCs from a Healthy Donor](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/10x_pbmc_1k_v3chem_python/10x_pbmc_1k_v3chem.ipynb)

#### [dropseq - GSE63472 mouse retina](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/dropseq_GSE63472_python/dropseq_visual_cortex.ipynb)

#### [celseq1 - GSE62270 mouse intestinal cells](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/celseq1_GSE62270_python/celseq1_organoid.ipynb)

#### [inDrops - GSE102827 mouse visual cortex](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/indrops_GSM2746895_python/indrops_brain_activity.ipynb)

#### [Seq-Well - GSE92495 HEK/3T3 mixing, PBMCs, and TB-exposed Macrophages](https://github.com/BUStools/bustools-notebooks/blob/master/dataset-notebooks/seqwell_GSE92495_python/kallisto_seqwell_pbmc.ipynb)

#### [10x_v2_chemistry - 4k Pan T Cells from a Healthy Donor (From BUS to TCC and GC Matrix example)](https://github.com/BUStools/BUS_notebooks_python/blob/master/dataset-notebooks/10x_t4k_TCC/bus2tcc-gene.ipynb)


text:
# jquery.msb.js #

> *msb* manage button states, it means changing the label, css class, icon (animated or not), disabled attribute... I've writed this plugin to have a one line function to improve user experience during form submiting.

> It's my really first jQuery plugin, so any [help or suggestions](https://github.com/fchaussin/jquery-multi-state-button/issues) are welcome! ♥

### Demo

- See the [jquery.msb.js Getting Started Demo](https://codepen.io/fchaussin/pen/BwMMgm) with very basic exemples.
- [a real life exemple](https://codepen.io/fchaussin/pen/mBKjzO) with ajax submiting, states overriding, init callback, state updates, and updates callbacks...
- [Here a generic form demo](https://codepen.io/fchaussin/pen/EwdwRg), where button updates are defined with $.ajaxPrefilter
- All the CSS provided are for the icons animations [See all icons animations](https://codepen.io/fchaussin/pen/vejWKG)

### Features

- 5 (customizable) defaults states (default, success, error, warning, process)
- Add your custom states
- Update the button state on the fly
- Animated icons
- Callbacks
- Compatibility with *MaterializeCSS* and *Font-Awesome* icons collections
- Status Bar decoration

### Install

[jQuery](http://jquery.com/download/) is required, so include it first.
  Download [jquery.msb.js](https://raw.githubusercontent.com/fchaussin/jquery-multi-state-button/master/jquery.msb.js) and include the script in your HTML file:

> It looks really nice with [MaterializeCSS](https://github.com/Dogfalo/materialize) because default options are using *MaterializeCSS* Classes, but you can override the defaults states cssClass options with Twitter Bootstrap classes.
> *Glyph icons* and *Font Awesome* icons collections are planned to be supported.

### Usage

HTML

		cloud
		button

		cloud
		button label

		button without icon

	<button class="btn waves-effect waves-light" data-state="default">
		cloud
		button
	</button>

> Use the data attribute `data-state="stateName"` where `stateName` is a string registered in the `options` to identify which state will be set on init. If `data-state` isn't writen in the HTML, it will be automatically added and setted to `deafult` on jquery-msb init.

>  It's not recommanded to assign color classes in the HTML, you can set it in the `options` (`cssClass`) by *overriding states* or using *custom states*. All the classes you put in HTML are kept during all button updates. So if you have color classes in your HTML, it will be kept after button update and you will get a CSS conflict (2 color classes).

JAVASCRIPT

Default init

	$(function() {
		$('.btn').msb(options, callback);
	});
> *Where `options` and `callback` are optional parameters.*
> Once initialized, the button's label and icon are updated by the plugin. The initial button's classes are kept.

Custom state init

	$('.custom').msb({
		"customState": {
			"cssClass": "waves-effect waves-light pink",
			"label": "custom state",
			"icon": {
				"name": "help"
			},
			"disabled": true
		}
	});

Default state override init

	$('.override').msb({
		"success": {
			"icon": {
				"name": "thumb_up",
				"anim": "bounce"
			},
			"disabled": true
		},
		"process": {
			"cssClass": "yellow red-text",
			"label": "please wait...",
			"icon": {
				"name": "send",
				"anim": "fly"
				}
		    }
		}
	});

> You can partially init the options for `defaults states` or `custom states`, it will be merged with the default options.

Update button state

	$('a.msb').first().msb('update','success');
	$('button#submit)').msb('update','customState');

> Be careful to use the proper DOM selector if you have several .msb buttons in your document. The `id` attribute is the safer selector.
> After button init, the initial classes (writen in the HTML) of are kept (such as `btn, waves-effect, waves-light...`).
*More exemples in the [demo](https://codepen.io/fchaussin/pen/vejWKG).*

### Options

The default `options` are:

	  {
	    "default": {
	      "cssClass": "blue",
	      "label": "submit",
	      "icon": {
		"name": "send",
		"anim": false
	      },
	      "disabled": false,
	      "stateBar": ""
	    },
	    "success": {
	      "cssClass": "green",
	      "label": "sent",
	      "icon": {
		"name": "check",
		"anim": false
	      },
	      "disabled": true,
	      "stateBar": ""
	    },
	    "warning": {
	      "cssClass": "orange",
	      "label": "try again",
	      "icon": {
		"name": "warning",
		"anim": false
	      },
	      "disabled": false,
	      "stateBar": ""
	    },
	    "error": {
	      "cssClass": "red",
	      "label": "try again",
	      "icon": {
		"name": "cancel",
		"anim": false
	      },
	      "disabled": false,
	      "stateBar": ""
	    },
	    "process": {
	      "cssClass": "yellow black-text",
	      "label": "processing",
	      "icon": {
		"name": "refresh",
		"anim": "rotate"
	      },
	      "disabled": true,
	      "stateBar": "msb-anim-chameleon"
	    }
	  }

Where:

- `cssClass`: (`string`) is a *CSS class* to style the button (default options are using MaterializeCSS classes).
- `label`: (`string`) is the button's label.
- `icon.name`: (`string`) is the [*Material Design*](https://material.io/icons/) icon label or the [*Font Awesome*](http://fontawesome.io/icons/) class name without the *fa-* prefixe.
- `icon.anim`: (mixed `string`|`false`) is the *animation class name* (without prefix) to animate the icon, `false` if no animation. Check the animation list and a live demo link below.
- `disabled`: (`boolean`) is `true` or `false` to set or not the *disabled attribute* to the *BUTTON markup*, MaterializeCSS will override your `cssClass` colors as it usually do with *disabled elements*. `Disabled` is not working on a *A markup* so in this case it will apply the `cssClass` colors.
- `stateBar`: (mixed `string`|`false`) is a CSS class to style the state bar. The *State Bar* is an additionnal button decoration, it allow to keep a colored border when a button is `disabled` and color is forced to gray by the CSS framework. A multicolor animated background is available under the name: *msb-anim-chameleon*.

Icons animations list:
- rotate | spin *(aliases)*
- bounce
- flash
- blink
- pass | pass-ltr *(aliases)*
- pass-reverse | pass-rtl *(aliases)*
- shake
- ring
- pulse
- fall
- burst
- tada
- fly

You can all icons animations on this [demo](https://codepen.io/fchaussin/pen/vejWKG)

### Coming soon features

You can follow the coming soon features in the [todo list](https://github.com/fchaussin/jquery-multi-state-button/projects/1).

repository: fchaussin/jquery-multi-state-button

gha_language: CSS

repo_name: fchaussin/jquery-multi-state-button


text:
jQuery UI Resizable Snap extension
==================================
### by Alexander Polomoshnov<EMAIL_ADDRESS>### released under [the MIT license](https://raw.github.com/polomoshnov/jQuery-UI-Resizable-Snap-extension/master/LICENSE.txt)

Unfortunately, the jQuery UI Resizable plugin does not ship with the snap functionality unlike the jQuery UI Draggable plugin that has this very useful functionality out of the box.

But here comes **jQuery UI Resizable Snap extension** to the rescue! It enhances the jQuery UI Resizable plugin with the same snap functionality that is offered by the jQuery UI Draggable plugin.

**jQuery UI Resizable Snap extension** exposes three options to the jQuery UI Resizable plugin: snap, snapMode, and snapTolerance. For the information on those three options, please refer to the official jQuery UI Draggable plugin documentation at [http://api.jqueryui.com/draggable/#option-snap](http://api.jqueryui.com/draggable/#option-snap).

To see **jQuery UI Resizable Snap extension** in action please check out [this demo](http://polomoshnov.github.io/jQuery-UI-Resizable-Snap-extension/).


text:
{% comment %} A little snippet to put at the end of each post to direct users to the homepage {% endcomment %}

If you liked this post, check out the [homepage](/) for others you might enjoy[^noenjoy].
{: .info}

[^noenjoy]: On the other hand, if you didn't enjoy it, I have to wonder how you made it this far! Maybe you started off liking it, then felt invested and compelled to finish it? Beware the sunk cost fallacy!


text:
# RepoTemplate Unity 2020LTS
This is boiler plate for git repos using Unity 2019 LTS as the Unity Edtior.

## Usage
### Create a Repo
Create a repo with your favorite repo service.

### Clone this Repo
Clone the `RepoTemplate_Unity_2020LTS` repo where you save repos locally

### Change the folder name
Change the name of the folder `RepoTemplate_Unity_2020LTS` to the name of your project

### Change remote url
Change the push and pull url of the repo to your newly created repo

### Push
Perform a `git push`. This will push the template files to your new repo and allow you to start working on the repository.

**Note: You should double check that git lfs is installed**. If it's not, run `git lfs install` in the new repo (after making sure git lfs is installed on your system)


text:
# Notes

These notes are intended simply for my own use.

## Bang bluffs

If a bang bluff is called for a bluff that isn't persistable an error should be thrown.

If the bluff is persistable, all persistable associations within the bluffed object should
be persisted within a transaction (persisting from the inside out).

## Block argument reflection

Can use code from merb to reflect on expected block arguments and default values

```
require 'rubygems'
require 'merb'

include GetArgs

def foo(bar, zed=42)
end

method(:foo).get_args # => [[[:bar], [:zed, 42]], [:zed]]
```

Sourcify is another option but doesn't seem to support blocks with default arguments

Also have Proc#parameters but it doesn't look like it tells you what the default argument value is reported.

If we can find a way to do this we can loosen up the single-argument bluff restriction. Only bluffs without
predefined arguments and bluffs with a hash as the first argument will be given special treatment.

repository: rymohr/bluff

repo_name: rymohr/bluff


text:
## Give Cartoon Effects to images.

Reference Link : http://datahacker.rs/002-opencv-projects-how-to-cartoonize-an-image-with-opencv-in-python/

# Original Image

# Cartoon Effect

repository: chenpaopao/Image-Processing-Tasks

path: /Cartoon Effect to Photos/Readme.md

repo_name: chenpaopao/Image-Processing-Tasks


text:
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]

AnonymousChat

    build an anonymous chat with python3

    Report Bug
    ·
    Request Feature

Table of Contents

      About The Project

Built With

      Getting Started

Prerequisites

Installation

Usage

Roadmap

Contributing

License

Contact

## About The Project
This is my network course project in which I developed anonymous chat within local networks.In this project client interact with app using CLI. At first, My app sends anonymous chat request to local network via UDP broadcasting, next if anyone accept this request, chat will be started using TCP potocol. The Project description is provided in description.pdf (in persian language).

### Built With

* [python3](https://www.python.org/download/releases/3.0/)

## Getting Started

this project runs on linux operating system, if you don't have linux you must change code for running in your system.

### Prerequisites

* Unix base operating system like [ubuntu 20.04](https://releases.ubuntu.com/20.04/)
* [python3](https://www.python.org/download/releases/3.0/)
* [virtualenv](https://pypi.org/project/virtualenv/)
* [pip3](https://pip.pypa.io/en/stable/)

### Installation

1. Clone the repo
   ```sh
   git clone https://github.com/hadiforoughi/AnonymousChat.git
   ```
2. create virtualenv

## Usage
after creating virtualenv, cd to working directory and run AnonymousChat.py, you can run this app with below command:
   ```sh
   python3 AnonymousChat.py
   ```
next, app asks your name, enter your name then app show "press 1 for create anonymous chat or 2 for communication" message, if you enter 1, app send request to others client and if anyone accepted, chat will be start or if you press 2 app waiting for request.

![Product Name Screen Shot][product-screenshot]

## Roadmap

See the [open issues](https://github.com/hadiforoughi/AnonymousChat/issues) for a list of proposed features (and known issues).

## Contributing

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3.  Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Contact

Mohammad Hadi Foroughi - [@foroughi_hadi](https://twitter.com/foroughi_hadi) -<EMAIL_ADDRESS>
Project Link: [https://github.com/hadiforoughi/AnonymousChat](https://github.com/hadiforoughi/AnonymousChat)

[contributors-shield]: https://img.shields.io/github/contributors/hadiforoughi/AnonymousChat.svg?style=for-the-badge
[contributors-url]: https://github.com/hadiforoughi/license-shield/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/hadiforoughi/AnonymousChat.svg?style=for-the-badge
[forks-url]: https://github.com/hadiforoughi/license-shield/network/members
[stars-shield]: https://img.shields.io/github/stars/hadiforoughi/AnonymousChat.svg?style=for-the-badge
[stars-url]: https://github.com/hadiforoughi/license-shield/stargazers
[issues-shield]: https://img.shields.io/github/issues/hadiforoughi/AnonymousChat.svg?style=for-the-badge
[issues-url]: https://github.com/hadiforoughi/license-shield/issues
[license-shield]: https://img.shields.io/github/license/hadiforoughi/AnonymousChat.svg?style=for-the-badge
[license-url]: https://github.com/hadiforoughi/AnonymousChat/blob/main/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/hadi-foroughi-0130aa169/
[product-screenshot]: images/Screenshot.png

repository: hadiforoughi/AnonymousChat

repo_name: hadiforoughi/AnonymousChat