text:
# vlt.neuro.vision.visual_stim_row_correlator

```
  VISUAL_STIM_ROW_CORRELATOR - Compute the next visual stimulus frame for a given correlator

   NEXT_FRAME = vlt.neuro.vision.visual_stim_row_correlator(FRAME_DATA, CORRELATOR, SIGN)

   Given a frame of visual stimulus data that consists of -1's and 1s
   (FRAME_DATA), then a new frame (NEXT_FRAME) of -1's and 1s is created
   such that the correlation between the new frame and the old frame is
   as described in CORRELATOR (see below).

   The algorithm operates on the rows of the stimulus, so that if the
   stimulus frame has many rows, each row will be operated on independently.

   CORRELATOR: A number that indicates which correlator to use
      0: 2-point leftward correlator
      1: 2-point rightward correlator
      2: 3-point converging leftward correlator
      3: 3-point converging rightward correlator
      4: 3-point diverging leftward correlator
      5: 3-point diverging rightward correlator

   SIGN: the sign of the correlator; should the product be -1 or 1?

   For a graphical depiction of these correlators, see Clark, Fitzgerald, and Ales et al.,
   Nature Neuroscience 2014 (in particular, Supplementary Figure 4)

   Example: Compute 10 frames for a single row, using a leftward 2-point correlator (sign 1)
       correlator = 0;
       corelator_sign = 1;
       row_data = [ 1 1 -1 1 -1 -1 1 1]; % made up data
       for i=1:10,
          row_data(i+1,:) = vlt.neuro.vision.visual_stim_row_correlator(row_data(i,:),correlator,correlator_sign);
       end;
       row_data,

```

repository: VH-Lab/vhlab-toolbox-matlab

gha_language: MATLAB

repo_name: VH-Lab/vhlab-toolbox-matlab


text:
Scientific Computing in Rust

# Features
* Initial value problem solving
* Root finding algorithms
* Polynomials
* Polynomial Interpolation
* Scientific Constants
* Special functions/polynomials
* Numeric quadrature
* Numeric differentiation

Explanations of the features can be found [here](https://aftix.xyz/home/bacon).

# Initial Value Problems

There are two adaptive Runge-Kutta methods, two
Adams predictor-correctors, and two adaptive Backwards Differentiation
Formulas implemented. The interface to all of the solvers is the same.
As an example, this code solves `y' = y` using the Runge-Kutta-Fehlberg
method.

```rust
use bacon_sci::ivp::{RK45, RungeKuttaSolver};
use nalgebra::{VectorN, U1};

fn deriv(_t: f64, y: &[f64], _params: &mut ()) -> Result<VectorN<f64, U1>, String> {
    Ok(VectorN::<f64, U1>::from_column_slice(y))
}

fn solve() -> Result<(), String> {
    let solver = RK45::new()
                    .with_dt_min(0.01)?
                    .with_dt_max(0.1)?
                    .with_tolerance(1e-4)?
                    .with_initial_conditions(&[1.0])?
                    .with_start(0.0)?
                    .with_end(10.0)?
                    .build();
    let _solution = solver.solve_ivp(deriv, &mut ())?;
    Ok(())
}
```

There is also a `solve_ivp` function in `bacon_sci::ivp` that tries a fifth-order
predictor-corrector followed by the Runge-Kutta-Fehlberg method followed by
BDF6.

# Root Finding Algorithms

`bacon_sci::roots` implements the bisection method, Newton's method,
the secant method, Newton's method for polynomials, and Müller's method
for polynomials.

As an example, the following code snippet finds the root of `x^3` using
initial guesses of `0.1` and `-0.1`.

```rust
use bacon_sci::roots::secant;
use nalgebra::{VectorN, U1};

fn cubic(x: &[f64]) -> VectorN<f64, U1> {
    VectorN::<f64, U1>::from_iterator(x.iter.map(|x| x.powi(3)))
}

fn solve() -> f64 {
    secant((&[-0.1], &[0.1]), cubic, 0.001, 1000).unwrap()
}
```

# Polynomials and Polynomial Interpolation

`bacon_sci::polynomial` implements a polynomial struct. `bacon_sci::interp` implements
Lagrange interpolation, Hermite interpolation, and cubic spline interpolation.

# Scientific Constants

Several scientific constants are defined in `bacon_sci::constants`. The data
comes from NIST. The 2018 CODATA complete listing is available as a hashmap.

# Special Functions and Polynomials

Currently, `bacon_sci::special` allows you to get Legendre polynomials, Hermite polynomials,
Laguerre polynomials, and Chebyshev polynomials.

# Numeric Differentiation and Quadrature

`bacon_sci::differentiate` allows first- and second-derivative evaluation numerically.
`bacon_sci::integrate` implements Tanh-Sinh quadrature, adaptive Simpson's rule,
Romberg integration, and several adaptive Gaussian integration schemes.

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
# Laravel-SPA
- A single page application with crud, graph and custom email sending I made using vue and laravel. :)))))))))))))

##### Clone this project and run to your local computer
- run in terminal/bash `git clone https://github.com/VinceSanityyy/Laravel-SPA.git`
- run `composer install` to install php dependencies
- run `npm install` to install node dependencies
- run `php artisan passport:install` to get api key in authorization
- configure local database in `.env`
- also, configure email in `.env` like this
```
MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=your email
MAIL_PASSWORD=the password of your email
MAIL_ENCRYPTION=ssl
```
 - go to your gmail account and go to security tab and allow the less secure app access to true.
 - run `php artisan migrate`
 - run `php artisan serve` and `npm run watch --poll`
 - go to `<IP_ADDRESS>:8000`
 - if you want full previlage just edit the user type in the database manually and set it to `admin` all lowercase. Thanks

### Feel free to use -Vince
- If you want to contribute or become a contributor message me in facebook. `facebook.com/vincentsanityyy`
- you can create your own branch or you can fork and request for pull. Thanks

## To Do's
- Add dynamic data in Graph/Chart ✓
- Can send dynamic email msg from users ✓
- Make single page vue components and modal inputs ✓
- Can add/edit profile picture ✓
- CRUD ✓
- Add API token for passport ✓
- Add rules/authorization for users eg. Admin,User ✓
- Add alerts/Notif/Toasts ✓
- Convert table into data table ✗
- Chat module ✗
- Real time notifications ✗
- Good landing page ✗
- Good User Interface ✗
- User must type confirmation code from email before authorized to log in ✗
- Must conver API routes to regular routes ?

repository: VinceSanityyy/Laravel-SPA

gha_language: PHP

repo_name: VinceSanityyy/Laravel-SPA


text:
# UniqueSlugs

**This addon is not compatible with Cockpit CMS v2.**

