text:
![Dune][logo]

# A Composable Build System for OCaml

[![Main Workflow][workflow-badge]][workflow]
[![Release][release-badge]][release]
[![Coverage][coverage-badge]][coverage]
[![License][license-badge]][license]
[![Contributors][contributors-badge]][contributors]

[logo]: doc/assets/imgs/dune_logo_459x116.png
[workflow]: https://github.com/ocaml/dune/actions/workflows/workflow.yml
[workflow-badge]: https://img.shields.io/github/actions/workflow/status/ocaml/dune/workflow.yml?label=CI&logo=github
[release]: https://github.com/ocaml/dune/releases/latest
[release-badge]: https://img.shields.io/github/v/release/ocaml/dune?label=release
[coverage]: https://coveralls.io/github/ocaml/dune
[coverage-badge]: https://img.shields.io/coveralls/github/ocaml/dune?logo=coveralls
[license]: https://github.com/ocaml/dune/blob/main/LICENSE.md
[license-badge]: https://img.shields.io/github/license/ocaml/dune
[contributors]: https://github.com/ocaml/dune/graphs/contributors
[contributors-badge]: https://img.shields.io/github/contributors-anon/ocaml/dune

Dune is a build system for OCaml. It provides a consistent experience and takes
care of the low-level details of OCaml compilation. You need only to provide a
description of your project, and Dune will do the rest.

Dune implements a scheme that's inspired from the one used inside Jane Street
and adapted to the open source world. It has matured over a long time and is
used daily by hundreds of developers, meaning it's highly tested and productive.

Dune comes with a [manual][manual]. If you want to get started without reading
too much, look at the [quick start guide][quick-start] or watch [this
introduction video][video].

The [example][example] directory contains examples of projects using Dune.

[manual]: https://dune.readthedocs.io/en/latest/
[quick-start]: https://dune.readthedocs.io/en/latest/quick-start.html
[example]: https://github.com/ocaml/dune/tree/master/example
[merlin]: https://github.com/ocaml/merlin
[opam]: https://opam.ocaml.org
[issues]: https://github.com/ocaml/dune/issues
[discussions]: https://github.com/ocaml/dune/discussions
[dune-release]: https://github.com/ocamllabs/dune-release
[video]: https://youtu.be/BNZhmMAJarw

# How does it work?

Dune reads project metadata from `dune` files, which are static files with a
simple S-expression syntax. It uses this information to setup build rules,
generate configuration files for development tools such as [Merlin][merlin],
handle installation, etc.

Dune itself is fast, has very little overhead, and supports parallel builds on
all platforms. It has no system dependencies. OCaml is all you need to build
Dune and packages using Dune.

In particular, one can install OCaml on Windows with a binary installer and then
use only the Windows Console to build Dune and packages using Dune.

# Strengths

## Composable

Dune is composable, meaning that multiple Dune projects can be arranged
together, leading to a single build that Dune knows how to execute. This allows
for monorepos of projects.

Dune makes simultaneous development on multiple packages a trivial task.

## Gracefully Handles Multi-Package Repositories

Dune knows how to handle repositories containing several packages. When building
via [opam][opam], it is able to correctly use libraries that were previously
installed, even if they are already present in the source tree.

The magic invocation is:

```console
$ dune build --only-packages <package-name> @install
```
## Build Against Several Configurations at Once

Dune can build a given source code repository against several configurations
simultaneously. This helps maintaining packages across several versions of
OCaml, as you can test them all at once without hassle.

In particular, this makes it easy to handle
[cross-compilation][cross-compilation]. This feature requires [opam][opam].

[cross-compilation]: https://dune.readthedocs.io/en/latest/cross-compilation.html

# Installation

## Requirements

Dune requires OCaml version 4.08.0 to build itself and can build OCaml projects
using OCaml 4.02.3 or greater.

## Installation

We recommended installing Dune via the [opam package manager][opam]:

```console
$ opam install dune
```

If you are new to opam, make sure to run `eval $(opam config env)` to make
`dune` available in your `PATH`. The `dune` binary is self-contained and
relocatable, so you can safely copy it somewhere else to make it permanently
available.

You can also build it manually with:

```console
$ make release
$ make install
```

If you do not have `make`, you can do the following:

```console
$ ocaml boot/bootstrap.ml
$ ./dune.exe build -p dune --profile dune-bootstrap
$ ./dune.exe install dune
```

The first command builds the `dune.exe` binary. The second builds the additional
files installed by Dune, such as the *man* pages, and the last simply installs
all of that on the system.

**Please note**: unless you ran the optional `./configure` script, you can
simply copy `dune.exe` anywhere and it will just work. `dune` is fully
relocatable and discovers its environment at runtime rather than hard-coding it
at compilation time.

# Support

[![Issues][issues-badge]][issues]
[![Discussions][discussions-badge]][discussions]
[![Discuss OCaml][discuss-ocaml-badge]][discuss-ocaml]
[![Discord][discord-badge]][discord]

If you have questions or issues about Dune, you can ask in [our GitHub
discussions page][discussions] or [open a ticket on GitHub][issues].

[discussions]: https://github.com/ocaml/dune/discussions
[discussions-badge]: https://img.shields.io/github/discussions/ocaml/dune?logo=github
[issues]: https://github.com/ocaml/dune/issues
[issues-badge]: https://img.shields.io/github/issues/ocaml/dune?logo=github
[discuss-ocaml]: https://discuss.ocaml.org
[discuss-ocaml-badge]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fdiscuss.ocaml.org%2F
[discord]: https://discord.com/invite/cCYQbqN
[discord-badge]: https://img.shields.io/discord/436568060288172042?logo=discord

repository: ocaml/dune

gha_language: OCaml

repo_name: ocaml/dune


text:
---
layout: splash
permalink: /doc-1691/
title: "Opportunities and Challenges for Named Data Networking to Increase the Agility of Military Coalitions"
---

# Opportunities and Challenges for Named Data Networking to Increase the Agility of Military Coalitions

        Abstract
        the objective of this paper is to summarize the opportunities and challenges for adopting Named Data Networking (NDN) in the specific context of military coalition operations and tactical networks, to improve the analytics capacity of the network and to speed up and improve the quality of distributed decision making. The characteristic properties of tactical networks are high dynamics in multiple dimensions. Furthermore, coalition networks must provide secure and efficient communication across coalition boundaries and mitigate the impact of adversarial entities attempting to obstruct the mission. By treating payloads, cryptographic keys, and policies all as semantically named and secured data packets, NDN integrates storage and processing into the networking layer and natively supports ad hoc, disruption tolerant networking with built-in security.

        Authors

Christopher Gibson (IBM UK)

Pablo Bermell-Garcia (Airbus)

Kevin Chan (ARL)

Bongjun Ko (IBM US)

Alex Afanasyev (UCLA)

Lixia Zhang (UCLA)

        Date
        Sep-2017

        Venue
        1st Annual Fall Meeting of the DAIS ITA, 2017

                <form method="get" action="https://dais-ita.org/sites/default/files/S_045-paper.pdf">
                    <button type="submit">download paper</button>
                </form>
                <form method="get" action="https://dais-ita.org/sites/default/files/S_045-poster.pdf">
                    <button type="submit">download poster</button>
                </form>

            Variants

