text:
# Censoring
This module allows you to detect patterns in texts, even when attempted to be hidden and then either highlight (markup) or censor (replace) them.
It checks for upper casing, lower casing, 1337 replacements, or s,p-l.'i*t.

**Note:** This module works in the browser as a global, or AMD module, as well as in node.js.

## Example:

```javascript
var Censoring    = require('censoring'),
    scan         = new Censoring(),
    testSentence = '';

// Enable filters we want to use
scan.enableFilters(['phone_number', 'email_address', 'words']);

// Word
testSentence += 'The 1nt3r.n.e.t will not be censored! ';

// Phone number
testSentence += 'Call me on 555-123456';

// Email address
testSentence += ', or send an email to me[at]example(dot)com.';

// Let's make the word internet illegal.
scan.addFilterWord('internet');

// Tell the scanner we're done, and it can prepare the results.
scan.prepare(testSentence);

// Did we have a match?
if (scan.test()) {
  console.log(
    'We had a match! Here it is, but censored:',
    scan.replace()
  );

  // The *** will not be censored! Call me on ***, or send an email to ***.
}
```

## Installation
`npm install --save censoring`

## Filters

| Pattern       | Description                              |
| :------------ | :----------------------------------------|
| long_number   | Matches long, consecutive numbers        |
| phone_number  | Matches phone numbers.                   |
| email_address | Matches email addresses in many formats. |
| url           | Matches URL patterns.                    |
| words         | Finds words, even when in disguise.      |

## Methods
A `Censoring` instance has the following methods.

### .enableFilter(string filterName)
Enable a filter from the list of filters. By default, they're all disabled.

```javascript
var scan = new Censoring();

scan.enableFilter('email_address');
```

### .enableFilters(Array filterNames)
Enable multiple filters from the list of filters. By default, they're all disabled.

```javascript
var scan = new Censoring();

scan.enableFilters(['phone_number', 'email_address']);
```

### .disableFilter(string filterName)
Disable a previously enabled filter.

```javascript
var scan = new Censoring();

scan.enableFilter('email_address');
scan.disableFilter('email_address');
```

### .addFilterWords(Array filterWords)
Add multiple words to filter on.

```javascript
var scan = new Censoring();

scan.enableFilter('words');
scan.addFilterWords(['stoopid head', 'big meany']);
```

### .addFilterWord(string filterWord)
Add a word to filter on.

```javascript
var scan = new Censoring();

scan.enableFilter('words');
scan.addFilterWord('doody face');
```

### .setReplacementString(string replacementString)
Set the string to replace matches with. Defaults to `***`.

```javascript
var scan = new Censoring();

scan.setReplacementString('pony');
```

### .getReplacementString()
Get the currently set replacement string.

```javascript
var scan = new Censoring();

scan.getReplacementString(); // Returns '***'
```

### .setHighlightColor(string hexCode)
Set the color for highlighted occurrences. Defaults to `#F2B8B8`.

```javascript
var scan = new Censoring();

scan.setHighlightColor('#ff0');
```

### .prepare(string inputString[, bool highlight])
Prepare a string, and optionally supply `highlight` to not replace occurrences, but highlight them using html.

```javascript
var scan = new Censoring();

scan.enableFilter('email_address');
scan.prepare('me@example[dot]com', true);
```

### .test()
Test if the string you've prepared matches any of the filters.

```javascript
var scan = new Censoring();

scan.enableFilter('email_address');
scan.prepare('me@example[dot]com');

if (scan.test()) {
  console.log('We have a match!');
}
```

### .replace()
Replace all occurrences found in the prepared string.

> Note: This will return HTML with the matches highlighted if the scan was prepared with .prepare(txt, true).

```javascript
var scan = new Censoring();

scan.enableFilter('email_address');
scan.prepare('Email me at me@example[dot]com');

console.log(scan.replace());
// Outputs: Email me at ***
```

### .filterString(string inputString[, bool highlight])
Filter a string directly, without preparing it first.

> Note: Bad for performance When combined with `.test()` and `.replace`.

```javascript
var scan = new Censoring(),
    testString = "I'm going to tell mommy that you're a big meany!",
    result;

scan.enableFilter('words');
scan.addFilterWord(['stoopid head', 'big meany']);

result = scan.filterString(testString);

console.log(result);
// Outputs: I'm going to tell mommy that you're a ***!
```

### .addFilter(string name)
Add a new filter. A filter is essentially a `name` and a `pattern`.

```javascript
var scan = new Censoring();

scan.addFilter('bigot', {
    enabled: true,
    pattern: /^I'm not a racist,? but/
});
```

## Support / contributing
If you have any questions or feature requests (such as publishing on bower..?) you can:

