text:
## pg_listen: trigger a shell command on a Postgres event

Super fast and lightweight. Written in C using libpq.

### Usage

```bash
pg_listen postgres://db-uri channel [/path/to/program] [args]

# for example, to note when NOTIFY happened on "hello" channel
# pg_listen postgres://localhost/postgres hello /bin/echo they said hi

# print payload from the channel
# (default action when no command is specified)
# pg_listen postgres://localhost/postgres fun
```

Note that pg\_listen line-buffers its output, so the payload raised by NOTIFY
needs to include a final newline ("\n"). The program won't output anything
until a newline is encountered.

```sql
-- incorrect
NOTIFY foo, 'hi';

-- correct
NOTIFY foo, E'hi\n';
```

### Building

For Supabase/KPS on Ubuntu use `make kps`

For everything else use:

Just clone the repo and run `make`. The makefile is compatible with BSD and GNU
Make and requires only that libpq be installed on the system.

If you use NixOS you can run `nix-shell` to build it.

If you installed PostgreSQL on Mac using homebrew or Macports, note that
pkg-config is not installed by default and needs to be installed by running
`brew install pkg-config` prior to running `make`. Additionally you may need to
update `$PKG_CONFIG_PATH` and add the directory containing `libpq.pc` for your
system.


text:
# RailsDump2S3