See also [Cockpit CMS v1 docs](https://v1.getcockpit.com/documentation), [Cockpit CMS v1 repo](https://github.com/agentejo/cockpit) and [Cockpit CMS v2 docs](https://getcockpit.com/documentation/), [Cockpit CMS v2 repo](https://github.com/Cockpit-HQ/Cockpit).

---

Unique slugs for collections in [Cockpit CMS][2]

## Installation

Copy this repository into `/addons` and name it `UniqueSlugs` or use the cli.

### via git

```bash
cd path/to/cockpit
git clone https://github.com/raffaelj/cockpit_UniqueSlugs.git addons/UniqueSlugs
```

### via cp cli

```bash
cd path/to/cockpit
./cp install/addon --name UniqueSlugs --url https://github.com/raffaelj/cockpit_UniqueSlugs/archive/master.zip
```

### via composer

Make sure, that the path to cockpit addons is defined in your projects' `composer.json` file.

```json
{
    "name": "my/cockpit-project",
    "extra": {
        "installer-paths": {
            "addons/{$name}": ["type:cockpit-module"]
        }
    }
}
```

```bash
cd path/to/cockpit-root
composer create-project --ignore-platform-reqs aheinze/cockpit .
composer config extra.installer-paths.addons/{\$name} "type:cockpit-module"

composer require --ignore-platform-reqs raffaelj/cockpit-uniqueslugs
```

## How to use

Add these options to `path/to/cockpit/config/config.php` to specify the collections and field names for slug generation:

```php
<?php

return [
    'app.name' => 'my app',

    // unique slugs
    'unique_slugs' => [
        'collections'    => [
            'pages'      => 'title',
            'products'   => 'name',
        ],
        'localize' => [
            'pages'     => 'title',
            'products'  => 'name',
        ],
    ],

    // ACL example
    'groups' => [
        'manager' => [
            'cockpit' => [
                'backend' => true,
            ],
            'uniqueslugs' => [
                'manage' => true,
            ],
        ],
    ],
];
```

all options:

```php
<?php

return [
    'app.name' => 'my app',

    // unique slugs
    'unique_slugs' => [
        'slug_name'      => 'slug', // default: "slug"
        'placeholder'    => 'page', // default: "entry"
        'check_on_update' => true,  // default: false, unique checks on each
                                    // update (if user changes slug by hand)
        'delimiter'      => '|',    // default: "|", is used for nested fields

        'collections'    => [
            'pages'      => 'title',
            'products'   => 'name',
            'something'  => [       // use multiple fields as fallbacks
                'title',
                'name',
                'image|meta|title', // use nested fields for slugs
            ],
        ],
        'localize' => [             // for localized fields, omitted if not set
            'pages'     => 'title', // field name without suffix ("_de")
            'products'  => 'name',
            'something' => [        // use multiple fields as fallbacks
                'title',
                'name',
                'image|meta|title', // use nested fields for slugs
            ],
        ],
    ],

    // ACL example
    'groups' => [
        'manager' => [
            'cockpit' => [
                'backend' => true,
            ],
            'uniqueslugs' => [
                'manage' => true,
            ],
        ],
    ],
];
```

Or use the GUI. If you are no admin, your user group needs manage rights.

![uniqueslugs-gui](https://user-images.githubusercontent.com/13042193/59967705-2c8d4200-952e-11e9-95d0-82e1cc21e4ad.png)

## Notes:

Hardcoded settings in the config file will override gui settings.

Don't set `slug_name: fieldname_slug` if you also set `{"slug": true}` in the `fieldname` options for some reason. It should work, but it fails on multilingual setups ([explanation][3]).

Your collection can have a visible field named "slug", if you want to edit it by hand.

The builtin option to sluggify text fields via options `{"slug": true}` in the backend uses Javascript. **If you want unique slugs, that option is not necessary anymore.**

The code for this addon is inspired by a [gist from fabianmu][4].

Thanks to [fabianmu][5] and [aheinze][6]

[1]: https://github.com/agentejo/cockpit/commit/fc7bb9cbe7dc2bb69f8f34ca2e899b9ad49f33fc#diff-dbdace793615e1dc2b38f69bdac96950
[2]: https://github.com/agentejo/cockpit
[3]: https://github.com/agentejo/cockpit/issues/906
[4]: https://gist.github.com/fabianmu/5f73a6c2303e08add4e00dc2e548ef2d
[5]: https://github.com/fabianmu
[6]: https://github.com/aheinze


text:
# Week 1

Time spent: 2h

## What I did

Decided what to do and set up the project.

## What am I going to do next

- Decide on what material to use for pathfinding
- Parsing said material
- Implement Dijkstra

## Thoughts and questions

Last time I had to drop out because of some external factors. This time there shouldn't be any problems but I picked a safe topic for the project just in case.

repository: jakekall/shortest-path

gha_language: Java

repo_name: jakekall/shortest-path


text:
[![Build Status](https://travis-ci.org/home1-oss/oss-build.svg?branch=master)](https://travis-ci.org/home1-oss/oss-build)

-----
There are link issues on git service generated pages, see gitbook or maven site.
+ [gitbook](https://home1-oss.github.io/home1-oss-gitbook/release/)
+ [maven site](https://home1-oss.github.io/home1-oss/release/)
-----

# oss-build
Module to centralize common resources and configuration for open source stack builds.

- Parent pom.xml for maven projects
- Maven site
- CI config
- IDE config
- Code style
- Java version
- Project encoding

branch_name: refs/heads/develop

gha_language: Shell


text:
---
layout: post
title: A Meta Page of Research Labs in Natural Language Related AI
---

The purpose of this page is to archive (meta) pages of notable research organizations throughout the world regarding natural language related AI (e.g., Natural Language Processing, Machine Learning, Action Planning, and Knowledge Base).

# Korean Academic

* [KAIST IR & NLP Lab](http://ir.kaist.ac.kr/about/)
* [Korea University NLP & IR Lab](http://nlp.korea.ac.kr/)
* [SNU Data Mining Center](http://dm.snu.ac.kr/ko/)

# Korean Industry
* [Naver Labs](http://labs.naver.com/)
* [SK T-Brain](https://github.com/SKTBrain)
* Kakao Brain

# US Academic

# US Industry


text:
bergwerkLABS - TryJump
============================

This is the complete Rework of the famous minigame TryJump.
**NOTE**: This project is still a WIP.

Why is this Open Source?
------------------------

Since the server closed, I decided to open source my work for other people to see how things were done.
Feel free to use this code for your own Minecraft network, if you have one.

Code Style and Conventions
--------------------------

This project follows the [Google Java code style](https://google.github.io/styleguide/javaguide.html) conventions. When working on this project, make sure to follow these rules. The use of `null` should be avoided where possible. Read [this article](https://github.com/google/guava/wiki/UsingAndAvoidingNullExplained) to learn more about it.

License
-------

This code is licensed under the Apache 2.0 License. You can grab a copy of it [here](https://www.apache.org/licenses/LICENSE-2.0).
The license is also provided in the project.

repository: Freggy/tryjump

repo_name: Freggy/tryjump


text:
# How to Contribute

If you have/find a variant annotation resource you want to include in our system, you can follow the guideline below to contribute a JSON importer (let's call it a "data plugin") for it.

In a nutshell, contributing data into MyVariant.info is just to provide us a data parser to convert your input data file(s) into a list of JSON-formatted objects.

----
## General guidelines
1. Code in Python (at least for now), and prefer in Python 3.
2. Use hg19 or hg38 genome assembly for genomic coordinates (assuming we are dealing with human variants for now)
3. all data plugins are located under [src/dataload/sources](src/dataload/sources) folder. You should follow this [sample_src example](src/dataload/sources/sample_src).
4. Each data plugin is one sub-folder under "sources", and the name of the sub-folder is typically the same as the root-level data_src key name, e.g. ["dbsnp" subfolder](/src/dataload/sources/dbsnp) handles all annoation data under "dbsnp" key.
5. Other existing data plugin folders typically contain `*_upload.py` and `*_dump.py` files. You generally don't need to worry about the `Uploader` and `Dumper` classes in these files. Just follow the steps below to provide us a simple data parser. Once we verify your data parser, we will convert it to the formal `Uploader` and `Dumper` classes.

## Steps to follow
1. Fork this repo, and clone your *forked repo* locally

    https://github.com/biothings/myvariant.info

2. Add your own data plugin (under a subfolder): The subfolder should start with two files: one parser file and another `__init__.py` file. The parser file, you should include the `load_data` function(see step 3). In `__init__.py` file, you can just leave it empty. Although not required, we typically name the parser file as "\<data_src\>_parser.py", like "dbsnp_parser.py", or "dbsnp_vcf_parser.py" when a data source provides multiple file formats.

3. Write `load_data` function: The first input parameter should be the input file or the input folder for multiple input files. The output of this function should be either a list or generator of JSON documents. A generator is ideal for large lists that won't fit into memory. (Details will be shown in the next section)

   If your data file support both hg19 and hg38 genomic assembly for variants, your `load_data` function should support a parameter to return either hg19 or hg38 based variants (e.g. using "assembly=hg19|hg38").

4. [Optional] add Meta dictionary: you can put some metadata like "maintainer", "requirements" etc. at the top of the parser file. Here is an example:
 ```
    __METADATA__ = {
        "requirements": [
            "PyVCF>=0.6.7",
        ],
        "src_name": 'dbSNP',
        "src_url": 'http://www.ncbi.nlm.nih.gov/SNP/',
        "version": '147',
        "field": "dbsnp"
    }
 ```

5. [Optional] `get_mapping` function returns a mapping dictionary to describe the JSON data structure and customize indexing. Typicaly, you can just skip it first and we can help to create one. An example `get_mapping` function can be found in [src/dataload/sources/sample_src/sample_src_parser.py](src/dataload/sources/sample_src/sample_src_parser.py).

6. [Optional] validate HGVS IDs (Details will be shown in the next section)

7. Commit and send the pull request.

   Here is a real-world pull request example from one of our contributors: [#13](https://github.com/biothings/myvariant.info/pull/13).

8. And the last, if you have trouble to code a data plugin, you can just produce a dump of JSON document list using whatever tools you like, and send over your dumped file to us. But that will require us to load it manually.

## `load_data` function
Parsers should be written in python and convert the input data file into structured JSON objects. We will then take the output and merge them with other data sources at our data backend. Some generic helper functions from [`utils.dataload`](src/utils/dataload) module can be utilized to help structure data properly into JSON as well as clean up data.
Check out the example [src/dataload/sources/sample_src](src/dataload/sources/sample_src) folder.

The `load_data` function could be divided into two parts:

### 1. Load data from source file
The first step is to read in source files. The source files could be in different formats, including tsv, csv, vcf, xml. There are a variety of python libraries and packages available to help read and parse these data files, e.g. python cvs library, PyVCF. Here, we have listed examples of data loading modules for some of the major formats.

#### 1) tsv/csv file example
An example of "*tsv*" or "*csv*" data loading module could be found under: [src/dataload/sources/dbnsfp/dbnsfp_parser.py](src/dataload/sources/dbnsfp/dbnsfp_parser.py)

#### 2) vcf file example
An example of "*vcf*" data loading module could be found under: [src/dataload/sources/exac/exac_parser.py](src/dataload/sources/exac/exac_parser.py)

#### 3) xml file example
An example of "*xml*" data loading module could be found under: [src/dataload/sources/clinvar/clinvar_xml_parser.py](src/dataload/sources/clinvar/clinvar_xml_parser.py)

### 2. Convert each item into a JSON object
All JSON objects for MyVariant.info should have two required fields: the **_id** field and the **<data_src\>** field.

#### 1) **_id** field
Each individual JSON object contains an "**_id**" field as the primary key. We utilize recommended nomenclature from Human Genome Variation Society (HGVS) to define the "**_id**" field in MyVariant.info. We use HGVS’s genomic reference sequence notation based on the current reference genome assembly (e.g. hg19 for human). The followings are brief representations of major types of sequence variants. More examples could be found at [our documentation page](http://docs.myvariant.info/en/latest/doc/data.html#id-field) and http://www.hgvs.org/mutnomen/recs-DNA.html.

**NOTE**: In MyVariant.info, we only use "chr??" to represent the reference genomic sequence in "**_id**" field. The valid chromosomes representations are **chr1**, **chr2**, ..., **chr22**, **chrX**, **chrY** and **chrMT**. Do not use *chr23* for *chrX*, *chr24* for *chrY*, or *chrM* for *chrMT*.

##### SNV example
	chr1:g.35366C>T

  The above ID represents a C to T SNP on chromosome 1, genomic position 35366.

##### Insertion example
	chr2:g.177676_177677insT

  The above ID represents that a T is inserted between genomic position 177676 and 177677 on chromosome 2.

##### Deletion example
  	chrM:g.2947878_2947880del

 The above ID represents that a three nucleotides deletion between genomic position 2947878 and 2947880 on chromosome M. Note that we don't include the deleted sequence in the _id field in this case.

##### Deletion/Insertion example
	chrX: g.14112_14117delinsTG

 The above ID represents that six nucleotides between genomic position 14112 and 14117 by TG

#### 2) Top-level **<data_src\>** field
The name of the top-level **<data_src\>** field should be the name of the data source, e.g. ‘clinvar’, ‘dbsnp’, all in lower-cases. Under this top-level field, you can strucutre your annotation in a proper JSON format you like. For example, you can have sub-fields like ‘chromosome’, ‘ref’, ‘alt’, ‘score’ . You can have nested structure if needed. For example, the ‘sift’ field is under 'dbnsfp' top-level **<data_src\>** field, and it contains sub-fields of ‘score’, ‘converted_rankscore’, and ‘pred’.

A typical example of JSON object in MyVariant.info could be found at [src/dataload/sources/dbnsfp/dbnsfp_parser.py](src/dataload/sources/dbnsfp/dbnsfp_parser.py)

## Variant_ID validation

**NOTE** this part of code currently does not work as described, skip this step for now, and we will update the code soon.

In order to make sure all variant IDs loaded into MyVariant.info strictly follows hgvs guidelines, we have developed a variant validation function to validate all variant IDs to be loads. The validation steps are as follows:

### step 1: Call load_data function and get generator of JSON documents

    from dataload.sources.sample_src.sample_src_parser import load_data
    db_generator = load_data(in_file)

### step 2: Call VariantValidator class under src/utils folder

    from utils.validate import VariantValidator
    t = VariantValidator()

### step 3: Run validate_generator function on your generator

    t.validate_generator(db_generator)

or return the correct hgvs id if false example occurred

    t.validate_generator(db_generator, verbose = True)

or return a list of false and none ids

    t.validate_generator(db_generator, return_false = True, return_none = True)

gha_language: Python

gha_license_id: NOASSERTION


text:
## How to add text annotation in PDF in VB.NET and ByteScout PDF SDK

### How to code in VB.NET to add text annotation in PDF with this step-by-step tutorial

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. ByteScout PDF SDK is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings and you can use it to add text annotation in PDF with VB.NET.

The SDK samples like this one below explain how to quickly make your application do add text annotation in PDF in VB.NET with the help of ByteScout PDF SDK. In your VB.NET project or application you may simply copy & paste the code and then run your app! Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Trial version of ByteScout PDF SDK can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.

## Get In Touch

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20PDF%20SDK%20Question)

or send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20PDF%20SDK%20Question)

## Free Trial Download

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)

## Web API (On-demand version)

[Get your free API key](https://pdf.co/documentation/api?utm_source=github-readme)

## API Documentation and References

[Explore ByteScout PDF SDK Documentation](https://bytescout.com/documentation/index.html?utm_source=github-readme)

[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)

[Check Free Training Sessions for ByteScout%20PDF%20SDK](https://academy.bytescout.com/)

## Video Review

[https://www.youtube.com/watch?v=gdsQ0EAqwGQ](https://www.youtube.com/watch?v=gdsQ0EAqwGQ)

url: https://raw.githubusercontent.com/repohoarder/ByteScout-SDK-SourceCode/32dd9367cebb66e3aa16bd803798c026d7dfeed5/PDF SDK/VB.NET/Add Text Annotation in PDF/README.md

repository: repohoarder/ByteScout-SDK-SourceCode

repo_name: repohoarder/ByteScout-SDK-SourceCode


text:
# Resource sharing

## From resource_sharing, create symbolic link to Buffers:

```bash
ln -s /home/dynamatic/Dynamatic/etc/dynamatic/Buffers/src src/DFnetlist
```

## Create the bin directory

```bash
mkdir bin
```

## From resource_sharing, compile the code:

```bash
make
```
## To run the code:
To synthesis_optimize.tcl script, optimize command, add flag -area:
```bash
optimize -area
```

## To run the code (old):

Use the regression test to create the optimized version of an example in its regular folder.
Add the example to filelist.lst in the resource_sharing folder.

In resource_sharing, create folder for output files:

```bash
mkdir output
```
From resource_sharing, run:

```bash
./run_all.sh
```

This script will run resource sharing on all examples in filelist.lst.


text:
---
title: 'Tool Time – The Practice of Personal Productivity'
author: Ken Haigh
layout: post
permalink: /posts/tool-time-the-practice-of-personal-productivity/
Hide SexyBookmarks:
  - 0
Hide OgTags:
  - 0
series:
  - View Related Posts for The Practice of Personal Productivity
dsq_thread_id:
  - 445417958
categories:
  - Productivity
tags:
  - Agile
  - backlog
  - calendar
  - daily tasks
  - dashboard
  - inbox
  - outcomes
  - productivity
  - tools
---
I love power tools and completing projects around my house. For the first ten years of my married life, each project had that moment. The moment of frustration and despair when you recognize you are way over your head. Whether I was trying to drill a hole through a 2×4 in my attic with a large screwdriver and pliers or standing on a step ladder with a garbage can and garage door opener unit precariously resting on top, I recognized that I had the wrong tool to do the job.  I am happy to report that after many trips to Home Depot and Lowe’s, I have finally reached tool saturation and can complete projects without three trips to the store.

My experiences have taught me that you need the right tool for the job. However, many productivity gurus avoid emphasizing the tools over the process/methodology for good reason. A tool can’t create lasting change in habit. The right tools, though, will remove barriers and allow you to focus on getting stuff done.

Fortunately, for the system I use, all the tools are free and don’t require you to purchase expensive software or notebooks. Here is the list of tools I use in order to support your Weekly Planning, Daily Planning, and Review sessions outlined in my previous post [The Best Week Ever – The Practice of Personal Productivity][2].

**The Inbox**
You will need an email client or service that acts as your one central inbox. The email client or service should have the following features (most do):

*   Ability to handle multiple email accounts if you have more than one account. You may also leverage email forwarding so that you can receive all your messages in one place.
*   Ability to create rules that allow you to filter messages based on sender name, subject lines, and message contents. For example, I created a rule that automatically removes an email message from my inbox that contains the word “unsubscribe”. I currently have around 20 email rules that filter and and categorize my email messages. One nice to have feature is the ability to exclude a rule from filtering depending on the sender.
*   Ability to move messages into a folder or label. I create folders for reference and filtering.
*   Ability to flag or categorize emails that need to be moved onto your backlog.
*   Ability to easily search your email messages that are stored in reference.

**The Calendar**
You will need a calendar to manage your time during the week so that you can realize your weekly outcomes. If an activity is not on my calendar, then it does not exist. The calendar should have the following features (most do):

*   Ability to create appointments in order to block your time for your tasks and reduce interruptions.
*   Ability to set recurring appointments for tasks that need completing each week (e.g. TPS report).
*   Ability to set reminders. I typically will delegate tasks to my future self so I don’t have to worry about stuff. I find him relatively reliable.
*   Ability to set private appointments. If your calendar is shared with others, some tasks need to remain confidential.
*   Ability to integrate with your email. I find it convenient to be able to easily create an event from an email message.

**The Backlog**
You will need a list to capture all the projects, tasks, and things that need to be done. A backlog item has a priority, description, when it was added and when it was completed. In order to easily manage your backlog, you will need:

*   Ability to force rank and quickly sort the items on your list by priority. Every item should have a unique priority (1,2,3,4, etc.)
*   Ability to hide completed and deleted items on your list.
*   Ability to query the list in order to generate metrics and gain insight on your management of the backlog.

**The Weekly Outcome List**
You will need a list to record your weekly outcomes. A weekly outcome has a description of what you envisioned achieving for the week, the date, whether or not it was added after your weekly planning session, whether or not it was completed, and associated description of your lesson learned if missed. In order to manage your outcome list, you will need:

*   Ability to hide previous weeks’ outcomes.
*   Ability to query the list in order to generate metrics and gain insight in your weekly velocity.

**The Daily Task List**
You will need a list to record your daily tasks. A daily task has a description of a step you will take in completing a weekly outcome, the date, whether or not it was added after your daily planning session, whether or not it was completed, and associated description of your lesson learned if missed. In order to manage your daily task list, you will need:

*   Ability to hide previous days’ tasks.
*   Ability to query the list in order to generate metrics and gain insight in your daily velocity and power days.

**The Dashboard**
You will need to automatically capture all the metrics for the week so you can understand what went well and where you need to improve. The dashboard should have the following features:

*   Ability to display results from querying your backlog, weekly outcome list, and daily task list.

I personally use Microsoft Outlook since our corporate email uses Exchange for our email and calendar. However, Gmail and Google Calendar are great tools and are free. I also use a spreadsheet to manage my backlog, weekly outcome list, and daily task list. Originally, I used Excel though I have recently moved the spreadsheet over to Google Docs for others to use.

In the next post, we will discuss the weekly planning session.

**Question for you: What tools do you use to get stuff done?**

 [2]: /posts/the-best-week-ever-the-practice-of-personal-productivity/ "The Best Week Ever – The Practice of Personal Productivity"


text:
#7 The Probabilistic Method

\label{chapter-pm}
\fancyhead[RE]{\bfseries Chapter \thechapter . \ \ The Probabilistic
                   Method}

The Probabilistic Method is a very powerful and surprising tool that
uses probability theory to prove results in discrete mathematics.
In this chapter, we will illustrate this method using several examples.


text:
# cifar10_resnet50

The CIFAR-10 dataset
The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images.

The dataset is divided into five training batches and one test batch, each with 10000 images. The test batch contains exactly 1000 randomly-selected images from each class. The training batches contain the remaining images in random order, but some training batches may contain more images from one class than another. Between them, the training batches contain exactly 5000 images from each class.

dataset link:'https://www.cs.toronto.edu/~kriz/cifar.html'

this project is an application of transfer learning for fast model processing and training.
Resnet50

In 2012 at the LSVRC2012 classification contest AlexNet won the the first price, After that ResNet was the most interesting thing that happened to the computer vision and the deep learning world.

Because of the framework that ResNets presented it was made possible to train ultra deep neural networks and by that i mean that i network can contain hundreds or thousands of layers and still achieve great performance.

The ResNets were initially applied to the image recognition task but as it is mentioned in the paper that the framework can also be used for non computer vision tasks also to achieve better accuracy.

Many of you may argue that simply stacking more layers also gives us better accuracy why was there a need of Residual learning for training ultra deep neural networks.
Problems

As we know that Deep Convolutional neural networks are really great at identifying low, mid and high level features from the images and stacking more layers generally gives us better accuracy so a question arrises that is getting better model performance as easy as stacking more layers?

With this questions arises the problem of vanishing/exploding gradients those problems were largely handled by many ways and enabled networks with tens of layers to converge but when deep neural networks start to converge we see another problem of the accuracy getting saturated and then degrading rapidly and this was not caused by overfitting as one may guess and adding more layers to a suitable deep model just increased the training error.

This problem was further rectifed by by taking a shallower model and a deep model that was constructed with the layers from the shallow model and and adding identity layers to it and accordingly the deeper model shouldn't have produced any higher training error than its counterpart as the added layers were just the identity layers.

branch_name: refs/heads/main


text:
---
back: "../04-OOBExploration"
home: "../"
next: "../06-Choices"
---

## How do I make my bot understand?

Our bot only knows how to do the things we tell it to do. If we want it to do something new we will need to tell it how to do it.

1. Start with a freshly reset bot. (i.e. press the "start over with latest content" button)
   ![Open Browser](./images/EB01.png)
1. Type in "what is your name"
    ![Open Browser](./images/EB01.png)
1. Hit Enter or click Send
    ![Open Browser](./images/EB02.png)
1. The bot responds but it apparently doesnt know its own name!
    ![Open Browser](./images/EB03.png)
1. Let's make it smarter!  Click on Topics on the left.
    ![Open Browser](./images/EB04.png)
1. Click Hide Bot to give us some room to work.
    ![Open Browser](./images/EB05.png)
1. Click New Topic to begin creating a new topic for the bot.
    ![Open Browser](./images/EB06.png)
1. Every topic needs a name so let's use WhoAmI.
    ![Open Browser](./images/EB07.png)
1. Since we want the bot to tell us its name let's put that into the Description box.
    ![Open Browser](./images/EB08.png)
1. What should we use as a trigger phrase to get the bot to start telling us its name?  I'll use "what is your name". Then Click Add to add it to the list of trigger phrases.
    ![Open Browser](./images/EB09.png)
1.  Now that we have a way to start the topic, click the "Go to authoring canvas" button.
    ![Open Browser](./images/EB11.png)
1. The bot shows us our trigger phrase and then "Bot Says" step to say something to the user.  Type in "My name is TestBot" (or whatever you named your bot), and then press "Save".
    ![Open Browser](./images/EB12.png)
1. OK. Time to test!  Click "Test your bot" in the bottom left corner, then "start over with latest content"
    ![Open Browser](./images/EB14.png)
1. Type in "what is your name", Hit enter or click Send
    ![Open Browser](./images/EB16.png)
1. Congratulations!!!  You just made your bot smarter!

## Is our bot Smart?

1. Let's ask our bot "what you name"? What happens? Why?
2. Let's ask our bot "name"? What happens? Why?
3. Let's ask our bot "tell me your name"? What happens? Why? Can you fix it?


text:
# Summary

* [Welcome](welcome.md)
    * [Frequently asked questions](faq.md)
    * [Codeception, PHPUnit and wp-browser](codeception-phpunit-and-wpbrowser.md)
* [Using wp-browser with Codeception 4.0](codeception-4-suport.md)
* Migration guides
    * [Version 2 to version 3](migration/from-version-2-to-version-3.md)
* [Levels of testing](levels-of-testing.md)
* Getting started
    * [Requirements](requirements.md)
    * [Installation](installation.md)
    * [Setting up a minimum WordPress installation](setting-up-minimum-wordpress-installation.md)
    * [Configuration](configuration.md)
* Tutorials
    * [Automatically change database during acceptance and functional tests](tutorials/automatically-change-db-in-tests.md)
    * [Setting up wp-browser on VVV to test a plugin](tutorials/vvv-setup.md)
    * [Setting up wp-browser on MAMP for Mac to test a plugin](tutorials/mamp-mac-setup.md)
    * [Setting up wp-browser on WAMP for Windows to test a plugin](tutorials/wamp-setup.md)
    * [Setting up wp-browser on Local by Flywheel to test a plugin](tutorials/local-flywheel-setup.md)
* Modules
    * [WPBrowser](modules/WPBrowser.md)
    * [WPCLI](modules/WPCLI.md)
    * [WPDb](modules/WPDb.md)
    * [WPFilesystem](modules/WPFilesystem.md)
    * [WPLoader](modules/WPLoader.md)
    * [WPQueries](modules/WPQueries.md)
    * [WPWebDriver](modules/WPWebDriver.md)
* Advanced Usage
    * [Running tests in separate processes](advanced/run-in-separate-process.md)
* [Events API](events-api.md)
* [Extensions](extensions.md)
* [Commands](commands.md)
* [Contributing](contributing.md)
* [Sponsors](sponsors.md)
* [Changelog](https://github.com/lucatume/wp-browser/blob/master/CHANGELOG.md)

repository: lucatume/wp-browser

repo_name: lucatume/wp-browser


text:
# Using `shouldComponentUpdate()`
 The next method in the Update life cycle is `shouldComponentUpdate()`. This method allows your Component to exit the Update life cycle if there is no reason to apply a new render. Out of the box, the `shouldComponentUpdate()` is a no-op that returns `true`. This means every time we start an Update in a Component, we will re-render.

 If you recall, React does [not deeply compare `props`](https://facebook.github.io/react/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html) by default. When `props` or `state` is updated React assumes we need to re-render the content. But, if the `props` or `state` have not changed, should we really be re-rendering?

## Preventing unnecessary renders
 The `shouldComponentUpdate()` method is the first real life cycle optimization method that we can leverage in React. We can look at our current and new `props` & `state` and make a choice if we should move on. [React's PureRenderMixin](https://facebook.github.io/react/docs/pure-render-mixin.html) does exactly this. It checks the current props and state, compares it to the next props and state and then returns `true` if they are different, or `false` if they are the same.

 ```javascript
/**
 * Performs equality by iterating through keys on an object and returning false
 * when any key has values which are not strictly equal between the arguments.
 * Returns true when the values of all keys are strictly equal.
 */
function shallowEqual(objA: mixed, objB: mixed): boolean {
  if (objA === objB) {
    return true;
  }

  if (typeof objA !== 'object' || objA === null ||
      typeof objB !== 'object' || objB === null) {
    return false;
  }

  var keysA = Object.keys(objA);
  var keysB = Object.keys(objB);

  if (keysA.length !== keysB.length) {
    return false;
  }

  // Test for A's keys different from B.
  var bHasOwnProperty = hasOwnProperty.bind(objB);
  for (var i = 0; i < keysA.length; i++) {
    if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
      return false;
    }
  }

  return true;
}

function shallowCompare(instance, nextProps, nextState) {
  return (
    !shallowEqual(instance.props, nextProps) ||
    !shallowEqual(instance.state, nextState)
  );
}

var ReactComponentWithPureRenderMixin = {
  shouldComponentUpdate: function(nextProps, nextState) {
    return shallowCompare(this, nextProps, nextState);
  },
};
 ```

The above code is extracted from the React addon/source[^1]. The mixin defines the `shouldComponentUpdate(nextProps, nextState)` and compares the instance's `props` against the `nextProp` and the `state` against the `nextState`.

### Mutability and pure methods
 It is important to note that the `shallowCompare` method simply uses `===` to check each instance. This is why the React team calls the mixin *pure*, because it will not properly check against mutable data.

 Let's think back to our `data` props Array example where we use `push()` to add a new piece of data onto the Array.

```javascript
// psuedo code
this.setState({ data: [1, 2, 3] });

<MyComponent data={ this.state.data } />
```

The `shallowCompare` will see the current `props.data` as the same instance as the `nextProps.data` (`props.data === nextProps.data`) and therefore not render an update. Since we mutated the `data` Array, our code is **not** considered to be *pure*.

This is why systems like [Redux](http://redux.js.org/) requires pure methods for reducers. If you need to change nested data you have to clone the objects and make sure a new instance is always returned. This allows for `shallowCompare()` to see the change and update the component.

Other ways to handle this is to use an immutable data system, such as [Immutable.js](https://facebook.github.io/immutable-js/). These data structures prevent developers from accidentally mutating data. By enforcing immutable data structures, we can leverage `shouldComponentUpdate()` and have it verify that our `props` and `state` have changed[^2].

### Stop renders at the source
 If you recall our nested Component structure:

 ![](../birth/react-element-tree.png)

 By default, if an Update is triggered in **A**, then all the other children will also go through their updates. This can easily cause a performance issue, because now we have many Components going through each step of the process.

 By adding logic checks in `shouldComponentUpdate()` at **A** we can prevent all its children from re-rendering. This can improve overall performance significantly. But keep in mind, if you prevent **A** from passing props down to the children you may prevent required renders from occurring.

## Jump ahead with `forceUpdate()`
 Like `componentWillReceiveProps()`, we can skip `shouldComponentUpdate()` by calling `forceUpdate()` in the Component. This sets a flag on the Component when it gets added to the dirty queue. When flagged, `shouldComponentUpdate()` is ignored. Because we are forcing an update we are stating something has changed and the Component *must* re-render.

 Since `forceUpdate()` is a brute force method, it should always be used with caution and careful consideration. You can easily get into an endless render loop if you keep triggering `forceUpdate` over and over. Troubleshooting infinite render loops can be very tricky. So, when reaching for `forceUpdate` keep all this in mind.

***Next Up:*** [Tapping into `componentWillUpdate()`](tapping_into_componentwillupdate.md)

---

[^1] Captured from [React 15.0.1](https://github.com/facebook/react/blob/15-stable/src/addons/shallowCompare.js)

[^2] If you use Immutable.js, there is a [ImmutableRenderMixin library](https://github.com/jurassix/react-immutable-render-mixin) that provides both Object shallow compare and Immutable data comparison.

repository: ayamefing/react-indepth

repo_name: ayamefing/react-indepth


text:
---
title: The Space Object
---

In the content delivery API a space object is mostly used to receive the latest version timestamp to invalidate the cache.

| Property            | Description          |
|---------------------|----------------------|
| `id`                | Numeric id |
| `name`              | Given name  |
| `domain`            | Given domain |
| `version`           | Cache version |
| `language_codes`    | Array of language codes |

;examplearea

Example Object

```json
{
  "space": {
    "id": 123,
    "name": "Storyblok.com",
    "domain": "https://www.storyblok.com/",
    "version":<PHONE_NUMBER>,
    "language_codes": ["de"]
  }
}
```

repository: storyblok/storyblok-docs

gha_language: Vue

repo_name: storyblok/storyblok-docs


text:
---
layout: default
---

# 1995-09-26 - Re: Hack Microsoft?

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: c4d81dfb796ab96d68836eb1f42bbb6cd6339233929bd1347feadb22ad2345d6

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1995-09-26 20:46:55 UTC

Raw Date: Tue, 26 Sep 95 13:46:55 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Tue, 26 Sep 95 13:46:55 PDT
To<EMAIL_ADDRESS>Subject: Re: Hack Microsoft?
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>   Microsoft recently got C2-security status approved for Windows NT by
>the National Computer Security Center, a division of the NSA. They
>are supposed to put systems through "laborious testing and review" before
>they approve C2.

Well yes and no, C2 is not a particularly high security rating. It is also a
fairly obsolete set of requirements. So if anyone is to claim a breach of a C2
system it had better be one within the C2 assurances, not something that is only
covered in the B series criteria. What really matters is the combined criteria
which should have/would have emerged from NIST had the issue of harmonising the
US/Canadian criteria with the European ones turned up.

As a cypherpunks aside we reviewed the orange book criteria in a reading group
here at MIT a few months back. One point that was made was that Orange Book does
not consider cryptographic security systems which was generally considered a
disappointment.

Obviously Windows NT is "fair game" for analysis. Remember however that it is an
established operating system and that there are many people who rely on it. I
think that if people want to go down that route they should start by
establishing a contacts with CERT and Microsoft in order to make sure that
people whose businesses depend on the security of their O/S are not compromised.
You may well find that Microsoft is willing to give you free copies of WNT to do
this type of work on.

I think that this would be a really good project. The more independent analysis
of an operating system that takes place the more confidence people can place in
it. Windows NT is in many ways a descendent of VMS which has a very good
security record. There is no reason why Windows NT should not mature to that
level of security. It was built with security in mind after all, unlike UNIX
sitation security was never more than an afterthought and often merely wishfull
thinking.

 I expect them to
outnumber UNIX very soon. The only thing that is holding it back is the
relatively small size of the userbase compared to windows and the resources
required to run it. WNT requires similar CPU and memory to UNIX which is hardly
suprising since it is doing very much the same thing.

I would suggest however that the project is structured and coordinated in some
fashion. Someone should keep a list of security concerns that have been
addressed and checked. That list should have some structure such as a division
into the main risk categories (Authenticity, confidentiality, Service) so that
people can get a feel for how thoroughly the space is being searched. Later on
that list is likely to be one of the most valuable end results of such a
project.

		Phill

{% endraw %}
```

## Thread

+ Return to [September 1995](/archive/1995/09)
+ Return to [October 1995](/archive/1995/10)

+ Return to<EMAIL_ADDRESS>(Futplex)](/authors/futplex_at_pseudonym_com_futplex_)"
+ Return to "[hallam@w3.org](/authors/hallam_at_w3_org)"
+ Return to "[Ray Cromwell <rjc@clark.net>](/authors/ray_cromwell_rjc_at_clark_net_)"
+ Return to "[Tim Scanlon <tfs@vampire.science.gmu.edu>](/authors/tim_scanlon_tfs_at_vampire_science_gmu_edu_)"

+ 1995-09-26 (Tue, 26 Sep 95 06:10:22 PDT) - [Hack Microsoft?](/archive/1995/09/8b663f4c3dcf81c95aeedb8ed226b15ee8e0906f2c24d7758823c54a625026e6) - _Ray Cromwell<EMAIL_ADDRESS>  + 1995-09-26 (Tue, 26 Sep 95 07:45:11 PDT) - [Re: Hack Microsoft?](/archive/1995/09/0207876c31dd0d123ba204ddb06f52642c5f47f38f28af7ebb178e4cb3e8aed0) - _Tim Scanlon<EMAIL_ADDRESS>  + 1995-09-26 (Tue, 26 Sep 95 13:46:55 PDT) - Re: Hack Microsoft? -<EMAIL_ADDRESS>  + 1995-10-02 (Mon, 2 Oct 95 01:11:28 PDT) - [Re: C2 Evaluation of Win NT (was: Hack Microsoft?)](/archive/1995/10/bff7ec924804662672c548295e68c4d1a53d4508787fcec1cc757984a5207de9) -<EMAIL_ADDRESS>(Futplex)_


text:
### [CVE-2016-5547](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5547)
![](https://img.shields.io/static/v1?label=Product&message=JRockit&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=Java%20SE%20Embedded&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=Java%20SE&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CVSS%3A3.0%2FAV%3AN%2FAC%3AL%2FPR%3AN%2FUI%3AN%2FS%3AU%2FC%3AN%2FI%3AN%2FA%3AL&color=brighgreen)

### Description

Vulnerability in the Java SE, Java SE Embedded, JRockit component of Oracle Java SE (subcomponent: Libraries). Supported versions that are affected are Java SE: 7u121 and 8u112; Java SE Embedded: 8u111; JRockit: R28.3.12. Easily exploitable vulnerability allows unauthenticated attacker with network access via multiple protocols to compromise Java SE, Java SE Embedded, JRockit. Successful attacks of this vulnerability can result in unauthorized ability to cause a partial denial of service (partial DOS) of Java SE, Java SE Embedded, JRockit. Note: Applies to client and server deployment of Java. This vulnerability can be exploited through sandboxed Java Web Start applications and sandboxed Java applets. It can also be exploited by supplying data to APIs in the specified Component without using sandboxed Java Web Start applications or sandboxed Java applets, such as through a web service. CVSS v3.0 Base Score 5.3 (Availability impacts).

### POC

#### Reference
- http://www.oracle.com/technetwork/security-advisory/cpujan2017-2881727.html

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Find a Path through a Grid.

## Problem

Given a square grid find the optimal path from a given start point to a
given destination. The grid may contain obstacles which must be
circumvented.

## Source:

http://courses.csail.mit.edu/iap/interview/Hacking_a_Google_Interview_Practice_Questions_Person_B.pdf

repository: Eventide/learn-rust

repo_name: Eventide/learn-rust


text:
---

title: "A ‘smart’ tube holder enables real-time sample monitoring in a standard lab centrifuge"

date: "2018-04-16"

authors: ['admin']

tags:  ['Research Article', 'None', 'PLOS ONE']

layout: "post"

---

Publishing date: 2018-04-16

Published on: PLOS ONE

summary: In order to measure what happens to samples while being centrifuged, the authors created an adaptor that combines electronics and 3D printed parts
to measure in real time how concentration changes along a tube containing samples, allowing protocol optimization. Additionally the software transmits and records data automatically and is able to turn off the centrifuge once a threshold is reached.

authors: Tony Hoang, Nicholas Moskwa, Ken Halvorsen

link to paper: 10.1371/journal.pone.0195907

Icons made by catkuro from  www.flaticon.com

repository: amchagas/open-source-toolkit

repo_name: amchagas/open-source-toolkit


text:
# External dependencies

This features allows kapitan to fetch files from online repositories/sources during compile and store in a particular target directory.

Author: @yoshi-1224

## Specification

Specify the files to be fetched as follows:

```yaml
parameters:
 kapitan:
  dependencies:
   - type: git | http[s]
     output_path: relative/path/in/target
     source: <git/http[s]_url>
```

Git type may also include `ref` and `subdir` parameters as illustrated below:

```yaml
- type: git
  output_path: relative/path/in/target
  source: <git_url>
  subdir: relative/path/in/repository
  ref: <commit_hash/branch/tag>
```

Downloaded files will be cached. For fresh fetch of the dependencies, users may add `--fetch` option as follows:

```bash
$ kapitan compile --fetch
```

Users can also add the `always_fetch: true` option to the `kapitan.compile` in the inventory in order to force fresh fetch of the dependencies every time.

## Implementation details

### Dependencies

- [GitPython](https://github.com/gitpython-developers/GitPython) module (and git executable) for git type
- requests module for http[s]
- (optional) [tqdm](https://github.com/tqdm/tqdm) for reporting download progress


text:
# Go Exception Handling

`Gobrake` is a powerful, custom-built package that provides robust error tracking and automatic, instantaneous exception reporting capabilities to all your Go language applications.  `Gobrake` is both flexible and sturdy, ensuring that it is both easy to integrate into every project and also strong enough to handle heavy exception workloads for even the largest apps.  After a brief setup that takes less than 3 minutes, `Gobrake` will be tightly woven into your application code, guaranteeing that all errors are tracked and reported to you and your team, no matter when or where those errors occurred.  With tight integration into the `Airbrake` service, `Gobrake` can notify your team in a variety of ways including through email, the `Airbrake` web dashboard, and even via the many third-party service integrations `Airbrake` supports.  Best of all, since `Gobrake` reports errors instantly and automatically, there's never any need for inelegant error reports or awkward user-intervention.

Take a look at some of the great features `Gobrake` has to offer and see why `Airbrake` is a leader at providing better, faster, and stronger error handling tools for Go apps worldwide!

  Every exception your application encounters is captured by `Gobrake` and is securely packaged up before being sent along to the `Airbrake` service.  Upon receiving an error report, `Airbrake` immediately notifies you and your team of the issue via email, the `Airbrake` dashboard, and (optionally) through any of the third-party service integrations you may have configured.  Plus, `Gobrake` provides a simple [integration library](https://github.com/airbrake/glog) for the popular `glog` logging package, ensuring that all logged errors are immediately reported to you via `Airbrake`.

Moreover, `Gobrake` error reports are packed with useful contextual data about each exception that occurs, yet with the simple `Gobrake` API you can go well beyond the defaults and add your own custom metadata to each record, _before_ it is sent to `Airbrake`.  Additionally, all error metadata is automatically displayed on the `Airbrake` dashboard, where it is easily searchable and filterable to ensure you find the exact exception you care about most at any given moment.

Take a peek below at just a few of the amazing features `Gobrake` has to offer, or head over to the [documentation](https://github.com/airbrake/gobrake) for all the details and find out how you and your team can begin revolutionizing your Go exception handling practices today!

### Unlimited Custom Parameters

By default, `Gobrake` error reports include an abundance of useful metadata about each particular exception including the error message, backtrace, remote origin, severity, time stamps, and much more.  However, in many cases you and your team may have specific business logic that requires that additional, application-specific metadata be associated with each error record.  In such cases, `Gobrake` has your back with the ability to easily add extra contextual data to error record before they are packaged up and securely sent to the `Airbrake` dashboard for reporting.  In fact, since you're able to add extra context _directly within your Go code_, there's virtually no limit on the number of fields or types of data you can cram in there!

Check out the [documentation](https://github.com/airbrake/gobrake#setting-severity) for all the details on modifying contextual parameters inside your `Gobrake` error reports.

### Simple Glog Integration

Having direct control over when and where in your code you create error notifications with `Gobrake` is useful, but many Go applications also rely on a more robust logging package such as `glog`.  Thankfully, `Gobrake` makes it easy to quickly integrate with `glog's` logging functionality so that any errors that `glog` handles will also be instantly and automatically reported to `Airbrake` via the `Gobrake` library.

Take a look at the full `Airbrake-glog` [documentation](https://github.com/airbrake/glog) for more information on how you can easily add `Gobrake` to your standard `glog` logging functionality.

### Powerful Error Filtering

The `Gobrake` API provides the easy-to-use yet robust `AddFilter` method, which allows you to perform any kind of logical checks you can dream of against every error notification record your application produces -- _before_ it is sent along to `Airbrake` and you're alerted of the issue.  With just a few lines of code you can ensure that only the particular types of errors you care about most are actually reported to you via `Gobrake`.

Check out the [documentation](https://github.com/airbrake/gobrake#ignoring-notices) for all the details on ignoring error notices with `Gobrake`.

## Quick Setup

1. To begin using `Gobrake` start by [Creating an Airbrake account](https://airbrake.io/account/new), signing in, and making a new project.
2. Install the `Gobrake` package using the `go get` command from your terminal:

```bash
$ go get github.com/airbrake/gobrake
```

3. Add the `Gobrake` source path and the `errors` package to `import`:

```go
import (
    "errors"

    "github.com/airbrake/gobrake"
)
```

4. Add some variables to hold the appropriate `Project ID` and `Project API Key` values, both of which are found on the right-hand side of the `Project Settings` page of the `Airbrake` dashboard:

```go
var projectID int64 = 12345
var projectAPIKey = "PROJECT_API_KEY"
```

5. Create a `NewNotifier` instance from `Gobrake` and pass in the appropriate `Project ID` and `Project API Key` variables.

```go
// Create notifier instance with Project ID and Project API Keys
var notifier = gobrake.NewNotifier(projectID, projectAPIKey)
```

### Direct Error Reporting

To directly report errors using `Gobrake` simply call the `Notify` method of the notifier instance you created and pass in an error object argument:

```go
func main() {
    // Always close notifier
    defer notifier.Close()
    // Always notify on panic
    defer notifier.NotifyOnPanic()

    // Create a new error and send via notifier
    notifier.Notify(errors.New("oh oh, something broke"), nil)
}
```

That's all there is to it!  `Gobrake` will now instantly and automatically report errors from your Go application to `Airbrake`.

### Glog Error Reporting

If you're using [`glog`](https://github.com/golang/glog) for your application logging `Gobrake` provides an integration package that makes it easy to work with `glog`.

1. Install the `Airbrake-glog` package using the `go get` command from your terminal:

```bash
$ go get github.com/airbrake/glog
```

2. Add `Airbrake-glog` to your `import`:

```go
import (
    "errors"

    "github.com/airbrake/glog"
    "github.com/airbrake/gobrake"
)
```

3. Create a new notifier with the `Project ID` and `Project API Key` as before and then assign that instance to `glog.Gobrake`:

```go
var projectID int64 = 12345
var projectAPIKey = "PROJECT_API_KEY"

// Create notifier instance with Project ID and Project API Keys
var notifier = gobrake.NewNotifier(projectID, projectAPIKey)

func main() {
    // Always close notifier
    defer notifier.Close()
    // Always notify on panic
    defer notifier.NotifyOnPanic()

    // Set glog instance
    glog.Gobrake = notifier

    // Create a new error and log it with glog
    glog.Errorf("Error logged: %s", errors.New("uh oh, something broke"))
}
```

4. You're all set!  By default this will send all `error` log entries to `Airbrake`, though you can easily change the `severity` threshold if needed (check out the full [documentation](https://github.com/airbrake/glog) for more details.)

### Adding Filters

`Gobrake` also makes it simple to add filters to your `Notifiers`.  In this example we're adding some contextual data to each notice:

```go
func init() {
    notifier := gobrake.NewNotifier(projectID, projectAPIKey)
    // Create a filter that executes over every error notice
    notifier.AddFilter(func(notice *gobrake.Notice) *gobrake.Notice {
        // Set the contextual 'environment' field to 'development'
        notice.Context["environment"] = "development"
        // When a notice is returned, it is reported to Airbrake
        return notice
    })
}
```

Here we're using a filter to _ignore_ errors where the `environment` value is equal to `development`:

```go
func init() {
    notifier := gobrake.NewNotifier(projectID, projectAPIKey)
    // Create a filter that executes over every error notice
    notifier.AddFilter(func(notice *gobrake.Notice) *gobrake.Notice {
        // Check if 'environment' field is set to 'development'
        if notice.Context["environment"] == "development" {
            // Ignore this notice
            return nil
        }
        // All other notices are reported as normal
        return notice
    })
}
```

path: /Copy/Language Page Rewrites/Go/text.md

gha_language: JavaScript


text:
# Offline geocode

Geocode addresses to locations and reverse geocode locations to addresses offline.

![Image of offline geocode](offline-geocode.png)

## Use case

You can use an address locator file to geocode addresses and locations. For example, you could provide offline geocoding capabilities to field workers repairing critical infrastructure in a disaster when network availability is limited.

## How to use the sample

Select an address from the drop-down list to `Geocode` the address and view the result on the map. Tap the location you want to reverse geocode. Select the pin to highlight the `PictureMarkerSymbol` (i.e. single tap on the pin) and then tap-hold and drag on the map to get real-time geocoding.

## How it works

1. Use the path of a .loc file to create a `LocatorTask` object.
2. Set up `GeocodeParameters` and call `GeocodeAsync` to get geocode results.

## Relevant API

* GeocodeParameters
* GeocodeResult
* LocatorTask
* ReverseGeocodeParameters

## Offline Data

1. Download the data [San Diego Streets Tile Package](http://www.arcgis.com/home/item.html?id=22c3083d4fa74e3e9b25adfc9f8c0496) and [San Diego Offline Locator](https://www.arcgis.com/home/item.html?id=3424d442ebe54f3cbf34462382d3aebe) from ArcGIS Online.
2. Extract the contents of the downloaded zip file to disk.
3. Open your command prompt and navigate to the folder where you extracted the contents of the data from step 1.
4. Push the data into the scoped storage of the sample app:
 	* `adb push streetmap_SD.tpkx /Android/data/com.esri.arcgisruntime.sample.offlinegeocode/files/streetmap_SD.tpkx`
	* `adb push san-diego-eagle-locator/. /Android/data/com.esri.arcgisruntime.sample.offlinegeocode/files`

## Tags

geocode, geocoder, locator, offline, package, query, search


text:
## Activity Diagrams version 1 (v1)
**_Activity Diagrams v1_** is our initial approach of **_Activity Diagrams_** for the Project.

## Activity Diagrams version 1 (v1) includes:
- [x] Activity_Diagram_v1.vpd
- [x] Activity_Diagram_v1_Secretary.jpg
- [x] Activity_Diagram_v1_Student.jpg
- [x] Activity_Diagram_v1_Teacher.jpg

## Activity Diagrams
**_Activity Diagram_** is another important behavioral diagram in UML diagram to describe dynamic aspects of the system.
**_Activity Diagram_** is essentially an advanced version of flow chart that modeling the flow from one _activity_ to another activity.

path: /UML Diagrams/Activity Diagrams/Activity Diagrams v1/README.md


text:
---
title: Lesson 7
author: Dan Hahn
date: 2013-11-04 18:00
template: single.jade
---

#animation-duration

The animation-duration CSS property specifies the length of time that an animation should take to complete one cycle.

A value of 0s, which is the default value, indicates that no animation should occur.

It is often convenient to use the shorthand property animation to set all animation properties at once.

Prop|Value
---|---
Initial| value0s
Applies to| all elements, ::before and ::afterpseudo-elements
Inherited |no
Media|visual
Computed value| as specified
Animatable| no
Canonical order| the unique non-ambiguous order defined by the formal grammar

##Syntax

	Formal syntax: <time>#
	animation-duration: 6s
	animation-duration: 120ms
	animation-duration: 1s, 15s
	animation-duration: 10s, 30s, 230ms

##Values

Prop|Value
---|---
`<time>`|The duration that an animation should take to complete one cycle. This may be specified in either seconds (by specifying s as the unit) or milliseconds (by specifying ms as the unit). If you don't specify a unit, the declaration will be invalid.

**Note:** Negative values are invalid, causing the declaration to be ignored. Note that some early, prefixed, implementations may consider them as identical to 0s.

##Examples

See CSS animations for examples.

repository: danhahn/html-css-class

repo_name: danhahn/html-css-class


text:
# Braambes #

Braambes is a push-enabled, reactive web application accessing and controlling low-level I/O on Raspberry Pi and (hopefully) similar boards like BeagleBoard. It has an interactive client based on [AngularJS](http://angularjs.org) and a scalable and resilient RESTful server written in [Scala](http://www.scala-lang.org), [Akka](http://akka.io) and [Spray](http://spray.io). It is based on (and forked from) [Gabbler](http://github.com/hseeberger/gabbler) and uses the more low-level [Framboos](http://github.com/jkransen/framboos) GPIO/UART library.

## Running Braambes ##

As its dependency Framboos is not yet released, you first need to download and install it from [Github](http://github.com/jkransen/framboos).

If, like me, you are developing from Scala IDE, you may want to run `sbt eclipse` to turn your repo into an Eclipse project you can import.

This is the script that I run to install and deploy the code to my Raspberry Pi:

```
rm -rf ~/.ivy2/cache/framboos/framboos/
cd ../framboos
mvn install
cd -
sbt assembly && rsync -av target/scala-2.10/braambes.jar pi@pi:
```

Open a browser and point it to [pi:8080/](http://pi:8080/). Use the same value for username and password, e.g. "John" and "John".

## License ##

This code is open source software licensed under the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html").

repository: jkransen/braambes

repo_name: jkransen/braambes


text:
# Commanded.Middleware.Uniqueness

A [Commanded](https://github.com/commanded/commanded) [middleware](https://hexdocs.pm/commanded/commands.html#middleware) for checking certain values uniqueness during commands dispatch. Might be useful as a short-term unique values cache before subsequent events persisted and projected.

Based on the [Ben Smith](https://github.com/slashdotdash)'s idea described in his "Building Conduit" [book](https://leanpub.com/buildingconduit).

[Please check the latest published CommandedMiddlewareUniqueness release documentation on Hex](https://hexdocs.pm/commanded_uniqueness_middleware/).

## Installation

Add `commanded_uniqueness_middleware` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:commanded_uniqueness_middleware, "~> 0.7.0"}
  ]
end
```

## Configuration

Define options in config/config.exs as:

```elixir
  config :commanded_uniqueness_middleware,
    adapter: Commanded.Middleware.Uniqueness.Adapter.Cachex,
    # ttl: 60 minutes in seconds
    ttl: 60 * 60,
    use_command_as_partition: false
```

or

```elixir
  config :commanded_uniqueness_middleware,
    adapter: Commanded.Middleware.Uniqueness.Adapter.Nebulex,
    nebulex_cache: YourApp.Nebulex.Uniqueness.Cache,
    # ttl: 60 minutes in seconds
    ttl: 60 * 60,
    use_command_as_partition: false
```

where:
  - `:adapter` is an Uniqueness adapter implemented `Commanded.Middleware.Uniqueness.Adapter` behavior,
  - `:nebulex_cache` is a module with Nebulex.Cache behaviour implemented in your application,
  - `:ttl` is claimed value time-to-live,
  - `:use_command_as_partition` should be set to true to use each command module name as partition. Use with  caution! If neither this nor Unique protocol `:partition` option defined then `Commanded.Middleware.Uniqueness` value used as a partition name.

## Adapters
Two adapters currently exist:
- Based on Cachex `Commanded.Middleware.Uniqueness.Adapter.Cachex`
- Based on Nebula `Commanded.Middleware.Uniqueness.Adapter.Nebulex`

Any adapter implementing `Commanded.Middleware.Uniqueness.Adapter` behavior can be used.

### Nebulex
Nebulex adapter requires a custom Nebulex cache module. Please create it inside your application like:

```elixir
  mix nbx.gen.cache -c YourApp.Nebulex.Uniqueness.Cache
```

You can configure Nebulex caching strategy in the your application config and/or in the cache module itself.
For details please check [Nebulex documentation](https://hexdocs.pm/nebulex/getting-started.html#adding-nebulex-to-an-application)

## Usage
Imagine you have an aggregate with a unique field value requirement, for example, it might be a `:username` field. You've got a new user and issue a `RegisterUser` command with `SomeCoolUsername` `:name` field value. The command successfully went through all checks and spawned a UserRegistered event but this event hasn't been projected yet. At this very moment an another user wants to register with the same name, and as the previous event isn't projected you have no information that this user name
has been taken.

You can use `Commanded.Middleware.Uniqueness` to ensure that your system will not get into a conflict state in between two commands.

It utilizes [`Elixir Protocol`](https://hexdocs.pm/elixir/Protocol.html).

You need to put
```elixir
middleware Commanded.Middleware.Uniqueness
```
into your Commanded Router as described in [Commanded docs](https://hexdocs.pm/commanded/commands.html#middleware).

Then you need to define a `Commanded.Middleware.Uniqueness.UniqueFields` implementation for the specific command:

```elixir
defmodule MyApp.RegisterUser do
  defstruct [
    :id,
    :name,
    :email
  ]
end

defimpl Commanded.Middleware.Uniqueness.UniqueFields, for: MyApp.RegisterUser do
  def unique(%MyApp.RegisterUser{id: id}),
    do: [
      {:name, "has already been taken", id, ignore_case: true, is_unique: &is_taken_externally?/4}
    ]

  def is_taken_externally?(_field, value, _owner, _opts), do: !String.starts_with?(value, "ExternallyTaken")
end
```

At the first command dispatch the Uniqueness Middleware checks the `:name` field key - value pair is
free and claims it for the given owner id.

If you need to release previously claimed value with existing TTL you should use `release/4`, `release_by_owner/3` or `release_by_value/3` adapter methods:

```elixir
defmodule MyApp.UserNameCacheHandler do
  use Commanded.Event.Handler,
    application: MyApp.App,
    name: "UserNameCacheHandler"

  alias MyApp.UserDeleted

  def handle(%UserDeleted{id: id}, _metadata) do
    :ok = Commanded.Middleware.Uniqueness.release_by_owner(:name, id)
    end
  end
end
```

To get to know behavior you can check modules documentation and tests (especially commands described in `test/support`).

gha_language: Elixir


text:
# Songhay.Mvvm

Shared Model, View, View-Model definitions for [Prism 6.0](https://github.com/PrismLibrary) over [Unity](https://github.com/unitycontainer/unity), published as [a NuGet package](https://www.nuget.org/packages/Songhay.Mvvm/), supporting `net4.61` (so you can share cross-platform libraries under .NET Standard 1.4)…

**NuGet package:** [`Songhay.Mvvm`](https://www.nuget.org/packages/Songhay.Mvvm/)

## Extensions

This package contains [extension methods](https://github.com/BryanWilhite/Songhay.Mvvm/tree/master/Songhay.Mvvm/Extensions) for Prism definitions, including `IModule` and `BindableBase`.

## Fonts

This package contains the [Segoe UI](https://www.microsoft.com/typography/fonts/family.aspx?FID=331) font from Microsoft as a Resource. (I have not reviewed the Microsoft typography [Font Redistribution FAQ](https://www.microsoft.com/typography/RedistributionFAQ.mspx).)

## Models

This package defines models for conventional Prism Events, etc. There’s a [conventional `EventPayload` class](https://github.com/BryanWilhite/Songhay.Mvvm/blob/master/Songhay.Mvvm/Models/EventPayload.cs) with a `Tag` property that can be used to filter/route in subscriber handlers.

## Resources

The XAML resource dictionaries embedded in this package are basically for my company [Songhay System](http://songhaysystem.com) and should be ignored.

## Value Converters

This package contains [a collection of XAML value converters](https://github.com/BryanWilhite/Songhay.Mvvm/tree/master/Songhay.Mvvm/ValueConverters) that emerged out of my needs as a consultant for almost two decades.

## View Models

The [reusable View models](https://github.com/BryanWilhite/Songhay.Mvvm/tree/master/Songhay.Mvvm/ViewModels) in this package include `BindableBaseWithValidation` and `RegionNavigationViewModel`.

## Utilities

There are some WPF App utilities, such as [`FrameworkDispatcherUtility`](https://github.com/BryanWilhite/Songhay.Mvvm/blob/master/Songhay.Mvvm/FrameworkDispatcherUtility.cs) that defines how to check the current thread and allow components to be unit-tested outside of WPF.


text:
---
title: "Added IIS FastCGI configuration to installer"
date: "2007-09-28"
categories: [old, php]
---

After reading Joe Stanger's [post](http://blogs.msdn.com/joestagner/archive/2007/09/27/fastcgi-for-iis-goes-live.aspx) on the Go Live release of the Microsoft FastCGI Extension, I've added support in the installer for the now in CVS. This should help those on deploying via IIS as it is much better option than CGI ( or ISAPI \*shudder\* ), and the installer will provide automatic configuration of IIS for you.


text:
Given a certain number of rows, process a pyramid made of asterisks with the following pattern (example for 3 rows):

```
*
***
*****
```

repository: ferferga/WebTests

path: /PHP/Asterisks Pyramid/README.md

repo_name: ferferga/WebTests


text:
# Quadmath.jl

[![Travis Build Status](https://travis-ci.org/simonbyrne/Quadmath.jl.svg?branch=master)](https://travis-ci.org/simonbyrne/Quadmath.jl)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/wx46vbwmu2ey5qkj?svg=true)](https://ci.appveyor.com/project/simonbyrne/quadmath-jl)

This is a Julia interface to libquadmath, providing a `Float128` type corresponding to the IEEE754 binary128 floating point format.

## Support

Quadmath currently works on x86_64 Linux and macOS.

- It may require a new-ish version of gcc which supports `__float128` type.
- It has not been tested on 32 bit Linux.
- I have not had any luck getting it to work on Windows. It's probably something to do with the calling convention: if someone figures it out I would be very grateful.
- It does not work on ARM due to the lack of libquadmath support for that platform.

## Installation
```julia
Pkg.clone("https://github.com/simonbyrne/Quadmath.jl")
```

## Acknowledgements

Thank you to Harald Hofstätter, who provided the first iteration of [Quadmath.jl](https://github.com/HaraldHofstaetter/Quadmath.jl).

gha_language: Julia


text:
Kong - Request Throttling Plugin
==============================

A [Kong](https://github.com/Kong/kong) plugin to do request throttling using the [Token Bucket](https://en.wikipedia.org/wiki/Token_bucket) algorithm. The plugin's goal is to send requests to the upstream at a fixed rate (defined by the user), thus avoiding large request bursts from compromising the service. It does so by applying delays to requests on nginx side (sleep) before being dispatched to the upstream.

As of now, this plugin is a proof of concept and not ready for production. Use it at your own discretion :). Please note that this approach will certainly not work well when Kong has to manage a lot of concurrent users (this can lead to thousands of open connections) or when the delays applied are huge (clients or intermediate proxies may drop the connections before the requests are served).

[Requirements](#requirements) |
[Installation](#installation) |
[Configuration](#configuration) |
[Author](#author) |
[Contributing](#contributing) |
[Acknowledgements](#acknowledgements) |
[License](#license)

## Requirements

* [Kong](https://konghq.com/) (>=1.0): if you want to install this plugin on Kong >=0.12.x, please use the [0.1.0 version](https://github.com/millenc/kong-plugin-request-throttling/releases/tag/0.1.0).
* [Redis](https://redis.io/) (>=4.0)

## Installation

Please see the [official documentation](https://docs.konghq.com/1.3.x/plugin-development/distribution/) on how to install a plugin manually (Luarock not yet supported).

## Configuration

Here's a list of all the parameters which can be used to configure this plugin:

| Form Parameter               | Default       | Description                                                                                |
| -------------                | ------------- | -------------------                                                                                |
| `name`                       |               | The name of the plugin to use, in this case `request-throttling`                                                                                |
| `consumer_id`                |               | The id of the Consumer which this plugin will target.                                                                                |
| `config.interval`            |               | This parameter determines the rate (ms) at which tokens will be generated (`config.burst_refresh` tokens every `config.interval` ms). Required.     |
| `config.max_wait_time`       | `60000`       | The maximum time (ms) a request will wait to be served (applied delay).                                                                              |
| `config.burst_size`          | `1`           | The maximum number of requests per burst (token bucket capacity). If set to 1, only one request per `config.interval` will hit the upstream server. |
| `config.burst_refresh`       | `1`           | The number of tokens added to the bucket every `config.interval`.                                                                                |
| `config.limit_by`            | `consumer`    | Limit requests by `consumer`, `credential` or `ip`.                                                                                |
| `config.fault_tolerant`      | `true`        | Do not fail if there's an error                                                                                |
| `config.hide_client_headers` | `false`       | Do not return headers like `X-Throttling-Delay` to the user                                                                                |
| `config.redis_host`          | `localhost`   | Address of the Redis server used to keep track of request times.                                                                                |
| `config.redis_port`          | `6379`        | Port used by Redis.                                                                                |
| `config.redis_password`      |               | Password to use when the Redis server requires authentication (optional)                                                                            |
| `config.redis_timeout`       | `2000`        | Redis connection timeout (ms)                                                                                |
| `config.redis_database`      | `0`           | Redis database                                                                                |

For example, suppose we have a service that can only handle 1 request every 5 seconds before overloading. We could configure this plugin with the following parameters:

* `config.interval = 5000`
* `config.burst_size = 1`
* `config.burst_refresh = 1`
* `config.max_wait_time = 10000`

With this configuration, we have a bucket of capacity `1` (`config.burst_size = 1`), where `1` new token is generated (`config.burst_refresh = 1`) every `5000` milliseconds (`config.interval = 5000`). This means that, if we send 4 requests at `t=0ms`, the plugin will:

* Send the first request inmediately to the upstream (no throttling applied). This consumes the only token available in the bucket.
* Make the second request wait for 5 seconds and send it to the upstream at `t=5000ms`. When the request arrives there are no tokens available (it's been consumed by the first request) and it must wait until a new one is generated (after `5000`ms).
* Make the third request wait for 10 seconds and send it to the upstream at `t=10000ms`. When the request arrives there are no tokens available. The only one available in the bucket was consumed by the first request and the next one is "reserved" by the second request (it will be generated and consumed at `t=5000ms`), so the request must wait until the next token is generated, after `10000`ms (`5000`ms to generate the token reserved by the second request and another `5000`ms to generate the one needed by this request).
* Drop the fourth request (with `429 - Too Many Requests` HTTP code), since its wait time (`15000`ms) would be higher than the allowed maximum (`config.max_wait_time = 10000`).

## Authors

* **Mikel Pintor** <https://github.com/millenc>
* **Alberto Cuesta** <https://github.com/albertocr>

## Contributing

All contributions are welcome! Please fork the repo, work on a named branch (with a descriptive name if possible) and create a pull request explaining the change or improvement you attempt to make.

## Acknowledgements

Thanks to [@aitormendivil](https://github.com/aitormendivil) and [@albertocr](https://github.com/albertocr) for their comments, insights and ideas!

## License

This project is under the [MIT license](https://github.com/millenc/kong-plugin-request-throttling/blob/master/LICENSE).

repository: millenc/kong-plugin-request-throttling

gha_language: Lua

repo_name: millenc/kong-plugin-request-throttling


text:
# Documentation

The documentation is compiled using SPHINX.

## Usage
The compiled docs can be found in `docs/build/html`, and can be opened by opening `index.html` in a browser.

## Recompile Docs

To recompile the docs run:
```
make install
make docs
```

repository: ViktorStagge/CompressiveTransformer

repo_name: ViktorStagge/CompressiveTransformer


text:
# MetaMoneyMarket

_An open source ethereum protocol that sits on top of multiple money markets, depositing funds into the highest rate, and rebalancing when it makes sense, to help you earn max interest_

[![CircleCI](https://circleci.com/gh/primeradiant/MetaMoneyMarket/tree/master.svg?style=svg)](https://circleci.com/gh/primeradiant/MetaMoneyMarket/tree/master) [![Netlify Status](https://api.netlify.com/api/v1/badges/36540c07-b05d-475b-a945-2924650c0318/deploy-status)](https://app.netlify.com/sites/cocky-clarke-f760cb/deploys)

## Setup

Clone the repository and install its dependencies:

```
git clone git@github.com:primeradiant/metamoneymarket.git
cd metamoneymarket
yarn
```

Then create a `.env` file. You can copy the `.env.example` file and replace the
example values with proper ones. The environment variables are:

- `REACT_APP_NOMICS_API_KEY`: An API key for [Nomics](https://nomics.com)
- `REACT_APP_RPC_URL`: A RPC URL that will be used to show some information
  until the user connects its wallet.

### Test locally

Start a ganache instance with network id 50:

```
ganache-cli -d -i 50
```

Then in another terminal deploy the contracts:

```
yarn deploy:local
```

and then start the app:

```
yarn start
```

Connect MetaMask to `localhost:8545` and import the first account from ganache.

### Test in Rinkeby/Kovan

Using the private key for an account with Rinkeby ether and a URL for a Rinkeby
RPC endpoint, deploy the contracts:

```
RINKEBY_PRIVATE_KEY=abcdef... RINKEBY_RPC_URL=https://rinkeby.infura.io/... yarn deploy:rinkeby
```

Then start the app and connect MetaMask to Rinkeby:

```
yarn start
```

To deploy in kovan, follow the same steps but replacing everything for "Kovan"
(`KOVAN_PRIVATE_KEY`, `KOVAN_RPC_URL`, `yarn deploy:kovan`, etc.)

### Deploy in Mainnet

Using the private key for an account with Mainnet ether and a URL for a Mainnet
RPC endpoint, deploy the contracts:

```
MAINNET_PRIVATE_KEY=abcdef... MAINNET_RPC_URL=https://mainnet.infura.io/... yarn deploy:mainnet
```

Then start the app and connect MetaMask to the Mainnet:

```
yarn start
```

### Adding new tokens

The `blockchain/migrations/2_deploy_meta_money_market.js` file has some
configuration objects that specify the tokens that will be supported by the
deployed `MetaMoneyMarket` contract. To add new supported tokens at deploy time,
modify the `tokens` property of the corresponding object. For example, for
adding support for USDC when deploying in the mainnet, you should modify the
`mainnetConfig.tokens` array, adding this object:

```
{
  name: 'usdc',
  tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
  cTokenAddress: '0x39aa39c021dfbae8fac545936693ac917d5e7563',
  marketId: 2
}
```

`name` is only used for logging. `tokenAddress` is the address of the
token. `cTokenAddress` is the cUSDC token in the Compound protocol.
`marketId` is the market id for USDC in the dYdX protocol.

## The MetaMoneyMarket contract

The code for the `MetaMoneyMarket` (MMM) contract can be found in
`blockchain/contracts/MetaMoneyMarket.sol`.

Initially, the MMM doesn't support any tokens. Anybody can add support for any
ERC20 token by using the `addMarket(address)` method. This method will enable
that token and it will mint a new token that represents shares in the total
deposited amount for that token.

![Adding a market](images/add-market.png)

When a user deposits tokens, some amount of those token shares will be minted
for them. The tokens will then be deposited in the best underlying market.

![Depositing](images/deposit.png)

If later a user burns some of those token shares, it will receive an amount of
tokens according to the exchange rate at that moment. These tokens will be taken
from the market with the lowest rate. If that market doesn't have enough tokens,
the next lowest market will be used, and so on.

![Withdrawing](images/withdraw.png)

repository: mirshko/MetaMoneyMarket

repo_name: mirshko/MetaMoneyMarket


text:
> **Principle:**a fundamental truth or proposition that serves as the foundation for a system of belief or behaviour or for a chain of reasoning.

*Notes:*

**Avoid needless overrides**

- The best CSS override is one that doesn't need to happen in the first place!
- Overrides should not be used for variation or reusability (there are better alternatives).

*Example of needless override vs avoided override?*

**Rules govern overrides**

- Pre-defined rules determine when an override is allowed.
- An override can only happen in certain circumstances.
- Any override that violates a rule is not allowed.

**Overrides must be controlled**

- All overrides must operate within a regulated system.
- The system abides to the rules & must provide a mechanism to override.
- Any override operating outside the system is not allowed.

**One way to override styles**

- There must be one way in which a style can be overriden.
- With mono an override is expressed using a [modifier]().
- When a style is overriden using a modifier we can pinpoint exactly where & why it happened.
- Compared to regular CSS, where overrides inconspicuously happen all over the place.

**CSS should be easy to understand**

- It should be easy to understand CSS.
- Property usage should not be ambiguous - it should be easy to justify why a style exists.
- Property values should not use magic numbers - it should be easy to identify the reasoning behind a value.

---
# Key principles

Mono has five key principles:

### Avoid needless overrides

The best CSS override is one that doesn't happen in the first place! Overrides should not be the goto solution for achieving variation or reusability. Despite being the [default architecture of CSS]() there are better alternatives to overriding styles.

### Rules govern overrides

There are certain circumstances in which overrides cannot be avoided - however this doesn't mean we can ignore the first principle.

Instead we must identify all possible use cases in which an override is required, and then establish the laws & conditions in which an override is allowed to happen.

Limiting the circumstances in which styles can be overriden helps reduce needless overrides, whilst providing a framework to work with. Mono uses a type system to keep overrides in check - an override that violates a rule is not permitted.

### Overrides must be controlled

Overrides must operate within a controlled & regulated system.

The system must provide a mechanism to override whilst enforcing the rules that govern overrides.

An override operating outside the system is not allowed.

### One way to override styles

There must only be one way to override a style.

A single implementation guarantees consistency and clarity. With mono an override is expressed using a [modifier](). A modifier is the only way to override a style.

When a style is overriden (using modifiers) we can pinpoint exactly where & why the override happened. This is a stark contrast to regular CSS - where overrides are inconspicuously scattered accross different parts of code.

### CSS should be easy to understand

It should be easy to understand & predict the behaviour of CSS.

It should be easy to articulate & identify what styles do, why they are used, & what role they play in our code. Mono uses [motives]() that empower CSS to communicate its purpose.

This reduces ambiguity & obscurity which means developers are less likely to break things since changes are more predictable.

repository: callum-hart/mono

repo_name: callum-hart/mono