doc-1409

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
[![Codetree](https://codetree.com/images/managed-with-codetree.svg)](https://codetree.com/projects/Q6Rz)

# Legit Scheduler
A pure React implementation of a drag and drop scheduler

## Usage

Install it:
```bash
$ npm install --save legit-scheduler
```

Import it:
```js
import Scheduler from 'legit-scheduler'
```

The scheduler component has three required props:
`events`    - An array of event objects
`resources` - An array of resources
`width`     - The width of the scheduler container, in pixels. An integer.

The resources array is just strings:
```
 [{
    name: "1012",
    id: "12"
}, {
    name: "2022",
    id: "14"
}, {
    name: "2224",
    id: "16"
}, {
    name: "2225",
    id: "18"
}, {
    name: "6227",
    id: "17"
}, {
    name: "2232",
    id: "19"
}]
```

The events array is an array of objects:
```
{
  title: 'A great event',  // Required: The title of the event
  startDate: '2016-01-24', // Required: The start date, must be in the format of "YYYY-MM-DD"
  duration: 4,             // Required: The duration of the event in days
  resource: 'Resource 1',  // Required: The name of the resource the event belongs to. Must match the resource id from the resources prop
  id: '3829-fds89',        // Required: A unique identifier. This can be anything you want as long as it's unique
  disabled: false,         // Optional: Whether or not this event can be moved (it can still be resized). Defaults to false.
  styles: {}               // Optional: An object of styles to apply to the event object
}
```

The scheduler component also takes more optional props:

`onEventChanged` - A call back that is fired when the event is moved. It receives an object containing the new event props
`onEventResized` - A call back that is fired when the event is resized. It receives an object containing the new event props
`onEventClicked` - A call back that is fired when the event is clicked. It receives an object containing the event props
`onResourceClicked` - A call back that is fired when resource is clicked
`onCellClicked`  - A call back that is fired when an empty cell on the scheduler is clicked. It receives the date and resource name as props
`onRangeChanged` - A call back that is fired when the date range is changed. It receives a `DateRange` object with the new range.
`from` - Either a date string or a `RangeDate` object defining the start date for the range.

`to` - Either a date string or a `RangeDate` object defining the end date for the range.

## Development
```bash
$ npm install
$ npm run example
```

Visit: `localhost:8080/example`

license: MIT

repository: gerswin/scheduler

branch_name: refs/heads/master

repo_name: gerswin/scheduler


text:
# First setup

What is needed:

- USB cable
- Terminal program ([MobaXterm](https://mobaxterm.mobatek.net/) (Windows) or screen (macOS & Linux))
- Micro SD card
- Internet connection for downloading the HuCon image

## Preparation
To install the new software on your HuCon you first have to download it from our GitHub repository. This can be found at [https://github.com/basler/hucon/releases](https://github.com/basler/hucon/releases) under Assets.
Save the two files, onionIoT-[version]-hucon-[version].bin and update_flash.sh, on your SD card.

## Installation
Assemble your HuCon and insert the SD card into the slot provided by your robot. This is located at the top of the neck of your HuCon.
Then you can connect your HuCon to your computer with a USB cable.

Now you can open MobaXterm and click on *Sessions*. The following window will open where you have to set the com-port and the speed.

![MobaXterm configuration](../images/initial_setup/mobaxterm_configuration.png)

!!! warning
    If you do not have a *USB Serial Port* in your list, then you have to install the driver for the HuCon. The HuCon is equipped with a USB to serial converter from [FTDI](https://www.ftdichip.com).

    You can find the appropriate driver [here](https://www.ftdichip.com/Drivers/VCP.htm).

As soon as you click on OK the following picture will appear:

![MobaXterm connected](../images/initial_setup/mobaxterm_connected.png)

That is all right, too. Your robot only answers when you tell it something. Press *Enter* and your robot should answer. This will look similar to this:

![MobaXterm Ready](../images/initial_setup/mobaxterm_ready.png)

Now you are on the command line of your robot. You surely know this from other games or movies, because now you have full control over the system. :smile:

To update the software of your HuCon you have to enter the following two commands in the console of MobaXterm and execute them:

```sh
mount /dev/mmcblk0p1 /mnt
sh /mnt/update_flash.sh
```

After the second command there will be a lot of output on the console and your HuCon will be restarted once during this procedure. This process can take up to 5 minutes until your HuCon is ready for operation again.
You can see whether your HuCon has been restarted by looking at the eye of your HuCon. As soon as the HuCon boots the eyes turn red. When the server starts to start, the eyes turn orange and when everything is ready, the eyes turn green for a short time before they go out again.

!!! warning
    Please note that you are not disconnecting your HuCon from the computer all the time. Otherwise, it could be that it is broken afterwards.

## Manual installation
If you have edited your HuCon as described above, you don't need to do anything else. But if you want to install the HuCon software by yourself, you can do it as follows:

1. Connect to your HuCon via MobaXterm.
2. Download the current package from github:
   `wget https://github.com/basler_hucon/releases/download/[VERSION]/hucon-[VERSION].run -O hucon.run`.
3. Start the installation with `sh hucon.run`.

Finally, you should reboot your HuCon with the command `reboot`.

repository: basler/hucon

gha_language: JavaScript

repo_name: basler/hucon


text:
# javascript-library-template [![GitHub license](https://img.shields.io/github/license/vvo/javascript-library-template?style=flat)](https://github.com/vvo/javascript-library-template/blob/master/LICENSE) [![Tests](https://github.com/vvo/javascript-library-template/workflows/CI/badge.svg)](https://github.com/vvo/javascript-library-template/actions) [![codecov](https://codecov.io/gh/vvo/javascript-library-template/branch/master/graph/badge.svg)](https://codecov.io/gh/vvo/javascript-library-template) ![npm](https://img.shields.io/npm/v/javascript-library-template) [![minizipped size](https://badgen.net/bundlephobia/minzip/javascript-library-template)](https://bundlephobia.com/result?p=javascript-library-template)

Click below to create a new GitHub repository using this template:

---

**This JavaScript library template** allows you to easily develop, collaborate on and publish a JavaScript library with all the modern tooling you'd expect from the current JavaScript ecosystem.

**Why should you use this?** One of the hidden challenges of authoring opensource JavaScript libraries is to provide a project that is easy to contribute to. You want people to join your project. Doing so requires a good amount of boilerplate: testing, code coverage, dependencies maintenance, release scripts, tooling requirements (Node.js, Yarn and which versions are we using again?), code editor configuration, formatting, linting... Well, this is the goal of this template: **to provide sensible and modern defaults to all those subjects**. So that once set up, you can focus on ⌨ coding, 🙌 collaborating and 🚀 shipping.

**The goals of the template are to:**

- Ease the contribution of the library by providing reproducible environments for developers and CI
- Automate as much as possible, from testing to releasing and upgrading dependencies
- Provide good defaults for users of [Visual Studio Code](https://code.visualstudio.com/)

**Features:**

- [EditorConfig](https://editorconfig.org/): easy contributions from any code editor.
- [ESLint](https://eslint.org/): launched in the `test` script.
- [Prettier](https://prettier.io/): launched in the `test` script, with markdown, JavaScript, CSS and JSON files support (including automatic [`package.json` formatting](https://github.com/matzkoh/prettier-plugin-packagejson)).
- Automatic VSCode formatting and linting: using VSCode extensions recommendations and workspace settings in .`vscode/` folder.
- [Yarn](http://yarnpkg.com/) version pinning: via [Yarn policies](https://classic.yarnpkg.com/en/docs/cli/policies/), so anyone contributing or any system accessing your library will use the same Yarn version without having to think about it.
- [Node.js](https://nodejs.org/) version pinning: via [nvm](https://github.com/nvm-sh/nvm), so anyone contributing or any system accessing your library will use the same Node.js version without having to think about it.
- [Jest](https://jestjs.io/): launched in the `test` script, also with the right VSCode settings providing a testing workflow inside VSCode using [`vscode-jest`](https://github.com/jest-community/vscode-jest) extension.
- [GitHub actions](https://github.com/features/actions): automatic testing and releasing from GitHub: npm publish and GitHub releases are automatically created. Note that the package.json in your repository is never updated (the version is always `0.0.0-development`), only the one in npm is updated. This is surprising at first but as long as you display the published version in your README (like this template does) then you're fine. Find more information about this in the [semantic-release documentation](https://semantic-release.gitbook.io/semantic-release/support/faq#why-is-the-package-jsons-version-not-updated-in-my-repository).
- [semantic-release](https://semantic-release.gitbook.io/semantic-release/): allows for automatic releases based on semver.org and [conventional commits specification](https://www.conventionalcommits.org/). The defaults are taken from the [Angular git commit guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
- [Codecov](https://codecov.io/): launched in the `test` script on CI, ensures code coverage does not decrease on pull requests _(free for public and private repositories)_.
- [Renovate](https://renovate.whitesourcesoftware.com/) configurated with the [JavaScript library preset](https://docs.renovatebot.com/presets-config/#configjs-lib): this will automatically update your dependencies by opening pull request for you to approve or not. So you never have to think about it _(free for public and private repositories)_.

## Setup

Using this template requires a bit of setup, but way less than if you had to start from 0. Here's what you need to do:

**Required steps:** (needed every time you want to use the template)

1. [Create a new repository](https://github.com/new) on GitHub based on this template
1. [Setup renovate](https://github.com/apps/renovate) for your new repository. If you previously installed the Renovate application to your account then this is just a box to tick when creating the repository
1. [Clone the new repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
1. Change the package name and description in `package.json`
1. [Setup Codecov](https://github.com/apps/codecov) for your new repository. If you previously installed the Codecov application to your account then this is just a box to tick when creating the repository
1. Setup semantic releases: run `yarn semantic-release-cli setup` in a terminal (This will ask for your npm and GitHub credentials)
1. Add the previously generated `GH_TOKEN` and `NPM_TOKEN` secrets to the [GitHub secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets) of the new repository
1. Install dependencies: run `yarn` in your terminal
1. **Develop your library**: change code in `lib/`
1. **Test your library**: you can either see tests results inside VSCode directly or run `yarn jest --watch`
1. **Check formatting of your code**: run `yarn check-formatting` in your terminal
1. **Create your first release**: [open a pull request](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) on your project, wait for tests to pass, merge and 💥 your library will be automatically released to npm and a GitHub release will be created

**Optional steps:** (needed only if you're doing them for the first time)

1. If you're not using VSCode, if your editor has no EditorConfig support, then [setup EditorConfig](https://editorconfig.org/#download) [EditorConfig support](https://editorconfig.org/)
1. Make sure you have [npm 2fa auth-only](https://docs.npmjs.com/about-two-factor-authentication#authorization-only) configured. Releases can't be automated if you have 2fa setup for both authentication and publish. See https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication-for-plugins
1. [Install nvm](https://github.com/nvm-sh/nvm)
1. [Install yarn](https://classic.yarnpkg.com/en/docs/install#alternatives-stable)

## Status and next steps

The template is still pretty new (March 2020) and was done to author JavaScript libraries using ECMAScript modules for Node.js >= 12. Gradually, or given requests, **we could update it to support**:

- Using different CI environments than GitHub actions
- Authoring browser libraries
- Generating `README.md` table of contents automatically
- Better default `README.md` content (Install, API, Examples, ...)
- `create-javascript-library` command line that would get most of the setup done easily
- `.github` Pull requests template, issues templates, CONTRIBUTING files
- add or change scripts to allow for auto-formatting
- provide documentation on how to protect branches on GitHub
- provide scripts to easily open a pull request once a branch is created
- provide a way to check for semantic commits in PR
- contributors list
- https://github.com/apps/semantic-pull-requests

If you'd like to participate, if you have bugs or new ideas, [open an issue](https://github.com/vvo/javascript-library-template/issues/new) or a pull request.

## Recipes

### Using `yarn link`

To use `yarn link` efficiently, do this:

```bash
> cd my-library
> yarn link
> yarn build --watch
> cd ../my-other-library
> yarn link my-library
```

### Reformating all code

```bash
yarn format
```

repository: vvo/javascript-library-template

gha_license_id: MIT

repo_name: vvo/javascript-library-template


text:
### Description

A project related to how to configure terraform null provided

### Prerequisites

- Terraform installation : [Installation process ](https://learn.hashicorp.com/terraform/getting-started/install.html)

### The repo is having followin file

- main.tf : Terraform configuration file

### How to use the repo

- Clone this repo to your local machines : `git clone git@github.com:galindonkov/terraform-null-provider.git`

- Change to the currently added directory : `cd terraform-null-provider/`

- Execute `terraform init` to get terraform initialized

- Execute `terraform plan` to generate and show an execution plan based on the configured `main.tf` file

- You are now ready to proceed with the execution itself by `terraform apply` and get you new infrastructure.
  NOTE: The command will require an execution confirmation either with `yes` or `no`.

repository: galindonkov/terraform-null-provider

gha_language: HCL

repo_name: galindonkov/terraform-null-provider


text:
## App Engine Datastore NDB Overview Sample

[![Open in Cloud Shell][shell_img]][shell_link]

[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/migration/ndb/overview/README.md

This is a sample app for Google App Engine that demonstrates how to replace
use of the [Datastore NDB Python API](https://cloud.google.com/appengine/docs/python/ndb/)
with the [Google Cloud NDB library](https://googleapis.dev/python/python-ndb/latest/index.html).
This library can be used not only on App Engine, but also other Python 3
platforms.

To deploy and run this sample in App Engine standard for Python 2.7:

    pip install -t lib -r requirements.txt
    gcloud app deploy

To deploy and run this sample in App Engine standard for Python 3.7:

    gcloud app deploy app3.yaml

repository: GoogleCloudPlatform/python-docs-samples

gha_language: Jupyter Notebook

repo_name: GoogleCloudPlatform/python-docs-samples


text:
portia
======
Visual scraping for Scrapy.

Overview
========

Portia is a tool for visually scraping web sites without any programming knowledge. Just annotate web pages with a point and click editor to indicate what data you want to extract, and portia will learn how to scrape similar pages
from the site.

Portia has a web based UI served by a [Twisted] server, so you can install it on almost any modern platform.

Requirements
============

* Python 2.7
* Works on Linux, Windows, Mac OSX, BSD
* Supported browsers: Latest versions of Chrome (recommended) or Firefox

Prerequisites
=============

You might need to run the following commands to install the required tools & libraries before building portia:

    apt-get install python-pip python-dev libxml2-dev libxslt1-dev libffi-dev libssl-dev
    pip install virtualenv

Installation
============

The recommended way to install dependencies is to use __virtualenv__:

    virtualenv YOUR_ENV_NAME --no-site-packages

and then do:

    source YOUR_ENV_NAME/bin/activate
    cd slyd
    pip install -r requirements.txt

As `slybot` is a `slyd` dependency, it will also get installed.

**Note:** you may need to use `sudo` or `pip --user` if you get permissions problems while installing.

Running portia
==============

First, you need to start the ui and create a project. Run __slyd__ using:

	cd slyd
	twistd -n slyd

and point your browser to: `http://localhost:9001/static/main.html`

Choose the site you want to scrape and create a project. Every project is created with a default spider named after the domain of the site you are scraping. When you are ready, you can run your project with __slybot__ to do the actual crawling/extraction.

Projects created with __slyd__ can be found at:

	slyd/data/projects

To run one of those projects use:

	portiacrawl project_path spidername

Where `spidername` should be one of the project spiders. If you don't remember the name of the spider, just use:

	portiacrawl project_path

and you will get the list of spiders for that project.

Portia spiders are ultimately [Scrapy] spiders. You can pass __scrapy__ spider arguments when running them with ```portiacrawl``` by using the ```-a``` command line option. A custom settings module may also be specified using the ```--settings``` command line option. Please refer to the [scrapy documentation] for details on arguments and settings.

Running portia with [vagrant]
=============================

This is probably the easiest way to install and run portia.

First, you need to get:

* Vagrant: http://www.vagrantup.com/downloads.html
* VirtualBox: https://www.virtualbox.org/wiki/Downloads

After that ```cd``` into the repo directory and run:

    vagrant up

This will setup and start an ubuntu virtual machine, build portia and launch the ```slyd``` server for you. Just point your browser to `http://localhost:8000/static/main.html` after vagrant has finished the whole process (you should see ```default: slyd start/running, process XXXX``` in your console) and you can start using portia. You can stop the server with ```vagrant suspend``` or ```vagrant halt```.

The repository directory is shared with the VM, so you don't need to do anything special to keep it in sync. You can __ssh__ into the virtual machine by running ```vagrant ssh```. The repo dir will be mounted at ```/vagrant``` in the VM. Please note that you __need to ssh into the VM to run the ```portiacrawl``` script__.

Repository structure
====================

There are two main components in this repository, __slyd__ and __slybot__:

###slyd

The visual editor used to create your scraping projects.

###slybot

The Python web crawler that performs the actual site scraping. It's implemented on top of the [Scrapy] web crawling
framework and the [Scrapely] extraction library. It uses projects created with __slyd__ as input.

[Twisted]: https://twistedmatrix.com
[Scrapely]: https://github.com/scrapy/scrapely
[Scrapy]: http://scrapy.org
[scrapy documentation]: http://doc.scrapy.org/en/latest
[vagrant]: http://www.vagrantup.com

repository: seatgeek/portia

repo_name: seatgeek/portia


text:
---
title: "ES2019 Features: What Even Are They? | JSConf EU 2019"
date: "2020-03-22T00:00:00.000Z"
template: "post"
draft: false
slug: "es2019-features-what-even-are-they-jsconf-eu-2019"
category: "JS Conf 2019"
tags:
  - "Open source"
  - "Javascript"
  - "JS Conf EU 2019"
  - "Tara Z. Manicsic"
description: "Thankfully, every year ECMAScript gives us new shinies to advance how we code JavaScript. I’ve found myself digging into features & proposals ever since my curiosity of ES2017’s SharedArrayBuffer took me down a fascinating rabbit hole. Let’s delve into some of the features & proposals we get to look forward to in 2019."
socialImage: "https://2019.jsconf.eu/immutable/551b51256d1d7bb3cb0038c6bf68138cf2e8566f/images/cms/tara-z-manicsic-7c5d860c-1000-square.jpg"
podcastURL: "https://js-talks.builtforfifty.workers.dev/ES2019+Features+What+Even+Are+They+by+Tara+Z.+Manicsic+JSConf+EU+2019.mp3"
podcastDuration: "0:22:15"
podcastSpeaker: "Tara Z. Manicsic"
podcastSize: 32036081
---

Original post, video and transcript on the official [JS Conf EU 2019 website](https://2019.jsconf.eutara-z-manicsic/es2019-features-what-even-are-they.html).

	<audio controls="controls">
		<source type="audio/mp3" src="https://js-talks.builtforfifty.workers.dev/ES2019+Features+What+Even+Are+They+by+Tara+Z.+Manicsic+JSConf+EU+2019.mp3"></source>

Your browser does not support the audio element.

	</audio>

repository: abuuzayr/js-talks

repo_name: abuuzayr/js-talks


text:
# southwest-price-drop-bot

This tool lets you monitor the price of Southwest flights that you've booked. It will text you if the price drops below what you originally paid. Then you can [re-book the same flight](http://dealswelike.boardingarea.com/2014/02/28/if-a-southwest-flight-goes-down-in-price/) and get Southwest credit for the price difference.

## Deployment

1. Click this button: [![deploy][deploy-image]][deploy-href]
1. Fill out the config variables and click `Deploy`
1. Open up the `Heroku Scheduler` from your app's dashboard
1. Add an hourly task that runs `npm run task:check`

## Screenshots

[deploy-image]: https://www.herokucdn.com/deploy/button.svg
[deploy-href]: https://heroku.com/deploy

repository: usmanakhter/southwest-price-drop-bot

repo_name: usmanakhter/southwest-price-drop-bot


text:
# Titanium Sample App: iOS Extensions with SiriKit

> **NOTE:** This Sample App requires Titanium >= 5.5.0 and Alloy >= 1.9.0 (part of AppC CLI >=5.5.0). It demonstrates support for iOS 10 and Xcode 8.

> **NOTE2:** This example uses a SiriKit extension, but in fact any native extension can be used the same way!

<img src=".github/screenshot.jpg" width="800" alt="iOS 10 SiriKit with Titanium" />

For more information on native iOS extensions with Titanium, check out the [official tutorial](https://docs.appcelerator.com/platform/latest/#!/guide/Creating_iOS_Extensions_-_Siri_Intents).

## Running the Sample

### Via Appcelerator Studio

1. Import it via *Dashboard* if available.
2. Or import it via *File > Import... > Git > Git Repository as New Project* with *URI*:

		https://github.com/appcelerator-developer-relations/ios-extensions-sample-sirikit

3. Select a Simulator or Device to build to via *Run > Run As*.

### Via CLI

1. Clone the repository:

		git clone https://github.com/appcelerator-developer-relations/ios-extensions-sample-sirikit

2. To run it with `appc run` first import it to the platform:

		appc new --import --no-services

3. Build to Simulator or Device:

		[appc run | ti build] -p ios [-T device]


text:
# Logstash SpamHaus Plugin

This is a plugin for [Logstash](https://github.com/elastic/logstash).

It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.

## Documentation

This filter allows you to lookup an IP address in the SpamHaus ZEN list. This list includes all of the SpamHaus blacklists.

This filter can be used in the simplest form as follows:

```
	spamhaus {}
```

It will run with the following defaults:

 * It will loookup the IP address in the `clientip` field
 * It will tag IPs in the blacklist as `spamhaus_blacklisted`
 * It will tag IPs not in the blacklist as `spamhaus_whitelisted`

If an IP is blacklisted it will add a `spamhaus` object to the event with the following properties:
 * `code`: it's the SpamHaus code for the blocking reason
 * `blocklist`: it's the SpamHaus blacklist name where this IP was found

## Configuration

The filter accepts the following configuration options:

  * `ip` - It's the field that contains the IP address to resolve. *Default: `clientip`*.
  * `tag_blacklisted` - The tag to add to the event in case the IP is blacklisted. *Default: `spamhaus_blacklisted`*.
  * `tag_whitelisted` - The tag to add to the event in case the IP is not in any blacklist. *Default: `spamhaus_whitelisted`*.

A more involved filter configuration could look like:

```
  spamhaus {
    ip => 'client_ip'
    tag_blacklisted => 'blacklisted'
    tag_whitelisted => 'whitelisted'
  }
```

## Missing functionality

This is a bare minimum implementation of the filter. Some things could be good to implement:

  * Lookup multiple IPs
  * Select the blacklists to lookup

## Compiling and testing

Compiling, deploying and testing this plugin requires JRuby. Not only - you want to make sure that the bundle, rake and rspec commands are run using JRuby.

If you start seeing errors that look like:

```
Could not find gem 'logstash-devutils (>= 0.0.18) ruby' in any of the gem sources listed in your Gemfile or available on this machine.
```

*notice the `ruby` bit after the version* - try and make it explicit that you want to use the JRuby versions of the commands:

```
alias rspec="jruby -S rspec"
alias rake="jruby -S rake"
alias bundle="jruby -S bundle"
```

Once you specified these aliases things should start working as expected -- unless you don't have jruby in your path.

Test it our by running `bundle install && bundle exec rspec` - it should produce some output, ending with the test results:

```
Finished in 0.382 seconds (files took 4.03 seconds to load)
2 examples, 0 failures

Randomized with seed xxxxx
```

repository: WedjaaOpen/logstash-filter-spamhaus

repo_name: WedjaaOpen/logstash-filter-spamhaus


text:
# shader box
![snapshot of apps](http://i.imgur.com/JEuXZii.png)

Various experiments with raytracing and
raymarching done only in pixel (fragment) shaders.

Written in GLSL but supports C++ and HLSL
using preprocessor macro tricks.
The C++11 work is made possible by the
wonderful CxxSwizzle library.
(https://github.com/gwiazdorrr/CxxSwizzle)

## Projects
The various submodules are enabled via global defines:

Project define | Description                                        | Live on shadertoy.com
---------------|----------------------------------------------------|-------------------------
APP_PLANET     | stylized procedural terrain and clouds             | https://www.shadertoy.com/view/ldyXRw
APP_ATMOSPHERE | study of Rayleigh/Mie air scattering               | https://www.shadertoy.com/view/XtBXDz
APP_CLOUDS     | study of volumetric clouds                         | https://www.shadertoy.com/view/XtBXDw
APP_EGG        | signed distance field raymarcher animation         | https://www.shadertoy.com/view/MlsGDf
APP_RAYTRACER  | simple PBR raytracer with reflection               | https://www.shadertoy.com/view/Xl2XW1
APP_SDF_AO     | test for ambient occlusion with distance fields    | https://www.shadertoy.com/view/XtBGDW

## Support
* Visual Studio C++ 2015. Has a dependency on SDL 1.2 (included).
* [C4droid](https://play.google.com/store/apps/details?id=com.n0n3m4.droidc&hl=en_GB) on Android.
* any GLSL ES environment. Tested on [Shadertoy](https://www.shadertoy.com/) and [GLSL Sandbox](http://glslsandbox.com/).
* any DirectX 11 HLSL environment. Tested with included hlsltoy utility. Has a dependency on _DirectXTex_ library (external repository reference).

## Features
Over time various things were added and some
can be extracted and used separately.

* minimal raytracer framework
* minimal Cook-Torrence lighting and material setup
* signed distance field functions and operators
* 2D two bone IK solver
* a library of different noise functions
* Rayleigh/Mie atmospheric scattering solver
* primitive animated GIF output

## Utilities
The util/ folder contains separate, independent projects:

Project   | Description
----------|-----------------------------------------------------------------------------------
inclxpnd  | a bare-bones #include expander utility to compose files
hlsltoy   | minimal one-file DX 11 framework that runs a fullscreen pixel shader
ddsvolgen | 3D noise texture generator

repository: MacroMachines/shaderbox

repo_name: MacroMachines/shaderbox


text:
### Common options to all axes

Namespace: `options.scales[scaleId]`

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| `type` | `string` | | Type of scale being employed. Custom scales can be created and registered with a string key. This allows changing the type of an axis for a chart.
| `alignToPixels` | `boolean` | `false` | Align pixel values to device pixels.
| `backgroundColor` | [`Color`](/general/colors.md) | | Background color of the scale area.
| `display` | `boolean`\|`string` | `true` | Controls the axis global visibility (visible when `true`, hidden when `false`). When `display: 'auto'`, the axis is visible only if at least one associated dataset is visible.
| `grid` | `object` | | Grid line configuration. [more...](/axes/styling.md#grid-line-configuration)
| `min` | `number` | | User defined minimum number for the scale, overrides minimum value from data. [more...](/axes/index.md#axis-range-settings)
| `max` | `number` | | User defined maximum number for the scale, overrides maximum value from data. [more...](/axes/index.md#axis-range-settings)
| `reverse` | `boolean` | `false` | Reverse the scale.
| `stacked` | `boolean`\|`string` | `false` | Should the data be stacked. [more...](/axes/index.md#stacking)
| `suggestedMax` | `number` | | Adjustment used when calculating the maximum data value. [more...](/axes/index.md#axis-range-settings)
| `suggestedMin` | `number` | | Adjustment used when calculating the minimum data value. [more...](/axes/index.md#axis-range-settings)
| `ticks` | `object` | | Tick configuration. [more...](/axes/index.md#tick-configuration)
| `weight` | `number` | `0` | The weight used to sort the axis. Higher weights are further away from the chart area.


text:
# Ownership

Contrasts to explicit allocation and freeing of memory.

## The Stack and the Heap

Both are parts of memory available to a program, but they are structured differently.

### The Stack

Stores values in the order it receives them and and removes values in the opposite order. LIFO.

Pushing onto the stack - adding data
Poping off the stack - removing data

#### Speed

 - The stack never has to search for memory when adding or removing, it's always "on top."
 - All data on the stack must take up a known fixed size.

### The Heap

Useful for storing data whose size is not known during compile time or might change.

The heap is less organized. We request some space, the OS finds space that's large enough, marks it as in use then returns a pointer to the start of the space.

Allocating on the heap - The process described above

## Function Calls

Values passed into a function are stored on the stack. The functions local variables are also stored on the stack.
When the function is over those variables get popped off the stack.

## What ownership tries to address

 - "Keeping track of what parts of code are using what data on the heap"
 - "minimizing the amount of duplicate data on the heap"
 - "cleaning up unused data on the heap so we don’t run out of space"

## Rules

 - Each value has a variable called it's owner
 - There can only be one owner at a time
 - When the owner goes out of scope the value will be dropped

## String type

Differs from 'string literals' which are immutable, hardcoded values in our source code.

## Types with the 'Copy' trait

Here are some of the types that are Copy:

All the integer types, like u32.
The boolean type, bool, with values true and false.
The character type, char.
All the floating point types, like f64.
Tuples, but only if they contain types that are also Copy. (i32, i32) is Copy, but (i32, String) is not.

repository: iandanforth/rust-crypto

repo_name: iandanforth/rust-crypto


text:
# Indy-agent implementation in Python

This is an implementation of indy-agent written in Python.

This agent seeks to be as simple as possible while accurately representing
the Sovrin protocol. See [Scope](scope.md) for goal and scope details.

## Quickstart

There are two ways to run the agent:
1. Using Docker (tested on Ubuntu 16.04 and MacOS Mojave 10.14)
2. Using dev mode (tested on Ubuntu 16.04, MacOS Mojave 10.14 and Windows 10)

Change your current folder to `indy-agent/python`.

### 1. Using Docker

* Make sure you have Docker installed
* Build docker image : `$ make docker-build`
* In one instance of your terminal : `$ make docker-start PORT=8094` and don't close it
* In another instance of your terminal : `$ make docker-start PORT=8095` and don't close it
* Open up 2 tabs in your browser : http://localhost:8094 (agent A) and http://localhost:8095 (agent B)

If agent is not reachable with `localhost`, try with the internal docker container IP :
* Run `make docker-getip PORT=8094` to get the ID address of the first container (for example : <IP_ADDRESS>)
* And run `make docker-getip PORT=8095` to get the ID address of the second container (for example : <IP_ADDRESS>)

### 2. Using dev mode

Requirements :
* Python 3.6
* At least `libindy` version 1.8.0 from https://github.com/hyperledger/indy-sdk

**If you have used the python reference agent, make sure you have updated `libindy` to at least version 1.8.0 and
reinstalled pip packages into your virtual environment.**

Procedure :
* Make sure you have Python virtual environment installed and running.
* Install requirements: `$ pip install -r requirements.txt`
* In one instance of your terminal: `$ python indy-agent.py 8094` and don't close it.
* In another instance of your terminal: `$ python indy-agent.py 8095` and don't close it.
* Open up your browser, with two tabs opened: localhost:8094 (agent A) and localhost:8095 (agent B).

### Using the demo

To this point I hope you have properly launched the agents. In each terminal,
after browser tabs opened, you can see the "offer endpoint" usefull for
the following scenario (in my case `Agent Offer Endpoint : "http://<IP_ADDRESS>:8095/offer"`)

* In agent A browser tab type : `Alice` and any password
* In agent B browser tab type : `Bob` and any password
* In agent A browser tab click button send connection offer : Type `AliceToBobConnection` and `/offer` path of the second agent (in my case it was http://<IP_ADDRESS>:8095/offer), click `send connection offer`
* In agent B browser tab click on the `view` button and check the received message : Click `send request`
* In agent A browser tab click on the `view` button and check the received message : Click `send response`
* In agent B browser tab click on the `view` button and check the received message

Alternatively, the python indy-agent accepts commandline arguments for the wallet
name and wallet passphrase (e.g. `Alice` and `1234`). To do this after entering
the port number in the command line arguments add in the wallet name and wallet
passphrase `python indy-agent.py 8094 --wallet Alice 1234`.

During development, it is useful to use an ephemeral wallet that is created new
each time. To do so, provide a name and a passphrase on the command line, and
add the `--ephemeralwallet` argument.
Example: `python indy-agent.py 8094 --wallet Alice 1234 --ephemeralwallet`.
Note: ephemeral wallets will not overwrite normal wallets.


text:
---
title: Logging
canonical_url: 'https://docs.projectcalico.org/v3.5/usage/troubleshooting/logging'
---

## The calico-node container

The components in the calico-node container all log to the directories under
`/var/log/calico` inside the container.  By default this is mapped to the
`/var/log/calico` directory on the host but can be changed by specifying a
`--log-dir` parameter on the `calicoctl node run` command.

Each component (described below) logs to its own directory. Files are
automatically rotated, and by default 10 files of 1MB each are kept. The
current log file is called `current` and rotated files have @ followed by a
timestamp detailing when the files was rotated in [tai64n](http://cr.yp.to/libtai/tai64.html#tai64n) format.

All logging is done using [svlogd](http://smarden.org/runit/svlogd.8.html).
Each component can be configured by dropping a file named `config` into that
component's logging directory.

e.g. to configure bird to only log 4 files of 10KB each

```shell
#/var/log/calico/bird/config
s10000
n4
```

svlogd can also be configured to forward logs to syslog, to prefix each line
and to filter logs. See the [documentation](http://smarden.org/runit/svlogd.8.html)
for further details.

See the following sub-sections for details on configuring the log level for
each calico-node component.

### Bird/Bird6

Bird and Bird6 are used for distributing IPv4 and IPv6 routes between Calico
enabled hosts.  The logs are output in the `bird` and `bird6` sub-directories
of the calico/node logging directory.

Use the `calicoctl config set loglevel` command on any host to change the
log level across all Calico nodes, _or_ use the same command with the `--node`
option to run the command for that specific node.  This command affects the
logging level for both Bird/Bird6 and Felix.

Valid log levels are:  none, debug, info, warning, error, critical.  For example:

        calicoctl config set logLevel error
        calicoctl config set logLevel debug --node=Calico-Node-1

### Felix

Felix is the primary Calico agent that runs on each machine that hosts
endpoints.  Felix is responsible for the programming of iptables rules on the
host.  The logs are output in the `felix` sub-directory of the calico/node
logging directory.

Use the `calicoctl config set loglevel` command on any host to change the
log level across all Calico nodes, _or_ use the same command with the `--node`
option to run the command for that specific node.  This command affects the
logging level for both Bird/Bird6 and Felix.

Valid log levels are:  none, debug, info, warning, error, critical.  For example:

        calicoctl config set logLevel none
        calicoctl config set logLevel error --node=Calico-Node-1

### confd

The confd agent generates configuration files for Felix and Bird using
configuration data present in the etcd datastore.  The logs are output in the
`confd` sub-directory of the calico/node logging directory.

By default, the confd logging level is "debug" and cannot be changed without
editing configuration within the node image.

For more information on the allowed levels, see the
[documentation](https://github.com/kelseyhightower/confd/blob/master/docs/configuration-guide.md)

## Docker network and IPAM driver

When running Calico as a Docker network plugin, the Calico network driver runs
inside the calico/node container.  The logs are output in the `libnetwork` sub-directory
of the calico/node logging directory.

repository: daiyinliang/calico

repo_name: daiyinliang/calico


text:
# Beebotte Arduino examples
This repository includes some Arduino Sketches to interact with Beebotte IoT
Cloud platform.

These sketches have been tested on Arduino Uno with Ethernet Shield. If you
encounter any problem using the code on different hardware, please let us
know by opening an issue.

## LED Control
This sketch shows how Beebotte can be used to control a led connected to an
Arduino board. It uses MQTT protocol to subscribe to a topic where control
messages will be sent to turn ON or OFF the LED.

This example depends on:

* [PubSubClient](http://pubsubclient.knolleary.net/): MQTT Arduino library
* [ArduinoJson](https://bblanchon.github.io/ArduinoJson/):
  An elegant and efficient JSON library for embedded systems.

## Humidity and Temperature Reporting
This sketch shows how to connect a DHT11 humidity and temperature sensor
(or equivalent) to an Arduino board to periodically collect data. Senses data
is then sent using MQTT to Beebotte.

This example depends on:

* [PubSubClient](http://pubsubclient.knolleary.net/): MQTT Arduino library
* [ArduinoJson](https://bblanchon.github.io/ArduinoJson/):
  An elegant and efficient JSON library for embedded systems.
* [DHT](https://github.com/adafruit/DHT-sensor-library): Arduino library
  for DHT11DHT22, etc Temp & Humidity Sensors

## LICENSE
MIT


text:
---
layout: page
title: Publications
---

Here are my publications in chronological order.
You can also find me on [google scholar](https://scholar.google.ch/citations?user=rvGkDeoAAAAJ).

### Conferences

1. **A Human-Inspired Controller for Fluid Human-Robot Handovers.**
*International Conference on Humanoid Robots*, 2016.
Jose Medina, Felix Duvallet, Murali Karnam, Aude Billard.
[[PDF](/pubs/2016-humanoids.pdf)]

1. **Integrated Intelligence for Human Robot Teams.**
*International Symposium on Experimental Robotics (ISER)*, 2016.
J. Oh, T. Howard, M. Walter, D. Barber, M. Zhu, S. Park, A. Suppe, L. Navarro-Serment, F. Duvallet, A. Boularias, O. Romero, J. Vinokrov, T. Keegan, R. Dean, C. Lennon, B. Bodt, M. Childers, J. Shi, K. Daniilidis, N. Roy, C. Lebiere, M. Hebert, and A. Stentz.
[[PDF](/pubs/2016-iser.pdf)]

1. **Learning Qualitative Spatial Relations for Robotic Navigation.**
*International Joint Conference on Artificial Intelligence*, 2016.
Abdeslam Boularias, Felix Duvallet, Jean Oh, Anthony Stentz.
**Best paper track.**
[[PDF](/pubs/2015-rcta-aaai.pdf)]

1. **Learning Models for Following Natural Language Directions in Unknown Environments.**
*International Conference on Robotics and Automation (ICRA)*, 2015.
Sachithra Hemachandra, Felix Duvallet, Thomas Howard, Nicholas Roy, Anthony Stentz, Matthew R. Walter.
[[PDF](/pubs/2015-hemachandra-icra.pdf)]

1. **Grounding Spatial Relations for Outdoor Robot Navigation.**
*International Conference on Robotics and Automation (ICRA)*, 2015.
Abdeslam Boularias, Felix Duvallet, Jean Oh and Anthony Stentz.
**Best Cognitive Robotics paper award.**
[[PDF](/pubs/2015-boularias-icra.pdf)]

1. **Inferring Maps and Behaviors from Natural Language Instructions.**
*International Symposium on Experimental Robotics (ISER)*, 2014.
Felix Duvallet, Matthew R. Walter, Thomas Howard, Sachithra Hemachandra, Jean Oh, Seth Teller, Nicholas Roy, Anthony Stentz.
[[PDF](/pubs/2014-duvallet-iser.pdf)]

1. **Imitation Learning for Natural Language Direction Following through Unknown Environments.**
*International Conference on Robotics and Automation (ICRA)*, 2013.
Felix Duvallet, Thomas Kollar, Anthony Stentz.
**Best Cognitive Robotics paper nominee.**
[[PDF](/pubs/2013-directions-ICRA.pdf)]

1. **Imitation Learning for Task Allocation.**
*International Conference on Intelligent Robots and Systems (IROS)*, 2010.
Felix Duvallet, Anthony Stentz.
[[PDF](/pubs/2010-imitation_task_alloc-IROS.pdf)]

1. **WiFi Localization in Industrial Environments Using Gaussian Processes.**
*International Conference on Intelligent Robots and Systems (IROS)*, 2008.
Felix Duvallet, Ashley Tews.
[[PDF](/pubs/2008-WiFi-IROS.pdf)]

1. **Developing a Low-Cost Robot Colony.**
*AAAI Fall Symposium*: Regarding the Intelligence in Distributed Intelligent Systems, 2007.
Felix Duvallet, J. Kong, E. Marinelli, K. Woo, A. Buchan, B. Coltin, C. Mar, B. Neuman.
[[PDF](/pubs/2007-Colony-AAAI.pdf)]

1. **Fun With Robots: A Student-Taught Robotics Course.**
*International Conference on Robotics and Automation (ICRA)*, 2006.
S. Shamlian, K. Killfoile, R. Kellogg, F. Duvallet.
[[PDF](/pubs/2006-Fun_With_Robots-ICRA.pdf)]

1. **Relative Localization in Colony Robots.**
*Proceedings of the National Conference On Undergraduate Research (NCUR)*, 2005.
[[PDF](/pubs/2005-Colony-NCUR.pdf)]

### Thesis

**Natural Language Direction Following for Robots in Unstructured Unknown Environments.**
Felix Duvallet, January 15, 2015
[[PDF](/pubs/dissertation-felixd.pdf)]

**Abstract:**

Robots are increasingly performing collaborative tasks with people, and with this increase in interaction comes a need for efficient communication between human and robot teammates. Natural language provides a flexible and intuitive way to issue commands to robots without requiring specialized interfaces or extensive user training. However, most existing approaches to natural language understanding require that the robot's environment be known a priori, severely limiting the environments in which it can operate. Understanding natural language in unknown environments is more challenging, as the robot must now make decisions using only information about the parts of the environment it has observed so far. To date, no solution exists to the problem of real robots following natural directions through unstructured and unknown environments.

We address this gap by formulating the problem of following directions in unknown environments as one of sequential decision making under uncertainty. In this setting, a policy reasons about the robot's knowledge of the world so far, and predicts a sequence of actions that follow the direction to bring the robot towards the goal.

We first show how robots can learn policies that reason about the uncertainty present in the environment. We describe an imitation learning approach to training policies that uses demonstrations of people giving and following directions. Building upon this work, we propose a novel view of language as a sensor, whereby we "fill in" the unknown parts of the environment beyond the range of the robot's traditional sensors using information implicit in the given instruction. We find that this use of language as a sensor enables robots to follow navigation commands in unknown environments with performance comparable to that of operating in a fully-known environment.

gha_language: CSS


text:
# SimCLR

SimCLR is a particularly elegant [[self-supervised_learning]] algorithm that managed to simplify previous approaches to their essential core and improve upon their performance. Two transformations $v$ and $v'$ of the same image x are fed through the same network to produce two projections $z$ and $z'$. The [[contrastive_learning]] loss aims to maximize the similarity of the two projections from the same input while minimizing the similarity to projections of other images within the same mini-batch. For example, projections of different crops of the same dog image would hopefully be more similar than crops from other random images in the same batch.

The [[multilayer_perceptron]] used for projection in SimCLR uses [[batch_normalization]] after each [[linear_layer]].

![](simclr_arch.png)

### Resources

- https://arxiv.org/abs/2002.05709
- https://arxiv.org/abs/2006.10029
- https://github.com/google-research/simclr
- https://github.com/sthalles/SimCLR
- https://amitness.com/2020/03/illustrated-simclr/


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "Public Musicology"
summary: "Helping Others"
authors: []
tags: [service]
categories: [service, public musicology]
date: 2019-10-09T08:38:28-07:00

# Optional external URL for project (replaces project detail page).
external_link: ""

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: ""
  preview_only: false

# Custom links (optional).
#   Uncomment and edit lines below to show custom links.
links:
- name: GitHub
  url: https://github.com/
  icon_pack: fab
  icon: github

url_code: ""
url_pdf: ""
url_slides: ""
url_video: ""

# Slides (optional).
#   Associate this project with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides: ""
---

In addition to all the academic and professional things that you _should_ do as an early career academic, I also am really interested in finding ways to communicate what I do to audiences beyond the Ivory Tower.
A lot of this comes in the form of tweets and blogs, but here are some other projects I have collaborated on that I am particularly proud of.

## The Science of Netflix

{{< youtube xkMqgWHn36w >}}

## Collaboration with 12Tone

Following an [academic talk](https://www.youtube.com/watch?v=U-iDi4M6BV8&feature=youtu.be) I did on the idea of measuring musicianship, I collaborated with [12tone](https://www.youtube.com/channel/UCTUtqcDkzw7bisadh6AOx5w) to help produce a video on the same subject.

{{< youtube RHRzpqs2IeA >}}

## Interview on So Strangely

* [Podcast appearance on So Strangely Talking about Scale Degree Qualia](https://sostrangely.com/)


text:
In 2007, I became the attorney general
of the state of New Jersey.
Before that, I'd been a criminal prosecutor,
first in the Manhattan district attorney's office,
and then at the United States Department of Justice.
But when I became the attorney general,
two things happened that changed
the way I see criminal justice.
The first is that I asked what I thought
were really basic questions.
I wanted to understand who we were arresting,
who we were charging,
and who we were putting in our nation's jails
and prisons.
I also wanted to understand
if we were making decisions
in a way that made us safer.
And I couldn't get this information out.
It turned out that most big criminal justice agencies
like my own
didn't track the things that matter.
So after about a month of being incredibly frustrated,
I walked down into a conference room
that was filled with detectives
and stacks and stacks of case files,
and the detectives were sitting there
with yellow legal pads taking notes.
They were trying to get the information
I was looking for
by going through case by case
for the past five years.
And as you can imagine,
when we finally got the results, they weren't good.
It turned out that we were doing
a lot of low-level drug cases
on the streets just around the corner
from our office in Trenton.
The second thing that happened
is that I spent the day in the Camden,
New Jersey police department.
Now, at that time, Camden, New Jersey,
was the most dangerous city in America.
I ran the Camden Police
Department because of that.
I spent the day in the police department,
and I was taken into a room
with senior police officials,
all of whom were working hard
and trying very hard to reduce crime in Camden.
And what I saw in that room,
as we talked about how to reduce crime,
were a series of officers with a
lot of little yellow sticky notes.

And one of them said,
"We had a robbery two weeks ago.
We have no suspects."
And another said, "We had a shooting in this neighborhood last week. We have no suspects."
We weren't using data-driven policing.
We were essentially trying to fight crime
with yellow Post-it notes.
Now, both of these things made me realize
fundamentally that we were failing.
We didn't even know who was
in our criminal justice system,
we didn't have any data about
the things that mattered,
and we didn't share data or use analytics
or tools to help us make better decisions
and to reduce crime.
And for the first time, I started to think
about how we made decisions.
When I was an assistant D.A.,
and when I was a federal prosecutor,
I looked at the cases in front of me,
and I generally made decisions based on my instinct
and my experience.
When I became attorney general,
I could look at the system as a whole,
and what surprised me is that I found
that that was exactly how we were doing it
across the entire system --
in police departments, in prosecutors's offices,
in courts and in jails.
And what I learned very quickly
is that we weren't doing a good job.
So I wanted to do things differently.
I wanted to introduce data and analytics
and rigorous statistical analysis
into our work.
In short, I wanted to moneyball criminal justice.
Now, moneyball, as many of you know,
is what the Oakland A's did,
where they used smart data and statistics
to figure out how to pick players
that would help them win games,
and they went from a system that
was based on baseball scouts
who used to go out and watch players
and use their instinct and experience,
the scouts' instincts and experience,
to pick players, from one to use
smart data and rigorous statistical analysis
to figure out how to pick players
that would help them win games.
It worked for the Oakland A's,
and it worked in the state of New Jersey.
We took Camden off the top of the list
as the most dangerous city in America.
We reduced murders there by 41 percent,
which actually means 37 lives were saved.
And we reduced all crime in the city by 26 percent.
We also changed the way
we did criminal prosecutions.
So we went from doing low-level drug crimes
that were outside our building
to doing cases of statewide importance,
on things like reducing violence
with the most violent offenders,
prosecuting street gangs,
gun and drug trafficking, and political corruption.
And all of this matters greatly,
because public safety to me
is the most important function of government.
If we're not safe, we can't be educated,
we can't be healthy,
we can't do any of the other things
we want to do in our lives.
And we live in a country today
where we face serious criminal justice problems.
We have 12 million arrests every single year.
The vast majority of those arrests
are for low-level crimes, like misdemeanors,
70 to 80 percent.
Less than five percent of all arrests
are for violent crime.
Yet we spend 75 billion,
that's b for billion,
dollars a year on state and local corrections costs.
Right now, today, we have 2.3 million people
in our jails and prisons.
And we face unbelievable public safety challenges
because we have a situation
in which two thirds of the people in our jails
are there waiting for trial.
They haven't yet been convicted of a crime.
They're just waiting for their day in court.
And 67 percent of people come back.
Our recidivism rate is amongst
the highest in the world.
Almost seven in 10 people who are released
from prison will be rearrested
in a constant cycle of crime and incarceration.
So when I started my job at the Arnold Foundation,
I came back to looking at a lot of these questions,
and I came back to thinking about how
we had used data and analytics to transform
the way we did criminal justice in New Jersey.
And when I look at the criminal justice system
in the United States today,
I feel the exact same way that I did
about the state of New Jersey when I started there,
which is that we absolutely have to do better,
and I know that we can do better.
So I decided to focus
on using data and analytics
to help make the most critical decision
in public safety,
and that decision is the determination
of whether, when someone has been arrested,
whether they pose a risk to public safety
and should be detained,
or whether they don't pose a risk to public safety
and should be released.
Everything that happens in criminal cases
comes out of this one decision.
It impacts everything.
It impacts sentencing.
It impacts whether someone gets drug treatment.
It impacts crime and violence.
And when I talk to judges around the United States,
which I do all the time now,
they all say the same thing,
which is that we put dangerous people in jail,
and we let non-dangerous, nonviolent people out.
They mean it and they believe it.
But when you start to look at the data,
which, by the way, the judges don't have,
when we start to look at the data,
what we find time and time again,
is that this isn't the case.
We find low-risk offenders,
which makes up 50 percent of our
entire criminal justice population,
we find that they're in jail.

He was arrested, and he was kept in jail
on 3,500 dollars bail,
an amount that he could not afford to pay.
And he stayed in jail for eight months
until his case came up for trial,
at a cost to taxpayers of more than 9,000 dollars.
And at the other end of the spectrum,
we're doing an equally terrible job.
The people who we find
are the highest-risk offenders,
the people who we think have the highest likelihood
of committing a new crime if they're released,
we see nationally that 50 percent of those people
are being released.
The reason for this is the way we make decisions.
Judges have the best intentions
when they make these decisions about risk,
but they're making them subjectively.
They're like the baseball scouts 20 years ago
who were using their instinct and their experience
to try to decide what risk someone poses.
They're being subjective,
and we know what happens
with subjective decision making,
which is that we are often wrong.
What we need in this space
are strong data and analytics.
What I decided to look for
was a strong data and analytic risk assessment tool,
something that would let judges actually understand
with a scientific and objective way
what the risk was that was posed
by someone in front of them.
I looked all over the country,
and I found that between five and 10 percent
of all U.S. jurisdictions
actually use any type of risk assessment tool,
and when I looked at these tools,
I quickly realized why.
They were unbelievably expensive to administer,
they were time-consuming,
they were limited to the local jurisdiction
in which they'd been created.
So basically, they couldn't be scaled
or transferred to other places.
So I went out and built a phenomenal team
of data scientists and researchers
and statisticians
to build a universal risk assessment tool,
so that every single judge in
the United States of America
can have an objective, scientific measure of risk.
In the tool that we've built,
what we did was we collected 1.5 million cases
from all around the United States,
from cities, from counties,
from every single state in the country,
the federal districts.
And with those 1.5 million cases,
which is the largest data set on pretrial
in the United States today,
we were able to basically find that there were
900-plus risk factors that we could look at
to try to figure out what mattered most.
And we found that there were nine specific things
that mattered all across the country
and that were the most highly predictive of risk.
And so we built a universal risk assessment tool.
And it looks like this.
As you'll see, we put some information in,
but most of it is incredibly simple,
it's easy to use,
it focuses on things like the
defendant's prior convictions,
whether they've been sentenced to incarceration,
whether they've engaged in violence before,
whether they've even failed to come back to court.
And with this tool, we can predict three things.
First, whether or not someone will commit
a new crime if they're released.
Second, for the first time,
and I think this is incredibly important,
we can predict whether someone will commit
an act of violence if they're released.
And that's the single most important thing
that judges say when you talk to them.
And third, we can predict whether someone
will come back to court.
And every single judge in the
United States of America can use it,
because it's been created on a universal data set.
What judges see if they run the risk assessment tool
is this -- it's a dashboard.
At the top, you see the New Criminal Activity Score,
six of course being the highest,
and then in the middle you
see, "Elevated risk of violence."
What that says is that this person
is someone who has an elevated risk of violence
that the judge should look twice at.
And then, towards the bottom,
you see the Failure to Appear Score,
which again is the likelihood
that someone will come back to court.
Now I want to say something really important.
It's not that I think we should be eliminating
the judge's instinct and experience
from this process.
I don't.
I actually believe the problem that we see
and the reason that we have
these incredible system errors,
where we're incarcerating
low-level, nonviolent people
and we're releasing high-risk, dangerous people,
is that we don't have an objective measure of risk.
But what I believe should happen
is that we should take that
data-driven risk assessment
and combine that with the
judge's instinct and experience
to lead us to better decision making.
The tool went statewide in Kentucky on July 1,
and we're about to go up in a
number of other U.S. jurisdictions.
Our goal, quite simply, is that every single judge
in the United States will use a data-driven risk tool
within the next five years.
We're now working on risk tools
for prosecutors and for police officers as well,
to try to take a system that runs today
in America the same way it did 50 years ago,
based on instinct and experience,
and make it into one that runs
on data and analytics.
Now, the great news about all this,
and we have a ton of work left to do,
and we have a lot of culture to change,
but the great news about all of it
is that we know it works.
It's why Google is Google,
and it's why all these baseball teams use moneyball
to win games.
The great news for us as well
is that it's the way that we can transform
the American criminal justice system.
It's how we can make our streets safer,
we can reduce our prison costs,
and we can make our system much fairer
and more just.
Some people call it data science.
I call it moneyballing criminal justice.
Thank you.

(Applause)

repository: prewittdavon/TEDVis

gha_language: Python

repo_name: prewittdavon/TEDVis


text:
## 0.0.1
* Start fork to support standards

# Original Mailer changelog

## 1.1.1
* loosen crypto dependency to '>=0.9.0 <3.0.0' as suggested in the
    [crypto changelog](https://github.com/dart-lang/crypto/blob/master/CHANGELOG.md#200)

## 1.1.0
* merge crypto util fix and update example
* upgrade unittest to test and move it to dev_dependencies
* added OpenMailBoxSmtpOptions
* improve address parsing and sanitization (from hoylen)
* cleanup chunkEncodedBytes and associated test
* update example to allow CC and BCC

## 1.0.1
* add simple example/send_gmail.data
* fix pubspec to pull crypto 0.9.0

## 1.0.0 - Oct 4, 2015
* initial release

repository: butlermatt/snail

repo_name: butlermatt/snail


text:
# arthurpicht/utils-io

[![](https://jitpack.io/v/arthurpicht/utils-io.svg)](https://jitpack.io/#arthurpicht/utils-io)

Some utility and helper classes for java IO.

# JDK

JDK 11 or higher is required.

# Build

Change into project directory and call included gradle wrapper:

    $ ./gradlew jar

## License

Licensed under Apache-2.0 License.

repository: arthurpicht/utils-io

repo_name: arthurpicht/utils-io


text:
# git-get

> Clone into a GOPATH like directory structure

## Install
```
go install github.com/icholy/git-get@latest
```

## Usage

```
git get [<options>] [--] <repo>
```

* Arguments are forwarded directly to `git clone`.
* The `<repo>` parameter **MUST** be placed last.

## Config

By default, repositories are cloned to `~/src`.
This can be changed with the `GIT_GET_PATH` env variable.

## Demo

![](tty.gif)

repository: icholy/git-get

repo_name: icholy/git-get


text:
---

path: "/docs/apps/content-custom-fields"
updated: "2019-06-25"
title: "Content Custom field"
description: ""
author: "Kiruthigha"
category: "Apps"

---

To specify more information about your product, you might be using the description part of the product page. Generally, the description part will be displayed at the bottom of the product page after the title, price and the cart button. What if you wish to display text somewhere else apart from the description part?

Well, of course, you might consider using special module positions or publishing custom html modules. Some might even think of trying overrides. But in these cases, the text would be static.But, when you want the content to be dynamic, how do you achieve this?

**NOTE: This plugin only allows you to enter dynamic data to each of your products.

It is not possible to display form fields or any other input fields at the storefront and collect user input using this field.

Here are the steps to be done:

* Create Joomla fields.
* Download and install the app Content Custom fields.
* Configure the app by choosing where the content has to be displayed.
* Specify the content in the Fields tab of your product article and insert the shortcode for field in the content section of the article.

#### Create Joomla fields

Joomla custom fields can be created by carrying out the following steps:

* Navigate to Content->Fields->New.
* We are going to specify text in our product page. So the Field type must be set to Text.
* Give the field a name, description, label and other details.

**Screenshot**
![cc01](https://raw.githubusercontent.com/j2store/doc-images/master/apps/content-custom-field/contentcustomfields01.png)

#### Download and install the app Content Custom Fields

- The app can be downloaded from our site and installed using the default joomla installer.s
- Post installing the app, it has to be enabled under J2Store->Apps.
- NOTE: The app helps you display the Joomla 3.7 content fields (custom fields) in the product description. Works only in the single product view.

#### Configure the app

- Display content fields using

`Choose where the custom field has to be displayed. The available options are:
    * Field Shortcode(If this is chosen, then the shortcode has to be specified in the product article). Setting chosen here affects the next option.
    *  Display all the fields at the end of product description
    * Before price
    * After price
    *  Before add to cart button
    * After add to cart button`

- Display fields in long/short descriptionChoose if the content should appear in the long description or the short description part of the page. This option is applicable only if the type chosen in the previous Setting is Field short code.
- Display layoutSelect the layout in which the custom field should appear:Product view only- In the individual product view or item view.Category view only- In the product list view or the category view.Both views- In the product list view as well as in the item view.Hide display content in layout- To hide the content in both views.
- Enable Accordion styleChoose the mode of display of the fields, either as an accordion or in the normal mode.
- Category view fieldsSelect the fields that have to be displayed in the category view or the list view.
- Product view fields

Select the fields that have to be visible in the item view or the product view.

**Screenshots**

![cc02](https://raw.githubusercontent.com/j2store/doc-images/master/apps/content-custom-field/contentcustomfields02.png)

## Specify the content and insert shortcode in the product article

- Edit the product article. Navigate to the fields section and mention the content that has to be displayed in the product page.
- Move to the content tab of the article and click on the field option and choose the field that has been created for this.

![cc03](https://raw.githubusercontent.com/j2store/doc-images/master/apps/content-custom-field/contentcustomfields03.png)

![cc04](https://raw.githubusercontent.com/j2store/doc-images/master/apps/content-custom-field/contentcustomfields04.png)

![cc05](https://raw.githubusercontent.com/j2store/doc-images/master/apps/content-custom-field/contentcustomfields05.png)


text:
---
sidebar_position: 1
---

# FAQ

## How to disable sharing on WeChat Mini Program ?

Sorry, it hasn't been implemented.

> **[Proposal]** Add option `disableSharing: true` in the second argument of `render` and Goji won't
> inject `onShareAppMessage` methods when initializing page. But it also means you should not use
> `useOnShareAppMessage` otherwise a warning will log.

## How to use WeChat bubble event, component relationship or Baidu `dispatch` ?

Component communication is one of the most complex and awful designs in the native Mini Program.

In Goji we advice to use [React Context](https://reactjs.org/docs/context.html) or professional
state management tools like [Redux](https://redux.js.org/).

## Why `Subtree` ?

[TODO]

`Subtree` will render to `React.Fragment` on non-wechat platforms.

## When should I use `Subtree` ?

[TODO]

repository: airbnb/goji-js

gha_language: TypeScript

repo_name: airbnb/goji-js


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.40.0](https://github.com/tinacms/tinacms/compare/v0.39.0...v0.40.0) (2021-04-19)

**Note:** Version bump only for package react-tinacms-strapi

# [0.39.0](https://github.com/tinacms/tinacms/compare/v0.38.0...v0.39.0) (2021-03-30)

### Bug Fixes

* copyright ([e4323c2](https://github.com/tinacms/tinacms/commit/e4323c25b7e893005bffad1827018b523b7f6939)), closes [#1778](https://github.com/tinacms/tinacms/issues/1778)

# [0.38.0](https://github.com/tinacms/tinacms/compare/v0.37.0...v0.38.0) (2021-03-08)

**Note:** Version bump only for package react-tinacms-strapi

# [0.37.0](https://github.com/tinacms/tinacms/compare/v0.36.1...v0.37.0) (2021-02-08)

**Note:** Version bump only for package react-tinacms-strapi

# [0.36.0](https://github.com/tinacms/tinacms/compare/v0.35.1...v0.36.0) (2021-01-25)

**Note:** Version bump only for package react-tinacms-strapi

# [0.34.0](https://github.com/tinacms/tinacms/compare/v0.33.0...v0.34.0) (2020-11-23)

**Note:** Version bump only for package react-tinacms-strapi

# [0.33.0](https://github.com/tinacms/tinacms/compare/v0.32.1...v0.33.0) (2020-11-16)

**Note:** Version bump only for package react-tinacms-strapi

# [0.32.0](https://github.com/tinacms/tinacms/compare/v0.31.0...v0.32.0) (2020-10-20)

**Note:** Version bump only for package react-tinacms-strapi

# [0.31.0](https://github.com/tinacms/tinacms/compare/v0.30.0...v0.31.0) (2020-10-05)

### Bug Fixes

* **@tinacms/media:** deprecated since these interfaces were graduated to core ([39f1a72](https://github.com/tinacms/tinacms/commit/39f1a729a112fbab24af4c1e319cdc94867325aa))

### Features

* **react-tinacms-strapi:** the StrapiMediaStore implements MediaStore#delete ([157d1fc](https://github.com/tinacms/tinacms/commit/157d1fcc7f86e5a1064875d68cad743cb4c1a08d))
* **react-tinacms-strapi:** the StrapiMediaStore now implements MediaStore#list ([d851296](https://github.com/tinacms/tinacms/commit/d851296fb899e87394c358bba20c436a74e5c238))

# [0.29.0](https://github.com/tinacms/tinacms/compare/v0.28.0...v0.29.0) (2020-08-25)

**Note:** Version bump only for package react-tinacms-strapi

# [0.28.0](https://github.com/tinacms/tinacms/compare/v0.27.3...v0.28.0) (2020-08-17)

### Features

* **react-tinacms-strapi:** StrapiMediaStore implements previewSrc ([fe5df7d](https://github.com/tinacms/tinacms/commit/fe5df7d804d2c0d1b8f21283dd56ab7132d1414d))

## [0.27.1](https://github.com/tinacms/tinacms/compare/v0.27.0...v0.27.1) (2020-08-10)

**Note:** Version bump only for package react-tinacms-strapi

# [0.26.0](https://github.com/tinacms/tinacms/compare/v0.25.0...v0.26.0) (2020-08-03)

**Note:** Version bump only for package react-tinacms-strapi

# [0.25.0](https://github.com/tinacms/tinacms/compare/v0.24.0...v0.25.0) (2020-07-27)

**Note:** Version bump only for package react-tinacms-strapi

## [0.24.1-alpha.0](https://github.com/tinacms/tinacms/compare/v0.24.0...v0.24.1-alpha.0) (2020-07-22)

**Note:** Version bump only for package react-tinacms-strapi

repository: bshackelford/tinacms

repo_name: bshackelford/tinacms


text:
# http-errors

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][node-url]
[![Node.js Version][node-image]][node-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

Create HTTP errors for Express, Koa, Connect, etc. with ease.

## Install

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):

```bash
$ npm install http-errors
```

## Example

```js
var createError = require('http-errors')
var express = require('express')
var app = express()

app.use(function (req, res, next) {
  if (!req.user) return next(createError(401, 'Please login to view this page.'))
  next()
})
```

## API

This is the current API, currently extracted from Koa and subject to change.

### Error Properties

- `expose` - can be used to signal if `message` should be sent


text:
---
layout: post
title: "How to read large directories with many files"
excerpt: "Occasionally I come across directories with so many files that the ls command just hangs."
categories: [Administration]
comments: true

---

Occasionally I come across directories with so many files that the ls command just hangs. This is because the listing process is holding the file names in memory so that it can sort them. You can use the ls -1 -f options to show the files immediately. -1 will list on e file per line and -f will stop sorting.

If you want to remove all the files in a directory you could try the following command:

```bash
ls -1 -f | xargs rm
```

After cleaning up very many unwanted files, you will be left with a huge and sparse directory object. Three million files in one directory, for example, apart from taking up space in themselves, will likely push the directory object to occupy over 100 Mb of space.

You might decide to recreate the directory to reclaim that 100 Mb. But if it is /tmp, then do so with great care, and only in single user mode.


text:
# EV3ForESP32

*Disclaimer*: LEGO® and Powered UP are trademarks of the LEGO Group of companies which does not sponsor, authorize or endorse this project.

__EV3ForESP32__ is an ESP32 Arduino libary for using both EV3 sensors and servo motors with an ESP32. The inital idea is to use it together with [Legoino](https://github.com/corneliusmunz/legoino) to build a custom Powered UP *compatible* hub which could reuse EV3 / NXT motors and sensors.

## State of the project

The basic work is done. Both motor control and sensor communication is implemented and tested. Both the IR sensor and the color sensor are tested.

## Hardware requirments

The library is implemented for __ESP32__ boards. It may work with other Arduino compatible boards but currently relies on a __FreeRTOS__ implementation to be present.
Further hardware is required to drive motors and retrieve data from sensors. It is important to add the hardware because all sensors work at 5V but the __ESP32__ requires 3.3V at its inputs!

The level shifter to convert both quadrature encoder signals and uart communiction between 5V and 3V3 is a simple circuit using a mosfet (for prototypes you can use a 2N7000A) and two resistor per line.

![Sensor connection scheme](https://raw.githubusercontent.com/StefansProjects/EV3ForESP32/main/doc/sensor_connection.png)

For communication with NXT sensors remove the 10k pullups on the 5V side!

To drive the motors, I use a `DRV8833 Dual H-Bridge Motor Driver` (you can find simple boards for prototyping on the usual platforms). Its limits for both voltage and current are close to the ones for the EV3 motors, so its a perfect fit to drive two EV3 motors. But you can use any other motor driver.

You can connect both the inputs of the h-bridge and the 3V3 outputs of the level-shift circuit to any GPIO of the ESP32.

## Quickstart

This project uses the [**PlatformIO**](https://platformio.org/) platform to build and manage dependencies. Just get [Visual Studio Code](https://platformio.org/install/ide?install=vscode), install the PlatformIO extension and check out this project.

### EV3 regulated motor

To use a motor simply create an instance of `EV3RegulatedMotor` with the GPIOs of the h-bridge and sensor.

```C++
EV3RegulatedMotor motor(ESP32_PWM1, ESP32_PWM2, ESP32_TACHO1, ESP32_TACHO2);
```

In the `setup()` function just start the motor control

```C++
motor.start();
```

Then you can simply set a direction and simple PWM value by using

```C++
void setPWM(boolean direction, uint8_t value);
```

Or you can use the advanced features by retrieving the current positon or setting a target position the motor will head for using PID control. If the position control is not working, try to switch the PWM outputs (e.g. ESP32_PWM1, ESP32_PWM2).

```C++
 int64_t getPosition();
 void setPosition(int64_t position);
```

### EV3 sensor

Lego has implemented a sumptuous protocol for the communication with the EV3 sensors. It consist of two phases.
In the first phase the sensor introduces itself, all its supported modes, the target baudrate, the data format and so on, at a slow baudrate (2400 baud). After sensors self-introduction the host has to acknowledge the introduction and switch to the presented target baudrate. Then the host could finally switch the sensor to the desired mode and receive the data.

Fortunately some guys have decoded the protocol, so one can use the work from the [leJOS Team ](https://sourceforge.net/p/lejos/wiki/UART%20Sensor%20Protocol/) and the documentation from [EV3DEV.ORG](http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-jessie/sensor_data.html) to implement the communication.

For the whole implementation I used a callback-oriented architecture. The main class `EV3SensorPort` takes a `Stream` implementation (e.g `HardwareSerial`. The software serial implementation plerup/EspSoftwareSerial is working, too.) and a callback method to switch the baudrate of the `Stream`.
The `begin` method starts a new FreeRTOS task to start the self-introduction of the sensor. It takes one argument, a callback called after the introduction phase is finished and the the sensor is ready to receive the mode and deliver data. Using `getCurrentConfig` you can get all the information delivered by the sensor in the first phase. The `type` of sensor is the most interesting information (Color sensor = 29, IR Sensor = 33).

```C++
// SoftwareSerial swSer;
// EV3SensorPort sensor(&swSer, [](int v) { swSer.end(); swSer.begin(v, SWSERIAL_8N1, ESP32_TACHO2, ESP32_TACHO1); });
EV3SensorPort sensor(&Serial1, [](int v) { Serial1.begin(v, SERIAL_8N1, ESP32_TACHO2, ESP32_TACHO1); });

void setup() {
 sensor.begin([](EV3SensorPort *p) {
    Serial.print("Found sensor of type ");
    Serial.println(p->getCurrentConfig()->type, HEX);
  });
}
```

You can use methods like `selectSensorMode` to select one of the supported sensor modes and set a callback for new messages from the sensor using `setMessageHandler`.
The classes `EV3ColorSensor` and `EV3IRSensor` are thin wrappers around the `EV3SensorPort` providing a sensor specific API.

### NXT Sensors

Currently there is support for the NXT Ultrasonic Sensor (distance sensor) and the HiTechnic IRLink sensor (enables to control LEGO Power Functions IR receiver).

## Development

The library uses the [**ESP32 Logging Library**](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/log.html). Especially at verbose level, the library gives extensive information about the sensor configuration detected.

## TODO

* Test the ultrasonic sensor
* Test the gyro sensor
* Add libraries for the ultrasonic and the gyro sensor
* Clean up code and add nice examples

**WORK IN PROGRESS**


text:
# Narcissus

    A blog site: some of my footprints unto this beloved world,
    transcribed and represented by multimedia.

----

See Here: [https://kahsolt.github.io](https://kahsolt.github.io)

### Thanks to
  - framework: [hexo](https://hexo.io)
  - themes:
    + [cyanstyle](https://github.com/wizardforcel/hexo-theme-cyanstyle)
    + [Diaspora](https://github.com/LoeiFy/Diaspora)
  - plugins:
    + [live2d-widget](https://github.com/stevenjoezhang/live2d-widget)
    + [live2d-widget-model](https://github.com/xiazeyu/live2d-widget-models)
    + [live2d hexo-helper](https://github.com/EYHN/hexo-helper-live2d)
  - plugins(FAILED):
    - [hexo-ruby-character](https://github.com/JamesPan/hexo-ruby-character)

----

by Armit
2019/10/01

repository: Kahsolt/Narcissus

repo_name: Kahsolt/Narcissus


text:
---
layout: post
title: "Via Reddit: Sum up a popular film, song, or TV series in a few lines of code."
categories:
- blog
---

I found this [awesome thread](http://www.reddit.com/r/AskReddit/comments/1poo0n/programmers_of_reddit_how_would_you_sum_up_a/) in [/r/AskReddit](http://reddit.com/r/askreddit) today. [/u/dingobiscuits](http://www.reddit.com/user/dingobiscuits) asks the programmers of Reddit to sum up a popular film, song, or TV series in a few lines of fake code. The answers do not disappoint.  Here are some of my favorites.

From [/u/takagi](http://www.reddit.com/user/Takagi): (Call me maybe)

```c
if (justMetYou)
{
    crazy = true;
    cout<<number<<endl;
    int x = rand()%100;
    if (x>=50)
    {
        callMe();
    }
}
```

<!--more-->

From [/u/ZekeD](http://www.reddit.com/user/ZekeD): Batman or Hey Jude?

```perl
for ($i = 0; $i < 11; $i++){
    $chorus .= "Na ";
}

if ($subject == "Batman"){
    $chorus .= " BATMAN.";
}
else {
    $chorus .= " Hey Jude.";
}
```

From [/u/Gazz1016](http://www.reddit.com/user/Gazz1016): The Matrix

```c
int[][];
```

From [/u/Sahasrahla](http://www.reddit.com/user/Sahasrahla): Inception

```javascript
function inception(){
    return inception();
}
```

There are a bunch more very good ones in there. They made my day!


text:
---
permalink: migrating-a-net-application-from-amazon-web-services/
audit_date:
title: Migrate a .NET application from Amazon Web Services
type: article
created_date: '2013-07-02'
created_by: Rackspace Support
last_modified_date: '2018-02-27'
last_modified_by: Cat Lookabaugh
product: Cloud Servers
product_url: cloud-servers
---

**Previous section:** [Provision cloud resources when migrating from Amazon Web Services](/how-to/provisioning-cloud-resources-when-migrating-from-amazon-web-services)

This article describes the migration of a .NET web application from
Amazon Web Services (AWS) to Rackspace Cloud. It takes an estimated 30
minutes to complete, if you follow the instructions step by step.

The topology of the application in this scenario is represented in the
following figure:

### Prerequisites

-   Microsoft Windows Server on AWS running a .NET web application on
    Internet Information Services (IIS) (Windows Server 2012 with IIS 8
    is used in this use case.)
-   Valid and enabled account on Rackspace Cloud

### Preparation

-   Identify the resources to migrate, including application and
    database resources.
-   If you have not already, [create a Cloud Server instance](/how-to/provisioning-cloud-resources-when-migrating-from-amazon-web-services)
    and any supporting Rackspace Cloud services.

### Install software packages

1.  Install the Rackspace Cloud Files client as follows:

    1.  Connect to the AWS instance by using Remote Desktop Connection.

    2.  After you are connected, install an FTP client application that you will use to back up data to Rackspace Cloud Files. You can use any browser to download the client.

    3.  Create a connection to Rackspace Cloud Files by using your Rackspace account user name and API key. You will use this connection to back up data during the migration steps.

2.  Install IIS 8 by using the instructions located at <http://www.iis.net/learn/get-started/whats-new-in-iis-8/installing-iis-8-on-windows-server-2012> .

### Back up data from AWS to Rackspace Cloud Files

Using the FTP client that you installed in the preceding section, upload the .NET project folder to the Rackspace Cloud Files container
that you created in the article [Provision cloud resources when migrating from Amazon Web Services](https://support.rackspace.com/how-to/provisioning-cloud-resources-when-migrating-from-amazon-web-services/).

### Restore data from Cloud Files to Cloud Servers

1.  Connect to your Rackspace Cloud Servers instance by using Remote Desktop Connection.
2.  Copy the .NET web application folder from the Cloud Files container to the cloud server at the following location:

        C:\inetpub\wwwroot

3.  Open IIS Manager, click **Add Website**, and enter details: site name, physical path, and host name.

4.  After the website is created, stop the Default Web Site pre-installed application and start your web application.

### Test your application

Click on **Browse \*:80 (http)** to see the application in the browser.

### Next step

[Post-migration considerations when migrating from Amazon Web Services](/how-to/post-migration-considerations-when-migrating-from-amazon-web-services)

For other migration scenarios, see the following articles:

-   [Migrate an application built on a LAMP stack from Amazon Web Services](/how-to/migrating-an-application-built-on-a-lamp-stack-from-amazon-web-services)
-   [Migrate a Java web application from Amazon Web Services](/how-to/migrating-a-java-web-application-from-amazon-web-services)
-   [Migrate an application based on Backbone.js, Node.js, and MongoDB from Amazon Web Services](/how-to/migrating-an-application-based-on-backbonejs-nodejs-and-mongodb-from-amazon-web-services)

repository: rackerlabs/rackspace-how-to

gha_language: Shell

repo_name: rackerlabs/rackspace-how-to


text:
# GitHub Organization

The LinkML project is organized in a modular fashion, and consists of different
components. Each component lives in its own GitHub repository. It may also be distributed
as a separate software package on sites like PyPI.

See the [github.com/linkml](https://github.com/linkml) organization on GitHub to browse all repos.

Note that for many LinkML users, there is no need to understand the overall organization.

## Core Packages

The two most important packages are `linkml` and `linkml-runtime`

* [linkml](https://github.com/linkml/linkml)
    - [generators](generators)
    - utilities for working with data
    - this documentation
* [linkml-runtime](https://github.com/linkml/linkml-runtime)
    - code needed by linkml python object models
    - utility code such as [schemaview](developers/manipulating-schemas)
    - includes metamodel (linkml_runtime.linkml_model)

If you are using LinkML in a Python environment, then as a general rule
you should only need `linkml` as a *developer dependency*. This is used for
things like compiling your schema to data classes. This is something the
package developer does prior to release, rather than at *runtime*.

The `linkml-runtime` package is designed to provide runtime support. If you develop
a Python project, then your generated data classes will have a runtime dependency
on this package

## The metamodel

The metamodel and specification have their own dedicated repo:

* [linkml-model](https://github.com/linkml/linkml-model)
  - self-describing linkml datamodel
  - note that you should not use this module programmatically - use linkml_runtime.linkml_model

There are no programmatic dependencies on this repo. But note that the
python dataclasses generated from this are incorporated into linkml-runtime.

## Productivity utilities

* [linkml-project-cookiecutter](https://github.com/linkml/linkml-project-cookiecutter)
  - Build a new LinkML project conformant to best practices for directory layout, with hooks for
    automatic updates, and a suite of autogenerated example schemas.
* [schema-automator](https://github.com/linkml/schema-automator)
  - tools for bootstrapping schemas
     - from unstructured TSVs
     - from OWL ontologies
     - from JSON-Schema
  - tools for inferring enum ontology mappings using OLS and BioPortal

Note that schema-automator depends on LinkML, but there are no dependencies from
the core package on schema-automator

## Working with different backends

* [linkml-solr](https://github.com/linkml/linkml-solr)
   - provides a way of compiling LinkML schemas to Solr schemas
   - runtime query bindings to Solr updates and queries

## Additional packages

* [linkml-dataops](https://github.com/linkml/linkml-dataops)
  - extension to runtime to provide:
     - a change/patch API over data
     - a query API over data

## LinkML for other languages

### Javascript/Typescript

* [linkml-runtime.js](https://github.com/linkml/linkml-runtime.js)
* linkml-runtime-java (in progress)

repository: linkml/linkml

repo_name: linkml/linkml