text:
#Keycodez

**Simple and quick keycodes map**

[Follow me on Twitter](http://twitter.com/andrewhathaway)

## Usage

First install [Keycodez via npm](https://www.npmjs.com/package/keycodez)

```bash
$ npm install keycodez --save
```

```javascript
var keyCodez = require('keycodez');

console.log(keyCodez[13]); // enter
```

## All Codes

Code | Key
--- | ---
3   | break
8   | backspaceDelete
9   | tab
12  | clear
13  | enter
16  | shift
17  | ctrl
18  | alt
19  | pauseBreak
20  | capsLock
27  | escape
32  | spacebar
33  | pageUp
34  | pageDown
35  | end
36  | home
37  | leftArrow
38  | upArrow
39  | rightArrow
40  | downArrow
41  | select
42  | print
43  | execute
44  | printScreen
45  | insert
46  | delete
48  | 0
49  | 1
50  | 2
51  | 3
52  | 4
53  | 5
54  | 6
55  | 7
56  | 8
57  | 9
65  | a
66  | b
67  | c
68  | d
69  | e
70  | f
71  | g
72  | h
73  | i
74  | j
75  | k
76  | l
77  | m
78  | n
79  | o
80  | p
81  | q
82  | r
83  | s
84  | t
85  | u
86  | v
87  | w
88  | x
89  | y
90  | z
91  | windowsKeyLeftCMD
92  | windowsKeyRight
93  | windowsKeyRightCMD
96  | numpad0
97  | numpad1
98  | numpad2
99  | numpad3
100 | numpad4
101 | numpad5
102 | numpad6
103 | numpad7
104 | numpad8
105 | numpad9
106 | multiply
107 | add
109 | subtract
110 | decimalPoint
111 | divide
112 | f1
113 | f2
114 | f3
115 | f4
116 | f5
117 | f6
118 | f7
119 | f8
120 | f9
121 | f10
122 | f11
123 | f12
124 | f13
125 | f14
126 | f15
127 | f16
128 | f17
129 | f18
130 | f19
144 | numLock
145 | scrollLock
173 | toggleMute
174 | decreaseVolume
175 | increaseVolume
181 | fireboxToggleMute
182 | firefoxDecreaseVolume
183 | firefoxIncreaseVolume
186 | semiColon
187 | equalSign
188 | comma
189 | dash
190 | period
191 | forwardSlash
192 | graveAccent
219 | openBracket
220 | backSlash
221 | closeBracket
222 | singleQuote
224 | firefoxCMD
225 | altgr
255 | toggleTouchpad

## License

MIT License (MIT)

Copyright (c) 2015 Andrew Hathaway, [https://github.com/andrewhathaway/Keycodez](https://github.com/andrewhathaway/Keycodez)

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

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

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

repository: andrewhathaway/Keycodez

repo_name: andrewhathaway/Keycodez


text:
BrowserDriver's development started as a project aiming to simplify writing and running automated UI tests in JavaScript and this is what it is mostly used for. It does not offer a complete set of testing tools but only the base infrastructure needed to allow automated or manual execution of JavaScript in one or more web browsers and communicating back the results. The specifics of running tests or just fiddling with a website are left off to test libraries or utilities. The environment is built in a very modular fashion and in fact even the browser is not a necessary component – anything that could connect to the server and impersonate a slave instance will be accepted.

![BrowserDriver structure](../resources/images/BD1.png)

Everything is written in JS so should be very easy for anyone, using BrowserDriver to test their JS code, to understand its inner details and suggest or implement extensions or fix bugs. It’s built around a central [server](The-server) which should be able on its own to fire up browser instances and load and run the necessary tests as specified in a configuration file and/or with command line arguments.

The server can run with default settings but this will hardly be useful and is at least inconvenient so it is strongly advised to write and use a [configuration file](Configuration-file) when starting the server:

    browser-driver configFileName="path/to/xxx.conf.json"

This will help with organizing the scripts in directories and will allow customizing the server.

The server is able to automatically start browsers and execute tests when upon start up. If browsers can not be launched by the server (if for example they need to run on another machine) they may be started manually and when directed to the slave capture url they will start executing scheduled tests right away. Tests can also be run interactively by the user from the [management console](Management-console).

## Writing tests

BrowserDriver does not impose a syntax for writing tests because it will not run them directly. To write a test one needs to stick with the rules of the selected testing library (currently the only one supported is QUnit). So a typical test could look like this:
```js
asyncTest("UI test", function (){
	expect(2);
	ok(true, "one successfull assertion");
	setTimeout(function (){
		ok(true, "another successfull assertion");
		start(); // finish this test
	}, 1000);
});
```
And in addition the test code can make use of all functionality that the environment provides on the [slave](Slaves).

When the script files become quite complex BrowserDriver allows frequently used, independed utility code to be put in separate reusable files. Tests then only need to mark their dependency on such libraries and the execution environment will make sure the libraries are loaded before dependent tests are run. If for example we had some useful code in the file util.js a test will request that file to be loaded like this:
```js
driver.loadLib("util"); // load this code library before executing the following tests
test("UI test", function (){
	someUtilityFunction(); // call a function from the util.js file included above
	ok(true, "one successfull assertion");
});
```

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive


text:
# wdiff-markdown/docker

A docker container for deploying the wdiff-markdown application

Usage
======

Build the container with `docker build -t 'adamarthurryan/wdiff-markdown'`.

Run the script `prepare.sh` from this folder.

To launch the application in development mode, run `../launch-devel.sh`.

To launch the application in production mode, run `../launch-prod.sh`.

repository: adamarthurryan/node-multisite-proxy

repo_name: adamarthurryan/node-multisite-proxy


text:
# v2.2 to 2.3

## Argo CD Notifications and ApplicationSet Are Bundled into Argo CD

The Argo CD Notifications and ApplicationSet are part of Argo CD now. You no longer need to install them separately.
The Notifications and ApplicationSet components are bundled into default Argo CD installation manifests.

The bundled manifests are drop-in replacements for the previous versions. If you are using Kustomize to bundle the manifests together then just
remove references to https://github.com/argoproj-labs/argocd-notifications and https://github.com/argoproj-labs/applicationset.

If you are using [the argocd-notifications helm chart](https://github.com/argoproj/argo-helm/tree/argocd-notifications-1.8.1/charts/argocd-notifications), you can move the chart [values](https://github.com/argoproj/argo-helm/blob/argocd-notifications-1.8.1/charts/argocd-notifications/values.yaml) to the `notifications` section of the argo-cd chart [values](https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/values.yaml#L2152). Although most values remain as is, for details please look up the values that are relevant to you.

No action is required if you are using `kubectl apply`.

## Configure Additional Argo CD Binaries

We have removed non-Linux Argo CD binaries (Darwin amd64 and Windows amd64) from the image ([#7668](https://github.com/argoproj/argo-cd/pull/7668)) and the associated download buttons in the help page in the UI.

Those removed binaries will still be included in the release assets and we made those configurable in [#7755](https://github.com/argoproj/argo-cd/pull/7755). You can add download buttons for other OS architectures by adding the following to your `argocd-cm` ConfigMap:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
data:
  help.download.linux-arm64: "path-or-url-to-download"
  help.download.darwin-amd64: "path-or-url-to-download"
  help.download.darwin-arm64: "path-or-url-to-download"
  help.download.windows-amd64: "path-or-url-to-download"
```

## Removed Python from the base image

If you are using a [Config Management Plugin](../config-management-plugins.md) that relies on Python, you
will need to build a custom image on the Argo CD base to install Python.

## Upgraded Kustomize Version

Note that bundled Kustomize version has been upgraded from 4.2.0 to 4.4.1.

## Upgraded Helm Version

Note that bundled Helm version has been upgraded from 3.7.1 to 3.8.0.

## Support for private repo SSH keys using the SHA-1 signature hash algorithm is removed in 2.3.7

Argo CD 2.3.7 upgraded its base image from Ubuntu 21.04 to Ubuntu 22.04, which upgraded OpenSSH to 8.9. OpenSSH starting
with 8.8 [dropped support for the `ssh-rsa` SHA-1 key signature algorithm](https://www.openssh.com/txt/release-8.8).

The signature algorithm is _not_ the same as the algorithm used when generating the key. There is no need to update
keys.

The signature algorithm is negotiated with the SSH server when the connection is being set up. The client offers its
list of accepted signature algorithms, and if the server has a match, the connection proceeds. For most SSH servers on
up-to-date git providers, acceptable algorithms other than `ssh-rsa` should be available.

Before upgrading to Argo CD 2.3.7, check whether your git provider(s) using SSH authentication support algorithms newer
than `rsa-ssh`.

1. Make sure your version of SSH >= 8.9 (the version used by Argo CD). If not, upgrade it before proceeding.

   ```shell
   ssh -V
   ```

   Example output: `OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022`

2. Once you have a recent version of OpenSSH, follow the directions from the [OpenSSH 8.8 release notes](https://www.openssh.com/txt/release-8.7):

   > To check whether a server is using the weak ssh-rsa public key
   > algorithm, for host authentication, try to connect to it after
   > removing the ssh-rsa algorithm from ssh(1)'s allowed list:
   >
   > ```shell
   > ssh -oHostKeyAlgorithms=-ssh-rsa user@host
   > ```
   >
   > If the host key verification fails and no other supported host key
   > types are available, the server software on that host should be
   > upgraded.

   If the server does not support an acceptable version, you will get an error similar to this;

   ```
   $ ssh -oHostKeyAlgorithms=-ssh-rsa vs-ssh.visualstudio.com
   Unable to negotiate with <IP_ADDRESS> port 22: no matching host key type found. Their offer: ssh-rsa
   ```

   This indicates that the server needs to update its supported key signature algorithms, and Argo CD will not connect
   to it.

### Workaround

The [OpenSSH 8.8 release notes](https://www.openssh.com/txt/release-8.8) describe a workaround if you cannot change the
server's key signature algorithms configuration.

> Incompatibility is more likely when connecting to older SSH
> implementations that have not been upgraded or have not closely tracked
> improvements in the SSH protocol. For these cases, it may be necessary
> to selectively re-enable RSA/SHA1 to allow connection and/or user
> authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms
> options. For example, the following stanza in ~/.ssh/config will enable
> RSA/SHA1 for host and user authentication for a single destination host:
>
> ```
> Host old-host
>     HostkeyAlgorithms +ssh-rsa
>     PubkeyAcceptedAlgorithms +ssh-rsa
> ```
>
> We recommend enabling RSA/SHA1 only as a stopgap measure until legacy
> implementations can be upgraded or reconfigured with another key type
> (such as ECDSA or Ed25519).

To apply this to Argo CD, you could create a ConfigMap with the desired ssh config file and then mount it at
`/home/argocd/.ssh/config`.

repository: argoproj/argo-cd

gha_language: Go

repo_name: argoproj/argo-cd


text:
# AWSM-CLI

Combines the power of Unix pipes and the official AWS `awscli` cli tool on the command line, plus more. Simply written in Bash.

`awsm-cli` is written and maintained by Stephen Chu (github@stephenchu.com).

Mailing list: https://groups.google.com/forum/#!forum/awsm-cli-users

## Basic Usage

```sh
# Find ec2 instances within all us-west-2 vpcs named 'production' alike:

$ awsm ec2 describe-vpcs -r us-west-2 | grep -w production | awsm ec2 describe-instances
Region     tag:Name  InstanceId           AvailabilityZone  InstanceType  State    PublicIpAddress  PrivateIpAddress  PrivateDnsName                              VpcId         ImageId       LaunchTime
us-west-2  Foo       i-015ef79784b536dbe  us-west-2a        r3.xlarge     running  n/a              <IP_ADDRESS>      ip-10-42-17-213.us-west-2.compute.internal  vpc-d85397bc  ami-1411c474  2016-08-24T20:39:01.000Z

# Count all the instance types of all us-west-2 EC2 instances:

$ awsm ec2 describe-instances -r us-west-2 | tail -n +2 | awk -F $'\t' '{ print $5 }' | sort | uniq -c
    14 c4.large
     3 c4.xlarge
     2 i2.2xlarge
     1 m3.2xlarge
```

## Installation

### Dependencies

First you will have to install these yourself, as different versions are available/supported on different Linux distros.

* [awscli](https://github.com/aws/aws-cli#installation) `>= 1.10.63`
* [jq](https://stedolan.github.io/jq/download/) `>= 1.6`
* [GNU awk](https://www.gnu.org/software/gawk/) `>= 4.1.1`
* [GNU parallel](https://www.gnu.org/software/parallel/) `>= 20160922`

Tip: Run `awsm _ dependencies-check` to ensure you have a working environment:

```sh
$ awsm _ dependencies-check
[INFO] Checking for dependencies used by awsm-cli...
[INFO] Your awscli is working properly.
[INFO] Your jq is working properly.
[INFO] Your GNU awk is working properly.
[INFO] Your GNU parallel is working properly.
[INFO] Summary: Awesome! All required dependencies are installed correctly. Enjoy awsm-cli!
```

### Bash

```sh
$ bash -c 'export DIR=$(mktemp --directory); cd $DIR && git clone --recursive https://github.com/stephenchu/awsm-cli.git .; mv files/* /usr/local/bin/'
```

For shell auto completion, [see AUTOCOMPLETE.md here](docs/AUTOCOMPLETE.md).

## Problems `awsm-cli` Aims to Solve Over the AWS Official `awscli`

### 1. Defaults to human-readable, line-based table format instead of JSON

JSON is great for machine-to-machine parseability and is reasonably humanly readable, but it becomes unreadable quickly when the amount of JSON text exceeds a few pages worth. Line-based, tabular format for each JSON entities allow compact information to be presented to human, at the expense of completeness, is more readable.

`awsm-cli` parses it for you and presents to you a readable, line-based table format.

### 2. Changing its default output format is still humanly unreadable

The `awscli` option `--output table` yields an ugly [table border](http://docs.aws.amazon.com/cli/latest/userguide/controlling-output.html#table-output). Using `--output text` yields a difficult-to-parse multi-line [textual output](http://docs.aws.amazon.com/cli/latest/userguide/controlling-output.html#text-output) as well.

With `awsm-cli`, you append `--jq '.'` (a "dot" means everything in [jq](https://stedolan.github.io/jq/tutorial/)) to swiftly change from tabular format to JSON format that the human-readable results are derived from, plus any JSON filtering/transforming you wish to alter your results using the [powerful features](https://stedolan.github.io/jq/manual/) of Jq:

```sh
$ awsm ec2 describe-instances -r us-west-2 --jq '[.] | map(select(.InstanceType == "t2.small"))'
```

Each line of output in `awsm-cli` is one entity. Plain simple and expected. But if you need to, displaying its representing JSON is only one command line option away.

### 3. Traversing AWS resource object graph involves repetitive conditional logic

Common Laborious Pattern:

```sh
vpc_ids=$(aws ec2 --region us-west-2 describe-vpcs --output text --query 'Vpcs[*].VpcId')
if [ ! -z "$vpc_ids" ]; then
  aws ec2 --region us-west-2 describe-instances ... --filters Name=vpc-id,Values=$(tr $'\t' ',' <<< "$vpc_ids")
else
  aws ec2 --region us-west-2 describe-instances ...
fi
```

Pattern Explained:

1. Find some AWS resource identifiers. Make sure you know your `--query` JSON hierachy. Store them in a variable.
1. Do a `if` condition check for the above variable, becuase you then need to conditionally put the `--filters` clause.
1. Conditionally execute your subsequent `awscli` command with the filtering clause containing (or not) your pre-fetched values (in CSV).
1.  Again remember your JSON hierarchy.

Now this example is a simple relationship of `VPC -> instances`. Try: `VPC -> subnets -> autoscaling groups -> instances`.

Instead, `awsm-cli` allows you to just do:

```sh
$ awsm ec2 describe-vpcs -r us-west-2 | awsm ec2 describe-instances
```

`awsm-cli` uses Unix pipes to intuitively traverse AWS resource relationships from one to another. You can even combine other command line tools that works with stdin/stdout (e.g. grep, sed, awk, etc.) to avoid writing complicated shell scripts to get what you want.

Unix pipes is simply the most intuitive and error-free way in command line to avoid writing shell scripts imperatively to get what you want.

## Features

* Uses Unix pipes to walk the AWS resources relationships
* All subcommands support option `--jq '.'` to change from textual outputs to their native JSON outputs via the more powerful JQ filters.
* All subcommands support printing the underlying native `awscli` executed commands via `--log-aws-cli`
* All subcommands support printing the underlying `jq` filter used via `--log-jq`
* All region-specific subcommands support displaying multiple regions' worth of data via `--region "us-west-1 us-west-2"`, something that takes multiple page loads on the AWS web console
* Nicely align any `awsm-cli` output using `column` by piping any stdout into `| awsm _ column`.
* Supports multi-column sort piping any stdout into `| awsm _ sort -k 2,2 -k 3,3`.

 See [AUTOSCOMPLETE.md](https://github.com/stephenchu/awsm-cli/blob/master/docs/AUTOCOMPLETE.md).

## How It Works

See [DESIGN.md](docs/DESIGN.md).

## Contribute

Yes, please, thank you! See [CONTRIBUTE.md](docs/CONTRIBUTE.md).

## About the Author

Stephen Chu<EMAIL_ADDRESS>
A software developer, who had done a little bit of Ruby, Python, Java, C#, JRuby, Bash, and he played a little with Rails, Postgres, MySql, Oracle, Terraform, Packer, Cassandra, Kafka, ZooKeeper, Docker, and AWS. He specializes in writing low maintenance-cost software.

repository: stephenchu/awsm-cli

gha_language: Shell

repo_name: stephenchu/awsm-cli


text:
---
layout: post
title: Manchester 7/8
---

### Moved >450um seed to upwellers; combined 180um setters; standard maintenance water change, etc.

#### Saturdays are good for special projects. Today I retrofitted the tank outside to act as both an upweller and downweller, and moved all setters that hold on a 450um screen to the upwelled silos. Here's how:
  * Cut 1" pipe and connected T's and elbows to allow for 14 silos, 7 "manifolds" with 2 silos each
  * Added 450um screen to the outflow of each upweller silo. This is to ensure no rogue seed find their way into the downwelled silos, as the outflow from upwellers will flow into the downwelled silos.
  * Installed taller stand pipe
  * Surprisingly, this took circa 4 hours. These silos are old, pvc components sparse, and as far as I know this arrangement has never been done before, so it took some time to figure out, and to make sure flow was consistent everywhere.

#### Graduated 450um setters to upwelled tanks
Screened outside setters through 450um and those that held were moved to the new upweller 450um silo.  Those that did not hold were put back into the 180um silo, then married with the 180um contents from the inside setting tank.  I currently have room for 15 downwelled silos and 14 upwelled silos outside. I can make room for 16 each, but the limiting factor is pvc components. Will go to the store tomorrow to pick up what's needed (if they have it; I need a 1" --> 1/2" reducing connection)

I did not graduate up the following groups:
  * Mixed SN10 group (all left in downweller)
  * HL-6 Ambient & HL-6 Low; this is because I didn't have any of these groups outside, and the larvae has only recently been addedd (most on 7/3, 7/6) so none likely will hold on 450um. I will move these HL-6 groups outside in their downwelled silos as soon as I get the components.

The inside setting tanks are now mostly empty (except for HL-6 grps), silos cleaned, ready for the next wave.

#### Standard maintenance
  * No new larvae
  * Rinsed larval catchment buckets
  * Changed banjos - they were super dirty
  * Fed everything
  * SN Growth exp water change
  ![image](https://user-images.githubusercontent.com/17264765/27990909-ae13ee7e-641a-11e7-9573-d375c6fd3178.png)
  *

repository: laurahspencer/LabNotebook

gha_language: CSS

repo_name: laurahspencer/LabNotebook


text:
**Title:** basic service setup

**Status:** accepted

**Context:**
- doing some basic design decisions for this express service starter

**Decision:**
- REST / GraphQL only
- no express typical use of an frontend engine
- JSON only
- using cookies
- support for databases like: MongoDB, PostgresSQL, MySQL, ...

**Consequences:**
- for a fronend we have to take care somehow else (e.g. JAMStack)
- CORS with JSON forces a "options" request before the normal get/post request
- taking care of cookie vulnerabilities (e.q. using http only etc)
- if you choose a db it's not a staless service anymore

repository: pandorasNox/kubestagram

repo_name: pandorasNox/kubestagram


text:
##  Unittests

![](BST-small.png)

The command

    $ BST.py -t

launches the script unittest.sh on Unix resp. unittest.bat on Windows.

![](WindowsUnittest.png)

You may call arbitrary test programs from such scripts, incl. calling Python- or Matlab interpreters.

BST.py considers the unittests to have passed as long as the unittest.{sh|bat} script returns 0.

**Example**

ToolBOS SDK comes with built-in support for **CuTest**, a very easy to use unittesting "framework" which is actually just a set of C macros. It is supported on both Linux and Windows.

**See also**
      - [unittest](../../../../examples/unittest.c)

In good cases it might look like this:

     $ BST.py -t
     ................

     OK (16 tests)

while in case the second testcase failed:

    .F..............

    There was 1 failure:
    1) Test_myFunc2: unittest.c:58: expected <42> but was <123>

    !!!FAILURES!!!
    Runs: 2 Passes: 1 Fails: 1

**See also**
    [CuTest: C Unit Testing Framework](http://cutest.sourceforge.net)

repository: HRI-EU/ToolBOSCore

branch_name: refs/heads/main

gha_language: Python

repo_name: HRI-EU/ToolBOSCore


text:
# Playground for CQRS implementation

Inspired by [cqrs-ruby implementation](https://github.com/davydovanton/cqrs-ruby-example) made by Anton Davidov

repository: Lokideos/cqrs-playground

repo_name: Lokideos/cqrs-playground


text:
# [StackEdit]( https://stackedit.io/ )

### Features

* Set many defaults in the StackEdit menu
	* View ToC
* Nicely formatted ==Markdown==
* GitHub Flavor Markdown
* Live preview
* Easy to switch to preview mode and click links
* Table of contents
* Access from Windows, Chromebook and Android
* Access Dropbox
* Voice recognition OK
* Sync files via Google Drive
* Multi-user support
* Browser spell-checking
* Auto-save and sync
* Has Chrome extension but not certain how to use it (or may not work in GiHub editor )
* Open source and free
* Source on GitHub
* Publish directly to GitHub pages & other sites
* Not a code editor

But is better than Evernote??

### Tips

* Paste with Control-Shift-V to remove formatting
* Publishing is push/one way only ~ Anything on GitHub/target gets overwritten
* Files are first loaded from the 'Main workspace'
* What happens when you click 'Reset application'?
* https://community.stackedit.io/t/need-a-customized-css-howto/108

* Dropbox > synchronize > Open from Dropbox

### Links

* https://github.com/benweet/stackedit
* https://chrome.google.com/webstore/detail/stackedit-markdown-extens/ajehldoplanpchfokmeempkekhnhmoha
	* This extension will add a StackEdit button to all the textareas on GitHub and StackOverflow, which is the default configuration
* https://twitter.com/benweet
* https://community.stackedit.io/
* https://github.com/benweet/stackedit/issues
* https://community.stackedit.io/c/how-to

### Wish List

* Search and replace
* Move line (s) up or down

<!--stackedit_data:
eyJoaXN0b3J5IjpbLTE1MjQwOTgzMDMsLTIwNDA5ODU2ODQsNz
I1NDg5MTM5LC0xMTAwMDg2ODAsLTQyMzg2MzE4MF19
-->


text:
# media_and_create_date_picker

A Flutter plugin that picture and video gallery items and get item create date.

## Installation

### iOS

Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

* NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.

### Android

Add permission in <project root>/android/app/main/AndroidManifest.xml:
```
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
```

## Getting Started

This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.


text:
# person-attributes-recognition-crossroad-0230

## Use Case and High-Level Description

This model presents a person attributes classification algorithm analysis scenario. It produces probability of person attributions existing on the sample and a position of two point on sample, which can be used for color prob (like, color picker in graphical editors)

## Examples

![](./assets/person-attributes-recognition-crossroad-230-1.png)
![](./assets/person-attributes-recognition-crossroad-230-2.png)
![](./assets/person-attributes-recognition-crossroad-230-3.png)
![](./assets/person-attributes-recognition-crossroad-230-4.png)
![](./assets/person-attributes-recognition-crossroad-230-5.png)

## Specification

| Metric                | Value                                                                                |
|-----------------------|------------------------------------------------------------------------------------------------------|
| Pedestrian pose       | Standing person                                                                                |
| Occlusion coverage    | <20%                                                                                |
| Min object width      | 80 pixels                                                                                |
| Supported attributes  | is_male, has_bag, has_backpack, has hat, has longsleeves, has longpants, has longhair, has coat_jacket|
| GFlops                | 0.174                                                                                |
| MParams               | 0.735                                                                                |
| Source framework      | PyTorch\*                                                                                |

## Accuracy

| Attribute         |  F1   |
|-------------------|-------|
| `is_male`         | 0.91  |
| `has_bag`         | 0.66  |
| `has_backpack`    | 0.77  |
| `has_hat`         | 0.64  |
| `has_longsleeves` | 0.21  |
| `has_longpants`   | 0.83  |
| `has_longhair`    | 0.83  |
| `has_coat_jacket` |  NA   |

## Inputs

Image, name: `0`, shape: `1, 3, 160, 80` in the format `1, C, H, W`, where:

- `C` - number of channels
- `H` - image height
- `W` - image width

The expected color order is `BGR`.

## Outputs

1.  The net outputs a blob named `453` with shape: `1, 8, 1, 1` across eight attributes:
    [`is_male`, `has_bag`, `has_backpack`, `has_hat`, `has_longsleeves`, `has_longpants`, `has_longhair`,
     `has_coat_jacket`]. Value > 0.5 means that an attribute is present.
2.  The net outputs a blob named `456` with shape: `1, 2, 1, 1`. It is location of point with top color.
3.  The net outputs a blob named `459` with shape: `1, 2, 1, 1`. It is location of point with bottom color.

## Demo usage

The model can be used in the following demos provided by the Open Model Zoo to show its capabilities:

* [Crossroad Camera C++ Demo](../../../demos/crossroad_camera_demo/cpp/README.md)

## Legal Information
[*] Other names and brands may be claimed as the property of others.


text:
# FDNY Fire Department Fire Code Data

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/fdny-fire-department-fire-code-data-1e743) |
| Metadata | [Link](https://data.cityofnewyork.us/api/views/msp3-x6rs) |
| Data: JSON | [100 Rows](https://data.cityofnewyork.us/api/views/msp3-x6rs/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.cityofnewyork.us/api/views/msp3-x6rs/rows.csv?max_rows=100) |
| Host | data.cityofnewyork.us |
| Id | msp3-x6rs |
| Name | FDNY Fire Department Fire Code Data |
| Attribution | Fire Department of New York City (FDNY) |
| Category | Public Safety |
| Tags | fdny, fire department, safety, fire safety, fire code, building standards |
| Created | 2013-01-23T16:47:07Z |
| Publication Date | 2013-01-29T15:37:21Z |

## Description

Lists the standards that are referenced in the code.

## Columns

```ls
| Included | Schema Type | Field Name                    | Name                          | Data Type | Render Type |
| ======== | =========== | ============================= | ============================= | ========= | =========== |
| No       | time        | :updated_at                   | updated_at                    | meta_data | meta_data   |
| Yes      | series tag  | standard_code                 | Standard Code                 | text      | text        |
| Yes      | series tag  | standard_name                 | Standard Name                 | text      | text        |
| No       |             | standard_agency_address       | Standard Agency Address       | text      | text        |
| Yes      | series tag  | standard_reference_number     | Standard Reference Number     | text      | text        |
| Yes      | series tag  | standard_title                | Standard Title                | text      | text        |
| Yes      | series tag  | reference_code_section_number | Reference Code Section Number | text      | text        |
```

## Time Field

```ls
Value = updated_at
Format & Zone = seconds
```

## Series Fields

```ls
Excluded Fields = standard_agency_address
```

## Data Commands

```ls
series e:msp3-x6rs d:2013-01-23T08:47:09.000Z t:standard_code=ANSI t:standard_name="American National Standards Institute" t:reference_code_section_number="2609.3, 27<IP_ADDRESS>, 3003.2.3, 3403.5.2" t:standard_reference_number=A13.1?96 t:standard_title="Scheme for the Identification of Piping Systems" m:row_number.msp3-x6rs=1

series e:msp3-x6rs d:2013-01-23T08:47:09.000Z t:standard_code=ANSI t:standard_name="American National Standards Institute" t:reference_code_section_number=27<IP_ADDRESS> t:standard_reference_number=B31.3?99 t:standard_title="Process Piping, including addendum" m:row_number.msp3-x6rs=2

series e:msp3-x6rs d:2013-01-23T08:47:09.000Z t:standard_code=ANSI t:standard_name="American National Standards Institute" t:reference_code_section_number="34<IP_ADDRESS>, 3403.6.3, 3403.6.11" t:standard_reference_number=B31.9?96 t:standard_title="Building Services Piping Code for Pressure Piping" m:row_number.msp3-x6rs=3
```

## Meta Commands

```ls
metric m:row_number.msp3-x6rs p:long l:"Row Number"

entity e:msp3-x6rs l:"FDNY Fire Department Fire Code Data" t:attribution="Fire Department of New York City (FDNY)" t:url=https://data.cityofnewyork.us/api/views/msp3-x6rs

property e:msp3-x6rs t:meta.view v:id=msp3-x6rs v:category="Public Safety" v:attributionLink="http://www.nyc.gov/html/fdny/pdf/firecode/2013/fire_code_ll26_2008_amended_ll37_39_41_64_2009_ll2_2013.pdf#page=617" v:averageRating=0 v:name="FDNY Fire Department Fire Code Data" v:attribution="Fire Department of New York City (FDNY)"

property e:msp3-x6rs t:meta.view.owner v:id=5fuc-pqz2 v:screenName="NYC OpenData" v:lastNotificationSeenAt=1491336998 v:displayName="NYC OpenData"

property e:msp3-x6rs t:meta.view.tableauthor v:id=syvn-4vgv v:screenName="Sudhir Vasudeva" v:displayName="Sudhir Vasudeva"
```

## Top Records

```ls
| :updated_at | standard_code | standard_name                                | standard_agency_address                              | standard_reference_number | standard_title                                                                      | reference_code_section_number          |
| =========== | ============= | ============================================ | ==================================================== | ========================= | =================================================================================== | ====================================== |
|<PHONE_NUMBER>  | ANSI          | American National Standards Institute        | 25 West 43rd Street, Fourth Floor New York, NY 10036 | A13.1?96                  | Scheme for the Identification of Piping Systems                                     | 2609.3, 27<IP_ADDRESS>, 3003.2.3, 3403.5.2 |
|<PHONE_NUMBER>  | ANSI          | American National Standards Institute        | 26 West 43rd Street, Fourth Floor New York, NY 10036 | B31.3?99                  | Process Piping, including addendum                                                  | 27<IP_ADDRESS>                             |
|<PHONE_NUMBER>  | ANSI          | American National Standards Institute        | 27 West 43rd Street, Fourth Floor New York, NY 10036 | B31.9?96                  | Building Services Piping Code for Pressure Piping                                   | 34<IP_ADDRESS>, 3403.6.3, 3403.6.11        |
|<PHONE_NUMBER>  | API           | American Petroleum Institute                 | 1220 L Street, Northwest Washington, DC 20005        | 650?1998                  | Welded Steel Tanks for Oil Storage                                                  | 3406.8.3                               |
|<PHONE_NUMBER>  | API           | American Petroleum Institute                 | 1221 L Street, Northwest Washington, DC 20005        | RP 1604?1996              | Closure of Underground Petroleum Storage Tanks                                      | 3404.2.13                              |
|<PHONE_NUMBER>  | API           | American Petroleum Institute                 | 1222 L Street, Northwest Washington, DC 20005        | Std 2000?1998             | Venting Atmosphere and Low Pressure Storage Tanks: Nonrefrigerated and Refrigerated | 34<IP_ADDRESS>.6                           |
|<PHONE_NUMBER>  | API           | American Petroleum Institute                 | 1223 L Street, Northwest Washington, DC 20005        | Publ 2028?1991            | Flame Arrestors in Piping Systems                                                   | 34<IP_ADDRESS>.2                           |
|<PHONE_NUMBER>  | API           | American Petroleum Institute                 | 1224 L Street, Northwest Washington, DC 20005        | RP 2350?1996              | Overfill Protection for Storage Tanks in Petroleum Facilities                       | 3406.4.6                               |
|<PHONE_NUMBER>  | ASME          | The American Society of Mechanical Engineers | Three Park Avenue New York, NY 10016-5990            | A17.1?2000                | Safety Code for Elevators and Escalators                                            | 607.1                                  |
|<PHONE_NUMBER>  | ASME          | The American Society of Mechanical Engineers | Three Park Avenue New York, NY 10016-5991            | A17.3?1996                | Safety Code for Existing Elevators and Escalators with A17.3a-2000 Addenda          | 607.1                                  |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
---
layout: post
title: "It's okay to google for help, especially for your coding/data science projects."
keywords: "online education, self teaching, learning, learning programming, learning data science"
categories:
- Education
---

I can guarantee you that every data scientist, and I'm sure this extends to software developers too. Google basic code all the time. It's just part of the job.

Google to us is our senior engineer, with StackOverflow being our tech lead and software documentation as our colleague.

...maybe not the best analogy, but it's safe to say we use google as our second brain.

A common thing I notice amongst new programmers and new students of the art of data science. They try so hard to memorize every single function from all the different tools I teach them.

Whenever they ask for help, especially for programming specific things. This is what I usually do:

1. Go to google

2. Google the question or error or documentation

3. Find the answer

4. Implement the answer for the student.

Many times I know the answer to their questions, but what I'm trying to reinforce is the habit of googling and troubleshoot on your own. An essential skill for any developer/data scientist to survive on the job.

For any new developer/data scientist is reading this.  That is normal, as long as you're troubleshooting on your own and solving your own problems. You are growing! It's okay!

Happy coding!


text:
---
layout: about
title: About
permalink: /
subtitle: Ph.D. Candidate @ George Mason University. I am looking for research positions.

profile:
  align: right
  image: profile.png
  image_circular: true # crops the image to make it circular
  address: >

news: true  # includes a list of news items
selected_papers: true # includes a list of papers marked as "selected={true}"
social: true  # includes social icons at the bottom of the page
---

I work as a Graduate Research Assistant at the Design Computing and Extended Reality Group, advised by [Prof. Lap-Fai Yu](https://craigyuyu.github.io/home/index.html). Before that, I received my MS degree in Computer Science at the University of Virginia, and BS degree in Computer Science at Beijing Institute of Technology.

My research interests include graphics, mixed reality, vision, human-computer interaction, and computational design. Specifically, I study generative social activity and human behavior/motion, and scene-aware AR/VR.

Email<EMAIL_ADDRESS>
[[CV]](/assets/cv/cv.pdf)
[[Google Scholar]](https://scholar.google.com/citations?user=Zbx-YuUAAAAJ&hl=en)

gha_language: HTML


text:
# General Information:

Although this letter does not mention the recipients to whom it was sent, the author wrote particularly to Hebrews (Jews), who would have understood the many Old Testament references.

repository: mandolyte/uw-obsidian

repo_name: mandolyte/uw-obsidian


text:
# Nigerian police free 259 people held at Islamic institution

Published at: **2019-11-05T14:14:44+00:00**

Author: ****

Original: [Malaymail](https://www.malaymail.com/news/world/2019/11/05/nigerian-police-free-259-people-held-at-islamic-institution/1807226)

LAGOS, Nov 5 — Nigerian police have freed 259 people being held at an Islamic rehabilitation centre in the southwestern city of Ibadan, police said today, adding that some complained of being beaten regularly by their captors.
It was the latest in a series of raids on Islamic institutions in Nigeria in recent weeks. More than 1,000 people, many of them children, have been rescued in total.
Many captives have said they were physically and sexually abused and chained up to prevent them escaping.
The raids are increasingly embarrassing for President Muhammadu Buhari, a Muslim who has called on police to crack down on such centres.
Other sites raided in major police operations have been in the mostly Muslim north of the country. Ibadan is located in the south, which is mostly Christian.
Oyo state police spokesman Fadeyi Olugbenga said the facility was raided yesterday at around 2pm (1300 GMT).
“Yesterday, 259 persons were released. We had women, men and teenagers,” Olugbenga said. Some people were locked inside a building and some were chained.
Images from local TV station TVC taken shortly after the captives were released showed a group of mostly young men and teenage boys. An infant was also among the group. Many were emaciated.
“We eat one meal a day,” one of the men told TVC.
According to Olugbenga, nine people including the owner of the rehabilitation centre had been arrested and were under investigation.
Spokesmen for the president and vice president both declined to comment.
But the president’s office issued a statement in October that said “no responsible democratic government would tolerate the existence of the torture chambers and physical abuses of inmates in the name of rehabilitation of the victims”.
At other raided facilities, some parents thought their children were there to be educated and even paid tuition fees. Others sent misbehaving relatives to Islamic institutions in order to instil discipline. — Reuters

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
cart
===========

Provides a cart for meteor.  Does not include a payment system, or ui.

#Installation
	$ meteor add elevatedevdesign:cart

# Setup
	Cart.configure({
	  Items: {
	    collection: Items
	  }
	});

# Use

## Add
    Cart.add({
      relationType: "Items",
      relationId: "1234567898", // ID of the item
      quantity: 1
    });

## Remove
    Cart.remove( this._id ); // Id of the cart item, _not_ the id of the object

## Empty
    Cart.empty( ); // Remove all items in cart.

## Info
Number of items in cart.

    Cart.numItems();

Get all items in cart

    Cart.items();

Get total cost of items in cart.  Integer representing number of cents.

    Cart.amount();

# TODO
- Move tests to demo and setup tests to run via test-packages.
- Helpers for publish of items in cart.
- Add shipping costs, and more flexibility in amount calculation.
- Add more tests

repository: jimmiebtlr/meteor-cart

repo_name: jimmiebtlr/meteor-cart


text:
# Examples for working with HP Cloud Compute Service v12.12

The HP Cloud Extensions to Ruby Fog libary provides Compute services support using two abstractions: a model layer and a request layer. Both layers are detailed below. The code samples on this page can be executed from within a Ruby console (IRB):

        irb

This page discusses the following topics:

* [Connecting to the Service](https://github.com/fog/fog/blob/master/lib/fog/hp/docs/connect.md)

**Model Layer Examples**

* [Model Server Operations](#model-server-operations)
* [Model Server Metadata Operations](#model-server-metadata-operations)
* [Model Flavor Operations](#model-flavor-operations)
* [Model Image Operations](#model-image-operations)
* [Model Image Metadata Operations](#model-image-metadata-operations)
* [Model Keypair Operations](#model-keypair-operations)
* [Model Security Groups Operations](#model-security-groups-operations)
* [Model Address Operations](#model-address-operations)

**Request Layer Examples**

* [Request Server Operations](#request-server-operations)
* [Request Server Metadata Operations](#request-server-metadata-operations)
* [Request Flavor Operations](#request-flavor-operations)
* [Request Image Operations](#request-image-operations)
* [Request Image Metadata Operations](#request-image-metadata-operations)
* [Request Keypair Operations](#request-keypair-operations)
* [Request Security Groups Operations](#request-security-groups-operations)
* [Request Address Operations](#request-address-operations)

## Model Server Operations

1. List all available servers for an account:

        servers = conn.servers
        servers.size   # returns no. of servers
        # display servers in a tabular format
        conn.servers.table([:id, :name, :state, :created_at])

2. Obtain the details of a particular server:

        server = conn.servers.get(server_id)
        server.name                         # returns name of the server
        server.flavor_id                    # returns id of the flavor used to create the server
        server.image_id                     # returns id of the image used to create the server
        server.addresses                    # returns a hash of public and private IP addresses
        server.created_at                   # returns the date the server was created
        server.state                        # returns the state of the server e.g. ACTIVE, BUILD

3. Create a new server:

        new_server = conn.servers.create(
              :name => "My Shiny Server",
              :flavor_id => 1,
              :image_id => 2,
              :key_name => "<key_name>",
              :security_groups => ["aaa"]
        )
        new_server.id       # returns the id of the server
        new_server.name     # => "My Shiny Server"
        new_server.state    # returns the state of the server e.g. BUILD
        new_server.private_ip_address   # returns the private ip address
        new_server.public_ip_address   # returns the public ip address, if any assigned

4. Create a new Windows server instance and retrieve the encrypted password:

        win_server = conn.servers.create(
              :name => "My Windows Server",
              :flavor_id => 1,
              :image_id => 3,    # Make sure it is a Windows image
              :key_name => "<key_name>",
              :security_groups => ["aaa"]
        )
        win_server.id       # returns the id of the server
        # Retrieve the encrypted password
        win_server.windows_password
        # => "Im6ZJ8auyMRnkJ24KKWQvTgWDug1s ... y0uY1BcHLJ5OrkEPHhQoQntIKOoQ=\n"
**Note**: You must retrieve the Windows password immediately after you create the Windows instance. Also, make sure you have a security rule defined to open RDP port 3389 so that you can connect to the Windows server.

5. Create a new Linux-based persistent server with a bootable volume:

        conn.servers.create(
              :flavor_id => 103,
              :name => "MyPersistentServer",
              :block_device_mapping =>
                [{ 'volume_size' => '',   # ignored
                 'volume_id' => "111111",
                 'delete_on_termination' => '0',
                 'device_name' => 'vda'
                }]
        )
    **Note**: In *block_device_mapping*, *volume_size* is ignored; it is automatically retrieved from the specified bootable volume. To delete the bootable volume after the server instance is killed you can set  *delete_on_termination* to `1`.  To preserve the bootable volume, set it to `0` as shown above.

6. Create a new Linux-based server with advanced personalization options:

        new_server = conn.servers.create(
              :name => "My Personalized Server",
              :flavor_id => 1,
              :image_id => 2,
              :key_name => "<key_name>",
              :security_groups => ["aaa"],
              :config_drive => true,
              :user_data_encoded => ["This is some encoded user data"].pack('m'),
              :personality => [{
                'contents'  => File.read("/path/to/sample.txt"),
                'path'      => "/path/to/sample.txt"
              }]
        )
        new_server.id       # returns the id of the server
        new_server.name     # => "My Personalized Server"

        # Note: that un-encoded user data can also be provided by setting the user_data property
        # although, encoding the data on the client is faster and efficient
        new_server = conn.servers.new(
              :name => "My Personalized Server",
              ...
              ...
        )
        new_server.user_data = "This is some un-encoded user data"
        new_server.save

    The personalization options are:

    *config_drive*
    : Disk accessible to the server that contains a FAT filesystem. If `config_drive` parameter is set to `true` at the time of server creation, the configuration drive is created.

    *user_data_encoded* or *user_data*
    : Allows additional metadata to be inserted during server creation by supplying a Base64-encoded string in the `user_data_encoded` parameter, or by providing an unencoded string with the `user_data` attribute. Note that encoding the data on the client is faster and more efficient.

    *personality*
    : Allows files to be injected into the server instance after its creation. The file `contents` are Base64 encoded and injected into the location specified by `path`.

    **Note**: The above personalization options are not supported on Windows server instances.

7. Get console output:

        server = conn.servers.get(server_id)
        server.console_output(5)           # 5 lines of console output are returned

8. Get VNC console:

        server = conn.servers.get(server_id)
        server.vnc_console_url('novnc')    # URL to access the VNC console of a server from a browser

9. Reboot a server:

        server = conn.servers.get(server_id)
        server.reboot          # soft reboot by default

        server.reboot("HARD")  # hard reboot also possible

10. Change password for a server:

        server = conn.servers.get(server_id)
        server.change_password("new_password")

11. Delete an existing server:

        server = conn.servers.get(server_id)
        server.destroy

## Model Server Metadata Operations

1. Create a server with some metadata:

        myserver = conn.servers.create(
              :flavor_id => 1,
              :image_id => 2,
              :name => "myserver",
              :metadata => {'Meta1' => 'MetaValue1', 'Meta2' => 'MetaValue2'}
        )

2. Get the metadata item:

        myserver.metadata.get("Meta1")

3. Update the metadata:

        myserver.metadata.update({"Meta2" => "MetaValue2"})

4. Set the metadata:

        myserver.metadata.set({"Meta3" => "MetaValue3"})

5. Set the metadata explicitly:

        m = myserver.metadata.new
        m.key = "Meta4"
        m.value = "Value4"
        m.save

6. Update the metadata:

        m = myserver.metadata.get("Meta3")
        m.value = "UpdValue3"
        m.save

7. List metadata:

        myserver.metadata.all

8. Delete metadata:

        m = myserver.metadata.get("Meta3")
        m.destroy

## Model Flavor Operations

1. List all available flavors:

        flavors = conn.flavors
        flavors.size   # returns no. of flavors
        # display flavors in a tabular format
        conn.flavors.table([:id, :name, :ram, :disk])

2. Obtain the details of a particular flavor:

        flavor = conn.flavors.get(flavor_id)   # get the flavor
        flavor.name    # returns the name of the flavor eg: m1.tiny, m1.small etc.
        flavor.ram     # returns the ram memory in bytes for the flavor, eg: 4096
        flavor.disk    # returns the disk size in GB for the flavor, eg: 80
        flavor.cores   # returns no. of cores for the flavor, eg: 0.25

## Model Image Operations

1.  Obtain the details of a particular image:

        image = conn.images.get(image_id)    # get the image
        image.name          # returns name of the image
        image.created_at    # returns the date the image was created
        image.status        # returns the state of the image e.g. ACTIVE

3. Create a new snapshot image based on an existing server:

        myserver.create_image("My Image")

4. Delete an existing snapshot image:

        image = conn.images.get(image_id)
        image.destroy

## Model Image Metadata Operations

1. Create an image snapshot with some metadata:

        myserver.create_image("My Image", {"ImgMeta1" => "ImgMeta1Value"})

2. Get the metadata item:

        myimage = conn.images.get(image_id)
        myimage.metadata.get("ImgMeta1")

3. Update the metadata:

        myimage.metadata.update({"ImgMeta2" => "ImgMetaValue2"})

4. Set the metadata:

        myimage.metadata.set({"ImgMeta3" => "ImgMetaValue3"})

5. Set the metadata explicitly:

        m = myimage.metadata.new
        m.key = "ImgMeta4"
        m.value = "ImgMetaValue4"
        m.save

6. Update the metadata:

        m = myimage.metadata.get("ImgMeta3")
        m.value = "ImgUpdValue3"
        m.save

7. List metadata:

        myimage.metadata.all

8. Delete metadata:

        m = myimage.metadata.get("ImgMeta3")
        m.destroy

## Model Keypair Operations

1. List all available keypairs:

        keypairs = conn.key_pairs
        keypairs.size         # returns no. of keypairs
        # display keypairs in a tabular format
        conn.key_pairs.table([:name, :public_key])

2. Obtain the details of a particular keypair:

        keypair = conn.key_pairs.get(key_name)    # get the keypair
        keypair.name          # returns name of the keypair
        keypair.public_key    # returns the public key of the keypair
        # NOTE: Due to security considerations, the private key is not available on subsequent gets
        keypair.private_key   # => nil

3. Create a new keypair:

        keypair = conn.key_pairs.create(:name => "mykey")
        keypair.name          # returns name of the keypair
        keypair.public_key    # returns the public key of the keypair
        keypair.private_key   # returns the private key of the keypair

4. Export a keypair to a file:

        keypair = conn.key_pairs.create(:name => "mykey2")
        keypair.write         # => "Key file built: /Users/xxxxx/.ssh/mykey2.pem"

        # Alternatively, you can pass in a path to export the key
        keypair.write("/Users/xxxxx/Downloads/mykey2.pem")

5. Import a public key to create a new keypair:

        keypair = conn.key_pairs.create(:name => "mykey", :public_key => "public key material")
        keypair.name          # returns name of the keypair

6. Delete an existing keypair:

        keypair = conn.key_pairs.get(key_name)
        keypair.destroy

## Model Security Groups Operations

1. List all available security groups:

        sgroups = conn.security_groups
        sgroups.size           # returns no. of security groups
        # display security groups in a tabular format
        conn.security_groups.table([:id, :name, :description])

2. Obtain the details of a particular security group:

        sgroup = conn.security_groups.get(sgroup_id)    # get the security group
        sgroup.name           # returns name of the security group
        sgroup.description    # returns description of the security group

3. Create a new security group:

        sgroup = conn.security_groups.create(:name => "mysgroup", :description => "my new sec group")
        sgroup.name           # returns name of the security group

4. Create a rule for an existing security group:

        sgroup = conn.security_groups.get(sgroup_id)    # get the security group
        sgroup.create_rule(80..80)                      # allow port 80. defaults to protocol tcp at <IP_ADDRESS>/0
        sgroup.create_rule(-1..-1, "icmp", "<IP_ADDRESS>/0") # allow icmp
        # show all rules
        sgroup = conn.security_groups.get(sgroup_id)    # get the security group
        sgroup.rules

5. Delete a rule from an existing security group:

        sgroup = conn.security_groups.get(sgroup_id)    # get the security group
        sgroup.delete_rule(sgroup_rule_id)

6. Delete an existing security group:

        sgroup = conn.security_groups.get(sgroup_id)    # get the security group
        sgroup.destroy

## Model Address Operations

1. List all available floating IP addresses:

        addresses = conn.addresses
        addresses.size                              # returns no. of addresses
        # display addresses in a tabular format
        conn.addresses.table([:id, :ip, :fixed_ip, :instance_id])

2. Obtain the details of a particular address:

        address = conn.addresses.get(address_id)    # get the address
        address.ip                                  # returns the ip address

3. Create or allocating a new address:

        address = conn.addresses.create             # allocates an ip address from the pool
        address.ip                                  # returns the ip address

4. Associate a server to an existing address:

        address = conn.addresses.get(address_id)    # get the address
        server = conn.servers.get(server_id)        # get the server
        address.server = server                     # associate the server
        address.instance_id                         # returns the id of the server

5. Disassociate a server from an existing address:

        address = conn.addresses.get(address_id)    # get the address
        address.server = nil                        # disassociate the server
        address.instance_id                         # => nil

6. Delete (release) an existing address:

        address = conn.addresses.get(address_id)    # get the address
        address.destroy                             # releases the ip address to the pool

## Request Server Operations

1. List all available servers for an account:

        response = conn.list_servers
        response.body['servers']                    # returns an array of server hashes
        response.headers                            # returns the headers
        response.body['servers'][0]['name']         # returns the name of the server

2. List all available servers with additional details:

        response = conn.list_servers_detail
        response.body['servers']                    # returns an array of server hashes
        response.body['servers'][0]['name']         # returns the name of the server

3. Obtain the details of a particular server:

        response = conn.get_server_details(server_id)
        server = response.body['server']
        server['name']                              # returns the name of the server
        server['flavor']                            # returns the flavor used to create the server
        server['image']                             # returns the image used to create the server
        server['addresses']                         # returns the public and private addresses
        server['status']                            # returns the state of the server e.g. ACTIVE

4. Create a new server:

        response = conn.create_server(
            "My Shiny Server",
            flavor_id,
            image_id,
            {
              'security_groups' => ["SecGroup1, SecGroup2"],
              'key_name' => "<key_name>"
            }
        )
        server = response.body['server']
        server['id']                                # returns the id of the new server
        server['name']                              # => "My Shiny Server"
        server['status']                            # returns the state of the server e.g. BUILD

5. Create a new Windows server and retrieve the encrypted password:

        # Make sure to use a Windows image
        response = conn.create_server("My Windows Server", flavor_id, image_id)
        win_server = response.body['server']
        server_id = win_server['id']                # returns the id of the new server
        # Retrieve the encrypted password
        conn.get_windows_password(server_id)
        # => "Im6ZJ8auyMRnkJ24KKWQvTgWDug1s ... y0uY1BcHLJ5OrkEPHhQoQntIKOoQ=\n"
    **Note**: You must retrieve the Windows password immediately after you create the Windows instance. Also, make sure you have a security rule defined to open RDP port 3389 so that you can connect to the Windows server.

6. Create a new Linux-based persistent server with a bootable volume

        conn.create_persistent_server(
              "MyBootableServer",
              103,
              [{ "volume_size"=>"",                 # ignored
                  "volume_id"=>"65904",
                  "delete_on_termination"=>"0",
                  "device_name"=>"vda"
              }] ,
              {
               'security_groups' => ["mysecgroup"],
               'key_name' => "<key_pair>"
              }
        )
    **Note**: In *block_device_mapping*, *volume_size* is ignored; it is automatically retrieved from the specified bootable volume. To delete the bootable volume after the server instance is killed you can set  *delete_on_termination* to `1`.  To preserve the bootable volume, set it to `0` as shown above.

7. Create a new Linux-based server with advanced personalisation options:

        response = conn.create_server(
            "My Shiny Server",
            flavor_id,
            image_id,
            {
              'security_groups' => ["SecGroup1, SecGroup2"],
              'key_name' => "<key_name>",
              'config_drive' => true,
              'user_data_encoded' => ["This is some encoded user data"].pack('m'),
              'personality' => [{
                                 'contents'  => File.read("/path/to/sample.txt"),
                                 'path'      => "/path/to/sample.txt"
                               }]
            }
        )
        server = response.body['server']
        server['id']                                # returns the id of the new server

    The personalization options are:

    *config_drive*
    : Disk accessible to the server that contains a FAT filesystem. If `config_drive` parameter is set to `true` at the time of server creation, the configuration drive is created.

    *user_data_encoded*
    : Allows additional metadata to be inserted during server creation by supplying a Base64-encoded string in the `user_data_encoded` parameter.

    *personality*
    : Allows files to be injected into the server instance after its creation. The file `contents` are Base64 encoded and injected into the location specified by `path`.

    **Note**: The above personalization options are not supported on Windows server instances.

8. Update the name for a server:

        conn.update_server(server_id, {'name' => "My Cool Server"})
        response = conn.get_server_details(server_id)
        response.body['server']['name']             # => "My Cool Server"

9. Change the password for a server:

        conn.change_password_server(server_id, "new_password")

10. List both public and private addresses of a particular server:

        response = conn.list_server_addresses(server_id)

11. List all the private addresses of a particular server:

        response = conn.list_server_private_addresses(server_id, "private")    # where "private" is the network name

12. List all the public addresses of a particular server:

        response = conn.list_server_public_addresses(server_id, "private")     # where "private" is the network name

13. Get console output:

        response = conn.get_console_output(server_id, 5)
        # => 5 lines of console output are returned

14. Get VNC console:

        response = conn.get_vnc_console(server_id, 'novnc')
        # => Url to access the VNC console of a server from a browser

15. Reboot a server:

        response = conn.reboot_server(server_id, 'HARD')  # Hard reboot a server
        response = conn.reboot_server(server_id, 'SOFT')  # Soft reboot a server

16. Delete an existing server:

        conn.delete_server(server_id)

## Request Server Metadata Operations

1. Create a server and pass it some metadata at creation:

        response = conn.create_server(
                        "myserver", 1, 2,
                        {'metadata' =>
                          {'Meta1' => 'MetaValue1', 'Meta2' => 'MetaValue2'}
                        }
                   )
        response.body['server']['metadata']
        # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"}

2. List the existing metadata:

        response = conn.list_metadata("servers", server_id)
        response.body['metadata']
        # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"}

3. Set new values to the existing metadata:

        response = conn.set_metadata("servers", server_id, {"MetaNew1" => "MetaNewValue1"})
        response.body['metadata']
        # => {"MetaNew1"=>"MetaNewValue1"}

4. Update the existing metadata:

        response = conn.update_metadata("servers", server_id, {"Meta2" => "MetaValue2"})
        response.body['metadata']
        # => {"Meta2"=>"MetaValue2"}

5. Get a metadata item:

        response = conn.get_meta("servers", server_id, "Meta1")
        response.body['meta']
        # => {"Meta1"=>"MetaValue1"}

6. Set a new metadata item or update an existing metadata item:

        response = conn.update_meta("servers", server_id, "Meta1", "MetaUpdated1")
        response.body['meta']
        # => {"Meta1"=>"MetaUpdated1"}

7. Delete a metadata item:

        conn.delete_meta("servers", server_id, "Meta1")

## Request Flavor Operations

1. List all available flavors:

        response = conn.list_flavors
        response.body['flavors']                    # returns an array of flavor hashes
        response.headers                            # returns the headers for the flavors
        response.body['flavors'][0]['name']         # returns the name of the flavor

2. List all available flavors with additional details:

        response = conn.list_flavors_detail
        response.body['flavors']                    # returns an array of flavor hashes

3. Obtain the details of a particular flavor:

        response = conn.get_flavor_details(flavor_id)
        flavor = response.body['flavor']
        flavor['name']                              # returns the name of the flavor
        flavor['disk']                              # returns the disk size of the flavor
        flavor['ram']                               # returns the ram size of the flavor

## Request Image Operations

1. List all available images:

        response = conn.list_images
        response.body['images']                     # returns an array of image hashes
        response.headers                            # returns the headers for the images
        response.body['images'][0]['name']          # returns the name of the image

2. List all available images with additional details:

        response = conn.list_images_detail
        response.body['images']                     # returns an array of image hashes
        response.body['images'][0]['name']          # returns the name of the image

3. Obtain the details of a particular image:

        response = conn.get_image_details(image_id)
        image = response.body['image']
        image['name']                               # returns name of the image
        image['status']                             # returns the state of the image e.g. ACTIVE
        image['created']                            # returns the creation date of the image
        image['updated']                            # returns the update date of the image

3. Create a new snapshot image based on an existing server:

        conn.create_image(server_id, "My Image")    # creates an snapshot image from the server referenced by "server_id"

4. Delete an existing snapshot image:

        conn.delete_image(image_id)

## Request Image Metadata Operations

1. Create an image and pass it some metadata at creation:

        conn.create_image(server_id, "myimage", {'Meta1' => 'MetaValue1', 'Meta2' => 'MetaValue2'})

2. List the existing metadata:

        response = conn.list_metadata("images", image_id)
        response.body['metadata']
        #  => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"}

3. Set new values to the existing metadata:

        response = conn.set_metadata("images", image_id, {"MetaNew1" => "MetaNewValue1"})
        response.body['metadata']
        # => {"MetaNew1"=>"MetaNewValue1"}

4. Update the existing metadata:

        response = conn.update_metadata("images", image_id, {"Meta2" => "MetaValue2"})
        response.body['metadata']
        # => {"Meta2"=>"MetaValue2"}

5. Get a metadata item:

        response = conn.get_meta("images", image_id, "Meta1")
        response.body['meta']
        # => {"Meta1"=>"MetaValue1"}

6. Update a metadata item:

        response = conn.update_meta("images", image_id, "Meta1", "MetaUpdated1")
        response.body['meta']
        # => {"Meta1"=>"MetaUpdated1"}

7. Delete a metadata item:

        conn.delete_meta("images", image_id, "Meta1")

## Request Keypair Operations

1. List all available keypairs:

        response = conn.list_key_pairs
        response.body['keypairs']                   # returns an array of keypair hashes
        response.headers                            # returns the headers
        response.body['keypairs'][0]['keypair']['name']        # returns the name of the keypair

2. Create a new keypair:

        response = conn.create_key_pair("mykey")
        keypair = response.body['keypair']
        keypair['name']                             # returns the name of the keypair
        keypair['public_key']                       # returns the public key of the keypair
        keypair['private_key']                      # returns the private key of the keypair

3. Import a public key to create a new keypair:

        response = conn.create_key_pair("mykey", "public key material")
        keypair = response.body['keypair']
        keypair['name']                             # returns the name of the keypair

4. Delete an existing keypair:

        conn.delete_key_pair(key_name)

## Request Security Groups Operations

1. List all available security groups:

        response = conn.list_security_groups
        response.body['security_groups']            # returns an array of security groups hashes
        response.headers                            # returns the headers
        response.body['security_groups'][0]['name'] # returns the name of the security group

2. Obtain the details of a particular security group:

        response = conn.get_security_group(sgroup_id) # get the security group
        sgroup = response.body['security_group']
        sgroup['name']                                # returns the name of the security group

3. Create a new security group:

        response = conn.create_security_group("mysgroup", "my new sec group")
        sgroup = response.body['security_group']
        sgroup['name']                                # => "mysgroup"

4. Create a rule for an existing security group:

        response = create_security_group_rule(sgroup_id, "tcp", "80", "80", "<IP_ADDRESS>/0")  # allow port 80, tcp at <IP_ADDRESS>/0
        sg_rule = response.body['security_group_rule']
        sg_rule['id']                                 # returns the id of the security group rule
        sg_rule['parent_group_id']                    # returns the id of the security group to which the rule belongs to
        sg_rule['from_port']                          # => 80
        sg_rule['to_port']                            # => 80
        sg_rule['ip_protocol']                        # => tcp
        sg_rule['ip_range']['cidr']                   # => <IP_ADDRESS>/0

5. Delete an existing security group rule:

        conn.delete_security_group_rule(sg_rule_id)

6. Delete an existing security group:

        conn.delete_security_group(sgroup_id)

## Request Address Operations

1. List all available floating ip addresses:

        response = conn.list_addresses
        response.body['addresses']                  # returns an array of address hashes
        response.headers                            # returns the headers
        response.body['addresses'][0]['id']         # returns the id of the address

2. Obtain the details of a particular address:

        response = conn.get_address(address_id)     # get the address
        response.body['address']['ip']              # returns the ip address

3. Create (allocate) a new address:

        response = conn.allocate_address            # allocates an ip address from the pool
        response.body['address']['ip']              # returns the ip address

4. Associate a server to an existing address:

        conn.associate_address(server_id, ip_address)

5. Disassociate a server from an existing address:

        conn.disassociate_address(server_id, ip_address)

6. Delete (release) an existing address:

        conn.release_address(address_id)            # releases the ip address to the pool

---------
[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md)

repository: infochimps-labs/fog

repo_name: infochimps-labs/fog


text:
# Installation

`react-md` is a [React] component library that aims to aid in creating an
accessible web application following the rules outlined at [w3.org], using the
[material design specifications] for design, and styles provided by [SCSS]
files. This page is targeted towards developers that have an existing app that
should be updated to use `react-md`. If you do not have an app initialized
already or a new user, I recommend the [creating a new app] documentation
instead.

## Installing Dependencies

First, let's install `react-md` and `sass`:

```sh
npm install --save react-md
npm install --save-dev sass
```

Or if you prefer [yarn]:

```sh
yarn add react-md
yarn add --dev sass
```

> Since `react-md` requires [hook support], you'll also need to ensure that
> `react` and `react-dom` are at least version **16.14 or higher**.

## Adding Base Styles

Once `react-md` and `sass` have been installed, you'll want to include the base
`react-md` styles. First, create a `src/index.scss` file and generate the
styles:

```scss
@use "react-md" as *;

@include react-md-utils;
```

Next, update your `src/index.js` file to include the `index.scss` file **before
all other imports**:

```diff
+import './index.scss';
 import ReactDOM from 'react-dom';
 import './index.css';
 import App from './App';
 import * as serviceWorker from './serviceWorker';

 ReactDOM.render(<App />, document.getElementById('root'));
```

> Note: the default styles take a decent amount of time to compile, check out
> the [Advanced Installation] for additional info on speeding this process up.

## Adding the Roboto Font

Now that the base styles have been included, we'll also need to add the [Roboto
font]. This can be done through [Google Fonts]. Update your `public/index.html`
to include a link to the Roboto stylesheet:

```diff
     <!--
       manifest.json provides metadata used when your web app is installed on a
       user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
     -->
     <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
+    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500:700&display=swap" />
```

> The `Roboto` font is **not required** as the font for your app. If you'd like
> to use a different font, check out the [customizing your theme] guide.

## Adding the Material Icons Font

We're almost there! The last step is to include the [Material Icons font] so the
default font icons work throughout the app. Update `public/index.html` one last
time and add the icon font:

```diff
     <!--
       manifest.json provides metadata used when your web app is installed on a
       user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
     -->
     <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
+    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500:700&display=swap" />
```

## :tada: react-md should now be fully installed!

### Where do I go from here?

Well now that you've setup the basics for your first `react-md` styled app,
you'll probably be interested in:

- [Scoped Packages] - Describes the scoped packages within `react-md` and
  explains why all the demos and other guides will be using them.
- [Configuring your layout] - This will also go into more details about the
  navigation tree.
- [Customizing your theme] - The default colors, sizes, and fonts might not be
  your thing so this is all configurable.
- [Advanced Installation] - Using default styles from [unpkg.com] to speed up
  initial compilation and optionally using the UMD bundle.
- viewing the different packages within `react-md` and seeing the components
  they provide.

[react]: https://reactjs.org
[material design specifications]: https://material.io/design/
[w3.org]: https://www.w3.org
[scss]: https://sass-lang.com/
[yarn]: https://yarnpkg.com/lang/en/
[create-react-app]:
  https://facebook.github.io/create-react-app/docs/getting-started
[hook support]: https://reactjs.org/docs/hooks-intro.html
[creating a new app]: /guides/creating-a-new-app
[roboto font]: https://fonts.google.com/specimen/Roboto
[google fonts]: https://fonts.google.com/
[advanced installation]: /guides/advanced-installation
[customizing your theme]: /guides/customizing-your-theme
[material icons font]: https://material.io/resources/icons/
[configuring your layout]: /guides/configuring-your-layout
[scoped packages]: /guides/scoped-packages
[unpkg.com]: https://unpkg.com

repository: mlaursen/react-md

gha_language: TypeScript

repo_name: mlaursen/react-md


text:
# RequestFilterQueriesInner

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | **string** | The filter query expression.
For multi-select facets selected facets must be order together
 | [optional] [default to null]
**tags** | **string[]** | Tags used exclude the filters from facet evaluation for multi-select facet support | [optional] [default to null]

repository: Alfresco/alfresco-js-api

branch_name: refs/heads/develop

repo_name: Alfresco/alfresco-js-api


text:
# MoH Emotion Pilot

## Installation
Add this [folder](https://1drv.ms/f/s!AkvGqWOSvc-hhJgvwwPTZYJ9gmvVeQ)  to your documents path, e.g. Usually `c:\Users\Ahmed\Documents`, folder name must be moh-emotion-pilot. That's pretty much it, you don't need to install Affectiva SDK.

repository: yehiasalam/moh-emotion-pilot

repo_name: yehiasalam/moh-emotion-pilot


text:
So, you've found something on Status you want to work on.  Maybe it's a bug in the code, one of the existing issues from the issue tracker, or just an idea you have to make Status better.

This will get you up and running on your first PR.  It assumes you are working on the Android app.

### Prerequisites

- Linux: `git`, `curl`, and `make`
  - Run `sudo apt install -y git curl make` on the terminal

### 1. Fork the repository

Fork the repository on [Github](https://www.github.com) and then clone the repo.

```bash
git clone https://github.com/your_user_name/status-mobile.git
cd status-mobile
git remote add upstream https://github.com/status-im/status-mobile.git
git fetch upstream
```

### 2. Create your branch

Create your branch off the `develop` branch of the `status-mobile` repo.

```bash
git checkout -b my_example_status_branch -t upstream/develop
```

### 3. Get the environment ready

Depending on which environment you want to build for (Android/iOS/Desktop), there are different build targets to leverage.  Update the target OS defined below based on your intended build environment.

```bash
make shell TARGET=android
```

Follow the more detailed walkthroughs in the below links to get up and running with the end-to-end build process for each environment.

- [General build walthrough](./index.html)
- [iOS](./status_mobile_quickstart.html)
- [Desktop](./intro_desktop.html)

### 4. Code your changes

Make whatever changes to the app you've got in mind in your local branch.

### 5. Run tests

Run the linter to fix any formatting errors:

```bash
make lint-fix
```

In a second terminal window, run the tests with `sudo make test-auto`.  This will run the tests continually in the background.

### 6. Rebase and submit your PR

Once all the tests pass, rebase against the  `status-mobile/develop` branch.

```bash
git fetch upstream && rebase upstream/develop
```

Resolve any conflicts, stage and commit your branch.

```bash
git add .
git commit -m "My code works!"
```

Push your branch to Github with `git push`, and then submit your PR on the `status-mobile/develop` branch.  Fill out the form following the PR template.

Tip: If you're not done with your PR after your initial commit, make sure you put WIP in the title upon initial submission so the Status_Bot knows you still have work to do.

### 7. Continuous Integration

Navigate to the Github page that contains your PR.  Status's continuous integration tool, Jenkins, will run a number of automated tests and provide feedback on any issues that are identified.  Make further changes as needed based on the output provided by Jenkins.

Once all the CI tests pass, remove WIP from your PR's title and then work with any feedback provided by the reviewers.

Congrats, your first PR is well on it's way!


text:
---
layout: post
title: BigQuery various table types
tags: [GCP]
category: [GCP]
author: vikrant
comments: true
---

Partitioned tables are a special kind of table in dataset that is divided into segments called partitions to easily query the data. Maily two type of partitioning exist in BQ:

- Ingestion-time based partitioning
- Column based partitioning.

#### Ingestion-time based partitioning

- Based on time when the data is injected into the bq, tables get paritioned.

- Command to create ingestion time based table.

```
$ bq mk -t --expiration 2592000 --time_partitioning_type=DAY --time_partitioning_expiration 259200 --description "This is my time-partitioned table" --label organization:development test_dataset_1.my_table_1 qtr:STRING,sales:INTEGER,year:STRING
Table 'test-project1:test_dataset_1.my_table_1' successfully created.
```

- Check the schema and expiration time of table.

```
$ bq show test_dataset_1.my_table_1
Table test-project1:test_dataset_1.my_table_1

   Last modified         Schema         Total Rows   Total Bytes     Expiration            Time Partitioning         Clustered Fields            Labels
 ----------------- ------------------- ------------ ------------- ----------------- ------------------------------- ------------------ --------------------------
  14 Jul 13:10:56   |- date: string     2            48            13 Aug 13:06:06   DAY (expirationMs: 259200000)                      organization:development
                    |- sales: integer
                    |- year: string
```

- Insert some data into table.

```

INSERT INTO test_dataset_1.my_table_1 (date,sales,year) VALUES ('2019-04-20',30000,'2019')

$ bq query --nouse_legacy_sql 'SELECT * FROM test_dataset_1.my_table_1'
Waiting on bqjob_r4723fbc39286830f_0000016befc29e7f_1 ... (0s) Current status: DONE
+------------+-------+------+
|    date    | sales | year |
+------------+-------+------+
| 2019-04-20 | 30000 | 2019 |
| 2019-04-24 | 20000 | 2019 |
+------------+-------+------+
```

- In case of ingestion-time based partitioned tables a new pseudo column (_PARTITIONTIME) is inject into the table, you can't see this pseudo column but we can use this in our query to narrow down the result of our query.

```
$ bq query --nouse_legacy_sql 'select * from test_dataset_1.my_table_1 WHERE _PARTITIONTIME = TIMESTAMP("2019-07-14")'
Waiting on bqjob_r5c545e2e32011cf9_0000016befc8a766_1 ... (0s) Current status: DONE
+------------+-------+------+
|    date    | sales | year |
+------------+-------+------+
| 2019-04-24 | 20000 | 2019 |
| 2019-04-20 | 30000 | 2019 |
+------------+-------+------+
```

- Simple SELECT * on table will not show this pseudo column if you want to see this column then explicitly state the name of pseudo column.

```
$ bq query --nouse_legacy_sql 'SELECT date,sales,_PARTITIONTIME as pt FROM `test_dataset_1.my_table_1`'
Waiting on bqjob_r3b1216902e5f9e6f_0000016befcc4ca5_1 ... (0s) Current status: DONE
+------------+-------+---------------------+
|    date    | sales |         pt          |
+------------+-------+---------------------+
| 2019-04-24 | 20000 | 2019-07-14 00:00:00 |
| 2019-04-20 | 30000 | 2019-07-14 00:00:00 |
+------------+-------+---------------------+

Another way using legacy sql

$ bq query --use_legacy_sql 'SELECT * from [test_dataset_1.my_table_1$__PARTITIONS_SUMMARY__]'
Waiting on bqjob_r7226f8ffacc355f0_0000016bf01f05f9_1 ... (0s) Current status: DONE
+------------+----------------+------------+--------------+---------------+---------------------+--------------------+-------------------------+
| project_id |   dataset_id   |  table_id  | partition_id | creation_time | creation_timestamp  | last_modified_time | last_modified_timestamp |
+------------+----------------+------------+--------------+---------------+---------------------+--------------------+-------------------------+
| test-project1 | test_dataset_1 | my_table_1 | 20190714     |<PHONE_NUMBER>274 | 2019-07-14 09:11:47 |<PHONE_NUMBER>896 |     2019-07-14 09:12:00 |
+------------+----------------+------------+--------------+---------------+---------------------+--------------------+-------------------------+
```

#### Column based partitioning

- Column based partitioning based on specific column. Must be of type DATE and TIMESTAMP. No _PARTITIONTIME pseudo-column. Two special partitioins are present __NULL__ and __UNPARTITIONED__.

- In the following command entrydate column is used to partition the data. Note the type of entrydate is date if you put any type apart from DATE and TIMESTAMP for the column which you gonna use for column partitioning table creation command will fail.

```
$ bq mk -t --time_partitioning_field=entrydate --description "This is my date partitioned table" --label organization:development test_dataset_1.my_table_2 entrydate:DATE,sales:integer,year:STRING
Table 'test-project1:test_dataset_1.my_table_2' successfully created.
```

- Injected two rows into this table.

```
$ bq show test_dataset_1.my_table_2
Table test-project1:test_dataset_1.my_table_2

   Last modified          Schema         Total Rows   Total Bytes   Expiration     Time Partitioning      Clustered Fields            Labels
 ----------------- -------------------- ------------ ------------- ------------ ------------------------ ------------------ --------------------------
  14 Jul 15:57:43   |- entrydate: date   2            44                         DAY (field: entrydate)                      organization:development
                    |- sales: integer
                    |- year: string
INSERT INTO test_dataset_1.my_table_2 (entrydate,sales,year) VALUES ("2019-05-23",70000,"2019")

$ bq query --nouse_legacy_sql 'SELECT * FROM test_dataset_1.my_table_2'
Waiting on bqjob_r18571ce0a2803f53_0000016bf006ae5c_1 ... (0s) Current status: DONE
+------------+-------+------+
| entrydate  | sales | year |
+------------+-------+------+
| 2019-04-23 | 70000 | 2019 |
| 2019-05-23 | 70000 | 2019 |
+------------+-------+------+
```

- To list all the partitions present in table, we have to use the legacy query.

```
$ bq query --use_legacy_sql 'SELECT * from [test_dataset_1.my_table_2$__PARTITIONS_SUMMARY__]'
Waiting on bqjob_r756ff0299392c7a3_0000016bf01f4b87_1 ... (0s) Current status: DONE
+------------+----------------+------------+--------------+---------------+---------------------+--------------------+-------------------------+
| project_id |   dataset_id   |  table_id  | partition_id | creation_time | creation_timestamp  | last_modified_time | last_modified_timestamp |
+------------+----------------+------------+--------------+---------------+---------------------+--------------------+-------------------------+
| test-project1 | test_dataset_1 | my_table_2 | 20190423     |<PHONE_NUMBER>838 | 2019-07-14 10:27:20 |<PHONE_NUMBER>031 |     2019-07-14 10:27:21 |
| test-project1 | test_dataset_1 | my_table_2 | 20190523     |<PHONE_NUMBER>653 | 2019-07-14 10:27:43 |<PHONE_NUMBER>872 |     2019-07-14 10:27:43 |
+------------+----------------+------------+--------------+---------------+---------------------+--------------------+-------------------------+

$ bq query --nouse_legacy_sql 'SELECT * FROM test_dataset_1.my_table_2 where entrydate = DATE("2019-04-23")'
Waiting on bqjob_rf7ca4e87c0d2571_0000016bf01a7b39_1 ... (0s) Current status: DONE
+------------+-------+------+
| entrydate  | sales | year |
+------------+-------+------+
| 2019-04-23 | 70000 | 2019 |
+------------+-------+------+
```

#### Clustered table

These tables are used to organize data based on columns when data is already segmented into paritioned tables. This helps to improve the performance of column based queries.


text:
Changelog
=========

## master

 - Allow `Introspect` to be imported in apps that support older platform versions.
 - Added Catalyst support in the Introspect iOS framework.

## [0.1.0]

 - Added `macOS` and `tvOS` support.

## [0.0.6]

 - Added `.introspectSegmentedControl()`.
 - Added `.introspectViewController()`.

## [0.0.5]

 - Allow `.introspectNavigationController()` on NavigationView directly.
 - Allow `.introspectTabBarController()` on TabView directly.

## [0.0.4]

 - Fix a bug in 0.0.4 that would not allow customization of root elements.

## [0.0.3]

 - Use `.overlay()` instead of `.background()` to not mess with list views.
   [#2](https://github.com/timbersoftware/SwiftUI-Introspect/issues/2)

## [0.0.2]

 - Added documentation for all methods.

## [0.0.1]

 - First release.

[0.1.0]: https://github.com/timbersoftware/SwiftUI-Introspect/releases/tag/0.1.0
[0.0.6]: https://github.com/timbersoftware/SwiftUI-Introspect/releases/tag/0.0.6
[0.0.5]: https://github.com/timbersoftware/SwiftUI-Introspect/releases/tag/0.0.5
[0.0.4]: https://github.com/timbersoftware/SwiftUI-Introspect/releases/tag/0.0.4
[0.0.3]: https://github.com/timbersoftware/SwiftUI-Introspect/releases/tag/0.0.3
[0.0.2]: https://github.com/timbersoftware/SwiftUI-Introspect/releases/tag/0.0.2
[0.0.1]: https://github.com/timbersoftware/SwiftUI-Introspect/releases/tag/0.0.1


text:
---
title: Installation
extends: _layouts.documentation
section: content
---

# Installation {#installation}

Laravel 6.0 or higher is needed.

Require the package using composer:

```php
composer require stancl/tenancy
```

Then run the following command:

```php
php artisan tenancy:install
```

It will create:

- migrations
- a config file (`config/tenancy.php`),
- a routes file (`routes/tenant.php`),
- and a service provider file `app/Providers/TenancyServiceProvider.php`

Then add the service provider to your `config/app.php` file:

```php
/*
 * Application Service Providers...
 */
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\TenancyServiceProvider::class, // <-- here
```

And finally, if you want to use a different central database than the one defined by `DB_CONNECTION` in the file `.env`, name your central connection (in `config/database.php`) `central` — or however else you want, but make sure it's the same name as the `tenancy.central_connection` config.

repository: stancl/tenancy-docs

gha_language: Blade

repo_name: stancl/tenancy-docs


text:
# GOV.UK Smoke Tests

Automated tests that describe high level user journeys which touch multiple
applications within the GOV.UK stack.

The master branch of the tests is frequently run in all environments, triggered by deployments of most GOV.UK applications, CDNs and associated dependencies ([check here](https://github.com/alphagov/govuk-puppet/search?l=HTML%2BERB&q=smokey)).

The tests also run in [a continuous Smokey loop](https://github.com/alphagov/govuk-puppet/blob/master/modules/monitoring/templates/smokey-loop.conf), using a version of the master branch [deployed by Jenkins each day](https://github.com/alphagov/govuk-puppet/blob/master/modules/govuk_jenkins/templates/jobs/smokey_deploy.yaml.erb). We use the Smokey loop to provide Icinga alerts for major features.

## Installation

Smokey requires Java to be installed, because of its use of the BrowserUp Proxy.

- On your host Mac, run `brew install adoptopenjdk`.

- If you don't have Homebrew installed, [download the Java JDK from the AdpotOpenJDK website](https://adoptopenjdk.net/).

After that, it's a standard Ruby setup: `bundle install`.

## Running the tests

The tests require additional configuration to run successfully on a local machine.

```
ENVIRONMENT=integration \
SIGNON_EMAIL="<email-address>" \
SIGNON_PASSWORD="<password>" \
AUTH_USERNAME="<username>" \
AUTH_PASSWORD="<password>" \
bundle exec cucumber
```

You can use the following environment variables to configure the tests:

* `ENVIRONMENT`: used to set environment variables for [Plek](https://github.com/alphagov/plek)
* `AUTH_USERNAME`: the HTTP Basic auth username (required for Integration)
* `AUTH_PASSWORD`: the HTTP Basic auth password (required for Integration)
* `SIGNON_EMAIL`: email address of a user with a Signon account in the environment the tests are being run in
* `SIGNON_PASSWORD`: password of a user with a Signon account in the environment the tests are being run in
* `RATE_LIMIT_TOKEN`: a token used to bypass the default rate limiting

## Layout

The smoke tests are based on [Cucumber](https://cucumber.io/) and [use Selenium to manipulate a headless Chrome browser](features/support/env.rb). We use feature
files to describe single applications (eg
[`whitehall`](https://github.com/alphagov/whitehall),
[`frontend`](https://github.com/alphagov/frontend)) or [cross-application behaviour](features/gov_uk.feature).

We configure Selenium with a BrowserUp Proxy. The proxy allows us to capture and check for asynchronous requests made by JavaScript in our app e.g. for analytics. It relates to the following files:

* `bin/browserup-proxy`: a runner script
* `lib/*`: JARs for BrowserUp Proxy and its dependencies

This repo also contains several scripts to support external systems running the tests and checking their output.

* `tests_json_output.sh`: used to run the Smokey loop and output JSON to a temporary file
* `nagios_check_cache.py`: used by Icinga to check for pass/fail statuses in the JSON in the temporary file
* `deploy.sh`: used by Jenkins to deploy Smokey in order to run the Smokey loop
* `jenkins.sh`: used by Jenkins to run a one-off Smokey e.g. after a deployment

## Further documentation

- [troubleshooting](docs/troubleshooting.md)
- [writing-tests](docs/writing-tests.md)
- [pr-template](.github/pull_request_template.md)

repository: hiroksarker/smokey

repo_name: hiroksarker/smokey


text:
# Enumerable
Enumerable is a python library that re-implements a few core features of python's functional toolbox to be more flexible and support a more transactional way of solving problems.  By design, these tools support method chaining and lazy evaluation.

# Installation
Installation is simple via pip.

`pip install enumerable`
# Examples of use

A common thing we do in python, especially in the IT world is for data processing.  Let's say you want to load a log file and filter for specific events and strip off the line endings for further processing:

```python
import re
from enumerable import map, filter, reduce
from operator import methodcaller

# Assume a log format along the lines of:
# CRITICAL - [5:17:2015] - <error details>
# WARNING - [2:2:2016] - <warning details>
# SUCCESS - [8:24:2017] - <success details>
with open("log.txt", 'r') as log:
    def date(log_line, timestamp):
        return timestamp in log_line

    def critical_error(log_line):
        return re.search("^CRITICAL", log_line)

    # Get today's critical errors and strip
    # strip the line endings
    results = filter(log, date, "[3:29:2017]") \
        .filter(critical_error) \
        .map(methodcaller('strip'))

for line in results:
    <do something>
```

Map, Fold, and Reduce are currently provided and they are all lazy evaluated and support method chaining.

```python
>>> import operator
>>> from enumerable import map, filter, reduce
>>>
>>> my_list = [1, 2, 3, 4, 5]
>>> # Notice that any additional arguments passed to map/filter/reduce
... # are then passed to the provided function.
... map(my_list, operator.pow, 2).to(tuple)
(1, 4, 9, 16, 25)
>>>
```

repository: brenttaylor/enumerable

repo_name: brenttaylor/enumerable


text:
---
title: 374. Jesus, With Thy Church Abide - Seventh Day Adventist Hymnal
metadata:
    description: |
      SDAH 374. Jesus, With Thy Church Abide. 1. Jesus, with Thy church abide; Be her Savior, Lord, and Guide, While on earth her faith is tried: We beseech Thee, hear us.
    keywords:  |
      SDAH, Seventh Day Adventist Hymnal, adventhymnals, advent hymnals, Jesus, With Thy Church Abide, Jesus, with Thy church abide;
    author: Brian Onang'o
---

#### Advent Hymnals
## 374. JESUS, WITH THY CHURCH ABIDE
#### Seventh Day Adventist Hymnal

```txt

1.
Jesus, with Thy church abide;
Be her Savior, Lord, and Guide,
While on earth her faith is tried:
We beseech Thee, hear us.

2.
May her voice be ever clear,
Warning of a judgment near,
Telling of a Savior dear:
We beseech Thee, hear us.

3.
May she guide the poor and blind,
Seek the lost until she find,
And the broken hearted bind:
We beseech Thee, hear us.

4.
May she holy triumps win,
Overthrow the hosts of sin,
Gather all the nations in:
We beseech Thee, hear us.

```

- |   -  |
-------------|------------|
Title | Jesus, With Thy Church Abide |
Key |  |
Titles | undefined |
First Line | Jesus, with Thy church abide; |
Author |
Year |
Composer|  |
Hymnal|  - |
Tune|  |
Metrical pattern | |
# Stanzas |  |
Chorus |  |
Chorus Type |  |
Subjects |  |
Texts |  |
Print Texts |
Scripture Song |  |

repository: GospelSounders/adventhymnals

repo_name: GospelSounders/adventhymnals