text:
---
layout: post
title: "Use the Strategy to avoid the Switch-Case antipattern"
date: 2012-05-14 00:28
comments: true
categories: [design patterns, refactoring]
---

In PHP we have tons of bad constructs/functions that don't actually
help newcomers on writing good code: the `SWITCH/CASE` statement is one
of those that I hate the most, although very few developers rely on
it.
<!-- more -->

The statement is pretty straightfoward

``` php Simple SWITCH/CASE statement
<?php

class Logger
{
	public function logMessage($message = "CRITICAL::The system encountered a problem")
	{
		$parts = explode('::', $message);
		$level = $parts[0];

		switch ($level) {
		    case 'notice':
		        ...
		        break;
		    case 'critical':
		        ...
		        break;
		    case 'catastrophe':
		        ...
		        break;
		}
	}
```

and is intended to make multiple IFs more readable.

It may seem useful, but at first you should recognize that **multiple
IFs are already a bad smell**, so, from the beginning there is something
with a code trying to make them look nicer.

The [Strategy pattern](http://en.wikipedia.org/wiki/Strategy_pattern),
one of my favourites, is a simple but powerful way to avoid writing
procedural code that relies on IFs.

The main concept is that you should contextualize the application's
workflow at runtime, deciding which steps (methods) to run based on
data which is external to the method itself.

``` php silly implementation of Strategy
<?php

class Logger
{
	public function logMessage($message = "CRITICAL::The system encountered a problem")
	{
		$parts 	= explode('::', $message);
		$level 	= $parts[0];
		$method = sprintf('log%sMessage', ucfirst($level));
		$output = $this->$method($parts[1]);
	}

```

In this way we are able to isolate and keep clean the implementations
of the methods, thus the logic behind the application.

This means that we only need to implement submethods:

``` php
<?php

public function logNoticeMessage($message);

public function logCriticalMessage($message);

public function logCatastropheMessage($message);
```

If this doesn't seem important to you, consider this scenario:
you are shipping a library with the `SWITCH/CASE` in the first example;
what would happen if another developer using that library would only
like to edit the logic when a `catastrophe` message is received?

Yes, he would need to override the entire `logMessage` method,
**loosing the possibility to benefit of future software updates**
for that specific method.

branch_name: refs/heads/source


text:
---
title: Billing Accounts
path_override: billing-accounts
position: 11
layout: documentation
meta:
  title: Billing Accounts | HubRise
  description: How to manage HubRise billing accounts.
---

As a software provider, reseller, or consultant, you might choose to manage HubRise subscription payments on behalf of your clients for various reasons. These could include offering HubRise as a white-label service, accommodating your client's preference for a seamless service without receiving third-party invoices, or leveraging volume discounts on HubRise subscriptions.

To do this, you can easily include your payment details in your client's account. In this scenario, HubRise will send you separate monthly invoices for each account. If you have many such accounts on HubRise, you will not avail of volume discounts.

A better alternative is to ask HubRise to set up a **Billing Account** for your organisation. This special type of account is designed to handle subscriptions for multiple accounts and locations. Invoices generated for attached accounts or locations are consolidated into a single monthly invoice, allowing for volume discounts.

Users with a billing account can autonomously manage their billing information, add a payment method, and attach or detach accounts and locations.

In the following sections, **entity** will refer to either an account or a location.

## Attach Entities

You will generally attach accounts, unless you have a specific reason to attach a location.

To attach an entity to your billing account, follow these steps:

1. Log in to your [HubRise account](https://manager.hubrise.com).
1. Select your HubRise billing account. This account will have your company name followed by **Billing**.
1. Navigate to the **SETTINGS** page.
1. Click **Attach an entity**.
1. Choose to either **Attach an account** or **Attach a location**, depending on your needs.
1. Find the entity to attach from the **Select an account** or **Select a location** dropdown. This list will only display accounts and locations to which you have access to, and that are not already attached.
1. Click **Attach**.
1. Repeat the process as many times as needed.
1. Return to your **SETTINGS** page and check that all entities you attached are visible in the **Entities attached to this billing account** section.

![Billing Account Example](./images/081-2x-billing-account.png)

---

**IMPORTANT NOTE**: When you attach an entity, any pending requests for payment for this entity will be transferred to your billing account.

---

## Detach Entities

When you detach an entity from your billing account, it will be billed separately, and you will no longer receive invoices for this entity.

To detach an entity from your billing account, follow these steps:

1. Log in to your [HubRise account](https://manager.hubrise.com).
1. Select your HubRise billing account. This account will have your company name followed by **Billing**.
1. Navigate to the **SETTINGS** page.
1. Section **Entities attached to this billing account**, click on the bin icon located on the far right side to detach entities.

---

**IMPORTANT NOTE**: When you detach an entity, any requests for payment already issued for this entity will remain attached to your billing account.

---

## Update Billing Information

The billing information of your billing account is used to generate invoices.

To configure this information, follow these steps:

1. Log in to your [HubRise account](https://manager.hubrise.com).
1. Select your HubRise billing account. This account will have your company name followed by **Billing**.
1. Navigate to the **SETTINGS** page.
1. Select **Modify account**.
1. Fill in the information required under **Billing details**.
1. Click **Update**.

For more information, see section [Edit Billing Information](#edit-billing-information).

## Add a Payment Method

The payment method of your billing account is used to pay the invoices generated for the attached entities.

To add a payment method to your billing account, follow these steps:

1. Log in to your [HubRise account](https://manager.hubrise.com).
1. Select your HubRise billing account. This account will have your company name followed by **Billing**.
1. Navigate to the **SETTINGS** page.
1. Click **Add payment method** and enter your credit card information. Credit cards must be valid to be accepted.
1. When finished, click **Save**.

For more information, see section [Add a Payment Method](#add-a-payment-method).

license: MIT

repository: HubRise/website

branch_name: refs/heads/master

extension: md

gha_language: TypeScript

license_type: permissive

repo_name: HubRise/website


text:
---
ID: 1988
post_title: >
  How to remove all network mappings
  (remote connections) in Windows 7 by
  using the command line
author: Roel van Lisdonk
post_excerpt: ""
layout: post
permalink: >
  https://www.roelvanlisdonk.nl/2011/04/19/how-to-remove-all-network-mappings-remote-connections-in-windows-7-by-using-the-command-line/
published: true
post_date: 2011-04-19 22:16:54
---

To remove all current network drives (remote connections) use: net use * /delete /yes

repository: roelvanlisdonk/blogposts

repo_name: roelvanlisdonk/blogposts


text:
# Podospora decipiens var. decipiens (G. Winter ex Fuckel) Niessl, 1883 VARIETY

#### Status
SYNONYM

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

#### Published in
Hedwigia 22: 156 (1883)

#### Original name
Sordaria decipiens G. Winter, 1873

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Sordariales/Lasiosphaeriaceae/Podospora/Podospora decipiens/ Syn. Podospora decipiens decipiens/README.md

repo_name: mdoering/backbone


text:
# web-audio-recording

This is a simple demo for how to record audio
using the web. The audio data is then sent for
further processing to a Flask backend where it
is saved to a file.

## JavaScript Frontend

npm i http-server -g

http-server .

Open in browser http://localhost:8080.

The following Flask webservice needs to run
for data processing. If your IP or port is different
then change FLASK_ENDPOINT in main.js

## Flask Webservice

python3 -m venv venv

. venv/bin/activate

pip3 install -r requirements.txt

export FLASK_ENV=development
export FLASK_APP=app-audio.py

flask run --host=<IP_ADDRESS>

When you hit the "Stop Recording" button
on the frontend, the data is sent to the Flask
webservice and a file audio.webm is created.

## Prior Work

Demo based on: https://github.com/webrtc/samples/tree/gh-pages/src/content/getusermedia/record

## License

BSD License

repository: tderflinger/web-audio-recording

branch_name: refs/heads/main

repo_name: tderflinger/web-audio-recording


text:
garage-io
=========

NOW BATTLE TESTED! (see below)
Garage control and monitoring system. Uses Arduino > serial > python.

Currently sends push notification via Prowl for iOS and plays alarm sound via Raspberry PI headphone jack.

## Example usage:

    http://raspi.example.com:8080/status

    http://raspi.example.com:8080/mode/(ARMED/DISARMED/TEMPDISARMED)

    http://raspi.example.com:8080/command/OPEN[:2000] #optional milliseconds to trigger relay a second time

#Parts List
### Physical Dependencies (parts list):

Name|purpose|source
--------|:--------|:--------
Raspberry Pi Model B|Runs client software, master controller|http://www.adafruit.com/products/998
Arduino|Monitors sensors, triggers relays|http://www.adafruit.com/products/50
SainSmart 2-Channel Relay Module|for opening and closing doors|http://www.amazon.com/dp/B0057OC6D8/ref=pe_385040_30332190_pe_175190_21431760_M3T1_ST1_dp_1
Magnetic Door sensors|detect door open/closed|http://www.amazon.com/gp/product/B0009SUF08/ref=oh_details_o09_s00_i02?ie=UTF8&psc=1
Passive Infrared (PIR) Motion Sensor|for detecting movement|http://www.adafruit.com/products/189
Handy connecting cables M-to-F|useful for quick bridging stuff to raspi/arduino|http://www.amazon.com/gp/product/B00A6SOGC4/ref=oh_details_o05_s00_i00?ie=UTF8&psc=1
Short usb cable|for connecting Arduino to Pi |http://www.amazon.com/gp/product/B00004Z5IE/ref=oh_details_o06_s00_i01?ie=UTF8&psc=1
Small gauge wire|for wiring to sensors|Radioshack/wherever

### Optional parts:

Name|purpose|source
--------|:--------|:--------
Wifi dongle|for make wireless|http://www.amazon.com/gp/product/B002VJL0OI/ref=oh_details_o03_s00_i00?ie=UTF8&psc=1
USB to TTL Serial Cable|lets you connect to RasPI serial console|http://www.adafruit.com/products/954

## Dependencies:

pySerial
redis-py
bottle.py

## Optional:
PyNMA

##This guy opened my garage at 4am, thanks to garage-io he got zero things:
![Jerk](https://dl.dropboxusercontent.com/u/566560/208-capture.jpg)

## Questionably alpha hardware:
![Version 1](https://dl.dropboxusercontent.com/u/566560/garage-security.jpg)

repository: rawdigits/garage-io

repo_name: rawdigits/garage-io


text:
# Up and Running with Ionic v2

## ng-conf 2016

For those attending my workshop on the Fair Day at this year's ng-conf, we will need to install a few things to help maxmimize the session.

1) If you do not have nodejs installed, please do so. It can downloaded from http://nodejs.org/. I recommend using 4.4.3

2) If you do not have Git installed, you will need to do so as well. It can be downloaded from http://git-scm.com/. The Ionic CLI uses it to manage installations of components. For Windows users, make sure you install GIT Bash as well, as it mirrors the Unix Bash system.

3) To install the Ionic SDK and create Ionic 2 projects, you’ll need to install the latest beta release:
```npm install -g ionic@beta```

    Note: Macintosh users may have to prepend sudo before the npm install command.

4) We will need to install the Cordova CLI. ```npm install -g cordova```

5) Install the free Ionic View app on your mobile device.

   iOS: https://itunes.apple.com/us/app/ionic-view/id849930087?ls=1&mt=8

   Android: https://play.google.com/store/apps/details?id=com.ionic.viewapp

6) Get an account at https://apps.ionic.io/signup. We will use this service  test our app on device.

This is the bare minimum for Ionic development. If you are planing on deploying your apps on your device you will need to do some additional installed based on the platform you are targeting.

You will also need Google Chrome and your favorite IDE. I am a fan of Visual Studio Code (https://code.visualstudio.com/). Make sure you also grab the Cordova Tools (https://marketplace.visualstudio.com/items?itemName=vsmobile.cordova-tools).

## Optional Installations
Although we will not be deploying to actual device, you might wish to explore that capability post-workshop. Here are the instructions to do so.

## iOS
---
For iOS development, several additional items need to be installed. These instructions are for Macintosh users only.

First, install XCode (https://developer.apple.com/xcode/) and the iOS SDK.

There are two more npm packages that we need to install

1) ```npm install -g ios-sim```. This module will allow us to launch the iOS Simulator directly from the command line.

2) ```npm install -g ios-deploy```. This module will allow us to install and launch our apps on properly configured iOS devices.

For more information see: http://docs.phonegap.com/en/edge/guide_platforms_ios_index.md.html

To directly install your apps on your device you will need to become an Apple Developer ($99 per year).

## Android
---
For Android development, you’ll need to install the Android SDK (http://developer.android.com/sdk/index.html). The Android SDK allows you to build compile to a target device running Android. Although the Android SDK comes with a stock emulator, Genymotion is recommended, since it’s much faster (https://www.genymotion.com/).

But before we install that, we need to install the Java Developer Kit version 6 or later. (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)

Select the option for your platform. We just need the JDK, so you can ignore the other options here.

Once that is done installing, we will need to modify the PATH environment variable. This will vary depending on your platform.

For more information see: http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.html


text:
---
description: Overview of hosted pages with Auth0, and how to use them
topics:
  - login
  - universal-login
  - password-reset
  - guardian
  - mfa
  - error-pages
  - hosted-pages
contentType: index
useCase: customize-hosted-pages
---

# Auth0 Hosted Pages

Auth0 offers you the ability to display customized pages containing Auth0-related functionality and to which Auth0 redirects your users during the authorization process. You can create the following types of hosted pages:

* [Login](/hosted-pages/login)
* [Password Reset](/hosted-pages/password-reset)
* [Guardian Multifactor](/hosted-pages/guardian)
* [Error pages](/hosted-pages/error-pages)

While Auth0 hosts your custom pages, you can still [manage your pages using the version control system of your choice](/hosted-pages/version-control).

## Why Use Hosted Pages

Hosted pages are easy to implement and secure. For example, using Auth0 hosted pages instead of hosting them externally provides seamless CSRF protection. This helps prevent third party impersonation or the hijacking of sessions.

## How to Enable and Customize Hosted Pages

To enable a particular type of hosted page, navigate to the [Hosted Pages section of the Auth0 Dashboard](${manage_url}/#/login_page) (note that Error Page settings are located under [Tenant Settings](${manage_url}/#/tenant)). Click on the slider to enable the page.

## Customize Your Hosted Page

In the Auth0 Dashboard, you'll see an HTML editor, as well as a **Preview** tab, for each of the hosted page types. You can either use the editor to create your HTML or paste in the HTML you've created elsewhere.

For detailed instructions on how to customize each type of hosted page, please see the following docs:

* [Login Page](/hosted-pages/login)
* [Password Reset Page](/hosted-pages/password-reset)
* [Guardian Multifactor Authentication Page](/hosted-pages/guardian)
* [Error Pages](/error-pages)

repository: mehrdadmms/docs

gha_license_id: MIT

repo_name: mehrdadmms/docs


text:
# Contributing Guidelines 🚧

First of all, thanks for your interest in contributing to this project 😀

## Installation 👷♂

**You need to install [NodeJS](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/), you can also use [NPM](https://www.npmjs.com/) instead of Yarn as your package manager**

Clone the project

```bash
git clone https://github.com/marcelogaldino/space.git

# Go to the project directory
cd space/
```

Install dependencies

```bash
# installing dependencies
yarn

#running the project
yarn start
```

Now you are ready 🚀

# Bugs 🐛

It would be very nice if you find and report bugs, but, be sure to include:

- Package version
- Node version
- Brief but thorough description of the issue
- Link to a CodeSandbox or similar (optional, but highly recommended, especially for complex problems)

**If you have an idea for an enhancement, go ahead and share it via an issue**

# Commits and Code Standardization

This project follow the [Conventinal Commits]() specification. Husky execute scrips according to git hooks in order to test if a developer is following the commits convention. Check out this [project](https://github.com/marcelogaldino/commit-convention) for more.

repository: marcelogaldino/space

gha_language: JavaScript

repo_name: marcelogaldino/space


text:
# V60

![V60](https://github.com/Lauraow/coffee_datasets/blob/master/V60/datasets/v60_1.jpg)

## Description

Brewed coffee is made by pouring hot water onto ground coffee beans, then allowing to brew. There are several methods for doing this, including using a filter, a percolator, and a French press. Terms used for the resulting coffee often reflect the method used, such as drip brewed coffee, filtered coffee, pour-over coffee, immersion brewed coffee, or simply coffee. Water seeps through the ground coffee, absorbing its constituent chemical compounds, and then passes through a filter. The used coffee grounds are retained in the filter, while the brewed coffee is collected in a vessel such as a carafe or pot.

## Sources
[Wikipedia](https://en.wikipedia.org/wiki/Brewed_coffee)


text:
# stormer-http
Implementation of  [Stormer Store](https://github.com/avocarrot/stormer) for HTTP clients

[![CircleCI](https://circleci.com/gh/Avocarrot/stormer-http/tree/master.svg?style=shield&circle-token=746c5c023e9387801481462f8e7316ad0c0a5e8c)](https://circleci.com/gh/Avocarrot/stormer-http/tree/master)

## Requirements

- [stormer ^v0.9.0 ](https://www.npmjs.com/package/stormer)
- [request ^v2.81.0 ](https://www.npmjs.com/package/request)

## Available stores

- [Http Store](https://github.com/Avocarrot/stormer/blob/master/README.md#http)
- [Http HAL Store](https://github.com/Avocarrot/stormer/blob/master/README.md#http-hal)

####  Http Store

```js
const HttpStore = require('stormer-http').HttpStore;
const store = new HttpStore({
  timeout: 1000,
  baseUrl: 'http://endpoint.mock.com/v1',
});
```

####  Http HAL Store
See http://stateless.co/hal_specification.html

```js
const HttpHalStore = require('stormer-http').HttpHalStore;
const store = new HttpHalStore({
  timeout: 1000,
  baseUrl: 'http://endpoint.mock.com/v1',
});
```

## Contributing

This project is work in progress and we'd love more people contributing to it.

1. Fork the repo
2. Apply your changes
3. Write tests
4. Submit your pull request

repository: Avocarrot/stormer-http

repo_name: Avocarrot/stormer-http


text:
---
title: "Artist"
icon: paint-brush-fill
---

**@lesy/lesy-plugin-artist** is the wrapper of Lesy's [Artist UI](/libraries/standalone/artist-UI) library.

## Installation

```shell
npm install @lesy/lesy-plugin-artist # or
yarn add @lesy/lesy-plugin-artist
```

Then add it to plugins array in main `index` file

```js
export default {
  commands: [`${__dirname}/commands`],
  plugins: ["@lesy/lesy-plugin-artist"],
};
```

## Usage

Generally, lesy finds `run` function in the command and executes. But, Artist plugin overrides that, and runs the `render` function. The context data of the render function is same and additionally you will be able to access the `store`. Apart from that, `onInit` will be executed before render if it is defined. The API is same as the Artist library.

```js
// hello command
export default {
  name: "hello",
  onInit: (store, timer) => {
    timer(() => (store.count += 1), 1000, "my-key");
  },
  render: ({ store }) => {
    return `<div>Counter: ${store.count}</div>`;
  },
};
```

## Plugins

You can add plugins to Artist plugin by providing in the config

```js
export default {
  commands: [`${__dirname}/commands`],
  plugins: [
    [
      "@lesy/lesy-plugin-artist",
      { plugins: [`${__dirname}/src/my-artist-elements-plugin`] },
    ],
  ],
};
```

## Learn more

- Read about [Artist UI](/libraries/standalone/artist-UI) API and elements
- [Commands context](/docs/components/commands/#run-context) data

repository: SHUAXINDIARY/lesyjs

repo_name: SHUAXINDIARY/lesyjs


text:
# herzog

Write your Python [Jupyter](https://jupyter.org/) notebooks in herzog!

herzog scripts are pure Python. This means version control, pull requests, CI/CD, and more.

Great! How does it work?

## Usage

Use context managers to define Jupyter cells:
```
with herzog.Cell("python"):
    print("Hello herzog")
```

Want to tell your users what to do? Make a markdown cell:
```
with herzog.Cell("markdown"):
    """
    # How cool is this notebook?
    So cool!
    """
```

Use the herzog CLI to generate a notebook from your Python script:
```
herzog path/to/my/cool_script.py > path/to/my/cool_notebook.ipynb
```

### Example

The script below, which can be [found in the herzog repo](https://github.com/xbrianh/herzog/blob/master/tests/fixtures/fibonacci.py),
has been generated into a notebook as [shown here](https://github.com/xbrianh/herzog/blob/master/tests/fixtures/fibonacci.ipynb).

Note that everything outside herzog context managers is not included in the notebook. That's where you put tests,
developer notes, salacious accusations, or anything else.
```
import herzog

with herzog.Cell("markdown"):
    """
    # Fibonacci:
    Recursively generate terms from the Fibonacci sequence.
    """

with herzog.Cell("python"):
    def fibonacci(term: int) -> int:
        """
        0-indexed fibonacci
        """
        assert 0 <= term
        if 1 < term:
            return fibonacci(term - 1) + fibonacci(term - 2)
        else:
            return term

# Code outside herzog context does not appear in generated notebooks.
try:
    fibonacci(-1)
except AssertionError:
    # expected
    pass
expected_fibonacci = (0, 1, 1, 2, 3, 5, 8, 13, 21)
for i in range(1, len(expected_fibonacci)):
    assert expected_fibonacci[i] == fibonacci(i)

golden_ratio = (1 + 5 ** 0.5) / 2
assert 1e-10 > abs(golden_ratio - fibonacci(26) / fibonacci(25))
```

## Installation

```
pip install git+https://github.com/xbrianh/herzog
```

## Links

Project home page [GitHub](https://github.com/xbrianh/herzog)

### Bugs

Please report bugs, issues, feature requests, etc. on [GitHub](https://github.com/xbrianh/herzog).

repository: DailyDreaming/herzog

repo_name: DailyDreaming/herzog


text:
# Ansible

# Overview

Ansible gives us the ability to provision new infrastructure through the use of
automation. Using Ansible prevents administrators from having to actively manage
new or existing hosts and is particularly useful when used with large numbers of hosts.

It has five (5) primary concepts:

## Modules

  - these are the 'services' or 'packages' which are already configured and allow us to use certain functionality within Ansible.
  - the `git` module gives Ansible to power to do any `git` command programatically.
  - anyone can write a module. The complete [list](https://docs.ansible.com/ansible/latest/modules/modules_by_category.html)

### Tasks

  - this is the mechanism used to call modules within an Ansible playbook (more below)
  - organised by type of job/task that needs to be done; security and database could be two tasks

```yaml
# example of a task
- name: ensure Git is installed
  apt: name=git-core state=present update_cache=yes
  become: true
```

### Roles

- how we group tasks and variables
- allows reuse across environment and projects
- Ansible's super power

### Playbook

  - what needs to be done
  - top level collection full of tasks, variables and modules to accomplish task
  - referenced when running Ansible to indicate which "play" to run

### Inventory

  - where things need to be done; which server etc
  - typically assigned in a `hosts` file within the Ansible projects root directory.

```yaml
[common]
<IP_ADDRESS>
<IP_ADDRESS>

[database]
<IP_ADDRESS>

[webserver]
<IP_ADDRESS>
```

## Directory Layout

A rough guide to how an Ansible directory should be structured.

```shell
site.yml
webservers.yml
fooservers.yml
roles/
    common/
        tasks/
        handlers/
        files/
        templates/
        vars/
        defaults/
        meta/
    webservers/
        tasks/
        defaults/
        meta/
          main.yml <-- must be inside a folder being used
```
Any folders within the Roles must contain a `main.yml`. If any folder is not being
used, they can safely be removed.

A break down of each folder within the template above.

- tasks - contains the main list of tasks to be executed by the role.
- handlers - contains handlers, which may be used by this role or even anywhere outside this role.
- defaults - default variables for the role.
- vars - other variables for the role.
- files - contains files which can be deployed via this role.
- templates - contains templates which can be deployed via this role.
- meta - defines some meta data for this role. See below for more details.

An example of how to use and structure Roles.

```shell
# roles/example/tasks/main.yml
- name: added in 2.4, previously you used 'include'
  import_tasks: redhat.yml
  when: ansible_facts['os_family']|lower == 'redhat'
- import_tasks: debian.yml
  when: ansible_facts['os_family']|lower == 'debian'

# roles/example/tasks/redhat.yml
- yum:
    name: "httpd"
    state: present

# roles/example/tasks/debian.yml
- apt:
    name: "apache2"
    state: present
```

## Commands

### Hello World

`ansible all -i "localhost," -m debug -a "msg='Hello World'"`

With inventory:

`ansible all -i ./inventory -m debug -a "msg='Now with an inventory!'"`

### Playbooks

Basic syntax

```yaml

---

  - name: Provision Vagrant
    hosts: all
    tasks:

      - name: Install Vim
        apt: name=vim state=present
        become: sudo
      - name: Install [Git](Git)
        apt: name=git state=latest
        become: sudo
```

In the above example we are using a `debian` based system that uses `apt` and we tell it what packages to install via the `name` argument. The two options in `state` are `present` which means, if it is on the system already, do nothing. Whereas, `latest` will update to the latest regardless.`apt` requires sudo privileges and this is set through the `become` option.

Packages can be removed with `state=absent`.

The above playbook can be simplified for multiple packages to this:

```yaml

---

  - name: Provision Vagrant
    hosts: all
    tasks:

      - name: Install Packages
        apt: name= state=present
        become: sudo
        with_items:
          - git
          - mtr
          - htop
          - ntp
          - vim
      - name: Remove Packages
        apt: name= state=absent
        become: sudo
        with_items:
          - emacs

```

Update and Upgrades

```yaml
```

## Tips

### Set Environment Variables

```yaml
#Inthe'vars'sectionoftheplaybook(setto'absent'todisablepro\ xy):
proxy_state: present

#Inthe'tasks'sectionoftheplaybook:
- name:Configuretheproxy.
  lineinfile:
    dest: /etc/environment
    regexp: "{{ item.regexp }}"
    line: "{{ item.line }}"
    state: "{{ proxy_state }}"
  with_items:
    - regexp: "^http_proxy="
      line: "http_proxy=http://example-proxy:80/"
    - regexp: "^https_proxy="
      line: "https_proxy=https://example-proxy:443/"
    - regexp: "^ftp_proxy="
      line: "ftp_proxy=http://example-proxy:80/"
```

repository: danielmichaels/databank

gha_language: Python

repo_name: danielmichaels/databank


text:
# Changelog

All notable changes to `apollo-smith` will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- # [x.x.x] (unreleased) - 2023-mm-dd

> Important: X breaking changes below, indicated by **BREAKING**

## BREAKING

## Features

## Fixes

## Maintenance

## Documentation -->
# [0.3.2](https://crates.io/crates/apollo-smith/0.3.2) - 2023-01-18
## Features
- Derive `Clone` on `apollo-smith` types, [SimonSapin] in [429]
- Add `DocumentBuilder::input_exhausted`, [SimonSapin] in [430]
## Fixes
- TryFrom for enums to use std::Result, continuation of [390], [bnjjj] in [428]
- Break infinite loop in input string generation, [SimonSapin] in [427]

[SimonSapin]: https://github.com/SimonSapin
[bnjjj]: https://github.com/bnjjj
[427]: https://github.com/apollographql/apollo-rs/pull/427
[428]: https://github.com/apollographql/apollo-rs/pull/428
[429]: https://github.com/apollographql/apollo-rs/pull/429
[430]: https://github.com/apollographql/apollo-rs/pull/430

# [0.3.1](https://crates.io/crates/apollo-smith/0.3.1) - 2022-11-29
This is a re-publish of 0.3.0 with fixed dependency versions.

# [0.3.0](https://crates.io/crates/apollo-smith/0.3.0) - 2022-11-29 (YANKED)

## BREAKING
- **make conversions from apollo-parser types fallible - [goto-bus-stop], [pull/371]**

  The `parser-impl` feature flag contains conversion code from apollo-parser AST node types
  to apollo-smith types. With this change, those conversions now use the `TryFrom` trait
  instead of the `From` trait, and return errors instead of panicking.

  You now have to use the `try_from()` and `try_into()` methods instead of `from()` and
  `into()`.

  [goto-bus-stop]: https://github.com/goto-bus-stop
  [pull/371]: https://github.com/apollographql/apollo-rs/pull/371

# [0.2.0](https://crates.io/crates/apollo-smith/0.2.0) - 2022-11-08

## BREAKING

- **update<EMAIL_ADDRESS>- [lrlna], [pull/340], [pull/348]**

  This change was first released in the<EMAIL_ADDRESS>patch release.
  It should have been a breaking change, as the update to the new version
  requires users to also update apollo-parser to 0.3.0 at the same time.

  This version is identical to 0.1.5 except for the version number.
  apollo-smith versions 0.1.4 and 0.1.5 have been yanked.

  [lrlna]: https://github.com/lrlna
  [pull/340]: https://github.com/apollographql/apollo-rs/pull/340
  [pull/348]: https://github.com/apollographql/apollo-rs/pull/348

# [0.1.5](https://crates.io/crates/apollo-smith/0.1.5) - 2022-11-04 (YANKED)

## Maintenance
- **update<EMAIL_ADDRESS>- [lrlna], [pull/348]**

  [lrlna]: https://github.com/lrlna
  [pull/348]: https://github.com/apollographql/apollo-rs/pull/348

- **update<EMAIL_ADDRESS>- [lrlna], [pull/349]**

  [lrlna]: https://github.com/lrlna
  [pull/349]: https://github.com/apollographql/apollo-rs/pull/349

# [0.1.4](https://crates.io/crates/apollo-smith/0.1.4) - 2022-11-04 (YANKED)

## Maintenance
- **update<EMAIL_ADDRESS>- [lrlna], [pull/340]**

  [lrlna]: https://github.com/lrlna
  [pull/340]: https://github.com/apollographql/apollo-rs/pull/340

# [0.1.3](https://crates.io/crates/apollo-smith/0.1.3) - 2022-05-12

## Fixes
- **add interface definition to internal stack - [bnjjj], [pull/213]**

  Added support of interface definition in the stack to fill an operation with
  correct fields.

  [bnjjj]: https://github.com/bnjjj
  [pull/213]: https://github.com/apollographql/apollo-rs/pull/213

# [0.1.2](https://crates.io/crates/apollo-smith/0.1.2) - 2022-04-28

## Maintenance
- **Update apollo-encoder to 0.3.0 - [lrlna], [pull/207] [pull/208]**
  `apollo-encoder`'s 0.3.0 changes `desciption` and `default-value` setters to
  accept String as a parameter. This changes the internals of apollo-smith
  accordingly.

  [lrlna]: https://github.com/lrlna
  [pull/207]: https://github.com/apollographql/apollo-rs/pull/207
  [pull/208]: https://github.com/apollographql/apollo-rs/pull/208

# [0.1.1](https://crates.io/crates/apollo-smith/0.1.1) - 2022-04-01
## Features
- **Add `parser-impl` feature flag - [bnjjj], [pull/197]**
  `parser-impl` feature in `apollo-smith` is used to convert
  `apollo-parser` types to `apollo-smith` types. This is useful when you require
  the test-case generator to generate documents based on a given schema.

  ```toml
  ## Cargo.toml

  [dependencies]
  apollo-smith = { version = "0.1.1", features = ["parser-impl"] }
  ```

  ```rust
  use std::fs;

  use apollo_parser::Parser;
  use apollo_smith::{Document, DocumentBuilder};

  use libfuzzer_sys::arbitrary::{Result, Unstructured};

  /// This generate an arbitrary valid GraphQL operation
  pub fn generate_valid_operation(input: &[u8]) {

      let parser = Parser::new(&fs::read_to_string("supergraph.graphql").expect("cannot read file"));

      let tree = parser.parse();
      if !tree.errors().is_empty() {
          panic!("cannot parse the graphql file");
      }

      let mut u = Unstructured::new(input);

      // Convert `apollo_parser::Document` into `apollo_smith::Document`.
      let apollo_smith_doc = Document::from(tree.document());

      // Create a `DocumentBuilder` given an existing document to match a schema.
      let mut gql_doc = DocumentBuilder::with_document(&mut u, apollo_smith_doc)?;
      let operation_def = gql_doc.operation_definition()?.unwrap();

      Ok(operation_def.into())
  }
  ```

  [bnjjj]: https://github.com/bnjjj
  [pull/197]: https://github.com/apollographql/apollo-rs/pull/197

- **Introduces semantic validations to the test-case generation - [bnjjj], [pull/197]**

  Semantic validations currently include:
    - Directives used in the document must already be defined
    - Directives must be unique in a given Directive Location
    - Default values must be of correct type
    - Input values must be of correct type
    - All type extensions are applied to an existing type
    - Field arguments in fragments and operation definitions must be defined on
      original type and must be of correct type

  [bnjjj]: https://github.com/bnjjj
  [pull/197]: https://github.com/apollographql/apollo-rs/pull/197

# [0.1.0](https://crates.io/crates/apollo-smith/0.1.0) - 2021-02-18

Introducing `apollo-smith`!

The goal of `apollo-smith` is to generate valid GraphQL documents by sampling
from all available possibilities of [GraphQL grammar].

We've written `apollo-smith` to use in fuzzing, but you may wish to use it for
anything that requires GraphQL document generation.

`apollo-smith` is inspired by bytecodealliance's [`wasm-smith`] crate, and the
[article written by Nick Fitzgerald] on writing test case generators in Rust.

This is still a work in progress, for outstanding issues, checkout out the
[apollo-smith label] in our issue tracker.

[GraphQL grammar]: https://spec.graphql.org/October2021/#sec-Appendix-Grammar-Summary
[`wasm-smith`]: https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-smith
[article written by Nick Fitzgerald]: https://fitzgeraldnick.com/2020/08/24/writing-a-test-case-generator.html#what-is-a-test-case-generator
[apollo-smith label]: https://github.com/apollographql/apollo-rs/labels/apollo-smith


text:
build-lists: true

# Music Notation in
 Adobe Illustrator
## Dartmouth College
### 12-13 November, 2016

---

# Thanks!

---

# Background

---

## ...

---

## ...

---

## ...

---

# Session 1
## Soft Landing
### A music-centric introduction to Adobe Illustrator

---

# Objectives

Become fluent in the day-to-day operations in Illustrator:

- Create paths, giving them strokes and fills
- Group shapes to maintain practical and semantic links therewithin
- Store them as symbols to maximize re-usability
- Gain appreciation for this beautiful program
- Have fun, build obsession

---

# The `Path` tool
## [`P`] for `P`ath

^
- Show uses for `Path` tool
- Demonstrate building up a `Path` by clicking a lot
- Stoke / Fill ?

---

# Solo Activity
- Make a rectangle with the `Path` tool.
- Make a perfect square with the `Path` tool.

---

## Success?
## What hurt?

---

# The `Rectangle` tool
## [`M`] for `M`ectangle

^
- Demonstrate the creation of a rectangle, square
- Preview scaling
- Stroke / Fill ?

---

# Questions
- What do the `⇧` (`shift`), and/or `⌥` (`option`) keys do when creating a rectangle?
- What do they do when scaling a rectangle?

---

# What about curves?

^
- So far, we have only made straight lines
- Demonstrate how to create Bézier curves
- For more info, check out Pomax inro to Bézier curves

---

# Really quick

- Experiment with curves
- What happens when you have a `non-nil` fill color?

---

# How do we control this madness!?

---

# Guides

^
- Demonstrate conversion of a square `Path` into a `Guide`.
- `control-click` -> `Make Guides`

- You can convert any path into a guide
- You can lock/unlock them, and show/hide them

---

# Solo Activity

- Make an ellipse using only the `Path` tool.
- Make a perfect circle using only the `Path` tool.
- Hint: Make guides.

---

## Success?
## What hurt?

---

# The `Ellipse` tool
## [`L`] for `L`-ipse

---

# The `Selection` tool
## [`V`] for `V`-election

---

# The `Direct Selection` tool
## [`A`] for ... ?

---

# The `Cut` tool
## [`C`] for `C`ut

---

# Pair Activity:
## Close the door (**_fff_**)

^
Create an icon for closing a door with the following components:
- Door
- Threshold
- Dashed path with arrowhead

---

- What can be improved?

---

# QUICK BREAK 1: Questions?

---

# Solo Activity
- Make 5 equidistantly-spaced, horizontal, parallel lines
- Decide the best proportion between `stroke-width` and separation

---

## Success?
## What hurt?

---

# `⌘-D`
## [`D`]o it again

^
- Demonstrate that this works for a variety of different transformations

---

# Really quick
- Recreate this 5-line staff using `Transform Again` (`⌘-D`)

---

# Question

- What happens when you try to move the lines?

---

# `⌘-G`
## [`G`]roup

---

# Solo Activity
- Create a System Divider (see example)

^
Show example (two parallelograms)

---

## Success?
## What hurt?

---

# Question

- What do you get when you `control-click` on a path?

---

# Transform

- Move
- Rotate
- Reflect
- Scale
- Shear

---

# Really quick

- Now make the System Divider using `Shear`.

---

# QUICK BREAK 2: Questions?

---

# Solo Activity
- Create a repeating waveform: triangle wave
- Just stroke it, no fill, for now

---

## Success?
## What hurt?

---

# `⇧-J`
## [`J`]oin Paths

### When using the [`P`]ath tool

---

# Pair Activity
- Create a more complex waveform
	- Sine wave
	- Sawtooth wave

- Too easy?
	- Real-life square wave

---

# Team Activity
- Make the coolest waveform
- Fill it with a different color than the stroke
- Choose a good `stroke-width`
- Can you move it around? Does it break?

---

# The `Text` tool
## [`T`] for `T`ext

^
Demonstrate: `Type` -> `Create Outline` or `⇧-⌘-O`

---

# Create musical symbols from fonts

See example.

^
- `shift-7`: treble clef
- `shift-/`: bass clef

---

# Pair activity
- Find two or three other music notation symbols that you like:
	- Clefs, noteheads, rests, etc.
- Turn them into `Paths` (`Type` `->` `Create Outline`)
- Turn them into `Symbols`
- Set the best anchor point for their uses
- Place them on the staff, size them appropriately
- Change something about the original

---

# Questions?

---

# Session 2
## Best of both worlds,
 and the consequences
### Building hybrid scores

---

# Objectives

Find the best ways to use (Finale | Sibelius) with Illustrator:

- Rekindle love for the traditional music notation software
- Build thoughtful protocols for transferring content between programs
- Develop reusable templates for useful things
- Import symbols built by someone else
- Begin fantasizing about never using traditional music notation software ever again

---

# Two branches
- (Finale | Sibelius) as primary application
- Illustrator as primary application

---

## (Finale | Sibelius)
 as primary application

---

## What can you use Illustrator for when most of the music is best-representable with traditional notation software?

- Tablature notations
- Stage layout
- Choreographic directions
- Extended instrumental technique explanation
- Technical set-up diagram
- Circuit diagrams

---

## Illustrator
 as primary application
### How can you use traditional music notation software when most of the music is best-representable with graphics software?

---

# Structured Time

---

# Session 3
## Live free or die
### Building pure-Illustrator scores

---

# Objectives

Bypass the dependency on traditional music notation software:

- Find the structures that best model the music that you do
- Deal with time

---

# QUICK BREAK 1: Questions?

---

# QUICK BREAK 2: Questions?

---

# Session 4
## Feeling the power
### A gentle introduction to scripting into Illustrator

---

# Objectives

Learn to automate the generation of graphics in Illustrator:

- Use a script that someone else wrote
- Discover that you _can_ script into Illustrator
- Generate the structural elements of score with a single button-press
- Think about time, and how that plays out graphically

---

# Scripts
- Download this: __http://aiscripts.com/open-multipage-pdf/__
- Double click it, it should open `ExtendScript Toolkit`.
- Select a `PDF` you have created with (Finale | Sibelius)
- Select the range of pages

---

# Starting from scratch

---

# Hello, world!

---

- Document
- ...
- ...
- ...

---

Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!

---

# Create a `Path`.

^
- End points
- Stroke?

---

# Create a `Rectangle`.

^
- Size
- Position
- Fill?

---

# QUICK BREAK 1: Questions?

---

# `noise~`-represented

^
Make a bar graph of randomly generated numbers

---

# Bar graph

---

# QUICK BREAK 2: Questions?

repository: jsbean/Talks

repo_name: jsbean/Talks


text:
# News-Recommendation-Engine

A real-time news recommendation app that scrapes the latest news, auto-classifies news using trained model, and updates news preference based on user click activities.

## Architecture

![top-news-architecture](https://user-images.githubusercontent.com/20265633/39733078-df206b60-523e-11e8-8380-4db685acbb0e.jpg)

license: Unlicense

repository: moradbeikie/News-Recommendation-Engine

gha_license_id: Unlicense

repo_name: moradbeikie/News-Recommendation-Engine


text:
#Considerations and proposals in order to the regulation of the press together with diverse instances of treasonous, and seditious pamphlets, proving the necessity thereof / by Roger L'Estrange.#

##L'Estrange, Roger, Sir, 1616-1704.##
Considerations and proposals in order to the regulation of the press together with diverse instances of treasonous, and seditious pamphlets, proving the necessity thereof / by Roger L'Estrange.
L'Estrange, Roger, Sir, 1616-1704.

##General Summary##

**Links**

[TCP catalogue](http://www.ota.ox.ac.uk/tcp/)  •
[HTML](http://tei.it.ox.ac.uk/tcp/Texts-HTML/free/A47/A47832.html)  •
[EPUB](http://tei.it.ox.ac.uk/tcp/Texts-EPUB/free/A47/A47832.epub) •
[Page images (Historical Texts)](https://data.historicaltexts.jisc.ac.uk/view?pubId=eebo-12730854e&pageId=eebo-12730854e-66483-1)

**Availability**

This keyboarded and encoded edition of the
	       work described above is co-owned by the institutions
	       providing financial support to the Early English Books
	       Online Text Creation Partnership. This Phase I text is
	       available for reuse, according to the terms of Creative
	       Commons 0 1.0 Universal. The text can be copied,
	       modified, distributed and performed, even for
	       commercial purposes, all without asking permission.

**Major revisions**

1. __2003-11__ __TCP__ *Assigned for keying and markup*
1. __2003-12__ __Aptara__ *Keyed and coded from ProQuest page images*
1. __2004-03__ __Amanda Watson__ *Sampled and proofread*
1. __2004-03__ __Amanda Watson__ *Text and markup reviewed and edited*
1. __2004-04__ __pfs__ *Batch review (QC) and XML conversion*

##Content Summary##

#####Front#####

1. TO THE
KINGS
Most EXCELLENT
MAJESTY.

1. To the Right Honourable the
LORDS
And, To the Honourable the
COMMONS
Assembled in Parliament.

#####Body#####

1. Considerations and Proposals
In Order to the
Regulation
OF THE
PRESS.

    _ The Books to be supprest are as follows.

    _ Instances of Treasonous and Seditious
Pamphlets.

      * I. Against the Life of the Late King.

The Armies Remonstrance from St. Albans, Nov. 16. 1648.

God's Delight in the Progress of the Vpright.Printed for Thomas Brewster, 1649.

      * II. In Justification of Putting His Late Majesty
to Death.

The Speeches and Prayers of some of the Late King's Iudges.Printed 1660 Divers Impressions.

Mercurius Politicus.

      * III. Against the Title of the Royal Family to the
Crown of England.

Mercurius Politicus.

The False Brother.

A Foul and Treasonous piece, printed for Giles Calvert, 1652. The Rise, Reign, and Ruine of the House of Stuarts.

A Short Reply, &c. together with a Vindication of the
Declaration of the Army of England.

      * IV. Treasonous, Malicious, and Scandalous Libels
against the Person of his most Sacred Majesty
and the Royal Family.

Plain English.

A Door of Hope.

The Case of King Charles.

An English Translation of the Scottish Declaration.

The None-such Charles.

A True State of the Case of the Common-wealth.

Mercurius Britanicus.

      * V. Pamphlets tending manifestly to stir vp the
People against his Sacred Majesty, and the
Establish'd Government.

God's Loud Call.Printed by Simon Dover, 1661. P. 17.

Smectymnuus Redivivus.

A Sermon Preached at Aldermanbury-Church,
Dec. 28. 1662.

Animadversions upon the Bishop of Worcesters Letter.Printed by Io. Hayes, 1662. The Author Edw. Bagshaw.

The Year of Prodigies.

A Word of Comfort.

A Dispute against the English-Popish Ceremonies.

    _ Instances of Pamphlets containing Treasonous
and Seditious POSITIONS.

      * VI. The Three Estates are Co-ordinate, and the
King one of the Three Estates.

Baxters Holy Common-Wealth.Printed for Francis Tyton, 1659.

Parliament-Physick for a Sin-sick Nation.

Ahabs Fall, with a Post-script to Dr. Fern.

      * VII. The Soveraignty is in the Two Houses, in
Case of Necessity.

The Peoples Cause stated,1662. in the [Pretended] Tryal of Sir
Henry Vane.

Observations upon his Majesties Answers, &c.

Right and Might well met.

      * VIII. The Power of the King is but Fiduciary;
and the Duty of the Subjects but Conditional.

Ius Populi.

Vindiciae contra Tyrannos.

The Tenure of Kings and Magistrates1649.—

      * IX. The King is Singulis Major, Universis Minor.

A Declaration of the Lords and Commons touching the Four
Bills.March 13. 1647.

De Monarchiâ Absolutâ.

Thorps Charge to the Grand-Iury at York, March 20. 1648.

      * X. The Kings Person may be Resisted but not His
Authority.

Lex Rex.Printed by a Person in Office and Employment. Octob. 7. 1644.

      * XI. The King has no Power to Impose in Ecclesiastical
Affairs.

The Great Question.1660. The Author Edw. Bagshaw.

      * XII. The Parliament of November 3d. 1640. is
not yet Dissolv'd.

The Peoples Cause Stated in the [Pretended] Tryall of Sir
Henry Vane.1662.

      * XIII. The Warre Rais'd in 1642. in the Name
of King and Parliament was Lawful.

Baxters Holy Common-Wealth.Printed for Francis Tyton, 1659.

The Form and Order of the Coronation of Charles the Second.1660. Since his Majesties Return.

      * XIV. The Covenant is Binding.

A Phoenix: or, the Solemn League and Covenant.Printed by Tho. Creek for Giles Calvert, Tho. Brewster and Livewel Chapman, since his Majesties Return.

Two Papers of Proposals.1661. from the Presbyterian Ministers.

A Short Survey of the Grand Case,1663. Printed by Henry Bridges. &c.

    _ The Stationers are not to be entrusted with the care
of the Press, for These following Reasons.

    _ The Printers are not to be Entrusted with the Government
of the Press.

**Types of content**

  * Oh, Mr. Jourdain, there is **prose** in there!

There are 2 **ommitted** fragments!
 @__reason__ (2) : illegible: blotted (1), illegible (1)  •  @__resp__ (2) : #TECH (2)  •  @__extent__ (2) : 1 word (1), 1 letter (1)

**Character listing**

|Text|string(s)|codepoint(s)|
|---|---|---|
|Latin-1 Supplement|â|226|
|General Punctuation|—•|8212 8226|
|Geometric Shapes|▪◊|9642 9674|
|Miscellaneous Symbols|☞☜|9758 9756|
|CJKSymbolsandPunctuation|〈〉|12296 12297|

##Tag Usage Summary##

###Header Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__author__|2||
|2.|__availability__|1||
|3.|__biblFull__|1||
|4.|__change__|5||
|5.|__date__|8| @__when__ (1) : 2004-05 (1)|
|6.|__edition__|1||
|7.|__editionStmt__|1||
|8.|__editorialDecl__|1||
|9.|__extent__|2||
|10.|__idno__|6| @__type__ (6) : DLPS (1), STC (2), EEBO-CITATION (1), OCLC (1), VID (1)|
|11.|__keywords__|1| @__scheme__ (1) : http://authorities.loc.gov/ (1)|
|12.|__label__|5||
|13.|__langUsage__|1||
|14.|__language__|1| @__ident__ (1) : eng (1)|
|15.|__listPrefixDef__|1||
|16.|__note__|4||
|17.|__notesStmt__|2||
|18.|__p__|11||
|19.|__prefixDef__|2| @__ident__ (2) : tcp (1), char (1)  •  @__matchPattern__ (2) : ([0-9\-]+):([0-9IVX]+) (1), (.+) (1)  •  @__replacementPattern__ (2) : http://eebo.chadwyck.com/downloadtiff?vid=$1&page=$2 (1), https://raw.githubusercontent.com/textcreationpartnership/Texts/master/tcpchars.xml#$1 (1)|
|20.|__projectDesc__|1||
|21.|__pubPlace__|2||
|22.|__publicationStmt__|2||
|23.|__publisher__|2||
|24.|__ref__|2| @__target__ (2) : https://creativecommons.org/publicdomain/zero/1.0/ (1), http://www.textcreationpartnership.org/docs/. (1)|
|25.|__seriesStmt__|1||
|26.|__sourceDesc__|1||
|27.|__term__|2||
|28.|__textClass__|1||
|29.|__title__|3||
|30.|__titleStmt__|2||

###Text Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__closer__|2||
|2.|__desc__|2||
|3.|__div__|65| @__type__ (65) : title_page (1), dedication (2), text (1), part (3), list_of_examples (2), list_of_pamphlets (14), item (42)|
|4.|__g__|302| @__ref__ (302) : char:EOLhyphen (297), char:punc (4), char:EOLunhyphen (1)|
|5.|__gap__|2| @__reason__ (2) : illegible: blotted (1), illegible (1)  •  @__resp__ (2) : #TECH (2)  •  @__extent__ (2) : 1 word (1), 1 letter (1)|
|6.|__head__|65| @__type__ (1) : sub (1)|
|7.|__hi__|1410| @__rend__ (3) : sup (3)|
|8.|__note__|130| @__place__ (130) : margin (130)  •  @__n__ (2) : a (1), b (1)|
|9.|__opener__|1||
|10.|__p__|190||
|11.|__pb__|49| @__facs__ (49) : tcp:66483:1 (1), tcp:66483:2 (2), tcp:66483:3 (2), tcp:66483:4 (2), tcp:66483:5 (2), tcp:66483:6 (2), tcp:66483:7 (2), tcp:66483:8 (2), tcp:66483:9 (2), tcp:66483:10 (2), tcp:66483:11 (2), tcp:66483:12 (2), tcp:66483:13 (2), tcp:66483:14 (2), tcp:66483:15 (2), tcp:66483:16 (2), tcp:66483:17 (2), tcp:66483:18 (2), tcp:66483:19 (2), tcp:66483:20 (2), tcp:66483:21 (2), tcp:66483:22 (2), tcp:66483:23 (2), tcp:66483:24 (2), tcp:66483:25 (2)  •  @__rendition__ (1) : simple:additions (1)  •  @__n__ (33) : 1 (1), 2 (1), 3 (1), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1), 9 (1), 10 (1), 11 (1), 12 (1), 13 (1), 14 (1), 15 (1), 16 (1), 17 (1), 18 (1), 19 (1), 20 (1), 21 (1), 22 (1), 23 (1), 24 (1), 25 (1), 26 (1), 27 (1), 28 (1), 29 (1), 30 (1), 31 (1), 32 (1), 33 (1)|
|12.|__salute__|1||
|13.|__seg__|3| @__rend__ (3) : decorInit (3)|
|14.|__signed__|2||
|15.|__trailer__|1||


text:
CArL-Storm - the Computer ARithmetic and Logic library for the probabilistic model checker Storm
============================================

[![Build Status](https://github.com/moves-rwth/carl-storm/workflows/Build%20Test/badge.svg)](https://github.com/moves-rwth/carl-storm/actions)
[![GitHub release](https://img.shields.io/github/release/moves-rwth/carl-storm.svg)](https://github.com/moves-rwth/carl-storm/releases/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7775120.svg)](https://doi.org/10.5281/zenodo.7775120)

This is the README for CArL-Storm - the Computer ARithmetic and Logic library for the probabilistic model checker [Storm](https://www.stormchecker.org/).
CArL-Storm is based on the [Carl](https://github.com/ths-rwth/carl/) library.

repository: moves-rwth/carl-storm

gha_license_id: NOASSERTION

repo_name: moves-rwth/carl-storm


text:
# bit

**The [b]ermuda [i]nformation [t]riangle is a git-based tool for the management of code and data.**

It uses git for code versioning and ownCloud for storing and exchanging data. It avoids the costs of data versioning by logging changes in the data storage platform on github.

It is primarly made for multiple users working on the same projects on an HPC cluster but it can be easely used on local/cloud/non-HPC machines without changes to the code.

Data is transfered over curl to avoid the risks of mounted drives and the need for ftp access.

Everytime data is uploaded to ownClowd, the upload is registered on the respective wiki on github together with an hyperlink to the respective folder.

###### Concept

```
                          >links-to-data>
customer <<<<<<< github ------------------- ownCloud >>>>>>> customer
                       \                   /
                   code \                 /
              versioning \      bit      / data upload
                       &  \             / & download
          data upload logs \           /
                            \         /
                             HPC/local
```

###### Structure

**bit** enforces you to keep a clean house. It's based on structured folders and won't work without it.

Model:

```
/file_system_a
    |
    '- data
        |
        '- projects
            |
            |- Company_A
            |   |
            |   |- CA_project_y
            |   |
            |   '- CA_project_x
            |       |
            |       |- results
            |       |- models
            |       |- scripts
            |       |- tmp
            |       |- slurm_logs
            |       '- wiki
            |
            '- Company_B
                |
                '- CB_project_n
```

The labels are irrelevant as long as the projects/company_y/project_x structure is kept constant.

#### Example usage

```bash

bit -i file.tar.bz2 -m my first upload
```

#### Installation

###### pip

If you have pip installed you can get the current pip version over pip:

```bash
pip install --user AGEpy
```

Check out the [AGEpy](https://github.com/mpg-age-bioinformatics/AGEpy) page for alternate installations.

Once you have **bit** on your path you should run `bit --config` to generate a config file.

#### Options

```
usage: bit [-h] [-i [INPUT [INPUT ...]]] [-s SUBFOLDER]
           [-m [MESSAGE [MESSAGE ...]]] [-d PICK_A_DATE] [-c] [-g]
           [-t DAYS_TO_SHARE] [--scripts] [--start START]
           [--stdfolders [STDFOLDERS [STDFOLDERS ...]]] [--adduser] [--gitssh]
           [--config]

bit, [b]ermunda [i]nformation [t]riangle. bit is a git-based tool for the
management of code and data. It uses git for code versioning and ownCloud
for storing and exchanging data. It saves storage by avoiding versioning
of data while logging changes in associated git wikis.

optional arguments:
  -h, --help            show this help message and exit
  -i [INPUT [INPUT ...]], --input [INPUT [INPUT ...]]
                        Input files (default: None)
  -s SUBFOLDER, --subfolder SUBFOLDER
                        Subfolder to be created. (default: None)
  -m [MESSAGE [MESSAGE ...]], --message [MESSAGE [MESSAGE ...]]
                        Message to write on log file. (default: None)
  -d PICK_A_DATE, --pick_a_date PICK_A_DATE
                        Pick an existing date folder to transfer data to/from.
                        Format=YYYY-MM-DD (default: None)
  -c, --create_folder   Create dropbox folder for user to upload data.
                        (default: False)
  -g, --getfolder       Downloads a folder as zip file. Requires
                        --pick_a_date. Defaults --base_folder=upload:download
                        to download (default: False)
  -t DAYS_TO_SHARE, --days_to_share DAYS_TO_SHARE
                        Number of days you wish to share this folder further.
                        (default: 21)
  --scripts             Needs -i and -m. Simultaneously sync the scripts.user
                        folder when uploading data. (default: False)
  --start START         Project name of the format. PI_PROJECT_NAME. Initiates
                        a project. This will create the required local folders
                        and respective git repositories. (default: None)
  --stdfolders [STDFOLDERS [STDFOLDERS ...]]
                        Folders to be created in addition to scripts.user and
                        and wiki.user when a project is started. (default:
                        ['tmp', 'slurm_logs'])
  --adduser             Add a user to a project creating his scripts.user and
                        wiki.user folder (default: False)
  --gitssh              Use your git SSH keys. (default: False)
  --config              Generate a config file. (default: False)

```

#### Dependencies

**[git](https://git-scm.com)**, **[curl](https://curl.haxx.se)**, and our own fork of ownCloud's **[pyocclient](https://github.com/mpg-age-bioinformatics/pyocclient)** which gets installed through the AGEpy package.

#### Code

The source code is kept [here](https://github.com/mpg-age-bioinformatics/AGEpy/blob/master/bin/bit).


text:
---
description: Learn how to get involved with the Meltano community.
---

# Community

We aim to build Meltano with the support of the community and we want everyone to feel included.

## Guidelines

### Code of Conduct

Everyone interacting in Slack, codebases, issue trackers, mailing lists, events, or other Meltano activities is expected to follow [this code of conduct][psfconduct]. If you are unable to abide by the code of conduct set forth here, we encourage you not to participate in the community. If you see a violation please notify us by messaging `@Amanda Folson` on Slack.

**Note:** We previously adopted the [PyPA Code of Conduct][conduct] but as of [PEP 609][pep609] PyPA uses the [PSF Code of Conduct][psfconduct].

### Contributor Guide

We welcome contributions to the project! Please review our [Contributor Guide](/docs/contributor-guide.html) on how to contribute.

## Demo Days

We have Demo Days **every other week on Thursday at 9 AM Pacific** (16:00 UTC). Join us on Zoom to share and hear updates from community members and the Meltano team about how they've been using Meltano. We also have the #demo-day Slack channel for planning and discussion.

Use [this link][gcal] to view the full events calendar. View past Demo Days in our [YouTube Playlist][demodayplaylist].

### Guidelines

We aim to have Demo Day primarily as a way to have community members showcase the work they've been doing, whether it's related to Meltano or not.
As such, we will limit the number of vendors presenting to a maximum of 1 per Demo Day.

We will prioritize vendors that don't have a strong overlap with the core capabilities of Meltano.
Ideally, a vendor would be able to share how their product could be compatible with Meltano or with one of the open source plugins detailed in the MeltanoHub.

## Office Hours

We have Office Hours weekly on **Wednesdays at 9 AM Pacific (16:00 UTC)**. Join us on Zoom and bring any questions you have to the team. There is often a short presentation of recent and upcoming updates from the core team, but otherwise this is your time to chat with us and get help on any topics you would like.

Use [this link][gcal] to view the events calendar or check the [`#office-hours` channel](https://meltano.slack.com/archives/C01QS0RV78D) in the <SlackChannelLink>Meltano Slack workspace<OutboundLink /></SlackChannelLink> for weekly discussion topics and agenda updates. Prior to each weekly session, we share the Zoom link in Slack and the YouTube live stream link via social media (Twitter).

View past office hours in our [YouTube Playlist][officehoursplaylist].

## Slack

Join the <SlackChannelLink>Meltano Slack workspace<OutboundLink /></SlackChannelLink>, which is frequented by the core team and over 1000 community members. You can ask any questions you may have in here, or just chat with fellow users.

[conduct]: https://www.pypa.io/en/latest/code-of-conduct/
[pep609]: https://www.python.org/dev/peps/pep-0609/
[psfconduct]: https://www.python.org/psf/conduct/
[officehoursplaylist]: https://www.youtube.com/playlist?list=PLO0YrxtDbWAtuuubcEz7mnCHoGfIf8voT
[demodayplaylist]: https://www.youtube.com/playlist?list=PLO0YrxtDbWAuLRElrtwFI5PwlAEMUi0AD
[gcal]: https://calendar.google.com/calendar/embed?src=c_01cj48ha4h199ctjefi85t9dgc%40group.calendar.google.com

### Channels

We have a number of channels which we use on a regular basis to communicate and share information with the community.

#### #announcements

This is for posts from the Core Team to the wider community. Here we will share exciting news, upcoming events, new releases, and other relevant information.

##### @Channel usage

We will use `@channel` no more than three times per week and aim to use it a maximum of once per day.

#### Other Useful Channels

This is not an exhaustive list and we encourage you to join the <SlackChannelLink>Meltano Slack workspace<OutboundLink /></SlackChannelLink> to discover more!

Meltano:

* #contributing - if you want to contribute to Meltano itself
* #hub - all about [MeltanoHub](https://hub.meltano.com)
* #plugins-dbt - all things [dbt](https://meltano.com/docs/transforms.html)
* #plugins-general - discussion for any other plugins

Support:

* #best-practices - for learning tips on how others are using Meltano and other data products
* #getting-started - if you need some help [getting up and running with Meltano](https://meltano.com/docs/getting-started.html)
* #troubleshooting - if you get a weird stack trace and need some help

Community Events:

* #demo-day - where we plan and organize [Demo Day](https://meltano.com/docs/community.html#demo-days)
* #office-hours - where we plan and organize weekly [Office Hours](https://meltano.com/docs/community.html#office-hours)

Singer Related:

* #singer-batch-messages - discussion around [Fast Sync](https://gitlab.com/meltano/meltano/-/issues/2364)
* #singer-tap-development - discussion around building taps with the [Meltano SDK](https://sdk.meltano.com)
* #singer-taps - discussion around specific Singer taps
* #singer-target-development - discussion around building targets with the [Meltano SDK](https://sdk.meltano.com), including "SaaS Targets", Reverse ETL, and Operational Analytics use cases

#### Channel Bookmarks

We use Slack's [channel bookmarks](https://slack.com/blog/productivity/whats-new-in-slack-simplified-search-channel-bookmarks) feature to add relevant links for a specific channel.

Our general guidance for bookmarks are:

* Approximately 3 links max for a channel. Don't clutter and make the links feel noisy
* Relevant to the channel topic i.e. linking to MeltanoHub for #hub and to Meltano SDK for #sdk
* Regularly review the link if it's to the "latest" version of something i.e. blog post, release, etc.

repository: forestlzj/meltano

repo_name: forestlzj/meltano


text:
# Basic JavaScript: Use Multiple Conditional (Ternary) Operators

In the previous challenge, you used a single conditional operator.You can also chain them together to check for multiple conditions.

The following function uses if, else if, and else statements to check multiple conditions:

```
function findGreaterOrEqual(a, b) {
  if (a === b) {
    return "a and b are equal";
  }
  else if (a > b) {
    return "a is greater";
  }
  else {
    return "b is greater";
  }
}
```

The above function can be re-written using multiple conditional operators:

```
function findGreaterOrEqual(a, b) {
  return (a === b) ? "a and b are equal"
    : (a > b) ? "a is greater"
    : "b is greater";
}
```

path: /Basic Javascript/Use Multiple Conditional (Ternary) Operators/README.md


text:
# WordPress Crossplane Workload on GCP

Deploy WordPress application as a Workload into a dynamically provisioned Kubernetes cluster on GKE,
and backed by dynamically provisioned MySQL (CloudSQL) using Crossplane deployed on Minikube cluster

## Requirements
- Minikube `v0.29.0+`
- A GCP account with administrator (or owner) level privileges.
- (Optional) `gcloud` command-line tool

## Install Crossplane

Install Crossplane in a Minikube cluster first, for example with the following `helm` command after setting your preferred values for `image.repository` and `image.tag` in the `values.yaml` file:

```bash
helm install --name crossplane --namespace crossplane-system ${GOPATH}/src/github.com/crossplaneio/crossplane/cluster/charts/crossplane
```

## GCP Setup
Per requirements section, for this demo we must have a Google Cloud service account key in `json` format, which
corresponds to an active/valid GCP Service Account and has been granted the following roles:
- `Service Account User`: needed to have access to the service account information
- `Cloud SQL Admin`: needed to access (create/retrieve/connect/delete) CloudSQL instances
- `Kubernetes Engine User`: needed to access (create/connect/delete) GKE instances

Create a GCP demo project which we will use to host our demo GKE cluster, as well as, our demo CloudSQL instance.

- Login into [GCP Console](https://console.cloud.google.com)
- Create a new project (either stand alone or under existing organization)
- Create Demo Service Account
    - Navigate to: [Create Service Account](https://console.cloud.google.com/iam-admin/serviceaccounts)
    - `Service Account Name`: type "demo"
    - `Service Account ID`: leave auto assigned
    - `Service Account Description`: type "Crossplane demo"
    - Hit `Create` button
        - This should advance to the next section `2 Grant this service account to project (optional)`
    - We will assign this account 3 roles:
        - `Service Account User`
        - `Cloud SQL Admin`
        - `Kubernetes Engine Admin`
    - Hit `Create` button
        - This should advance to the next section `3 Grant users access to this service account (optinoal)`
    - We don't need to assign any user or admin roles to this account for the demo purposes, so you can leave following two fields blank:
        - `Service account users role`
        - `Service account admins role`
    - Next, we will create and export service account key
        - Hit `+ Create Key` button.
            - This should open a `Create Key` side panel
        - Select `json` for the Key type (should be selected by default)
        - Hit `Create`
            - This should show `Private key saved to your computer` confirmation dialog
            - You also should see `crossplane-demo-1234-[suffix].json` file in your browser's Download directory
            - Save (copy or move) this file into demo (this) directory, with new name `key.json`
- Enable `Cloud SQL API`
    - Navigate to [Cloud SQL Admin API](https://console.developers.google.com/apis/api/sqladmin.googleapis.com/overview)
    - Hit `Enable`
- Enable `Kubernetes Engine API`
    - Navigate to [Kubernetes Engine API](https://console.developers.google.com/apis/api/container.googleapis.com/overview)
    - Hit `Enable`

If you have `gcloud` utility, you can ran following commands from the demo directory

```bash
# list your organizations (if applicable)
gcloud organizations list

# create a new project
export DEMO_PROJECT_NAME=crossplane-demo-123
gcloud projects create $DEMO_PROJECT_NAME --enable-cloud-apis [--organization ORANIZATION_ID]

# record the PROJECT_ID value of the newly created project
export DEMO_PROJECT_ID=$(gcloud projects list --filter NAME=$DEMO_PROJECT_NAME --format="value(PROJECT_ID)")

# enable Kubernetes API
gcloud --project $DEMO_PROJECT_ID services enable container.googleapis.com
# enable CloudSQL API
gcloud --project $DEMO_PROJECT_ID services enable sqladmin.googleapis.com

# create service account
gcloud --project $DEMO_PROJECT_ID iam service-accounts create demo-123 --display-name "Crossplane Demo"
# export service account email
export<EMAIL_ADDRESS>
# create service account key (this will create a `key.json` file in your current working directory)
gcloud --project $DEMO_PROJECT_ID iam service-accounts keys create --iam-account $DEMO_SA key.json

# assign roles
gcloud projects add-iam-policy-binding $DEMO_PROJECT_ID --member "serviceAccount:$DEMO_SA" --role="roles/iam.serviceAccountUser"
gcloud projects add-iam-policy-binding $DEMO_PROJECT_ID --member "serviceAccount:$DEMO_SA" --role="roles/cloudsql.admin"
gcloud projects add-iam-policy-binding $DEMO_PROJECT_ID --member "serviceAccount:$DEMO_SA" --role="roles/container.admin"
```

### Enable Billing
In order to create GKE clusters you must enable Billing.
- Go to [GCP Console](https://console.cloud.google.com)
    - Select demo project
    - Hit "Enable Billing"
- Go to [Kubernetes Clusters](https://console.cloud.google.com/kubernetes/list)
    - Hit "Enable Billing"

## WordPress Example
In the course of this demonstration we will show how to prepare and provision a sample application: WordPress which
uses MySQL backend database.

We will use local (`minikube`) Kubernetes cluster to host `Crossplane` (`Crossplane cluster`)

To demonstrate `Crossplane` concept of `separation of concerns` during this demo we will assume two identities:
1. Administrator (cluster or cloud) - responsible for setting up credentials and defining resource classes
2. Application Owner (developer) - responsible for defining and deploying application and its dependencies

### As Administrator
you will perform following tasks:

- Create Cloud provider credentials
- Define Resource classes
- Create a target Kubernetes cluster (using dynamic provisioning with the cluster resource class)

**Note**: all artifacts created by the administrator are stored/hosted in the `crossplane-system` namespace, which has
a restricted access, i.e. `Application Owner(s)` do not have access to them.

For the next steps, make sure your `kubectl` context points to the `Crossplane` cluster

- Export Project ID

    **NOTE** you can skip this step if you generated GCP Service Account using `gcloud`
    ```bash
    export DEMO_PROJECT_ID=[your-demo-project-id]
    ```

- Patch and Apply `provider.yaml`:
    ```bash
    sed "s/BASE64ENCODED_CREDS/`cat key.json|base64 | tr -d '\n'`/g;s/DEMO_PROJECT_ID/$DEMO_PROJECT_ID/g" cluster/examples/workloads/wordpress-gcp/provider.yaml | kubectl create -f -
    ```

    - Verify that GCP Provider is in READY state
        ```bash
        kubectl -n crossplane-system get providers.gcp.crossplane.io -o custom-columns=NAME:.metadata.name,STATUS:.status.Conditions[0].Type,PROJECT-ID:.spec.projectID
        ```
        Your output should look similar to:
        ```bash
        NAME           STATUS   PROJECT-ID
        gcp-provider   Ready    [your-project-id]
        ```

    - Verify that Resource Classes have been created
        ```bash
        kubectl -n crossplane-system get resourceclass -o custom-columns=NAME:metadata.name,PROVISIONER:.provisioner,PROVIDER:.providerRef.name,RECLAIM-POLICY:.reclaimPolicy
        ```
        Your output should be:
        ```bash
        NAME               PROVISIONER                                            PROVIDER       RECLAIM-POLICY
        standard-cluster   gkecluster.compute.gcp.crossplane.io/v1alpha1          gcp-provider   Delete
        standard-mysql     cloudsqlinstance.database.gcp.crossplane.io/v1alpha1   gcp-provider   Delete
        ```
- Create a target Kubernetes cluster where `Application Owner(s)` will deploy their `WorkLoad(s)`

    As administrator, you will create a Kubernetes cluster leveraging existing Kubernetes cluster `ResourceClass` and
    `Crossplane` Kubernetes cluster dynamic provisioning.
    ```bash
    kubectl apply -f cluster/examples/workloads/wordpress-gcp/kubernetes.yaml
    ```

    - Verify that Kubernetes Cluster resource was created
        ```bash
        kubectl -n crossplane-system get kubernetescluster -o custom-columns=NAME:.metadata.name,CLUSTERCLASS:.spec.classReference.name,CLUSTERREF:.spec.resourceName.name
        ```

        Your output should look similar to:
        ```bash
        NAME               CLUSTERCLASS       CLUSTERREF
        demo-gke-cluster   standard-cluster   gke-67419e79-f5b3-11e8-9cec-9cb6d08bde99
        ```

    - Verify that Target GKE cluster was successfully created
        ```bash
        kubectl -n crossplane-system get gkecluster -o custom-columns=NAME:.metadata.name,STATE:.status.state,CLUSTERNAME:.status.clusterName,ENDPOINT:.status.endpoint,LOCATION:.spec.zone,CLUSTERCLASS:.spec.classRef.name,RECLAIMPOLICY:.spec.reclaimPolicy
        ```

        Your output should look similar to:
        ```bash
        NAME                                       STATE     CLUSTERNAME                                ENDPOINT        LOCATION        CLUSTERCLASS       RECLAIMPOLICY
        gke-67419e79-f5b3-11e8-9cec-9cb6d08bde99   RUNNING   gke-6742fe8d-f5b3-11e8-9cec-9cb6d08bde99   <IP_ADDRESS>   us-central1-a   standard-cluster   Delete
        ```

To recap, as administrator user, you have:
- Defined a `Provider` with Google Service Account credentials
- Defined `ResourceClasses` for `KubernetesCluster` and `CloudSQLInstance`
- Provisioned (dynamically) a GKE Cluster using the `ResourceClass`

### As Application Owner
you will perform following tasks

- Define Workload in terms of Resources and Payload (Deployment/Service) which will be deployed onto a Target Kubernetes Cluster
- Define dependency resource requirements, in this case `MySQL` database

#### MySQL
First, let's take a look at the dependency resource
```yaml
## WordPress MySQL Database Instance
apiVersion: storage.crossplane.io/v1alpha1
kind: MySQLInstance
metadata:
  name: demo
  namespace: default
spec:
  classReference:
    name: standard-mysql
    namespace: crossplane-system
  engineVersion: "5.7"
```

This will request to create a `MySQLInstance` version 5.7, which will be fulfilled by the `standard-mysql` ResourceClass.

Note, the Application Owner is not aware of any further specifics when it comes down to `MySQLInstance` beyond the engine version.

#### Workload
```yaml
## WordPress Workload
apiVersion: compute.crossplane.io/v1alpha1
kind: Workload
metadata:
  name: demo
  namespace: default
spec:
  resources:
  - name: demo
    secretName: demo
  targetCluster:
    name: demo-gke-cluster
    namespace: crossplane-system
  targetDeployment:
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: wordpress
      labels:
        app: wordpress
    spec:
      selector:
        app: wordpress
      strategy:
        type: Recreate
      template:
        metadata:
          labels:
            app: wordpress
        spec:
          containers:
            - name: wordpress
              image: wordpress:4.6.1-apache
              env:
                - name: WORDPRESS_DB_HOST
                  valueFrom:
                    secretKeyRef:
                      name: demo
                      key: endpoint
                - name: WORDPRESS_DB_USER
                  valueFrom:
                    secretKeyRef:
                      name: demo
                      key: username
                - name: WORDPRESS_DB_PASSWORD
                  valueFrom:
                    secretKeyRef:
                      name: demo
                      key: password
              ports:
                - containerPort: 80
                  name: wordpress
  targetNamespace: demo
  targetService:
    apiVersion: v1
    kind: Service
    metadata:
      name: wordpress
    spec:
      ports:
        - port: 80
      selector:
        app: wordpress
      type: LoadBalancer
```

The `Workload` definition spawns multiple constructs and kubernetes object.
- Resources: list of the resources required by the payload application.
- TargetCluster: the cluster where the payload application and all its requirements should be deployed.
- TargetNamespace: the namespace on the target cluster
- Workload Payload:
    - TargetDeployment
    - TargetService

- Deploy workload
    ```bash
    kubectl apply -f cluster/examples/workloads/wordpress-gcp/workload.yaml
    ```
- Wait for `MySQLInstance` to be in `Bound` State

    You can check the status via:
    ```bash
    kubectl get mysqlinstance -o custom-columns=NAME:.metadata.name,VERSION:.spec.engineVersion,STATE:.status.bindingPhase,CLASS:.spec.classReference.name
    ```
    Your output should look like:
    ```bash
    NAME   VERSION   STATE   CLASS
    demo   5.7       Bound   standard-mysql
    ```

    **Note**: to check on the concrete resource type status as `Administrator` you can run:
    ```bash
    kubectl -n crossplane-system get cloudsqlinstance -o custom-columns=NAME:.metadata.name,STATUS:.status.state,CLASS:.spec.classRef.name,VERSION:.spec.databaseVersion
    ```
    Your output should be similar to:
    ```bash
    NAME                                         STATUS     CLASS            VERSION
    mysql-2fea0d8e-f5bb-11e8-9cec-9cb6d08bde99   RUNNABLE   standard-mysql   MYSQL_5_7
    ```

- Wait for `Workload` External IP Address
    ```bash
    kubectl get workload -o custom-columns=NAME:.metadata.name,CLUSTER:.spec.targetCluster.name,NAMESPACE:.spec.targetNamespace,DEPLOYMENT:.spec.targetDeployment.metadata.name,SERVICE-EXTERNAL-IP:.status.service.loadBalancer.ingress[0].ip
    ```
    **Note** the `Workload` is defined in Application Owner's (`default`) namespace

    Your output should look similar to:
    ```bash
    NAME   CLUSTER            NAMESPACE   DEPLOYMENT   SERVICE-EXTERNAL-IP
    demo   demo-gke-cluster   demo        wordpress    <IP_ADDRESS>
    ```

- Verify that `WordPress` service is accessible via `SERVICE-EXTERNAL-IP` by:
    - Navigate in your browser to `SERVICE-EXTERNAL-IP`

## Clean Up

- Remove `Workload`
```bash
kubectl delete -f cluster/examples/workloads/wordpress-gcp/workload.yaml
```

- Remove `KubernetesCluster`
```bash
kubectl delete -f cluster/examples/workloads/wordpress-gcp/kubernetes.yaml
```

- Remove GCP Provider and ResourceClasses
```bash
kubectl delete -f cluster/examples/workloads/wordpress-gcp/provider.yaml
```

- Delete Google Project
```bash
# list all your projects
gcloud projects list

# delete demo project
gcloud projects delete [demo-project-id
```

repository: fossabot/crossplane

repo_name: fossabot/crossplane


text:
### Overview

fur runs on [Node.js][nodejs_url] and is available as an [NPM][npm_url] package.

### Installing Node.js

If you don't have Node.js, download one from [Node.js official page][nodejs_download_url], or use [nvm][nvm_url] to manage multiple version.

fur works on node version 0.10.3 or later.

___

### Installing fur via NPM

Install fur from [NPM][npm_url] with npm command.

```bash
# Install fur commandline interface.
$ npm install fur -g
```

With `-g` option, npm installs the module globally and you can run fur simply by `fur` from anywhere.
(It may need to be run via `sudo`)

Show the fur version to check install is successfully.
The latest version `2.0.2` will be shown unless you specified older.

```bash
# Show fur version.
$ fur --version
```

If you do not want do it globally, install it local and use [programmatic API][tutorial_04_using_programmatic_a_p_i_url].

___

### See Also

<!-- See also start -->

<!-- See also end -->

### Links

+ [Node.js][nodejs_url]
+ [NPM][npm_url]
+ [nvm][nvm_url]
+ [fur @ npm][my_npm_url]

### Tutorials

<!-- Tutorials start -->

+ [01 - Installing fur][tutorial_01_installing_fur_url]

<!-- Tutorials end -->

<!-- URLs start -->

[nodejs_url]: http://nodejs.org/
[nodejs_download_url]: https://nodejs.org/download/
[npm_url]: https://www.npmjs.com/
[nvm_url]: https://github.com/creationix/nvm
[my_npm_url]: http://www.npmjs.org/package/fur
[my_apiguide_url]: http://okunishinishi.github.io/fur/apiguide/
[tutorial_01_installing_fur_url]: 01%20-%20Installing%20fur.md

<!-- URLs end -->

path: /docs/tutorial/01 - Installing fur.md

filename: 01 - Installing fur.md


text:
[![Build Status](https://travis-ci.org/denmarkmeralpis/globelabs_sms_logger.svg?branch=master)](https://travis-ci.org/denmarkmeralpis/globelabs_sms_logger)
[![Test Coverage](https://api.codeclimate.com/v1/badges/26978dbc15878f486bd6/test_coverage)](https://codeclimate.com/github/denmarkmeralpis/globelabs_sms_logger/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/26978dbc15878f486bd6/maintainability)](https://codeclimate.com/github/denmarkmeralpis/globelabs_sms_logger/maintainability)
# Globe Labs Sms Logger

It's a simple logger which consumes the Globelabs SMS Dashboard API(See Globelabs SMS Dasbhoard).

## Requirements

    Ruby 2.x.x

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'globelabs_sms_logger'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install globelabs_sms_logger

Then generate initializer:

    $ rails g globelabs_sms_logger:install initializer

then edit the file `config/initializers/globelabs_sms_logger.rb`

## Usage

Construct a `GlobelabsSms::Logger` object and use the `#send` method to send a request to Globelabs Dashboard. Example:

```ruby
require 'globelabs_sms_logger'

logger = GlobelabsSms::Logger.new
logger.send(address: '917XXXXXXX', content: 'Cheers!')

# You can also speicfy the api_token & app_identifier as args
# Example:
logger = GlobelabsSms::Logger.new(api_token: ENV['API_TOKEN']', identifier: ENV['IDENTIFIER'])
logger.send(address: '917XXXXXXX', content: 'Hello!')
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/denmarkmeralpis/globelabs_sms_logger. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## Code of Conduct

Everyone interacting in the GlobelabsSmsLogger project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/denmarkmeralpis/globelabs_sms_logger/blob/master/CODE_OF_CONDUCT.md).

gha_language: Ruby


text:
---
title: 'Lessons from a first-year seminar'
date: '2014-02-10'
categories: [ 'teaching' ]
tags: [ 'liberal arts' ]
widgets :
  sagecell :
    enable : false
  springy :
    enable : false
---

Last term, I had the opportunity to run an interdisciplinary first-year seminar as part of Carleton's [A&I][AnI] program.
The course I designed, “The Mathematics of Democracy”, focused on topics at the intersection of mathematics and political theory: social choice (the theory of voting mechanisms), representative apportionment, fair division, and such.
Running this course was an incredibly rewarding experience for me, and generally seemed to be a positive one for my students as well.

Here's the nuts and bolts of how I planned the course, what I did during the term, and what I learned about how to make these courses successful (and how not to!).

### Design goals
Carleton's A&I program has an established list of “required elements” for all the seminars which broadly focus on introducing students to the themes of liberal education and the skills they'll need to succeed as scholars.
As I designed my course, I distilled my own ambitions down to three “design goals” which would guide my decisions about what my assignments required, what content the course would cover, and what my students would take away.

#### Interdisciplinary content
The courses I usually teach are highly disciplinary, and most college freshmen have never seen a math course that wasn't part of the algebra-calculus track.
I wanted my course to be an opportunity for me and my students to try on new hats—political scientist, philosopher, historian, *humanist*—within a mathematical setting.

#### Scholarship training
First-year college students often have little formal training in the craft of scholarship.
They may have written a few high-school term papers, but few have done what we'd call *research*.
I wanted my course to expose students to the idea of scholarly research in the context of disciplinary thinking.

#### Interesting math
Of course, I am a mathematician, and this was a mathematics course!
I wanted my course to have substantial mathematical content and to show students that math is more than algebra.

### Daily course structure
I built the course around a textbook—Taylor and Pacelli's [Mathematics and Politics][mnp].
Each course meeting was built around a reading selected from the text.
Early in the term, I made these readings short, hoping to encourage deep discussions and analysis, but the students ended up just being bored; speeding things up re-energized the class dramatically.

#### Prep sheets
After completing each reading assignment, students were required to write a set of structured notes known as a “[prep sheet][prep]” (based on a similar system used by [Joel Weisberg][jweisber]).
This has five components:

* **Outline**: make an outline of the reading
* **Summarize**: write a short summary of each section of the reading
* **Question**: write down any questions that came to mind during the reading, *whether you answered them yourself or not*
* **Synthesize**: write a summary of the reading as a whole
* **Engage**: write for about ten minutes about “a broad or integrative question related to the reading”

I collected these and graded them on a three-point scale (excellent/adequate/insufficient).
Their primary purpose, though, was to focus students' thinking as they read through the material and to prepare them for class discussions.

I was consistently impressed with the quality of students' writing and analysis in these documents, so in this sense the prep sheets were a great success.
However, my students were frequently frustrated by what they saw as a busy-work requirement.
In future attempts at these sorts of courses, I'll need to revisit this question—**how do I get students to see the value of this preparatory work?**

#### Exercises
I also sometimes assigned exercises to accompany the reading.
These were far more popular than I expected!
Exercises helped students think about the mathematical content of the reading and identify points of confusion.
They also gave us something to talk about in class.

#### Class discussion and activities
My initial plan was for every meeting of the course to be based entirely on whole-class discussion.
Alas, this proved impractical.
I am not an experienced discussion leader, and my students weren't used to finding an hour worth of things to say about a math book.

Once it became evident that this wasn't going to work out, I started incorporating “preview activities” as frequently as I could design them.
These took a variety of forms, but were generally focused on exposing the *problems* that the next reading would investigate and solve.
The activities never fully replaced discussion, but they generally cut it down to thirty or forty minutes per meeting, which was a much more approachable length of time.

For example, before starting to read about procedures for apportioning seats in the U.S. House of Representatives, I handed out a table listing the populations of the States and asked students to come up with methods in pairs.
This took about twenty minutes; at the end, I tabulated the results, put them on the board, and asked the students to compare the outcome.
Once they started debating the relative merits of their different methods, they quickly realized that they were facing a hard problem, and this made the subsequent readings much more interesting and relevant.

#### Post-class follow-up
I did not use any post-class follow-up assignments in this course; I think this was a mistake.

### Major assignments
In addition to the daily work, the course had four major assignments: three essays and a final project.

#### Essay 1: Proof
The [first assignment][essay1] asked students to devise their own social choice procedure and then prove that it does or does not have each of five properties defined in the text.
This is a very standard type of mathematics assignment, but one students are unlikely to have seen in high school.
Thus, this assignment serves several purposes:

* It exposes students to the rhetorical standards of mathematics, and in particular to the standards of mathematics *that is not problem sets*.
* It asks students to engage critically with ideas they otherwise could just passively absorb.
* It introduces students to a world of scholarship where they may have to train themselves.

I gave students a bit of guidance about how to write proofs (both explicitly when handing out the assignment and implicitly when discussing the proofs in the text), but mostly I let the drafting process steer them.
Each student was required to prepare a draft of their procedure description and at least two proofs, then meet with the course's Writing Assistant (a senior undergraduate assigned to the course) to discuss these before submitting them to me.
I returned the drafts with feedback, then collected the final versions (with all five proofs) a week later.

This structure worked very well.
Devising mathematical structures and proving that they have properties is my job, so asking my students to do it was comfortable and natural.

#### Essay 2: History
The [second assignment][essay2] asked students to investigate the history of apportionment in the U.S. House of Representatives.
The method used to apportion seats has changed five times, each of which is discussed in brief in the course text.
Each student was asked to choose one of these five instances, investigate it in detail, and write up their findings with analysis.
The assignment required four cited sources, at least two of which needed to be primary historical documents.

Of course, I'm not a historian!
Asking my students to do academic history took the class way outside of my comfort zone.

Fortunately, I had fantastic help.
[Kristin Partlo][kpartlo], one of Carleton's library subject liasons, worked with me to design the assignment and put together a spectacular “[Gould Guide][libguide]” and in-class presentation which introduced students to the wealth of historical source material available.
With very limited guidance from me, my students succeeded in digging up Congressional debate records, texts of proposed bills, and other materials.

The reception of this assignment was quite mixed.
Many students were frustrated by the lack of structure, but the class as a whole rose to the challenge, and they evidently learned quite a lot about disciplinarity and scholarly research.
In future iterations of this course, I'll be sure to make my goals more explicit.

#### Essay 3: Op-Ed
The [third assignment][essay3] asked students to confront the central theme of the course—that, mathematically, any effort at democracy must be compromised.
They were required to select a “real-world democratic system” (defined broadly), then, in a long-form journalistic essay, explain the system, discuss its mathematical properties and the relevant results from the course, and argue that the system is or is not ideal in light of the compromises that must be made.

This was an unqualified success.
The papers evinced rich understanding of the mathematical theory of the course, and the students generally found the right timbre and level of technicality.
Moreover, it was clear that **the students had a lot of fun**; they wrote about topics ranging from TV talent shows to baseball's MVP process to Zimbabwean Presidential politics.

#### Final project
Finally, at the end of the term I had students pair off and study independently on special topics of their choosing (with a list of suggestions from me).
This process culminated in half-hour presentations to the class and expository papers submitted to me.

Before the presentations started, I spent some time in class talking about presentation strategies, slide design, and other related topics.
Additionally, I provided copies of the [rubric] I would use to score their presentations.
Additionally, each student was required to fill out a [self-evaluation][selfeval] for their own presentation and an [audience evaluation][audeval] for each other group.
This encouraged students to reflect on their own preparation and to pay attention to their peer's presentations.

The resulting presentations were generally quite good, with a few rough edges.
In future courses, I plan to require students to do a practice run of their talk for a friend (who will fill out an evaluation form I design); this should help prevent under-preparedness, which was the most common problem I saw.

### Lessons
So what did I learn about how to run a liberal-arts mathematics seminar?

#### Move quickly
Don't be afraid to maintain a brisk pace.
Your students signed up for your course, after all—clearly, they want to learn!
Of course, you may have to adjust your pace as you go, but, especially with freshmen, it's important not to drag out any one topic for too long.

#### Be responsive (but not too responsive)
This advice applies to pacing, of course, but there are many other areas of course design where it pays to pay attention to what your students want.
For example, part-way through the term, I discovered (to my surprise) that my students actually wanted *more* exercises!
Mid-term feedback forms are a great way to get this kind of information and to take the pulse of the class.

#### Explore disciplines
The most exciting parts of this course were the moments when we discovered ways that mathematics and other disciplines could inform each other.
With this subject, history, philosophy, political science, and sociology were all in play.
I'm far from an expert in any of these, but my students and I were able to work together to discover some fascinating connections.

#### Take advantage of human resources
I could never have assigned a history paper on my own and had any degree of success.
It was only possible through collaborations.
Conversations with Catherine Walden (an academic art historian at Carleton) helped me understand what historians do and what they expect their students to do.
[Kristin][kpartlo] in the library put together the resources my students needed to understand the historical source material and instructed them in their use.

#### Have fun
This process was an adventure!
I learned a lot about teaching, about disciplines outside mathematics, and about the mathematics of social choice.
This was an opportunity: to get outside my disciplinary comfort zone, to try new pedagogies and assignment structures, and to return to my academic roots in the liberal arts.
I can't wait to do it again.

[AnI]: //apps.carleton.edu/curricular/aiseminars/
[mnp]: //books.google.com/books?isbn=0387776435
[jweisber]: //www.people.carleton.edu/~jweisber/joelhome.html
[kpartlo]: //gouldguides.carleton.edu/kpartlo
[libguide]: //gouldguides.carleton.edu/content.php?pid=527128

[prep]: {{urls.media}}/ani/prepsheet.pdf
[essay1]: {{urls.media}}/ani/essay01.pdf
[essay2]: {{urls.media}}/ani/essay02.pdf
[essay3]: {{urls.media}}/ani/essay03.pdf
[rubric]: {{urls.media}}/ani/pres.rubric.pdf
[selfeval]: {{urls.media}}/ani/pres.selfeval.pdf
[audeval]: {{urls.media}}/ani/pres.audienceeval.pdf

repository: agdphd/personal-site

repo_name: agdphd/personal-site


text:
---
description: Teams may now register interest in entering teams in our upcoming SR2014
  competition
title: Entrance to SR2014 now open
---
Today we opened up registration for the current iteration of our competition, SR2014.
The rules for the game the robots will play will be announced at our Kickstart event at the beginning of October.
Teams will then have just over six months to construct their robots before the competition in April 2014.

If you have a team of 16-18 year-olds that you would like to enter for the competition,
 please fill out [this interest form]({{ site.baseurl }}/compete/) and we will get in touch with you as soon as we can.
Thanks to our [sponsors]({{ '/sponsor/' | prepend: site.baseurl }}), we can accept even more teams for this year's competition.

repository: srobo/website

gha_language: HTML

repo_name: srobo/website


text:
### Project Information:
Project: Activity Catalog Example
Description: The activity catalog displays a listing of common tasks to help users become more productive with Velocity topologies and services. This is one example of a single activity.
Category: template
Class: Community

Place customActivity.vamf and customActivity/* in /data/activities on a Velocity system running version 8.0 or higher. Navigate to Library/Activity Catalog to see the example card.
 ----

repository: Spirent/Velocity-assets

repo_name: Spirent/Velocity-assets