[![Gem Version](https://badge.fury.io/rb/rails_dump2_s3.svg)](http://badge.fury.io/rb/rails_dump2_s3)

Dump rails db to YAML format, and submit to AmazonS3.

## Description

Execute "db:data:dump" (it depends on 'YAML_DB' gem). and upload output file to AmazonS3.

(2015.6.2)
it still not support to AWS-SDKv2, sorry.

## Usage

```bash
export AWS_ACCESS_KEY="Your aws acccess key"
export AWS_SECRET_ACCESS_KEY="Your aws secret acccess key"

rake rails_dump2_s3:dump
```

* adding prefix to file

```
export DUMP2S3_PREFIX=major
bin/rake rails_dump2_s3:dump
 => adding: db/base-development-major-2015-10-05-183924.zip
```

## Install

```bash
gem install "rails_dump2_s3"
```

## Don't export specific table

if you don't export 'sessions' table..
Just do this.

```
bin/rake rails_dump2_s3:dump EXCLUDE_TABLES="sessions"
```

## Licence

[MIT](https://github.com/nils-werner/dump_db/blob/master/LICENCE)

## Author

[jacoyutorius](https://github.com/jacoyutorius)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
## django-i5

This package enables quick and easy configuration for Django applications running behind [i5](https://github.com/nathan-osman/i5).

### Installation

```
pip install django-i5
```

### Usage

In your settings.py file, add the following:

```python
from django_i5 import *
```

The settings defined in the module will cover 99% of what you need to start your Django project. You will also need to define the following variable:

```python
ROOT_URLCONF = '[project].urls'
```


text:
# Description

This gem patches default ruby log formatter so that every line includes a digest of current process PID + currenct thread id so that you can easily grep the logs of every particular thread. It also adds the metadata part to each line of the message in case it is multiline.

Before:

```lang=ruby
> Logger.new(STDOUT).info("Line 1\nLine 2")
I, [2016-05-23T22:33:40.649346 #13604]  INFO -- : Line 1
Line 2
```

After:

```lang=ruby
> Logger.new(STDOUT).info("Line 1\nLine 2")
I [2016-05-23T22:32:30.483767] #bd134bb0: Line 1
I [2016-05-23T22:32:30.483767] #bd134bb0: Line 2
```

# Installation
Simply add `gem "threaded_logging"` to your Gemfile and you are done.

# Licence
MIT


text:
# Node.js - Learnyounode

Minhas soluções do __excelente__ [learnyounode](https://www.npmjs.com/package/learnyounode).

# Branches

Cada _branch_ é uma _lesson_.

1. [HELLO WORLD](https://github.com/olegon/nodejs-learnyounode/tree/HELLO-WORLD)
2. [BABY STEPS](https://github.com/olegon/nodejs-learnyounode/tree/BABY-STEPS)
3. [MY FIRST I/O!](https://github.com/olegon/nodejs-learnyounode/tree/MY-FIRST-IO)
4. [MY FIRST _ASYNC_ I/O!](https://github.com/olegon/nodejs-learnyounode/tree/MY-FIRST-IO-ASYNC)
5. [FILTERED LS](https://github.com/olegon/nodejs-learnyounode/tree/FILTERED-LS)
6. [MAKE IT MODULAR](https://github.com/olegon/nodejs-learnyounode/tree/MAKE-IT-MODULAR)
7. [HTTP CLIENT](https://github.com/olegon/nodejs-learnyounode/tree/HTTP-CLIENT)
8. [HTTP COLLECT](https://github.com/olegon/nodejs-learnyounode/tree/HTTP-COLLECT)
9. [JUGGLING ASYNC](https://github.com/olegon/nodejs-learnyounode/tree/JUGGLING-ASYNC)
10. [TIME SERVER](https://github.com/olegon/nodejs-learnyounode/tree/TIME-SERVER)
11. [HTTP FILE SERVER](https://github.com/olegon/nodejs-learnyounode/tree/HTTP-FILE-SERVER)
11. [HTTP UPPERCASE](https://github.com/olegon/nodejs-learnyounode/tree/HTTP-UPPERCASE)
11. [HTTP JSON API SERVER](https://github.com/olegon/nodejs-learnyounode/tree/HTTP-JSON-API-SERVER)

# Versão

Baseado na versão 3.5.10

repository: olegon/nodejs-learnyounode

repo_name: olegon/nodejs-learnyounode


text:
![](https://img.shields.io/badge/api-v3.0-lightgrey)  [![GitHub license](https://img.shields.io/github/license/aspose-slides-cloud/aspose-slides-cloud-swift)](https://github.com/aspose-slides-cloud/aspose-slides-cloud-swift)

# Swift REST API to Process Presentation in Cloud
This repository contains Aspose.Slides Cloud SDK for Swift source code. This SDK allows you to [process & manipulate PPT, PPTX, ODP, OTP](https://products.aspose.cloud/slides/swift) using Aspose.slides Cloud REST APIs in your Swift applications.

You may want to check out Aspose free [Powerpoint to PDF](https://products.aspose.app/slides/conversion), [Powerpoint to Word](https://products.aspose.app/slides/conversion/ppt-to-word), [Powerpoint to JPG](https://products.aspose.app/slides/conversion/ppt-to-jpg), [Powerpoint to PNG](https://products.aspose.app/slides/conversion/ppt-to-png), [PDF to Powerpoint](https://products.aspose.app/slides/import/pdf-to-powerpoint), [JPG to Powerpoint](https://products.aspose.app/slides/import/jpg-to-ppt), and [PNG to Powerpoint](https://products.aspose.app/slides/import/png-to-ppt) converters because they are live implementations of popular conversion processes.

## Presentation Processing Features

- Fetch presentation images in any of the supported file formats.
- Copy the layout side or clone the master slide from the source presentation.
- Process slides shapes, slides notes, placeholders, colors & font theme info.
- Programmatically create a presentation from HTML & export it to various formats.
- Merge multiple presentations or split the single presentation into multiple ones.
- Extract and replace text from a specific slide or an entire presentation.

## Read & Write Presentation Formats

**Microsoft PowerPoint:** PPT, PPTX, PPS, PPSX, PPTM, PPSM, POTX, POTM
**OpenOffice:** ODP, OTP, FODP
**Other**: PDF, PDF/A

## Save Presentation As

**Fixed Layout:** XPS
**Images:** JPEG, PNG, BMP, TIFF, GIF, SVG
**Web:** HTML/HTML5
**Other:** MPEG4, SWF (export whole presentations)

## Enhancements in Version 23.7

* New methods **ReplaceTextFormatting** and **ReplaceTextFormatting** allow to replace text with formatting.
* Added **AfterAnimationType**, **Rewind** and **AfterAnimationColor** methods to **Effect** class.
* Added **TrimFromStart** and **TrimFromEnd** methods to **VideoFrame** class.

## Enhancements in Version 23.6

* Added methods ho handle VBA methods: **GetVbaProject**, **GetVbaModule**, **CreateVbaModule**, **UpdateVbaModule** and **DeleteVbaModule**. Added model classes related to VBA: **VbaProject**,  **VbaModule** and  **VbaReference**.

## Enhancements in Version 23.4

* Added **CreateTableRow**, **UpdateTableRow** and **DeleteTableRow** methods to add, update and delete table rows.
* Added **UpdateTableCell** method to update table cells.
* Added  **MergeTableCells** and **SplitTableCell** methods to merge & split table cells.
* Added methods to get, add, modify and delete paragraphs & portions within table cells: **GetTableCellParagraph**, **GetTableCellParagraphs**, **GetTableCellPortion**, **GetTableCellPortions**, **CreateTableCellParagraph**, **CreateTableCellPortion**, **UpdateTableCellPortion**, **UpdateTableCellParagraph**, **DeleteTableCellParagraph**,  **DeleteTableCellPortion**.
* New **TextFrameFormat** property in **TableCell** class allows to specify text format for table cells.

## Enhancements in Version 23.3

* Added **options** parameter to **SplitOnline** and **SplitAndSaveOnline** methods. Those options are the same as for other split & convert methods.
* Added **ShowHiddenSlides** boolean property to **ImageExportOptions** class.

## Enhancements in Version 23.2

* New **DownloadShapeFromDto** method allows to convert charts and other shapes from DTO to SVG and other formats without creating and storing presentation files.
* Added **SoundBase64** property to **Hyperlink** class to support getting and setting hyperlink sounds.
* Added **BulletFillFormat** property to **Paragraph** class.
* Added **StopPreviousSound** property to animation **Effect** class.
* Added a number of properties to **TextFrameFormat** that enable formatting shape text: **MarginLeft**, **MarginRight**, **MarginTop**, **MarginBottom**, **WrapText**, **AnchoringType**, **CenterText**, **TextVerticalType**, **AutofitType**, **ColumnCount**, **ColumnSpacing**, **KeepTextFlat**, **RotationAngle**, **DefaultParagraphFormat**.
* Added **Pdf16**, **Pdf17**, **PdfA2b**, **PdfA2a**, **PdfA2u**, **PdfA3a**, **PdfA3b** to the list of allowed values for **PdfExportOptions.Compliance** property.

## Enhancements in Version 23.1

* New **CompressEmbeddedFonts** and **CompressEmbeddedFontsOnline** methods allow to reduce the size taken by embedded fonts by excluding unused characters.

## Licensing
All Aspose.Slides Cloud SDKs are licensed under MIT License.

## How to use the SDK?
The complete source code is available in this repository folder. You can either directly use it in your project via source code or get the library using [Cocoapods](https://cocoapods.org/pods/AsposeSlidesCloud) or [Packages](https://github.com/aspose-slides-cloud/aspose-slides-cloud-swift) (recommended).

## Prerequisites
To use Aspose Slides Cloud SDK for Java you need to register an account with [Aspose Cloud](https://www.aspose.cloud/) and lookup/create App Key and SID at [Cloud Dashboard](https://dashboard.aspose.cloud/#/apps). There is free quota available. For more details, see [Aspose Cloud Pricing](https://purchase.aspose.cloud/pricing).

Minimal supported Swift version is 4.2.3.

### Installation

To use the SDK in a swift package, add a the SDK to dependencies in your Package.swift:

```swift
// swift-tools-version:4.2.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/aspose-slides-cloud/aspose-slides-cloud-swift", from: "22.4.0"),
    ],
    targets: [
        .target(
            name: "MyPackage"
            dependencies: ["AsposeSlidesCloud"]),
    ]
)
```

To use the SDK as a Cocoapod, add "pod 'AsposeSlidesCloud'" line to your Podfile.

```ruby
target 'myproj' do
  ...
  pod 'AsposeSlidesCloud', '~> 22.6.0'
end
```
### Sample usage

The example code below converts a PowerPoint document to PDF format using AsposeSlidesCloud:
```swift
import Foundation
import AsposeSlidesCloud

let dispatchGroup = DispatchGroup()

AsposeSlidesCloudAPI.appSid = "MyClientId"
AsposeSlidesCloudAPI.appKey = "MyClientSecret"

dispatchGroup.enter()
let input = FileManager.default.contents(atPath: "MyPresentation.ppt")!
SlidesAPI.convert(input, "pdf") { (response, e) -> Void in
    do {
        let url = URL(fileURLWithPath: "MyPresentation.pdf")
        try (response as! Data).write(to: url)
    } catch {
        print("Error saving file: \(error).")
    }
    if (e != nil) {
        print("An error occured: \(e).")
    }
    dispatchGroup.leave()
}
dispatchGroup.notify(queue: DispatchQueue.main) {
    exit(EXIT_SUCCESS)
}
dispatchMain()
```

## Aspose.Slides Cloud SDKs in Popular Languages

| .NET | Java | PHP | Python | Ruby | Node.js | Android | Swift|Perl|Go|
|---|---|---|---|---|---|---|--|--|--|
| [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-dotnet) | [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-java) | [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-php) | [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-python) | [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-ruby)  | [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-nodejs) | [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-android) | [GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-swift)|[GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-perl) |[GitHub](https://github.com/aspose-slides-cloud/aspose-slides-cloud-go) |
| [NuGet](https://www.nuget.org/packages/Aspose.slides-Cloud/) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-slides-cloud) | [Composer](https://packagist.org/packages/aspose/slides-sdk-php) | [PIP](https://pypi.org/project/asposeslidescloud/) | [GEM](https://rubygems.org/gems/aspose_slides_cloud)  | [NPM](https://www.npmjs.com/package/asposeslidescloud) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-slides-cloud) | [Cocoapods](https://cocoapods.org/pods/AsposeslidesCloud)|[Meta Cpan](https://metacpan.org/release/AsposeSlidesCloud-SlidesApi) | [Go.Dev](https://pkg.go.dev/github.com/aspose-slides-cloud/aspose-slides-cloud-go/) |

[Product Page](https://products.aspose.cloud/slides/swift) | [Documentation](https://docs.aspose.cloud/display/slidescloud/Home) | [API Reference](https://apireference.aspose.cloud/slides/) | [Code Samples](https://github.com/aspose-slides-cloud/aspose-slides-cloud-swift) | [Blog](https://blog.aspose.cloud/category/slides/) | [Free Support](https://forum.aspose.cloud/c/slides) | [Free Trial](https://dashboard.aspose.cloud/#/apps)


text:
# Tutorial 6: Loading Training Data

This part of the tutorial shows how you can load a corpus for training a model. We assume that you're familiar with the [base types](/resources/docs/TUTORIAL_1_BASICS.md) of this
library.

## The Corpus Object

The `Corpus` represents a dataset that you use to train a model. It consists of a list of `train` sentences,
a list of `dev` sentences, and a list of `test` sentences, which correspond to the training, validation and testing
split during model training.

The following example snippet instantiates the Universal Dependency Treebank for English as a corpus object:

```python
import flair.datasets
corpus = flair.datasets.UD_ENGLISH()
```

The first time you call this snippet, it triggers a download of the Universal Dependency Treebank for English onto your
hard drive. It then reads the train, test and dev splits into the `Corpus` corpus which it returns. Check the length of
the three splits to see how many Sentences are there:

```python
# print the number of Sentences in the train split
print(len(corpus.train))

# print the number of Sentences in the test split
print(len(corpus.test))

# print the number of Sentences in the dev split
print(len(corpus.dev))
```

You can also access the Sentence objects in each split directly. For instance, let us look at the first Sentence in
the training split of the English UD:

```python
# print the first Sentence in the training split
print(corpus.test[0])
```
This prints:
```console
Sentence: "What if Google Morphed Into GoogleOS ?" - 7 Tokens
```

The sentence is fully tagged with syntactic and morphological information. For instance, print the sentence with
PoS tags:

```python
# print the first Sentence in the training split
print(corpus.test[0].to_tagged_string('pos'))
```

This should print:

```console
What <WP> if <IN> Google <NNP> Morphed <VBD> Into <IN> GoogleOS <NNP> ? <.>
```

So the corpus is tagged and ready for training.

For instance, you can downsample the data by calling `downsample()` and passing a ratio. So, if you normally get a
corpus like this:

then you can downsample the corpus, simply like this:

```python
import flair.datasets
downsampled_corpus = flair.datasets.UD_ENGLISH().downsample(0.1)
```

If you print both corpora, you see that the second one has been downsampled to 10% of the data.

```python
print("--- 1 Original ---")
print(corpus)

print("--- 2 Downsampled ---")
print(downsampled_corpus)
```

This should print:

```console
--- 1 Original ---
Corpus: 12543 train + 2002 dev + 2077 test sentences

--- 2 Downsampled ---
Corpus: 1255 train + 201 dev + 208 test sentences
```

For many learning tasks you need to create a target dictionary. Thus, the `Corpus` enables you to create your
tag or label dictionary, depending on the task you want to learn. Simple execute the following code snippet to do so:

```python
# create tag dictionary for a PoS task
corpus = flair.datasets.UD_ENGLISH()
print(corpus.make_tag_dictionary('upos'))

# create tag dictionary for an NER task
corpus = flair.datasets.CONLL_03_DUTCH()
print(corpus.make_tag_dictionary('ner'))

# create label dictionary for a text classification task
corpus = flair.datasets.TREC_6()
print(corpus.make_label_dictionary())
```

Another useful function is `obtain_statistics()` which returns you a python dictionary with useful statistics about your
dataset. Using it, for example, on the IMDB dataset like this

```python
import flair.datasets
corpus = flair.datasets.TREC_6()
stats = corpus.obtain_statistics()
print(stats)
```
outputs detailed information on the dataset, each split, and the distribution of class labels.

### The MultiCorpus Object

If you want to train multiple tasks at once, you can use the `MultiCorpus` object.
To initiate the `MultiCorpus` you first need to create any number of `Corpus` objects. Afterwards, you can pass
a list of `Corpus` to the `MultiCorpus` object. For instance, the following snippet loads a combination corpus
consisting of the English, German and Dutch Universal Dependency Treebanks.

```python
english_corpus = flair.datasets.UD_ENGLISH()
german_corpus = flair.datasets.UD_GERMAN()
dutch_corpus = flair.datasets.UD_DUTCH()

# make a multi corpus consisting of three UDs
from flair.data import MultiCorpus
multi_corpus = MultiCorpus([english_corpus, german_corpus, dutch_corpus])
```

The `MultiCorpus` inherits from `Corpus`, so you can use it like any other corpus to train your models.

## Prepared Datasets

Flair supports a growing list of prepared datasets out of the box. That is, it automatically downloads and sets up the
data the first time you call the corresponding constructor ID. The following datasets are supported:

#### Chunking

| ID(s) | Languages | Description |
| -------------    | ------------- |------------- |
| 'CONLL_2000' | English  |  [CoNLL-2000]((https://www.clips.uantwerpen.be/conll2000/chunking/)) syntactic chunking |

#### Named Entity Recognition

| ID(s) | Languages | Description |
| -------------    | ------------- |------------- |
| 'CONLL_03_DUTCH' | Dutch  |  [CoNLL-03](https://www.clips.uantwerpen.be/conll2002/ner/) 4-class NER |
| 'CONLL_03_SPANISH' | Spanish  |  [CoNLL-03](https://www.clips.uantwerpen.be/conll2002/ner/) 4-class NER |
| 'WNUT_17' | English  |  [WNUT-17](https://noisy-text.github.io/2017/files/) emerging entity detection |
| 'WIKINER_ENGLISH' | English  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'WIKINER_GERMAN'  | German  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'WIKINER_FRENCH'  | French  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'WIKINER_ITALIAN'  | Italian  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'WIKINER_SPANISH' | Spanish  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'WIKINER_PORTUGUESE' | Portuguese  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'WIKINER_POLISH' | Polish  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'WIKINER_RUSSIAN'  | Russian  |  [WikiNER](https://github.com/dice-group/FOX/tree/master/input/Wikiner) NER dataset automatically generated from Wikipedia |
| 'NER_BASQUE' | Basque  |  [NER dataset for Basque](http://ixa2.si.ehu.eus/eiec/) |
| 'DANE' | Danish | [DaNE dataset](https://github.com/alexandrainst/danlp/blob/master/docs/datasets.md#danish-dependency-treebank) |

#### Universal Dependency Treebanks

| ID(s) | Languages | Description |
| -------------    | ------------- |------------- |
| 'UD_ARABIC'| Arabic  |  Universal Dependency Treebank for [Arabic](https://github.com/UniversalDependencies/UD_Arabic-PADT) |
| 'UD_BASQUE'| Basque  |  Universal Dependency Treebank for [Basque](https://github.com/UniversalDependencies/UD_Basque-BDT) |
| 'UD_BULGARIAN'| Bulgarian  |  Universal Dependency Treebank for [Bulgarian](https://github.com/UniversalDependencies/UD_Bulgarian-BTB)
| 'UD_CATALAN', | Catalan  |  Universal Dependency Treebank for [Catalan](https://github.com/UniversalDependencies/UD_Catalan-AnCora) |
| 'UD_CHINESE' | Chinese  |  Universal Dependency Treebank for [Chinese](https://github.com/UniversalDependencies/UD_Chinese-GSD) |
| 'UD_CROATIAN' | Croatian  |  Universal Dependency Treebank for [Croatian](https://github.com/UniversalDependencies/UD_Croatian-SET) |
| 'UD_CZECH' | Czech  |  Very large Universal Dependency Treebank for [Czech](https://github.com/UniversalDependencies/UD_Czech-PDT) |
| 'UD_DANISH' | Danish  |  Universal Dependency Treebank for [Danish](https://github.com/UniversalDependencies/UD_Danish-DDT) |
| 'UD_DUTCH' | Dutch  |  Universal Dependency Treebank for [Dutch](https://github.com/UniversalDependencies/UD_Dutch-Alpino) |
| 'UD_ENGLISH' | English  |  Universal Dependency Treebank for [English](https://github.com/UniversalDependencies/UD_English-EWT) |
| 'UD_FINNISH' | Finnish  |  Universal Dependency Treebank for [Finnish](https://github.com/UniversalDependencies/UD_Finnish-TDT) |
| 'UD_FRENCH' | French  |  Universal Dependency Treebank for [French](https://github.com/UniversalDependencies/UD_French-GSD) |
|'UD_GERMAN' | German  |  Universal Dependency Treebank for [German](https://github.com/UniversalDependencies/UD_German-GSD) |
|'UD_GERMAN-HDT' | German  |  Very large Universal Dependency Treebank for [German](https://github.com/UniversalDependencies/UD_German-HDT) |
|'UD_HEBREW' | Hebrew  |  Universal Dependency Treebank for [Hebrew](https://github.com/UniversalDependencies/UD_Hebrew-HTB) |
|'UD_HINDI' | Hindi  |  Universal Dependency Treebank for [Hindi](https://github.com/UniversalDependencies/UD_Hindi-HDTB) |
|'UD_INDONESIAN' | Indonesian  |  Universal Dependency Treebank for [Indonesian](https://github.com/UniversalDependencies/UD_Indonesian-GSD) |
| 'UD_ITALIAN' | Italian  |  Universal Dependency Treebank for [Italian](https://github.com/UniversalDependencies/UD_Italian-ISDT) |
| 'UD_JAPANESE'| Japanese  |  Universal Dependency Treebank for [Japanese](https://github.com/UniversalDependencies/UD_Japanese-GSD) |
|'UD_KOREAN' | Korean  |  Universal Dependency Treebank for [Korean](https://github.com/UniversalDependencies/UD_Korean-Kaist) |
| 'UD_NORWEGIAN',  | Norwegian  |  Universal Dependency Treebank for [Norwegian](https://github.com/UniversalDependencies/UD_Norwegian-Bokmaal) |
|  'UD_PERSIAN' | Persian / Farsi  |  Universal Dependency Treebank for [Persian](https://github.com/UniversalDependencies/UD_Persian-Seraji) |
| 'UD_POLISH'  |  Polish |  Universal Dependency Treebank for [Polish](https://github.com/UniversalDependencies/UD_Polish-LFG) |
|'UD_PORTUGUESE' | Portuguese  |  Universal Dependency Treebank for [Portuguese](https://github.com/UniversalDependencies/UD_Portuguese-Bosque) |
| 'UD_ROMANIAN' | Romanian  |  Universal Dependency Treebank for [Romanian](https://github.com/UniversalDependencies/UD_Romanian-RRT)  |
| 'UD_RUSSIAN' | Russian  |  Universal Dependency Treebank for [Russian](https://github.com/UniversalDependencies/UD_Russian-SynTagRus) |
| 'UD_SERBIAN' | Serbian  |  Universal Dependency Treebank for [Serbian](https://github.com/UniversalDependencies/UD_Serbian-SET)|
| 'UD_SLOVAK' | Slovak  |  Universal Dependency Treebank for [Slovak](https://github.com/UniversalDependencies/UD_Slovak-SNK) |
| 'UD_SLOVENIAN' | Slovenian  |  Universal Dependency Treebank for [Slovenian](https://github.com/UniversalDependencies/UD_Slovenian-SSJ) |
| 'UD_SPANISH'  | Spanish  |  Universal Dependency Treebank for [Spanish](https://github.com/UniversalDependencies/UD_Spanish-GSD) |
|  'UD_SWEDISH' | Swedish  |  Universal Dependency Treebank for [Swedish](https://github.com/UniversalDependencies/UD_Swedish-Talbanken) |
|  'UD_TURKISH' | Turkish  |  Universal Dependency Treebank for [Tturkish](https://github.com/UniversalDependencies/UD_Turkish-IMST) |

#### Text Classification
| ID(s) | Languages | Description |
| -------------    | ------------- |------------- |
| 'IMDB' | English |  [IMDB](http://ai.stanford.edu/~amaas/data/sentiment/) dataset of movie reviews and sentiment  |
| 'NEWSGROUPS' | English | The popular [20 newsgroups](http://qwone.com/~jason/20Newsgroups/) classification dataset |
| 'TREC_6', 'TREC_50' | English | The [TREC](http://cogcomp.org/Data/QA/QC/) question classification dataset |

#### Text Regression
| ID(s) | Languages | Description |
| -------------    | ------------- |------------- |
| 'WASSA_ANGER' | English | The [WASSA](https://competitions.codalab.org/competitions/16380#learn_the_details) emotion-intensity detection challenge (anger) |
| 'WASSA_FEAR' | English | The [WASSA](https://competitions.codalab.org/competitions/16380#learn_the_details) emotion-intensity detection challenge (fear) |
| 'WASSA_JOY' | English | The [WASSA](https://competitions.codalab.org/competitions/16380#learn_the_details) emotion-intensity detection challenge (joy) |
| 'WASSA_SADNESS' | English | The [WASSA](https://competitions.codalab.org/competitions/16380#learn_the_details) emotion-intensity detection challenge (sadness) |

#### Experimental: Similarity Learning
| ID(s) | Languages | Description |
| -------------    | ------------- |------------- |
| 'FeideggerCorpus' | German |  [Feidegger](https://github.com/zalandoresearch/feidegger/) dataset fashion images and German-language descriptions  |
| 'OpusParallelCorpus' | Any language pair | Parallel corpora of the [OPUS](http://opus.nlpl.eu/) project, currently supports only Tatoeba corpus |

So to load the IMDB corpus for sentiment text classification, simply do:

```python
import flair.datasets
corpus = flair.datasets.IMDB()
```

This downloads and sets up everything you need to train your model.

## Reading Your Own Sequence Labeling Dataset

In cases you want to train over a sequence labeling dataset that is not in the above list, you can load them with the ColumnCorpus object.
Most sequence labeling datasets in NLP use some sort of column format in which each line is a word and each column is
one level of linguistic annotation. See for instance this sentence:

```console
George N B-PER
Washington N I-PER
went V O
to P O
Washington N B-LOC

Sam N B-PER
Houston N I-PER
stayed V O
home N O
```

The first column is the word itself, the second coarse PoS tags, and the third BIO-annotated NER tags. Empty line separates sentences. To read such a
dataset, define the column structure as a dictionary and instantiate a `ColumnCorpus`.

```python
from flair.data import Corpus
from flair.datasets import ColumnCorpus

# define columns
columns = {0: 'text', 1: 'pos', 2: 'ner'}

# this is the folder in which train, test and dev files reside
data_folder = '/path/to/data/folder'

# init a corpus using column format, data folder and the names of the train, dev and test files
corpus: Corpus = ColumnCorpus(data_folder, columns,
                              train_file='train.txt',
                              test_file='test.txt',
                              dev_file='dev.txt')

```

This gives you a `Corpus` object that contains the train, dev and test splits, each has a list of `Sentence`.
So, to check how many sentences there are in the training split, do

```python
len(corpus.train)
```

You can also access a sentence and check out annotations. Lets assume that the training split is
read from the example above, then executing these commands

```python
print(corpus.train[0].to_tagged_string('ner'))
print(corpus.train[1].to_tagged_string('pos'))
```

will print the sentences with different layers of annotation:

```console
George <B-PER> Washington <I-PER> went to Washington <B-LOC> .

Sam <N> Houston <N> stayed <V> home <N>
```

## Reading a Text Classification Dataset

If you want to use your own text classification dataset, there are currently two methods to go about this:
load specified text and labels from a simple CSV file or format your data to the
[FastText format](https://fasttext.cc/docs/en/supervised-tutorial.html).

#### Load from simple CSV file

Many text classification datasets are distributed as simple CSV files in which each row corresponds to a data point and
columns correspond to text, labels, and other metadata.  You can load a CSV format classification dataset using
`CSVClassificationCorpus` by passing in a column format (like in `ColumnCorpus` above).  This column format indicates
which column(s) in the CSV holds the text and which field(s) the label(s). By default, Python's CSV library assumes that
your files are in Excel CSV format, but [you can specify additional parameters](https://docs.python.org/3/library/csv.html#csv-fmt-params)
if you use custom delimiters or quote characters.

Note: You will need to save your split CSV data files in the `data_folder` path with each file titled appropriately i.e.
`train.csv` `test.csv` `dev.csv`.   This is because the corpus initializers will automatically search for the train,
dev, test splits in a folder.

```python
from flair.data import Corpus
from flair.datasets import CSVClassificationCorpus

# this is the folder in which train, test and dev files reside
data_folder = '/path/to/data'

# column format indicating which columns hold the text and label(s)
column_name_map = {4: "text", 1: "label_topic", 2: "label_subtopic"}

# load corpus containing training, test and dev data and if CSV has a header, you can skip it
corpus: Corpus = CSVClassificationCorpus(data_folder,
                                         column_name_map,
                                         skip_header=True,
                                         delimiter='\t',    # tab-separated files
)
```

#### FastText Format
If using `CSVClassificationCorpus` is not practical, you may format your data to the FastText format, in which each line in the file represents a text document. A document can have one or multiple labels that are defined at the beginning of the line starting with the prefix `__label__`. This looks like this:

```bash
__label__<label_1> <text>
__label__<label_1> __label__<label_2> <text>
```

As previously mentioned, to create a `Corpus` for a text classification task, you need to have three files (train, dev, and test) in the
above format located in one folder. This data folder structure could, for example, look like this for the IMDB task:
```text
/resources/tasks/imdb/train.txt
/resources/tasks/imdb/dev.txt
/resources/tasks/imdb/test.txt
```
Now create a `ClassificationCorpus` by pointing to this folder (`/resources/tasks/imdb`).
Thereby, each line in a file is converted to a `Sentence` object annotated with the labels.

Attention: A text in a line can have multiple sentences. Thus, a `Sentence` object can actually consist of multiple
sentences.

```python
from flair.data import Corpus
from flair.datasets import ClassificationCorpus

# this is the folder in which train, test and dev files reside
data_folder = '/path/to/data/folder'

# load corpus containing training, test and dev data
corpus: Corpus = ClassificationCorpus(data_folder,
                                      test_file='test.txt',
                                      dev_file='dev.txt',
                                      train_file='train.txt')
```

Note again that our corpus initializers have methods to automatically look for train, dev and test splits in a folder. So in
most cases you don't need to specify the file names yourself. Often, this is enough:

```python
# this is the folder in which train, test and dev files reside
data_folder = '/path/to/data/folder'

# load corpus by pointing to folder. Train, dev and test gets identified automatically.
corpus: Corpus = ClassificationCorpus(data_folder)
```

## Next

You can now look into [training your own models](/resources/docs/TUTORIAL_7_TRAINING_A_MODEL.md).

repository: humanloop/flair

gha_license_id: NOASSERTION

repo_name: humanloop/flair


text:
# iPreload
It'a classic jQuery preloader that works great with normal images and images in href attribute of `<a>` tag.

## Usage

	(function($) {
		$('body').iPreload(options);
	})(jQuery)

## Options

* onAll : function () - called when all images are fully loaded
* onOne : function (image) - called when one image is fully loaded
* onFail : function (image) - called when an error occurred during loading
* beforeShow : function (image) - called before image is shown
* fadeTime : var(default is 500) - fade time in milliseconds
* delay : var(default is 100) - time between displaying next image
* interval : var(default is 200) - time between checking if any of images
* wrapper : var(default is 'a') - tag in which image is wrapped during loading
* preloadLinkImages: var(default is true) - preload images in href attributes?

## License

Released under MIT license.

repository: pandroid/iPreload

repo_name: pandroid/iPreload


text:
# Shorten That URL

URL shortener app, build with Flask, deployed with Zappa to AWS Lambda and Dynamo DB.

## Testing and Development

### Setup

Install the package (in editable mode) and the development dependencies:
```shell
python -m pip install -e ".[develop]"
```

Testing (and development for that matter) requires a running local instance of Dynamo DB. The easiest way to get there is to have Docker on the testing machine, and download and run the local version of DynamoDB. See also:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html
https://hub.docker.com/r/amazon/dynamodb-local

To get the official DynamoDB docker image:
```shell
docker pull amazon/dynamodb-local
```

Then start the local container with:
```shell
docker run -p 8000:8000 amazon/dynamodb-local
```

### Running the Tests

Run the tests simply with
```shell
pytest
```

### Deployment

This requires that AWS certificate for authentication and authorization is installed on the machine from which you are deploying. See this guide to setup AWS credential on your machine: https://aws.amazon.com/blogs/security/a-new-and-standardized-way-to-manage-credentials-in-the-aws-sdks/

Once this is in place, the initial deployment can be done with Zappa like so:
```shell
$ zappa deploy production
Deploying..
Your application is now live at: https://7k6anj0k99.execute-api.us-east-1.amazonaws.com/production
```

For development deployment, use `dev` instead of `production`.

To an updated version of the Lambda function use:
```shell
$ zappa update production
Updating..
Your application is now live at: https://7k6anj0k99.execute-api.us-east-1.amazonaws.com/production
```

For more info, see the [Zappa README on GitHub](https://github.com/Miserlou/Zappa)

repository: tbrlpld/short

repo_name: tbrlpld/short


text:
---
layout: post
title: Simulation argument IV. Maximal matching
redirect_from: "/2019/02/08/"
permalink: simulation-4
---

This is the fourth and last post of a series about the simulation argument, that
started with [this post](./simulation-1).

---

![](../assets/puzzle-4.png){: .center-image width="50%"}

---

In this post we tackle the maximal matching problem.
Or actually we will show
why establishing a lower bound for this problem is not as easy as for the
sinkless orientation problem.
The real lower bound is in [this paper](https://arxiv.org/abs/1901.02441).

### Encoding

A maximal matching is a set of edges of the graph, such that no two of these
edges are adjacent, and no two unmatched node are linked by an edge.

![](../assets/couplage.png){: .center-image width="100%"}

A natural encoding for this problem would be to label the edges of the matching
with a label $A$, and edges not in the matching with a label $B$.
But this does not work for our setting.
Instead, we will do the following.
(As in the previous post we will deal with 2-colored trees.)

* The edges of the matching are labeled with the label $M$.
* If a white node is not matched then its edges are labeled with $P$.
These are pointers to matched black nodes.
* The remaining edges are labeled with $O$.

On the following picture, red edges are for $M$, green edges are for $P$, and
blue edges are for $O$ (the missing edge should be blue!).

![](../assets/couplage-2.png){: .center-image width="60%"}

The languages we use are then described by the following polynomials:

* $L_W = MO^{\Delta-1}+P^{\Delta}$,
* $L_B = M(P+O)^{\Delta-1} + O^{\Delta}$.

By definition $P_u\subseteq (M+O+P)^{\Delta}$, and is factorized.

### Product property

As the product rule applies, we know that
$P_u \subseteq M(P+0)^{\Delta-1}+O^{\Delta}$.
Thus there is at most one factor of $P_u$ with an $M$.

*Claim 1*: This factor is either $(M)$ or $(M+O)$.

*Proof*: Suppose the factor with $M$ has a $P$.
Then it means that when we develop $P_u$,
there are two monomials $M\times K$ and $P\times K$, with $K$ a polynomial
of degree $\Delta-1$, that does not contain an $M$.
But the monomial $P\times K$ is not included in
$M(P+0)^{\Delta-1}+O^{\Delta}$. which contradicts the product property.

Then we are left with 5 possible sums as factors in $P_u$:
$(M), (O), (P), (M+O), (P+0)$.

Now it seems that we cannot get much more out of our properties, so let's try a
simplification step.

### (Tentative) Simplification step

If we can map $(M+O)$ and $(P+O)$ to a simple label,
and still match the language,
then we are done, and we can conclude like in the [previous post](./simulation-3).
But this is not going to happen.

Suppose you are in following situation, which is supposed to be easy because
there is not even a $(P+O)$. (On the picture, every black node writes on its
adjacent edges.)

![](../assets/couplage-3.png){: .center-image width="60%"}

Ok, let's just take one of the two edges labeled with $M+O$
(let say the one with the smallest port-number on the white node),
label it with $M$, label the other one with $O$, and we are done.

This does notwork.
The problem is the one we highlighted in the [second post](./simulation-2):
the edges are not uniformly set-labeled by all the nodes.
A concrete bad case:

* let $(u,v)$ and $(v,w)$ be the two edges labeled by $(M+0)$
* in its simulation, $u$ has (M+O) for both edges, and based on port-numbers,
decides that $(u,v)$ gets $M$.
* in its simulation $w$ has $(M+O)$ for $(v,w)$, but only $(O)$ for $(u,v)$. Thus
it labels $(v,w)$ with $M$.

To solve this problem you have to synchronize, and this is forbidden as it takes
extra time.

## No lower bound this way

So at the end, we cannot conclude like in the case of sinkless orientation.

Comments on that:

* This makes sense: actually there is a $O(\Delta)$
algorithm for this problem, thus no $\Omega(\log n)$ lower bound exists.

* The above alone does not prove that there is no $\Omega(\log n)$ lower
bound: we could use another definition of the problem, or we could have tried
more exotic label replacement ($M$ transformed into $P$, or whatever).

* If you want to prove a $\Omega(\Delta)$ lower bound then you need to be
smarter. In particular you need that, after the transformation, the language is
different. Basically there should be a parameter that starts with something like
$\Delta$ and decreases at each transformation.
For that, see [the paper](https://arxiv.org/abs/1901.02441)!

-------

Thanks to
[Mikaêl Rabie](https://www.lix.polytechnique.fr/~mrabie/)
for reading and improving this series of posts!

gha_language: HTML


text:
![this.Event Logo](/screenshots/logo.png)

# this.Event

this.Event is an event and meetup application that allows users to find and host events.

# Table of Contents

- [Description](#description)
- [Link](#link)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
- [Technologies](#technologies)
- [Developers](#developers)
- [License](#license)

# Description

this.Event allows users to find nearby events, RSVP to events, host events, and manage events they are hosting. It was built with [NodeJS](https://nodejs.org/), [React](https://reactjs.org/), [Express](https://expressjs.com/), and [MongoDB](https://www.mongodb.com/).

# Link

[this.Event](https://immense-dawn-90138.herokuapp.com/)

# Features

- Search for events on a certain day, near a certain ZIP code, or near the user's current location
- View events you are hosting or attending via the event dashboard
- Get all the important info about an event on the event's profile page
- RSVP for upcoming events, and see who else is attending
- Create, update, and cancel events you are hosting using the event management page

# Installation

1. Clone the project:

```
git clone https://github.com/derekstoeckmann/this.Event.git
```

2. Navigate into the project folder and install the dependencies:

```
cd this.Event
npm install
```

3. Start the development server:

```
node server.js
```

4. In a new terminal window, navigate into the client folder and install the client dependencies:

```
cd this.Event/client
npm install
```

5. Start the client:

```
npm start
```

6. In your browser, navigate to:

```
http://localhost:3000/
```

# Usage

Upon visiting the app for the first time, you will need to create an account in order to proceed. After you submit your user information, you will be redirected to a confirmation page and a confirmation number will be emailed to you.

![Sign up](/screenshots/sign-up.png)

After you confirm your account, you will be redirected to your event dashboard. No events will be displayed at first (since you are not attending or hosting any yet). However, you can search for upcoming events, or create an event of your own.

![Dashboard](/screenshots/dashboard-no-events.png)

When you create an event, you can type the event address into the search box under the map and it will automatically populate your event address info with the map address.

![Create event map](/screenshots/create-event-map.png)

Once you have created or RSVP'd for events, they will be displayed on your event dashboard:

![Events display](/screenshots/events-display.png)

# API

## Events

### Get all events (with optional parameters)

| Method | Route         | Description     |
| :----- | :------------ | :-------------- |
| GET    | `/api/events` | Gets all events |

This route will send a JSON response in the following format:

```
{
  "success": true,
  "count": 1,
  "data": [
    {
      "location": {
        "type": "Point",
        "coordinates": [
          -77.036560,
          38.897957
        ],
        "name": "The White House",
        "address": "1600 Pennsylvania Ave NW",
        "city": "Washington",
        "state": "DC",
        "zipcode": "20500"
      },
      "attending": [],
      "highlights": [
        "",
        "",
        "",
        "",
        ""
      ],
      "public": true,
      "tags": [],
      "_id": "1a2b3c4d5e6f7g8h9i9j0k1l",
      "user": "1a2b3c4d5e6f7g8h9i9j0k1l",
      "title": "First Presidential Inauguration",
      "description": "GW will be first prez!",
      "time": "1789-04-30T00:00:00.000Z",
      "createdAt": "1789-04-30T00:00:00.000Z",
      "updatedAt": "1789-04-30T00:00:00.000Z",
      "shortDescription": "GW will be first prez!",
      "__v": 0
    }
  ]
}
```

### Including query parameters

You may query for events by including the parameters in your request URL.

Example:

```
/api/events?public=true&user=1a2b3c4d5e6f7g8h9i9j0k1l
```

### Get all events near a given location (geospatial queries)

| Method | Route              | Description                           |
| :----- | :----------------- | :------------------------------------ |
| GET    | `/api/events/near` | Gets all events near a given location |

You may query for events within a given radius if you include distance, latitude, and longitude in your request URL in the following format: `/api/events/near?distance=<MILES>&lat=<LATITUDE>&lng=<LONGITUDE>`.

Example:

```
/api/events/near?distance=25&lat=38.897957&lng=-77.036560
```

### More event routes

| Method | Route                            | Description                            |
| :----- | :------------------------------- | :------------------------------------- |
| GET    | `/api/events/:eventid`           | Gets an event by ID                    |
| GET    | `/api/events/:eventid/attending` | Gets all users attending a given event |
| POST   | `/api/events/:eventid`           | Creates an event                       |
| PUT    | `/api/events/:eventid`           | Updates an event                       |
| DELETE | `/api/events/:eventid`           | Deletes an event                       |

## Users

### Get all users (with optional parameters)

| Method | Route        | Description    |
| :----- | :----------- | :------------- |
| GET    | `/api/users` | Gets all users |

This route will send a JSON response in the following format:

```
{
  "success": true,
  "count": 1,
  "data": [
    {
      "_id": "1a2b3c4d5e6f7g8h9i9j0k1l",
      "firstName": "George",
      "lastName": "Washington",
      "email"<EMAIL_ADDRESS>      "createdAt": "1732-02-22T00:00:00.000Z",
      "updatedAt": "1732-02-22T00:00:00.000Z",
      "fullName": "George Washington",
      "__v": 0
    }
  ]
}
```

### Including query parameters

You may query for users by including parameters in your request URL.

Example:

```
/api/users?firstName=Bob&lastName=Ross
```

### More user routes

| Method | Route                          | Description                               |
| :----- | :----------------------------- | :---------------------------------------- |
| GET    | `/api/users/:userid`           | Gets a user by ID                         |
| GET    | `/api/users/:userid/attending` | Gets all events a given user is attending |
| GET    | `/api/users/:userid/hosting`   | Gets all events a given user is hosting   |
| POST   | `/api/users`                   | Creates a user                            |
| PUT    | `/api/users/:userid`           | Updates a user by ID                      |
| DELETE | `/api/users/:userid`           | Deletes a user by ID                      |

# Technologies

- [NodeJS](https://nodejs.org/)
- [Express](https://expressjs.com/)
- [React](https://reactjs.org/)
- [MongoDB](https://www.mongodb.com/)
- [Mongoose](https://mongoosejs.com/)
- [AWS Amplify](https://aws.amazon.com/amplify/) & [Cognito](https://aws.amazon.com/cognito/)
- [Google Maps API](https://developers.google.com/maps/documentation)
- [Axios](https://github.com/axios/axios)
- [Moment.js](https://momentjs.com/)

# Developers

- [Aaron Angle](https://github.com/aaronangle)
- [Chris Neal](https://github.com/chrisneal72)
- [Derek Stoeckmann](https://github.com/derekstoeckmann)

# License

[MIT](https://opensource.org/licenses/MIT)

gha_language: JavaScript


text:
# ansible-bootsy
A minimal recipie for bootstrapping a VM ready for ansible.

The recipie will:
* connect as root
* create a user
* with an ssh key
* disable password based login for the new and root user

The recipie will not:
* update
* harden
* install any other tools

It's sole purpose is to get to the point where ansible can start its real work - and no more.

repository: sbarlster/ansible-bootsy

repo_name: sbarlster/ansible-bootsy


text:
# python-lyrics-scraper
A lyrics scraper written in Python.

# setup
```
$ git clone https://github.com/Kian-W/python-lyrics-scraper
$ cd python-lyrics-scraper
$ python main.py
```

repository: Kian-W/python-lyrics-scraper

repo_name: Kian-W/python-lyrics-scraper


text:
# 53.1. Formatting

Source code formatting uses 4 column tab spacing, with tabs preserved \(i.e., tabs are not expanded to spaces\). Each logical indentation level is one additional tab stop.

Layout rules \(brace positioning, etc\) follow BSD conventions. In particular, curly braces for the controlled blocks of `if`, `while`, `switch`, etc go on their own lines.

Limit line lengths so that the code is readable in an 80-column window. \(This doesn't mean that you must never go past 80 columns. For instance, breaking a long error message string in arbitrary places just to keep the code within 80 columns is probably not a net gain in readability.\)

Do not use C++ style comments \(`//` comments\). Strict ANSI C compilers do not accept them. For the same reason, do not use C++ extensions such as declaring new variables mid-block.

The preferred style for multi-line comment blocks is

```text
/*
 * comment text begins here
 * and continues here
 */
```

Note that comment blocks that begin in column 1 will be preserved as-is by pgindent, but it will re-flow indented comment blocks as though they were plain text. If you want to preserve the line breaks in an indented block, add dashes like this:

```text
    /*----------
     * comment text begins here
     * and continues here
     *----------
     */
```

While submitted patches do not absolutely have to follow these formatting rules, it's a good idea to do so. Your code will get run through pgindent before the next release, so there's no point in making it look nice under some other set of formatting conventions. A good rule of thumb for patches is “make the new code look like the existing code around it”.

The `src/tools` directory contains sample settings files that can be used with the emacs, xemacs or vim editors to help ensure that they format code according to these conventions.

The text browsing tools more and less can be invoked as:

```text
more -x4
less -x4
```

to make them show tabs appropriately.

repository: pgsql-tw/gitbook-docs

gha_license_id: MIT

repo_name: pgsql-tw/gitbook-docs


text:
# responder

Containers respond to HTTP requests on port 8080 with the "version" that the
image is built with using a build arg. Example:

	$ docker build --build-arg VERSION=v1 -t subfuzion/responder:v1 .
	$ docker run -d --network=host subfuzion/responder:v1
	$ curl localhost:8080
	v1

As shown above, the build arg and the image tag should match.

The `hooks` directory supports automated Docker Hub builds. It uses the `git tag`
for the repo to supply the build arg to `docker build`.

> See [subfuzion/responderweb](https://github.com/subfuzion/responderweb) for
a web frontend to a responder.

repository: subfuzion/responder

repo_name: subfuzion/responder


text:
# Indiana Jones and The Infernal Machine Add-on for Blender 2.79
The add-on provides import/export scripts for game resources e.g. models (.3do) and animations (.key).
In addition, it can also import game materials (.mat).

## Requirements
Blender 2.79, you can download it [here](https://download.blender.org/release/Blender2.79/latest/).
To import game resources into blender they need to be extracted from `*.GOB` and `*.CND` files first. Use `gobext` and `cndtool` from [this](https://github.com/smlu/ProjectMarduk) repo.

## Installation
   1. Download `ijim.zip` file from the [Releases](https://github.com/smlu/blender-ijim/releases) page.
   2. Open Blender and select `File > User Preferences > Add-ons > Install Add-on from File`
   and select the downloaded `ijim.zip` file.
   3. Enable the add-on by clicking the checkbox next to the add-on name.
   4. Select `Save User Settings` in the lower left and close the window.

## Usage
### File naming convention
The maximum file name length, including the file extension in Jones3d engine is limited to 64 characters.
Therefore all longer file names have to be abbreviated.
Some of general abbreviations:
        **dflt** - default
        **bk**   - back
        **by**   - boy
        **com**  - commy
        **fr**   - front
        **ib**   - ice boss
        **ij**   - indy jeep
        **in**   - indy
        **inv**  - inventory
        **ir**   - indy raft
        **lb**   - lava boss
        **mc**   - mine car
        **mo**   - monkey
        **by**   - boy
        **ol**   - old lady
        **rft**  - raft
        **sn**   - snake
        **sp**   - spider
        **so**   - sophia
        **tu**   - turner
        **uw**   - under water
        **vo**   - volodnikov
        **yl**   - young lady

        Also, every file which refers to specific game level is prefixed with 3 letters of abbreviated lavel name eg.: pyr_, pru_...

### Importing 3do model
   1. Go to `File > Import > Import Idiana Jones IM model (.3do)`
   2. In the opened dialog, set the path to the folder containing material files (.mat) of model.

    (Bottom left, `Materials folder` property under `Import 3DO` section)
   *Note: Which material files are used by model can be viewed under `MATERIALS` section at the begining of a `3do` file.*

   3. Select the `*.3do` model file and click `Import 3DO`
   *Note: If you are later planning to export imported model make sure that the importing property `Preserve Mesh Hierarchy` is turned on. This will make sure that animations depending on the model won't break in the game.*

### Exporting 3do model
   1. Go to `File > Export > Import Idiana Jones IM model (.3do)`
   2. Select path, name the file and click `Export 3DO`
   *Note: The file name must not be longer then 64 characters. See section [File naming convention](#file-naming-convention).*

### Importing animation
   1. First import 3do model that animation is for.
   *Note: Which key file belongs to which 3do model cannot be figured out easely because one model can have many animations.
   One thing to do is opening puppet file (`.pup`) located in misc/pup folder and see which animations belongs to the same game "actor". Another way is to open up `3do` and `key` file and see if `3do` file contains all mesh names used by `key` file.*

   1. Go to `File > Import > Import Idiana Jones IM animation (.key)`
   2. Select the `*.key` file and click `Import KEY`

### Exporting animation
   1. Go to `File > Export > Import Idiana Jones IM animation (.key)`
   2. (Optional) Change properties of the `Export KEY` section (bottom left)
   3. Select path, name the file and click `Export KEY`
   *Note: The file name must not be longer then 64 characters. See section [File naming convention](#file-naming-convention).*

### Importing material
   1. Go to `File > Import > Import Idiana Jones IM material (.mat)`
   3. Select the `*.mat` file and click `Import MAT`

repository: BlenderCN-Org/blender-ijim

repo_name: BlenderCN-Org/blender-ijim


text:
Security Policy
===============

| Version | Security support   | Bug support        |
| ------- | ------------------ | ------------------ |
| 3.x.x   | :heavy_check_mark: | :heavy_check_mark: |
| 2.x.x   | :heavy_check_mark: | :x:                |
| 1.x.x   | :x:                | :x:                |
| 0.x.x   | :x:                | :x:                |

To reporting a vulnerability send me an email at<EMAIL_ADDRESS>and we will talk about how to address it.

license: ISC

gha_license_id: ISC


text:
---
layout: post
title: f# 2 years later
date: 2018-09-08T21:30:26+02:00
tags: f#
---

## What's the lure of f#?

The main lure of f# is that it's a surprisingly competent [ML](https://en.wikipedia.org/wiki/ML_(programming_language)) style language that transcends some of the limitations of [CIL](https://en.wikipedia.org/wiki/Common_Intermediate_Language).

From my point of view, the main distinguishing feature for f# is [Statically Resolved Type Parameters](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/generics/statically-resolved-type-parameters). It's a feature you don't want to see in business code (same as reflection in c#), but something that enables libraries to take f# to [the next level](https://github.com/fsprojects/FSharpPlus). Compare this to [type classes](http://learnyouahaskell.com/types-and-typeclasses) in Haskell and what is called [functors](https://v1.realworldocaml.org/v1/en/html/functors.html) in OCaml.

## What has delighted me?

 - The editor tooling for f# has grown more stable.
 - That f# has another perspective (compared to c#).
 - Type providers can simplify one-off "scripting".

## What has been annoying?

Personally most of the pain points have been in dealing with .net core.

 - Type providers have recently (2018/05/08) [been fixed to work in .net core](https://blogs.msdn.microsoft.com/dotnet/2018/05/08/f-language-and-tools-update-for-visual-studio-2017-version-15-7/).
 - Using libraries intended to be consumed in c# that uses `Microsoft.Extensions.DependencyInjection` and `Microsoft.Extensions.Options` requires ceremony to use.

 These are minor things. For the most part I don't need dependency injection heavy code in the f# I've been writing.

gha_language: CSS


text:
---
name: Security
---

# Security

Provides access to the security layer of Castro. Most of these values should never be touched.

- [XSS](#xss)
- [Frame](#frame)
- [ContentType](#contenttype)
- [ReferrerPolicy](#referrerpolicy)
- [CrossDomainPolicy](#crossdomainpolicy)
- [STS](#sts)
- [Security.CSP](#csp)

# XSS

Sets the XSS security header. By default the value is `1; mode=block`.

# Frame

Sets the Frame security header. By default the value is ` DENY`. This will not allow to get Castro as an `iframe`.

# ContentType

Makes sure all the MIME headers are followed and do not change. By default the value is `nosniff`.

# ReferrerPolicy

Sets the referrer policy header. By default the value is `origin`.

# CrossDomainPolicy

Specifies the cross domain policy file to use. By default the value is `none`.

# STS

Specifies the amount of seconds the browser should cache your SSL cert. By default the value is `max-age=10000`.

# CSP

Provides access to Castro Content Security Policy header.

- [CSP.Enabled](#csp.enabled)
- [CSP.Default](#csp.default)
- [CSP.Frame](#csp.frame)

# CSP.Enabled

Specifies if Content Security Policy is enabled. By default this value is `true`.

# CSP.Default

Sets the default values for the policy. This value is an array of strings. By default the value is `none`.

# CSP.Frame

Provides access to the Frame part of the Content Security Policy. This layer contains two fields:

- [Frame.Default](#frame.default)
- [Frame.SRC](#frame.src)

# Frame.Default

Sets the default values for the policy. This value is an array of strings.

# Frame.SRC

Sets the SRC values for the policy. This value is an array of strings.

# CSP.Script

Provides access to the Script part of the Content Security Policy. This layer contains two fields:

- [Script.Default](#script.default)
- [Script.SRC](#script.src)

# Script.Default

Sets the default values for the policy. This value is an array of strings.

# Script.SRC

Sets the SRC values for the policy. This value is an array of strings.

# CSP.Font

Provides access to the Font part of the Content Security Policy. This layer contains two fields:

- [Font.Default](#font.default)
- [Font.SRC](#font.src)

# Font.Default

Sets the default values for the policy. This value is an array of strings.

# Font.SRC

Sets the SRC values for the policy. This value is an array of strings.

# CSP.Connect

Provides access to the Connect part of the Content Security Policy. This layer contains two fields:

- [Connect.Default](#connect.default)
- [Connect.SRC](#connect.src)

# Connect.Default

Sets the default values for the policy. This value is an array of strings.

# Connect.SRC

Sets the SRC values for the policy. This value is an array of strings.

# CSP.Style

Provides access to the Style part of the Content Security Policy. This layer contains two fields:

- [Style.Default](#style.default)
- [Style.SRC](#style.src)

# Style.Default

Sets the default values for the policy. This value is an array of strings.

# Style.SRC

Sets the SRC values for the policy. This value is an array of strings.

# CSP.Image

Provides access to the Image part of the Content Security Policy. This layer contains two fields:

- [Image.Default](#image.default)
- [Image.SRC](#image.src)

# Image.Default

Sets the default values for the policy. This value is an array of strings.

# Image.SRC

Sets the SRC values for the policy. This value is an array of strings.

gha_language: Go


text:
### Dynamic Client Registration Endpoints

Data Holders MUST expose the following endpoints in accordance with **[[DCR]](#nref-DCR)**.

For more details of these endpoints see the [DCR APIs](#dcr-apis) section.

For additional statements on the operation of these endpoint during client registration see the [Client Registration](#client-registration) section.

| HTTP Verb | Auth Server Support | TLS-MA | HoK | Grant Type | Access Token Scope
|--------------|-------|-------|-------|------|-----------------------------------------------------------------------------
|**POST /register**|	Required |  |  | N/A | None
|**GET /register/{clientID}**|	Required |  |  | Client Credentials | cdr:registration
|**PUT /register/{clientID}**|	Required |  |  | Client Credentials | cdr:registration
|**DELETE /register/{clientID}**|	Optional |  |  | Client Credentials | cdr:registration

Additional statements regarding these endpoints:

* During registration management requests, Data Holders MUST validate that the scope of access tokens provided includes `cdr:registration`
* Registration requests and responses must conform to the specification in the [DCR APIs](#dcr-apis) section.
* Any fields the Data Holder does not support MUST be ignored without error.
* Registrations MUST only be updated via a PUT operation on the registration endpoint
* POST and PUT operations MUST accept the SSA payload
* Update (PUT) operations are to be used for one of two scenarios:
  1. The client has updated their registration details on the CDR Register and updates this information to the data holder brands
  2. A new version of the SSA has been released and the client updates this information to the data holder brands


text:
# Setup for Nitrous.IO

Before you can run this project, you will need to set three system environment variables.  These are:

* `TWILIO_ACCOUNT_SID` : Your Twilio "account SID" - it's like your username for the Twilio API.  This and the auth token (below) can be found [on your account dashboard](https://www.twilio.com/user/account).
* `TWILIO_AUTH_TOKEN` : Your Twilio "auth token" - it's your password for the Twilio API.  This and the account SID (above) can be found [on your account dashboard](https://www.twilio.com/user/account).
* `TWILIO_NUMBER` : A Twilio number that you own, that can be used for making calls and sending messages.  You can find a list of phone numbers you control (and buy another one, if necessary) [in the account portal](https://www.twilio.com/user/account/phone-numbers/incoming).

Environment Variables can be set by opening a terminal window and typing the following three commands - replace all the characters after the `=` with values from your Twilio account:

    export TWILIO_ACCOUNT_SID=ACXXXXXXXXX
    export TWILIO_AUTH_TOKEN=XXXXXXXXX
    export TWILIO_NUMBER=+16518675309

Run the following commands in the Terminal below:

1. `cd ~/workspace/starter-ruby`
2. `bundle`
3. `./script/server`

Go to the "Preview Menu" and click "Port 3000"

repository: thor-aux/smsbot

repo_name: thor-aux/smsbot


text:
# Containers exercise: Todo App

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/rubenmartinez/RH-exercise-todoapp.svg?branch=master)](https://travis-ci.org/rubenmartinez/RH-exercise-todoapp)

## Project Structure

The project consists of 2 example microservices (This might be an overkill for this exercise, but this is just for demonstration purposes of connected containers):

* **The Todo backend service**: provides internal Todo management without caring about user permissions or how the Todos are used.
* **The FrontEnd service**: which contains the graphical user interface and it communicates with the Todo backend service to delegate all Todo management.

Ideally the Todo backend could provide service to other part of the systems, not only the frontend app, and could evolve separately from them, providing more functionality such as having todo lists, todo projects, todo priorities, todo deadlines with alarms or notifications to URLs while providing backwards compatibility to all his clients.

For simpliticy a main pom builts the two microservices as modules.

### Todo microservice

Module: rhe-todo

A SpringBoot server that manages Todo lifecycles, and could potentially be extended with more functionality. This microservice would be running in an intranet, so it doesn't have to deal with authorization (even if for some microservices that is desirable, even in intranets). This schema allows to test or to directly create requests to the microservice via http commands, without dealing about authentication).

Example, if the microservice is running locally on port 8081:

```bash

# Create two tasks
curl -XPOST -d'{ "ownerUserId": 1, "title": "new task1", "completed": false}' -H'Content-type: application/json' 'http://<IP_ADDRESS>:8081/api/v1/todos'
curl -XPOST -d'{ "ownerUserId": 1, "title": "new task2", "completed": false}' -H'Content-type: application/json' 'http://<IP_ADDRESS>:8081/api/v1/todos'

# Retrieve the tasks created
curl 'http://<IP_ADDRESS>:8081/api/v1/todos?filterOwnerId=1'
```

### FrontEnd Service

The FrontEnd service was created using Springboot for the backend and Vue.js for the frontend part (after a first try in React). The frontend design for the task list, has been borrowed from https://github.com/tastejs/todomvc/tree/master/examples/react, which is under [MIT License](https://github.com/astejs/todomvc/blob/master/license.md) as it looked pretty nice. (**Only** the frontend design, and after some good hours adapting it for the exercise, actually I must admit that I spent too much time of the assignment cause I'm not very versed in web design).

Note: In this case the frontend service is also the frontend gateway and also manages the users. Actually in a production microservice architecture, the user management and frontend gateway parts would be also moved to each own microservice, but I hope this is ok for the exercise.

## Run application

### Docker

A repository for each microservice have been created and uploaded to http://dockerhub.com.

* **rhe-todo**: https://hub.docker.com/r/rubenmartinez/rhe-todo
* **rhe-fe**: https://hub.docker.com/r/rubenmartinez/rhe-fe

#### Docker compose

A docker-compose.yml file is provided so a full stack of all the required servers can be started, including databases, by executing in the project directory:

```bash
docker-compose up
```

This will start one MySQL Server for the FrontEnd Service, another MySQL for the Service for the ToDo Service, and the 2 microservices themselves:

(Assuming docker compose is installed in the local machine, actually a recent version is required docker-compose.yml version '3').

We can check the services started:

```bash
$ docker-compose ps
              Name                            Command               State                Ports
------------------------------------------------------------------------------------------------------------
rh-exercise-todoapp_fe_1           /usr/bin/java -jar /app/rh ...   Up      <IP_ADDRESS>:8080->8080/tcp
rh-exercise-todoapp_mysql-fe_1     docker-entrypoint.sh mysqld      Up      <IP_ADDRESS>:3306->3306/tcp
rh-exercise-todoapp_mysql-todo_1   docker-entrypoint.sh mysqld      Up      3306/tcp, <IP_ADDRESS>:3307->3307/tcp
rh-exercise-todoapp_todo_1         /usr/bin/java -jar /app/rh ...   Up      8080/tcp, <IP_ADDRESS>:8081->8081/tcp
```

The docker-compose descriptor instructs docker to create a new volume on directory `/tmp/todo-datavolume` (so it needs to have access to /tmp directory).

This volume will be used to store the todos, so even if the containers are stopped or restarted, the Todos will be maintained.

To remove the volume and todos you can execute:

```
docker-compose down -v
```

#### Just Docker

In "production mode", the microservices need a mysql database to store users and todos. This MySQL Database is automatically setup when using docker-compose (see previous section) without any extra needed steps, but it is possible to execute the microservices using an existing MySQL Server if available, by executing:

```bash
docker network create rhe
```
```bash
docker run --rm -p8081:8081 --network rhe -eDB_DATASOURCE=jdbc:mysql://[mysql host and port]/todoapp rubenmartinez/rhe-todo
```
```bash
docker run --rm -p8080:8080 --network rhe -eDB_DATASOURCE=jdbc:mysql://[mysql host and port]/todoapp rubenmartinez/rhe-fe
```

In this case the MySQL Server specified should contain a Database called 'todoapp', which access to two users: `rhe-todo` (password: `rhe-todo`), and `rhe-fe` (password: `rhe-fe`).

#### Docker images creation

The Docker images are created directly from the maven deployment process, thanks to the [fabric8io plugin](https://github.com/fabric8io/docker-maven-plugin). To rebuild and push one images you can go the module directory (rhe-todo or rhe-fe) and execute:

```
mvn clean install -Pdocker -DskipTests=true
```

### Helm/Kubernetes/Openshift

I started doing a Helm chart but didn't have time to finished it on time.

Anyway, in case you want to have a look you can find kubernetes deployment descriptors can be found at the [templates directory](https://github.com/rubenmartinez/RH-exercise-todoapp/tree/master/helmchart/templates).

### Local/Debug mode

If docker and/or docker-compose are not installed or there is any problem with previous steps, the application can be still tested in development mode.

In this case SpringBoot will automatically use an embedded database so no need for any other configuration is required.

Note that as no external DBs are used, all ToDos will be lost when the _Todos_ server is restarted, but, if only the FE microservice is restarted, the ToDos will be preserved as expected and the user will be able to continue using the application after the restart.

To start the servers using the development profile, first create the binary packages if not already created with:

```bash
mvn clean package
```

The main pom already copies the executable jars in the project base directory, so we can start each of them by doing in the base directory:

```bash
java -jar target/rhe-todo-0.0.1.jar --spring.profiles.active=devel
```

```bash
java -jar target/rhe-app-0.0.1.jar --spring.profiles.active=devel
```

You will notice the log levels are much more verbose too.

## Application Usage

After stating the applications, please wait for this message to apear in the logs:

```
>>>>>>>>>>>>>>>>>>>> Server ready at http://<IP_ADDRESS>:<port>/ <<<<<<<<<<<<<<<<<<<<
```

Then go to http://<IP_ADDRESS>:8081, which is the port used for the front-end part. (_Note: When starting the services via docker-compose, it is better to wait a few seconds more, as with docker-compose it wasn't inmediate to implement a live probeness for mysql, that is easier on Kubernetes, this wait is not necessary in develpment mode with an embedded database_)

There are two users preloaded in the application (no time to write the user registration part :/)

* user: **admin**; password: **admin**
* user: **user**; password: **user**

Each use will have each own ToDo list. If the application was started with docker compose, the ToDos will be persisted even if the servers are stopped and restarted again (as long as the host machine is not restarted, as the DB is kept in the /tmp directory).

There is a small (FE-based) feature also to filter tasks by title substring. There is also a link to remove all completed tasks, which will cause the tasks to be deleted also from Database.

repository: rubenmartinez/containers-todoapp

repo_name: rubenmartinez/containers-todoapp


text:
# example of including files

**some text** ::include "test2.md" **end**

include from subdirectory ::include "test123/newFile.md"

| column1 | column2 |
| :----:  | :---:   |
| line 1   | ::include "test3.md" |
| line 2   | ::include "test4.md" |

## end

repository: alfa-laboratory/kgen-doc-tools

gha_language: Kotlin

repo_name: alfa-laboratory/kgen-doc-tools


text:
# Project - *Movie App*

**Movie App** shows the latest movies currently playing in theaters. The app utilizes the Movie Database API to display images and basic information about these movies to the user.

Time spent: **12** hours spent in total

## User Stories

The following **required** functionality is completed:

* [ ] Expose details of movie (ratings using RatingBar, popularity, and synopsis) in a separate activity.

* [ ] Allow video posts to be played in full-screen using the YouTubePlayerView (2 points)

    * [ ] When clicking on a popular movie (i.e. a movie voted for more than 5 stars) the video should be played immediately.
    * [ ] Less popular videos rely on the detailed page should show an image preview that can initiate playing a YouTube video.

The following **optional** features will be implemented later on:

* [ ] Add a play icon overlay to popular movies to indicate that the movie can be played.
* [ ] Apply the popular ButterKnife annotation library to reduce view boilerplate.
* [ ] Add a rounded corners for the images using the Glide transformations.

## Video Walkthrough

Here's a walkthrough of implemented user stories:

![Imgur](https://i.imgur.com/lDlEClu.gif)

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

The only problem i had with this app is that the intent was not passing. I later found out that some of the activities were not included in the manifest file.

## Open-source libraries used

- [Android Async HTTP](https://github.com/loopj/android-async-http) - Simple asynchronous HTTP requests with JSON parsing
- [Glide](https://github.com/bumptech/glide) - Image loading and caching library for Android

## License

    Copyright [yyyy] [name of copyright owner]

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

repository: DamionMcKenzie/IMDB-MOVIE-APP

repo_name: DamionMcKenzie/IMDB-MOVIE-APP


text:
---
layout: post
title: "Workshop Announcement"
published: False
---

The first reflectivity data, reduction, and analysis standardisation workshop will be held at Cosener's House, Abingdon in October 2019.
This is funded by the ISIS Neutron and Muon Source and Diamond Light Source.
More information about this event can be found on the [Workshop](/workshop/) page.


text:
# [Break camelCase](https://www.codewars.com/kata/5208f99aee097e6552000148)

Complete the solution so that the function will break up camel casing, using a space between words.

### Example

```
solution("camelCasing")  ==  "camel Casing"
```

---

## Tags

- Algorithms
- Data Types
- Formatting
- Fundamentals
- Logic
- Strings

repository: marcobiedermann/codewars

path: /kata/6 kyu/break-camelcase/readme.md

branch_name: refs/heads/main

gha_language: TypeScript

repo_name: marcobiedermann/codewars


text:
# Robust bus replacement problem

This repository hosts our analysis of the robust bus replacement problem as documented in:

> Blesch, M. & Eisenhauer, P. (2019). Robust investments under risk and ambiguity. *Unpublished Working Paper*, submitted.

## Miscellaneous

There are several commands available to ease the workflow.

* `execute-notebooks`, runs all notebooks in the repository

* `update-repository`, updates the whole repository including all submodules

[![Build Status](https://travis-ci.org/robustzurcher/analysis.svg?branch=master)](https://travis-ci.org/robustzurcher/analysis)

repository: robustzurcher/analysis

gha_language: Jupyter Notebook

repo_name: robustzurcher/analysis


text:
# Security Backup Mechanisms

Security backup mechanisms are methods and processes used to provide protection of the data stored on cloud-based mobile applications. These types of mechanisms can include encryption, access control, authentication, and monitoring. Security backup mechanisms also provide a way to maintain the integrity of the data stored in the cloud and ensure that it is potential intruders are not able to gain access.

## Backup Mechanisms Examples:

| Security Requirement | Mobile Plataform | Mechanism | Description | OSI Layer |
| --- | :-: | --- | --- | --- |
|Data Encryption| iOS | AirDrop |Apple’s file-sharing protocol | Application |
|Data Backups| iOS | iCloud | Apple’s cloud storage solutions | Application |
|Authentication| Android | Google Play services |Google’s platform for authentication and security checks | Application |
|Data Encryption| Android | AES Encryption | Advanced Encryption Standard algorithm | Session |
|Data Backups|Android | Google Drive |Google’s cloud storage solution | Application |

repository: SECURIoTESIGN/SECURIoTESIGN

repo_name: SECURIoTESIGN/SECURIoTESIGN


text:
# Weights and Biases [![ci](https://circleci.com/gh/wandb/client.svg?style=svg)](https://circleci.com/gh/wandb/client) [![pypi](https://img.shields.io/pypi/v/wandb.svg)](https://pypi.python.org/pypi/wandb)

The **Weights and Biases** client is an open source library, CLI (wandb), and local web application for organizing and analyzing your machine learning experiments. Think of it as a framework-agnostic lightweight TensorBoard that persists additional information such as the state of your code, system metrics, and configuration parameters.

## Local Features

*   Store config parameters used in a training run
*   Associate version control with your training runs
*   Search, compare, and visualize training runs
*   Analyze system usage metrics alongside runs

## Cloud Features

*   Collaborate with team members
*   Run parameter sweeps
*   Persist runs forever

## Quickstart

```shell
pip install wandb
```

In your training script:

```python
import wandb
from wandb.keras import WandbCallback
# Your custom arguments defined here
args = ...

run = wandb.init(config=args)
run.config["more"] = "custom"

def training_loop():
    while True:
        # Do some machine learning
        epoch, loss, val_loss = ...
        # Framework agnostic / custom metrics
        run.history.add({"epoch": epoch, "loss": loss, "val_loss": val_loss})
        # Keras metrics
        model.fit(..., callbacks=[WandbCallback()])
```

Running your training script will save data in a directory named _wandb_ relative to your training script. To view your runs, call `wandb board` from the same directory as your training script.

## Cloud Usage

[Signup](https://app.wandb.ai/login?invited) for an account, then run `wandb init` from the directory with your training script. You can checkin _wandb/settings_ to version control to enable other users on your team to share experiments. Run your script with `wandb run my_script.py` and all metadata will be synced to the cloud.

## Detailed Usage

Framework specific and detailed usage can be found in our [documentation](http://docs.wandb.com/).

## Development

See https://github.com/wandb/client/blob/master/DEVELOPMENT.md

repository: arroadie/client

repo_name: arroadie/client


text:
# material

[![License][license-image]][license-url]
[![Code Style][code-style-image]][code-style-url]

## Table of Contents

1. [Features](#features)
1. [Requirements](#requirements)
1. [Getting Started](#getting-started)
1. [Application Structure](#application-structure)
1. [Development](#development)
    1. [Routing](#routing)
1. [Configuration](#configuration)
1. [Production](#production)
1. [Deployment](#deployment)

## Requirements

* node `^8`
* npm `^3.0.0`

## Getting Started

1. Install app and functions dependencies: `npm i && npm i --prefix functions` or `yarn install && yarn install --cwd functions`
1. Create `src/config.js` file that looks like so if it does not already exist:
    ```js
    const firebase = {
      // Config from Firebase console
    }

    // Overrides for for react-redux-firebase/redux-firestore config
    export const reduxFirebase = {}

    export default {
      env,
      firebase,
      reduxFirebase
    }
    ```
1. Start Development server: `npm start`

While developing, you will probably rely mostly on `npm start`; however, there are additional scripts at your disposal:

|`npm run <script>`    |Description|
|-------------------|-----------|
|`start`            |Serves your app at `localhost:3000` with automatic refreshing and hot module replacement|
|`start:build`       |Builds the application to `./build` then serves at `localhost:3000` using `firebase serve`|
|`build`            |Builds the application to `./build`|
|`lint`             |[Lints](http://stackoverflow.com/questions/8503559/what-is-linting) the project for potential errors|
|`lint:fix`         |Lints the project and [fixes all correctable errors](http://eslint.org/docs/user-guide/command-line-interface.html#fix)|

[Husky](https://github.com/typicode/husky) is used to enable `prepush` hook capability. The `prepush` script currently runs `eslint`, which will keep you from pushing if there is any lint within your code. If you would like to disable this, remove the `prepush` script from the `package.json`.

## Config Files

There are multiple configuration files:

* Firebase Project Configuration (including settings for how `src/config.js` is built on CI) - `.firebaserc`
* Project Configuration used within source (can change based on environment variables on CI) - `src/config.js`
* Cloud Functions Local Configuration - `functions/.runtimeconfig.json`

More details in the [Application Structure Section](#application-structure)

## Application Structure

The application structure presented in this boilerplate is **fractal**, where functionality is grouped primarily by feature rather than file type. Please note, however, that this structure is only meant to serve as a guide, it is by no means prescriptive. That said, it aims to represent generally accepted guidelines and patterns for building scalable applications.

```
├── public                   # All build-related configuration
│   ├── index.html           # Main HTML page container for app
│   ├── scripts              # Scripts used within the building process
│   │  └── compile.js        # Custom Compiler that calls Webpack compiler
│   │  └── start.js          # Starts the custom compiler
├── src                      # Application source code
│   ├── config.js            # Environment specific config file with settings from Firebase (created by CI)
│   ├── components           # Global Reusable Presentational Components
│   ├── constants            # Project constants such as firebase paths and form names
│   │  ├── formNames.js      # Names of redux forms
│   │  └── paths.js          # Paths for application routes
│   ├── containers           # Global Reusable Container Components (connected to redux state)
│   ├── layouts              # Components that dictate major page structure
│   │   └── CoreLayout       # Global application layout in which to render routes
│   ├── routes               # Main route definitions and async split points
│   │   ├── index.js         # Bootstrap main application routes
│   │   └── Home             # Fractal route
│   │       ├── index.js     # Route definitions and async split points
│   │       ├── assets       # Assets required to render components
│   │       ├── components   # Presentational React Components (state connect and handler logic in enhancers)
│   │       ├── modules      # Collections of reducers/constants/actions
│   │       └── routes/**    # Fractal sub-routes (** optional)
│   ├── static               # Static assets
│   ├── store                # Redux-specific pieces
│   │   ├── createStore.js   # Create and instrument redux store
│   │   └── reducers.js      # Reducer registry and injection
│   ├── styles               # Application-wide styles (generally settings)
│   └── utils                # General Utilities (used throughout application)
│   │   ├── components.js    # Utilities for building/implementing react components (often used in enhancers)
│   │   ├── form.js          # For forms (often used in enhancers that use redux-form)
│   │   └── router.js        # Utilities for routing such as those that redirect back to home if not logged in
├── tests                    # Unit tests
├── .env.local               # Environment settings for when running locally
├── .eslintignore            # ESLint ignore file
├── .eslintrc.js             # ESLint configuration
├── .firebaserc              # Firebase Project configuration settings (including ci settings)
├── database.rules.json      # Rules for Firebase Real Time Database
├── firebase.json            # Firebase Service settings (Hosting, Functions, etc)
├── firestore.indexes.json   # Indexs for Cloud Firestore
├── firestore.rules          # Rules for Cloud Firestore
└── storage.rules            # Rules for Cloud Storage For Firebase
```

## Routing

We use `react-router-dom` [route matching](https://reacttraining.com/react-router/web/guides/basic-components/route-matching) (`<route>/index.js`) to define units of logic within our application. The application routes are defined within `src/routes/index.js`, which loads route settings which live in each route's `index.js`. The component with the suffix `Page` is the top level component of each route (i.e. `HomePage` is the top level component for `Home` route).

There are two types of routes definitions:

### Sync Routes

The most simple way to define a route is a simple object with `path` and `component`:

*src/routes/Home/index.js*

```js
import HomePage from './components/HomePage'

// Sync route definition
export default {
  path: '/',
  component: HomePage
}
```

### Async Routes

Routes can also be seperated into their own bundles which are only loaded when visiting that route, which helps decrease the size of your main application bundle. Routes that are loaded asynchronously are defined using `react-loadable`:

*src/routes/NotFound/index.js*

```js
import Loadable from 'react-loadable'
import LoadingSpinner from 'components/LoadingSpinner'

// Async route definition
export default {
  component: Loadable({
    loader: () =>
      import(/* webpackChunkName: 'NotFound' */ './components/NotFoundPage'),
    loading: LoadingSpinner
  })
}
```

With this setting, the name of the file (called a "chunk") is defined as part of the code as well as a loading spinner showing while the bundle file is loading.

More about how routing works is available in [the react-router-dom docs](https://reacttraining.com/react-router/web/guides/quick-start).

## FAQ

1. Why node `8` instead of a newer version?

  [Cloud Functions runtime runs on `8`](https://cloud.google.com/functions/docs/writing/#the_cloud_functions_runtime), which is why that is what is used for the travis build version.

1. Why `enhancers` over `containers`? - For many reasons, here are just a few:
    * separates concerns to have action/business logic move to enhancers (easier for future modularization + optimization)
    * components remain "dumb" by only receiving props which makes them more portable
    * smaller files which are easier to parse
    * functional components can be helpful (along with other tools) when attempting to optimize things

[climate-image]: https://img.shields.io/codeclimate/github/prescottprue/material.svg?style=flat-square
[climate-url]: https://codeclimate.com/github/prescottprue/material
[coverage-image]: https://img.shields.io/codeclimate/coverage/github/prescottprue/material.svg?style=flat-square
[coverage-url]: https://codeclimate.com/github/prescottprue/material
[license-image]: https://img.shields.io/npm/l/material.svg?style=flat-square
[license-url]: https://github.com/prescottprue/material/blob/master/LICENSE
[code-style-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[code-style-url]: http://standardjs.com/

repository: prescottprue/react-redux-firebase

repo_name: prescottprue/react-redux-firebase


text:
# Contributing

Hi there! We welcome contributions to Libraries to improve Sourcerer and learn more about the engineering world!

## Adding a library

We try only to add libraries once they have some usage. We prefer libraries to be in use in hundreds of repositories before supporting them in Sourcerer.

To add support for a new library:

1. Add a `name` for your library that will be used to show the library in Sourcerer profiles.
1. Add information about library:
`repo` - github repository with library’s source code. If no open source code for the library is available then keep `repo` empty and add `examples` field with list of github repositories that extensively use the library.
At `names in imports` list all possible imports for the library. If the library is being used without importing, leave the list empty.
`tech` - add technology from [`technologies.json`](technologies.json).
1. Open a pull request. It will take us a couple of days to update classifiers for your libraries.


text:
# getBaseNameWithoutExtension

Remove any folder in a variable filename and return only the filename but without the extension.

```batch
<!-- concat-md::include "./files/get_basename_without_extension.cmd" -->
```


text:
# User interface client

Throughout this documentation, a "user interface client" refers to code that
creates a graphical user interface and responds to input events, such as mouse,
touch, and keyboard.

## A UI is composed with multiple APIs

These UI functions are divided between a number of FIDL APIs to serve a
broad spectrum of [constituents](/docs/contribute/governance/api_council.md#values);
hence there is no single "UI API". Instead, a client implements its UI using
the APIs it needs.

![user interface client](images/ui-client.png)

Some examples include:
  * [fuchsia.ui.composition.Flatland](/sdk/fidl/fuchsia.ui.composition/flatland.fidl) for views and graphics
  * [fuchsia.ui.views.ViewRefFocused](/sdk/fidl/fuchsia.ui.views/view_ref_focused.fidl)
    and [Focuser](/sdk/fidl/fuchsia.ui.views/focuser.fidl) for view focus management
  * [fuchsia.ui.pointer](/sdk/fidl/fuchsia.ui.pointer) for mouse and touch
  * [fuchsia.ui.input3.Keyboard](/sdk/fidl/fuchsia.ui.input3/keyboard.fidl) for keyboard

## A UI client has a View to place graphical content

A UI client creates a [view](/docs/glossary#view) in the global view tree, and
within that view, presents graphical content to the user via a display.

For more information, see the [views](/docs/concepts/ui/scenic/views.md) documentation.

## A UI client receives input events and reacts appropriately

The Fuchsia platform may send a UI client a sequence of input events initiated
by a user. Typically these input events are directed at the UI client's view. A
UI client is then responsible for reacting to input events that are directed to
its view; for example, it can update its graphical content based on a mouse
click event.

repository: gnoliyil/fuchsia

repo_name: gnoliyil/fuchsia