text:
am-django-project
=================

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0d1172745ea9433a8eec5982e8d8b058)](https://app.codacy.com/app/NathanLawrence/am-django-project?utm_source=github.com&utm_medium=referral&utm_content=access-missouri/am-django-project&utm_campaign=badger)
[![Documentation Status](https://readthedocs.org/projects/access-missouri/badge/?version=latest)](https://access-missouri.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/access-missouri/am-django-project.svg?branch=master)](https://travis-ci.org/access-missouri/am-django-project)
[![Coverage Status](https://coveralls.io/repos/github/access-missouri/am-django-project/badge.svg?branch=master)](https://coveralls.io/github/access-missouri/am-django-project?branch=master)

Integration hub for all Access Missouri data sets (built in Django).

## Usage and Full Documentation
This is a pretty big project with tens of thousands of lines of code and tons of different data sources. To keep things organized and simplify the process of learning what you need to know, most major documentation now happens in [the project wiki](https://github.com/access-missouri/am-django-project/wiki).

## In Brief

Requires:

* Python 2.7 (currently testing 3.5 also)
* PostgreSQL 9.4 or greater

To bootstrap the project locally:
```bash
make bootstrap
```

To run tests locally:
```bash
make test
```

repository: access-missouri/am-django-project

repo_name: access-missouri/am-django-project


text:
# EPL L10NPlugin

Apama EPL Plugin for translating messages using GNU gettext

## GNU Gettext

Gettext is an integrated set of tools and libraries for translating strings within code and displaying translations to users based on their configured locale. More information can be found on [their website](https://www.gnu.org/software/gettext/) and the [manual for the Gettext utilities](https://www.gnu.org/software/gettext/manual/html_node/index.html)

## Supported Apama version

This works with Apama 10.3 or later

## Building the plugin

To build you will need an Apama installation and a copy of the Gettext libraries and utilities. Apama can be downloaded from [Apama Community](http://www.apamacommunity.com). Gettext is normally installed by default on all major Linux distributions. If you are using a thin base image or similar you may need to install the relevant packages first, which can be found in the packages `gettext`, `libboost-all-dev` and `libc6-dev` on Debian-based distributions and the `gettext`, `boost-devel` and `glibc-headers` packages on Redhat-based distributions. Windows binaries can be downloaded from [gettext](https://mlocati.github.io/articles/gettext-iconv-windows.html), [libintl](https://sourceforge.net/projects/gnuwin32/), [boost](https://sourceforge.net/projects/boost/) along with [mingw g++](https://sourceforge.net/projects/mingw-w64/).

In an Apama command prompt on Linux run:

	mkdir -p $APAMA_WORK/lib
	g++ -std=c++11 -o $APAMA_WORK/lib/libL10NPlugin.so -I$APAMA_HOME/include -L$APAMA_HOME/lib -lapclient -shared -fPIC L10NPlugin.cpp

On Windows run:

	 g++ -std=c++11 -o %APAMA_WORK%\lib\L10NPlugin.dll -shared L10NPlugin.cpp -I%APAMA_HOME%\include -I%BOOST_INCLUDE% -I%INTL_INCLUDE% -L%APAMA_HOME%\lib -L%INTL_LIB% -llibintl -lapclient

Set the `BOOST_INCLUDE`, `INTL_INCLUDE` and `INTL_LIB` environment variables to the location they were installed.

## Running tests

To run the tests for the plugin you will need to use an Apama command prompt to run the tests from within the tests directory:

	pysys run

## Using the L10NPlugin

The [API documentation](https://mjj29.github.io/apama-epl-l10n-plugin/doc/) for the L10N plugin contains descriptions for the API for all the available methods.

To use the L10NPlugin you must first inject L10N.mon, import it into your monitor:

	using com.apamax.L10N;

Then create an instance of L10N and initialize it with a name identifying the set of translations and the location of the translation files. There are several options to locate the translation files. By default it will look in $APAMA\_WORK/translations/identifier. Alternatively you can provide an absolute path, or the value of a configuration property:

	monitor test {
		L10N l10n;
		action onload() {
			l10n.init("test");
			l10n.initFromProperty("test", "TEST_TRANSLATIONS");
			l10n.initFromPath("test", "/path/to/translations");
		}
	}

Next it's recommended you setup some alias functions in your monitor, to make calling for translations simpler:

	monitor test {
		L10N l10n;
		action _(string s) returns string { return l10n.gettext(s); }
		action _N(string s1, string s2, integer n) returns string { return l10n.ngettext(s1, s2, n); }
		action printf(string f, sequence<any> a) returns string { return l10n.printf(f, a); }
		...
	}

You can then use these functions to write translatable strings:

	log _("Application setup and ready") at INFO;
	try {
		...
	} catch (Exception e) {
		log printf(_("Caught exception type %1$s message: %2$s"), e.getType(), e.getMessage());
	}
	on all MyEvent() as me {
			count := count + 1;
			log printf(_N("Received a total of one message, it is %1$s", "Received a total of %2$d messages, latest is %1$s", count), [<any>me.toString(), count]);
	}

The L10N plugin and gettext allow you to specify handling for plurals, which might be treated very differently in different languages with the use of the ngettext function, here aliased to \_N for convenience.

Next, you will want to extract the strings from your monitor and generate translations for them. This can be done with the standard gettext tooling to extract the text and generate .po and then .mo files for the translations. To extract the text strings from the .mon file run xgettext with these arguments:

	xgettext --package-name test --package-version 1.2 --default-domain test --output MyMessages.pot MyMonitor.mon -C  -k_ -k_N:1,2 -kgettext -kngettext:1,2

Here the domain specifier should match the identifier you pass to init.

Next create an input file for each translation language (here shown with Spanish):

	msginit --no-translator --locale es_MX --output-file MessagesSpanish.po --input MyMessages.pot

The translator should provide translations in the MessagesSpanish.po file

Lastly, convert the translated .po file into a compiled .mo file:

	mkdir -p es_MX.utf8/LC_MESSAGES
	msgfmt --check --verbose --output-file ./es_MX.utf8/LC_MESSAGES/test.mo MessagesSpanish.po

Again, here the name of the .mo file should match the identifier passed to init.

Finally, if you run the correlator in the appropriate locale, it will return messages from the matching translated file. To see this in action, see the sample below.

## Sample

A simple end-to-end sample is provided in the sample folder. To run the sample in English run the following from an Apama command prompt:

	correlator --config sample

You should see it produce messages similar to these:

	Setup and waiting for messages
	Received a total of one message, it is EventOne
	Received a total of 2 messages, latest is EventTwo
	Received a total of 3 messages, latest is EventThree

To run the sample in Spanish to see the translations, run the following from an Apama command prompt:

	LANG=es_MX.utf8 correlator --config sample

You should see it produce messages similar to these:

	Configurar y esperar mensajes
	Recibió un total de 1 mensaje, es EventOne
	Recibió un total de 2 mensajes, el último es EventTwo
	Recibió un total de 3 mensajes, el último es EventThree

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
[![Build Status](https://travis-ci.org/Vincit/knex-db-manager.svg?branch=master)](https://travis-ci.org/Vincit/knex-db-manager)
[![Coverage Status](https://coveralls.io/repos/github/Vincit/knex-db-manager/badge.svg?branch=master)](https://coveralls.io/github/Vincit/knex-db-manager?branch=master)
[![Greenkeeper badge](https://badges.greenkeeper.io/Vincit/knex-db-manager.svg)](https://greenkeeper.io/)

Pretty useful when writing scripts to initialize database for fresh install or
dropping / creating new database when running tests and for truncating database
between tests.

Library uses knex connection for non administrative queries, but also creates
priviliged connection directly with driver with superuser privileges for creating
and dropping databases / roles.

## Supported Databases

- PostgreSQL
- MySQL
- ~~SQLite3 (TBD even though most of the functions won't make sense with this)~~
- ~~Oracle DB Express (TBD)~~
- ~~MSSQL (TBD if we can get integration tests to run automatically)~~

## Install

You need to install `knex`, database driver and `knex-db-manager`

```
npm install knex-db-manager knex pg pg-escape
```

## API & Usage

Database manager is initialized with normal `knex` configuration and with
superuser account which should be able to create / drop roles and databases.

> Initialization:

```js
let config = {
  knex: {
    // just the usual knex configuration
    client: 'postgres',
    connection: {
      host: 'localhost',
      database: 'appdb',
      user: 'dbowneruser',
      password: 'dbownerpassword',
    },
    pool: {
      min: 0,
      max: 10,
    },
    migrations: {
      directory: __dirname + '/migrations',
    },
  },
  dbManager: {
    // db manager related configuration
    collate: ['fi_FI.UTF-8', 'Finnish_Finland.1252'],
    superUser: 'userwithrightstocreateusersanddatabases',
    superPassword: 'privilegeduserpassword',
    populatePathPattern: 'data/**/*.js', // glob format for searching seeds
  },
};

let dbManager = require('knex-db-manager').databaseManagerFactory(config);
```

### `createDbOwnerIfNotExist(): Promise<void>`

Creates the user, which is described in `knex` configuration. This user is used as
the database owner when creating new databases.

```js
let promise = dbManager.createDbOwnerIfNotExist();
```

### `createDb(dbName?: string): Promise<void>`

Creates database described in `knex` configuration or by given name. Owner of the
created database is set to be the `config.knex.connection.user`.

`dbName` is the name of the database to be created, if not given the name is read
from `config.knex.connection.database`.

> Read database from `config.knex.connection.database`:

```js
let promise = dbManager.createDb();
```

> By given name:

```js
let promise = dbManager.createDb('brave-new-db');
```

### `dropDb(dbName?: string): Promise<void>`

Drops database described in `knex` configuration or by given name. Note
that if there are any active connections to the database that is being
dropped, the drop command might fail.

`dbName` is the name of the database to be dropped, if not given the name
is read from `config.knex.connection.database`.

> Drop database `config.knex.connection.database`:

```js
let promise = dbManager.dropDb();
```

> By specific name:

```js
let promise = dbManager.dropDb('brave-new-db');
```

### `copyDb(fromDbName: string, toDbName: string): Promise<void>`

Clones database to another name remotely on db serverside (may be useful e.g.
to make backup before running migrations).

New database `toDatabaseName` will be created containing a copy of `fromDbName`.

Note: This method is not supported with MySQL (yet).

> Making copy of DB:

```js
let promise = dbManager.copyDb('brave-new-db', 'brave-new-db-copy');
```

### `truncateDb(ignoreTables?: string[]): Promise<void>`

Truncate tables of the database and reset corresponding id sequences.

`ignoreTables` list of tables names which should not be truncated.

> Truncate database `config.knex.connection.database`:

```js
let promise = dbManager.truncateDb();
```

> ignore certain tables:

```js
let promise = dbManager.truncateDb(['migrations']);
```

### `updateIdSequences(): Promise<void>`

Updates all primary key id sequences to be biggest id in table + 1.
So after running this next `INSERT` to table will get valid id for
the row from the sequence.

This was motivated by some people who liked to create test data with
hard coded ids, so this helps them to make app to work normally after
adding rows to tables, which has not used id sequence to get ids.

The function assumes that the primary key for each table is called `id`.

Note: This method is not supported with MySQL (yet).

> Reset sequence of database `config.knex.connection.database`:

```js
let promise = dbManager.updateIdSequences();
```

### `populateDb(glob: string): Promise<void>`

Finds `knex` seed files by pattern and populate database with them.

`glob` is a pattern to match files to be ran, if not given the name is
read from `config.dbManager.populatePathPattern`.

> Get database from `config.knex.connection.database` and pattern
> from `config.dbManager.populatePathPattern`:

```js
let promise = dbManager.populateDb();
```

> with pattern:

```js
let promise = dbManager.populateDb(path.join(__dirname, 'seeds', 'test-*'));
```

### `migrateDb(): Promise<void>`

Runs `knex` migrations configured in knex config.

> Get database from `config.knex.connection.database`:

```js
let promise = dbManager.migrateDb();
```

### `dbVersion(): Promise<string>`

Checks which migrations has been ran to database.

Expects that migration name starts with timestamp.

If no migrations has been run, promise resolves to `'none'`. Otherwise
resolves to first numbers of latest migration file ran e.g. for
`20141024070315_test_schema.js` version will be `'20141024070315'`.

> Get database from `config.knex.connection.database`:

```js
let promise = dbManager.dbVersion();
```

### `close(): Promise<void>`

Closes the single privileged connection and all normal knex connections.

> Kill database connection:

```js
let promise = dbManager.close();
```

### `closeKnex(): Promise<void>`

Closes knex connection which is made to the database for unprivileged
queries. Sometimes this is needed e.g. for being able to drop database.

> Close knex connection

```js
let promise = dbManager.closeKnex();
```

### `knexInstance(): QueryBuilder`

Returns `knex` query builder bound to configured database.

> Get database from `config.knex.connection.database`:

```js
let knex = dbManager.knexInstance();
knex('table')
  .where('id', 1)
  .then((rows) => {
    console.log('Query was ran with db owner privileges', rows);
  });
```

license: ISC

repository: Vincit/knex-db-manager

gha_language: JavaScript

gha_license_id: ISC

repo_name: Vincit/knex-db-manager


text:
UPGRADE
=======

Upgrading from 0.2 to 0.3
-------------------------

* Removed the `MappedStatement` and `MappedVerb` classes. They are needed
  for Doctrine based implementations and thus have been moved to the
  `php-xapi/repository-doctrine` package. Consequently, the `StatementRepository`
  class has been removed too. You now have to implement the `StatementRepositoryInterface`
  and handle `Statement` classes directly instead.

* Removed the `NotFoundException` in favor of the exception with the same
  name from the `php-xapi/exception` package.

* The public API now uses `StatementId` instances instead of strings to carry
  information about statement ids. This means changes to the following methods:

  * `StatementRepositoryInterface::findStatementById()`: The `$statementId`
    argument is now type hinted with `StatementId`.

  * `StatementRepositoryInterface::findVoidedStatementById()`: The `$voidedStatementId`
    argument is now type hinted with `StatementId`.

  * `StatementRepositoryInterface::storeStatement()`: The method returns a
    `StatementId` instance instead of a string.

* The requirements for `php-xapi/model` and `php-xapi/test-fixtures` have
  been bumped to `^1.0` to make use of their stable releases.

Upgrading from 0.1 to 0.2
-------------------------

The base namespace of all classes was changed from `Xabbuh\XApi\Storage\Api` to
`XApi\Repository\Api`.

license: MIT

repository: gwmahub/repository-api

repo_name: gwmahub/repository-api


text:
---
layout: page
permalink: /disclosure/
title: "Disclosure"
nofollow: false
published: true
---

### Theme Credit:

*   Base: [*lanyon*](https://github.com/poole/lanyon){:target="_blank"} by [Mark Otto](https://github.com/mdo){:target="_blank"}
* 	Sub-Base: [*lanyon-plus*](https://github.com/dyndna/lanyon-plus){:target="_blank"} by [Samir B. Amin](http://www.sbamin.com){:target="_blank"}
*   Modifications: [*connorjan*](https://github.com/connorjan/connorjan.github.io){:target="_blank"} by [Connor Goldberg](http://connorgoldberg.com){:target="_blank"}

{% highlight txt %}
Released under MIT License

Copyright (c) {{ site.time | date: '%Y' }} {{ site.owner.name }}.

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

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

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


text:
# Jockey

Just another task runner (sure, just another, but the first Dallas themed! :tv:).

This wheel's been already invented thousand times, what's the catch, chap? Jockey is the task runner of microservices. There are those times, when setting up docker containers becomes quite cumbersome...

Some of your artifacts should be checked out from feature branches, versions should be adjusted, environment parameters overridden, and so on, what a mess! And imagine that you have to pass all these settings to a colleague!

You can think of Jockey as the docker-compose of complex local deployments.

## Installation

Interested, huh? Then get your copy:

~~~~
$ npm install @jockey/jockey-cli -g
~~~~

## Lights, Dallas, rodeo!

Running Jockey is as easy as

~~~~
$ jockey-cli rodeo
~~~~

in the same directory as your jockeyfile (will talk about it soon, pinky-swear!). If you've named it `why-did-bobby.die` then use

~~~~
$ jockey-cli rodeo why-did-bobby.die
~~~~

## Tell Jockey how to rock!

Jockey can be configured by creating a `jockey.yml` file (or `rainbow-kitten-attack.yml`, whatever you want, just create a valid YAML file :rainbow:).

The jockeyfile can contain component definitions. A component can be a service, a library or some intermediary step to be performed by jockey. Who am I to tell ya, what you can do?

Let's say that we have some component, named `ewing-oil` (let's assume, you're working in the oil industry). Then you can create the following jockey-file:

~~~~YAML
components:
    - name: ewing-oil
      steps:
        - use: git
          with:
            clone: https://github.com/john-ross-ewing/ewing-oil
            directory: ewing-oil
            checkout: master
        - use: pom
          with:
            override:
                com.ewing.valve.version: 1.3.0
        - use: maven
          with:
            command: clean install
        - use: context
          with:
            env:
                OIL_PRICE: 100
        - use: maven
          with:
            command: exec:java
            define:
                exec.mainClass: com.ewing.oil.Main
            waitForCompletion: false
~~~~

Whoa, that's quite a lot even for a component like `ewing-oil`! Let's break it down a bit. You can see, that we have step definitions here that will be performed sequentially by Jockey.

Each step consists of two fields, `use` which is a plugin name and `with` that tells the plugin some nitty-gritty details on how we want it to run. Each plugin has a different set of parameters that can be defined in the `with` section.

Huh, are we there yet? Not quite. There is more, there is more, THERE IS MORE!

### Context

Jockey casts some black voodoo spells and maintains a context between steps. That means that steps can take data from the previous step and pass data to the next one. This data is called `context`.

Look at the previous example. How did the `pom` plugin know, where to search for the POM file? Easy, mate, it has received the directory setting from the `git` plugin and searched for `pom.xml` in that directory. Same goes for the `maven` plugins.

## Plugins

Currently all plugins are baked into Jockey, so that you can get it up and running easily. Sure thing, using JS jockeyfiles instead of YML would be easy, but we don't want anyone to write JS if they do not intend to first place.

### jockey-context

Can be used to modify the context.

Example:

~~~~YAML
    - use: context
      with:
        env: # env can be used to set environment variables by convention
            SOMEVARIABLE:abc
        directory: a/house/divided
~~~~

Also, we have operators! Well, only one at the moment, but it at least, that one works:

~~~~YAML
    - use: context
      with:
        a: [1, 2, 3]
    - use: context
      with:
        a:
          $push: [4, 5, 6]
~~~~

The value of `a` is going to be `[1, 2, 3, 4, 5, 6]`.

### jockey-git

**Note**: You must have `git` installed in order to use jockey-git.

This plugin can be used to clone a git repository and checkout a specified treelike stuff. An example usage:

~~~~YAML
    - use: git
      with:
        clone: https://github.com/john-ross-ewing/ewing-oil
        directory: ewing-oil
        checkout: ca82a6dff817ec66f44342007202690a93763949
~~~~

Using the previous definition, jockey-git will clone the specified repo and checkout the mentioned commit. If you omit the `clone` parameter then no cloning will happen.

Also, jockey-git will set the `directory` field in the context, so subsequent command can depend on it.

### jockey-maven

**Note**: You must have `maven` installed in order to use jockey-maven.

jockey-maven can be used to run maven commands (what a surprise?). Let's see an example usage:

~~~~YAML
    - use: maven
      with:
        command: spring-boot:run
        debug:
            address: 8000
        define:
            whatever:1024
        profiles: [ci]
        waitForCompletion: false
~~~~

The only thing that can be a root of some misconceptions is the `waitForCompletion` setting. By default, it's set to `true`. On the other hand, setting it to `false` will instruct Jockey to move on to the next step/component and let the `maven` plugin mind its own business.

### jockey-pom

jockey-pom simply reads the contents of a POM file and overrides/sets some properties. This can be used to override versions. Example:

~~~~YAML
    - use: pom
      with:
        file: ewing-oil/pom.xml
        override:
          com.ewing.valve.version: 1.3.0
~~~~


text:
# 0.0.7 (2017-07-11)
* **Upgrade** to<EMAIL_ADDRESS>
# 0.0.6 (2017-05-10)
* **Updated** secure token for `.travis.yml`

# 0.0.5
* **Added** the coverage config and coverage directory to run code coverage
* **Removed** float of `ember-cli-code-coverage` package to keep package at 0.3.5 until resolution of: https://github.com/kategengler/ember-cli-code-coverage/issues/75

# 0.0.4
* **Updated** to use latest pr-bumper which supports being able to set a PR to `none` when publishing a new version is not desired.

# 0.0.3

Please add a description of your change here, it will be automatically prepended to the `CHANGELOG.md` file.
**Fixed** dummy app routes not being exported correctly.
**Added** production environment config for github pages publishing.

# 0.0.2

Please add a description of your change here, it will be automatically prepended to the `CHANGELOG.md` file.

# 0.0.1
Removed unnecessary cli config data.

repository: ciena-frost/ember-frost-buckets

repo_name: ciena-frost/ember-frost-buckets


text:
# Homelab Setup

This project is the "configuration as code" for my homelab environment. The project goal is to simplify management, updates, and configuration changes for every service running on my home network so that I don't get bogged down with day 2 operations (preventing me from focusing on my other projects). This document describes the steps required to (re)deploy each service from scratch.

## Table of Contents
1. [Router](#router)
1. [Gitea](#gitea)
1. [Nextcloud](#nextcloud)
1. [Harbor](#harbor)
1. [Kubernetes](#kubernetes)
1. [OctoPi](#octopi)

## Router

1. Install OpenBSD 6.7
    - Enable SSH
1. Setup passwordless SSH
    ```
    mkdir ~/.ssh
    chmod 700 ~/.ssh
    vi ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    ```
1. Install Python
    ```
    pkg_add python-3.8.2
    ```
1. Run router Ansible role
    ```
    make router
    ```

## Gitea

1. Provision a VM
    - 1 CPU
    - 1 GB memory
    - 8 GB disk
1. Install Debian 10
    - Disable GUI
    - Disable print server
    - Enable SSH
1. Setup passwordless SSH
    ```
    mkdir ~/.ssh
    chmod 700 ~/.ssh
    nano ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    ```
1. Install sudo
    ```
    apt install sudo
    usermod -aG sudo <user>
    ```
1. Run gitea Ansible role
    ```
    make gitea
    ```
1.  Log in, setup SSH keys, GPG keys, repos, etc.

## Nextcloud

1. Provision a VM
    - 1 CPU
    - 1 GB memory
    - 64 GB disk
1. Install Debian 10
    - Disable GUI
    - Disable print server
    - Enable SSH
1. Setup passwordless SSH
    ```
    mkdir ~/.ssh
    chmod 700 ~/.ssh
    nano ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    ```
1. Install sudo
    ```
    apt install sudo
    usermod -aG sudo <user>
    ```
1. Run nextcloud Ansible role
    ```
    make nextcloud
    ```
1. Complete installation with web UI
1. Install "Deck" App

## Harbor

1. Provision a VM
    - 2 CPU
    - 4 GB memory
    - 128 GB disk
1. Install Debian 10
    - Disable GUI
    - Disable print server
    - Enable SSH
1. Setup passwordless SSH
    ```
    mkdir ~/.ssh
    chmod 700 ~/.ssh
    nano ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    ```
1. Install sudo
    ```
    apt install sudo
    usermod -aG sudo <user>
    ```
1. Run harbor Ansible role
    ```
    make harbor
    ```
1. Log in to web UI and change admin password
1. Configure Docker client to trust private CA
    ```
    sudo mkdir -p /etc/docker/certs.d/harbor.mydomain.com/
    sudo vim /etc/docker/certs.d/harbor.mydomain.com/ca.crt
    ```

## Kubernetes

1. Provision 6 VMs
    - 2 CPU
    - 7 GB memory
    - 32 GB disk
1. Install Debian 10
    - Disable GUI
    - Disable print server
    - Enable SSH
1. Setup passwordless SSH
    ```
    mkdir ~/.ssh
    chmod 700 ~/.ssh
    nano ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    ```
1. Install sudo
    ```
    apt install sudo
    usermod -aG sudo <user>
    ```
1. Run k8s Ansible role
    ```
    make k8s
    ```
1. (optional) Copy ~/.kube/config to local machine
    ```
    mkdir ~/.kube
    chmod 770 ~/.kube
    scp user@k8s-control-plane.mydomain.com:~/.kube/config ~/.kube/config
    ```

## OctoPi

1. Install [OctoPi](https://github.com/guysoft/OctoPi)
1. Configure WiFi by editing `octopi-wpa-supplicant.txt` on the root partition
1. Connect to Raspberry Pi
    ```
    ssh<EMAIL_ADDRESS># password: raspberry
    ```
1. Edit system settings
    ```
    sudo raspi-config
    # change password
    # set locale (under Localisation)
    # set timezone (under Localisation)
    ```
1. Change root user password
    ```
    sudo su -
    passwd
    ```
1. Create user account
    ```
    adduser <user>
    usermod -aG sudo <user>
    ```
1. Setup passwordless SSH for user
    ```
    mkdir .ssh
    chmod 700 .ssh
    touch .ssh/authorized_keys
    chmod 600 .ssh/authorized_keys
    vi .ssh/authorized_keys
    ```
1. Run homelab-setup ansible playbook
   ```
   make octopi
   ```

repository: bharwani/homelab-setup

repo_name: bharwani/homelab-setup


text:
ScalaBuff is a Scala [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) (protobuf) compiler. It takes .proto files and outputs valid Scala classes that can be used by your code to receive or send protobuf messages.

Both the ScalaBuff generator and the generated Scala classes depend on Google's Java runtime for Protocol Buffers, which is provided with ScalaBuff.

If you want to utilize ScalaBuff to generate your Scala classes from .proto sources, you'll need to either [download the source](https://github.com/SandroGrzicic/ScalaBuff/archive/master.zip) or download the packaged JAR for your Scala version from the Sonatype OSS repository. If you download the sources, you can easily run it from SBT or by generating a fat Jar with sbt assembly:

```sh
$ sbt assembly
$ java -jar target/scala-2.11/scalabuff-compiler-assembly-1.4.0.jar --proto_path=INPUT_DIR --scala_out=OUTPUT_DIR
```

If you just want to use ScalaBuff-generated classes in your SBT-managed project, here's the dependency to add (located on the Sonatype OSS repository): `"net.sandrogrzicic" %% "scalabuff-runtime" % "[desired_version]"`
The latest release is **1.4.0** with support for Scala 2.10 and 2.11.

If you'd like to use SBT with ScalaBuff to auto-generate Scala protobuf classes from .proto sources, try the [sbt-scalabuff project](https://github.com/sbt/sbt-scalabuff).

The [ScalaBuff Wiki](https://github.com/SandroGrzicic/ScalaBuff/wiki) contains more information. For API documentation, see the project [Scaladoc](http://sandrogrzicic.github.com/ScalaBuff/doc/).

For any questions or general discussion, you can use the [ScalaBuff Google Group](https://groups.google.com/forum/#!forum/scalabuff) but please feel free to [create new issues](https://github.com/SandroGrzicic/ScalaBuff/issues/new) for bug reports or feature requests. Thanks!

repository: SandroGrzicic/ScalaBuff

gha_language: Scala

gha_license_id: NOASSERTION

repo_name: SandroGrzicic/ScalaBuff


text:
# Access to Banking Services in Washington D.C.
This repository holds all of the files used in my blog post [here](justjensen.co/access-to-banking-services-in-washington-d-c).

## Requirements and Use

I used QGIS and RStudio, although you can use whatever software you want to
visualize the GeoJSON files or analyze the CSV. In QGIS, I used the MMQGIS plugin,
although this is not necessary to open the project.

I also used Adobe's [Source Sans Pro font](https://github.com/adobe-fonts/source-sans-pro).

## License
This project is licensed under the terms of the MIT license.


text:
Annotate with CADD
==================

This documents how to use `vcfanno` to annotate a VCF with CADD scores.

*"CADD is a tool for scoring the deleteriousness of single nucleotide variants as well as insertion/deletions variants in the human genome."*
Users of CADD should refer to the [web page](http://cadd.gs.washington.edu/info) for citation and use requirements.

Config
------

From here, we can specify a conf file:

```
[[annotation]]
file="whole_genome_SNVs.tsv.gz"
names=["cadd_raw", "cadd_phred"]
ops=["mean", "mean"]
columns=[4, 5]
```

Annotation
----------

And we can run `vcfanno` as:

```
vcfanno -p 12 cadd.conf query.vcf > query.anno.vcf
```

As an extreme case, we can run this on the ExAC VCF:

```Shell
vcfanno -p 18 cadd.conf ExAC.r0.3.sites.vep.tidy.vcf.gz | bgzip -c > /tmp/exac-cadd.vcf.gz
```

This takes about 88 minutes on a good server. This time will improve in future versions but it
is due to the large number of lines that must be parsed from the CADD VCF, even with the algorithm
that allows it to avoid parsing annotation intervals that fall in large gaps in the query. By
comparison, `bedtools intersect -sorted` takes 92 minutes for this same overlap.

Note
----

This will only work for single-nucleotide variants since the default for VCF is to match on REF and ALT.

repository: brentp/vcfanno

gha_language: Go

gha_license_id: MIT

repo_name: brentp/vcfanno


text:
[author]: # (Jim Lehmer)
[title]: # (The "jim" stack)
[created]: # (3/25/2015)
[tags]: # (jade iojs markdown)

This site has been built with an eponymous pseudo-platform I call "jim" for fun:

* **Jade** - The [Jade template engine](http://jade-lang.com/) for node.js (and io.js).
* **io.js** - The npm-compatible [fork](https://iojs.org/en/index.html) of node.js.
* **Markdown** - The [lightweight markup language](http://daringfireball.net/projects/markdown/).

It was done as both an exercise in tongue-in-cheekiness and to learn more about
the io.js environment, especially more than just your usual [MEAN](http://mean.io/#!/)
stack web dev.

You can [fork the jim stack from GitHub](https://github.com/dullroar/jim).

repository: dullroar/jim

repo_name: dullroar/jim


text:
---
title: 'Python Geocoder: A Guide to Managing Locations in Your Apps'
date: '2019-07-13T23:46:37.121Z'
layout: post
draft: false
path: '/posts/python-geocoder/'
category: 'Python'
tags:
  - 'Python'
  - 'Geocoding'
  - 'Locations'
  - 'Crosspost'
description: 'A brief exploration of how to use location data in applications.'
---

### The original version of this post appeared at https://stackify.com/python-geocoder-a-guide-to-managing-locations-in-your-apps/

A great thing about building applications for the internet is that people from all around the world can benefit from your effort. You can gather new users from Taiwan to Colorado and meet their needs just as effectively. In this global context, it can be good to provide your users with local flavor to help them feel connected to you and your applications. It can also be useful for you to know where your users are coming from to make sure that your infrastructure is configured in the best way.

In this post, I show you how to get started with Python geocoder using free services and the requests module to gather and leverage data.

## What Is Geolocation?

Geolocation is the process of identifying the geographical location of a person or device by means of digital information. You use some data you have to gather more data for the benefit of your users. This can be important when dealing with information for users from the EU, for example—it can help you comply with laws around data protection. Identifying where your users are can also help to provide a more bespoke and effective service.

A quick note: this is a Python guide, so I'm going to make a few assumptions.  Nothing we'll cover here is very complicated, but hopefully it'll be quite interesting. If you're having trouble getting started, have a look at the Python site.

## Where Are They?

One of the key pieces of information you can use to find out where your users are is their IP address. It's possible for users to use a proxy service to seem to be from somewhere else. Having said that, for most users this is a helpful approach.

I've looked into a number of applications that provide this service and have decided to use ipstack for this tutorial. If you sign up for their free account, you get 10,000 calls per month, which is more than enough to get started.

I think the API for this service is quite straightforward. Once you've signed up, you'll be taken to a dashboard and get an API key. This key is used to identify your application to the service, allowing you to make the calls. Keep this information safe and private, because anyone can use it and pretend to be you. That might not be a huge deal for this free service, but it's a good habit to get into.

Let's see how good the service is at finding you. Get your IP address (get it in plain text by going here), open a new tab in your browser, and paste the link below.  Now you know where you are, although hopefully this wasn't news to you. It isn't going to be practical for you to do this manually in the browser for every user. Given that, we're going to use the Python requests module to make the same call and collect the information for us.

## Using Python to Call APIs

```python
import requests
key = "YOUR-API-KEY"
ip = "YOUR-IP-ADDRESS"
url = "http://api.ipstack.com/" + ip +"?access_key=" + key
response = requests.get(url).json()
print(response)
```

Here, I'm declaring the key and IP address as variables and building up the URL using those components. I then use the requests module to carry out an HTTP request on that URL and convert the response to a JSON array. In Python, this is a dictionary, so you'll be able to access any of the individual pieces of information by adding the key name. For example, response['country_name'] will tell you what country the IP address is based in.

If this was part of a larger application, I'd want to declare the key in a configuration file instead of cluttering up this code. Also, I'd like a function to pass the IP address to and get some information back. You can see from the response all of the information that you could get, but for my purposes, I'm going to get the longitude and latitude of the city closest to the IP address. I'll improve the code above by using a function.

```python
def lng_lat_from_ip(ip):
    url = "http://api.ipstack.com/" + ip + "?access_key=" + key
    response = requests.get(url).json()
    return (response['longitude'], response['latitude'])
longitude, latitude = lng_lat_from_ip(ip)
```

Awesome! Now I have a function that can take the IP address and return the map coordinates. You can alter this function to return any of the keys that you'd prefer to discover or use.

## How Far Is That From You?

Once you have the user's location, you can decide how you might adapt their experience. You may store their user data differently, or you may want to do something more fun.
I'm going to work out how far my users are from me. To do that, I'm going to use a module called geopy. Let's install it!

`pip install geopy --user`

Once you've installed the module, you can use it straight away. You don't need to sign up for a service to access this functionality. I'm based in Brighton, England. I'm going to use my details to find out how far my users are from here.

```python
from geopy.distance import geodesic
Brighton = (longitude, latitude) # I used our function above to get this.
cleveland_oh = (41.499498, -81.695391) # I looked this one up.
print(geodesic(Brighton, cleveland_oh).miles)
```

This will print the distance in miles from Brighton to Cleveland. You can change the units to meters or feet if that's more relevant. I can now let a user from Cleveland know that I am 8,336 miles away from them. You can read more about the other possibilities in the documentation. There are two ways to measure distance implemented—geodesic and great-circle—and the documentation discusses them both. In my use case, there was no difference, but you may find that one is better than the other and you need the increased accuracy.

## What's Going on There?

Another free and useful service that you can sign up for, GeoNames, allows you to access a wide variety of location-based data. The daily call limit to this service is 20,000, so this should be more than enough for any use case. One thing to look out for is that once you've registered, you need to enable "Free Web Services." This is a link at the bottom of the login page.

I find this to be a really useful service and have used it to tell the weather where my users are and even find some interesting local Wikipedia articles.

Let's find out what the weather is like. We'll start, as before, with testing in our browser, and then we can write the Python function to do the heavy lifting for us.

`http://api.geonames.org/findNearByWeatherJSON?lat=<YOUR-LAT>&lng=<YOUR-LNG>&username=<YOURUSERNAME>`
The good thing is, you have a function to find your latitude and longitude from your IP address, so you can use that to gather the information. According to the weather information, there are few clouds where I am.
By now, you can probably write the function yourself to carry this out for you. I'm going to construct the URL, use the requests module to make the call, and then return the output.

```python
import requests
username = "YOUR USERNAME"

def weather_from_lat_lng(lat, lng):
    url="http://api.geonames.org/findNearByWeatherJSON?lat=" + lat + "&lng=" + lng + "&username=" + username
    response = requests.get(url).json()
    return response

print(weather_from_lat_lng("41.499498", "-81.695391"))
```

As before, I'm declaring my username in code here, which isn't a best practice. You could use separate configuration files or even environment variables to keep your keys safe. You can call this function and give a visual indication of cloud cover on your site. Or, less frivolously, you could track if there's any correlation between the weather and use of your application.

## Where Next?

I've just scratched the surface of the things you can do with geolocation in this guide. The GeoNames library has a lot of free services I haven't mentioned here, but the documentation is good and you've got everything you need in this guide to be able to leverage them in your applications.

If you're collecting logs and metrics with a service such as Retrace, this location data would be useful to gather. You can see if there's a spike in location-specific traffic at unusual times. This can allow you to track down problems or security issues more quickly.

repository: doingandlearning/gatsby-blog

branch_name: refs/heads/main

repo_name: doingandlearning/gatsby-blog


text:
# Move to https://github.com/osmlab/josm-tofix-plugin

Make [To-Fix](http://osmlab.github.io/to-fix) OpenStreetMap microtasking challenges available in [JOSM](http://josm.openstreetmap.de/) editor.

![josm](https://cloud.githubusercontent.com/assets/1152236/7286852/ddfc4114-e914-11e4-93c7-b9cf72a30fcc.gif)

## Installation

*Download*

- Download: https://github.com/osmlab/josm-tofix-plugin/blob/master/dist/tofix.jar?raw=true
- or clone from GitHub: `git clone https://github.com/Rub21/josm-tofix-plugin.git`

*Copy to plugins directory*

- Ubuntu: `cp tofix.jar ~/.josm/plugins/`
- Mac OSX: `cp tofix.jar ~/Library/JOSM/plugins`

*Activate plugin*

![image](https://cloud.githubusercontent.com/assets/1152236/7150157/803d6e24-e2dc-11e4-9245-93e0d7ccaada.png)

gha_language: Java


text:
{
   "aliases": [],
   "categories": [
      "User Experience"
   ],
   "date": "2016-05-20T19:31:28-05:00",
   "description": "Why discovery and product development are important, and how relying on a tight feedback loop can be detrimental to your product.",
   "draft": false,
   "image": "/img/posts/dangers-of-tight-iteration/header.png",
   "photoCredit": "https://leantesting-wp.s3.amazonaws.com/resources/wp-content/uploads/2015/05/iterative-3.png",
   "publishdate": "2016-05-20T14:47:36-05:00",
   "tags": [
      "prototype",
      "user-centered design",
      "fidelity",
      "rapid iteration",
      "product management"
   ],
   "title": "The Dangers of Tight Iteration"
}

TL;DNR

Getting a lot of feedback quickly isn't necessarily always the best strategy - having a guiding light is helpful as well.

Users react to the level of fidelity of what you show them. You might be missing something if your fidelity doesn't match the issue in the design.

Good Product Design (or at least, a good discovery phase/project plan) can alleviate these issues.

---

Before starting a new engagement with a client, I always ask a series of questions about their company, their processes, and the project I'll be working on. One of those questions asks how they're currently handling user research and product design and I'm often told they "have a tight feedback loop" and that's all they have to say.

There's a lot wrong with this answer, but let's unpack it a little.

# Rapid Prototyping

First and foremost, effective use of Rapid Prototyping can be immensely beneficial to a product. If there's one thing I could convince every company in the world to do, it would be to use some type of rapid prototyping in their product design. If I got a fraction of all of the money spent building products that ultimately failed, I'd never have to work again.

Ultimately, Rapid Prototyping is more a process or practice than a technique or specific tools. Rapid Prototyping involves getting as much feedback as often as possible throughout the design process, and this is accomplished by varying the level of fidelity of what you're testing (more on this later). By exposing the current version of your product in all of its incomplete glory, you save sinking time into things that don't work, and ultimately build a better product for your target user.

You can read more about the variety of options when it comes to Rapid Prototyping elsewhere, but here's a brief overview of some of the options:

* Paper Prototypes - hand-drawn sketches of what an interface might look like
* Wizard of Oz - the practice of playing the role of the computer by abstracting future functionality away
* Testing Your Competitor - before building your solution, see what problems users have with existing solutions
* Interactive Prototypes - semi-functional software systems users can interact with

# Let's Talk About Fidelity

The exact definition of fidelity isn't exactly clear, but it roughly refers to the level of detail your current iteration includes. It's often used in the context of prototyping, but it can refer to existing products as well.  Fidelity exists on a continuum, with the lower end including concepts, sketches, and rough wireframes, and the higher end being branded/visually design and interactive prototypes. I've seen far too many products that jump right into the deep end of fidelity, missing out on all of the potential learning from testing lower fidelity prototypes.

Credit

It might be somewhat contradictory to recommend using a lower level of detail, but you have to match your level of fidelity to the type of feedback you're looking for. Your users will respond to the fidelity they're given, and their feedback will be colored by this. If you give them paper, they'll talk about things like workflow, high-level design, and desired features. If you give them highly designed (read: Sketch/Photoshop) images, they'll talk about things like color scheme, fonts, and whitespace. If you give them an interactive prototype, they'll talk about things like transitions, interactivity, and performance.

This graph (and more great coverage of the pluses and minuses of different levels of fidelity) from UX Matters.

# Why It Matters

It can be intoxicating to set a baseline and watch your numbers improve on whatever metrics you've set, as you iterate. Arguably, data-informed design is a good thing, especially compared to the alternative. The problem is when data starts driving your decisions, and you lose sight of the big picture - improving the experience for the end user. Increased conversions, decreased errors, or more efficient interactions may not necessarily be the most enjoyable experience (e.g. a wait time might actually be a _good_ thing).

The problem with this approach is it might be honing in on what's known as a local maxima. Naive hill-climbing algorithms can fall victim to this problem as well. Essentially, you continue to see improvements and make changes until you reach a point where those improvements either diminish entirely or degrade. At this point, traditional wisdom would be to stop working and either a) work on something else, or b) declare yourself victorious and toast your achievement, all the while missing what could be a better solution.

Credit

On a philosophical note, I like to think of every design problem (if not every problem in life) as something like the above graphic, except the plane is infinite -- there're always other options, some of which might be better than our current situation if we're just willing to take the leap of faith and try a new approach.

# Fighting the Local Maxima

So now we're aware of the problem and what causes it. That doesn't necessarily tell us what to do about it, though. Here's a great strategy outlined in an article from 2010:

  One strategy we might employ is to optimize until we reach a point of diminishing returns: design until changes just aren’t having a big effect. Then, stop optimizing and return to other kinds of analysis to figure out the next steps. Conduct interviews. Do user testing. Give surveys, ask questions. Find out the biggest existing pain points instead of focusing on tiny design elements at this stage. Focus at the activity-level. What are people trying to accomplish? What are their higher-level goals? What aren’t people doing that we want them to? What big hurdles keep them from taking the next action? This level of insight will allow you to make those bigger changes.
  Joshua Porter, 52 Weeks of UX

I couldn't've said it better myself.

---

### A brief plug

Did you find yourself reading this post and thinking "our products have definitely suffered from the wrong type of feedback"? Part of the reason this has come up a lot for me is I'm looking into a product-manager-as-a-service model. You should <a<EMAIL_ADDRESS>me if you'd like to hear more.


text:
---
title: Creating a Program - Cloud Services
seo-title: Creating a Program - Cloud Services
description: Creating a Program - Cloud Services
seo-description: Creating a Program - Cloud Services
---

# Create a Program {#create-a-program}

The cloud-native solution provides the user with requisite permissions and the ability to create a program on a self-service model.

A program creation wizard will ask the user to submit details, depending on the user’s objective in creating the program within the bounds of what is available to the specific customer or organization.

In the event of first-time access to Cloud Manager or if no programs exist in the tenant, the user will see **Create your first Program** screen. If user select *Esc* or clicks out of the dialog box, the following screen displays:

 ![](assets/create-program1.png)

## Using Create Program Wizard {#using-create-program-wizard}

>[!NOTE]
   >
   >The User is displayed with one or either program types depending on whether or not the corresponding credits are available in the tenant. The cloud-native solution gives the user with requisite permissions the ability to create a program on a self-service model.

Depending upon the user’s objective in creating the program within the bounds of what is available to the specific customer/organization, a program creation wizard will ask the user to submit one or more details.

  ![](assets/create-program2.png)

If a program already exists, then the **Add Program** button will be seen on the top right of the landing page.

## Creating a Sandbox Program {#create-sandbox-program}

Follow the steps below describe how to create a Sandbox program:

1. Select **Setup for Demo** in the Create Program wizard. User submits program name before selecting **Create**.
1. User will see the new sandbox program card on the landing page, and can hover over it to select the Cloud Manager icon to navigate to the Cloud Manager overview page. The card will inform the user on the status of auto-setup of the newly created sandbox program. User will see progression.

   ![](assets/create-program3.png)

1. After the project with sample code and content completes, the user can access **Manage Git** link, as shown in the figure below:

   ![](assets/create-program4.png)

1. Once the development environment is created, the user can **Access AEM** link, as shown in the figure below:

   ![](assets/create-program5.png)

1. Once the Non-production pipeline deploying to development is complete, the wizard guides the user to either access AEM (on development) or deploy code to development environment:

   ![](assets/create-program6.png)

## Creating a Regular Program {#create-regular-program}

A *Regular* program is intended for a user who is familiar with AEM and Cloud Manager and is ready to start writing, building and testing code with the objective of deploying it to Production.

The steps below describe how to create a program intended for production:

1. Select **Setup for Production** in the Create Program wizard to create a regular program. User can accept the default program name or edit it before selecting **Create**.

1. User will select solutions that are to be included in the Program in the screen that will be presented following the screen above.

   >[!NOTE]
   >
   >The screen below is only displayed for the segment of customers who have purchased more than one solution. For customers who have purchased just one solution, the solution selection screen below will not be displayed.

   ![](assets/create-program7.png)

1.  Once you see your program card on the landing page, hover over it to select the Cloud Manager icon to navigate to the Cloud Manager **Overview** page. The main CTA card will guide the user to create an environment, create a non-production pipeline, and finally a production pipeline.

    >[!NOTE]
    >
    >A regular program does not have **Auto-setup** feature.


text:
Take the content in pages, and abstract it to templates. Which are long form with sections, and which are simple blocks? Are there any custom templates or fields you need?

### Service Template

Section

- List block: "Formats/You give us"
- Text block (enhanced): "Results/We give you"
- CTA (small)
- Testimonial block

Section

- Text block: "Customization/Service Options"
- Custom block: "Quick Quote"

Section

- CTA (prominent, enhanced)
- Image/text block (enhanced): "Process"

### About

- Text
- Text/Image (paragraph)
- CTA
- Text/Image (caption)
- Testimonial
- CTA

gha_language: PHP


text:
**This repository is deprecated! Please use the official [oas-raml-converter](https://github.com/mulesoft/oas-raml-converter) instead.**

# Swagger To RAML Object

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

Takes a swagger spec and converts it into a RAML JavaScript object, usually for conversion to RAML with the [raml-object-to-raml](https://github.com/mulesoft/raml-object-to-raml) module.

## Installation

```bash
npm install swagger-to-raml-object --save
```

## Usage

Quickly get started converting swagger to RAML in your command line:

```bash
# Make sure node and npm are installed before continuing.

npm install swagger-to-raml-object -g
npm install raml-object-to-raml -g

# Convert a swagger spec into a raml object.
swagger-to-raml-object http://petstore.swagger.wordnik.com/api/api-docs

# Pipe the result of that into the raml object to raml converter.
swagger-to-raml-object http://petstore.swagger.wordnik.com/api/api-docs | raml-object-to-raml

# You can then output the result of that to a file.
swagger-to-raml-object http://petstore.swagger.wordnik.com/api/api-docs | raml-object-to-raml > output.raml
```

### CLI

The CLI accepts a single swagger file to load and will recursively compile the spec into a single RAML object representation before printing the JSON to stdout.

```bash
swagger-to-raml-object resources.json > raml.json
```

### JavaScript

The module exports a single function for converting Swagger specifications. It accepts three arguments, the root resource listing, a file reader function and a callback for when parsing is complete. The callback is called with an error (if something occured) and the resulting RAML object.

```javascript
var converter = require('swagger-to-raml-object');

converter(rootFile, function (filename, done) {
  return fs.readFile(filename, 'utf8', done);
}, function (err, ramlObject) {
  if (err) {
    console.error(err);
  }

  console.log(ramlObject);
  // {
  //   "title": "Example API",
  //   "resources": [{ ... }],
  //   ...
  // }
});

```

## Features and Limitations

* Works with Swagger 1.2 (not 2.0 yet)
* Loads from any resource structure given a file reader function
* Does not parse XML bodies into schemas yet (only JSON and form)
* Does not do any RAML documentation optimisations such as `resourceTypes`, `traits` or global `schemas`
* Currently only does single file output

## License

Apache 2.0

[npm-image]: https://img.shields.io/npm/v/swagger-to-raml-object.svg?style=flat
[npm-url]: https://npmjs.org/package/swagger-to-raml-object
[travis-image]: https://img.shields.io/travis/mulesoft/swagger-to-raml-object.svg?style=flat
[travis-url]: https://travis-ci.org/mulesoft/swagger-to-raml-object
[coveralls-image]: https://img.shields.io/coveralls/mulesoft/swagger-to-raml-object.svg?style=flat
[coveralls-url]: https://coveralls.io/r/mulesoft/swagger-to-raml-object?branch=master

repository: aiskov/swagger-to-raml-object

repo_name: aiskov/swagger-to-raml-object


text:
# CsvSerializer<TTargetType>.Delimiter property

Character which is used to delimit fields in the record.

```csharp
public char Delimiter { get; set; }
```

## See Also

* class [CsvSerializer<TTargetType>](../CsvSerializer-1.md)
* namespace [TheCodingMonkey.Serialization](../../TextSerializer.md)

<!-- DO NOT EDIT: generated by xmldocmd for TextSerializer.dll -->

repository: NickSchweitzer/TextSerializer

gha_language: C#

repo_name: NickSchweitzer/TextSerializer


text:
# Project 0: RESTful API

Due Date: November 17th

## Description
You are developing a simple API for a bank.

Leveraging Java 8, create a RESTful API application that supports two main resources: clients and accounts.

* Client: a particular customer of the bank
* Account: a client can have multiple bank accounts (ex. 2 checking accounts, 3 savings accounts)

### Technologies
1. Java
2. Javalin
3. JDBC
4. Logback / SLF4J
5. JUnit
6. Mockito
7. PostgreSQL

## Requirements

### Endpoint Requirements
The following endpoints and their respective verbs should support the operations as described. In the HTTP response, use appropriate status codes (as specific as possible) and response bodies where applicable.

- `POST /clients`: Creates a new client
- `GET /clients`: Gets all clients
- `GET /clients/{client_id}`: Get client with an id of X (if the client exists)
- `PUT /clients/{client_id}`: Update client with an id of X (if the client exists)
- `DELETE /clients/{client_id}`: Delete client with an id of X (if the client exists)
- `POST /clients/{client_id}/accounts`: Create a new account for a client with id of X (if client exists)
- These two should be the same endpoint (check for query parameters using ctx.queryParam("amountLessThan") / ctx.queryParam("amountGreaterThan)):
    - `GET /clients/{client_id}/accounts`: Get all accounts for client with id of X (if client exists)
    - `GET /clients/{client_id}/accounts?amountLessThan=2000&amountGreaterThan=400`: Get all accounts for client id of X with balances between 400 and 2000 (if client exists)
- `GET /clients/{client_id}/accounts/{account_id}`: Get account with id of Y belonging to client with id of X (if client and account exist AND if account belongs to client)
- `PUT /clients/{client_id}/accounts/{account_id}`: Update account with id of Y belonging to client with id of X (if client and account exist AND if account belongs to client)
- `DELETE /clients/{client_id}/accounts/{account_id}`: Delete account with id of Y belonging to client with id of X (if client and account exist AND if account belongs to client)

### General Requirements
- Java 8
- Users of the application should be able to interact with it through a RESTful API utilizing HTTP
- 3 layered architecture
    - Controller (presentation) layer
    - Service (business logic) layer
    - Data Access layer (DAO aka Data Access Object layer)
- 80-90% test coverage for the **service layer** using JUnit is required
    - Utilize Mockito in order to mock DAO dependencies
- Logging should be accomplished using Logback
    - Have a mental model of what should ideally be logged in an application
        - Http Requests
        - Methods being executed
        - Exceptions
        - etc.
- Create a SQL script that will create a table schema and populate some data for your application
- Utilize JDBC in the application for data persistence
    - Must utilize the DAO design pattern
    - PostgreSQL

### Stretch Goals
Remember that the above requirements are the minimum viable product (MVP). You can always look into adding more

Here are some ideas:
- Postman tests to verify API functionality
- Run the application as a standalone JAR
- Run the application on a docker image
- Deploy the application to an EC2 instance on AWS
- Use at least 1 stored procedure w/ MariaDB
- Login Functionality and Roles?
    - Research about Session management (HttpSession, Javalin's Access Manager, etc)
- Additional resources and RESTful endpoints (in addition to the clients and accounts resources in the main requirements)

repository: isdidum/didum-gitbin

repo_name: isdidum/didum-gitbin


text:
Snake Rust
========

A simple game to test some graphics stuff with Rust.

![Screenshot](preview/preview.png)

## Compiling
### Simple
1. Install [SDL 2.0.1 dev](http://libsdl.org/download-2.0.php)
2. Compile and install [rust-sdl2](https://github.com/AngryLawyer/rust-sdl2)
3. In /src/ run `rustc -O main.rs`

### Windows
The easiest way to compile on windows is to do the following:

1. Install [SDL2-devel-2.0.1-mingw](http://libsdl.org/download-2.0.php)
2. Download [rust-sdl2](https://github.com/AngryLawyer/rust-sdl2)
3. Navigate to /rust-sdl2-master/src/sdl2/
4. Then run `rustc -O --rlib lib.rs`
5. Copy `libsdl-*.rlib` to /snake-game/src
6. Compile using `rustc -O -L . main.rs`

## Plans
* Basic network multiplayer (waiting on [#11165](https://github.com/mozilla/rust/issues/11165) )
* <del>Swap from SFML to SDL2</del>
* Basic Menu

repository: mchesser/snake-rs

gha_language: Rust

repo_name: mchesser/snake-rs


text:
---
title: 'MIDI.jl: Simple and intuitive handling of MIDI data.'
tags:
  - music
  - MIDI
  - midi
  - note
  - notes
authors:
 - name: George Datseris
   orcid: 0000-0002-6427-2385
   affiliation: "1, 2"
 - name: Joel Hobson
   affiliation: 3
affiliations:
 - name: Max Planck Institute for Dynamics and Self-Organization
   index: 1
 - name: Department of Physics, Georg-August-Universität Göttingen
   index: 2
 - name: Roadmunk Inc.
   index: 3
date: 21 December 2018
bibliography: paper.bib
---

# Introduction
**MIDI.jl** is a Julia @Julia package for reading, writing and analyzing [MIDI](https://www.midi.org/specifications) data. In this paper, we are briefly overviewing versions `1.1.0` or later for **MIDI.jl**.

MIDI (Music Instrument Digital Interface) is a data format created to transmit music data across devices and computers. The [actual MIDI interface](https://www.midi.org/specifications) is low-level, directly translating all music information to and from byte chunks.
**MIDI.jl** exposes all this low-level interface, but it also builds a useable high-level interface on top of that. This makes reading MIDI data intuitive and convenient, as we demonstrate in the following examples.

All functionality of **MIDI.jl** is well documented and hosted online: https://juliamusic.github.io/JuliaMusic_documentation.jl/latest/.
Besides documentation of functions there are plenty of useful real world examples.

# Intuitive and Simple Interface
The biggest strength of **MIDI.jl** is the ability to transform the raw MIDI data in a format that is human-readable, intuitive and simple to use and manipulate. In addition, the high-level interface does not require knowledge of which exact MIDI code corresponds to which exact MIDI command.

What makes this possible is the data structures we have designed in order to provide easier handling of MIDI files. The most important data structure is the `Note`/`Notes`. A music note can be (in its most basic level) deconstructed into just four numbers: the temporal position the note is played in, the duration, the pitch, and the intensity (strength with which the note is played, also called velocity). A `Note` is a data structure that has these four "quantities" as its "fields". All of these are accessible immediately with e.g., `Note.position` and their values can be mutated in place.

These aspects can be deduced from the raw MIDI format with a lot of analyzing of bytes. However, in **MIDI.jl** we provide a simple function:
```julia
getnotes(midi, args...)
```
which obtains all note-specific information and stores it as a vector of notes, which we call `Notes`. This is very convenient, as to "identify" a note in the MIDI format, one needs to first identify two different streams of bytes; one denotes the start and the other the end of the note. This quickly becomes tedious, but `getnotes` does not expose all these details to the user.

# Extensions
The easy-to-use high-level interface allows **MIDI.jl** to be extendable.  For instance, in another software package **MusicManipulations.jl** we provide general functions for manipulating (and further analyzing) music data.
For example, the function `quantize` from the package **MusicManipulations.jl** allows the user to quantize any `Notes` instance to any grid.

This functionality is offered by Digital Audio Workstations, like the software Cubase, but we offer ways to do it programmatically instead. Many other helpful functions are contained in **MusicManipulations.jl**, and for further reading we point to the official documentation of the [JuliaMusic](https://juliamusic.github.io/JuliaMusic_documentation.jl/latest/) GitHub organization, which hosts both **MIDI.jl** and **MusicManipulations.jl**, as well as other useful packages.

# Scientific Application
Microtiming deviations are defined as temporal deviations below the phrase level, typically in the millisecond range. These have been studied extensively in the literature and their importance and influence are debated strongly, see  @Madison2011, @Butterfield2010, @Fruehauf2013, @Davies2013, @Senn2016, @Hofmann2017 and references therein.

Qualitative studies of these microtiming deviations have been done extensively by Geisel and coworkers @Hennig2011, @Hennig2014, @Raesaenen2015, @Sogorski2018. A crucial finding is that the sequence of such deviations is not random but power-law correlated. In addition, there is strong evidence that their distribution is normal (Gaussian).

In the following, we will compute the distribution of the microtiming deviations of a piano track (played by a professional pianist) and show that indeed it approximates a normal distribution.

We first load the notes of the piano track:
```julia
using MusicManipulations # Re-exports MIDI
midi = readMIDIFile(testmidi()) # test midi file

# Track number 4 is the piano track
piano = midi.tracks[4]
notes = getnotes(piano, midi.tpq)
```
```
533 Notes with tpq=960
 Note F4  | vel = 69  | pos = 7427, dur = 181
 Note A♯4 | vel = 85  | pos = 7760, dur = 450
 Note D5  | vel = 91  | pos = 8319, dur = 356
 Note D4  | vel = 88  | pos = 8323, dur = 314
 Note G♯3 | vel = 88  | pos = 8327, dur = 358
 Note A♯4 | vel = 76  | pos = 8694, dur = 575
 Note G4  | vel = 66  | pos = 9281, dur = 273
 Note A♯4 | vel = 94  | pos = 9594, dur = 666
 Note F♯3 | vel = 98  | pos = 10189, dur = 307
 Note C4  | vel = 87  | pos = 10206, dur = 285
  ⋮
```
We then compute their microtiming deviations. For the purpose of this article, we define the microtiming deviations of a note as the distance of the position of a note from its position when quantized on a 8th-note triplet grid (the pianist was playing triplets in the above midi file).

We now compute those microtiming deviations, using the function `quantize` from **MusicManipulations.jl**
```julia
grid = 0:(1//3):1 # grid to quantize on, see documentation
qnotes = quantize(notes, grid)
mtds = positions(notes) .- positions(qnotes)
mtds_ms = mtds .* ms_per_tick(midi)
```
```
533-element Array{Float64,1}:
  32.21150624999999
  38.461499999999994
   ⋮
  12.499987499999998
  13.461524999999998
```
A plot of the histogram of these is presented in Figure 1. Even if produced with an extremely small pool of data, the plot follows the existing evidence that the distribution of the microtiming deviations follows a normal distribution.

![Histogram of the microtiming deviations of a simple piano recording.](mtd_hist.png)

# Conclusions
In conclusion, **MIDI.jl** is a useful package with intuitive usage, as we have demonstrated by our simple application. In addition, it has plenty more use for scientific applications. We currently have a manuscript titled *Does it Swing? Microtiming Deviations and Swing Feeling in Jazz* under review, where we have used **MIDI.jl** and its extensions to not only read but also manipulate microtiming deviations of human recordings in order to inquire about the impact of microtiming deviations in the listening experience.

# Related Software
There is existing software that offers functionality similar, but not identical, to **MIDI.jl**. Some of these software are:

* [mido](https://github.com/mido/mido)
* [python-midi](https://github.com/vishnubob/python-midi)
* [pretty-midi](https://github.com/craffel/pretty-midi) [@Raffel].

Notable differences between **MIDI.jl** and these libraries include (but are not limited to):

1. The `Notes` data structure and `getnotes` functionality that exists in **MIDI.jl**. Although the package `pretty-midi` contains similar functionality, it lacks the channel property.
2. **MIDI.jl** is extended further into higher level applications like the ones offered by **MusicManipulations.jl** or the module `MotifSequenceGenerator` that can create specially random sequences of notes.
3. The fact that **MIDI.jl** is written for the Julia programming language.
4. The fact that **MIDI.jl** is the only package for handling MIDI data for the Julia programming language.
4. **MIDI.jl** has proper, multi-page and multi-example documentation that is hosted online and is automatically updated with every commit to the repository.
4. **MIDI.jl** does not currently have the so-called "piano roll" functionality, which plots notes as in a Digital Audio Workstation.
5. Sequencer functionality, which has been implemented in the `python-midi` package, is currently lacking in **MIDI.jl**.
6. Basic tempo estimation, which has been implemented in `pretty-midi`, is also absent in **MIDI.jl**.

# References

gha_language: Julia


text:
# A-Fast-implemetation-of-Confluence

Non-official implement of Paper: "Confluence: A Robust Non-IoU Alternative to Non-Maxima Suppression in Object Detection "
Link of the paper: https://ui.adsabs.harvard.edu/abs/2020arXiv201200257S/abstract

Result:
![image](https://github.com/yibiaojason/A-Fast-implemetation-of-Confluence/blob/main/crowd.jpeg)


text:
# RestoreDatabasePS

Restore MSSQL Databases from PowerShell commandline

# Installation instructions
To use **Restore-DatabaseFromDisk.ps1** perform the following steps

* Run `setup_Restore-DatabaseFromDisk_tsql_code.sql` first, on your favourite database
**will setup all necessary functions and procedures in your sql server.

After this step, you are ready to use the PowerShell script.


text:
---
layout: default
---

# 1994-04-21 - Re: Intolerance on the list

## Header Data

From<EMAIL_ADDRESS>(Stephen Williams)

To<EMAIL_ADDRESS>(Jim Sewell - KD4CKQ)

Message Hash: b297e8d56b80ee8ff1795155d7d9a74dd13f5525ce24fb409dab5973e75f1b01

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-04-21 22:19:17 UTC

Raw Date: Thu, 21 Apr 94 15:19:17 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Stephen Williams)
Date: Thu, 21 Apr 94 15:19:17 PDT
To<EMAIL_ADDRESS>(Jim Sewell - KD4CKQ)
Subject: Re: Intolerance on the list
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>
> <My computer told me that Ken B Kirksey said:>
>
> > >  being an ok kinda guy as a freethinking individual.
> >                               ^^^^^^^^^^^^
> > I fully encourage people to think freely, but I absolutely refuse to
> > encourage people to become "Free Thinkers".  I've found that so-called
> > "Free Thinkers" reveal themselves to be, through their ideas and literature,
> > to be nothing more than narrow-minded empiricist zealots, hostile beyond
> > reason to religion and anything that cannot be apprehended directly
> > by the human senses in general.  IMHO, of course.
>
>   If there is a group calling itself "Free Thinkers" then I'll revise my
>   comments.  I was unaware of any such group and meant only that folks
>   should think for themselves and not just blindly follow their "herd
>   instincts" (Had to work that side thread in here :).  Sorry if I made
>   an unwitting reference to any group.
>
> 	 Jim

To clarify who uses this label:  (Sorry to reply again in this venue.)
(In the two years on/off this list, this is the first offsubject...)

The members of the FFRF (Freedom From Religion Foundation), which
exists mainly, IMHO, as a support group for those who feel oppressed
in some way or who want to counteract the spreading tendancies of
religion.  The members tend to like the label 'Freethinker' for
themselves and have pins as such.  The group is made up of atheists
(strong & weak), agnostics, 'non-practicing Jews', PFLAG members (a
group that falls under the religiously persecuited label), and
church/state separatists (many of which may be somewhat religious).

If you want to find a comprehensive news reporting of priest
transgressions, for instance, their newsletter gathers info from all
over the US.

>    Tantalus Inc.        Bringing people together     Jim Sewell-KD4CKQ
> 2407 N. Roosevelt Blvd.   to have a little fun.  Internet<EMAIL_ADDRESS>> Key West, FL  33041                               	  CIS: 71061,1027
><PHONE_NUMBER>    "We keep coding and coding and coding..."

Yea, I'm a FreeThinker.  I find it impossible to believe in religion.
Even when I wanted to, I just couldn't.

I have a sound, rational view of life, morals, and goals.  I'm happy.

sdw
--
Stephen D. Williams  Local Internet Gateway Co.; SDW Systems<PHONE_NUMBER>APager
LIG dev./sales       Internet<EMAIL_ADDRESS>OO R&D Source Dist.  By Horse: 2464 Rosina Dr., Miamisburg, OH 45342-6430
Comm. Consulting     ICBM: 39 34N 85 15W I love it when a plan comes together
Newbie Notice:				(Surfer's know the score...)
     I speak for LIGCo., CCI, myself, and no one else, regardless of
     where it is convenient to post from or thru.

{% endraw %}
```

## Thread

+ Return to [April 1994](/archive/1994/04)

+ Return to "["Jim Sewell - KD4CKQ" <jims@Central.KeyWest.MPGN.COM>](/authors/jim_sewell__kd4ckq_jims_at_central_keywest_mpgn_com_)"
+ Return to<EMAIL_ADDRESS>(Ken B Kirksey)](/authors/kkirksey_at_world_std_com_ken_b_kirksey_)"
+ Return to<EMAIL_ADDRESS>(Stephen Williams)](/authors/sdw_at_meaddata_com_stephen_williams_)"

+ 1994-04-21 (Thu, 21 Apr 94 10:40:48 PDT) - [Re: Intolerance on the list](/archive/1994/04/48f9031a9bc0b2b7afda339d0183f07fa0f175c6653d678f27cc792ab3d50616) -<EMAIL_ADDRESS>(Ken B Kirksey)_
  + 1994-04-21 (Thu, 21 Apr 94 11:36:50 PDT) - [Re: Intolerance on the list](/archive/1994/04/b8e4623b46a9c5c599995f7af7f5cb030f59ee352e8999d9f978fc1836de66b8) -<EMAIL_ADDRESS>(Stephen Williams)_
  + 1994-04-21 (Thu, 21 Apr 94 11:58:36 PDT) - [Re: Intolerance on the list](/archive/1994/04/9ed260d15550e2e8f1e46e7b13f9c32bc5de2b1f643bcafc5c20733452b864f5) - _"Jim Sewell - KD4CKQ"<EMAIL_ADDRESS>    + 1994-04-21 (Thu, 21 Apr 94 15:19:17 PDT) - Re: Intolerance on the list -<EMAIL_ADDRESS>(Stephen Williams)_


text:
# eq-deploy-author-runner

A repository used to deploy an instance of `eq-questionnaire-runner` to GCP

## Deploying to Staging

Currently, deployments to the staging environment must be triggered manually through the Google Cloud Platform via the Triggers feature.

repository: ONSdigital/eq-deploy-author-runner

repo_name: ONSdigital/eq-deploy-author-runner


text:
# README

This project implements a technique for Face Recognition in Keras based on [VGGFace2](http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/). It recognizes the people that are referenced in the dataset (see the list [here](http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/meta/identity_meta.csv)).

This [paper](https://arxiv.org/pdf/1710.08092.pdf) explains what is the dataset named `VGGFace2`.

## Quick Startup

### Download the network weights

You need to download the network `weights` [here](https://drive.google.com/file/d/1niCSaaqbXs6YP1B-DddRFQ7RAWsU8OW_/view?usp=sharing) and copy them in the `weights` folder.

### Download datasets

You can download a small dataset of images [here](https://drive.google.com/file/d/1m71-uiPA67NPPXqAfQwHVpdk79Ppj9vE/view?usp=sharing). Once, downloaded unzip the file in the `datasets` folder.

You also need to download the label file [here](https://drive.google.com/file/d/14-omxZDlz16zr1Xb15QkRfaPlu3NxSHA/view?usp=sharing). This file is used to convert the predictions of the `VGGFace` neural network to human readable information. Once, downloaded unzip the file in the `datasets` folder.

### Create a Virtual Environment

If you are on MacOS or Linux, type the following command to create a python virtual environment and install the required packages:

```bash
./configure.sh
```

Then, activate the virtual environment:

```bash
source .venv/bin/activate
```

***Nota***:
<br>This project requires `python 3`. You must install it first.

## Run

Execute the command:

```bash
python src/main.py -d 'dlib' -s './datasets/people/tim_cook.jpg'
```

You must get:

```bash
decoding ./datasets/people/tim_cook.jpg using ResNet50 and dlib face detector ...
Tim_Cook: 96.630%
Laurent_Ruquier: 0.258%
Mads_Gilbert: 0.069%
Rupert_Stadler: 0.061%
Jack_Layton: 0.048%
Done!
```

## How it works

The code is pretty easy to understand. The file `src/main.py` contains the class that performs the operations: decode face, predict and decode predictions.

```python
class Finder:
    def __init__(self):
        """Creates the VGGFace2 neural network, MTCNN and dlib face detectors."""
        self.vggface = ResNet50(n_classes=8631)
        self.vggface.load_weights(WEIGHTS)
        self.mtcnn = MTCNN()
        self.dlib = Dlib()

    def whois(self, image, detector, top=3):
      # First, extract the face from the passed-in image with 'mtcnn'
      # or 'dlib' face detector.
      if detector == 'mtcnn':
          face = _mtcnn_extract_face(self.mtcnn, image)
      elif detector == 'dlib':
          face = _dlib_extract_face(self.dlib, image)
      else:
          raise Exception('Sorry, only mtcnn and dlib decoders are allowed!')

      # Then, convert the face image from (224, 224, 3) to four dimensions,
      # and the amplitude from 0 - 255 to -127.5 - +127.5. Finally, perform
      # the predictions and convert these predictions to an human readable
      # information.
      x = face - 127.5
      image = np.expand_dims(x, axis=0)
      preds = self.vggface.predict(image)
      results = decode_predictions(preds, top)
      return results
```

The face is extracted from an image with `dlib` implemented in the file `src/decoders/dlib.py` or [MTCNN](https://github.com/ipazc/mtcnn).

The prediction is done through the `VGGFace` neural network implemented in the file `src/models/resnet50.py`.

Then, the predictions are decoded by the function `decode_predictions` implemented in the file `src/util/util.py`.

## License

MIT.


text:
# Tutorial on Camera-IMU and Motion Capture Calibration with Realsense T265

![Realsense](/doc/img/realsense_setup.jpg)

In this tutorial we explain how to perform photometric and geometric calibration of the multi-camera setup and then calibrate the transformations between cameras, IMU and the motion capture marker setup. To make sure the calibration is successful we recommend to rigidly attach markers to the camera as shown on the figure above.

## Dataset
We provide a set of example datasets for the calibration. Even if you plan to record your own datasets (covered in the next section), we recommend to download and try the provided examples:
```
mkdir ~/t265_calib_data
cd ~/t265_calib_data
wget http://vision.in.tum.de/tumvi/t265/response_calib.zip
wget http://vision.in.tum.de/tumvi/t265/cam_calib.zip
wget http://vision.in.tum.de/tumvi/t265/imu_calib.zip
wget http://vision.in.tum.de/tumvi/t265/sequence0.zip
unzip response_calib
unzip cam_calib
unzip imu_calib
unzip sequence0
```

## Recording Own Dataset
You can record your own sequences using the `basalt_rs_t265_record` executable:
```
basalt_rs_t265_record --dataset-path ~/t265_calib_data/ --manual-exposure
```
* `--dataset-path` specifies the location where the recorded dataset will be stored. In this case it will be stored in `~/t265_calib_data/<current_timestamp>/`.
* `--manual-exposure` disables the autoexposure. In this tutorial the autoexposure is disabled for all calibration sequences, but for the VIO sequence (sequence0) we enable it.

![t265_record](/doc/img/t265_record.png)

The GUI elements have the following meaning:
* `webp_quality` compression quality. The highest value (101) means lossless compression. For photometric calibration it is important not to have any compression artifacts, so we record these calibration sequences with lossless compression.
* `skip_frames` reduces the framerate of the recorded dataset by skipping frames.
* `exposure` controls the exposure time of the cameras.
* `record` starts/stops the recoding of the dataset. If you run the system on the slow PC pay attention to the number of messages in the queue. If it goes beyond the limit the recorder will start dropping frames.
* `export_calibration` exports factory calibration in the basalt format.

After recoding the dataset it is a good practice to verify the quality of the dataset. You can do this by running:
```
basalt_verify_dataset.py -d ~/t265_calib_data/<dataset_path>/
```
It will report the actual frequencies of the recorded sensor messages and warn you if any files with image data are missing.

Every sequence required for the calibration should have certain properties to enable successful calibration. Pay attention to the **Important for recording the dataset** subsections and inspect the provided examples before recoding your own sequences.

## Response calibration
In this project we assume a camera has a linear response function (intensity of the pixel is linearly proportional to the amount of light captured by the pixel). In this section we will verify this for the Realsense T265 cameras. We will need to record a static scene with different exposure times.

**Important for recording the dataset:**
* Keep the camera static and make sure that nothing in the scene moves during the recording.
* Move `webp_quality` slider to the highest value to enable lossless compression.
* Optionally set the `skip_frames` slider to 3-5 to speed up the dataset recoding.
* Start recoding and slowly move the exposure slider up and down. Stop recoding.
* Rename the dataset to `response_calib`.

Run the response function calibration:
```
basalt_response_calib.py -d ~/t265_calib_data/response_calib
```
You should see the response function and the irradiance image similar to the one shown below. For the details of the algorithm see Section 2.3.1 of [[arXiv:1607.02555]](https://arxiv.org/abs/1607.02555). The results suggest that the response function used in the camera is linear.
![t265_inv_resp_irradiance](/doc/img/t265_inv_resp_irradiance.png)

## Multi-Camera Geometric and Vignette Calibration
For the camera calibration we need to record a dataset with a static aprilgrid pattern.

**Important for recording the dataset:**
* Move `webp_quality` slider to the highest value to enable lossless compression (important for vignette calibration).
* Set the `skip_frames` slider to 5 to speed up the dataset recoding.
* Move the camera slowly to reduce the motion blur.
* Cover the entire field of view of the camera with the calibration pattern. Try to observe the pattern from different angles.
* Make sure you do not cast shadows at the pattern (important for vignette calibration).
* Rename the dataset to `cam_calib`

Run the calibration executable:
```
basalt_calibrate --dataset-path ~/t265_calib_data/cam_calib --dataset-type euroc --result-path ~/t265_calib_results/ --aprilgrid /usr/etc/basalt/aprilgrid_6x6.json --cam-types kb4 kb4
```
To perform the calibration follow these steps:
* `load_dataset` load the dataset.
* `detect_corners` detect corners. If the corners were detected before the cached detections will be loaded at the previous step so there is no need to re-run the detection.
* `init_cam_intr` initialize camera intrinsics.
* `init_cam_poses` initialize camera poses using the current intrinsics estimate.
* `init_cam_extr` initialize transformations between multiple cameras.
* `init_opt` initialize optimization.
* `opt_until_converge` optimize until convergence.
* `init_cam_poses` some initial poses computed from the initialized intrinsics can be far from optimum and not converge to the right minimum. To improve the final result we can re-initialize poses with optimized intrinsics.
* `init_opt` initialize optimization with new initial poses.
* `opt_until_converge` optimize until convergence.
* `compute_vign` after optimizing geometric models compute the vignetting of the cameras.
* `save_calib` save calibration file to the `~/t265_calib_results/calibration.json`.

![t265_cam_calib](/doc/img/t265_cam_calib.png)

## IMU and Motion Capture Calibration
After calibrating cameras we can proceed to geometric and time calibration of the cameras, IMU and motion capture system. Setting up the motion capture system is specific for your setup.

For the motion capture recording we use [ros_vrpn_client](https://github.com/ethz-asl/ros_vrpn_client) with [basalt_capture_mocap.py](/scripts/basalt_capture_mocap.py). We record the data to the `mocap0` folder and then move it to the `mav0` directory of the camera dataset. This script is provided as an example. Motion capture setup is different in every particular case.

**Important for recording the dataset:**
* Set the `skip_frames` slider to 1 to use the full framerate.
* Reduce the exposure time to reduce the motion blur.
* Move the setup such that all axes of accelerometer and gyro are excited. This means moving with acceleration along X, Y and Z axes and rotating around those axes.
* Do not forget to simultaneously record motion capture data.
* Rename the dataset to `imu_calib`.

Run the calibration executable:
```
basalt_calibrate_imu --dataset-path ~/t265_calib_data/imu_calib --dataset-type euroc --result-path ~/t265_calib_results/ --aprilgrid /usr/etc/basalt/aprilgrid_6x6.json --accel-noise-std 0.00818 --gyro-noise-std 0.00226 --accel-bias-std 0.01 --gyro-bias-std 0.0007
```

To perform the calibration follow these steps:
* `load_dataset` load the dataset.
* `detect_corners` detect corners. If the corners were detected before the cached detections will be loaded at the previous step so there is no need to re-run the detection.
* `init_cam_poses` initialize camera poses.
* `init_cam_imu` initialize the transformation between cameras and the IMU.
* `init_opt` initialize optimization.
* `opt_until_converge` optimize until convergence.
* Enable `opt_cam_time_offset` and `opt_imu_scale` to optimize the time offset between cameras and the IMU and the IMU scale.
* `opt_until_converge` optimize until convergence.
* `init_mocap` initialize transformation between the motion capture marker frame and the IMU and the transformation between the aprilgrid pattern and the motion capture system origin.
* Enable `opt_mocap`.
* `opt_until_converge` optimize until convergence.
* `save_calib` save calibration file to the `~/t265_calib_results/calibration.json`.
* `save_mocap_calib` save motion capture system calibration file to the `~/t265_calib_results/mocap_calibration.json`.

![t265_imu_calib](/doc/img/t265_imu_calib.png)

## Generating Time-Aligned Ground Truth
Since motion capture system and the PC where the dataset was recorded might not have the same clock we need to perform the time synchronization. Additionally we need to transform the coordinate frame of the GT data to the IMU frame (originally it is in the coordinate frame attached to the markers).

The raw motion capture data is stored in the `mav/mocap0/` folder. We can find the time offset by minimizing the error between gyro measurements and rotational velocities computed from the motion capture data. If you press the `save_aligned_dataset` button the resulting trajectory (time aligned and transformed to the IMU frame) will be written to `mav/gt/data.csv` and automatically loaded when available.
```
basalt_time_alignment --dataset-path ~/t265_calib_data/sequence0 --dataset-type euroc --calibration ~/t265_calib_results/calibration.json --mocap-calibration ~/t265_calib_results/mocap_calibration.json
```
You should be able to see that, despite some noise, rotational velocity computed from the motion capture data aligns well with gyro measurements.
![t265_time_align_gyro](/doc/img/t265_time_align_gyro.png)

You can also switch to the error function plot and see that there is a clear minimum corresponding to the computed time offset.
![t265_time_align_error](/doc/img/t265_time_align_error.png)

**Note:** If you want to run the time alignment again you should delete the `~/t265_calib_data/sequence0/mav/gt` folder first. If GT data already exist you will see the `save_aligned_dataset(disabled)` button which will **NOT** overwrite it.

## Running Visual-Inertial Odometry
Now we can run the visual-inertial odometry on the recorded dataset:
```
basalt_vio --dataset-path ~/t265_calib_data/sequence0 --cam-calib ~/t265_calib_results/calibration.json --dataset-type euroc --config-path /usr/etc/basalt/euroc_config.json --show-gui 1
```
After the system processes the whole sequence you can use `align_se3` button to align trajectory to the ground-truth data and compute RMS ATE.
![t265_vio](/doc/img/t265_vio.png)

## Running Visual-Inertial Odometry Live
It is also possible to run the odometry live with the camera. If no calibration files are provided the factory calibration will be used.
```
basalt_rs_t265_vio --cam-calib ~/t265_calib_results/calibration.json --config-path /usr/etc/basalt/euroc_config.json
```


text:
# Dafa Mailer

Dafa service responsible for creating Event Warnings and sending warning e-mails

## Logging

To run the live logging in a terminal:

> npm run log

## Configuring the Serverless Framework

This server has been configured to be deployed with the `Serverless Framework CLI`. An AWS Account and Node.js v8+ are required.

In the terminal, execute:

> npm install -g serverless

> serverless login

Configure your serverless framework using your [AWS Credentials](https://www.youtube.com/watch?v=tgb_MRVylWw).

Serverless npm package should be installed globally

## Deploy

If the configuration above has already been completed, the only thing you need to do to deploy to the dev/qa/prod environment is:

> npm run deploy

## Disabling Lambda Function

Set the function to `enabled: false` in `serverless.yml` and redeploy

repository: mvfavila/dafa-mailer

repo_name: mvfavila/dafa-mailer


text:
AdoNet
======

Console application to demonstrate the countless methods of connecting to a database in C#.

Through a character based menu, this app calls functions to connect and retrieve data from SQL Server, Adaptive Server Anywhere, and SQL Anywhere using native client drivers as well as the more advanced LINQ and EF methods.

Although there is a mixture of private, AdventureWorks, and Northwind databases being used, you can edit the connection strings in the .config file, settings, class, or code itself to suit your needs.

The app also contains a small library of functions to get connection strings and providers, as well as encrypt them in the .config file.

Here are the functions implemented and called from the menu:

OleDb
Odbc
SqlClientEmbedded
SqlClientAttached
AseClient
SQLAnywhere
EntityClient
StoreQueryAnonymous
StoreQueryTyped
StoreQueryEntity
ObjectQueryAnonymous
ObjectQueryTyped
ObjectQueryBuilder
LinqToEntities
LinqToSql
GetProviderFactoryClasses
GetConnectionStrings
GetConnectionStringByProvider

Here are the lbrary functions called at some point in the code:

EncryptConnectionStrings
GetConnectionStringByName
GetConnectionStringByProvider
GetProviderByName

repository: PillowMetal/AdoNet

repo_name: PillowMetal/AdoNet


text:
---
title: '4.65.0: 2020-05-18'
date: 2020-05-18T04:00:00.000Z
version: 4.65.0
changelog:
  - API
---

### Added

- The `managed_issue` field was added to the Open Support Ticket endpoint ([POST /support/tickets](/api/v4/support-tickets/#post)).
    - This field designates if the Support ticket is in reference to a [Managed Service](https://www.linode.com/products/managed/).
    - You must have a Managed Service enabled to use this designation.
    - No ID attributes (i.e. `linode_id`, `domain_id`, etc.) should be provided with this request.

### Fixed

- A bug was fixed that was preventing initiation of scheduled, cross data center migrations.

- If your Cloud Manager profile's authentication type is set to a Third-Party Authentication (TPA) method, `password_keys` can no longer be used as your `lish_auth_method` when updating your profile ([PUT /profile](/api/v4/profile/#put)).
    - To view your Cloud Manager profile's `authentication_type` field, send a request to the [View Profile](/api/v4/profile) endpoint.

- Capital letters are now accepted for the `check_path` value when creating ([POST /nodebalancers/{nodeBalancerId}/configs](/api/v4/nodebalancers-node-balancer-id-configs/#post)) and updating ([PUT /nodebalancers/{nodeBalancerId}/configs/{configId}](/api/v4/nodebalancers-node-balancer-id-configs-config-id/#put)) your NodeBalancer Configs.

repository: asauber/developers

repo_name: asauber/developers


text:
---
layout: default
---

# 1997-11-17 - Secret No More: FBI Files

## Header Data

From: John Young<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 4580696ddcc7f741f4688cc37402d878d1c2e3b78b58ea82c1f3c187859d1352

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-11-17 16:16:34 UTC

Raw Date: Tue, 18 Nov 1997 00:16:34 +0800

## Raw message

```
{% raw  %}From: John Young<EMAIL_ADDRESS>Date: Tue, 18 Nov 1997 00:16:34 +0800
To<EMAIL_ADDRESS>Subject: Secret No More: FBI Files
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

An informative site, titled "Secret No More," lists FBI
files of 2000 targets compiled by Michael Ravnitzky from
FOIA requests:

   http://www.crunch.com/01secret/01secret.htm

Happy to report that at least three of the targets (one named
thrice) dragnetted this rioter in younger days at Columbia,
maybe others have shagged me since.

{% endraw %}
```

## Thread

+ Return to [November 1997](/archive/1997/11)

+ Return to "[John Young <jya@pipeline.com>](/authors/john_young_jya_at_pipeline_com_)"

+ 1997-11-17 (Tue, 18 Nov 1997 00:16:34 +0800) - Secret No More: FBI Files - _John Young<EMAIL_ADDRESS>