text:
# Repeater

Repeater field is one of the most powerful Alchemy Options fields. Alongside the [Sections](sections.md) and [Field Group](field-group.md) fields it groups fields and allows to [produce arrays of values](repeater.md#return-value).

## Features:

* Can be [sorted by drag-and-drop](repeater.md#sorting).
* Can [temporarily remove values](repeater.md#temporary-hiding) from the front end.
* Can [copy items](repeater.md#copying-a-repeatee).
* Can repeat items of [different types](repeater.md#typed-repeaters).

2 things were taken as the pillars of a repeater:

1. [Reusability](repeater.md#reusing-the-repeaters-signature) of a repeater's signature \(both in Options and [Meta Boxes](../meta-boxes.md)\)
2. Possibility to [nest repeaters](repeater.md#nested-repeaters) into one another

Thus a repeater field consists of 2 parts: a\) the field itself and b\) its signature \(like a mould for the field\).

## Repeater signatures

All repeater signatures should be specified in their own config in the `init` callback. Like so:

```php
function add_custom_repeaters() {
    if( ! class_exists( 'Alchemy_Options\Includes\Repeaters' ) || wp_doing_ajax() ) {
        return;
    }

    $repeaters = array(
        array(
            'id' => 'repeater-one',
            'fields' => array(
                array(
                    'title' => 'My content title',
                    'desc' => 'Short description for the field',
                    'id' => 'description',
                    'type' => 'editor',
                ),
            ),
        ),
    );

    new Alchemy_Options\Includes\Repeaters( $repeaters );
}

add_action( 'init', 'add_custom_repeaters' );
```

Each signature is an array with [`id` and `fields` keys](repeater.md#signature-params). Much like the [Field Group](field-group.md) field.

The fields themselves are added just like any other fields in the `options` part of the main config with one exception - the type of the field should be in the following format: `repeater:signatureID`.

Since the [Sections](sections.md) field is primarily for aesthetic grouping, it cannot be used within the Repeater.

Enough talking, let's see some code :\)

## Example configuration

Considering we have the [signatures](repeater.md#repeater-signatures) as above.

```php
...
'options' => array(
    array(
        'title' => 'My repeater field title',
        'id' => 'repeater-field',
        'desc' => 'Short description for the field',
        'type' => 'repeater:repeater-one',
        'tab' => 'homepage',
    ),
),
...
```

This will produce the following

![](../.gitbook/assets/repeater-one.png)

Doesn't look like much unless you click the `Add new` button which will result in the following

![](../.gitbook/assets/repeater-two.png)

Thus pressing the `Add new` button again and again will generate as many items \(a.k.a. 'repeatees'\) as needed.

Note that although I've specified one field in the configuration above \(which is the [Editor field](editor.md)\) **2** of them are present on the screenshot. The `title` field is there by default and will show the value in the title bar of the repeatee as soon as you type something in. Repeatees would have been harder to distinguish if they weren't 'labeled'.

![](../.gitbook/assets/repeater-three.png)

## Sorting

Single click on the toolbar will toggle the visibility of the item, while click and drag will allow to sort

![](../.gitbook/assets/repeater-four.png)

You can sort 'closed' items or 'open' it doesn't matter.

## Temporary hiding

If you hover over or expand a repeatee there's a button group that allows to delete or to temporarily hide it. If you press the `Hide` button, the repeatee's value will not be included in the return value and the item itself will indicate that it's hidden.

![](../.gitbook/assets/repeater-five.png)

## Copying a repeatee

If you press the Copy button, it'll work as expected and will produce an exact copy of the repeatee below it. If the target repeatee is hidden, the resulted copy will be hidden as well.

## Reusing a repeater's signature

Since repeaters' signatures are defined in their own config it allows developers to reuse a repeater's signature to create several repeater fields.

E.g. the following configuration

```php
...
'options' => array(
    array(
        'title' => 'My repeater field title',
        'id' => 'repeater-field',
        'desc' => 'Short description for the field',
        'type' => 'repeater:my-repeater',
        'tab' => 'homepage',
    ),
    array(
        'title' => 'Another repeater field',
        'id' => 'repeater-field-two',
        'desc' => 'Short description for the field',
        'type' => 'repeater:my-repeater',
        'tab' => 'homepage',
    ),
),
...
```

will create two separate repeater fields with identical fields using the same signature

![](../.gitbook/assets/repeater-six.png)

## Nested repeaters

You can nest repeaters, make sure that the repeaters' signatures are not nested. Here's an example of a repeater inside a repeater inside a repeater \(that's right - 3 levels deep\)

### Repeaters signatures:

```php
...
    array(
        'id' => 'my-repeater',
        'fields' => array(
            array(
                'title' => 'My upload title',
                'id' => 'upload',
                'desc' => 'Short description for the field',
                'type' => 'repeater:upload-repeater',
            ),
        ),
    ),
    array(
        'id' => 'upload-repeater',
        'fields' => array(
            array(
                'title' => 'My upload title',
                'desc' => 'Short description for the field',
                'id' => 'upload',
                'type' => 'upload',
            ),
            array(
                'title' => 'My select title',
                'id' => 'checks',
                'desc' => 'Short description for the field',
                'type' => 'repeater:select-repeater',
            ),
        ),
    ),
    array(
        'id' => 'select-repeater',
        'fields' => array(
            array(
                'title' => 'My upload title',
                'desc' => 'Short description for the field',
                'id' => 'select',
                'type' => 'select',
                'choices' => ['Label one', 'Label two', 'Label three']
            ),
        ),
    ),
...
```

### Options:

```php
...
'options' => array(
    array(
        'title' => 'My repeater field title',
        'id' => 'repeater-field',
        'desc' => 'Short description for the field',
        'type' => 'repeater:my-repeater',
        'tab' => 'homepage',
    ),
),
...
```

![](../.gitbook/assets/repeater-seven.png)

Note that all 3 different signatures are top level \(not nested\) but the `fields` part reference them. Thus creating the needed nesting.

## Typed repeaters

A repeater field can repeat values of different types. It has a slightly different config signature that has `field-types` instead of `fields` in it. Each `field-type` should have a unique `id`, nice `title` \(that will be seen on the front end\) and the `fields` key that has regular options settings. E.g.

### Repeaters signatures:

```php
...
array(
    'id' => 'my-repeater',
    'field-types' => array(
        array(
            'id' => 'wysiwyg',
            'title' => 'Description as a WYSIWYG',
            'fields' => array(
                array(
                    'title' => 'Editor',
                    'id' => 'editor',
                    'type' => 'editor',
                ),
            ),
        ),
        array(
            'id' => 'textarea',
            'title' => 'Description as a textarea',
            'fields' => array(
                array(
                    'title' => 'Editor',
                    'id' => 'editor',
                    'type' => 'textarea',
                ),
            ),
        ),
    ),
),
...
```

### Options:

```php
array(
    'title' => 'My from-type repeater',
    'desc' => 'Choose which type to add',
    'id' => 'from-type-repeater',
    'type' => 'repeater:my-repeater',
),
```

These settings will produce the following:

![](../.gitbook/assets/from-type-repeater-one.png)

Clicking any of the types will produce repeatees of the respective type. Since it's a repeater field you can mix and match repeatees of various types under one option ID.

![](../.gitbook/assets/from-type-repeater-two.png)

Kinda nice, huh? :\)

## Params

| Name | Type | Description |
| :--- | :--- | :--- |
| `type` | string | `repeater:signatureID`. [Signature ID](repeater.md#repeater-signatures) should match one from the repeaters config. **\(required\)** |
| `id` | string | Unique ID that will be used to retrieve the value **\(required\)** |
| `tab` | string | Specifies in which tab this option will be rendered |
| `title` | string | Shows a heading to the left of the field |
| `desc` | string | Shows a description text \(can have HTML\) |

## Simple signature params

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | string | Unique ID that will be used in the `type` parameter of the field **\(required\)** |
| `fields` | array | Array of fields usual configurations. Can have [nested repeater fields](repeater.md#nested-repeaters). Ignores the [Sections](sections.md) field. **\(required\)** |

## Typed repeater signature params

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | string | Unique ID that will be used in the `type` parameter of the field **\(required\)** |
| `field-types` | array | Configurations for each repeatee type, which is an array consisting of the required `id`, `title` and `fields` keys. See [an example](repeater.md#typed-repeaters) above. **\(required\)** |

## Return value

Repeater field returns an array of associative arrays where array keys are the signature's fields IDs. The results will not include the [hidden repeatees](repeater.md#temporary-hiding).

A nested sample config above may return something as follows:

```php
Array
(
    [0] => Array
        (
            [title] => Level one
            [upload] => Array
                (
                    [0] => Array
                        (
                            [title] => Level two
                            [upload] =>
                            [checks] => Array
                                (
                                    [0] => Array
                                        (
                                            [title] => Level three
                                            [select] => Label one
                                        )
                                )
                        )
                )
        )
    [1] => Array
        (
            [title] => Another field
            [upload] => Array
                (
                )
        )
)
```

## Typed repeaters return value

Typed arrays return an array with `type` and `value` fields, `type` is the field type ID you specified in the settings and `value` is a regular repeater return value.

repository: AlchemyOptions/docs

repo_name: AlchemyOptions/docs


text:
# Alignments

These directories hold Turtle-based alignments between Brick and other ontologies, as well as the auxiliary files needed to generate those alignments where necessary.

Alignments should be distributed as Turtle files with a specific naming schema. For an ontology `X`, the alignment file should be `Brick-X-alignment.ttl`.

repository: JoelBender/Brick

branch_name: refs/heads/master

extension: md

gha_license_id: NOASSERTION

license_type: permissive

repo_name: JoelBender/Brick


text:
A Convenient Command-line Dicebag
===

Haven't you always wished that you could roll dice in the command line?  Haven't you always wished you could just type `1d10 14d4 +23` and have it just WORK?

Well then this is the dicebag for you. It even allows you to define custom dice, so you can type in `dagger sneak-attack` and have it roll `1d4 3d6 +2`, or for those of us who like to be concise, `d sa`.

Usage
===

Note: YOU MUST USE PYTHON 3.x TO RUN THIS

To start the program, run `python3 dicebag.py [filename]` where filename is the optional name of the file that contains custom dice definitions.

For basic usage, just type out whatever dice you want to roll. Dice are seperated by spaces, and in the format `xdy`, where x is the number of dice you wish to roll, and y is the number of sides each dice has. Modifiers start with a `+` or `-`, and are just integers that are added to the final result. To roll a custom die, just type its name, for instance `dagger`.

The commands available are `new`, `del`, `open`, `list`, `roll`, and `exit`.

`new` creates or modifies a custom die.  Example usage: `del dagger`.

`open` reads a file containing descriptions for custom dice. Example usage: `open leo.dice`.

`list` prints out all the custom dice you have defined. Example usage: `list`.

`roll` rolls dice. Typing in `roll dagger` is the same as typing in `dagger`, so this is fairly superfluous. Example usage: `roll dagger 1d6 +10`, or `dagger 1d6 +10`.

`exit` exits the program, automatically saving if you have already opened a file or prompting to save if you haven't. Example usage: `exit`.

Forking
===

Feel free to fork this, and if you do anything interesting with it send me a pull request.

license: MIT

repository: olynch/dicebag

repo_name: olynch/dicebag


text:
# Web-Based-Augmented-Reality-Applications-With-WebXR
Web-Based Augmented Reality applications with WebXR

This project is related to the following article: https://my-first-project.dev/2019/12/13/web-based-augmented-reality-applications-with-webxr/

gha_language: TypeScript

gha_license_id: MIT


text:
---
layout: post
title: Daily Bits - December 2022
date: '2022-12-01 07:23'
tags:
  - daily bits
categories:
  - Daily Bits
---

20221227

- Read Ch.10 of "The Disordered Cosmos."

---

20221221

- Added transcriptome assembly info to [The Handbook](https://robertslab.github.io/resources/bio_Transcriptome-assembly/).

---

20221219

- Finished notebook entries for [Haws `epidiverse/snp` analysis using default config](https://robertslab.github.io/sams-notebook/2022/12/14/BS-Seq-Analysis-Nextflow-EpiDiverse-SNP-Pipeline-for-Haws-Hawaii-C.gigas-BAMs-from-Yaamini.html), as well as a [run with a modified config file](https://robertslab.github.io/sams-notebook/2022/12/15/BS-Seq-Analysis-Nextflow-EpiDiverse-SNP-Pipeline-for-Haws-Hawaii-C.gigas-BAMs-from-Yaamini-Base-Config.html) to compare runtimes. Spoiler: Default config file is significantly faster (less than half the runtime) than the modified config file I created.

- Lab meeting:

  - Matt talked about ANOVA stuff.

    - Provided [helpful guide he wrote up](https://mattgeorgephd.github.io/ANOVA-guide/).

---

20221216

- Science Hour

  - Looked through plottin Aidan's crab data with Steven.

  - Steven eventually utilized Weka machine learning to mess around wih Aidan's data, too.

---

20221215

- Ran `epidiverse/snp` pipeline on [Haws' lab _C.gigas_ Hawaii BAM files for Yaamini](https://github.com/RobertsLab/resources/issues/1558). using the base config file to compare runtime to the modified config file I used yesterday.

  - This actually completed in 12hrs, whereas the run using the modified config file took ~31hrs...

- Pub-a-thon

---

20221214

- Got `epidiverse/snp` pipeline on [Haws' lab _C.gigas_ Hawaii BAM files for Yaamini](https://github.com/RobertsLab/resources/issues/1558).

---

20221213

- Mox maintenance today slowed effort to run some jobs.

- Worked on getting script/config files ready to run `epidiverse/snp` pipeline on [Haws' lab _C.gigas_ Hawaii BAM files for Yaamini](https://github.com/RobertsLab/resources/issues/1558).

---

20221213

- Read Ch.9 of "The Disordered Cosmos" for lab meeting.

- Lab meeting.

---

20221209

- Science Hour

  - Worked extensively with Olivia and Steven regarding her citrate synthase assay data and analysis.

---

20221208

- Participated in Katie Lotterhos workshop for designing Apps from Google Sheets.

- Met with Linda Rhodes to discuss future of projects.

  - Decision to cancel weekly meetings - will utilize GitHub issues instead.

  - I'm going to try to figure out why new Silva 138 database doesn't work as well as the old 132, in her pipeline.

20221207

- Finally resolved [CEABIGR mean methylation coefficient of methylation calcs](https://github.com/sr320/ceabigr/blob/main/code/40-gene-methylation.Rmd) (GitHub; R Markdown)! And, I figured it out in a very satisfactory, clean way! Looks great, easy to read, easy to follow, and concise.

---

20221202

- Worked on CEABIGR mean methylation coefficient of variation stuff - getting frustrating, but getting closer!

- Science Hour

- CEABIGR meeting with Sam Brogan and Steven.

---

20221201

- Worked on CEABIGR mean methylation coefficient of variation stuff - getting frustrating, but getting closer!

- Helped Emma for awhile troubleshooting an issue with [`TrimGalore`](https://github.com/FelixKrueger/TrimGalore).

repository: RobertsLab/sams-notebook

gha_language: Shell

repo_name: RobertsLab/sams-notebook


text:
Perloku
=======

Deploy Perl applications in seconds.

## Step 1

Generate app:

```
mojo generate lite_app app.pl
```

## Step 2

Create a Makefile.PL with your dependencies:

```
mojo generate makefile
```

Alternately, you may create a
[cpanfile](http://search.cpan.org/~miyagawa/Module-CPANfile-1.0002/lib/cpanfile.pod)
that lists dependencies instead:

```
requires 'Mojolicious';
```

## Step 3

Create an executable file called Perloku which runs a server on the port
given as an enviroment variable:

```sh
echo '#!/bin/sh' > Perloku
echo './app.pl daemon --listen http://*:$PORT' >> Perloku
chmod +x Perloku
```

## Step 4

Deploy:

```sh
git init
git add .
git update-index --chmod=+x Perloku (only if using Windows)
git update-index --chmod=+x app.pl (only if using Windows)
git commit -m "Initial version"
heroku create -s cedar --buildpack https://github.com/valchonedelchev/perloku.git
git push heroku master
```

Watch:

```
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 808 bytes, done.
Total 5 (delta 0), reused 0 (delta 0)

-----> Heroku receiving push
-----> Fetching custom buildpack... done
-----> Perloku app detected
-----> Vendoring Perl
       Using Perl 5.16.2
-----> Installing dependencies
       --> Working on /tmp/build_19tm6pb8ch1qa
       Configuring /tmp/build_19tm6pb8ch1qa ... OK
       ==> Found dependencies: Mojolicious
       --> Working on Mojolicious
       Fetching http://search.cpan.org/CPAN/authors/id/T/TE/TEMPIRE/Mojolicious-2.48.tar.gz ... OK
       Configuring Mojolicious-2.48 ... OK
       Building Mojolicious-2.48 ... OK
       Successfully installed Mojolicious-2.48
       <== Installed dependencies for /tmp/build_19tm6pb8ch1qa. Finishing.
       1 distribution installed
       Dependencies installed
-----> Discovering process types
       Procfile declares types   -> (none)
       Default types for Perloku -> web
-----> Compiled slug size is 12.4MB
-----> Launching...gi done, v5
       http://perloku-example.herokuapp.com deployed to Heroku

To git@heroku.com:perloku-example.git
 * [new branch]      master -> master
```

[Enjoy!](http://perloku-example.herokuapp.com)

repository: valchonedelchev/perloku

repo_name: valchonedelchev/perloku


text:
---
title: "camldbm"
no_index: true
---

This OCaml library is a binding to the NDBM/GDBM Unix "databases".  It provides persistent storage of key-value pairs of strings.  This project is now on http://github.com/ocaml/dbm

* Admins:
  * [user216](/users/user216)
* Members:
  * [user216](/users/user216)
  * [user218](/users/user218)
* [Releases](https://download.ocamlcore.org/camldbm)
* Registered: 2011-11-22 13:43:06
* Archived data:
  * 0 open bugs
  * 0 open feature requests
  * 0 mailing list
  * 1 VCS
  * 1 released files

gha_language: Python


text:
#### Building
* Clone repository
```
./gradlew buildWeb
```

* That's it. Now you can open `todo/build/classes/main/index.html` to see the example Todo application.
* Open `build.gradle` in IntelliJ, make project will overwrite generated js, so just refresh in browser

repository: LoginovKonstantin/MultiModuleProj

repo_name: LoginovKonstantin/MultiModuleProj


text:
Introduction
============

The DDNet teehistorian format is the format which DDNet uses to save all input
to a server in order to be able to reproduce it faithfully. A teehistorian file
is fundamentally a stream of messages that describe input to the server and a
little data for sanity checks.

The format is designed in a way to make it easily compressible using standard
compression algorithms in order to make it suitable for long-term storage,
which Teeworlds demos are not due to their large size. It is easy to write out
in a stream (you just append data at the end) but for reading, one has to read
the whole file end-to-end because the format does not support seeking.

This document describes version 1 and 2 of the teehistorian file format. The
only difference between them is the existence of the `EX` message (see below).

Format
======

A teehistorian file is fundamentally a header followed by a stream of messages.

Header
------

The header starts with the teehistorian UUID
(699db17b-8efb-34ff-b1d8-da6f60c15dd1, version 3 UUID derived from the
Teeworlds namespace e05ddaaa-c4e6-4cfb-b642-5d48e80c0029 and the name
"teehistorian@ddnet.tw"), encoded as a [big endian binary encoded
UUID](https://en.wikipedia.org/w/index.php?title=Universally_unique_identifier&oldid=844235295#Encoding)
(16 bytes). It is followed by a null-terminated string that contains a JSON
object containing at least the following keys:

* `version`: This is the version number of the teehistorian format. It must be
  `"1"` or `"2"` for this document.

Messages
--------

Each message starts with a Teeworlds variable-width integer, which is the
message ID.

* PLAYER_DIFF(0-63): dx(int) dy(int) records that player with the message ID as cid (client ID) has changed position in a way that adds dx to the x coordinate and y to the y coordinate
* FINISH(-1): records the end of the teehistorian file
* TICK_SKIP(-2): dt(int) records that there were dt ticks in which nothing happened, i.e. the next tick is the last tick + dt + 1
* PLAYER_NEW(-3): cid(int) x(int) y(int) records that a new player character with cid appeared at (x, y)
* PLAYER_OLD(-4): cid(int) records that the player character with cid disappeared
* INPUT_DIFF(-5): cid(int) dinput(int[10]) records that a player with cid sent an input packet but has sent one before, add dinput to the previous input component-wise to obtain the new one
* INPUT_NEW(-6): cid(int) input(int[10]) records that a player with cid sent an input packet for the first time, containing input
* MESSAGE(-7): cid(int) msgsize(int) msg(raw[msgsize]) records that a player with cid sent a game-related packet msg
* JOIN(-8): cid(int) records that a player with cid joined, on the engine level
* DROP(-9): cid(int) reason(str) records that a player with cid left/was kicked/was dropped, on the engine level
* CONSOLE_COMMAND(-10): cid(int) flags(int) cmd(str) num_args(int) args(str[num_args]) records that a console command cmd was executed by client id cid (not necessarily a player, might be a vote as well), with flags (distinguishes chat commands, etc.) with parameters args
* EX(-11): uuid(uuid) size(int) data(raw[size]) records an extension message, identified by uuid and containing data
  * introduced in DDNet 11.0.3, [6c378b972b70b055](https://github.com/ddnet/ddnet/commit/6c378b972b70b0556d3b434b26baa0b9ffe490f1)

The following extra messages are known right now:
* TEST(teehistorian-test@ddnet.tw): is just a test message
  * uuid: 6bb8ba88-0f0b-382e-8dae-dbf4052b8b7d
  * introduced in DDNet 11.0.3, [6c378b972b70b055](https://github.com/ddnet/ddnet/commit/6c378b972b70b0556d3b434b26baa0b9ffe490f1)
* DDNETVER_OLD(teehistorian-ddnetver-old@ddnet.tw): cid(int), version(int)
  * uuid: 41b49541-f26f-325d-8715-9baf4b544ef9
  * introduced in DDNet 13.2, [0d7872c79eaeb19b](https://github.com/ddnet/ddnet/commit/0d7872c79eaeb19b3fd08c39c013a1043db1fd9b)
* DDNETVER(teehistorian-ddnetver@ddnet.tw): cid(int), connection_id(uuid), version(int), version_str(str)
  * uuid: 1397b63e-ee4e-3919-b86a-b058887fcaf5
  * introduced in DDNet 13.2, [0d7872c79eaeb19b](https://github.com/ddnet/ddnet/commit/0d7872c79eaeb19b3fd08c39c013a1043db1fd9b)
* AUTH_INIT(teehistorian-auth-init@ddnet.tw): cid(int) level(int) auth_name(str) records that a player with cid got rcon access with level under the account name auth_name since the start of the map (because they had it before the map change as well)
  * uuid: 60daba5c-52c4-3aeb-b8ba-b2953fb55a17
  * introduced in DDNet 11.0.3, [1c3dc8c316c2bf37](https://github.com/ddnet/ddnet/commit/1c3dc8c316c2bf37b94814d390c1c214422d46a9)
* AUTH_LOGIN(teehistorian-auth-login@ddnet.tw): cid(int) level(int) auth_name(str) records that a player with cid just logged into rcon with level under the account name auth_name
  * uuid: 37ecd3b8-9218-3bb9-a71b-a935b86f6a81
  * introduced in DDNet 11.0.3, [1c3dc8c316c2bf37](https://github.com/ddnet/ddnet/commit/1c3dc8c316c2bf37b94814d390c1c214422d46a9)
* AUTH_LOGOUT(teehistorian-auth-logout@ddnet.tw): cid(int) records that a player with cid just logged out of rcon
  * uuid: d4f5abe8-edd2-3fb9-abd8-1c8bb84f4a63
  * introduced in DDNet 11.0.3, [1c3dc8c316c2bf37](https://github.com/ddnet/ddnet/commit/1c3dc8c316c2bf37b94814d390c1c214422d46a9)
* JOINVER6(teehistorian-joinver6@ddnet.tw): cid(int)
  * uuid: 1899a382-71e3-36da-937d-c9de6bb95b1d
  * introduced in DDNet 14.0, [e294da41ba7142cb](https://github.com/ddnet/ddnet/commit/e294da41ba7142cb583a5dd2eab45af2ec9a8447)
* JOINVER7(teehistorian-joinver7@ddnet.tw): cid(int)
  * uuid: 59239b05-0540-318d-bea4-9aa1e80e7d2b
  * introduced in DDNet 14.0 [e294da41ba7142cb](https://github.com/ddnet/ddnet/commit/e294da41ba7142cb583a5dd2eab45af2ec9a8447)
* TEAM_SAVE_SUCCESS(teehistorian-save-success@ddnet.tw): team(int), save_id(uuid), save(str)
  * uuid: 4560c756-da29-3036-81d4-90a50f0182cd
  * introduced in DDNet 14.0.2, [d8aab366fc8489c8](https://github.com/ddnet/ddnet/commit/d8aab366fc8489c8cba4c77d73a6a7bfcce83bbc)
* TEAM_SAVE_FAILURE(teehistorian-save-failure@ddnet.tw): team(int)
  * uuid: b29901d5-1244-3bd0-bbde-23d04b1f7ba9
  * introduced in DDNet 14.0.2, [d8aab366fc8489c8](https://github.com/ddnet/ddnet/commit/d8aab366fc8489c8cba4c77d73a6a7bfcce83bbc)
* TEAM_LOAD_SUCCESS(teehistorian-load-success@ddnet.tw): team(int), save_id(uuid), save(str)
  * uuid: e05408d3-a313-33df-9eb3-ddb990ab954a
  * introduced in DDNet 14.0.2, [d8aab366fc8489c8](https://github.com/ddnet/ddnet/commit/d8aab366fc8489c8cba4c77d73a6a7bfcce83bbc)
* TEAM_LOAD_FAILURE(teehistorian-load-failure@ddnet.tw): team(int)
  * uuid: ef8905a2-c695-3591-a1cd-53d2015992dd
  * introduced in DDNet 14.0.2, [d8aab366fc8489c8](https://github.com/ddnet/ddnet/commit/d8aab366fc8489c8cba4c77d73a6a7bfcce83bbc)
* TEEHISTORIAN_PLAYER_TEAM(teehistorian-player-team@ddnet.tw): cid(int), team(int) records team changes
  * uuid: a111c04e-1ea8-38e0-90b1-d7f993ca0da9
  * introduced in DDNet 15.6, [e9dec007b22a071e](https://github.com/ddnet/ddnet/commit/e9dec007b22a071e9d104682955c952633455c27)
* TEEHISTORIAN_TEAM_PRACTICE(teehistorian-team-practice@ddnet.tw): team(int), practice(int) records when a team enters practice mode, resulting ranks don't get submitted to the database
  * uuid: 5792834e-81d1-34c9-a29b-b5ff25dac3bc
  * introduced in DDNet 15.6, [81f4263428069526](https://github.com/ddnet/ddnet/commit/81f426342806952603a2d28290279e0a7107db5b)
* TEEHISTORIAN_PLAYER_READY(teehistorian-player-ready@ddnet.tw): cid(int) records when the client messages that it is ready to join the game, leading to the tee being spawned in the following tick
  * uuid: 638587c9-3f75-3887-918e-a3c2614ffaa0
  * introduced in DDNet 16.0, [3ea55dcc0ebc1c79](https://github.com/ddnet/ddnet/commit/3ea55dcc0ebc1c791e11cab0c268febe7e783504)
* TEEHISTORIAN_PLAYER_SWITCH("teehistorian-player-swap@ddnet.tw): cid1(int), cid2(int) records the ids of players swapping tees
  * uuid: 5de9b633-49cf-3e99-9a25-d4a78e9717d7
  * introduced in DDNet 16.1, [86f57289c6ff1926](https://github.com/ddnet/ddnet/commit/86f57289c6ff1926e1e9802de33ceae69a026717)

The following data types are used:
* int is a [teeworlds variable-width integer](int.md)
* str is a null-terminated string
* raw[size] is simply size bytes
* str[num_args] is num_args null-terminated strings
* uuid is 16 bytes of a UUID

the UUIDs are version 3 UUIDs, with the teeworlds namespace e05ddaaa-c4e6-4cfb-b642-5d48e80c0029
a tick is implicit in these messages when a player with lower cid is recorded using any of PLAYER_DIFF, PLAYER_NEW, PLAYER_OLD
e.g.
PLAYER_DIFF cid=0 … PLAYER_NEW cid=5 … PLAYER_OLD cid=3 has an implicit tick between the cid=5 and the cid=3 message
another correction:
the header is the teehistorian uuid followed by a zero-terminated string containing json in a self-explanatory format

gha_language: Rust


text:
# Passalora circumscissa (Sacc.) U. Braun, 1995 SPECIES

#### Status
SYNONYM

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

#### Published in
Mycotaxon 55: 230 (1995)

#### Original name
Cercospora circumscissa Sacc., 1878

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Dothideomycetes/Capnodiales/Mycosphaerellaceae/Mycosphaerella/Mycosphaerella cerasella/ Syn. Passalora circumscissa/README.md

repo_name: mdoering/backbone


text:
# Verifiable Credentials Sample Issuer Deployment script

This is an ARM Template for deploying Azure resources that are needed to start issuing your own Verifiable Credentials from an Azure AD tenant. It will not register the application you need in your Azure AD B2C tenant.

In the screenshots below uses the name `ContosoEmployee`. For your B2C deployment you should consider using a name like `ContosoMembershipClub`, etc.

## Make sure you have an Azure AD Premium tenant
First, you need to make sure that you are using Azure Active Directory P1 or P2. If you don't have a P1/P2, Verifiable Credentials will not work. You can find out if you have a P1/P2 in the overview section of the Acure Active Directory blade in portal.azure.com

## Verify you can see Enterprise Application Verifiable Credentials Issuer Service
Second, you need to make sure you see the application named `Verifiable Credentials Issuer Service` in the `Enterprise Application` section in the AAD blade. Switch to Type = `Microsoft Application` and search for it.

![Verifiable Credentials Issuer Service](/media/admin-screenshot-search-apps.png)

## Run the deployment script
In order to run this script, you need to have access to an Azure subscription that uses the intended Azure Active Directory as its authorative directory. If the subscription you intend to use is protected by another directory, you will not be able to issue credentials.

You need the [Azure Az](https://docs.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-5.6.0) powershell module installed and a user account with permissions to both create the Azure Key Vault + Storage Accounts and register the sample VC Issuer application.

You should make sure that you can connect to your subscription via running

```powershell
Connect-AzAccount -SubscriptionId <your-subscription-guid>
```

Then run the below command after replacing the respective parameters with the names of your choice.

```powershell
.\DID-deploy-issuer.ps1 -ResourceGroupName "did-rg" -Location "West Europe" `
         -KeyVaultName "did-kv" -StorageAccountName "didstg" `
         -IssuerAppName "VC Issuer Sample" -VCType "ContosoEmployee" -GenerateConfigFiles
```

**PLEASE NOTE** you need to change `KeyVaultName` and the `StorageAccountName` to be globally unique.

The script will:
- Register an app in Azure AD for your VC Issuer sample (the -IssuerAppName parameter).
- Create the Resource Group, if it not already exists
- Deploy the ARM template which will create:
    - An Azure Key Vault instance and create Access Policies for you as an admin and for the `Verifiable Credentials Issuer Service` app
    - An Azure Storage Account with one private container and one public. The private will later store your Rules & Display file while the public will host your VC card's logo image.
- Assign the permission `Storage Blob Data Reader` to the `Verifiable Credentials Issuer Service` service principal for the storage account so that it can read the Rules & Display files.
- Generate template json files:
    - didconfig.json - used by the VC Issuer sample (you need to update this file after completing the below steps)
    - Rules file - A file that binds your VC Issuar Sample app to your Azure AD tenant. The generated Rules file contains some extra claims to illustrate how that can be done
    - Display file - The visual design of your VC card that controls how it is displayed in the Microsoft Authenticator app.

## Register your organization for Verifiable Credentials and set your KeyVault

Next step is to complete the Verifiable Credentials configuration in portal.azure.com in the [VC blade](https://portal.azure.com/?Microsoft_AAD_DecentralizedIdentity=preview#blade/Microsoft_AAD_DecentralizedIdentity/InitialMenuBlade/cardsListBlade).

![Getting Started](/media/admin-screenshot-vc-getting-started.png)

In the `Getting Started` section, you define
- Organization name
- Domain
- Key Vault - here you need to select the Key Vault instance that was created above. Since the ARM Template gave you and the `Verifiable Credentials Issuer Service` app the permissions needed, this should work. If it doesn't, it is a permission problem and you need to check the Access Policies on Key Vault.

In the `Credentials` section, you configure the Verifiable Credential you want to issue. The name you give to the credential should match the `-VCType` parameter you used when you invoked the powershell script above.

![Getting Started](/media/admin-screenshot-create-credential.png)

## Design and Upload your VC Rules and Display files to your Azure Storage Account

Open the Rules & Display json files and make any changes you see needed. This may include adding or removing any claims from your Azure AD tenant that you would like to include in the VC. In the display file, you might also want to specify your color and logo, etc.

When you are done, go to the `Properties` part in the `VC Blade` in portal.azure.com and upload the respective files. If you later make changes, you can upload them again, but if you do, it will take a few minutes for the changes to be picked up. You can use the `Issuer Credential URL` and open it in a browser to see if your added claims are there.

## Clone the Issuer sample, change config and run it

Finally, it is time to git clone the [VC Issuer sample](https://github.com/Azure-Samples/active-directory-verifiable-credentials) and follow the instructions for how to get that up and running. The `didconfig.json` template file that the deployment script generated should replace the file in the [issuer/didconfig.json](https://github.com/Azure-Samples/active-directory-verifiable-credentials/blob/main/issuer/didconfig.json) file.

![Getting Started](/media/admin-screenshot-issuer-details.png)

There are three additional changes you need to do:
- kvSigninKeyId - see explanation below
- kvRemoteSigningKeyId - You find this in the Azure Key Vault instance you created under the `Keys` section. After you connected your VC instance to KeyVault, it creates three keys. The one to copy has a name that starts with `issuerSigningKeyIon-...`.
- did - You will find the value to use here in the Overview section of your Credential in the `VC Blade` labeled as `Issuer Identifier`. It is a long string that starts with `did:ion:`

To get your `kvSigninKeyId`, you can do the following
- Copy the `Issuer Identifier` (long string that starts with did:ion:...)
- Open the browser and navigate to `https://beta.discover.did.microsoft.com/1.0/identifiers/did:ion:....`
- Find the `verificationMethod` attribute and pick the next id, which looks like `#sig_123abc45`. Copy that value without the `#` char and use that

repository: yusukekodama/did-samples

branch_name: refs/heads/main

repo_name: yusukekodama/did-samples


text:
---
layout: post
title: Count as One
author:
category: Chapbook
---

![](../../../../assets/images/Count.png)

*Count As One* (2009) is a chapbook of fifteen interactive poems inspired by the work of Alain Badiou and the tradition of modernist concrete poetry. Users can click inside each poem to reveal and author meaning, and can also print, save, and publish their own unique output. The chapbook appears in the Fall 2009 issue of *New River: a Journal of Digital Writing and Art*, and as a chapter in my full-length collection, [*AFEELD*](http://afeeld.com).

You can view the original chapbook at [New River Journal](http://www.cddc.vt.edu/journals/newriver/09Fall/liszkiewicz/count/index.html), if you have flash installed. Otherwise, you can view it as [part of *AFEELD*](http://www.cddc.vt.edu/digitaloriginals/afeeld/countasone/circuits/).

repository: liszkiewicz/OldPortfolio

repo_name: liszkiewicz/OldPortfolio


text:
---
layout: dev_resources
title: Using the SAM Web Services
nav: using_SAM_web_services
---

### Using SAM Web Services
SAM offers web services to search for both Entity data and Exclusions data.

**Entity Management data can be searched by:**

* ```DUNSNumber``` (Both DUNS and DUNS + 4)
* ```CAGECode```
* ```taxpayerIdentificationNumber``` (requires addtional access  [Click here](http://gsa.github.io/openIAE/developer_resources/Access_SAM_data.html "Data Access") for more information.)<br>
* ```startDate``` & ```endDate``` (Maximum search time allowed between startDate and endDate is 24 hours.)
* ```registrationStatus```

The web service returns the Entity Management Record in XML format for you to consume into your local application. The Entity Management record has four areas:

* ```coreData```
* ```assertions```
* ```repsAndCerts``` (Representations and Certifications)
* ```POCs```(Points of Contact)

You have to put a "Y" in any one of the above element tags to get a result from the web service.

**EndPoint:** [https://gw.sam.gov/SAMWS/1.0/Entity](https://gw.sam.gov/SAMWS/1.0/Entity)
**WSDL File:** [https://gw.sam.gov/SAMWS/1.0/Entity?wsdl](https://gw.sam.gov/SAMWS/1.0/Entity?wsdl)

Need more help? Click [here](https://github.com/GSA/IAE-Architecture/tree/master/as-is/tech-docs/SAM) for the SAM entity web service management tutorial.

**Exclusions can be searched by:**

* ```Name``` (including Business Name, First/Last Name, Partial Name)
* ```Social Security Number```
* ```Taxpayer Identification Number```
* ```Cage Code```
* ```DUNS``` number.

If there is a match the web service returns the Public Exclusion Record in XML for you to consume into your own system.

**EndPoint:** [https://gw.sam.gov/SAMWS/1.0/ExclusionSearch](https://gw.sam.gov/SAMWS/1.0/ExclusionSearch)

**WSDL File:** [https://gw.sam.gov/SAMWS/1.0/ExclusionSearch?wsdl](https://gw.sam.gov/SAMWS/1.0/ExclusionSearch?wsdl)

### Testing SAM Web Services

| Web Service | Endpoint in Test Environment |
|---|---|
| SAM Entity Management |[https://test.sam.gov/SAMWS/1.0/Entity](https://test.sam.gov/SAMWS/1.0/Entity)|
| SAM Exclusion |[https://test.sam.gov/SAMWS/1.0/ExclusionSearch](https://test.sam.gov/SAMWS/1.0/ExclusionSearch)|

**Test IDs:**

| ID Name | Password | Description |
|---|---|---|---|
| SAMPublic | Contact<EMAIL_ADDRESS>| The public Entity Management Web Service requires authentication |
| SAMFOUO | Contact<EMAIL_ADDRESS>| For Official Use Only |
| SAMSensitive | Contact<EMAIL_ADDRESS>| Offers more secure data including banking information and MPIN. |

A test id is not needed for the SAM Exclusions XML web service. There is no role or authentication requirement.
For more information on SAM account access levels click [here](http://gsa.github.io/openIAE/developer_resources/Access_SAM_data.html).

**Tools available:**

| Tool Name | Description |
|---|---|
| [Web Services tutorial](https://github.com/GSA/IAE-Architecture/tree/master/as-is/tech-docs/SAM) | Documents how to build an Entity Management web service. Includes various sample request and response for Entity Management. |
| [Web Serivces field mappings](https://github.com/GSA/IAE-Architecture/tree/master/as-is/tech-docs/SAM/SAMWebServicesExtractsMappingsv1.0) | Field and tag mappings for Entity Management Web Services. |
| [Soap UI project for Web Services]() | Project ready for import into Soap UI. Coming Soon! |
| [SAM Functional Data Dictionary](https://github.com/GSA/IAE-Architecture/blob/master/as-is/tech-docs/SAM/SAM%20Functional%20Data%20Dictionary%20v4.0.pdf?raw=true) |All SAM field definitions and enumerations.|
| [Web Services Response Schema Documentation]() | Coming Soon! |

Comments? Questions?  [Talk to us](https://github.com/GSA/openIAE/issues).

gha_language: JavaScript

gha_license_id: Unlicense


text:
# Handler

*This is one of the most important things to know*

[http.Handler](https://godoc.org/net/http#Handler)
``` Go
type Handler interface {
    ServeHTTP(ResponseWriter, *Request)
}
```

***

# Server

[http.ListenAndServe](https://godoc.org/net/http#ListenAndServe)
``` Go
func ListenAndServe(addr string, handler Handler) error
```

[http.ListenAndServeTLS](https://godoc.org/net/http#ListenAndServeTLS)
``` Go
func ListenAndServeTLS(addr, certFile, keyFile string, handler Handler) error
```

*Notice that both of the above functions take a handler*

***

# Request

See [http.Request](https://godoc.org/net/http#Request) in the documentation.

Here it is with *most of the comments and some of the fields* stripped out:

```go
type Request struct {
    Method string
    URL *url.URL
	//	Header = map[string][]string{
	//		"Accept-Encoding": {"gzip, deflate"},
	//		"Accept-Language": {"en-us"},
	//		"Foo": {"Bar", "two"},
	//	}
    Header Header
    Body io.ReadCloser
    ContentLength int64
    Host string
    // This field is only available after ParseForm is called.
    Form url.Values
    // This field is only available after ParseForm is called.
    PostForm url.Values
    MultipartForm *multipart.Form
    // RemoteAddr allows HTTP servers and other software to record
	// the network address that sent the request, usually for
	// logging.
    RemoteAddr string
}
```

Also see the index showing type [Request]() from the http package.

Some interesting things you can do with a request:

## Retrieve URL & Form data

```http.Request``` is a struct. It has the fields ```Form``` & ```PostForm```. If we read the documentation on these, we see:

```
    // Form contains the parsed form data, including both the URL
    // field's query parameters and the POST or PUT form data.
    // This field is only available after **ParseForm** is called.
    // The HTTP client ignores Form and uses Body instead.
    Form url.Values

    // PostForm contains the parsed form data from POST, PATCH,
    // or PUT body parameters.
    // This field is only available after **ParseForm** is called.
    // The HTTP client ignores PostForm and uses Body instead.
    PostForm url.Values

```

If we look at **ParseForm**,

```go func (r *Request) ParseForm() error ```

we see that this is a method attached to a *http.Request.

***

If we look at **FormValue***

``` go func (r *Request) FormValue(key string) string```

we see that this is a method attached to a *http.Request. FormValue returns the first value for the named component of the query. POST and PUT body parameters take precedence over URL query string values. FormValue calls ParseMultipartForm and ParseForm if necessary and ignores any errors returned by these functions. If key is not present, FormValue returns the empty string. To access multiple values of the same key, call ParseForm and then inspect Request.Form directly.

***

## See the HTTP Method

The ```http.Request``` type is a struct which has a ```Method``` field.

***

## See URL values

The ```http.Request``` type is a struct which has a ```URL``` field. Notice that the type is a ```*url.URL```

Take a look at type ```url.URL```

``` go
type URL struct {
    Scheme     string
    Opaque     string    // encoded opaque data
    User       *Userinfo // username and password information
    Host       string    // host or host:port
    Path       string
    RawPath    string // encoded path hint (Go 1.5 and later only; see EscapedPath method)
    ForceQuery bool   // append a query ('?') even if RawQuery is empty
    RawQuery   string // encoded query values, without '?'
    Fragment   string // fragment for references, without '#'
}
```

***

## Work with the HTTP header

The ```http.Request``` type is a struct which has a ```Header``` field.

From the documentation about the ```http.Header``` struct, we see that:

```
type Header map[string][]string
```

***

# Response

[http.ResponseWriter](https://godoc.org/net/http#ResponseWriter)
``` Go
type ResponseWriter interface {
    // Header returns the header map that will be sent by
    // WriteHeader. Changing the header after a call to
    // WriteHeader (or Write) has no effect
    Header() Header

    // Write writes the data to the connection as part of an HTTP reply.
    //
    // If WriteHeader has not yet been called, Write calls
    // WriteHeader(http.StatusOK) before writing the data. If the Header
    // does not contain a Content-Type line, Write adds a Content-Type set
    // to the result of passing the initial 512 bytes of written data to
    // DetectContentType.
    Write([]byte) (int, error)

    // WriteHeader sends an HTTP response header with status code.
    // If WriteHeader is not called explicitly, the first call to Write
    // will trigger an implicit WriteHeader(http.StatusOK).
    // Thus explicit calls to WriteHeader are mainly used to
    // send error codes.
    WriteHeader(int)
}
```

***

## Setting a response header

An ```http.ResponseWriter``` has a method ```Header()``` which returns a ```http.Header```.

repository: CodeFreezr/gobyes

gha_language: Go

repo_name: CodeFreezr/gobyes


text:
# CDS-SCP-API Node Module Examples

## Standalone Examples

These set up belongs to the [standalone node.js example](./readme.md). Please also follow the [SCP Destination Configuration](../README.md) as preparation to run the examples.

## Steps for setting up the standalone node.js example project

- Create a new folder and enter the new folder
  ```swift
  mkdir <example-folder>
  cd <example-folder>
  ```

- Create a new node project
  ```swift
  npm init -y
  ```

- Create a **test.js** file and copy the needed example javascript code as content in this file

- Add the following dependencies, just below the script settings to your **package.json** file
  ```json
  "dependencies": {
    "@sapmentors/cds-scp-api": "^0.0.2-alpha"
  },
  ```

- install the node packages by running
  ```swift
  npm install
  ```

- create a **default-env.json** file as described in the prerequisites

- Replace the script settings in your **package.json** file with
  ```json
  "scripts": {
    "start": "node test.js"
  },
  ```

- Run the test application with
  ```swift
  npm run start
  ```

## Prerequisite for running examples locally

Before you can run these examples locally, you need to add a **default-env.json** file with the and following minimum structure

```json
{
    "VCAP_SERVICES": {
        "destination": [
            {
                "label": "destination",
                "plan": "lite",
                "name": "destination",
                "instance_name": "<Destination-Service-Name>",
                "credentials": {
                    "clientid": "...",
                    "xsappname": "...",
                    "clientsecret": "...",
                    "url": "..."
                }
            }
        ]
    }
}
```
If you have the [Cloud Foundry Client Tools](https://developers.sap.com/tutorials/cp-cf-download-cli.html) installed, you can use them to find the settings.

- Credentials values can be retrieved with the statement:
  ```swift
  cf service-key <Destination-Service-Name> <Service-Key-Name>
  ```

- If you don't know the **Destination-Service-Name**, you can use the command:
  ```swift
  cf services
  ```
  Look in the list below the ***service*** column for the destination, and you will find the **Destination-Service-Name** in the ***name*** column

- If you don't know the **Service-Key-Name**, you can use the command:
  ```swift
  cf service-keys <Destination-Service-Name>
  ```
  for available service keys

- If no **Service-Key-Name** exists, you can create one with the statement:
  ```swift
  cf create-service-key <Destination-Service-Name> <Service-Key-Name>
  ```


text:
# Managing Orders
For managing your orders go to _Uvendia > Orders_. You will get a sub list of order states you can put your order in. Select an order status and start editing or creating a new order by hitting the button ``Create Order``.

![Orders](../images/order-creation.jpg)

## Paid
Most of the fields you see are very clear. In case you are creating an order manually, make sure when the customer has paid, you set the ``Paid`` indication on ``true``. Don't forget to fill in the ``Paid amount``.

## Shipping date
Don't forget to fill in the date when the package has been shipped. You can also automate this process.

## Send e-mail to customer
Like discussed [here](/settings/orderemailtemplated.md), when the ``order e-mail template`` settings are configured they will automatically appeared in this sub list when hitting this button (see screenshot below).

![Sending e-mails](../images/order-sendingmail.jpg)

repository: dazzlingstudio/uvendia

repo_name: dazzlingstudio/uvendia


text:
## Problem we know about
- https://blog.sucuri.net/2015/05/fake-jquery-scripts-in-nulled-wordpress-pugins.html
- https://blog.sucuri.net/2015/11/jquery-min-php-malware-affects-thousands-of-websites.html
- https://blog.avast.com/wordpress-and-joomla-users-get-hacked-be-aware-of-fake-jquery

## Theory
I'm speculating the URI being requested can be tied to the bytes_in to detect variances and thereby detect anomalous or strange instances of those URIs.  I'm speculating that we can detect not only the malicious jquery javascript being requested (known problem space), but also detect other scripts or files being included which are abnormal and possibly malicious.

## Approach
[ ] Explore the data, eat some food, drink some beer, explore data more; repeat.

## Custom Data Parser (to move logs into csv format)
- https://github.com/cmeinco/proxy_log_analysis (YOU ARE HERE.)

## Supporting Datasets
- http://bluesmote.com/ (use SGreadlog.py)
- http://www.secrepo.com/squid/access.log.gz (use SQreadlog.py)

## TODO
 [ ] Remove blocked/denied access from datasets, because it was blocked, ergo is "safe".
 [ ] move todos to issues.


text:
---
layout: engineering-education
status: publish
published: true
url: /how-to-plot-a-candlestick-chart-in-python-using-the-matplotlib-finance-api/
title: How to Plot a Candlestick Chart in Python using the Matplotlib Finance API
description: This tutorial will show the reader how to plot a Candlestick chart using Matplotlib Finance API and Python
author: sharon-kinyan
date: 2021-11-03T00:00:00-09:00
topics: [Machine Learning]
excerpt_separator: <!--more-->
images:

  - url: /engineering-education/how-to-plot-a-candlestick-chart-in-python-using-the-matplotlib-finance-api/hero.png
    alt: candlestick chart example image
---
Candlestick charts provide information about different stock values. In this tutorial, we will use the Matplotlib Finance API to plot a candlestick chart in Python.
<!--more-->
We will also implement the [moving average](https://www.investopedia.com/terms/m/movingaverage.asp) function, which is commonly used to analyze cryptocurrencies.

Only a few tutorials have used candlestick charts in Python with moving average. The article will discuss how this concept can be applied to some cryptocurrencies using data from [CoinAPI](https://www.coinapi.io/).

This tutorial is helpful for any person that wishes to plot share prices using Python.

### Table of contents
- [Introduction](#introduction)
- [Installing and importing dependencies](#installing-and-importing-dependencies)
- [Data preprocessing](#data-preprocessing)
- [Plotting the share prices using Python](#plotting-the-share-prices-using-python)
- [Wrapping up](#wrapping-up)

### Prerequisites
To understand this tutorial, you need to be familiar with:
- Python programming language.
- Basic aspects of machine learning and cryptocurrencies.
- [Google Colab](https://colab.research.google.com/?utm_source=scs-index) or [Jupyter Notebook](https://jupyter.org/).

> Note that we will Google Colab in this tutorial.

### Introduction
Candlestick charts provide information about open, close, high, and low values in stock.

The `open` value is the value a stock opens with, for example, $100. At the end of the day, when trading stops, the amount that is recorded is referred to as the `closing` value. Let's say $105.

If we have a spike in the stock price at any point during the day and it shoots to $110, and that's the highest value recorded throughout the day, that's our `high`. However, if the reverse happens, and we record a low of $97 that's our `low`.

These four values are what a candlestick chart uses to visualize. The Matplotlib Finance API is a package built on top of the Matplotlib library to visualize data. It can be integrated easily with Pandas dataframes.

The `moving average` is a technical indicator that tracks stock prices over time and plots them on a graph. It helps in dealing with price fluctuations which allow investors to understand different financial trends.

For instance, the `moving average` could determine an uptrend, or downtrend in prices. This enables an investor to know when to buy, sell, or hold stocks.

### Installing and importing dependencies
Let's start by installing the Matplotlib Finance API:

```bash
pip install --upgrade mplfinance
```

Output:

```bash
Installing collected packages: mplfinance
Successfully installed mplfinance-0.12.7a17
```

After installation, we go ahead and import the dependencies that we'll need for our tutorial:

```python
from matplotlib.pyplot import title
import requests
import json
import pandas as pd
import mplfinance as mpl
```

To plot the candlestick chart using `moving average`, we first choose a timeframe (a start and end date). A timeframe can be any period, i.e., a day, month, or year.

For our case, we will select a time between `2021-06-06` and `2021-10-05`.

```python
start_date = "2021-06-06"
end_date = "2021-10-05"
freq = "1DAY"
coin = "BTC"
url = f'https://rest.coinapi.io/v1/exchangerate/{coin}/USD/history?period_id={freq}&time_start={start_date}T00:00:00&time_end={end_date}T00:00:00'
headers = {'X-CoinAPI-Key' : 'Paste your api key here'}
response = requests.get(url, headers=headers)
```

To get your free CoinAPI for testing or hobby projects, please visit their [official website](https://www.coinapi.io/pricing?apikey).

You'll notice there are five packages available on the website. Select the first package to get a free API key.

This API key will be sent to your email. Copy the key and paste it above in the section written; 'Paste your API key here'.

 The CoinAPI will provide you with fast, and reliable data from the cryptocurrency markets. In our example, we'll use it to fetch Bitcoin (`BTC`) data.

### Data preprocessing
We load our data using the following code:

```python
content = json.loads(response.text)
print(content)
```
We convert the JSON file into a Dataframe using Pandas:

```python
df = pd.json_normalize(content)
```

This next step involves changing `DType` to `DataTime`:

```python
df.time_period_start = pd.to_datetime(df.time_period_start)
```

```python
df = df.set_index("time_period_start")
```

Let's now remove the unnecessary columns in our data:

```python
df.drop(['time_period_end', "time_open", "time_close"], axis=1, inplace=True)
print(df.columns)
```
Output:

```bash
Index(['rate_open', 'rate_high', 'rate_low', 'rate_close'], dtype='object')
```

The next step involves renaming the remaining columns to our desired names:

```python
df.rename(columns={"rate_open": "Open", "rate_high":"High", "rate_low":"Low", "rate_close": "Close"}, inplace=True)
df.head()
```

Output:

```bash
                                Open      High       Low         Close
time_period_start
2021-04-25 00:00:00+00:00   1.056056    1.156487    0.947005    1.032632
2021-04-26 00:00:00+00:00   1.042543    1.370573    1.020200    1.369125
2021-04-27 00:00:00+00:00   1.350937    1.462192    1.334610    1.401779
2021-04-28 00:00:00+00:00   1.405354    1.449042    1.286561    1.358817
2021-04-29 00:00:00+00:00   1.358232    1.420125    1.331622    1.399415
```

Let's now plot the share prices using the Maplotlib Finance API.

### Plotting the share prices using Python
We use the `mpl.plot()` function to plot the share prices:

```python
mpl.plot(
    df,
    type="candle",
    mav =(3,6,9),
    title = f"{coin} Price",
    style="yahoo"
    )
```

There are different types of charts that can be used to plot these share prices. They include bar charts, candlestick charts, Renko charts, line charts, and figure charts.

In this article, we've used the candlestick chart. These types of charts are simple and easy to analyze appearance. They provide more detailed information about the market at a glance than bar or line charts.

We've applied a moving average line using `mav` to our plot. We also added 3, 6, and 9-day as parameters. Popular moving averages on stock prices websites include 10, 20, and 30-day moving average.

We chose the `yahoo` style since it replicates the way you watch stock prices on the Yahoo website. However, there are other built-in styles in the `mplfinance` library you could try out.

They include `binance`, `blueskies`, `brasil`, `charles`, `checkers`, `classic`, `default`, `mike`, `nightclouds`, `sas`, and `starsandstripes`.

Output:

![BTC candlestick chart](/engineering-education/how-to-plot-a-candlestick-chart-in-python-using-the-matplotlib-finance-api/btc.png)

We have now successfully plotted a candlestick chart in Python using the Matplotlib Finance API and moving average.

Please find this tutorial's code [here](https://colab.research.google.com/drive/1Tl_kqWI3IvavcY2m7Xd-PMSx_t2b3vff?usp=sharing).

### Wrapping up
The mplfinance library allows us to visualize data easily. You can read more about the mplfinance API in the following references.

### References
- [CoinAPI](https://www.coinapi.io/)
- [Matplotlib Finance API](https://github.com/matplotlib/mplfinance#newapi)
- [Moving average function](https://www.investopedia.com/terms/m/movingaverage.asp)

---
Peer Review Contributions by: [Collins Ayuya](https://www.section.io/engineering-education/authors/collins-ayuya/)

repository: mbuguac/engineering-education

gha_language: SCSS

repo_name: mbuguac/engineering-education


text:
# Choosing the correct authentication type

The Dryad system currently supports two different OAuth2 industry-standard authentication
strategies for use with its API. Authentication isn't required for all operations but
is needed for higher-volume operations or in order to do more than only reading public
data.

## Client Credentials Grant

Client credentials grant is one of the simplest ways to authenticate to the Dryad service
and it is the right choice when the application requesting access doesn't need a specific
outside owner's permission in order to create or modify data. This grant type might be used in some of
these cases.

- Simply want an API account to increase rate limits of public data.
- The application requesting access owns all the data and is only requesting access
  for a specific user.
- The application requesting access has a special ownership or administrative
  arrangement such as submitting preliminary data that a user may claim and
  obtain ownership of later.

## Authorization Code Grant

The Authorization Code grant is a familiar workflow when one web application wants to
obtain information from another service.  The process is already familiar from social media
sites that may allow their logins to be used with other services.

When an Authorization Code grant is used, the outside application (the one Dryad issues an Application Id
and secret to) redirects to a Dryad login process for a user. The user must supply credentials
and grant access for the non-Dryad application in order for that application to have access for
that user.

## Limitations for both types of access

When implementing either type of access, the outside application, registered with Dryad, is responsible
for keeping the secret private and not exposing the secret to the public. This means the
secret should not be embedded in source code distributed to users or exposed in client-side
Javascript. The secret would likely be used in server-side code to which users do not have
direct access to see or decompile credentials.

Please see these additional resources:

- See our information about [api accounts](api_accounts.md) which gives general starting
  information and describes a client credentials grant.
- See an example of working with an [authorization code grant](authorization_code_grant.md)
  which helps gets you started with this type of grant and walks through the process.
- See https://alexbilbie.com/guide-to-oauth-2-grants/ which is a useful description and
  helps in understanding possible OAuth 2 grants.

repository: CDL-Dryad/dryad-app

gha_language: Ruby

repo_name: CDL-Dryad/dryad-app


text:
# Backup From Repositories

_Leia isso em [Português](README-pt-BR.md)._

This is a simple script to backup all your GitHub repositories and put then into zip files. It also let you choose if you want to download only the private or the public repositories at a time.

### Dependencies

First of all, you need:

- bash
- curl
- git

And that's it.

## Configuration

Before you begin the backups, you may need some configuration. So, take a look in the options bellow:

### To backup only public repos

In this case, you don't need to generate a personal access token or get an existing one. Just pass your username when prompted by script.

And yeah, with this script you can backup all public repositories from ANY user in the GitHub. Pretty cool, huh?

### To backup private repos

For this option, you need to [create or get some of yours GitHub personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with at least full control of private repositories. Then, you need to put it in the `.env` file to retrieve your private repos info.

You will change the GITHUB_PERSONAL_ACCESS_TOKEN value in `.env`, like that:

`GITHUB_PERSONAL_ACCESS_TOKEN=your-fancy-personal-key`

### To backup both public and private repos

Simple do the [previously configuration](#to-backup-private-repos) and you will be fine.

## Using it

First, you can clone the repository to your machine:

`$ git clone https://github.com/brendaw/backup-from-repos`

Or, you can download the files with this curl command:

`$ curl --remote-name-all https://raw.githubusercontent.com/brendaw/backup-from-repos/master/{.env,backup-from-repos.sh}`

After download, give execution permission to the script, as bellow:

`$ chmod +x backup-from-repos.sh`

Then, choose your backup option:

### To backup only public repos

Run the script with `public` arg and pass your user when asked, like below:

`$ ./backup-from-repos.sh public`

### To backup only private repos

After you [configure your personal access token](#to-backup-private-repos), run the script with `private` arg. Since the private access token already have your user binded, the script will not ask for your user. Just run like below:

`$ ./backup-from-repos.sh private`

### To backup both public and private repos

After you [configure your personal access token](#to-backup-both-public-and-private-repos), run the script with `all` arg. Since the private access token already have your user binded, the script will not ask for your user. Just run like below:

`$ ./backup-from-repos.sh all`

## Contributing

You may contribute in several ways like creating new features, fixing bugs, improving documentation and examples or translating any document here to your language. [Issues](https://github.com/brendaw/backup-from-repos/issues) and [Pull Requests](https://github.com/brendaw/backup-from-repos/pulls) sections are waiting for your contribution.

## License

[MIT](LICENSE) - William Brendaw - 2020

repository: brendaw/backup-from-repos

repo_name: brendaw/backup-from-repos


text:
# Disputing a Transaction

_When Alice and Bob \(or Alice and the Hub\) disagree, all parties involved can use the blockchain to dispute the transaction. While a Hub operator may want you to go through their support system to dispute \(they likely have a vested interest in ensuring a good outcome for you\), any party always has the option of disputing a transaction using the blockchain. This is important in case the Hub is \(i\) unresponsive or \(ii\) trying to cheat._

_Here, we outline the process for disputing a transaction using functions in the client package._

**\*\*\*VERY Important note\*\*\*:** Automated disputes have not been implemented in the Hub in v1.0. If a user disputes a transaction, the Hub operator will have to manually counter. This is possible, but a real PITA which is why we reccomend not putting your Hub on mainnet yet. Autodisputing will be added on the next update.

## Closing Threads

When Alice and Bob are finished transacting in their thread, we can close it using [`closeThread()`](../client-docs-2.0.md#closethread). When `closeThread()` is called, there are two possible scenarios: \(i\) the hub agrees with the balance that Alice has submitted and countersigns the submitted update or \(ii\) the hub disagrees and does not countersign the update.

**How to handle disputes:**

If Alice and the hub disagree on final thread balances, the hub will not countersign the update that Alice submits using `closeThread()` and will instead return error code `651`.

To resolve the error, we will need to initiate a dispute resolution process. First, we call `initThreadStateContractHandler()` to put the initial state on the blockchain. Essentially, this tells the blockchain that the two parties agreed to enter into their channel with a given set of funds, under a set of dispute conditions.

```javascript
//Put initial thread state on-chain
await client.initThreadStateContractHandler({
        channelId: channelForAlice, // caller channel
        aliceToBobThread,//Thread Id
        nonce: 0,
        Alice, //Thread sender
        Bob, // Thread recipient
        balanceA: Web3.utils.toBN(aliceToBobThread.balanceA), // initial balance
        balanceB: Web3.utils.toBN(aliceToBobThread.balanceB), // initial balance; should always be 0
        sigAlice: aliceToBobThread.sigAlice, //signature provided when starting channel
        sender: Alice // optional, for testing
      })
```

Once that transaction is confirmed on-chain \(which may take a few minutes\), we identify the most recent double-signed thread update \(the update with the highest "nonce"\) using `getLatestThreadStateUpdate()` and submit it to the blockchain using `settleThreadContractHandler()`.

```javascript
//Settle thread using latest nonce
let threadN = await client.getLatestThreadStateUpdate(aliceToBobThread)
const response = await client.settleThreadContractHandler({
  channelId: channelForAlice,
  aliceToBobThread,
  nonce: threadN.nonce,
  Alice,
  Bob,
  balanceA: Web3.utils.toBN(aliceToBobThread.balanceA),
  balanceB: Web3.utils.toBN(aliceToBobThread.balanceB),
  sigAlice: vcN.sigAlice, //signature on latest nonce-dd transaction
  sender: Alice
})
```

Calling this function will initiate a challenge period, during which Alice will have the opportunity to submit a more recent, double-signed state update using the same method. For her, this complexity is easily abstracted away through UX.

Once the challenge period expires, we can resolve the channels off-chain \(with the information that we settled on-chain\) using `closeThreadContractHandler()`:

```javascript
 //Resolve virtual channels using information settled via the blockchain
 await client.closeThreadContractHandler({
    channelId: channelForAlice, // Sender's channel
    aliceToBobThread,
    sender: Alice // optional, defaults to accounts[0]
   })
```

While this ensures that Alice and Bob receive \(or pay\) the funds consistent with the most recent amount to which they agreed, it entails three on-chain transactions and is therefore a costly and time-consuming process. This discourages Alice from submitting falsified state updates.

## Closing Channels

If Alice and the hub disagree on final channel balances, the hub will not countersign the update that Alice submits using `closeChannel()` and will instead return error code `601`. To resolve the error, we will need to initiate another dispute resolution process. First, we call `updateChannelStateContractHandler()` to put the current state of the channel on the blockchain. Recall that the channel was established with an on-chain transaction, so we only need to put the most recent state on-chain rather than both states.

```javascript
//Update channel state on blockchain
const response = await client.updateChannelStateContractHandler({
        channelId: channelForAlice,
        nonce: channelForAlice.nonce,
        balanceAlice,
        balanceHub,
        sigAlice: channelForAlice.sigAlice,
        sigHub: channelForAlice.sigHub,
        threadRootHash,
        sender: null
      })
```

This function call will initiate a challenge timer, during which Alice can attempt to submit a state update with a higher nonce. At the end of that challenge timer, funds will be distributed within the channel in accordance with the highest nonce-d state update.

repository: Ivshti/connext-client

repo_name: Ivshti/connext-client


text:
---
title: "Open a New Google Chrome Tab (Or Window) via Command Line on Mac"
date: 2019-09-16T20:34:33-05:00
toc: false
---

Ever been in your terminal and wanted to open a new chrome tab (or window), without actually switching to chrome? Well, it's possible. Checkout these examples:

<!--more-->

```bash
# Open URL in new tab
open --new -a "Google Chrome" --args "duckduckgo.com"

# Open URL in new window
open --new -a "Google Chrome" --args --new-window "duckduckgo.com"
```

I prefer to wrap these commands in bash functions so that I don't have to remember their syntax:
```bash
chrome_open_tab() {
  open --new -a "Google Chrome" --args $@
}

chrome_open_window() {
  open --new -a "Google Chrome" --args --new-window $@
}
```

You can pass multiple URLs:
```bash
chrome_open_tab "duckduckgo.com" "mozilla.org" "wikipedia.org"
```

repository: zwbetz-gh/zwbetz

gha_language: CSS

repo_name: zwbetz-gh/zwbetz


text:
To run this example:

First, the Relaxation working copy needs to be accessible from "/Relaxation" in your testing environment. I suggest adding a virtual directory in your web server and a mapping in your CF Administrator.

The first condition having been met, you should be able to hit the following URLs:

	To See a GUI that makes calls to the REST API.
	http://localhost/Relaxation/Examples/Basic/TryMe/index.cfm

	To See JSON results for GET requests directly:
	http://localhost/Relaxation/Examples/Basic/index.cfm/product
	http://localhost/Relaxation/Examples/Basic/index.cfm/product/1

I recommend installing a browser plugin like JSONView so that the JSON response is pretty and readable.

repository: cfchris/Relaxation

branch_name: refs/heads/develop

gha_language: ColdFusion

repo_name: cfchris/Relaxation


text:
# BusinessDataVisualization
Visualization of Airline performance using BTS (Bureau of Transportation Statistics) database.

#### Data
Procure the BTS data from [here.](https://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236&DB_Short_Name=On-Time)
Download monthly files that are needed to visualize (I have used the data that ranges from :June 2016- July2017). Utilize the lookup tables for features of the data.

## Data Munging
Data wrangling, sometimes referred to as data munging, is the process of transforming and mapping data from one "raw" data form into another format with the intent of making it more appropriate and valuable for a variety of downstream purposes such as analytics.
Tool: Jupyter Notebook (Language: Python)

**Pandas** provide the necessary tools to perform data cleaning and munging for structured data.

pandas can be installed via pip from [PyPI.](https://pypi.org/project/pandas/)

`
pip install pandas
`

If Anaconda distribution is installed then, install pandas as shown [here](https://docs.anaconda.com/anaconda/navigator/tutorials/pandas/)

```
We use pandas to merge all the monthly files and generate a combined .csv file, and selected a few
airlines of interest. Pandas is used to extract the required data and finally, only the
data required for those airlines are concatenated into a single data frame and made into a final .csv file.
```

The Jupyter Notebook can be found [here.](https://github.com/pavannaik3009/BusinessDataVisualization/blob/master/DataMunging.ipynb)

## Data Visualization
Tool: Tableau

Tableau is a Data Visualisation tool that is widely used for Business Intelligence. It helps create interactive graphs and charts in the form of dashboards and worksheets to gain business insights.

Objective: Finding reasons and trends for Airline delays in different cities in the USA.

### Trench Analysis

It can be seen that the flight delay time is correlated with the departure delay time

Arrival and Departure Delays of different cities (Airline: ExpressJet Airnline Inc.)

ExpressJet city Average Delays

ExpressJet's delay from Origin (In figure below: Origin=Chicago,ORD)

The Tableau workbooks can be found in the repository.

## License

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


text:
# Arduino-Fruit-Current-Reader

A project for my chemistry class that reads fruit voltage via an Arduino Uno.

## Arduino Setup
```
1. Deploy the arduino sketch to the arduino.

2. In the code setup the port name you're using.
Plug in blue and yellow wires to the arduino in pin A0 and one in ground.

3. Have the anode and cathode I used copper and zinc connected to the blue and yellow wires.

4. From the reading if you're getting 0.00 that means you need to swap the wires in either the pins or the anode and cathode.
```

repository: imathno/Arduino-Fruit-Current-Reader

repo_name: imathno/Arduino-Fruit-Current-Reader


text:
# Simple QML test codes

These test codes are based on examples in QML / Qt tutorials and made for
accessing basic QML functionality. Instructions are made for Debian-based
distros using Wayland, adjust as required.

All tests are expected to be run using `qmlscene`. Install it and
several other packages used in the tests

```
sudo apt install qmlscene qtwayland5 qml-module-qtquick2 qml-module-qtquick-window2 \
qml-module-qtlocation qml-module-qtpositioning
```

Run commands from the cloned repo folder.

Hello world: `qmlscene -platform wayland test_simple.qml`

Raster map: `qmlscene -platform wayland map_raster.qml`

If MapboxGL plugin is not disabled in the distribution, it can be tested
with

Online maps: `qmlscene -platform wayland map_mapboxgl.qml`

Offline (requires OSM Scout Server running on the same device):
`qmlscene -platform wayland map_mapboxgl_offline.qml`

For unofficial MapboxGL QML bindings, one can use

```
export MAPBOX_ACCESS_TOKEN=<your token>
qmlscene -platform wayland map_mapboxglqml.qml
```

## Kirigami

For testing Kirigami, use Kirigami Gallery application.

First, install Kirigami and few extra packages:

```
sudo apt install qml-module-org-kde-kirigami2 qml-module-qtquick-layouts
```

Clone Kirigami:

```
git clone https://github.com/KDE/kirigami-gallery.git
```

and run it after using a version supported by your distribution
```
cd kirigami-gallery
git checkout b86680a227ac4356097bb22466d50fd8e7b55ae5
qmlscene -platform wayland src/data/contents/ui/BaseApp.qml
```

repository: rinigus/qmltest

repo_name: rinigus/qmltest


text:
[![GoDoc](https://godoc.org/github.com/alex-leonhardt/gocd-seeder?status.svg)](https://godoc.org/github.com/alex-leonhardt/gocd-seeder) [![Build Status](https://travis-ci.com/alex-leonhardt/gocd-seeder.svg?branch=master)](https://travis-ci.com/alex-leonhardt/gocd-seeder)

# GOCD-SEEDER
A GoCD-Seeder scans a GitHub org for repositories that contain a pre-specified "topic" (default: ci-gocd), if a repo is found, it will create a GoCD config repo, which will make GoCD poll the repository for the file "ci.gocd.yaml" and create (a) new pipeline/s basaed on the config in that file.

## REQUIREMENTS

- GoCD 18.x (contains yaml plugin by default)
- Go 1.11.x (if you're building the binary yourself)

## DOCKER

### Docker Hub

You can now use the below command to just pull down the latest `tag`.

Releases: https://hub.docker.com/r/alexleonhardt/gocd-seeder/tags/

```
docker pull alexleonhardt/gocd-seeder:<tag>
```

`tag` will correspond to tags in github repo (https://github.com/alex-leonhardt/gocd-seeder/releases)

### Build own docker image

Multi-stage docker build, it's using alpine as the base OS so we can get a shell if we needed to debug the app for some reason.

```
docker build --no-cache -t local/gocd-seeder:<tag> .
```

To check version and help you can use:

```
docker run --rm -ti local/gocd-seeder:<tag> version
docker run --rm -ti local/gocd-seeder:<tag> help
```

# BUILD the app

```
go build -ldflags "-X main.versionString=`git rev-list --max-count=1 --branches master --abbrev-commit`"
```

# TEST the app

Some tests will require to have a valid Github token as it wasn't possible to use _httptest_.

To run the tests:

```
go test ./... -cover
```

or with some more detail

```
go test -v ./... -cover
```

# CONFIGURATION

## Kubernetes (and other)

If you're running on kubernetes or a container orchestrator that is capable to mounting a _secret_ into a container as file, or you're able to provide the secret safely into the container using other means, it is **highly recommended** to use the below environment variables to point to the path where the secrets' values are stored.

| env var name | example |  contains |
| ------------ | ------- | --------- |
| GITHUB_SECRETS_PATH | `/secrets/github` | must contain a file "api_key" with the github api key |
| GOCD_SECRETS_PATH   | `/secrets/gocd`  | must contain a file "gocd_password" with the password corresponding to the gocd_user;
 must contain a file "gocd_user" with the username to use to connect to GoCD |

**NOTE**: *If you set the above variables, and also set e.g. `GITHUB_API_KEY`, the file path will be preferred, this is counterintuitive but is (hopefully) more secure this way.*

## Environment vars

| Required | example | Note |
| -------- | ------- | ---- |
| GITHUB_API_KEY | `1235436adfdsfsadf` | use `GITHUB_SECRETS_PATH` when deploying to kubernetes; this variable will not be used if `GITHUB_SECRETS_PATH` is set |
| GITHUB_ORG     | `gooflix` | |

| Optional | default  |   |
| -------- | -------- | - |
| GITHUB_TOPIC    | `ci-gocd` | |
| GOCD_URL        | `http://localhost:8081` | |
| GOCD_USER       | `admin` | use GOCD_SECRETS_PATH when deploying to kubernetes or orchestrators that support mounting a secret as file |
| GOCD_PASSWORD   | `admin` | use GOCD_SECRETS_PATH when deploying to kubernetes or orchestrators that support mounting a secret as file |
| HTTP_STATS_IP   | default: `""` | the interface to listen on (to serve `/debug/vars` only) |
| HTTP_STATS_PORT | default: `9090` | the port to listen on (to serve `/debug/vars` only) |
| LOG_LEVEL       | default: `<none>` | available: `DEBUG` - this will enable additional log statements to be printed out; useful when debugging issues during development or initial setting up |

# METRICS

A metrics endpoint is running by default on port `:9090` and is reachable via `http://<IP|localhost>:9090/debug/vars`; metrics are provided via `expvar` - you can use things like

- [Datadog](https://docs.datadoghq.com/integrations/go_expvar/)
- [expvarmon](https://github.com/divan/expvarmon)
  ```shell
  expvarmon -ports="9090" -vars "Goroutines,Uptime,mem:memstats.Alloc,mem:memstats.Sys,mem:memstats.HeapAlloc,mem:memstats.HeapInuse,duration:memstats.PauseNs,duration:memstats.PauseTotalNs"
  ```
- Prometheus (maybe coming soon at some point if it is useful, `expvar` seems quick and cheap right now)

to monitor the app's memory, gc, goroutines & uptime

# CONTRIBUTE

Contributions through PRs are more than welcome, please also update the necessary tests as part of the submitted changes.

repository: alex-leonhardt/gocd-seeder

repo_name: alex-leonhardt/gocd-seeder


text:
---
name: Brainless Spock
rarity: 2
series: tos
memory_alpha:
bigbook_tier: 6
events: 47
in_portal: true
date: 04/12/2019
obtained: Event
mega: false
published: true
---

Brain and Brain! What is Brain‽ They couldn’t have made this a legendary variant, right? But Spocko at a fraction of his power is still worth a pop or two.

Traity as ever, Brainless is a no-brainer collection choice, both immediately and long term. If you end up leveling him early on, you’ll appreciate his Cadet mission coverage four days a week. With the Exobiology trait liberally sprinkled throughout those SCI nodes, he’ll be able to cover both his skills effectively. You might opt to level female Uncommon crew first for better cadet coverage, but Spock is still worth more than the laughable reputation conferred on him by his episode might imply.

repository: joshurtree/datacore-website

repo_name: joshurtree/datacore-website


text:
# emacs-bad-apple
Bad Apple!! Feat. ASCII animation in Emacs

## How to play

1. Get a full version of the original Bad Apple music/video file.
   (Not included in the repo due to possible copyright violation)
1. Get your favorite video/music player ready.
1. Open `badapple.el` and change `(start-process ...)` line to match your player and video/audio file.
1. Open your Emacs
1. `M-:` followed by `(load-file "badapple.el")`
1. `M-:` followed by `(play-loop)`
1. Enjoy :)

(Note: you will need to set your Emacs width to *at least* 84 chars and height to *exactly* 32 chars to fit the size of each frame)

Also: (Click [HERE](http://www.bilibili.com/video/av2393380/) to watch a demo!)

![Emacs](img/emacs.png)

![VLC](img/vlc.png)

repository: y-usuzumi/emacs-bad-apple

repo_name: y-usuzumi/emacs-bad-apple


text:
# list of TODOs for sesbio
## gene_annotation
script: get_intervals.pl
 - [ ] find replacement for Set::IntervalTree, which is not compiling (correction: with some c++ compilers).

script: seqio_benchmarks.pl
 - [ ] add transposome seqfactory benchmarks, which are 3X faster than the transposome seqio methods

script: clean_multifasta.pl
 - [ ] make script work with protein sequences

## genome_assembly
script: gsAssembler.pl
 - [ ] remove hard coded paths and implement some exception handling for command execution

## transposon_annotation
script: find_graph_edges.pl
 - [ ] remove use of BerkeleyDB and DBM::Deep in favor of SQLite, like in Transposome

script: find_graph_edges.pl
 - [ ] update to use latest indexing and edge-finding methods

script: repbase_to_typemap.pl
 - [ ] update to use latest mapping methods; incorporate unknowns

script: pfam_fetch
 - [ ] get GO terms and other metadata with models

## phylogenetics
script: eutils_taxonomy_methods.pl
 - [ ] remove use of bioperl and use REST API to eutils

script: orthoMCL...
 - [ ] remove version numbers and clean up orthomcl scripts

script: smith-waterman.pl
 - [ ] initialize diagonals in matrix before incrementing

script: cpbase_fetch.pl
 - [ ] remove options that are not working, such as retrieving the alignments

repository: sestaton/sesbio

repo_name: sestaton/sesbio


text:
# DescribeLoadBalancerTCPListenerAttribute {#doc_api_875898 .reference}

You can call the DescribeLoadBalancerTCPListenerAttribute API to query the configurations of a TCP listener.

## Debug {#apiExplorer .section}

Click [here](https://api.aliyun.com/#product=Slb&api=DescribeLoadBalancerTCPListenerAttribute) to perform a debug operation in OpenAPI Explorer and automatically generate an SDK code example.

## Request parameters {#parameters .section}

|Name|Type|Required?|Example value|Description|
|----|----|---------|-------------|-----------|
|Action|String|Yes|DescribeLoadBalancerTCPListenerAttribute|The action to perform. Valid value: **DescribeLoadBalancerTCPListenerAttribute**

 |
|ListenerPort|Integer|Yes|80|The frontend port used by the SLB instance. Valid values: **1–65535**

 |
|LoadBalancerId|String|Yes|lb-bp1ygod3yctvg1y7wezms|The ID of the SLB instance

 |
|RegionId|String|Yes|cn-hangzhou|The region to which the SLB instance belongs.

 You can query the region ID by referring to the list of [regions and zones](~~40654~~) or by calling the [DescribeRegions](~~25609~~) API.

 |

## Response parameters {#resultMapping .section}

|Name|Type|Example value|Description|
|----|----|-------------|-----------|
|ListenerPort|Integer|443|The frontend port used by the SLB instance

 |
|BackendServerPort|Integer|443|The backend port used by the SLB instance.

 **Note:** This parameter is not displayed when the backend server group is a virtual server group.

 |
|Bandwidth|Integer|-1|The peak bandwidth of the listener

 |
|Status|String|stopped|The status of the listener.

 Valid values: **starting | running | configuring | stopping | stopped**

 |
|SynProxy|String|enable|Whether to enable SynProxy. SynProxy protects SLB from attacks.

 We recommend that you retain the value set by SLB in this parameter.

 -   **enable**: Enable SynProxy.
-   **disable**: Disable SynProxy.

 |
|Scheduler|String|wrr|The algorithm used to distribute traffic.

 -   **wrr** \(default value\): A backend server with a higher weight is more likely to be polled.
-   **wlc**: A server with a higher weight will receive more requests. When the weight value is the same, a backend server with a smaller number of connections is more likely to be polled.
-   **rr**: Requests are evenly and sequentially distributed to the backend servers.

 |
|PersistenceTimeout|Integer|0|Whether to enable session persistence.

 When the value is **0**, session persistence is disabled.

 |
|HealthCheckType|String|tcp|The health check type of the TCP listener.

 Valid values: **tcp | http**

 |
|HealthCheck|String|on|Whether to enable health checks.

 Valid values: **on | off**

 |
|HealthyThreshold|Integer|4|The number of consecutive successes of health checks before a backend server is declared as healthy \(from failure to success\)

 |
|UnhealthyThreshold|Integer|4|The number of consecutive failures of health checks before a backend server is declared as unhealthy \(from success to failure\)

 |
|HealthCheckConnectPort|Integer|8080|The maximum amount of time in seconds to wait for the response from a health check

 |
|HealthCheckInterval|Integer|5|The time interval \(in seconds\) between two consecutive health checks

 |
|HealthCheckDomain|String|$\_ip|The domain name used for health checks

 |
|HealthCheckURI|String|/test/index.html|The URI used for health checks

 |
|HealthCheckHttpCode|String|http\_2xx,http\_3xx|The HTTP status code indicating that the health check is normal

 |
|VServerGroupId|String|rsp-cige6j5e7p|The ID of the VServer group

 |
|AclId|String|12|The ID of the access control list bound to the listener.

 If the value of **AclStatus** is **on**, this parameter is required.

 |
|AclStatus|String|off|Whether to enable access control.

 Valid values: **on | off** \(default value\)

 |
|AclType|String|white|The access control type:

 -   **white**: Indicates a whitelist. Only requests from IP addresses or CIDR blocks in the selected access control lists are forwarded. It applies to scenarios where an application only allows access from specific IP addresses.

Enabling a whitelist poses some risks to your services. After a whitelist is enabled, only the IP addresses in the list can access the listener.

 If you enable the whitelist without adding any IP addresses in the list, all requests are forwarded.

 -   **black**: Indicates a blacklist. Requests from IP addresses or CIDR blocks in the selected access control lists are not forwarded \(that is, they are blocked\). It applies to scenarios where an application only denies access from specific IP addresses.

If you enable a blacklist without adding any IP addresses in the list, all requests are forwarded.

 If the value of **AclStatus** is **on**, this parameter is required.

 |
|Description|String|A description of the listener|A description of the listener

 |
|EstablishedTimeout|Integer|500|The timeout value \(in seconds\) of the TCP connection

 |
|HealthCheckConnectTimeout|Integer|100|The timeout value

 |
|MasterSlaveServerGroupId|String|rsp-0bfucwuotx|The ID of the active/standby server group

 |
|RequestId|String|365F4154-92F6-4AE4-92F8-7FF34B540710|The ID of the request

 |

## Examples {#demo .section}

Request example

``` {#request_demo}

http(s)://[Endpoint]/? Action=DescribeLoadBalancerTCPListenerAttribute
&ListenerPort=80
&LoadBalancerId=lb-bp1ygod3yctvg1y7wezms
&<CommonParameters>

```

Normal response examples

`XML` format

``` {#xml_return_success_demo}
<DescribeLoadBalancerTCPListenerAttributeResponse>
  <HealthCheckHttpCode>http_2xx,http_3xx</HealthCheckHttpCode>
  <PersistenceTimeout>0</PersistenceTimeout>
  <HealthCheckType>tcp</HealthCheckType>
  <HealthyThreshold>3</HealthyThreshold>
  <Scheduler>wrr</Scheduler>
  <UnhealthyThreshold>3</UnhealthyThreshold>
  <Bandwidth>-1</Bandwidth>
  <Description>tcp_80</Description>
  <AclStatus>off</AclStatus>
  <HealthCheckURI>/</HealthCheckURI>
  <HealthCheck>on</HealthCheck>
  <HealthCheckConnectTimeout>5</HealthCheckConnectTimeout>
  <ListenerPort>80</ListenerPort>
  <Status>running</Status>
  <EstablishedTimeout>900</EstablishedTimeout>
  <HealthCheckDomain/>
  <HealthCheckInterval>2</HealthCheckInterval>
  <RequestId>9A113A8C-BB8F-475E-9533-7819ECA2FFC1</RequestId>
  <BackendServerPort>80</BackendServerPort>
</DescribeLoadBalancerTCPListenerAttributeResponse>

```

`JSON` format

``` {#json_return_success_demo}
{
	"HealthCheckHttpCode":"http_2xx,http_3xx",
	"Description":"tcp_80",
	"AclStatus":"off",
	"HealthCheckURI":"/",
	"HealthCheck":"on",
	"HealthCheckConnectTimeout":5,
	"PersistenceTimeout":0,
	"ListenerPort":80,
	"Status":"running",
	"EstablishedTimeout":900,
	"HealthCheckType":"tcp",
	"HealthCheckInterval":2,
	"HealthCheckDomain":"",
	"HealthyThreshold":3,
	"Scheduler":"wrr",
	"RequestId":"9A113A8C-BB8F-475E-9533-7819ECA2FFC1",
	"UnhealthyThreshold":3,
	"BackendServerPort":80,
	"Bandwidth":-1
}
```

Error response example

`JSON` format

``` {#json_return_failed_demo}
{
	"Message":"The specified parameter is not valid.",
	"RequestId":"0669D684-69D8-408E-A4FA-B9011E0F4E66",
	"HostId":"slb-pop.aliyuncs.com",
	"Code":"InvalidParameter"
}
```

## Error codes { .section}

[Click here to view the error codes.](https://error-center.aliyun.com/status/product/Slb)

repository: WuChenLinux/slb

repo_name: WuChenLinux/slb


text:
# Mellitiosporium hysterinum (Fr.) Gillet, 1886 SPECIES

#### Status
ACCEPTED

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

#### Published in
Champignons de France, Discom. 187 (1886)

#### Original name
Stictis hysterina Fr., 1822

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Send Image Page
- Image selector to choose the image to send

## Screenshots:
Send Image:
<img src="https://github.com/davidhqr/Wave-App/blob/master/screenshots/wave_send_image.jpg" width="200">

repository: davidhqr/Wave-App

gha_language: Dart

repo_name: davidhqr/Wave-App