text:
# CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes

> Yuhong Li, Xiaofan Zhang, Deming Chen

### Overview:

- **Structure**: A front-end CNN used for feature extraction, and _dilated convolution_ used to deliver larger reception fields and to replace polling operations.
- Improvement:
  1. Large receptive fields.
  2. Without losing resolutions.
  3. Easy to extend to similar work, such as vehicle counting.

### Some basic concepts:

0. PSNR and SSIM are both a way to evaluate the quality of image restoration.

1. **PSNR** -- "Peak Signal-to-Noise Ratio":

   + Formula: ![PSNR](https://latex.codecogs.com/gif.latex?PSNR=10log_{10}{\frac{(2^{bits}-1)^2}{MSE}})
   + May not be corresponding to the feeling of human eyes.

2. **SSIM** -- "Structural Similarity in Image".

   + Formula: ![SSIM](https://latex.codecogs.com/gif.latex?SSIM(x,y)=\frac{(2\mu_x\mu_y+C_1)(2\sigma_x\sigma_y+C_2)}{(\mu_x^2+\mu_y^2+C_1)(\sigma_x^2+\sigma_y^2+C_2)}),

     where ![\mu_x](https://latex.codecogs.com/gif.latex?\mu_x=\sum_{i=1}^{N}{\omega_{i}x_{i}), ![\sigma_x](https://latex.codecogs.com/gif.latex?{\sigma_{x}=\sum_{i=1}^{N}{\omega_{i}(x_{i}-\mu_{x})^2}}^{\frac{1}{2}}), ![\sigma_xy](https://latex.codecogs.com/gif.latex?\sum_{i=1}^{N}{\omega_{i}(x_i-\mu_x)(y_i-\mu_y))

   + When used in a local area, the effect is better than that when used in global area.

![](https://latex.codecogs.com/gif.latex?)

### Key points:

+ Multi-column architecture doesn't work as it was expected -- as the experiment shows, different branches seem to learn nearly identical features:

![exp_on_MCNN](images/exp_on_MCNN.png)

	Besides, this kind of architecture is hard to train.

+ Dilated convolution -- convolution with sparse kernels, a good alternative of pooling layer. In my personal view, it's just very similar to the function of image pyramid(upsampling the image versus downsampling the kernel).

![dilated_conv](images/dilated_conv.png)

+ Data argumentation here:

  	9 * 2 = 18: do the mirror operation on 4 quarters and 5 patches randomly cropped from the input image.

### Conclusion:

+ **Remain**:
  1. Geometry-adaptive kernels, though fixed kernels with different sigma are used on several datasets.
+ **Improvement**:
  1. One channel, no branch.
  2. Dilated convolution.
  3. Data augmentation.
  4. Extending the work into other similar tasks such as vehicle counting.

### Inspiration:

1.  The kernel used for generating density maps are not fixed, so the _geometry-adaptive kernel_ proposed in MCNN maybe not the final solution.
2. The progress of relative fields do have contribution to crowd counting, such as the dilated convolution in CSRNet, which is actually a quite simple structure.


text:
# Security

If you find a security vulnerability in EWEA, file a [new issue](https://github.com/CodeTanzania/ewea-api-states/issues).

license: MIT

repository: CodeTanzania/ewea-api-states

branch_name: refs/heads/develop

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: CodeTanzania/ewea-api-states


text:
# NOM Pantry

A dynamic MVP recipe recommendation application based on user's available ingredient inputs.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

Git clone the following URL to a folder: https://github.com/bbyee/mvp2.git

### Installing

Once the file has been cloned to a local folder, cd into the folder and npm install.

If you want to be able to make use of the api please go to spoonacular.com make an account. Then, retrieve the API key and replace the current inactive API key in api.js. Otherwise, comment out the APIkey import and relevant variables inside of Form.jsx, and RecipeEntry.jsx

If you have nodemon in your environment you can run the following npm scripts to launch the program:

npm run react-dev
npm run server-dev

otherwise:

npm run react-dev
node server/index.js

## Deployment

To deploy this application with an AWS EC2 instance:

1. Go to https://aws.amazon.com/

2. Launch a new EC2 instance
* For AMI, choose Ubuntu Server 18.04 and select the t2 microservice instance type.
* Use the default Configuration Details and Storage options.
* Add any Tags you want (optional).
* Add HTTP and HTTPS protocol types with default port settings.
* Review and launch instance.

3. Connect to the EC2 instance and run the ssh command for it in your command line.

4. Git clone the repo into the instance in your command line.

5. Run npm run prod-start

6. Use your AWS Public DNS key to view the application in your browser.

## Built With

* React - Front-end Framework
* spoonacular - API

## Authors

* **Brittany Yee**

## License

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

branch_name: refs/heads/master


text:
# Memory Game Project

## Table of Contents

* [Instructions](#instructions)
* [Game Goal](#gamegoal)
* [License](#license)
* [To do](#todo)
* [How to play](#how2play)

## Instructions

The starter project has some HTML and CSS styling to display a static version of the Memory Game project. You'll need to convert this project from a static project to an interactive one. This will require modifying the HTML and CSS files, but primarily the JavaScript file.

To get started, open `js/app.js` and start building out the app's functionality

For specific, detailed instructions, look at the project instructions in the [Udacity Classroom](https://classroom.udacity.com/me).

## License
This software is released under the MIT license.

## ToDo
- Need to display 8 pairs of cards
- Need matching logic if 2 cards clicked and match
- Need matching logic if 2 cards clicked and not match
- Need a timer
- Need star rating - depends on moves
- Need move counter - every 2 cards clicked(pair) = 1 move
- if player found all 8 pairs of cards, a winner modal appears
- the winner modal have a close icon and a restart button

## How2Play
If u want to play, download/fork this repo and open the index.html in an browser OR
click the Link :) https://verenaena.github.io/FEND-Memory/

## GameGoal
You have to find 8 pairs of the icons. Just click a card and find the second one.
Have fun ;)!

repository: VerenaEna/FEND-Memory

repo_name: VerenaEna/FEND-Memory


text:
# Favicons

Dokkie automatically creates a favicon for you. But if you don't like that one, you can ofcourse just
change that into any image you want.

**cli**

```bash
npx dokkie --favicon=your/image/file.jpg
```

**dokkie.config.json**

```json
{
	"favicon": "your/image/file.jpg"
}
```

> **_NOTE:_** Make sure the file is quite big in size; recommended: (1024x1024)

### Meta data

The favicon generator comes with a lot other meta data which is auto included in your head. Turning favicons off, also affects this.

### Skip favicons

If you don't want favicons. For instance in a development environment or you will use your own through a custom template and copy. You can skip them.

**cli**

```bash
npx dokkie --skip=favicons
```

**dokkie.config.json**

```json
{
	"skip": ["favicons"]
}
```

repository: vercel-support/dokkie

repo_name: vercel-support/dokkie


text:
# [Diff of HTMLs]

Unofficial diff viewer for [WHATWG HTML Standard] and [W3C HTML].

There are number of differences between WHATWG HTML Standard and W3C HTML. The [Diff of HTMLs] provides side-by-side diff view of each section between the specifications.

[Diff of HTMLs]: https://diffofhtmls.herokuapp.com/
[WHATWG HTML Standard]: https://html.spec.whatwg.org/multipage/
[W3C HTML]: https://w3c.github.io/html/

All of diffs on the Diff of HTMLs are generated automatically from [WHATWG HTML Standard](https://html.spec.whatwg.org/)</a> and [W3C HTML](https://w3c.github.io/html/single-page.html). The Diff of HTMLs usually retrives specifications once a day (at around noon UTC) then calculates differences between the specifications.

This project is not affiliate with WHATWG nor W3C.

repository: takenspc/diffofhtmls

repo_name: takenspc/diffofhtmls


text:
# env-set

env-set is a small utility to launch another program on a clean environment,
especially where /usr/bin/env may not exist.

Use it as follows:

`env-set [KEY=VALUE] [KEY=VALUE] -- [command] [args...]`

Where `KEY=VALUE` pairs are the environment variables to set
(if you don't set any, you launch the command in a completely clean environment,
like what `env -i` does) and `command/args...` is the command and
arguments to use.

`--` is mandatory to separate environment variables and commands.

If you set the environment variable `PATH` as part of calling `env-set`,
`env-set` will proactively use that `PATH` to search for the command to run.

Example:

`env-set HOME=/ PATH=/usr/bin:/tools/bin LC_ALL=POSIX -- bash build.sh`

repository: binRick/env-set

branch_name: refs/heads/main

repo_name: binRick/env-set


text:
# 768. Partition Labels

* *Difficulty: Medium*

* *Topics: Two Pointers, Greedy*

* *Similar Questions:*

  * [Merge Intervals](merge-intervals.md)

## Problem:

A string S of lowercase letters is given.  We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts.

Example 1:

Input: S = "ababcbacadefegdehijhklij"
Output: [9,7,8]
Explanation:
The partition is "ababcbaca", "defegde", "hijhklij".
This is a partition so that each letter appears in at most one part.
A partition like "ababcbacadefegde", "hijhklij" is incorrect, because it splits S into less parts.

Note:

S will have length in range [1, 500].

S will consist of lowercase letters ('a' to 'z') only.

## Solutions:

```c++
class Solution {
public:
    vector<int> partitionLabels(string S) {
        int charLastIndex[26];
        for (int i = 0; i < 26; ++i) {
            charLastIndex[i] = -1;
        }

        for (int i = 0; i < S.length(); ++i) {
            charLastIndex[S[i] - 'a'] = i;
        }

        vector<int> ret;
        int left = 0;
        int right = 0;

        for (int i = 0; i < S.length(); ++i) {
            right = max(right, charLastIndex[S[i] - 'a']);
            if (i != right) {
              continue;
            }

            ret.push_back(right - left + 1);
            left = right + 1;
            right = left;
        }

        return ret;
    }
};
```

repository: LamhotJM/git-book

repo_name: LamhotJM/git-book


text:
# Become a Validator: Using Docker

Sigma Prime maintains the
[sigp/lighthouse-docker](https://github.com/sigp/lighthouse-docker) repository
which provides an easy way to run Lighthouse without building the Lighthouse
binary yourself.

> Note: when you're running the Docker Hub image you're relying upon a
> pre-built binary instead of building from source. If you want the highest
> assurance you're running the _real_ Lighthouse,
> [build the docker image yourself](./docker.md) instead. You'll need some
> experience with docker-compose to integrate your locally built docker image
> with the docker-compose environment.

### 1. Clone the repository

Once you have docker-compose
[installed](https://docs.docker.com/compose/install/), clone the
[sigp/lighthouse-docker](https://github.com/sigp/lighthouse-docker) repository.

```bash
$ git clone https://github.com/sigp/lighthouse-docker
$ cd lighthouse-docker
```

### 2. Configure the docker environment

Then, create a file named `.env` with the following contents (these values are
documented
[here](https://github.com/sigp/lighthouse-docker/blob/master/default.env)):

```bash
DEBUG_LEVEL=info
START_GETH=true
START_VALIDATOR=true
VALIDATOR_COUNT=1
VOTING_ETH1_NODE=http://geth:8545
DEPOSIT_VALUE=3200000000
```

_This `.env` file should live in the `lighthouse-docker` directory alongside the
`docker-compose.yml` file_.

### 3. Start Lighthouse

Start the docker-compose environment (you may need to use `sudo`):

```bash
$ docker-compose up
```

Watch the output of this command for the `Saved new validator to disk` log, as
the `voting_pubkey` is the primary identifier for your new validator. This is
useful for finding your validator in block explorers. Here's an example of the
log:

```bash
validator_client_1  |  Jan 10 12:06:05.632 INFO Saved new validator to disk             voting_pubkey: 0x8fc28504448783b10b0a7f5a321505b07ad2ad8d6a8430b8868a0fcdedee43766bee725855506626085776e020dfa472
```

> Note: the docker-compose setup includes a fast-synced geth node. You can
> expect the `beacon_node` to log some eth1-related errors whilst the geth node
> boots and becomes synced. This will only happen on the first start of the
> compose environment or if geth loses sync.

### Installation complete!

In the next step you'll need to locate your `eth1_deposit_data.rlp` file from
your `.lighthouse/validators` directory.

The `./lighthouse` directory is in the root of the `lighthouse-docker`
repository. For example, if you ran Step 1 in `/home/karlm/` then you can find
your validator directory in
`/home/karlm/lighthouse-docker/.lighthouse/validators/`.

You can now go to [Become a Validator: Step 2](become-a-validator.html#2-submit-your-deposit-to-goerli).

repository: timmyers/lighthouse

repo_name: timmyers/lighthouse


text:
# states-and-statuses
A (very rough)^ prototype for a compositional states and statuses system in Unity.

***Only statuses have been implemented so far!***

This repository is intended to be used by developers as a reference for a potential implementatoin of finite state machines and status effects.

Build controls:
- `LMB`: move towards mouse position
- `RMB`: dash towards mouse position

Statuses:
- Gigantism
    - Increases character's scale, max 3 stacks (default).
- Dashless
    - Temporarily disables character's dash option.
- Slow
    - Reduces the character's speed and dash distance, max 8 stacks (default).

^ *Might be cleaned up in the future, but I'm currently using this to teach someone.*

repository: itsschwer/states-and-statuses

repo_name: itsschwer/states-and-statuses


text:
# [Dead store to local variable](https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#DLS_DEAD_LOCAL_STORE)

This instruction assigns a value to a local variable,
but the value is not read or used in any subsequent instruction.
Often, this indicates an error, because the value computed is never
used.

Note that Sun's javac compiler often generates dead stores for
final local variables. Because SpotBugs is a bytecode-based tool,
there is no easy way to eliminate these false positives.

repository: codacy/codacy-spotbugs

gha_language: Scala

gha_license_id: NOASSERTION

repo_name: codacy/codacy-spotbugs


text:
# [Boomer Sooner](http://alexa.amazon.com/#skills/amzn1.ask.skill.66ea091f-5d66-432b-95b0-ed319c9bf2ef)
![4.4 stars](../../images/ic_star_black_18dp_1x.png)![4.4 stars](../../images/ic_star_black_18dp_1x.png)![4.4 stars](../../images/ic_star_black_18dp_1x.png)![4.4 stars](../../images/ic_star_black_18dp_1x.png)![4.4 stars](../../images/ic_star_half_black_18dp_1x.png) 3

To use the Boomer Sooner skill, try saying...

* *Alexa, i say boomer*

This is a simple skill that enables Alexa to reply with a "Sooner" when you tell her "Boomer". It's the perfect skill for the lonely Oklahoma Sooners fan.

This app is not affiliated with The University of Oklahoma

***

### Skill Details

* **Invocation Name:** i say boomer
* **Category:** null
* **ID:** amzn1.ask.skill.66ea091f-5d66-432b-95b0-ed319c9bf2ef
* **ASIN:** B01N994INS
* **Author:** Mike Bockus
* **Release Date:** November 25, 2016 @ 08:35:07
* **In-App Purchasing:** No


text:
### [CVE-2009-3555](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3555)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%20n%2Fa%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

The TLS protocol, and the SSL protocol 3.0 and possibly earlier, as used in Microsoft Internet Information Services (IIS) 7.0, mod_ssl in the Apache HTTP Server 2.2.14 and earlier, OpenSSL before 0.9.8l, GnuTLS 2.8.5 and earlier, Mozilla Network Security Services (NSS) 3.12.4 and earlier, multiple Cisco products, and other products, does not properly associate renegotiation handshakes with an existing connection, which allows man-in-the-middle attackers to insert data into HTTPS sessions, and possibly other types of sessions protected by TLS or SSL, by sending an unauthenticated request that is processed retroactively by a server in a post-renegotiation context, related to a "plaintext injection" attack, aka the "Project Mogul" issue.

### POC

#### Reference
- http://blog.g-sec.lu/2009/11/tls-sslv3-renegotiation-vulnerability.html
- http://clicky.me/tlsvuln
- http://seclists.org/fulldisclosure/2009/Nov/139
- http://www.oracle.com/technetwork/topics/security/cpuapr2011-301950.html
- http://www.oracle.com/technetwork/topics/security/cpuoct2010-175626.html
- http://www.oracle.com/technetwork/topics/security/javacpuoct2010-176258.html
- http://www.redhat.com/support/errata/RHSA-2010-0865.html
- http://www.redhat.com/support/errata/RHSA-2011-0880.html
- http://www.securegoose.org/2009/11/tls-renegotiation-vulnerability-cve.html
- http://www.vmware.com/security/advisories/VMSA-2010-0019.html
- http://www.vmware.com/security/advisories/VMSA-2011-0003.html
- http://www.vmware.com/support/vsphere4/doc/vsp_vc41_u1_rel_notes.html
- http://xss.cx/examples/plesk-reports/plesk-parallels-controlpanel-psa.v.10.3.1_build1013110726.09%20os_redhat.el6-billing-system-plugin-javascript-injection-example-poc-report.html

#### Github
- https://github.com/ADesprets/DPSSLClientProfile
- https://github.com/ARPSyndicate/cvemon
- https://github.com/CVEDB/PoC-List
- https://github.com/CVEDB/awesome-cve-repo
- https://github.com/DButter/whitehat_public
- https://github.com/Dokukin1/Metasploitable
- https://github.com/GiJ03/ReconScan
- https://github.com/Iknowmyname/Nmap-Scans-M2
- https://github.com/NikulinMS/13-01-hw
- https://github.com/RedHatProductSecurity/CVE-HOWTO
- https://github.com/RoliSoft/ReconScan
- https://github.com/Zhivarev/13-01-hw
- https://github.com/chnzzh/OpenSSL-CVE-lib
- https://github.com/ekiojp/hanase
- https://github.com/galeone/letsencrypt-lighttpd
- https://github.com/hoangcuongflp/SSL-Checklist-for-Pentesting
- https://github.com/issdp/test
- https://github.com/johnwchadwick/cve-2009-3555-test-server
- https://github.com/kasem545/vulnsearch
- https://github.com/matoweb/Enumeration-Script
- https://github.com/palmerabollo/egov
- https://github.com/withdk/pulse-secure-vpn-mitm-research
- https://github.com/zzzWTF/db-13-01

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Hiawatha
<!-- position: 3 -->

Bludit supports the Hiawatha webserver. For best results, you can use the following rewrite rule:

```
UrlToolkit {
    ToolkitID = bludit
    RequestURI exists Return
    Match [^?]*(\?.*)? Rewrite /index.php$1
}
```

repository: bludit/documentation-english

repo_name: bludit/documentation-english


text:
Tog Forum: a work in progress
========

Tog forums support: not ready for prime time!
I started working on this but it is not yet complete. I realize that the model Post conflicts with a Post model in tog_conversatio. I'll fix it when I can, but in the meantime, if you really need it fixed, you can always fork this project :)

Included functionality
-----------------------

* Forum, topics and posts
* Customizable access control (login required)
* Integration with authentication_system via tog_user
* Administration interface (utilizing existing admin? rules in tog_user)

Resources
=========

Plugin requirements
-------------------
* tog_user
* will_paginate (as gem)
* white_list_model

Install
-------

<pre>
rake rails:template LOCATION=http://tr.im/aspgems_tog_forum
</pre>

More
-------

[http://github.com/jacqui/tog_forum](http://github.com/jacqui/tog_forum)

Copyright (c) 2008 Jacqui Maher, released under the MIT license

repository: Jonay/proyectinix

extension: markdown

repo_name: Jonay/proyectinix


text:
# Region Quadtrees for Image Operations
**[`src/quadtree.h`](src/quadtree.h)** : A `C++` implementation of [region quadtrees](https://en.wikipedia.org/wiki/Quadtree#Region_quadtree) for performing various operations on binary images

---

**Operations supported:**
- `set(int x1, int y1, int x2, int y2, int b)` : Set all pixels in the sub-matrix/sub-image with rows `x1` to `x2` and columns `y1` to `y2` (inclusive) to the value `b`
- `get(int x1, int y1)` : Return the value of the pixel at `(x1, y1)`
- `overlap(quad_tree const &Q)` : Pixel-wise boolean `OR` / Image union
- `intersect(quad_tree &Q)` : Pixel-wise boolean `AND` / Image intersection
- `complement()` : Complement all the entries in the binary image
- `resize(int m)` : Resizes the image to `2^m * 2^m`
- `extract(int x1, int y1, int m)` : Extracts the `2^m * 2^m` submatrix with rows from `x1` to `x1+2^m-1` and columns `y1` to `y1+2^m-1` / Image cropping

---

(*This was done as a course assignment for CS 213: Data Structures and Algorithms, IIT Bombay*)

repository: hrshtv/Region-Quadtrees-for-Images

repo_name: hrshtv/Region-Quadtrees-for-Images


text:
---
category: 'projects'
cover: './birthday-app.png'
title: 'Birthday app'
description: 'This project is built with Vanilla Javascript, HTML and CSS. It shows a list of people with their birth date.'
tags: ['HTML', 'CSS', 'Javascript']
priority: 3
published: true
---

This project is built with HTML, CSS and vanilla JavaScript.

![Birthday app](./birthday-app.png)

This web application was the first project I built with vanilla JavaScript. As a data source I used a JSON file. The purpose of it was to get myself familiar with JavaScript while practicing my knowledge of HTML and CSS at the same time. It enables users to keep track of their birthdays.

**Features:**\
1- The list of birthday is sorted by the nearest birthday.\
2- Users can add their own birthday to the existing list.\
3- Users can edit their birth date, avatar or even their names.\
4- Users can remove some items from the list.\
5- The two input fields at the top of the list are used to filter birthday by name or by birthday month.


text:
### Irrigation and Effluent Data Dictionary (Normative)

Contents:
* [Irrigation Equipment Attributes](#Irrigation-Equipment-Attributes)
* [Irrigation Equipment Observations](#Irrigation-Equipment-Observations)
* [Irrigation Equipment Alert Observations](#Irrigation-Equipment-Alert-Observations)
* [Water Supply Attributes](#Water-Supply-Attributes)
* [Water Supply Observations](#Water-Supply-Observations)
* [Effluent Production and Collection Attributes](#Effluent-Production-and-Collection-Attributes)
* [Effluent Production and Collection Observations](#Effluent-Production-and-Collection-Observations)
* [Effluent Storage and Treatment Attributes](#Effluent-Storage-and-Treatment-Attributes)
* [Effluent Storage and Treatment Observations](#Effluent-Storage-and-Treatment-Observations)
* [Effluent Nutrient Observations](#Effluent-Nutrient-Observations)
* [Irrigation and Effluent Application Observations](#Irrigation-and-Effluent-Application-Observations)
* [Soil Moisture Attributes](#Soil-Moisture-Attributes)
* [Soil Moisture Observations](#Soil-Moisture-Observations)
* [Soil Nutrient Observations](#Soil-Nutrient-Observations)
* [Plants Use of Water](#Plants-Use-of-Water)
* [Climatic and Weather Observations](#Climatic-and-Weather-Observations)

#### Irrigation Equipment Attributes

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with attributes of the irrigation equipment.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Equipment identifier | String | Name or identifier of equipment.
Equipment type | Enumeration See [Equipment Type](IEDS_Lists-of-Enumerated-Values.md#Equipment-Type). | Type of equipment or device.
Change in head | Float: [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) | The effects of elevation and friction on the head, taken as the difference in pressure on the inlet vacuum gauge and the intake pressure.
Elevation change | Integer: m | The difference between the intake elevation and pump elevation.
Energy per unit volume | Float: [kW](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) hour/m3 | Amount of energy used to deliver a volume of water.
Friction loss | Float: [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) | Amount of pressure lost due to water movement and turbulence.
Full load motor efficiency | Float % | Efficiency of the irrigation pump motor when run at full load.
Headworks efficiency | Float: % |Pressure loss through intake structure, pump and headworks (excluding pump pressure and elevation differences).
Hydraulic efficiency | Float: % | Pressure lost between the delivery (mainline entry) and discharge points (machine entry, hydrant, or take-off in drip‑micro systems), excluding variations in elevation.
Intake elevation | Integer: m | Surface level of the water supply.
Intake pipe internal diameter | Integer: mm	| Internal diameter of the irrigator intake pipe.
Irrigation system type | Enumeration: see [Irrigation system type](IEDS_Lists-of-Enumerated-Values.md#Irrigation-system-type).| Enumeration: The irrigation system in use.
Mainline entry elevation | Integer: m | Elevation at the exit point of the headworks.
Mainline entry pressure	| Float: [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations), bar, [psi](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) | Pressure at the exit of the headworks.
Mainline exit elevation | Integer: m | Elevation at the exit point of the mainline.
Mainline exit pressure | Float: [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations), bar, [psi](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) | Pressure at the exit of the mainline.
Mainline internal diameter | Integer: mm | Internal diameter of the irrigator mainline pipe.
Mainline length | Integer: m | Length of the mainline pipe from entry to exit.
Maximum flow rate | Float: litres/second (l/s), m3/hour	| Maximum speed at which water can be pumped through the irrigator.
Maximum velocity | Float: m/s | The standard maximum velocity in the mainline pipe under standard operating conditions.
Minimum flow rate | Float: litres/second (l/s), m3/hour | Minimum speed at which water can be pumped through the irrigator.
Overall pump efficiency | Float: %	| Energy efficiency of the irrigator pump. Also known as system pumping efficiency.
Pressure at irrigator | Float: bar, [psi](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations), [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) | Pressure at the sprinkler heads. Also known as operating pressure.
Pump inlet elevation | Integer: m | Relative to the water level at the intake.
Pumping rate | Integer: l/s or m3/hr)| Volume of water per unit time that a pump is designed to deliver at the design pressure.
Design travel speed	| Float: m/hour | Speed which the irrigation unit travels at.
System capacity	| Integer: l/s/ha or mm/d | Flow of water per unit of irrigated area on the basis of the system operating 24 hours per day.

#### Irrigation Equipment Observations

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations of the irrigation equipment.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Equipment identifier | String | Name or identifier of equipment
Equipment type | Enumeration see [Equipment Type](IEDS_Lists-of-Enumerated-Values.md#Equipment-Type). | Type of equipment or device
Equipment location | String | A recognised coordinate system identified using the European Petroleum Survey Group (EPSG)[1](#f1) parameter registry code (e.g. EPSG::4326) or associated common name.
Device identifier | String | Identifier of device or field sender in equipment
Device type | Enumeration: see [Device Type](IEDS_Lists-of-Enumerated-Values.md##Device-Type). | Type of device.
Flow rate | Float: litres/second (l/s), litres/minute, m3/hour | Speed at which effluent or water is being pumped through the irrigator. Also known as system flow rate.
Fluid type | Enumeration | water, effluent, chemical, fertilizer Type of substance being sprayed.
Intake pipe velocity | Float: m/s | Velocity of the water in the intake pipe.
Mainline velocity | Float: m/s | Velocity of the water in the mainline pipe.
Pump inlet pressure | Float: [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations), bar, [psi](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) | Amount of pressure at the inlet of the irrigation pump.
Pressure operating | Float: [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations), bar, [psi](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) |
Calibration pressure | Float: [KPa](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations), bar, [psi](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) | Calibration level
Relative velocity | Float: m/s | The difference between the standard maximum velocity and mainline velocity.
Total flow rate	| Float: litres/second (l/s) | Total irrigator flow rate.
Unit travel speed | Float: m/hour | Speed which the irrigation unit is travelling at.
Movement speed | Float: | seconds/revolution	Speed meter reading
Watering time | [ISO 8601](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) Duration:  days, hours, minutes, seconds | Amount of time an irrigator is set to water for.
Sensor identifier | GUID | Unique identifier of sensor.
Sensor type	| String |
Equipment status | Boolean | Flag identifying the current status of the equipment. True means equipment is running.
Valve Status | Boolean | Indicates whether valve is on or off.
Battery voltage	| Float | v
Signal strength	| Integer | Signal strength of received message.
Temperature	| Float: oC | Temperature in equipment.
Water level | Float: m | Water level in equipment.

#### Irrigation Equipment Alert Observations

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations of alerts from the irrigation equipment.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Equipment identifier | String | Name or identifier of equipment.
Equipment type | String includes values in [Equipment Type](IEDS_Lists-of-Enumerated-Values.md#Equipment-Type). | Type of equipment or device
Alert type | Enumeration: see [Irrigation Equipment Alert Type](IEDS_Lists-of-Enumerated-Values.md#Irrigation-Equipment-Alert-Type). | Type of alert issued by the equipment or device.
Alert value	| Boolean:

#### Water Supply Attributes

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with attributes of the water supply.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Drainage index | Float: m3/ha/year | Volume of water draining through the area irrigated.
Drawdown | Float: m | Difference between the static and pumping water level.
Flow rate | Float: m3/s | Flow rate of water from a pipe.
Maximum well flow rate	| Float: l/s | Highest flow rate which a well can be pumped at.
Pump type | Enumeration: Surface, submersible. |
Intended pumping water level | Integer: m | Water level during pumping. Also known as dynamic water level.
Redistribution index | Float: m3/ha/year | Volume of water reaching the target area.
Typical water electrical conductivity | Float: decisiemens/metre (dS/m), | Salinity level of  irrigation water reported as electrical conductivity.
Typical salinity | Float: mg/l, parts per million (ppm)	| Concentration of salts in the irrigation water reported as total dissolved solids.
Expected seasonal water use	| Float: mm/season | Amount of water used for irrigation in a season;
Intended static water level	| Integer: m | Water level relative to the ground level when the well is not being pumped. Also known as standing water level.
Typical stream velocity | Float: m3/s | Velocity of the flow of water in a stream or channel. Also known as channel velocity.
Total storage volume | Float: m3 | Total volume of a reservoir or dam.
Typical water lost | Float: mm/season | Typical amount of water lost to drainage and runoff.
Water source | Enumeration: see [Water Source](IEDS_Lists-of-Enumerated-Values.md#Water-Source).
Water storage volume | Float: m3 | Amount of water naturally held by a reservoir.
Typical water use efficiency | Float:  mm tonne/DM	| Amount of water used in irrigation per tonne of dry matter produced.

#### Water Supply Observations

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations of the water supply.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Pumping water level	| Integer: m | Water level during pumping. Also known as dynamic water level.
Redistribution index | Float: m3/ha/year | Volume of water reaching the target area.
Water electrical conductivity | Float: decisiemens/metre (dS/m). | Salinity level of irrigation water reported as electrical conductivity.
Salinity | Float: mg/l, parts per million (ppm)	| Concentration of salts in the irrigation water reported as total dissolved solids.
Seasonal water use | Float:  mm/season | Amount of water used for irrigation in a season;
Static water level | Integer: m	| Water level relative to the ground level when the well is not being pumped. Also known as standing water level.
Stream velocity | Float: m3/s | Velocity of the flow of water in a stream or channel. Also known as channel velocity.
Water lost | Float:  mm/season | Amount of water lost to drainage and runoff.
Water use efficiency | Float:  mm tonne/DM | Amount of water used in irrigation per tonne of dry matter produced.

#### Effluent Production and Collection Attributes

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with attributes of effluent production and collection.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Depth of wash water	| Float: mm	| Depth of the water applied during wash-down.
Effluent removal method	| Enumeration: wash-down hoses, flood washing, scrapers.	| Method used to remove effluent from the area.
Effluent separation method | Enumeration: weeping wall, sludge bed, sump. | Method used to separate solid and liquid effluent.
Source of effluent | Enumeration: see [Source of Effluent](IEDS_Lists-of-Enumerated-Values.md#Source-of-Effluent). | Location where effluent is collected.
Effluent fluid state | Enumeration: Liquid, slurry, solid. |
Wash water velocity | Float: m/s | Velocity at which the wash water is delivered.
Yard fall | Float: %, m/m | Slope of the wash-down area.
Yard area | Integer: m2 | Area of the wash-down area

#### Effluent Production and Collection Observations
This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations of effluent production and collection.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Hours spent on collection areas | Integer: hours | Number of hours each day that animals spend on effluent collection areas.
Animal species | Enumeration: see [Animal Life](https://github.com/Datalinker-Org/Farm-Data-Standards/blob/master/Animal%20Data%20Standards/ADS_Animal-Lifecycle-Data-Dictionary.md) in the Animal Data Standard | Species binomial name or common name.
Number of animals | Integer | Number of animals of species.
Effluent production rate | Float: m3/day, l/animal/day. | Amount of effluent produced in a time period.
Total daily water use | Integer: litres/day (l/day), m3/day. | Amount of water used to wash down surfaces which collect effluent
Total effluent solids | Integer: kg/animal/day. | Total amount of solid effluent produced by an animal over a time period.
Total effluent volume produced | Float: l/animal/day. | Volume of effluent produced by an animal over a time period.
Diluted effluent volume | Float: l/animal/day. | Volume of effluent which has been diluted with wash-water and other materials.
Undiluted effluent volume | Float: l/animal/day. | Volume of undiluted effluent produced.
Wash-water volume | Float: l/animal/day	| Volume of wash-water used per animal per day.

#### Effluent Storage and Treatment Attributes

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with attributes of effluent storage and treatment.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Batter angle |Float:  degrees, radians. | Angle between the top edge of the pond and the side of the pond.
Typical BOD5 | Float: kg/animal/day. | The biochemical oxygen demand of effluent over a 5-day period.
Primary nitrogen form | Enumeration: organic, nitrate, ammonia | Nature of the effluent.
Effective liquid storage volume | Float: days, m3. | Storage capacity for liquid effluent, represented as volume or a timeframe.
Effective solids storage volume | Float: m3	| Storage capacity for solid effluent, represented as volume or a timeframe days.
Effluent storage type| Enumeration: sump, settling pond	| Type of storage used for effluent.
Loads per hectare | Integer: loads per hectare | Number of loads of effluent required to cover a hectare of land.
Percentage unpumpable | Float: % | Percentage of the total volume which makes up the unpumpable area.
Pond capacity | Float: m3 | Volume of the effluent treatment pond.
Pond depth | Integer: m	| Depth of the effluent treatment pond.
Pond floor size	| Float: m2	| The area of the floor of the effluent treatment pond.
Pond surface area per animal. | Float: m2/animal | Area of pond per animal producing the effluent.
Storage volume | Float: litres/animal/day | Volume of effluent storage facilities
Top area | Float: m2 | Area of the top of the effluent pond.
Total loads	| Integer | Number of loads of effluent required to cover a specified area.
Total working volume | Float: m3 | Total working volume of the effluent pond.
Treatment method | Enumeration: land application, treatment pond, constructed wetlands, barrier ditches. |
Unpumpable depth | Float: m	| Depth of the effluent pond which cannot be pumped due to build-up of solids.
Volume of unpumpable area | Float: m3 | Volume of the area of solids at the bottom of the pond.

#### Effluent Storage and Treatment Observations

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations of effluent storage and treatment.

Attributes | Data Types | Notes
:--------- | :--------- | :----
BOD5 | Float: kg/animal/day	| The biochemical oxygen demand of effluent over a 5-day period.
Limiting nutrient | Enumeration: nitrogen (N), phosphorus (P) or potassium (K). | The nutrient present in the highest quantity in effluent which will liit how much can be applied.
Limiting nutrient concentration	| Float: mg/l, g/m3. | Concentration of the limiting nutrient in the effluent.
Freeboard height | Integer: m | Distance between the top of the pond and the waterline.
Percentage Freeboard | Float: %	| Percentage of the total volume which makes up the freeboard.
Pond level % | Integer: % | Pond/tank level percentage.
Flag pond high level | Boolean | True = pond/ tank level is higher than high threshold.
Flag pond low level	Boolean | True = pond/ tank level is lower than low threshold.
Volume of Freeboard | Float: m3 | Volume of the area between the top of the pond and the waterline.
pH | Integer | A measure of the acidity or basicity of effluent.
Solid content of diluted effluent | Float: % by weight | Percentage of solids in diluted effluent.
Solid content of undiluted effluent	| Float: % by weight | Percentage of solids in undiluted effluent.
Storage period | Integer: days, months. | Period of time for which effluent has been stored between emptying events.

#### Effluent Nutrient Observations

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations of effluent nutrients.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Nutrient | Enumeration: Nitrogen (N), phosphorus (P) or potassium (K).
Nutrient captured | Float: kg/cow/day of N, P or K.	| Amount of nutrient captured per animal per day.
Effluent Nutrient concentration	| Float: mg/l of N, P or K. | Concentration of a nutrient in effluent.
Nutrient produced | Float: kg/animal/day of N, P or K. | Amount of nutrient produced per animal per day.

#### Irrigation and Effluent Application Observations
This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations for irrigation and effluent application.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Application area | Float | Area of land which the substance is being applied to. Also known as area or surface area. Area in m2 (SI unit) or hectares (ha, accepted non-SI unit). Implementations must clearly specify which unit is used, and ensure consistent use. For spatial data interchange m2 should be used[2](#f2).
Application depth | Float: mm | Depth of a substance applied to an area.
Application rate | Float: mm/hour | Rate at which the substance is applied. Also known as application intensity.
Distribution uniformity	| Float: % | Measure of how evenly a substance has been applied to an area.
Return interval | Integer: days, hours. | Interval between application events.
Maximum effective loading | Float: kg/ha/year | Maximum amount of the limiting nutrient which can be applied. Also known as maximum loading criteria.
Effluent Application Months | String | List of months in which effluent has been applied to areas.

#### Soil Moisture Attributes

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with attributes for soil moisture data relating to irrigation and effluent. See the [Farm Features and Attributes Data Standard](https://github.com/Datalinker-Org/Farm-Data-Standards/blob/master/Farm%20Features%20and%20Attributes/FFADS_Feature-Catalogue.md) for a definition of soil body and references to the [INSPIRE](https://inspire.ec.europa.eu/documents/Data_Specifications/INSPIRE_DataSpecification_SO_v3.0.pdf) and [ANZSoilML](http://anzsoil.org/doc/anzsoilml/html/2.0.0/) standards.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Profile drainage class | Enumeration: Well, Moderately well, Imperfect, Poor, Very poor.
Hydrophobic condition | Enumeration: Rain always soaks in, Generally soaks in occasionally runs easily off slopes, Mostly runs off unless there is a long period of gentle rain.
Susceptibility to pugging | Enumeration: Rare, Occasional, Winter, Winter or rain. | 	Susceptibility to pugging or treading damage.
Drainage method | Enumeration: None, Mole/tile system, Other | Artificial drainage system
Percentage of block drained | Integer: % |
Field capacity | Float: mm, millimetres per meter (mm/m). | Amount of water in the soil once drainage by gravity has stopped.
Infiltration rate | Float: mm/hour | Rate at which soil can absorb moisture.
Permanent wilting point	| Float: mm, millimetres of water per meter of soil (mm/m). | Soil moisture content at which a plant will die from drought stress; also known as stress point.
Available water	| Float: mm, millimetres of water per meter of soil (mm/m) | Amount of water plants can extract from the soil, the difference in moisture content between field capacity and permanent wilting point.
Readily available water	| Float: mm, millimetres of water per meter of soil (mm/m). | Amount of water plants can extract from the soil before growth is limited due to the difficulty of extracting water; the difference in moisture content between field capacity and the stress point. Also known as plant readily available water.
Refill point | Float: mm, millimetres of water per meter of soil (mm/m). | Point at which the soil water level needs to be topped up to avoid dropping to the permanent wilting point. Also known as trigger point.
Saturation point | Float: mm, millimetres of water per meter of soil (mm/m). | Point at which the soil can no longer hold water.
Soil texture | Enumeration: see [Soil Texture](IEDS_Lists-of-Enumerated-Values.md#Soil-Texture)
Stone content of upper soil layer | Float: % | Percentage of the upper soil layer which is stone.
Water holding capacity | Float: mm, millimetres of water per meter of soil (mm/m). | Amount of water the soil can hold.

#### Soil Moisture Observations
This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations for soil moisture data relating to irrigation and effluent.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Critical deficit | Float: mm, millimetres of water per meter of soil (mm/m). | Difference between the current soil moisture content and the field capacity. Also known as soil moisture deficit.
Dry weight | Float:  mg | Dry weight of soil.
Soil moisture test method | Enumeration: type of test used to test soil moisture; see [Soil Moisture Test Method](IEDS_Lists-of-Enumerated-Values.md#Soil-Moisture-Test-Method).
Soil temperature | Float: oC | Observed temperature of the soil.
Soil water content | Float: mm, millimetres of water per meter of soil (mm/m). | Amount of water currently in the soil.
Volumetric soil moisture content | Float: V% | Percentage of the soil which is made up of water.
Wet weight | Float: mg | Wet weight of soil.

#### Soil Nutrient Observations
This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with observations of soil nutrients.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Nutrient | Enumeration: Nitrogen (N), phosphorus (P) or potassium (K), Sulphur (S).
Nutrient load | Float: kg of nutrient/ha. | Amount of a nutrient present in the soil.
Nutrient loss | Float: kg of nutrient/ha. | Amount of a nutrient which has been lost.

#### Plants Use of Water
This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with plants use of water relating to irrigation and effluent application.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Average daily crop water use | Float: l/day | Average amount of water consumed by crops.
Crop factor | Float: | The ratio of the water requirements of a particular crop to that of a reference crop (usually average grass pasture).
Estimated crop water use | Float: mm/day, mm/week. | Amount of water used by a crop over a time period.
Root depth | Float: mm, m | depth of soil profile that has enough rooting density for extraction of available water.ciency
Transpiration | Float: mm | Amount of water which is lost to transpiration through plant leaves.

#### Climatic and Weather Observations
This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with climatic observations affecting irrigation and the spreading of effluent.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Duration | [ISO 8601](IEDS_Definitions-and-Abbreviations_Interpretation.md#Definitions-and-Abbreviations) duration. | The period of the observation.
Metric | Enumeration: variable being measured; See [Weather Metric](IEDS_Lists-of-Enumerated-Values.md#Weather-Metric).
Aggregation	| Enumeration: total, mean, median, maximum, minimum.
Value | See [Weather Metric](IEDS_Lists-of-Enumerated-Values.md#Weather-Metric) for type and units.

This data dictionary [SHALL](IEDS_Definitions-and-Abbreviations_Interpretation.md#Interpretation) be used in developing messages for interchange of data concerned with weather observations affecting irrigation and the spreading of effluent.

Attributes | Data Types | Notes
:--------- | :--------- | :----
Barometric pressure | Float: KPa, bar, psi. | Air pressure of the Earth’s atmosphere. Also known as atmospheric pressure.
Daily rainfall | Integer: mm | Amount of rainfall for the observation day.
Potential Evapotranspiration  | Float: mm/day. | Rate of water loss from a combined surface of vegetation and soil. It includes evaporation of water from the soil surface, from free water on plants and transpiration by plants. Penman method.
Expected rainfall | Integer: mm	| Amount of rain expected.
Frost occurrence | Boolean	| If minimum air temperature less than 0.0°C
Maximum air temperature	| Integer: °C | Daily maximum air temperature.
Minimum air temperature	| Integer: °C | Daily minimum air temperature.
Probability of rainfall > 10mm	| Float: % | Probability that there will be more than 10mm of rain today.
Relative humidity | Float: % | The measure of water vapour content in the air at a given temperature.
Solar radiation	| Float: mega joules/m2/day (mJ/m2/day). | Amount of solar radiation over a period of time.
Temperature	| Integer: °C | Current ambient air temperature.
Wind speed | Float: km/hour, m/s.

#### Footnotes

1 [EPSG Geodetic Parameter Registry](http://www.epsg-registry.org/). [↩](#EPSG)

2 See section 6.1.3 of D2.8.I.2 Data Specification on Administrative Units – [Technical Guidelines](https://inspire.ec.europa.eu/id/document/tg/au). [↩](#INSPIRE)

repository: Datalinker-Org/Farm-Data-Standards

repo_name: Datalinker-Org/Farm-Data-Standards


text:
# Blog example: Single CloudFront Distribution for both your S3 Web App and API Gateway backend

Example of a single Amazon CloudFront distribution for both your web app hosted on S3 bucket and API Gateway backend

[Link to blog](https://dev.to/evnz/single-cloudfront-distribution-for-s3-web-app-and-api-gateway-15c3)

This example uses AWS CDK to build out a working example of a single CloudFront distribution that routes to both a web app hosted in S3 and a backend API. Although API GatewayV2 has been used as the backend here, the principles used in this example should work with any other backends (or otherwise known as custom origins in CloudFront). For more information please visit the blog linked above.

## Deployment

**CAUTION**: This stack contains a Lambda@Edge resource which may take some time to delete (you also may see errors requiring manual intenvention using CDK destroy)

0. Prequisites

   - AWS account with permissions to create CloudFront, S3 and API GatewayV2 resources and everyting inbetween (IAM etc)
   - AWS CLI (configured with your account so you can deploy this directly into your environment)
   - git
   - NodeJS
   - Yarn (You can use NPM)
   - Docker (for compiling the lambdas)

   For more information please visit the blog post instead (linked above).

1. Clone this repository locally

```shell
$ git clone https://github.com/evnz/blog-example-single-cf-distribution.git
```

2. Download all the dependencies locally

```shell
# change directory to single-cf
$ cd single-cf
# download all the dependencies via yarn (you can also use npm)
$ yarn
```

3. Build and deploy

```shell
$ yarn build
# if you haven't bootstrapped your environment previously, bootstrap it first
$ yarn cdk bootstrap
# This might take awhile to compile and package all the typescript lambdas and deploying the cloudfront distribution
$ yarn cdk deploy
```

4. Test it by visiting different endpoints on the cloudfront distribution

```md
1. `/` should return you the hello world HTML page.
2. `/api/helloworld` should return you the machine friendly hello world message
3. `/api/non-existent-endpoint` should return you a 'not found' message
4. `/api/non-existent-page` should redirect back to `/` with the hello world HTML page
```

5. Now you can delete the stack and remove the CDK bootstrap

```
Go to S3 Web Console and remove the content inside the S3 bucket we created (should just be the index.html file)
We can't delete a non-empty bucket so we will just have to manually empty it out first.
```

```shell
$ yarn cdk destroy
...
# And you may see some error about Lambda@Edge (at this point you will have to wait for Lambda@Edge to be removed from all the cache locations and then manually delete the stack from the Cloudformation console - yes I know it sucks but caching is hard)
```

```
If you are not planning to use CDK in this account anymore remove the bootstrap manually via the AWS Cloudformation web console (the stack name should be called CDKToolKit)
```

repository: jeancx/aws-cdk-cf-distribution-example

repo_name: jeancx/aws-cdk-cf-distribution-example


text:
--------------------------------------------------------------------------------

## Treebank Statistics (UD_Gothic)

There are 8 `INTJ` lemmas (0%), 8 `INTJ` types (0%) and 167 `INTJ` tokens (0%).
Out of 14 observed tags, the rank of `INTJ` is: 13 in number of lemmas, 13 in number of types and 12 in number of tokens.

The 10 most frequent `INTJ` lemmas: sai, amen, jai, ja, ne, wai, wainei, o

The 10 most frequent `INTJ` types:  sai, amen, jai, ja, ne, wai, wainei, o

The 10 most frequent ambiguous lemmas:

The 10 most frequent ambiguous types:

## Morphology

The form / lemma ratio of `INTJ` is 1.000000 (the average of all parts of speech is 2.517954).

The 1st highest number of forms (1) was observed with the lemma “amen”: amen.

The 2nd highest number of forms (1) was observed with the lemma “ja”: ja.

The 3rd highest number of forms (1) was observed with the lemma “jai”: jai.

`INTJ` does not occur with any features.

## Relations

`INTJ` nodes are attached to their parents using 6 different relations: [got-dep/vocative]() (128; 77% instances), [got-dep/root]() (23; 14% instances), [got-dep/conj]() (8; 5% instances), [got-dep/nsubj]() (3; 2% instances), [got-dep/xcomp]() (3; 2% instances), [got-dep/discourse]() (2; 1% instances)

Parents of `INTJ` nodes belong to 7 different parts of speech: [VERB]() (122; 73% instances), [ROOT]() (23; 14% instances), [INTJ]() (9; 5% instances), [NOUN]() (7; 4% instances), [ADV]() (4; 2% instances), [CCONJ]() (1; 1% instances), [PRON]() (1; 1% instances)

150 (90%) `INTJ` nodes are leaves.

5 (3%) `INTJ` nodes have one child.

3 (2%) `INTJ` nodes have two children.

9 (5%) `INTJ` nodes have three or more children.

The highest child degree of a `INTJ` node is 4.

Children of `INTJ` nodes are attached using 8 different relations: [got-dep/conj]() (8; 20% instances), [got-dep/cc]() (7; 17% instances), [got-dep/vocative]() (7; 17% instances), [got-dep/advcl]() (6; 15% instances), [got-dep/iobj]() (6; 15% instances), [got-dep/det]() (3; 7% instances), [got-dep/obl]() (3; 7% instances), [got-dep/ccomp]() (1; 2% instances)

Children of `INTJ` nodes belong to 8 different parts of speech: [INTJ]() (9; 22% instances), [PRON]() (8; 20% instances), [CCONJ]() (7; 17% instances), [VERB]() (6; 15% instances), [NOUN]() (5; 12% instances), [DET]() (3; 7% instances), [PROPN]() (2; 5% instances), [ADJ]() (1; 2% instances)

repository: PhyloStar/UDTelugu

repo_name: PhyloStar/UDTelugu


text:
# @year/1974

A year 1974

## Install

~~~
npm install @year/1974
~~~

## Usage

~~~js
const day = require('@year/1974/01/01')
~~~

Returns a [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object.

## Related

* [@year/1973](https://github.com/antonmedv/year/tree/master/packages/1973)
* [@year/1975](https://github.com/antonmedv/year/tree/master/packages/1975)

## License

MIT

repository: antonmedv/year

repo_name: antonmedv/year


text:
## System Designer sources

You will find here:

* `merges`: resources for a platform (*cordova*, *electron* or *web*) that are merged with the common resources
* `systems`: System Designer core systems and
* `www`: common resources (images and styles).

repository: corvello/system-designer

repo_name: corvello/system-designer


text:
---
layout: single
title: A quick look at the public ICEWS data
date: 2015-04-08 12:11:08.000000000 +03:00
categories:
- research
tags:
- event data
- icews
---

The ICEWS data, including the underlying raw event data as well as some
aggregations, were quietly [posted on
Dataverse](http://thedata.harvard.edu/dvn/dv/icews) the Friday before last.
I've worked with the ICEWS data for several years now, first when I was
working on on the ICEWS package--we deliver updated monthly forecasts for the
ICEWS events of interest (EOIs) once a month--and more recently for the
[irregular leadership change forecasting
project](http://andybeger.com/2014/05/23/the-thailand-coup-and-some-recent-
forecasting-work/). The public data are formatted differently from the data
I've worked with, so most of the code I have lying around is not that useful,
but in going through the public data I did recreate a short overview that is
nowhere near as complete as [David Masad](http://www.davidmasad.com)'s [first
look](http://nbviewer.ipython.org/gist/dmasad/f79ce5abfd4fb61d253b) (using
Python), and some code that might be useful for getting started in R.

One of the nice things about the public release of these data, aside from the
hope that they will start to [get used in
modeling](http://predictiveheuristics.com/2014/10/06/the-right-kind-of-
variance/) ([repost](http://andybeger.com/2014/10/06/the-right-kind-of-
variance/)), is that it is very interesting to read new takes by people whose
perspectives are different than mine, like, so far:

  - [Overview and descriptives](http://nbviewer.ipython.org/gist/dmasad/f79ce5abfd4fb61d253b) by David Masad
  - Jay Ulfelder's notes on [using ICEWS in country-month modeling](https://dartthrowingchimp.wordpress.com/2015/04/03/down-the-country-month-rabbit-hole/), including some starter R code.
  - Phil Schrodt's [comments on the public release](https://asecondmouse.wordpress.com/2015/03/30/seven-observations-on-the-newly-released-icews-data/), from an event data producer's perspective.

Now to the quick overview, using R rather than Python (link to code at end).
The first figure below shows the daily event totals, as well as a 30-day
moving average. The daily totals increase from around 500 in 1996 to a steady
level of around 3,000 from 2005 on, before decreasing again around 2009/2010.
As others have pointed out, this stability is a good feature to have since it
makes it plausible to model without some kind of normalization to account for
changes in the underlying event volume. This is in contrast to GDELT, where
the story corpus and event counts increase dramatically over time.

[![Daily totals in the ICEWS event data]({{ site.url }}/content/2015/icews-daily.png)]({{ site.url }}/content/2015/icews-daily.png)

The plot shows the daily event totals as points rather than with a line plot
mainly because I also wanted to add a moving average to bring out the
underlying trend more clearly. This shows an interesting pattern that I didn't
see with a line plot, namely that the daily event totals seem to be bimodal.
There appear to be two kinds of days: those with relatively few events, about
1,500 during the 2000's, those with more events, with 2,500 to 3,000 events
per day, and few days that fall in between. ~~I have no idea why that is,
but for that matter also no idea whether this shows up with any other machine-
coded event data.~~ It turns out that on weekends there are only about
half the amount of stories, and hence events, compared to weekdays (thanks to
the [ICEWS team for clarifying
this](https://twitter.com/icews/status/585788549221482496)). Talk about a
reminder of how important media bias and coverage are for event data.

The second plot maps events per capita by country, using the full range of the
data from 1995 to 2014. I used 2013 population data from the World Bank World
Development Indicators (WDI) to scale the event totals with. Bluish colors
indicate below average events per capita, and red higher than average events
per capita. The raw rates range from 600 on the low end, with countries like
Madagascar, Niger, and Cameroon, and up to 64,000 on the high end for Georgia,
Israel, Cyprus, and Lebanon. The rates are very skewed, and note that the map
shows log10 of the rate.

[![Total ICEWS events per capita, using 2013 WDI population figures.]({{ site.url }}/content/2015/icews-map.png)]({{ site.url }}/content/2015/icews-map.png)

I also did some hasty linear regressions models (see the linked code below) of
the logged country totals using a couple of variables from WDI. The moments
where you can use linear regression in conflict research are rare and so
refreshing, I couldn't resist. Population and GDP both have a positive impact
on event totals, and a model with only those two variables has an adjusted R2
of about 0.8. That's good. Neither area nor broadband internet subscribers nor
cell subscribers had significant coefficients and they did not help model fit.
Cases like Israel and Georgia have large residuals, so maybe adding some kind
of conflict indicator would help. But I think this is starting to touch on the
much larger issue of media coverage and bias (again), so I'll just leave with
this:

[![Distribution of ICEWS events per million by country]({{ site.url }}/content/2015/events-pcap-hist.png)]({{ site.url }}/content/2015/events-pcap-hist.png)

## Code

R code to:

  - [Summarize the data](https://github.com/andybega/mireg-blogs/tree/master/icews-public), including the images in this post.
  - [Load event data to SQLite](https://github.com/andybega/mireg-blogs/blob/master/icews-public/icews-to-sql.r), with some example queries.


text:
# Peziza recedens (Boud.) Sacc. & P. Syd., 1902 SPECIES

#### Status
ACCEPTED

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

#### Published in
Syll. fung. (Abellini) 16: 704 (1902)

#### Original name
Aleuria recedens Boud., 1898

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Week2 Assigment - *Coder Chat App*

**CoderChat** is a Ruby on Rails application.

Submitted by: **Tran Lu Thao Nguyen**

Time spent: **25** hours spent in total

URL: **http://chat4coder.herokuapp.com/**

## User Stories

The following **required** functionality is complete:

* [x] User can sign up by providing their email, password, and name.
* [x] User can login using an email and password.
* [x] After logging in, the user is taken to a page that has a list of incoming messages, sorted in descending chronological order (newest messages at top), a “new message” link, an “add friends” link, and a “sent messages” link.
* [] Unread messages should be bold or something similar in the list of messages.
* [x] Clicking the “add friends” link takes the user to a page with all users listed, with a link to “add user to friends list”.
* [x] Clicking on “new message” takes the user to a page where they can write a new mesasge. The recipient field should be a dropdown, where the options are names from the user’s friends.
* [x] Clicking on “sent messages” takes the user to a page listing messages they have sent. Each message should display at what time it was read by the recipient, or “unread”. The user cannot read the contents of the messages. ==> this is partially done.
* [] User can read a message’s content only once. Once the message has been read, the user will see a page indicating the message has already been read.
* [x] User can only read messages where they are the recipient.

## Video Walkthrough

Here's a walkthrough of implemented user stories:

![Video Walkthrough](http://aevitasgroup.com/coderchatdemo.gif)

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

## Notes

Describe any challenges encountered while building the app.
 the model associations are so hard to understand for me.

## License

    Copyright [yyyy] [name of copyright owner]

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

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

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

repository: nathanaevitas/coderchat

repo_name: nathanaevitas/coderchat


text:
---
author: gep13
comments: true
date: 2012-05-09 11:51:54+00:00
layout: post
slug: april-2012-meeting-completed
title: April 2012 Meeting – Completed
wordpress_id: 3735
categories:
- Blog
- Event Feedback
- Event Material
tags:
- Colin Mackay
- Task Parallel Library
---

On Thursday 26th April 2012, Aberdeen Developers .Net User Group welcomed Colin Mackay for a talk entitled “Task Parallel Library”. Full details of the event can be found [here](http://adnuguk-apr2012.eventbrite.com/?ebtv=C).

If you were not able to attend you can see the slides below and you can also download them [here](http://www/aberdeendevelopers.co.uk/Uploads/Meetings/2012-04-26-Introduction-to-Parallelisation-Aberdeen.zip).

### Task Parallel Library

[ ![Get Microsoft Silverlight](http://go.microsoft.com/fwlink/?LinkId=161376) ](http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0)

NOTE: The above slide deck was gratefully converted into the above format using SilverSlide by Mark Mann ([@mark_mann](http://twitter.com/#!/@mark_mann)), you can find his blog [here](http://blog.mark-mann.co.uk/). Thanks again Mark!

Also, as a gentle reminder, I am eager to collect as much feedback as possible for the event, so if you have not already done so, can you please fill in the survey [here](http://www.surveymonkey.com/s/NHM2NXM).

branch_name: refs/heads/source


text:
# tree

A simple utility that provides tree-like functions over an array of entities linked by a parent field.

## Installation

`npm install --save @tabit/tree`

repository: inPact/tree

repo_name: inPact/tree


text:
---
tags: [Vim,Vimscript]
---

* [1 `echo`](#1-echo)
    * [Exercises](#exercises)
* [2 Options](#2-options)
    * [2.1 Boolean Options](#21-boolean-options)
    * [2.2 Options with Values](#22-options-with-values)
    * [2.3 Setting Multiple Options at Once](#23-setting-multiple-options-at-once)
    * [Exercises](#exercises-1)
* [3 `map`](#3-map)
    * [Exercises](#exercises-2)
* [4 Modal Mapping](#4-modal-mapping)
    * [Exercises](#exercises-3)
* [5 Strict Mapping](#5-strict-mapping)
    * [5.1 Side Effects](#51-side-effects)
    * [5.2 Nonrecursive Mapping](#52-nonrecursive-mapping)
    * [Exercises](#exercises-4)
* [6 Leaders](#6-leaders)
    * [6.1 `<leader>`](#61-leader)
    * [6.2 `<localleader>`](#62-localleader)
    * [Exercises](#exercises-5)
* [7 Editing Your Vimrc](#7-editing-your-vimrc)
    * [Exercises](#exercises-6)
* [8 Abbreviations](#8-abbreviations)
    * [8.1 Keyword Characters](#81-keyword-characters)
    * [8.2 More Abbreviations](#82-more-abbreviations)
    * [Exercises](#exercises-7)
* [9](#9)
* [链接](#链接)

本文是学习[《Learn Vimscript the Hard Way》](http://learnvimscriptthehardway.stevelosh.com/chapters/01.html)一文的笔记。 Vimscript 的大多数命令都可以在 VIM 的命令行模式（`:`）中运行（如`:echo "Hello the world!"`）

## 1 `echo`
* `echo`: 显示文本（在最下面）
* `echom`: 显示文本，并保存到`:messages`中
* `messages`: 显示保存的信息
* `"`: 注释

### Exercises
> Read :help echo.
>
> Read :help echom.
>
> Read :help :messages.
>
> Add a line to your ~/.vimrc file that displays a friendly ASCII-art cat (>^.^<) whenever you open Vim.

## 2 Options
### 2.1 Boolean Options
`set <name>`, `set no<name>`: 设置 Boolean 选项如`set number`和`set nonumber`
`set <name>!`: 开启/关闭（Toggle） Boolean 选项。如`set number!`
`set <name>?`: 检查选项值。如`set number?`
### 2.2 Options with Values
`set <name>=<value>`: 设置带值的选项。如`set numberwidth=10`
### 2.3 Setting Multiple Options at Once
```
:set number numberwidth=6
```
### Exercises
Read :help 'number' (notice the quotes).

Read :help relativenumber.

Read :help numberwidth.

Read :help wrap.

Read :help shiftround.

Read :help matchtime.

Add a few lines to your ~/.vimrc file to set these options however you like.

## 3 `map`
`map - dd`: 将`-`映射为`dd`（即按下`-`会删除当前行）
`map <keyname> <keys>`: 使用特殊键。如`map <space> viw`，`map <c-d> dd`
`map <space> viw " Select word`: 这里的注释无效
### Exercises
Map the - key to "delete the current line, then paste it below the one we're on now". This will let you move lines downward in your file with one keystroke.

Add that mapping command to your ~/.vimrc file so you can use it any time you start Vim.

Figure out how to map the _ key to move the line up instead of down.

Add that mapping to your ~/.vimrc file too.

Try to guess how you might remove a mapping and reset a key to its normal function.

## 4 Modal Mapping
`nmap`(Normal MAP): 正常模式下的按键映射
`vmap`(Visual MAP): Visual模式下的按键映射。如`vmap \ U`
`imap`(Insert MAP): 插入模式下的按键映射。如`imap <c-d> <esc>ddi`

### Exercises
Set up a mapping so that you can press <c-u> to convert the current word to uppercase when you're in insert mode. Remember that U in visual mode will uppercase the selection. I find this mapping extremely useful when I'm writing out the name of a long constant like MAX_CONNECTIONS_ALLOWED. I type out the constant in lower case and then uppercase it with the mapping instead of holding shift the entire time.

Add that mapping to your ~/.vimrc file.

Set up a mapping so that you can uppercase the current word with <c-u> when in normal mode. This will be slightly different than the previous mapping because you don't need to enter normal mode. You should end up back in normal mode at the end instead of in insert mode as well.

Add that mapping to your ~/.vimrc file.

## 5 Strict Mapping
### 5.1 Side Effects
`*map`的副作用：
* 存在递归风险
* 安装插件时插件按键映射时存在引用的风险。如：
  ```
  :nmap - dd
  :nmap \ -
  ```

### 5.2 Nonrecursive Mapping
每个`*map`命令都对应一个`*noremap`(NOt REMAP)命令：`noremap`, `nnoremap`, `vnoremap`, `inoremap`。**建议总是使用`*noremap`命令**
### Exercises
Convert all the mappings you added to your ~/.vimrc file in the previous chapters to their nonrecursive counterparts.

Read :help unmap.

## 6 Leaders
### 6.1 `<leader>`
```
let mapleader = "-"
nnoremap <leader>d dd
```

### 6.2 `<localleader>`
```
let maplocalleader = "\\"
nnoremap <leader>d dd
```

### Exercises
Read :help mapleader.

Read :help maplocalleader.

Set mapleader and maplocalleader in your ~/.vimrc file.

Convert all the mappings you added to your ~/.vimrc file in the previous chapters to be prefixed with <leader> so they don't shadow existing commands.

## 7 Editing Your Vimrc
```
" Edit my Vimrc file
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
" Source my Vimrc file
nnoremap <leader>sv :source $MYVIMRC<cr>
```

### Exercises
Add mappings to "edit my ~/.vimrc" and "source my ~/.vimrc" to your ~/.vimrc file.

Try them out a few times, adding dummy mappings each time.

Read :help myvimrc.

## 8 Abbreviations
```
iabbrev adn and
iabbrev waht what
iabbrev tehn then
```

### 8.1 Keyword Characters
```
set iskeyword?
```
### 8.2 More Abbreviations
```
iabbrev<EMAIL_ADDRESS>iabbrev ccopy Copyright 2019 wsxq2, all rights reserved.
```

### Exercises
Add abbreviations for some common typos you know you personally make to your ~/.vimrc file. Be sure to use the mappings you created in the last chapter to open and source the file!

Add abbreviations for your own email address, website, and signature as well.

Think of some pieces of text you type very often and add abbreviations for them too.

## 9
## 链接
下面总结了本文中使用的所有链接：


text:
# Row filter plugin for Embulk

[![Build Status](https://secure.travis-ci.org/sonots/embulk-filter-row.png?branch=master)](http://travis-ci.org/sonots/embulk-filter-row)

A filter plugin for Embulk to filter out rows

## Configuration

Requirement: version >= 0.3.0

* **where**: Select only rows which match with conditions written in SQL-like syntax. See [SQL-like Syntax](#sql-like-syntax)

## Example

```yaml
filters:
  - type: row
    where: column1 = 'str'
```

```yaml
filters:
  - type: row
    where: |-
      (
        string_column START_WITH 'str' AND
        number_column > 1.0
      )
      OR
      (
        time_column = TIMESTAMP '2016-01-01 +0900' AND
        "true_column" = true
      )
```

See [SQL-like Syntax](#sql-like-syntax) for more details

# SQL-like Syntax

This syntax must be similar with a standard SQL syntax.

```sql
where: column1 = 'str'
```

```sql
where: |-
  (
    string_column START_WITH 'str' AND
    number_column > 1.0

  )
  OR
  (
    time_column = TIMESTAMP '2016-01-01 +0900' AND
    "true_column" = true AND
    string_column REGEXP '^reg'
  )
```

## Literals

### Boolean Literal

`true` or `TRUE` or `false` or `FALSE` are considered as a boolean literal

### Number Literal

Characters matching with a regular expression `-?[0-9]+(\.[0-9]+)?` is considered as a number literal

### String Literal

Characters surrounded by `'` such as `'foo'` is considered as a string literal

### Timestamp Literal

NOTE: It became possible to omit `TIMESTAMP` keyword on comparing with `timestamp` identifier (column) from version >= 0.3.3.

`TIMESTAMP ( NumberLiteral | StringLiteral )` such as `TIMESTAMP<PHONE_NUMBER>.747123` or `TIMESTAMP '2016-08-06 06:38:07.747123 +0900'` is considered as a timestamp literal

Number is a epoch time since 1970-01-01 UTC with nano time resolution.

String is a timestamp string which matches with one of following format:

* `%Y-%m-%d %H:%M:%S.%N %z`
* `%Y-%m-%d %H:%M:%S.%N`
* `%Y-%m-%d %H:%M:%S %z`
* `%Y-%m-%d %H:%M:%S`
* `%Y-%m-%d %z`
* `%Y-%m-%d`

The time zone for formats without `%z` is UTC, and the time resolution is micro second (caused by limitation of Embulk TimestampParser).

### Json Literal

Not supported yet

### Identifier Literal

Characters matching with a regular expression `[a-zA-Z_][a-zA-z0-9_]*` such as `foobar`, and characters surrounded by `"` such as `"foo-bar"`, `"foo.bar"`, and `"foo\"bar"` are considred as an identifier literal, that is, embulk's column name.

## Operators

### Boolean Operator

* `=`
* `!=`

### Number Operator (Long and Double)

* `=`
* `!=`
* `>`
* `>=`
* `<=`
* `<`

### String Operator

* `=`
* `!=`
* `START_WITH`
* `END_WITH`
* `INCLUDE`
* `REGEXP`

### Timestamp Operator

* `=`
* `!=`
* `>`
* `>=`
* `<=`
* `<`

### Json Operator

Not supported yet

### unary operator

* "xxx IS NULL"
* "xxx IS NOT NULL"
* "NOT xxx"

## Old Configuration

Versions >= 0.3.0 has `where` option to supports SQL-like syntax. I recommend to use it.

Following options are **deprecated**, and **will be removed someday**.

* **condition**: AND or OR (string, default: AND).
* **conditions**: select only rows which matches with conditions.
  * **column**: column name (string, required)
  * **operator** operator (string, optional, default: ==)
    * boolean operator
      * `==`
      * `!=`
    * numeric operator (long, double, Timestamp)
      * `==`
      * `!=`
      * `>`
      * `>=`
      * `<=`
      * `<`
    * string operator
      * `==`
      * `!=`
      * `start_with` (or `startsWith`)
      * `end_with` (or `endsWith`)
      * `include` (or `contains`)
    * unary operator
      * `IS NULL`
      * `IS NOT NULL`
  * **argument**: argument for the operation (string, required for non-unary operators)
  * **not**: not (boolean, optional, default: false)
  * **format**: special option for timestamp column, specify the format of timestamp argument, parsed argument is compared with the column value as Timestamp object (string, default is `%Y-%m-%d %H:%M:%S.%N %z`)
  * **timezone**: special option for timestamp column, specify the timezone of timestamp argument (string, default is `UTC`)

NOTE: column type is automatically retrieved from input data (inputSchema)

## Example (AND)

**Deprecated**

```yaml
filters:
  - type: row
    condition: AND
    conditions:
      - {column: foo,  operator: "IS NOT NULL"}
      - {column: id,   operator: ">=", argument: 10}
      - {column: id,   operator: "<",  argument: 20}
      - {column: name, opeartor: "include", argument: foo, not: true}
      - {column: time, operator: "==", argument: "2015-07-13", format: "%Y-%m-%d"}
```

## Example (OR)

**Deprecated**

```yaml
filters:
  - type: row
    condition: OR
    conditions:
      - {column: a, operator: "IS NOT NULL"}
      - {column: b, operator: "IS NOT NULL"}
```

## Example (AND of OR)

**Deprecated**

You can express a condition such as `(A OR B) AND (C OR D)` by combining multiple filters like

```yaml
filters:
  - type: row
    condition: OR
    conditions:
      - {column: a, operator: "IS NOT NULL"}
      - {column: b, operator: "IS NOT NULL"}
  - type: row
    condition: OR
    conditions:
      - {column: c, operator: "IS NOT NULL"}
      - {column: d, operator: "IS NOT NULL"}
```

## Comparisions

* [embulk-filter-calcite](https://github.com/muga/embulk-filter-calcite)
  * embulk-filter-calcite is a pretty nice plugin which enables us to write SQL query to filter embulk records, not only `WHERE` but also `SELECT`.
  * Based on [my benchmark (Japanese)](http://qiita.com/sonots/items/a70482d29862de87624d), embulk-filter-row was faster than embulk-filter-calcite.
  * Choose which to use as your demand.

## ToDo

* Support filtering by values of `type: json` with JSONPath
* Support IN operator

## ChangeLog

[CHANGELOG.md](./CHANGELOG.md)

## Development

Run example:

```
$ ./gradlew classpath
$ embulk preview -I lib example/example.yml
```

Run test:

```
$ ./gradlew test
```

Run checkstyle:

```
$ ./gradlew check
```

Release gem:

```
$ ./gradlew gemPush
```

## Development of SQL-like Syntax

Read the article [Supported SQL-like Syntax with embulk-filter-row using BYACC/J and JFlex](http://blog.livedoor.jp/sonots/archives/48172830.html).

To download BYACC/J and JFlex and run them, you can use:

```
$ script/byaccj.sh
```

or

```
$ ./gradlew byaccj # this runs script/byaccj.sh internally
```

This generates `src/main/java/org/embulk/filter/row/where/{Parser,ParserVal,Yylex}.java`.

The `byaccj` task of gradle is ran before `compileJava` task (which means to be ran before `classpath` or `test` task also) automatically.

repository: sonots/embulk-filter-row

gha_language: Java

repo_name: sonots/embulk-filter-row


text:
pppd_pyhook
=========

A plugin for pppd that allows for pppd hooks and notifications to be implemented in python.  Currently it defines hooks sufficient to use an alternative CHAP secret provider.

## Installation

    # Ensure the dependencies are installed
    sudo yum install ppp ppp-devel gcc python-devel make

    # Clone this repository
    git clone https://github.com/metricube/pppd_pyhook.git

    # Make and install
    cd pppd_pyhook
    make
    sudo make install

 - This will install pyhook.so in to /usr/lib64/pppd/_ppp-version_
 - Install hooks.py in to /etc/ppp/hooks.py

 - To load the module add the following line to /etc/ppp/options.xxx file

        plugin pyhook.so

## Usage
Edit /etc/ppp/hooks.py as required

 - If you don't want a particular hook defined - rename/remove it from hooks.py

## Troubleshooting & Limitations
 - Tested on CentOS6 x86_64 only
 - Spurious errors.  Check if SELinux is enabled.  It limits greatly what pppd (and hence the python hooks) can do.  Check the SELinux audit log (/var/log/audit/audit.log)


text:
# Merxmuellera stricta (Schrad.) Conert SPECIES

#### Status
SYNONYM

#### According to
Integrated Taxonomic Information System

#### Published in
Senckenberg. Biol. 51:129. 1970

#### Original name
null

### Remarks
null

path: /life/Plantae/Magnoliophyta/Liliopsida/Poales/Poaceae/Tenaxia/Tenaxia stricta/ Syn. Merxmuellera stricta/README.md


text:
---
title: AWS lambda & gateway workflow
date: '2016-12-02 08:21:41'
modified: '2016-07-28 17:11:46'
tags:
  - web
published: true
---
# AWS lambda & gateway workflow

In my recent work with [Snyk](https://snyk.io) I've created a service that exists inside an AWS Lambda function and is accessed via the AWS Gateway API. Originally I pushed a single Lambda function and pointed the API to the latest version, but the right workflow is to have a production tagged function and then dev (and possibly staging).

<!--more-->

Prerequisite knowledge for this post: how to create a lambda function and how to navigate the AWS console.

## How it all works together

There will be a single lambda function which will use aliases to tag which function is production and which is dev.

There will be a single gateway API endpoint that will be configured to point to a lambda function but will also include an `alias` variable (there's some messing around with permissions to get this right, so do read on).

Finally, there will be two gateway API stages, one for prod and one for dev, each will use stage variables that will determine which lambda function version will run.

## Configuring the lambda

Once you've pushed your lambda function (mine is called "pr" in this post), if you haven't, you need to create two aliases, one called `prod` and one called `dev`. In the case below, the latest release is currently production (release 35) and the one before was the development build (34).

![Lambda aliases](/images/aws-lambda-alias.png)

In my particular case, I'm using [@smallwins/lambda](https://github.com/smallwins/lambda/) and for development I'm deploying with a `dev` alias. The `prod` alias is only applied from inside of a travis build on master, which will run the following command when `after_success` fires:

```bash
$ npm run deploy lib/pr prod
```

During development, I will manually deploy using:

```bash
$ npm run deploy lib/pr dev
```

Next, I have to create a single Gateway that points to this lambda function.

## Configuring the gateway with variables

Firstly, create a new API, then from the resources actions, create a method. In my case, I'm using a POST. The "integration type" is set to "Lambda" and give the name of the lambda that I'm using. *Tip* I've found that I can't use variables at this point (you might have better luck), so I put the name of my lambda function (`pr`) and hit "save".

Once that's set up, we need to change the "integration type" to make use of the variables (that we'll introduce in the stages). Edit the lambda function name and append `:${stageVariables.alias}`. So in my case, with the function name being `pr`, then lambda function name becomes: `pr:${stageVariables.alias}`. You'll be prompted with something like this:

![AWS gateway permission request](/images/aws-gateway-var-permission.png)

**Here's the important bit:** the command that you're prompted to run, you need to swap *out* the `${stageVariables.alias}` value for the aliases you intend to use. So in my case, I'll run the command twice, once for `prod` and once for `dev`.

The gateway should have a single URL, but next we need to make the stages which will invoke the correct lambda function.

## Creating the stages

From the resource, click the "actions" dropdown button and select to "Deploy API". You'll be able to create a new stage. I've called the first one `prod`.

From the newly created stage, then select the "Stage Variables" tab. Create a new staging variable. This will match up to the `{$stageVariables.alias}` that we defined earlier. I've created a new variable called `alias` and set it to `prod`:

![AWS staging variables](/images/aws-stage.png)

Now that the stage is ready, the API is accessible. When I run a `curl` against the URL in the stage, the endpoint that ends in `/prod` hits my production lambda, and `/dev` will hit my development lambda.


text:
Flagship Safety
============

This is going to be great.

**Project Blog**:  [http://flagshipsafety.blogspot.com/](http://flagshipsafety.blogspot.com/)
**Git**:       [http://github.com/zr2d2/flagship_safety](http://github.com/zr2d2/flagship_safety)
**Author**:    Zach Rowe
**License**:   MIT License

Acknowledgement
---------------
Development on this project was made possible by the [Rensselaer Center for Open Source Software](http://rcos.cs.rpi.edu/) which is funded by Sean O'Sullivan '85.

gha_language: Ruby


text:
CHANGELOG
==========================

## 1.1.0 Release Candidate 1 (`1010051`)

- **New:** Seed for thread prefix (#50)
- **New:** Seed for resource prefix (#51)
- **New:** Seed for thread prefix group (#52)
- **New:** Seed for resource prefix group (#53)
- **Change:** Switch to `fakerphp/faker` package (#54)

## 1.1.0 Alpha 4 (`1010014`)

- **New:** Seed for threadmark category (#37)
- **New:** Seed for post threadmark (#38)
- **New:** Seed for conversation message threadmark (#39)
- **New:** Seed for discouraged IP addresses (#41)
- **New:** Seed for banned users (#43)
- **New:** Seed for IP address bans (#44)
- **New:** Seed for rejected users (#42)
- **New:** Seed for server error logs (#45)
- **New:** Seed for spam trigger log (#46)
- **New:** Seed for spam cleaner log (#47)
- **New:** Seed for email bounce log (#48)
- **Fix:** Threads cannot be seeded (#36)
- **Fix:** Master template is not created for page nodes (#49)

## 1.1.0 Alpha 3 (`1010013`)

- **Fix:** Updated license and readme files are not copied correctly to add-on archives (#29)
- **Fix:** Unused content type fields still exist even after not being used at all anymore (#30)
- **Fix:** Argument 2 must be an instance of ForumEntity, instance of Finder given exception is thrown when seeding thread (#31)

## 1.1.0 Alpha 2 (`1010012`)

- **New:** Seed for media gallery comment (#12)
- **New:** Seed for media gallery item reaction (#13)
- **New:** Seed for media gallery comment reaction (#14)
- **New:** Seed for media gallery album reaction (#15)
- **New:** Seed for profile post (#16)
- **New:** Seed for profile post comment (#17)
- **New:** Seed for profile post reaction (#18)
- **New:** Seed for profile post comment reaction (#19)

## 1.1.0 Alpha 1 (`1010011`)

- **New:** Seed for media gallery category (#7)
- **New:** Seed for resource manager category (#6)
- **New:** Seed for media gallery item (#4)
- **New:** Seed for resource manager item (#8)
- **New:** Seed for resource manager update (#9)
- **Change:** Set minimum Faker version to 1.9 (#3)
- **Change:** Require each seed to have its own CLI command to allow better configuration (#5)

## 1.0.1 (`1000170`)

- **New**: Set current time in XF after every seed data being inserted
- **New**: Clear entity cache after every seed
- **New**: Conversation and conversation message seeds
- **New**: Allow specifying limit when running only a specific seed
- **Changed**: Users will now watch their own threads when seeding
- **Changed**: Updated Faker to be compatible with PHP 7.4
- **Fixed**: When seeding pages `node_name` will be set
- **Fixed**: Unable to seed without escaping class name

**Note:** You can now remove both `composer.json` and `composer.lock` after installing the add-on from release build.

## 1.0.0 (`1000070`)

- **Changed**: Rewritten the job
- **Changed**: Separated tck-seeder:seed command into two CLI commands
- **Fixed**: Do not throw exception if seed handler does not exist

## 1.0.0 Alpha 3 (`1000013`)

- **New**: Added new class `AbstractReactionContent` to allow reacting to random contents
- **Changed**: Now makes use of code even listener instead of content type
- **Changed**: Changed the option from `content-type` to `seed` for the CLI command

## 1.0.0 Alpha 2 (`1000012`)

- **New**: Set tags when creating threads
- **New**: Users will now have an avatar
- **New**: User will also choose to accept/deny admin emails
- **Changed**: Users will be more unique
- **Changed**: Reorganize the way next seed is calculated
- **Fixed**: Wrong job filename
- **Fixed**: Limit being set to between 1K and 5K instead of 5K and 10K for Thread seed
- **Fixed**: Argument 1 passed must be of the type array or null, string is given when running seeder for a specific content type

## 1.0.0 Alpha 1 (`1000011`)

First alpha release.

gha_language: PHP


text:
# M77 reopen after emergency services rush to reports of 'man falling from bridge'

Published at: **2019-11-04T11:16:24+00:00**

Author: **Daniel Morrow, https://www.dailyrecord.co.uk/authors/daniel-morrow/**

Original: [dailyrecord](https://www.dailyrecord.co.uk/news/scottish-news/police-incident-closes-m77-northbound-20807704)

A number of emergency services were deployed to the M77 in Glasgow after reports that a person had fallen from a bridge.
Police were called to junction one at Dumbreck at around 10am on Monday, November 4.
The busy motorway was closed northbound as officers and medical staff remained at the scene.
Police reopened the section of the motorway at around 11am.
It is unclear if anyone has been injured in the incident.

A spokesperson for Police Scotland said: “At around 10am on Monday, November 4, we received a report that a person had fallen from a bridge at junction one on the M77.
“Junction one northbound was closed while emergency service remain on the scene.”

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# Stripped Bugout

I deleted:

- RPC calls
- Encrypted message passing

All for the purposes of education!

I created a hello world example app with it that isn't client/server based but purely made up of peers.

All of this could be gleaned/learned from the original Bugout repository. But it took me hours to understand what the library is doing, and then I finally figured out that the library itself was what I needed. For me, the encryption and RPC calls were what made it a bit confusing to understand, which is why I made this simple hello world app.

If all you need is unencrypted message passing, then this stripped version of bugout with a "hello world" example boilerplate is what you need!

## Demo

![Demo of the Hello World example](demo.gif)

## Installation

Do:

`npm install`

And modify the following in client.js:

In client.js the `swarmId` needs to be changed from `undefined` to a string of your liking.

## Usage

I only know how to do it on Mac. You need to bundle it with Browserify and then launch it on Chrome (or another compatible browser).

To bundle do:

`browserify client.js > bundle.js`

If you also want to startup Chrome:

`browserify client.js > bundle.js && open -a "Google Chrome" index.html`

repository: melvinroest/Bugout-Stripped

repo_name: melvinroest/Bugout-Stripped


text:
# Pomagma

[![Build Status](https://travis-ci.org/fritzo/pomagma.svg?branch=master)](https://travis-ci.org/fritzo/pomagma)
[![PyPI Version](https://badge.fury.io/py/pomagma.svg)](https://pypi.python.org/pypi/pomagma)

Pomagma is an inference engine for
[extensional untyped λ-join-calculus](/doc/philosophy.md),
a simple model of computation in which nondeterminism gives rise to
an elegant gradual type system.

Pomagma can:

- simplify code fragments expressed in λ-join-calculus
- validate codebases of programs and assertions
- solve systems of inequalities and horn clauses
- synthesize code from sketches and inequality constraints

Pomagma's base theory is being formally verified in the
[Hstar project](https://github.com/fritzo/hstar).

Pomagma's architecture follows a client-server model,
where a Python client library performs high-level syntactic tasks,
and a shared C++ database server performs low-level inference work.

- [Installing](#installing)
- [Quick Start](#quick-start)
- [Get An Atlas](#get-an-atlas)
- [Using The Client Library](/doc/client.md)
- [Developing](/doc/README.md)
  - [Architecture](/doc/README.md#dataflow-architecture)
  - [Organization](/doc/README.md#file-organization)
  - [Configuring](/doc/README.md#configuring)
  - [Testing](/doc/README.md#testing)
  - [Benchmarking](/doc/README.md#benchmarking)
  - [Vetting changes](/doc/README.md#vetting-changes)
- [Philosophy](/doc/philosophy.md)

## Installing

The server targets Ubuntu 14.04 and 12.04, and installs in a python virtualenv.

    git clone https://github.com/fritzo/pomagma
    cd pomagma
    . install.sh
    make small-test     # takes ~5 CPU minutes
    make test           # takes ~1 CPU hour

The client library supports Python 2.7.

    pip install pomagma

## Quick Start

Start a local analysis server with the tiny pre-built atlas

    pomagma analyze             # starts server, Ctrl-C to quit

Then in another terminal, start an interactive python client session

    $ pomagma connect           # starts a client session, Ctrl-D to quit
    >>> simplify(['APP I I'])
    [I]
    >>> validate(['I'])
    [{'is_bot': False, 'is_top': False}]
    >>> solve('x', 'EQUAL x APP x x', max_solutions=4)
    ['I', 'BOT', 'TOP', 'V']
    >>> validate_facts(['EQUAL x TOP', 'LESS x BOT'])
    False

Alternatively, connect using the Python client library

    python
    from pomagma import analyst
    with analyst.connect() as db:
        print db.simplify(["APP I I"])
        print db.validate(["I"])
        print db.solve('x', 'EQUAL x APP x x', max_solutions=4)
        print db.validate_facts(['EQUAL x TOP', 'LESS x BOT'])

## Get an Atlas

Pomagma reasons about large programs by approximately locating code fragments
in an **atlas** of 103-105 basic programs.
The more basic programs in an atlas,
the more accurate pomagma's analysis will be.
Pomagma ships with a tiny pre-built atlas of ~2000 basic programs.

To get a large pre-built atlas, put your AWS credentials in the environment and

    export AWS_ACCESS_KEY_ID=...        # put your id here
    export AWS_SECRET_ACCESS_KEY=...    # put your hey here
    pomagma pull                        # downloads latest atlas from S3

To start building a custom atlas from scratch

    pomagma make max_size=10000         # kill and restart at any time

Pomagma is parallelized and needs lots of memory to build a large atlas.

| Atlas Size    | Compute Time | Memory Space | Storage Space |
|---------------|--------------|--------------|---------------|
| 1 000 atoms   | ~1 CPU hour  | ~10MB        | ~1MB          |
| 10 000 atoms  | ~1 CPU week  | ~1GB         | ~100MB        |
| 100 000 atoms | ~1 CPU year  | ~100GB       | ~10GB         |

## License

Copyright (c) 2005-2017 Fritz Obermeyer.

Pomagma is licensed under the [Apache 2.0 License](/LICENSE).

Pomagma ships with the [Google Farmhash](https://github.com/google/farmhash)
library, licensed under the [MIT](/src/third_party/farmhash/COPYING) license.

repository: fritzo/pomagma

repo_name: fritzo/pomagma


text:
Basic Codeigniter based RESTful server for working on tag based search, using Junction table in RDBMS.

Demo for an online music streaming company which has playlists and tags descibing the playlists.
As the relationship between playlists and tags is many-to-many, and because this demo is using RDBMS (PostgreSQL), a junction table is there to help keep the relations normalised.

Via REST API, CRUD operations can be performed on Tags and Playlists as per the need, with a GET based key authentication.

The app's primary purpose is to suggest relevant playlists to a user requesting playlists based on certain tags, available in "tag" table.

Better description of working will be written in another document in the same folder.

Tech Used
----------

- PHP 5.6 with Codeigniter 3 based on REST library (https://github.com/chriskacerguis/codeigniter-restserver)

- PostgreSQL 9.7

- Apache2, Linux

High Scalability:
----------------

For high scalability, we can use Redis as a cache to keep results for quick retrieval.

For most frequently asked queries, we can cache the results for 5-10mins, which will give a good boost to efficiency of the system.

MongoDB can also be seen as a replacement of PostgreSQL here. MongoDB has better read efficiency than RDBMS based DBs in case of Many-to-Many relations, hence better throughput.


text:
# hello-bot
A messenger bot that replies "Hello coder" to every message, I hope it helps you get started with developing messenger bots.

# Setup
* Change credentials in src/config to suit your bot credentials
* Use index.php as application entry point

# How do I host
* You should consider [Heroku](https://www.heroku.com/) or any other hosting service

repository: prondubuisi/hello-bot

repo_name: prondubuisi/hello-bot