* Check out the issues
* Join us on freenode (#spoonx)

repository: SpoonX/Censoring

repo_name: SpoonX/Censoring


text:
Circuit breaker
===============

This implements the circuit breaker design pattern using a Doctrine cache adaptor for persistence

Tests
-----

To run the test suite

```bash
php composer.phar install --dev
./vendor/bin/phpspec run

```

License
-------

This is licensed under the MIT license.

license: MIT

repository: codeinabox/circuit-breaker

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: codeinabox/circuit-breaker


text:
## Data Structures and Algorithms - Theory and Practice

This repository is a work in progress containing JavaScript/C++ code for some of the most used data structures and algorithms as I learn and code them. Also, it contains solutions for some common interview problems from programming challenges platforms like Hackerrank, Leetcode and Codewars that I will be solving along the way.

Please, keep in mind that, as I am also a student, the code may not (probably not) be the most efficient and readable, so if you have suggestions of improvements or corrections please feel free to reach out and contribute.

### Contents

- #### [Big-O: Time and Space complexities](/Big-O/README.md) :white_check_mark:
- #### Data Structures
  - [Arrays](DataStructures/Array/README.md) :white_check_mark:
  - [Linked Lists](DataStructures/Linked%20List/README.md) :white_check_mark:
  - [Stacks](DataStructures/Stack/README.md) :white_check_mark:
  - [Queues](DataStructures/Queue/README.md) :white_check_mark:
  - [Hash Tables](DataStructures/Hash%20Table/README.md) [only code]
  - [Binary Search Tree](/DataStructures/Binary%20Search%20Tree/README.md) [only code]
  - [AVL Tree](/DataStructures/AVL%20Tree/README.md) [only code]
  - [Red-Black Tree](/DataStructures/Red-Black%20Tree/README.md) [only code]
  - [Heaps](/DataStructures/Heaps/README.md) [only code]
  - [Priority Queue](DataStructures/Priority%20Queue/README.md) [only code]
  - [Trie](DataStructures/Tries/README.md) [only code]
  - [Graphs](DataStructures/Graphs/README.md)
    - [Minimum Spanning Tree - MST](/DataStructures/Graphs/Minimum%20Spanning%20Tree/README.md) :white_check_mark:
  - [Disjoint Set Union - DSU](/DataStructures/Disjoint%20Set/README.md) :white_check_mark:
- #### Algorithms
  - Sorting
    - [Bubble Sort](/Algorithms/Sorting/Bubble%20Sort/README.md) [only code]
    - [Insertion Sort](/Algorithms/Sorting/Insertion%20Sort/README.md) [only code]
    - [Selection Sort](/Algorithms/Sorting/Selection%20Sort/README.md) [only code]
    - [Bucket Sort](/Algorithms/Sorting/Bucket%20Sort/README.md) [only code]
    - [Merge Sort](/Algorithms/Sorting/Merge%20Sort/README.md) [only code]
    - [Quick Sort](/Algorithms/Sorting/Quick%20Sort/README.md) [only code]
    - [Counting Sort](/Algorithms/Sorting/Counting%20Sort/README.md) [only code]
    - [Radix Sort](Algorithms/Sorting/Radix%20Sort/README.md) :white_check_mark:
    - [Topological Sort](Algorithms/Sorting/Topological%20Sort/README.md) :white_check_mark:
  - Searching
    - [Binary Search](/Algorithms/Searching/Binary%20Search/README.md) [only code]
    - [Breadth First Search (BFS)](Algorithms/Searching/Breadth%20First%20Search/README.md) :white_check_mark:
    - [Depth First Search (DFS)](Algorithms/Searching/Depth%20First%20Search/README.md) :white_check_mark:
  - Single Source Shortest Path (SSSP)
    - [Breadth First Search (BFS)](Algorithms/Shortest%20Path/Breadth%20First%20Search/README.md) [only code]
    - [Dijkstra](Algorithms/Shortest%20Path/Dijkstra/README.md) :white_check_mark:
    - [Bellman-Ford](Algorithms/Shortest%20Path/Bellman%20Ford/README.md) [theory + code]
  - All Pairs Shortest Path (APSP)
    - [Floyd-Warshall](Algorithms/Shortest%20Path/Floyd-Warshall/README.md) :white_check_mark:
  - [Minimum Spanning Tree - MST](/DataStructures/Graphs/Minimum%20Spanning%20Tree/README.md) :white_check_mark:
    - [Kruskal](/Algorithms/Minimum%20Spanning%20Tree/Kruskal/README.md) :white_check_mark:
    - [Prim](/Algorithms/Minimum%20Spanning%20Tree/Prim/README.md) :white_check_mark:
  - [Greedy](/Algorithms/Greedy/README.md)
    - [Activity Selection](/Algorithms/Greedy/Activity%20Selection/README.md) :white_check_mark:
    - [Coin Change](/Algorithms/Greedy/Coin%20Change/README.md) :white_check_mark:
    - [Fractional Knapsack](/Algorithms/Greedy/Fractional%20Knapsack/README.md) :white_check_mark:
- #### [Problems](/Problems/README.md)

repository: pedrotorreao/DSA

repo_name: pedrotorreao/DSA


text:
---
layout: post
title:  "How to build the jenkins job periodically with parameters"
description:  In this blog, we are going to see about how to build the jenkins job periodically with parameters.
date:   2020-04-07 11:00:00 +0530
categories: jenkins
author: senthil
---

In this blog, we are going to see about How to use “Jenkins build periodically with parameters”? Using “Parameterized Scheduler” Plugin. By default, Parameterized Scheduler plugin is not installed in Jenkins.

Steps:

* Setup the Parameterized Scheduler plugin

In “Manage Jenkins” –> In "Available" tab –> Select "Parameterized Scheduler" –> click "Install without restart".

![]({{site.baseurl}}/images/parameterizedscheduler.png)

* Create new freeStyle job or Pipeline job

* In Job Configure page, setup two string parameters: NAME and CITY.

![]({{site.baseurl}}/images/parameterizedschedulerstringparams.png)

In “Build Triggers” tab, select “Build periodically with parameters”

![]({{site.baseurl}}/images/parameterizedschedulerbuildtrigger.png)

```
# every minutes auto run job
* * * * * % NAME=Mat; CITY=Chennai
```

If it is freeStyle job, in the "Execute shell" basic.

```
echo "My name is ${NAME}"
echo "My city is ${CITY}"
```

If it is pipleline use Declarative Pipeline script:

The parameterized cron trigger can be specified using the key parameterizedSpecification under the parameterizedCron under the triggers directive. The built in cron trigger is still available and is independent of parameterizedCron
```
pipeline {
    agent any
    parameters {
      string(name: 'PLANET', defaultValue: 'Earth', description: 'Which planet are we on?')
      string(name: 'GREETING', defaultValue: 'Hello', description: 'How shall we greet?')
    }
    triggers {
        parameterizedCron('''
            # leave spaces where you want them around the parameters. They'll be trimmed.
            # we let the build run with the default name
            */2 * * * * %GREETING=Hola;PLANET=Pluto
            */3 * * * * %PLANET=Mars
        ''')
    }
    stages {
        stage('Example') {
            steps {
                echo "${params.GREETING} ${params.PLANET}"
                script { currentBuild.description = "${params.GREETING} ${params.PLANET}" }
            }
        }
    }
}
```

repository: awscloudhacks/blog

gha_language: HTML

gha_license_id: MIT

repo_name: awscloudhacks/blog


text:
# Detail
Sparse copy of boost, these came from some weird mirror

* https://github.com/seL4/libboost/tree/master/include/boost/preprocessor

# Contributing
I renamed the folder to `riscv_boost` because we include the parent folder from MULTIPLE
projects so we do not want boost to interfear at all.  We would like to keep all riscv code inside this repo

repository: siglabsoss/riscv-baseband

repo_name: siglabsoss/riscv-baseband


text:
# FMLA Leave Assistant
### Team Members
* Jonny Graybill
* Lee-Roy King
* Austin Wood
* Adrienne Easton

### Description
* FMLA software designed to assist employees and administrators to provide accurate tracking of FMLA protected leave.

### Problem Domain and Approach

* Currently, operators have no idea what their usage of FMLA is. Without this knowledge they do not know when they can or cannot take leave. This app is designed to provide employees peace of mind for getting their leave approved. From the administration side, pay adjustments for fmla leave are encoded by individuals on a biweekly basis equating to roughly 10% of their work week. This project will address these issues by, reducing the amount of time administrators spend organizing and annotating leave. Additionally this will give operators, visibility into and control of their FMLA leave.

### User Stories

#### Users
* As a user I want a clean interface  so that I understand what I need to do
* As a user I want to be able to select my language preference so that I can better understand the content
* As a user I want to be able to clear access to clear accurate knowledge  so that I can plan my FMLA
* As a user I want easily navigate my pages so that I don't frustrated
* As a user I want my username to bring up my data so that I can track my data an ensure its accurate
* As a user I want to be able to view my remaining FMLA so that I can plan my FMLA

#### Developers
* As a developer I want clean easily readable code so that I can understand what's happening without depending on comments
* As a developer I want a well organized clear file tree so that I can easily navigate and connect all of the code
* As a developer I want to make a functional intuitive front end so that I don't look like a joke
* As a developer I want a well structured database so that I can easily retrieve and update the data within it.

#### Admin
As a admin I want be able to calculate accrued leave so that I can ensure they are properly paid
As a admin I want an easy to use interface so that the product actually gets used
As a admin I want to have multiple views so that I can see single employees or whole organizations data
As a admin I want to be able to see an employees data so that I can ensure complaince

#### Management
* As a manager I want to see data rendered in an easy to understand view so that I can track patterns in that data.
* As a manager I want a product that reduces operational burden so that we save time as an organization

#### Conflict Resolution Plan

* Remember first and foremost we are all on the same team and we should maintain that good will and shared vision.
* Try to get conflicting parties to self remediate, if that fails then bring in a third member of the group to mediate.
* If there is full on chaos we will delete the repo and then beg the instructor for mercy.

## Scope:
*MVP*
----------------
--Front end--
Customer page with week view
Login

--API--
translate
google sheets

--Database--
Spreadsheet imported
users exist
schema

--Server--
Send what the front end needs

*Stretch Goals*
---------------

--Front end--
Administrator view
drop spreadsheet in admin view either link or paste in
password works (md5 hash thangs)
adjustable view (week month year etc)

--APIS --
google calendar
mock data api

--Database--
actually validates log in

*Set up instructions*
---------------
* You need an excel style sheet following the format like the one linked in this repo
https://docs.google.com/spreadsheets/d/1xTi2w8NV6QqRjoZDyMrfwbSpBjjakBFJrIpPkCZ5UgI/edit#gid=0

* Which you will have to provide in the link on line 58 of server.js

* *The proper Database schema is located in data/schema.sql

* You will also need API keys for google (enabled for sheets as well as translate) in the .env as
GOOGLE_API_KEY
GOOGLE_SHEETS_API

* As well as link the database with the following env variable name
DATABASE_URL

* npm i will take care of the rest of the dependancies

* line 82 getSpreadSheet() will handle initial database population for the base_hours table but to avoid creating duplicate entries it should only be run once.

*Dev notes:*
---------------
Per instructor request I am drawing your attention to the difference between the SQL on line 155 as compares to lines 250/260,
lines 250/260 were written earlier in the project while we were less experienced with SQL and we would refactor the code to look more like line 155 (and save the lines of code that line does) if we had more time but we didn't think we would have time to debug that if we were to have implemented it as a general solution rather than where we did use line 155 as a solution to a specific bug.

*Frameworks*
---------------
* jquery
* fontawesome
* google fonts
* select2

*API endpoints*
---------------

* google translate
* ${text} = 'text you want to translate'
* ${target} = 'two letter abbreviation for language examples can be found 'fullLanguageList.json' (this was populated with api calls but doing this programatically was out of scope)

* POST::https://translation.googleapis.com/language/translate/v2?q=${text}&key=${process.env.GOOGLE_API_KEY}&source=en&target=${target}
```
sample response:

response.body
{
    "data": {
        "translations": [
            {
                "translatedText": "Domingo Lunes Martes Miércoles Jueves Viernes Sábado"
            }
        ]
    }
}
```
* working badge numbers in current live demo site:
```
88191
21931
94331
87385
24635
27093
42830
94548
98889
85061
97400
22503
14654
79797
64464
72853
78236
61112
17125
57176
81484
93824
47001
11016
53234
30400
57403
84171
10773
79548
27457
58180
72022
39875
4074
47802
71334
71509
15199
29401
95335
49815
4917
87438
26546
44295
75097
1222
24774
54783
59412
55640
27261
31973
60120
19418
49752
38987
26840
4945
80789
45465
63603
24764
9695
90751
77342
97733
956
11103
98581
```

branch_name: refs/heads/dev-branch

gha_language: CSS


text:
---
layout: page
title: Lab Members
description: the folks in microbma lab
background: '/img/bg-members.jpg'
form: true
---

## *Dr. Xiangfeng Tan*

<img src="members/txf.jpg" height="400"  align="center">

Xiangfeng Tan was conffered with a PhD degree in Forest Biology and Management from the University of Alberta. Since he joined Dr. Ma's lab as a postdoc researcher in 2019, Xiangfeng has been working on the projects of plant-microbe interactions using rice and other plant materials. Through exploiting multi-omics approach, Xiangfeng would like to uncover the host factors in driving microbiome assembly from diverse perspectives. Other research interests include co-evolution of hosts and microorganisms, microbial functional traits, and rhizospheric substrate flow.


text:
---
layout: post
title: "Chapter 10 : XML retrieval"
description: ""
category: NLP
tags: [notes on Introduction to information retrieval]
---
{% include JB/setup %}

* **structured retrieval:** Many structured data sources containing text are best modeled as structured documents rather than relational data.
* **structured retrieval** and **semistructured retrieval** both refer to XML retrieval.

# 10.1 Basic XML concepts
# 10.2 Challenges in XML retrieval
1.Users want us to return parts of documents (i.e., XML elements), not entire documents.
  * **Structured document retrieval principle:**A system should always retrieve the most specific part of a document answering the query.
2.Which parts of a document to index.
  * **extended queries:**Interpreting all parent-child relationships in queries as descendant relationships with any number of intervening nodes allowed.

# 10.3 A vector space model for XML retrieval
* **lexicalized subtrees：**subtrees that contain at least one vocabulary term.
* The main difference is that the dimensions of vector space in unstructured retrieval are vocabulary terms whereas they are lexicalized subtrees in XML retrieval.
`skipped for now` for some algorithms

# 10.4 Evaluation of XML retrieval
* **INEX (INitiative for the Evaluation of XML retrieval) program:** a collaborative effort that has produced reference collections, sets of queries, and relevance judgments.
* INEX 2002 defined component coverage and topical relevance as orthogonal dimensions of relevance.
  1.The component coverage dimension evaluates whether the element retrieved is “structurally” correct, i.e., neither too low nor too high in the tree.
  2.The topical relevance dimension also has four levels: highly relevant (3), fairly relevant (2), marginally relevant (1) and nonrelevant (0).

# 10.5 Text-centric vs. data-centric XML retrieval
* **Text-centric：** We match the text of the query with the text of the XML documents.
* **Data-centric:** Data-centric XML mainly encodes numerical and non-text attribute-value data.
* There are powerful query languages for XML that can handle numerical attributes, joins and ordering constraints. The best known of these is XQuery.


text:
# Layout

This guideline part has the core layout principles and values

Installation

    yarn add @happeouikit/layout

or

    npm install --save @happeouikit/layout

repository: happeo/happeouikit

gha_language: JavaScript

repo_name: happeo/happeouikit


text:
go-lib
======

golang library

bitmap
------
NUMA CPU bitmap, used to affinity progress to some CPU.
CPU must be hypethreaded, and CPU number look like as follows:
[node0, node1, ... , node0, node1, ...]
For example:
node0: [0,1,2,3,4,5,12,13,14,15,16,17]
node1: [6,7,8,9,10,11,18,19,20,21,22,23]

sriov
------
sriov functions.

* SetupVF

Move VF device to container net namespace.

```
func SetupVF(conf *NetConf) error
```

* ReleaseVF

Move VF device from container net namespace to host namespace.

```
func ReleaseVF(conf *NetConf) error
```

Here is an [example](/cmd/sriov/main.go).

Reference to [CNI SR-IOV plugin](https://github.com/containernetworking/cni/pull/259).


text:
# Thinc: A refreshing functional take on deep learning, compatible with your favorite libraries

### From the makers of [spaCy](https://spacy.io) and [Prodigy](https://prodi.gy)

[Thinc](https://thinc.ai) is a **lightweight deep learning library** that offers
an elegant, type-checked, functional-programming API for **composing models**,
with support for layers defined in other frameworks such as **PyTorch,
TensorFlow and MXNet**. You can use Thinc as an interface layer, a standalone
toolkit or a flexible way to develop new models. Previous versions of Thinc have
been running quietly in production in thousands of companies, via both
[spaCy](https://spacy.io) and [Prodigy](https://prodi.gy). We wrote the new
version to let users **compose, configure and deploy custom models** built with
their favorite framework.

[![tests](https://github.com/explosion/thinc/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/thinc/actions/workflows/tests.yml)
[![Current Release Version](https://img.shields.io/github/v/release/explosion/thinc.svg?include_prereleases&sort=semver&style=flat-square&logo=github)](https://github.com/explosion/thinc/releases)
[![PyPi Version](https://img.shields.io/pypi/v/thinc.svg?include_prereleases&sort=semver&style=flat-square&logo=pypi&logoColor=white)](https://pypi.python.org/pypi/thinc)
[![conda Version](https://img.shields.io/conda/vn/conda-forge/thinc.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/thinc)
[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)
[![Open demo in Colab][colab]][intro_to_thinc_colab]

## 🔥 Features

- **Type-check** your model definitions with custom types and
  [`mypy`](https://mypy.readthedocs.io/en/latest/) plugin.
- Wrap **PyTorch**, **TensorFlow** and **MXNet** models for use in your network.
- Concise **functional-programming** approach to model definition, using
  composition rather than inheritance.
- Optional custom infix notation via **operator overloading**.
- Integrated **config system** to describe trees of objects and hyperparameters.
- Choice of **extensible backends**.
- **[Read more →](https://thinc.ai/docs)**

## 🚀 Quickstart

Thinc is compatible with **Python 3.6+** and runs on **Linux**, **macOS** and
**Windows**. The latest releases with binary wheels are available from
[pip](https://pypi.python.org/pypi/thinc). Before you install Thinc and its
dependencies, make sure that your `pip`, `setuptools` and `wheel` are up to
date. For the most recent releases, pip 19.3 or newer is recommended.

```bash
pip install -U pip setuptools wheel
pip install thinc
```

See the [extended installation docs](https://thinc.ai/docs/install#extended) for
details on optional dependencies for different backends and GPU. You might also
want to
[set up static type checking](https://thinc.ai/docs/install#type-checking) to
take advantage of Thinc's type system.

> ⚠ If you have installed PyTorch and you are using Python 3.7+, uninstall the
> package `dataclasses` with `pip uninstall dataclasses`, since it may have been
> installed by PyTorch and is incompatible with Python 3.7+.

### 📓 Selected examples and notebooks

Also see the [`/examples`](examples) directory and
[usage documentation](https://thinc.ai/docs) for more examples. Most examples
are Jupyter notebooks – to launch them on
[Google Colab](https://colab.research.google.com) (with GPU support!) click on
the button next to the notebook name.

| Notebook                                                                                | Description                                                                                |
| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`intro_to_thinc`][intro_to_thinc]
[![Open in Colab][colab]][intro_to_thinc_colab]                               | Everything you need to know to get started. Composing and training a model on the MNIST data, using config files, registering custom functions and wrapping PyTorch, TensorFlow and MXNet models. |
| [`transformers_tagger_bert`][transformers_tagger_bert]
[![Open in Colab][colab]][transformers_tagger_bert_colab] | How to use Thinc, `transformers` and PyTorch to train a part-of-speech tagger. From model definition and config to the training loop.                                                             |
| [`pos_tagger_basic_cnn`][pos_tagger_basic_cnn]
[![Open in Colab][colab]][pos_tagger_basic_cnn_colab]             | Implementing and training a basic CNN for part-of-speech tagging model without external dependencies and using different levels of Thinc's config system.                                         |
| [`parallel_training_ray`][parallel_training_ray]
[![Open in Colab][colab]][parallel_training_ray_colab]          | How to set up synchronous and asynchronous parameter server training with Thinc and [Ray](https://ray.readthedocs.io/en/latest/).                                                                 |

**[View more →](examples)**

[colab]:
  https://gistcdn.githack.com/ines/dcf354aa71a7665ae19871d7fd14a4e0/raw/461fc1f61a7bc5860f943cd4b6bcfabb8c8906e7/colab-badge.svg
[intro_to_thinc]: examples/00_intro_to_thinc.ipynb
[intro_to_thinc_colab]:
  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/00_intro_to_thinc.ipynb
[transformers_tagger_bert]: examples/02_transformers_tagger_bert.ipynb
[transformers_tagger_bert_colab]:
  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/02_transformers_tagger_bert.ipynb
[pos_tagger_basic_cnn]: examples/03_pos_tagger_basic_cnn.ipynb
[pos_tagger_basic_cnn_colab]:
  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/03_pos_tagger_basic_cnn.ipynb
[parallel_training_ray]: examples/04_parallel_training_ray.ipynb
[parallel_training_ray_colab]:
  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/04_parallel_training_ray.ipynb

### 📖 Documentation & usage guides

| Documentation                                                                     | Description                                           |
| --------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [Introduction](https://thinc.ai/docs)                                             | Everything you need to know.                          |
| [Concept & Design](https://thinc.ai/docs/concept)                                 | Thinc's conceptual model and how it works.            |
| [Defining and using models](https://thinc.ai/docs/usage-models)                   | How to compose models and update state.               |
| [Configuration system](https://thinc.ai/docs/usage-config)                        | Thinc's config system and function registry.          |
| [Integrating PyTorch, TensorFlow & MXNet](https://thinc.ai/docs/usage-frameworks) | Interoperability with machine learning frameworks     |
| [Layers API](https://thinc.ai/docs/api-layers)                                    | Weights layers, transforms, combinators and wrappers. |
| [Type Checking](https://thinc.ai/docs/usage-type-checking)                        | Type-check your model definitions and more.           |

## 🗺 What's where

| Module                                    | Description                                                                       |
| ----------------------------------------- | --------------------------------------------------------------------------------- |
| [`thinc.api`](thinc/api.py)               | **User-facing API.** All classes and functions should be imported from here.      |
| [`thinc.types`](thinc/types.py)           | Custom [types and dataclasses](https://thinc.ai/docs/api-types).                  |
| [`thinc.model`](thinc/model.py)           | The `Model` class. All Thinc models are an instance (not a subclass) of `Model`.  |
| [`thinc.layers`](thinc/layers)            | The layers. Each layer is implemented in its own module.                          |
| [`thinc.shims`](thinc/shims)              | Interface for external models implemented in PyTorch, TensorFlow etc.             |
| [`thinc.loss`](thinc/loss.py)             | Functions to calculate losses.                                                    |
| [`thinc.optimizers`](thinc/optimizers.py) | Functions to create optimizers. Currently supports "vanilla" SGD, Adam and RAdam. |
| [`thinc.schedules`](thinc/schedules.py)   | Generators for different rates, schedules, decays or series.                      |
| [`thinc.backends`](thinc/backends)        | Backends for `numpy` and `cupy`.                                                  |
| [`thinc.config`](thinc/config.py)         | Config parsing and validation and function registry system.                       |
| [`thinc.util`](thinc/util.py)             | Utilities and helper functions.                                                   |

## 🐍 Development notes

Thinc uses [`black`](https://github.com/psf/black) for auto-formatting,
[`flake8`](http://flake8.pycqa.org/en/latest/) for linting and
[`mypy`](https://mypy.readthedocs.io/en/latest/) for type checking. All code is
written compatible with **Python 3.6+**, with type hints wherever possible. See
the [type reference](https://thinc.ai/docs/api-types) for more details on
Thinc's custom types.

### 👷♀ Building Thinc from source

Building Thinc from source requires the full dependencies listed in
[`requirements.txt`](requirements.txt) to be installed. You'll also need a
compiler to build the C extensions.

```bash
git clone https://github.com/explosion/thinc
cd thinc
python -m venv .env
source .env/bin/activate
pip install -U pip setuptools wheel
pip install -r requirements.txt
pip install --no-build-isolation .
```

Alternatively, install in editable mode:

```bash
pip install -r requirements.txt
pip install --no-build-isolation --editable .
```

Or by setting `PYTHONPATH`:

```bash
export PYTHONPATH=`pwd`
pip install -r requirements.txt
python setup.py build_ext --inplace
```

### 🚦 Running tests

Thinc comes with an [extensive test suite](thinc/tests). The following should
all pass and not report any warnings or errors:

```bash
python -m pytest thinc    # test suite
python -m mypy thinc      # type checks
python -m flake8 thinc    # linting
```

To view test coverage, you can run `python -m pytest thinc --cov=thinc`. We aim
for a 100% test coverage. This doesn't mean that we meticulously write tests for
every single line – we ignore blocks that are not relevant or difficult to test
and make sure that the tests execute all code paths.

repository: explosion/thinc

gha_language: Python

repo_name: explosion/thinc


text:
# EzGallery
EzGallery is a simple and easy to install image gallery powered by PHP.
(Heads-up: you should probably not use this, this was just built for training purposes)

## Features
* A simple one file setup
* Individual URLs for each image
* A custom cover for your gallery
* Mobile friendly UI

## Setup
Add the **index.php** file to any wanted directory and then create a subdirectory named **images**, every image file (gif, jpg and png) in there will simply appear in the gallery.

If you wish to use a costum cover for your gallery to which you can add your own description, title or images then create a file named **ezgallery-cover.php** in the same directory as the **index.php** file. You are free to add whatever you want to your cover using ordinary html (and css) code.

repository: adelhult/ezgallery

repo_name: adelhult/ezgallery


text:
# asm_analyzer

## introduction

 An online x86_64 assembly language editor & analyzer.

 Try our [Online demo](http://<IP_ADDRESS>/)!

## how to use

After clone the code (on Ubuntu):

~~~bash
sudo apt install nodejs # install nodejs
g++ main.cpp        # compile the analyzer as a.out
npm install         # node_modules/
sudo node app.js    # start the web server at 80 port
~~~

open http://localhost:80 in your browser and enjoy

branch_name: refs/heads/main


text:
# ZlibBase64Urlsafe

Easily compress/decompress data for use in a query parameter.

This takes Base64 / Url Escaping a step further by compressing the payload before encoding the data.

These compression savings can make a big difference when sending larger pieces of data in a query parameter.

This gem has no dependencies outside of the ruby stdlib. Internally is uses inflate and deflate the same compression algorithm found in gzip.

## Installation

Add this line to your application's Gemfile:

```ruby
gem "zlib_base64_urlsafe"
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install zlib_base64_urlsafe

## Usage

```ruby
require "zlib_base64_urlsafe"

ZlibBase64Urlsafe.encode("Hello, World!") # => "eNrzSM3JyddRCM8vyklRBAAfngRq"
ZlibBase64Urlsafe.decode("eNrzSM3JyddRCM8vyklRBAAfngRq") # => "Hello, World!"

```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

1. Fork it ( https://github.com/arronmabrey/zlib_base64_urlsafe/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am "Add some feature"`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


text:
---
title: Authorization
name: How to secure your Spring Security API with Auth0
budicon: 500
---

<%= include('../../../_includes/_package', {
  org: 'auth0-samples',
  repo: 'auth0-spring-security-api-sample',
  path: '01-Authorization',
  requirements: [
    'Java 7 or above',
    'Maven 3.0.x or above'
  ]
}) %>

This tutorial demonstrates how to protect your Spring Security API endpoints and how to limit access based on permissions. The permissions are handled with **scopes** which are set up in your Auth0 dashboard and which can be included in the `access_token` sent by a client (user).

## Configure JSON Web Token Signature Algorithm

Start by configuring your API to use the RS256 signing algorithm. If you downloaded the seed project above, `RS256` is configured by default.

```java
// src/main/java/com/auth0/example/AppConfig.java

@EnableWebSecurity
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        JwtWebSecurityConfigurer
                .forRS256(apiAudience, issuer)
                .configure(http);
    }
}
```

## Configure the Protected Endpoints

This example assumes one entity called **Photos** and implements CRUD methods for it, along with a **login** route. The former will require authentication and specific scopes, while the latter won't. In the `AppConfig` class, edit the snippet to add the route matchers. The `hasAuthority()` method provides a way to specify the required scope for the resource.

```java
// src/main/java/com/auth0/example/AppConfig.java

@EnableWebSecurity
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        JwtWebSecurityConfigurer
                .forRS256(apiAudience, issuer)
                .configure(http)
                .authorizeRequests()
                .antMatchers(HttpMethod.GET, "/login").permitAll()
                .antMatchers(HttpMethod.GET, "/photos/**").hasAuthority("read:photos")
                .antMatchers(HttpMethod.POST, "/photos/**").hasAuthority("create:photos")
                .antMatchers(HttpMethod.PUT, "/photos/**").hasAuthority("update:photos")
                .antMatchers(HttpMethod.DELETE, "/photos/**").hasAuthority("delete:photos")
                .anyRequest().authenticated();
    }
}
```

These routes will behave as such:

- `GET /login` will be available for non-authenticated requests.
- `GET /photos` will be available for authenticated requests which include an `access_token` with the `read:photos` scope granted.
- `POST /photos` will be available for authenticated requests which include an `access_token` with the `create:photos` scope granted.
- `PUT /photos` will be available for authenticated requests which include an `access_token` with the `update:photos` scope granted.
- `DELETE /photos` will be available for authenticated requests which include an `access_token` with the `delete:photos` scope granted.
- Any other route that doesn't match the above will require the user to be authenticated with no additional scopes.

## Create the Photos Controller

Create a new class called `PhotosController` to handle each request to the endpoints.

Next, edit the `AppConfig.java` file to configure which endpoints are secure and which are not.

## Using the API

To test your endpoints, start the API and send the relevant HTTP requests.

```java
// src/main/java/com/auth0/example/PhotosController.java

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@Component
public class PhotosController {

    @RequestMapping(value = "/login")
    @ResponseBody
    public String login() {
        return "All good. You DO NOT need to be authenticated to call /login";
    }

    @RequestMapping(value = "/photos", method = RequestMethod.GET)
    @ResponseBody
    public String getPhotos() {
        return "All good. You can see this because you are Authenticated with a Token granted the 'read:photos' scope";
    }

    @RequestMapping(value = "/photos", method = RequestMethod.POST)
    @ResponseBody
    public String createPhotos() {
        return "All good. You can see this because you are Authenticated with a Token granted the 'create:photos' scope";
    }

    @RequestMapping(value = "/photos", method = RequestMethod.PUT)
    @ResponseBody
    public String updatePhotos() {
        return "All good. You can see this because you are Authenticated with a Token granted the 'update:photos' scope";
    }

    @RequestMapping(value = "/photos", method = RequestMethod.DELETE)
    @ResponseBody
    public String deletePhotos() {
        return "All good. You can see this because you are Authenticated with a Token granted the 'delete:photos' scope";
    }

    @RequestMapping(value = "/**")
    @ResponseBody
    public String anyRequest() {
        return "All good. You can see this because you are Authenticated.";
    }

}
```

To build and run the seed project, use the command: `mvn spring-boot:run`.

To test the non-secure endpoint, send a `GET` request at `http://localhost:3001/login`.

```bash
curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" "http://localhost:3001/login"
```

You should get the message: `All good. You DO NOT need to be authenticated to call /login`.

To test the secure endpoints send a request at `http://localhost:3001/photos`. In this case, you will also have to add a valid `access_token` as an `Authorization` header to your request.

```bash
curl -X GET -H "Authorization: Bearer {YOUR_ACCESS_TOKEN}" -H "Cache-Control: no-cache" "http://localhost:3001/photos"
```

You should get the message: `All good. You can see this because you are Authenticated with a Token granted the 'read:photos' scope`. You can try with other HTTP methods and verify that the scopes are validated as well.

If the token is not specified you will get the following JSON as a response.

```text
{
  "timestamp":<PHONE_NUMBER>708,
  "status": 401,
  "error": "Unauthorized",
  "message": "Unauthorized",
  "path": "/photos"
}
```

A quick and easy way to obtain an `access_token` is to call the `/oauth/token` endpoint of the Auth0 [Authentication API](/api/authentication/reference#resource-owner-password) using Curl:

```text
curl --request POST \
  --url 'https://${account.namespace}/oauth/token' \
  --header 'content-type: application/json' \
  --data '{"grant_type":"password", "username":"USERNAME_OR_EMAIL", "password":"PASSWORD", "audience":"API_IDENTIFIER", "scope":"read:photos update:photos create:photos", "client_id": "${account.clientId}", "client_secret": "${account.clientSecret}"
 }'
```

The domain along with the `client_id` and `client_secret` values should match your Auth0 client. Check the values in the [dashboard](${manage_url}/#/clients). Use the `username` and `password` of the user you want to authenticate with. Request the API `audience` by using the API ddentifier defined at the beginning of the article and customize the `scope` to your needs. In the snippet above, the `delete:photos` scope is not requested, so calling `DELETE /photos` with the received `access_token` will fail.

Now you can use the `access_token` and pass it along in the `Authorization` header as a `Bearer` token.


text:
# Contributing

Thanks for your contribution!

* Make sure to clone the project with `git clone --recursive` so that
  the submodules are initialized correctly.
* To enable both tests and benchmarks, configure ryml with `-DRYML_DEV=ON`
  when calling cmake. To enable only tests, use `-DRYML_BUILD_TESTS=ON`; to
  enable only benchmarks use `-DRYML_BUILD_BENCHMARKS=ON`. All these flags
  are disabled by default.
* Submitted pull requests should target the `dev` branch. (The `master`
  branch is the stable branch, and merges from `dev` to `master` are done
  only if the tests succeed.)
* Code style for pull requests should respect the existing code style:
    ```c++
    if(foo)  // no space before parens
    {   // curly brackets on next line
        // no tabs; indent with 4 spaces
        bar();
    }
    ```

repository: google/jsonnet

gha_language: Jsonnet

repo_name: google/jsonnet


text:
# Graph

[Graph](https://www.wikiwand.com/en/Graph_(abstract_data_type))

>*A graph data structure consists of a finite (and possibly mutable) set of vertices (also called nodes or points), together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. These pairs are known as edges (also called links or lines), and for a directed graph are also known as arrows.*

[here](https://www.geeksforgeeks.org/data-structures/linked-list/).

## Key Takeaways:

- Graphs can be undirected / directed, and unweighted / weighted

#### Representations:

- Data structure relations:

Adjacency list[2]
    Vertices are stored as records or objects, and every vertex stores a list of adjacent vertices. This data structure allows the storage of additional data on the vertices. Additional data can be stored if edges are also stored as objects, in which case each vertex stores its incident edges and each edge stores its incident vertices.
Adjacency matrix[3]
    A two-dimensional matrix, in which the rows represent source vertices and columns represent destination vertices. Data on edges and vertices must be stored externally. Only the cost for one edge can be stored between each pair of vertices.

- Adjacency lists are generally preferred because they efficiently represent sparse graphs. An adjacency matrix is preferred if the graph is dense, that is the number of edges |E | is close to the number of vertices squared, |V |2, or if one must be able to quickly look up if there is an edge connecting two vertices.

#### Disadvantages:

-

## Language Learning:

#### C:

###### Usage:

###### Graph:

###### General:

#### Python:

- This implementation uses an adjacency list

###### Usage:

`python graph.py`

###### Graph:

-

###### General:

- Tuples are hashable to add into a set, but the order of items in the tuple matter.. the following code snippet **does not** filter out duplicate edge pairs as I first expected:

    ```python
	def getEdges(self):
        edgeset = set()
        for vert,edges in self.graph.items():
            for edge in edges:
                edgeset.add((vert, edge))

        return edgeset
	```

	returns duplicate edges:

	`{('b', 'd'), ('c', 'a'), ('b', 'a'), ('a', 'b'), ('e', 'd'), ('a', 'c'), ('c', 'd'), ('d', 'e')}`

- So, how do we create a set of vertice pairs containing unique pairs?  Well, since the vertice pairs must be unique, let's store them as sets, then form a set of these sets.

	However, sets are mutable in Python, and therefore not hashable, so [we can't nest normal sets](https://stackoverflow.com/questions/5931291/how-can-i-create-a-set-of-sets-in-python)... to work around this, declare the inner set as a [frozenset](https://docs.python.org/2/library/stdtypes.html#frozenset) which promises Python that we won't modify it and thus it becomes hashable!

	```python
	def getEdges(self):
        edgeset = set()
        for vert,edges in self.graph.items():
            for edge in edges:
                edgeset.add(frozenset({vert, edge}))

		# massage set of frozen sets into more palatable data
        return [tuple(e) for e in edgeset]
	```

	returns unique edges:

	`[('c', 'a'), ('b', 'a'), ('c', 'd'), ('b', 'd'), ('d', 'e')]`


text:
# Contributing

The project follows the [Open Knowledge International coding standards](https://github.com/okfn/coding-standards).

## Getting Started

Prerequisites:
- docker
- docker-compose

Recommended way to get started is to create and activate a project virtual environment.
To install package and development dependencies into active environment:

```
$ make develop
```

## Building

To build a docker image:

```
$ make build
```

## Linting

To run lint:

```
$ make lint
```

## Testing

To run tests:

```
$ make test
```

## Deploying

Automatically on CI/CD server.

Required environment variables:
- $OPENTRIALS_DOCKER_EMAIL
- $OPENTRIALS_DOCKER_USER
- $OPENTRIALS_DOCKER_PASS
- $OPENTRIALS_DATABASE_URL

## Managing

To update, run and stop scrapers use Docker Cloud web UI.

repository: dnet-team/processors

repo_name: dnet-team/processors


text:
# Overview

With the ChartMogul API, you can build a variety of applications and
integrations to help you better understand and manage your customer data. Here
are some examples of what you can build:

- A dashboard to visualize your customer data
- An integration with your billing system to automatically import customer data
- A tool to help you segment your customers based on their data
- A customer churn prediction tool
- A customer lifetime value calculation tool


text:
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]

HyperNote

    A productivity application and a personal wiki!

    HyperNotert Bug
    ·
    Request Feature

## Table of Contents

- [Table of Contents](#table-of-contents)
- [About The Project](#about-the-project)
  - [Built With](#built-with)
- [Getting Started](#getting-started)
  - [Prerequisites](#prerequisites)
  - [Installation](#installation)
- [Usage](#usage)
- [Roadmap](#roadmap)
- [Contributing](#contributing)
- [License](#license)
- [Contributors](#contributors)

## About The Project

The main aim behind this project was to build a general productivity
applicaiton and a personal wiki which can also be used as a general purpose note
taking application or a diary. We still have plans to implement several other
features as addons to the current applications, so stay tuned!

### Built With

 - [Electron](https://www.electronjs.org)
 - [React](https://www.reactjs.org)

## Getting Started

To get a local copy up and running follow these simple steps. The current
build setup is run and tested on windows 10. So other platforms are not yet
fully supported.

### Prerequisites

[npm](https://www.npmjs.com) is reqired to be installed on
your PC to build the project from source

### Installation

1. Clone the repo
```sh
git clone https://github.com/RikilG/HyperNote.git
cd HyperNote
```
2. Install NPM packages
```sh
npm install
```
3. Run the application
```sh
npm start
```

## Usage

The current application by default uses a working directory in your %APPDATA%
folder. this can be changed in settings.
As of now, the application supports:
- listing files
- creating files/folders
- rendering markdown (with realtime preview)
- editing files (not saving yet :)
- multiple splits for editing (horizontal only for now)
- pomodoro timers

## Roadmap

- [x] Give option to toggle b/w renderer and editor (or) split renderer
- [x] Provide a default page with info when no files are open (similar to vscode blank tab when no files are open)
- [ ] Add file save functionality
- [x] Add pomodoro framework
- [ ] Add trello framework
- [ ] Add calendar
- [ ] Integrate with desktop notifications

## Contributing

Have a feature you would like to add? know a solution to
the issue you are having? Follow the steps to contribute
to this project!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b AmazingFeature`)
3.  Push to the Branch         (`git push origin AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Contributors

 - Rikil Gajarla ([github](https://www.github.com/RikilG))
 - Srihari L ([github](https://www.github.com/SrihariLax))

[contributors-shield]: https://img.shields.io/github/contributors/RikilG/HyperNote.svg?style=flat-square
[contributors-url]: https://github.com/RikilG/HyperNote/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/RikilG/HyperNote.svg?style=flat-square
[forks-url]: https://github.com/RikilG/HyperNote/network/members
[stars-shield]: https://img.shields.io/github/stars/RikilG/HyperNote.svg?style=flat-square
[stars-url]: https://github.com/RikilG/HyperNote/stargazers
[issues-shield]: https://img.shields.io/github/issues/RikilG/HyperNote.svg?style=flat-square
[issues-url]: https://github.com/RikilG/HyperNote/issues
[license-shield]: https://img.shields.io/github/license/RikilG/HyperNote.svg?style=flat-square
[license-url]: https://github.com/RikilG/HyperNote/blob/master/LICENSE
[product-screenshot]: images/screenshot.png

repository: RikilG/HyperNote

repo_name: RikilG/HyperNote


text:
# Checkout code and build it
## Checkout source code

```
git clone git@github.com:ConsenSys/orion.git
```

## Build from source
After you have checked out the code, this will build the distribution binaries.
```
cd orion
./gradlew build
```

## Run tests
These tasks are run as part of the default Gradle build, but you may want to run them separately.
```
./gradlew test
./gradlew acceptanceTest
```

repository: vinistevam/orion

gha_language: Java

repo_name: vinistevam/orion


text:
# The Market for Data Privacy: Data and Code

### by Tarun Ramadorai, Antoine Uettwiller and Ansgar Walther (Imperial College London), in collaboration with Michelle Lee (University of Oxford)

This repo contains the data and code used for [our research paper](https://www.ssrn.com/abstract=3352175).

We welcome any suggestions on how to improve our approach! You can contact us at<EMAIL_ADDRESS>
## Data
1. `data/attributes.csv` contains the privacy attributes of all Compustat US firms: Whether we found a privacy policy (*found*), whether this policy is visible (*visible*), its length (*paragraphs, words*), its Fog readability (*fog*), the overall legal clarity index (*overall*), and the number of third-party tracking cookies on its website (*tptrackingcookies*). This dataset has identifiers `gvkey` that can be used to merge it with Compustat data, as well as `weburl` identifiers for the website of each firm.
2. `data/policies.json` contains the full text of all privacy policies we found in this sample. Each policy is saved as a list of paragraphs. This dataset has `weburl` identifiers.
3. `data/expert.csv` contains the evaluations of a legal expert for a smaller sample of policies. This data has
Details of expert's criteria are in the paper.
These evaluations form the basis of our legal clarity index. This dataset has `weburl` identifiers.

See the paper for detailed definitions of our sample and variables.

## Python Code
The easiest way to use our code is to run the Jupyter notebook `demo.ipynb` and adapt it to your needs.

The code runs in Python 3 after cloning the repository and running `pip install -r requirements.txt`.

For easy compatibility, we have also created a Docker image (instructions below).

Our code consists of the following modules:
1. `src/urls.py` contains tools that find candidate URLs for privacy policies on a given website.
2. `src/text.py` contains tools that download privacy policies (given candidate URLs) and clean them for natural language processing.
3. `src/attributes.py` contains tools that calculate the attributes of privacy policies (visibility, length, readability, legal clarity) as used in the paper.

These modules all call on `src/utils.py` which contains various auxiliary functions.

**Note** Our paper and the published data also contain measures of third-party tracking activity.
We obtained these data manually by uploading lists of websites to www.privacyscore.org,
which in turn uses the OpenWPM software developed by Englehardt and Narayanan (see https://github.com/mozilla/OpenWPM).

We are working on a simple, end-to-end module that automates this process. Please contact us if you are interested.

## Simplest Example
Here are 5 lines of code that find the policy for American Airlines:

```
from src.urls import crawlPrivacy, filterPrivacy
from src.text import findPolicy
status, urls = crawlPrivacy('www.aa.com',clicks=2) # crawls candidate URLs
ranked = filterPrivacy(sum(urls,[])) # filter and rank by likelihood of being privacy policy
status, policy, url = findPolicy(ranked) # scrape highest ranked page that contains 'privacy'
```

Using this information, we can produce a word cloud for AA's privacy policy:
```
from wordcloud import WordCloud
import matplotlib.pyplot as plt
wc = WordCloud()
wc.generate(' '.join(policy))
plt.imshow(wc); plt.axis('off')
```

![wordcloud](aa_wc.png)

## Docker instructions

To use this, [install Docker](https://docs.docker.com)
and run

```docker pull ansgarw/privacydocker```

Then, to open our Juypter notebook in this Docker image, run

```docker run -p 8888:8888 -v "DIR"/privacy:/home/jovyan privacydocker:latest```

where you need to replace "DIR" with the local path into which you've cloned the repository.

## Citation

If you use these resources in your own work, please cite us (bibtex below).

```
@article{ramadorai2019market,
  title={The Market for Data Privacy},
  author={Ramadorai, Tarun and Walther, Ansgar and Uettwiller, Antoine},
  year={2019},
  publisher={CEPR Discussion Paper No. DP13588}
}
```

repository: ansgarw/privacy

repo_name: ansgarw/privacy


text:
---
description: >-
  Write code that runs every time a given object is created, updated, or
  deleted.
---

# Object Callbacks

Callbacks in Wheels allow you to have code executed before and/or after certain operations on an object. This requires some further explanation, so let's go straight to an example of a real-world application: the e-commerce checkout.

### A Real-World Example of Using Callbacks

Let's look at a possible scenario for what happens when a visitor to your imaginary e-commerce website submits their credit card details to finalize an order:

* You create a new `order` object using the [new()](https://api.cfwheels.org/model.new.html) method based on the incoming form parameters.
* You call the [save()](https://api.cfwheels.org/model.save.html) method on the order object, which will cause Wheels to first validate the object and then store it in the database if it passes validation.
* The next day, you call the [update(](https://api.cfwheels.org/model.update.html) method on the object because the user decided to change the shipping method for the order.
* Another day passes, and you call the [delete()](https://api.cfwheels.org/model.delete.html) method on the object because the visitor called in to cancel the order.

Let's say you want to have the following things executed somewhere in the code:

* Stripping out dashes from the credit card number to make it as easy as possible for the user to make a purchase.
* Calculating shipping cost based on the country the package will be sent to.

It's tempting to put this code right in the controller, isn't it? But if you think ahead a little, you'll realize that you might build an administrative interface for orders and maybe an express checkout as well at some point in the future. You don't want to duplicate all your logic in all these places, do you?

Object callbacks to the rescue! By using object callbacks to implement this sort of logic in your model, you keep it out of your controllers and ensure your code stays DRY (Don't Repeat Yourself).

Part of the `Order.cfc` model file:

{% code title="Order.cfc" %}
```javascript
component extends="Model" {

    public function config() {
        beforeValidationOnCreate("fixCreditCard");
        afterValidation("calculateShippingCost");
    }

    public function fixCreditCard() {

        writeOutput("Code for stripping out dashes in credit card numbers goes here...");
    }

    public function calculateShippingCost() {

        writeOutput("Code for calculating shipping cost goes here...");
    }

}
```
{% endcode %}

The above code registers 2 methods to be run at specific points in the life cycle of all objects in your application.

### Use Proper Naming

When naming your callbacks you might be tempted to try and keep things (too) simple by doing something like `afterValidation("afterValidation")`.

Do **not** do this.

If you do, CFWheels will fail silently and you might be left wondering why nothing is happening. (What is happening is that you, if there is a corresponding method named `afterValidation`, unintentionally overrode an internal CFWheels method.)

It's best to name the methods so they describe what task they actually perform, such as `calculateShippingCost` or `fixCreditCard` as shown in the example above.

### Registering and Controlling Callbacks

The following 16 functions can be used to register callbacks.

* [afterNew()](https://api.cfwheels.org/model.afternew.html) or [afterFind()](https://api.cfwheels.org/model.afterfind.html)
* [afterInitialization()](https://api.cfwheels.org/model.afterinitialization.html)
* [beforeValidation()](https://api.cfwheels.org/model.beforevalidation.html)
* [beforeValidationOnCreate()](https://api.cfwheels.org/model.beforevalidationoncreate.html) or [beforeValidationOnUpdate()](https://api.cfwheels.org/model.beforevalidationonupdate.html)
* [afterValidation()](https://api.cfwheels.org/model.aftervalidation.html)
* [afterValidationOnCreate()](https://api.cfwheels.org/model.aftervalidationoncreate.html) or [afterValidationOnUpdate()](https://api.cfwheels.org/model.aftervalidationonupdate.html)
* [beforeSave()](https://api.cfwheels.org/model.beforesave.html)
* [beforeCreate()](https://api.cfwheels.org/model.beforecreate.html) or [beforeUpdate()](https://api.cfwheels.org/model.beforeupdate.html)
* [afterCreate()](https://api.cfwheels.org/model.aftercreate.html) or [afterUpdate()](https://api.cfwheels.org/model.afterupdate.html)
* [afterSave()](https://api.cfwheels.org/model.aftersave.html)
* [beforeDelete()](https://api.cfwheels.org/model.beforedelete.html)
* [afterDelete()](https://api.cfwheels.org/model.afterdelete.html)

### Callback Life Cycle

As you can see above, there are a few places (5, to be exact) where one callback or the other will be executed, but not both.

The very first possible callback that can take place in an object's life cycle is either [afterNew()](https://api.cfwheels.org/model.afternew.html) or [afterFind](https://api.cfwheels.org/model.afterfind.html). The [afterNew()](https://api.cfwheels.org/model.afternew.html) callback methods are triggered when you create the object yourself for the very first time, for example, when using the [new()](https://api.cfwheels.org/model.new.html) method. [afterFind()](https://api.cfwheels.org/v2.2/model.afterFind.html) is triggered when the object is created as a result of fetching a record from the database, for example, when using [findByKey()](https://api.cfwheels.org/v2.2/model.findByKey.html). (There is some special behavior for this callback type that we'll explain in detail later on in this chapter).

The remaining callbacks get executed depending on whether or not we're running a "create," "update," or "delete" operation.

### Breaking a Callback Chain

If you want to completely break the callback chain for an object, you can do so by returning `false` from your callback method. (Otherwise, always return `true` or nothing at all.) As an example of breaking the callback chain, let's say you have called the [save()](https://api.cfwheels.org/model.save.html) method on a new object and the method you've registered with the [beforeCreate()](https://api.cfwheels.org/model.beforecreate.html) callback returns `false`. As a result, because the method you've registered with the [beforeCreate()](https://api.cfwheels.org/model.beforecreate.html) callback will exit the callback chain early by returning `false`, no record will be inserted in the database.

### Order of Callbacks

Sometimes you need to run more than one method at a specific point in the object's life cycle. You can do this by passing in a list of method names like this:

```javascript
beforeSave("checkSomething,checkSomethingElse");
```

When an object is saved in your application, these two callbacks will be executed in the order that you registered them. The `checkSomething` method will be executed first, and unless it returns `false`, the `checkSomethingElse` method will be executed directly afterward.

### Special Case #1: findAll() and the afterFind() Callback

When you read about the [afterFind()](https://api.cfwheels.org/model.afterfind.html) callback above, you may have thought that it must surely only work for [findOne()](https://api.cfwheels.org/model.findone.html)/ [findByKey()](https://api.cfwheels.org/model.findbyjey.html) calls but not for [findAll()](https://api.cfwheels.org/model.afterfind.html) because those calls return query result sets by default, not objects.

Believe it or not, but callbacks are even triggered on [findAll()](https://api.cfwheels.org/model.afterfind.html)! You do need to write your callback code differently though because there will be no `this` scope in the query object. Instead of modifying properties in the `this` scope like you normally would, the properties are passed to the callback method via the `arguments` struct.

{% hint style="info" %}
#### Column Types

We recommend that you respect the query column types. If you have a date / time value in the query, don't try to change it to a string for example. Some engines will allow it while others (CF 2016 for example) won't.
{% endhint %}

Does that sound complicated? This example should clear it up a little. Let's show some code to display how you can handle setting a `fullName` property on a hypothetical `artist` model.

Because all [afterFind()](https://api.cfwheels.org/model.afterfind.html) callbacks run when fetching records from the database, it's a good idea to check to make sure that the columns used in the method's logic exist before performing any operations. You mostly encounter this issue when using the `select` argument on a finder to limit the number of columns returned. But no worries! You can use `StructKeyExists()` and perform a simple check to make sure that the columns exists in the `arguments` scope.

```javascript
component extends="Model" output="false" {

    public function config() {
        afterFind("setFullName");
    }

    public function setFullName() {
        arguments.fullName = "";
        if ( StructKeyExists(arguments, "firstName")
            && StructKeyExists(arguments, "lastName") ) {
            arguments.fullName = Trim(
                arguments.firstName & " " & arguments.lastName
            );
        }
        return arguments;
    }

}
```

In our example model, an artist's name can consist of both a first name and a last name ("John Mayer") or just the band / last name ("Abba."). The `setFullName()` method handles the logic to concatenate the names.

Always remember to return the `arguments` struct, otherwise Wheels won't be able to tell that you actually wanted to make any changes to the query.

Note that callbacks set on included models are not executed. Look at this example:

```javascript
fooBars = model("foo").findAll(include="bars");
```

That will cause callback to be executed on the `Foo` model but not the `Bar` model.

### Special Case # 2: Callbacks and the updateAll() and deleteAll() Methods

Please note that if you use the [updateAll()](https://api.cfwheels.org/model.updateall.html) or the [deleteAll()](https://api.cfwheels.org/model.deleteall.html) methods in Wheels, they will not instantiate objects by default, and thus any callbacks will be skipped. This is good for performance reasons because if you update 1,000 records at once, you probably don't want to run the callbacks on each object. Especially not if they involve database calls.

However, if you want to execute all callbacks in those methods as well, all you have to do is pass in `instantiate=true`to the [updateAll()](https://api.cfwheels.org/model.updateall.html)/ [deleteAll()](https://api.cfwheels.org/model.deleteall.html) methods.

repository: cfwheels/cfwheels

branch_name: refs/heads/develop

gha_language: ColdFusion

repo_name: cfwheels/cfwheels


text:
---
title: "Maintenance release: Godot 2.0.2"
excerpt: "Features various bug fixes and editor usability improvements, notably in the script editor. This time, the official binaries are also built without OpenSSL and not compressed with UPX."
categories: ["release"]
author: Rémi Verschelde
image: /storage/app/uploads/public/570/778/0a5/5707780a5a4e5946541256.png
date: 2016-04-08 00:00:00
---

**Edit (2016-04-11 20:44 CEST):** New binaries were uploaded for the 2.0.2 release to [include a late fix](https://github.com/godotengine/godot/commit/e8a0b2462b11528838ad5890f2146a84a9e70f93) for a bug causing a memory overflow on some platforms, notably iOS.

As mentioned in [an earlier announcement](article/updates-on-the-release-cycle-and-godot-2-0-1), while working on our future major version 2.1, we intend to provide maintenance releases every once in a while for the currently supported version (branch 2.0).

So one month after the release of Godot 2.0.1, [here's version 2.0.2](/download) with some non-critical bug fixes and some usability improvements. [Grab it now!](/download)

## Distribution changes

### OpenSSL temporarily disabled

Godot uses OpenSSL for HTTPS support in its networking API. For easier binary distribution, most official binaries were linked against an embedded copy of OpenSSL; however this one being somewhat old and thus vulnerable to various security issues, we chose to build the 2.0.2 binaries without OpenSSL support.

This is a temporary solution to work around the warnings you might be getting on Google Play or the Apple Store about security vulnerabilities in your binary. The better solution for future releases will be to update our embedded OpenSSL copy to the latest upstream release (cf. [issue 2780](https://github.com/godotengine/godot/issues/2780)).

If your game requires OpenSSL support, you can either:

- Keep using version 2.0.1 which was built with OpenSSL support
- Build binaries yourself with `openssl=builtin` (built-in version) or `openssl=yes` (system shared library)

### Uncompressed binaries

We used to compress official binaries with [UPX](http://upx.sourceforge.net), a nice tool that generates small binaries with little decompression overhead. However, this tool is unmaintained since 2013 and has only experimental support for 64-bit Windows, and no support for 64-bit OSX and some other platforms. It has also been known to cause various issues on Windows with antivirus software, and might be related to a couple other bugs.

So for this release, we decided to distribute uncompressed binaries and see how it goes. If you liked having small binaries to distribute, you can still use UPX yourself on your export templates or exported binaries; we will put together some documentation about which templates can be safely compressed, and how to do it (in the meantime you can refer to [UPX's website](http://upx.sourceforge.net) for instructions).

## Engine changes

The main highlights in this maintenance release are:

**Enhancements:**

- Add -r flag to adb install for keep app user data
- Add a `sleeping_state_changed` signal to RigidBody and RigidBody2D classes
- Add stop and delete buttons to sample library
- Added insert mode to text editor
- Added rotation/panning support for trackpads in 3D mode
- Bind Z key (without modifiers) to toggle wireframe in 3D view
- Expose `android/shutdown_adb_on_exit` parameter and default to true
- LineEdit/TextEdit: various improvements and fixes to copy, cut and paste behaviours
- Option to toggle line numbers
- Option to toggle tabulation drawing and configurable size
- Separate help pages from scripts by default
- Syntax highlighting for numbers, functions and member variables
- Syntax highlighting for selected words

**Bug fixes:**

- Fix crash when importing sub-scenes
- Fix crash when resizing ConcavePolygonShape2D segments
- Fix cursor getting locked on tree control if tree is cleared while modifying numerical element
- Fix editors panels, of the bottom panel, not resizing in some cases
- Fix errors when switching to a new scene with a spatial editor from a canvas editor
- Fix file dialog, of Particles2D plugin, showing "Error" icons
- Fix inconsistent file saving validation
- Fix `InputMap::action_erase_event()`
- OSX: Fix inverted horizontal scrolling
- **Hotfix (2016-04-11):** Use non-templated `nearest_power_of_2` (workaround for iOS out-of-memory crash)

See the [full changelog](http://downloads.tuxfamily.org/godotengine/2.0.2/Godot_v2.0.2_stable_changelog.txt) for more details, and head towards the [Download page](/download) to get it!

repository: godotengine/godot-website

repo_name: godotengine/godot-website


text:
---
title: "Sub Expression (Visual Basic) | Microsoft Docs"

ms.date: "2015-07-20"
ms.prod: .net
ms.reviewer: ""
ms.suite: ""
ms.technology:
  - "devlang-visual-basic"

ms.topic: "article"
helpviewer_keywords:
  - "lambda expressions [Visual Basic], sub expression"
  - "Sub Expression [Visual Basic]"
  - "subroutines [Visual Basic], sub expressions"
ms.assetid: 36b6bfd1-6539-4d8f-a5eb-6541a745ffde
caps.latest.revision: 6
author: dotnet-bot
ms.author: dotnetcontent

translation.priority.ht:
  - "cs-cz"
  - "de-de"
  - "es-es"
  - "fr-fr"
  - "it-it"
  - "ja-jp"
  - "ko-kr"
  - "pl-pl"
  - "pt-br"
  - "ru-ru"
  - "tr-tr"
  - "zh-cn"
  - "zh-tw"
---
# Sub Expression (Visual Basic)
Declares the parameters and code that define a subroutine lambda expression.

## Syntax

```
Sub ( [ parameterlist ] ) statement
- or -
Sub ( [ parameterlist ] )
  [ statements ]
End Sub

```

## Parts

|Term|Definition|
|---|---|
|`parameterlist`|Optional. A list of local variable names that represent the parameters of the procedure. The parentheses must be present even when the list is empty. For more information, see [Parameter List](../../../visual-basic/language-reference/statements/parameter-list.md).|
|`statement`|Required. A single statement.|
|`statements`|Required. A list of statements.|

## Remarks
 A *lambda expression* is a subroutine that does not have a name and that executes one or more statements. You can use a lambda expression anywhere that you can use a delegate type, except as an argument to `RemoveHandler`. For more information about delegates, and the use of lambda expressions with delegates, see [Delegate Statement](../../../visual-basic/language-reference/statements/delegate-statement.md) and [Relaxed Delegate Conversion](../../../visual-basic/programming-guide/language-features/delegates/relaxed-delegate-conversion.md).

## Lambda Expression Syntax
 The syntax of a lambda expression resembles that of a standard subroutine. The differences are as follows:

-   A lambda expression does not have a name.

-   A lambda expression cannot have a modifier, such as `Overloads` or `Overrides`.

-   The body of a single-line lambda expression must be a statement, not an expression. The body can consist of a call to a sub procedure, but not a call to a function procedure.

-   In a lambda expression, either all parameters must have specified data types or all parameters must be inferred.

-   Optional and `ParamArray` parameters are not permitted in lambda expressions.

-   Generic parameters are not permitted in lambda expressions.

## Example
 Following is an example of a lambda expression that writes a value to the console. The example shows both the single-line and multiline lambda expression syntax for a subroutine. For more examples, see [Lambda Expressions](../../../visual-basic/programming-guide/language-features/procedures/lambda-expressions.md).

 [!code-vb[VbVbalrLambdas#15](../../../visual-basic/language-reference/operators/codesnippet/VisualBasic/sub-expression_1.vb)]

## See Also
 [Sub Statement](../../../visual-basic/language-reference/statements/sub-statement.md)
 [Lambda Expressions](../../../visual-basic/programming-guide/language-features/procedures/lambda-expressions.md)
 [Operators and Expressions](../../../visual-basic/programming-guide/language-features/operators-and-expressions/index.md)
 [Statements](../../../visual-basic/programming-guide/language-features/statements.md)
 [Relaxed Delegate Conversion](../../../visual-basic/programming-guide/language-features/delegates/relaxed-delegate-conversion.md)


text:
# postmaster-runner

A module to run a Postmaster collections. This project is an extension from [postman-runner](https://github.com/poynt/postman-runner). It is designed to handle incoming messages to test asynchronous aspects of web components.

The postmaster collection also extends from the original postman collection with additional fields to support other requests, such as publishing Kafka messages, consuming Kafka messages, and receiving API callback.

## Postmaster Collection
See `sample_postmaster_collection.json` and `sample_postmaster_environment.json` for detailed examples.

###List of Postmaster Requests
* POSTMAN
	* Set `"type": "POSTMAN"`
	* Regular postman request
	* Maintains the same postman request format
* KAFKA_PUBLISH
	* Set `"type": "KAFKA_PUBLISH"`
	* Set `"topic": "[KAFKA-TOPIC-NAME]"`
	* Requires `kafka` environment variable for kafka host
	* Publishes a Kafka messages to `[KAFKA-TOPIC-NAME]` topic
* KAFKA_LISTEN
	* Set `"type": "KAFKA_LISTEN"`
	* Set `"topic": "[KAFKA-TOPIC-NAME]"`
	* Set `"matcher": "[REGEX-MATCHER]"`
	* Set `"tests": "[JS-TESTS]"`
	* Requires `zookeeper` environment variable for zookeeper host
	* Consumes a Kafka message from `[KAFKA-TOPIC-NAME]` with matching `[REGEX-MATCHER]` and runs post Javascript test from `[JS-TESTS]`
* API_LISTEN
	* Set `"type": "API_LISTEN"`
	* Set `"url": "[API-URL]"`
	* Set `"matcher": "[REGEX-MATCHER]"`
	* Set `"tests": "[JS-TESTS]"`
	* Requires `[API-URL]` to specify the port for the listener to bind to
	* Consumes a API callback message from `[API-URL]` with matching `[REGEX-MATCHER]` and runs post Javascript test from `[JS-TESTS]`

## Running from command line
```
bin/postmaster-runner.sh -c src/test/resources/sample_postmaster_collection.json -e src/tesresources/sample_postmaster_environment.json -haltonerror false
```
or

```
mvn clean install exec:java -DskipTests=true -Dexec.args="-c src/test/resources/sample_postmaster_collection.json -e src/tesresources/sample_postmaster_environment.json -haltonerror false"
```

Run `bin/postmaster-runner.sh` without any argument to see all the options.

## Running from Java

Add the following maven dependency:

```xml
		<dependency>
			<groupId>co.poynt.postmaster.runner</groupId>
			<artifactId>postmaster-runner</artifactId>
			<version>X.X.X</version>
			<scope>test</scope>
		</dependency>
```
where X.X.X is the latest version of this artifact.

From your test driver class, make the following call:

```java
	public void testRunPostmaster() throws Exception {
		PostmasterCollectionRunner cr = new PostmasterCollectionRunner();

		boolean isSuccessful = cr.runCollection(
				"classpath:sample_postmaster_collection.json",
				"classpath:sample_postmaster_environment.json",
				"My use cases", false);

		Assert.assertTrue(isSuccessful);
	}
```

repository: poynt/postmaster-runner

repo_name: poynt/postmaster-runner


text:
---
  layout: post
  title: Deploy Jekyll with Capistrano
  tags: [ruby,jekyll,deploy,capistrano]
---

If you're using Jekyll to generate your static website, you may want to deploy it as simple and fast, as Jekyll works. For this case, Ruby ecosystem has remote server automation and deployment tool that called [Capistrano](http://capistranorb.com/) .

First of all, you need to create *Gemfile* in your Jekyll project and add this lines:

{% highlight ruby %}
source 'https://rubygems.org'

gem 'capistrano', '~> 3.4.0'
{% endhighlight %}

Then execute:

{% highlight bash %}
bundle install && bundle exec cap install
{% endhighlight %}

This creates configuration files, that you can change with your parameters. Make sure that you set up production configuration with your server data (*/config/deploy/production.rb*):

{% highlight ruby %}
role :app, %w{user@server}
role :web, %w{user@server}
{% endhighlight %}

After configuration you can deploy your project with one simple command:

{% highlight shell %}
$ bundle exec cap production deploy
{% endhighlight %}

This command deploys  source to */var/www/website_name*, but it does not generate website. To execute `jekyll build` command you need to install Ruby using [rbenv](https://github.com/sstephenson/rbenv) or [RVM](https://rvm.io/) first.

Next you should add Capistrano plugin for rbenv in *Gemfile*:

{% highlight ruby %}
gem 'capistrano-rbenv', '~> 2.0'
{% endhighlight %}

Then execute

{% highlight shell %}
bundle exec
{% endhighlight %}

And add this line to *Capfile*:

{% highlight ruby %}
require 'capistrano/rbenv'
{% endhighlight %}

Install Jekyll gem on server and add it to rbenv binaries list in *config/deploy.rb*:

{% highlight ruby %}
set :rbenv_map_bins, %w{rake gem bundle ruby jekyll}
{% endhighlight %}

Now you can use my [capistrano-jekyll](https://github.com/ne1ro/capistrano-jekyll) gem to execute `jekyll build` command every time when you deploy your website's changes:

{% highlight ruby %}
# Gemfile
gem 'capistrano-jekyll'
{% endhighlight %}

{% highlight shell %}
$ bundle install && bundle exec cap production deploy
{% endhighlight %}


text:
[activeannoservice](../../index.md) / [project.layout](../index.md) / [Column](./index.md)

# Column

`data class Column`

A column is part of a row and has a width dependent of screen size. Every row should have at least one column.

### Constructors

| Name | Summary |
|---|---|
| [<init>](-init-.md) | A column is part of a row and has a width dependent of screen size. Every row should have at least one column.`Column(width: `[`ColumnSizes`](../-column-sizes/index.md)`, children: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LayoutElement`](../-layout-element.md)`>)` |

### Properties

| Name | Summary |
|---|---|
| [children](children.md) | The actual UI elements, elements in the list will just be parsed as html elements one after another in the column.`var children: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LayoutElement`](../-layout-element.md)`>` |
| [width](width.md) | `val width: `[`ColumnSizes`](../-column-sizes/index.md) |

repository: MaxMello/ActiveAnno

repo_name: MaxMello/ActiveAnno


text:
---
layout: post
title:  Green Mahjong 1.2 released - many improvements!
date:   2014-06-15 21:43:00
categories: Green Mahjong
---
Green Mahjong 1.2 was released today. The new version brings quite a few new features:

Hints

Green Mahjong has now a "hint" function - simply use the "Hint" button in the toolbar to see all possible moves:
[caption id="attachment_2077" align="alignnone" width="300"] Hints function[/caption]

Detection of a lost game

If there are no more possible moves - i.e. if the game is lost - the user is informed with a friendly message:
[caption id="attachment_2080" align="alignnone" width="300"] Game is lost[/caption]

Many graphical improvements

* The heuristic which chooses the best resolution sprites was improved, taking into account the browser viewport height
* The gaming board is centered on the screen
* The backgrounds have better resolutions

The game can be tried out in the browser: Green Mahjong

It can be installed from the Firefox Marketplace: Green Mahjong in the Firefox Marketplace and from the Google Web Store: Green Mahjong in the Google Web Store

If you like the game, please rate it in the application stores!

extension: markdown


text:
# [IL Linker](src/linker/README.md)

The IL Linker is a tool one can use to only ship the minimal possible IL code and metadata that a set of
programs might require to run as opposed to the full libraries.

It is used by the various Xamarin products to extract only the bits of code that are needed to run
an application on Android, iOS and other platforms.

It can also be used in the form of [ILLink.Tasks](src/ILLink.Tasks/README.md) to reduce the size of .NET Core apps.

# [Analyzer](src/analyzer/README.md)

The analyzer is a tool to analyze dependencies which were recorded during linker processing and led linker to mark an item to keep it in the resulting linked assembly.

It can be used to better understand dependencies between different metadata members to help further reduce the linked output.

## How to build the IL Linker

TODO

## Build & Test Status

**Mono**

[![Build Status](https://jenkins.mono-project.com/buildStatus/icon?job=test-linker-mainline)](https://jenkins.mono-project.com/job/test-linker-mainline/)

**.NET Core**

[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/mono/linker-ci?branchName=master)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=364&branchName=master)

## Link xml file examples

A link xml file can be used to explicitly preserve assemblies, types, and members.  Below is a sample file containing examples of various usages.

```xml
<linker>
  <!--
  Preserve types and members in an assembly
  -->
  <assembly fullname="Assembly1">
    <!--Preserve an entire type-->
    <type fullname="Assembly1.A" preserve="all"/>
    <!--No "preserve" attribute and no members specified means preserve all members-->
    <type fullname="Assembly1.B"/>
    <!--Preserve all fields on a type-->
    <type fullname="Assembly1.C" preserve="fields"/>
    <!--Preserve all fields on a type-->
    <type fullname="Assembly1.D" preserve="methods"/>
    <!--Preserve the type only-->
    <type fullname="Assembly1.E" preserve="nothing"/>
    <!--Preserving only specific members of a type-->
    <type fullname="Assembly1.F">
      <!--
      Fields
      -->
      <field signature="System.Int32 field1" />
      <!--Preserve a field by name rather than signature-->
      <field name="field2" />
      <!--
      Methods
      -->
      <method signature="System.Void Method1()" />
      <!--Preserve a method with parameters-->
      <method signature="System.Void Method2(System.Int32,System.String)" />
      <!--Preserve a method by name rather than signature-->
      <method name="Method3" />
      <!--
      Properties
      -->
      <!--Preserve a property, it's backing field (if present), getter, and setter methods-->
      <property signature="System.Int32 Property1" />
      <property signature="System.Int32 Property2" accessors="all" />
      <!--Preserve a property, it's backing field (if present), and getter method-->
      <property signature="System.Int32 Property3" accessors="get" />
      <!--Preserve a property, it's backing field (if present), and setter method-->
      <property signature="System.Int32 Property4" accessors="set" />
      <!--Preserve a property by name rather than signature-->
      <property name="Property5" />
      <!--
      Events
      -->
      <!--Preserve an event, it's backing field (if present), add, and remove methods-->
      <event signature="System.EventHandler Event1" />
      <!--Preserve an event by name rather than signature-->
      <event name="Event2" />
    </type>
    <!--Examples with generics-->
    <type fullname="Assembly1.G`1">
      <!--Preserve a field with generics in the signature-->
      <field signature="System.Collections.Generic.List`1<System.Int32> field1" />
      <field signature="System.Collections.Generic.List`1<T> field2" />
      <!--Preserve a method with generics in the signature-->
      <method signature="System.Void Method1(System.Collections.Generic.List`1<System.Int32>)" />
      <!--Preserve an event with generics in the signature-->
      <event signature="System.EventHandler`1<System.EventArgs> Event1" />
    </type>
    <!--Preserve a nested type-->
    <type fullname="Assembly1.H/Nested" preserve="all"/>
    <!--Preserve all fields of a type if the type is used.  If the type is not used it will be removed-->
    <type fullname="Assembly1.I" preserve="fields" required="0"/>
    <!--Preserve all methods of a type if the type is used.  If the type is not used it will be removed-->
    <type fullname="Assembly1.J" preserve="methods" required="0"/>
    <!--Preserve all types in a namespace-->
    <type fullname="Assembly1.SomeNamespace*" />
    <!--Preserve all types with a common prefix in their name-->
    <type fullname="Prefix*" />
  </assembly>
  <!--
  Preserve an entire assembly
  -->
  <assembly fullname="Assembly2" preserve="all"/>
  <!--No "preserve" attribute and no types specified means preserve all-->
  <assembly fullname="Assembly3"/>
  <!--
  Fully qualified assembly name
  -->
  <assembly fullname="Assembly4, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null">
    <type fullname="Assembly4.Foo" preserve="all"/>
  </assembly>
</linker>
```

repository: directhex/linker

gha_license_id: NOASSERTION

repo_name: directhex/linker


text:
BaseModule

v3.00 Updated to work with a Copernicus II's GPS readings. This version uses altitude
for its cutdown check, but the position (coordinates) is also available.
SD card logging capability added. Note that GPS connections changed for new software
serial pin assignments for XBee shield SD card compatibility.

v1.10 Updated to avoid conflicts with other Serial messages and added support for
putting the XBee to sleep until near cutdown time.

Brendan Batliner and Milan Shah
Illinois Mathematics and Science Academy - SIR Program

Notes on SD card integration - LN
REF: http://arduino.cc/en/Main/ArduinoWirelessShield

  The Wireless shield hardwires Arduino pin 4 to the on-board
  SD card slot's SPI chip select (CS), so it can't be used as
  a Software Serial pin as in the TinyGPS example. Also
  The Arduino's MOSI, MISI and CLK pins (11,12 and 13) are used
  by the SD library and even if not used for SD CS, the default
  CS pin 10 must be programmed as an output.

  So, software serial can be assigned to 5 and 6 safely.

  TESTING:
  Can be tested without remote cutdown and remote programmer units:
  1. Remove XBee from XBee shield so Arduino USB I/O will work
  2. Provide input via a single monitor line entry emulating the
     remote inputs, for example:
     X90,100000,300,41.1000322,-87.9167100
     This yields: Remote cutdown time (deadman): 90 minutes
                  Cutdown altitude: 100,000 feet
                  Cutdown range: 300 miles
                  Launch Lat/Lon: Koerner Aviation

repository: AdlerFarHorizons/CutDownSystem

repo_name: AdlerFarHorizons/CutDownSystem


text:
# GDPR Popup

This plugin will ask user for consent to use tracking code on the website and keep it as a cookie setting. If user denies, tracking code doesn't get added and all tracking cookies (plus any specifed additional ones) get removed.

This plugin uses pure javascript so no additional libraries are required.

## Getting Started

1. Include the plugin javascript and stylesheet (you can choose from using a normal CSS file or SASS).

2. Add a div element with an id of "gdpr-popup" to your website's body.

### Usage

To initiate the plugin you have to start the plugin by calling it

```
initiateGdpr()
```

### Parameters/Options

This plugin has a number of parameters that you can use:

```
initiateGdpr(GTM, UA, Additional, Position, Title, Message, Button1, Button2);
```

GTM - Google tag manager API KEY

```
initiateGdpr('GTM-XXXXXXX');
```

UA - Google analytics API KEY

```
initiateGdpr(..., 'UA-XXXXXXX-X');
```

Additional - You can specify additional cookie names to disable. (Has to be an array)

```
initiateGdpr(..., ['cookie1']);
```

```
initiateGdpr(..., ['cookie1', 'cookie2', 'cookie3']);
```

Postition - sets the position of the popup window ('center', 'top', 'bottom')

```
initiateGdpr(..., 'center');
```

Title - Sets popup title

Message - Sets popup main text

Button1: Sets popup opt-in button text

Button2: Sets popup opt-out button text

## An example using all possible parameters

```
initiateGdpr('GTM-XXXXXXX', 'UA-XXXXXXX-X', ['cookie1', 'cookie2'], 'bottom', 'Welcome!', 'Please use these buttons to opt in or out of tracking functionality', 'Opt-in', 'Opt-out');
```

repository: jameshaddrill/gdpr-popup

repo_name: jameshaddrill/gdpr-popup


text:
# latex_util
Some LaTeX helpers...

I have developed these over time and found them useful for various papers etc. that I have been writing. I thought putting them into a repo would a) force me to clean them up a little (let's see how that goes) and b) possibly be of use to others (or not). Last, but not least, I might even learn something from one of the many LaTeX hacks out there.

There goes...

## A little bit of documentation

There are a number of `.sty` files, each of which provide helpers for handling a particular aspect of text production. These are:

  1. `drafts.sty`, which helps with drafting by providing commands for marking up comments and identifying left-over comments when preparing the final document, as well as commands for change mark up.
  2. `figures.sty`, which provides a simplified command for embedding figures in one go
  3. `theorem_environments.sty`, which provides a number of specialised commands for theorem-style environments with a simplified usage syntax for handling labels, captions, end marks, etc.
  4. `long_paper.sty`, which provides support for separating short and long version of a paper in one TeX setup (*e.g.,* where the page limit means some information needs to go into a separate tech report).
  5. `commands.sty` containing some miscellaneous commands probably of no use to anybody but myself :-)

### Usage of `drafts.sty`

This package provides one option `nodrafts`, so use either as `\usepackage{drafts}` or `\usepackage[nodrafts]{drafts}`. The latter will raise a warning for any comments left over in your document.

To mark up comments in the document enclose them either in `\draft{}` or `\begin{draftbar}` and `\end{draftbar}` for longer, paragraph-structured material. You can also use environment `draftlist`, which works like `draftbar` except that it turns into an enumerated list the first time you use `\item`. You do not need to explicitly open an enumeration for this to work.

For change markup there are the commands `\add{New text}`, `\delete{Old text}` and `\change{Old Text}{to new text}`. These will use color and strike-out to mark up changes in the PDF generated. If `nodrafts` has been activated, any deleted text will no longer be included and any added text will be rendered without additional colour.

### Usage of `figures.sty`

TBD

### Usage of `theorem_environment.sty`

TBD

### Usage of `long_paper.sty`

TBD

gha_language: TeX


text:
---
layout: post
title:  "Talk: Using the Github API with Python"
description: Slides from my talk at DJUGL
date:   2014-03-11 20:00:00
categories: Python Django Talks Video
---

Here are the [slides](/slides/github-api-and-python/) for my talk at [DJUGL](https://twitter.com/djugl) about using the Github API with Python and the Feedback tool I've been building on top of Github issues.


text:
# Test React app for Qualium Systems interview.
## [qualium-test.herokuapp.com](https://qualium-test.herokuapp.com "Cars List")

### Setting up and starting the app:

Installing dependencies and validating the webpack config file:
```shell
npm install && cd client && npm run setup
```

Starting the server:
```shell
node server.js
```

Commands for the client-side app are accessible from the `./client` folder.

Starting webpack-dev-server:
```shell
npm run start
```

Running tests suit:
```shell
npm test
```

### Building the app for deploy:

Building the `bundle.js` file without optimizations (development mode):
```shell
npm run build-and-copy-static
```

Building the `bundle.js` file with optimizations (production mode):
```shell
npm run build-and-copy-static:prod
```
The command `build-and-copy-static` will build a `bundle.js` file, copy it to the `static` folder located in root directory and copy the `index.html` file to the root directory.


text:
# Python Basics:

Python basics will be covered with [A Byte of Python](https://www.gitbook.com/book/swaroopch/byte-of-python/details).  We will go over most of it in class to get a broader understanding of how Python works.

#

repository: Teraisa/udacity-full-stack

repo_name: Teraisa/udacity-full-stack


text:
*First off, thanks for taking the time to contribute!*

# Features

The purpose of this library is to create an inclusive environment for all .NET core developers. To put this in more simple terms. This means that feature requests must satisfy an important question.

1. Does this feature help multiple developers, or does it just help my project?

If a feature only helps your project. It will be rejected. If you can justify the existence of a feature by explaining how it will help all of us. Then it will be accepted!

# Bugs

Bug fixes will be audited to the best of my ability and merged when accepted. Depending on the changes needed to fix the bug. You might be required to update README.md with either an example, or fix to existing example. If a bug is created from a feature you added. You are encourged to fix the bug yourself. If you need help please place the help wanted tag, and @TimothyMeadows in the comments.


text:
# flask-dev-notes
notes on developing my first flask app

## Tools

how to transfer file to and get file from ec2:

http://angus.readthedocs.io/en/2014/amazon/transfer-files-between-instance.html

tmux qualiy of life improvements:

https://github.com/tmux-plugins/tpm

https://github.com/tmux-plugins/tmux-resurrect

setup ssh on your ec2 instance:

https://help.github.com/articles/connecting-to-github-with-ssh/

redis to save pandas dataframe:

https://redis.io/topics/quickstart

## Deploy

https://pythonprogramming.net/deploy-vps-dash-data-visualization/

## Tutorials

simple flask official tutorial:

http://flask.pocoo.org/docs/1.0/tutorial/

after this tutorial to deploy:

https://stackoverflow.com/questions/25319690/how-do-i-run-a-flask-app-in-gunicorn-if-i-used-the-application-factory-pattern

plotly dash deployment tutorial:

https://dash.plot.ly/deployment

https://www.elastic.co/products/logstash

flask-caching: https://dash.plot.ly/performance

https://www.r-graph-gallery.com/121-manage-colors-with-plotly/

## Weird Problems:

https://askubuntu.com/questions/386281/error-while-loading-shared-libraries-libglu-so-1

matlab return multiple values to python: https://www.mathworks.com/matlabcentral/answers/323441-return-multiple-variables-from-matlab-to-python

```
# matlab python module
import do_pred
# matlab python module must be imported before matlab
import matlab
```

https://www.mathworks.com/help/matlab/matlab_external/matlab-arrays-as-python-variables.html

before building redis:
https://askubuntu.com/questions/192645/make-command-not-found

nginx file size limit
https://blog.csdn.net/rgc_520_zyl/article/details/78946992

repository: mingrui/flask-dev-notes

repo_name: mingrui/flask-dev-notes