text:
---
layout: post
title: "Introduction to Short Term Actuarial Mathematics (STAM)"
modified:
categories: blog
excerpt: "SOA exams preparation"
tags: [STAM, SOA, ASA, FSA]
image:
  feature:
comments: true
share: true
date: 2020-12-08T08:08:50-04:00
---

This article provides an overview of actuarial and financial subjects related to Short Term Actuarial Mathematics, following the syllabus of IFM exam given by the SOA. It is also based on the book Loss Models (From Data to Decisions) written by Stuart A. Klugman, Harry H. Panjer and Gordon E. Willmot.

* Table of Contents
{:toc}

## 1. Basic distributional quantities

### 1.a. Moments
Let's consider a random variable X. Its **\\( k^{th} \\) raw moment** is defined by \\( \mu'_k = E[X^k] \\) whereas its **\\( k^{th} \\) central moment** is defined by \\( \mu_k = E[(X - \mu )^k] \\).

The first raw moment is called **mean** and denoted  \\( \mu \\). The second central moment is called **variance** and denoted  \\( \sigma^2 \\). Its square root \\( \sigma \\) is the **standard deviation** (SD). The **coeffcient of variation** \\( \sigma / \mu \\) measures how the distribution spreads relative to its mean. The **sknewness** \\(\gamma_1 = \mu_3 / \sigma^3 \\) measures the distribution's assymetry. A symmetric distribution has a skewness equal to 0 while a right-skewed distribution has a positive skewness. The **kurtosis** \\( \gamma_2 = \mu_4 / \sigma^4 \\) measures the distribution's flatness compared to the normal distribution. A normal distribution has a kurtosis equal to 3. A distribution with kurtosis higher than 3 has more probability assigned to values far away from  its mean, compared to a normal distribution with the same standard deviation.

The **mean excess loss function** (a.k.a. mean residual life function or complete expectation of life, depending on the context) is defined as:
\\[ e_X(d) = E[X-d \mid X > d ]  \\]
The variable \\( Y = X - d\\) given that \\( X > d \\) is called a **left truncated and shifted variable**. In insurance's contexts, we can think about (Y, X, d) as (expected payment, claim, deductible) or (expected remaining time to death, age, actual age), etc.

If \\(X\\) has a continuous distribution with density \\(f\\), we can rewrite its mean excess loss function as:
\\[ e_X(d) = \frac{ \int_{d}^{\infty} (x-d)^k f(x)dx }{ 1 - F(d)} = \frac{ \int_{d}^{\infty} S(x)dx }{ S(d) }  \\]

The **left censored and shifted variable** is \\( Y = (X - d)_{+} = X - d \\) if \\(X \ge d \\) and 0 otherwise.

Note that the left truncated ans shifted variable is not defined for \\( X < d \\) whereas the left censored and shifted variable is 0 for \\( X < d \\). Thus, the formula to link the \\( k^{th}\\) moment of the left censored and shifted variable to the \\( k^{th}\\) moment of the left truncated and shifted variable is: \\( E[(X-d)^k_+] = e^k_X(d) S(d) \\).

The **right censored variable** (or **limited loss variable**) is \\( Y = min(X,u)\\) with expected value \\( E[Y] = E[min(X,u)]\\) called **limited expected value**. Note that the right censored variable and the left censored and shifted variable are complementary: \\( X = (X - d)_{+} + min(X,d) \\). In insurance terms, one can be fully covered by purchasing simultaneously a policy with a deductible of d and another with a limit d.

A formula that is worth remembering is \\[ E[min(X,u)] = \int_{- \infty}^{0} F(x)dx + \int_{0}^{u} S(x)dx \\]

### 1.b. Percentile

The percentile function is the inverse of the distribution function. The **\\(100p^{th} \\) percentile** of a variable is \\( \pi_p \\) such that \\( F(\pi_{p-}) \le p \le F(\pi_{p})\\). The median corresponds to the \\(50^{th} \\) percentile \\( \pi_{0.5} \\)

### 1.c. Generating functions

For a randon variable \\( X \\) we define its **probability generating function** (pgf) as \\( P_X(z) = E[z^X] \\) and its **moment generating function** (mgf) as \\( M_x(t) = E[e^{tX}] = P_X(e^t)\\). We usually work with pgf if \\( X \\) is discrete and with mgf if \\( X \\) is continuous.

Now consider k random independent variables \\( (X_i, i = 1,...,k) \\), each with mgf \\( M_{X_i}(.) \\)
One can show that its sum \\( S_k = \sum_{i=1}^{k} X_i \\) has mgf \\( M_{S_k}(t) = \prod_{i=1}^{k} M_{X_i}(t) \\) and mgf \\( P_{S_k}(z) = \prod_{i=1}^{k} P_{X_i}(z) \\).

Calculating mgf or pgf is a common way to identify the distribution of a sum of independent variables (e.g. by calculating the mgf, one can show that a sum of idependent gamma distributions is still gamma distribution).

## 2. Classifying and creating distributions

### 2.1. Parametric distributions

#### Parametric and scale distributions

A **parametric distribution** is caracterized by distribution functions with some finite parameters. A parametric distribution is a **scale distribution** if, multiplied by a positive constant, it stays in the same set of distribution (e.g. the exponential distribution). For this kind of distribution (with nonnegative support), a **scale parameter** is the one that, when the variable is multiplied by a constant, is multiplied by the same constant. A **parametric distribution family** is a set of parametric distributions related to each other in some way.

#### Mixture distribution

When modeling a complex phenomenon that can be decomposed by other phenonoena with some respective probabilities, one can use a **mixture distribution**. A random variable \\( Y \\) is a **k-point mixture** of k other random variables \\( (X_i, i = 1,...,k)\\) if its cumulative distribution function is \\( F_Y(t) = \sum_{i=1}^{k} a_i F_{X_i}(t) \\) with \\( a_i > 0 \space \forall i = 1,...,k \\) and \\( \sum_{i=1}^k a_i = 1 \\). A more flexible distribution where the number of underlying variables is also a random variable \\(K\\) is called a **variable-component mixture distribution**. It's also called **semi-parametric distribution** because its complexity is in between parametric an nonparamatric distributions. The number of parameters is not fixed nor limited because //( K//) is not fixed.

#### Data-dependent distribution

A **data-dependent distribution** is at lease as complex as the data (or knowledge that produced it) and the number of parameters increases with the number of data points (or the amount of knowledge). One example is the empirical distribution which gives probability of \\( 1/n \\) for each of the \\(n\\) observed data point. Another example, which is the continuous version of the first example, is the kernel smoothing model with a continuous density function with area \\( 1/n \\) for each of the \\(n\\) observed data point.

### 2.2 Tail weight
In actuarial science and many other quantitative domains, when assessing loss, one is usually interested in the right tail of the loss distribution. For the rest of the article, when we mention the tail of a distribution, we refer to the right tail. There are several common ways of judging whether or not a distribution's tail is heavy.  Please note that the tail's heaviness is a relative notion: when we say a distribution has a heavy or a light tail, it's relative to some reference distribution or class of distribution.

### Moments

Existing of all positive moments indicates that the distribution has a heavy tail. In contrary, if positive moments do not exist, or only exist up to a certain level, the distribution has a relatively light tail.

### Limiting ratio

To compare the tails of two distributions, one can check the convergence of their limiting ratio (ratio of surviving functions or ratio of density functions; they have the same limit according to the L'Hopital's rule):
\\[ \lim_{x \to \infty} \frac{S_1(x)}{S_2(x)} = \lim_{x \to \infty} \frac{S_1'(x)}{S_2'(x)} = \lim_{x \to \infty} \frac{-f_1(x)}{-f_2(x)} = \lim_{x \to \infty} \frac{f_1(x)}{f_2(x)} \\]
If this ratio diverges, the first distribution has a heavier tail.

### Hazard rate

If the hasard rate function \\( x  \to h(x)= f(x)/S(x)\\)  is decreasing, the distribution has a heavy tail. In fact, lossely speaking, this hasard rate measures the ratio between the probability assigned to a point \\(x\\) and the probability assigned to all the points larger than \\(x\\).

### Mean residual life function

If the mean residual life function (a.k.a. the mean excess loss function) \\(d \to e(d)= \frac{\int_{x=d}^{\infty} S(x)dx }{S(d)} \\) is increasing, the distribution has a heavy tail.

It's worth noting some relationships between the hasard rate function and the mean residual life function:

* If the hazard rate function is decreasing, the mean residual life function is increasing
* The reverve is not true. An increasing mean residual life function does not necessarly imply a decreasing hazard rate function.
* \\( \lim_{d \to \infty} e(d) = \lim_{d \to \infty} \frac{\int_{x=d}^{\infty} S(x)dx }{S(d)} = \lim_{d \to \infty} \frac{-S(d) }{-f(d)} \lim_{d \to \infty} \frac{1}{h(d)} \\)
* For each positive random variable with distribution \\(f\\), one can introduce the **equilibrium distribution** \\( f_e(x)= S(x)/E[X], x > 0 \\). It is a density function because \\(f_e(x) > 0 \space \forall x > 0 \\) and \\( \int_{x=0}^{\infty} f_e(x)dx = \frac{1}{E[X]} \int_{x=0}^{\infty} S(x)dx = 1  \\). The hasard rate function of the equilibrium distribution is \\( h_e(x) = \frac{f_e(x)}{S_e(x)} = \frac{1}{e(x)} \\). Finally, we note that \\( \frac{e(x)}{e(0)} = \frac{S_e(x)}{S(x)} \\).

### 2.3 Creating new distributions
Given a random variable \\(X\\) following a continuous distribution with density \\(f\\) and cdf \\(F\\), one can create new ones by multiplying \\(X\\) by a constant, raising it to a power, taking its exponential, etc.

### Multiplication by a constant
Let \\(Y = \theta X\\) with \\(\theta > 0\\) called the space parameter. We have \\(F_Y(y) = F_X(y/\theta)\\) and, by taking the derivative on both sides, \\( f_Y(y) = 1/\theta \space f_X(y/\theta) \\)

### Raising to a power
Let \\(Y = X^{1/\tau}\\) with \\(\tau > 0\\). We have \\(F_Y(y) = F_X(y^{\tau})\\) and, by taking the derivative on both sides, \\( f_Y(y) = \tau y^{\tau - 1} f_X(y^\tau) \\). If \\( \tau < 0\\), express \\(S_Y\\) in terms of of \\(S_X\\) and then take the derivative on both sides to find an expression for \\(f_Y\\).

* If \\( \tau > 0\\), the new disrtibution is called **transformed**.
* If \\( \tau = -1\\), the new disrtibution is called **inverse**.
* If \\( \tau < 0\\) and \\( \tau \neq -1\\), the new disrtibution is called **inverse transformed**.

### Exponentiation
Let \\(Y = exp(X)\\). We have \\(F_Y(y) = F_X(ln(y))\\) and, by taking the derivative on both sides, \\( f_Y(y) = 1/y \space f_X(ln(y)) \\).

### Mixing
When a parameter \\( \lambda \\) of a distribution //(f_X\\) is a realization of a random variable \\( \Lambda \\), \\(f_X\\) is called a mixture distribution with density function:
\\[f_X(x) = E_{\Lambda}[f_{X \mid \Lambda}(x)] = \int f_{X \mid \Lambda} (x \mid \lambda) f(\lambda) d \lambda \\]
and cdf:
\\[F_X(x) = E_{\Lambda}[F_{X \mid \Lambda}(x)] = \int F_{X \mid \Lambda} (x \mid \lambda) f(\lambda) d \lambda \\]
The \\(k^{th}\\) moment is: \\( E[X^k] = E[E[X^k \mid \Lambda]]\\) and \\(Var(X) = E[Var(X \mid \Lambda)] + Var(E[X \mid \Lambda]) \\).

A mixture distribution usually has a heavy tail. It is often used to deal with parameter uncertainty.

### Frailty models
Frailty models form a subset of mixture distribution. Let's \\( \Lambda > 0 \\) a **frailty variable** which we introduce to quantify the uncertainty in the hasard rate function. We define the conditional hazard rate function for a random variable \\(X\\): \\(h_{X \mid \Lambda} (x \mid \lambda) = \lambda a(x)\\). The conditional survival function is:
\\[S_{X \mid \Lambda}(x\mid\lambda) = e^{-\int_{0}^{x} h_{X \mid \Lambda} (t \mid \lambda)dt} = e^{-\lambda A(x)}\\]
where \\(A(x) = \int_{0}^{x} a(t)dt \\).

The marginal survival function is then:
\\[S_{X}(x) = E_{\Lambda}[S_{X \mid \Lambda}(x\mid \Lambda)] = E_{\Lambda}[e^{-\Lambda A(x)}] = M_{\Lambda} (-A(x)) \\]
where \\(M_{\Lambda}\\) is a moment generating function of \\(\Lambda\\).

### Splicing
A **k-component spliced distribution** has density function:
\\[ f(x) = \sum_{i=1}^{k} a_i f_i(x) \mathbb{1}(c_{i-1} < x < c_i)\\]
with \\( a_i > 0 \space \forall i = 1,..., k \\) and \\( \sum_{i=1}^{k} a_j = 1\\);  \\(f_i\\) a density function well defined over the interval \\( (c_{i-1}, c_i)\\).

A good case application of spliced distributions is where the tail's behaviour is very different to small losses' behaviour.

### 2.4 Selected distributions and their relationships

### Parametric families
Many paramtric distributions are special cases of other ones. We present here two famous ones.

example 1: Transformed beta family

example 2: Transformed/inverse transformed gamma family

### Limiting distributions
One distribution can be a limiting case of another (by pushing the last one'parameters to their limiting values of zero or infinity).

### 2.5 Discrete distributions

### Some notations

Let N be random variable for modeling discrete phenomena.
The **probability function** (pf) is \\(p_k = P(N=k)\\) with \\(k = 0,1,2, ...\\) The **probability generating function** (pgf) is \\(P(z)=E[z^N]=\sum_{k=0}^{\infty} p_kz^k\\). It can be used to generate moments \\(p_m\\):
\\[P^{(m)}(z)= \sum_{k=m}^\infty k(k-1)...(k-m+1)z^{k-m}p_k \\]
For example, \\(P'(1)= E[N]\\) and \\(P"(1) = E[N(N-1)]\\)

### The Poisson distribution
Si \\(N \sim Poisson(\lambda)\\) avec \\(\lambda > 0\\) alors \\[p_k = e^{-\lambda}\lambda^k / k!\\]. From the pgf \\(P(z)=e^{\lambda(z-1)}\\), one can compute:
\\[ E[N]=P'(1)= \lambda \\]
\\[ E[N(N-1)]=P"(1)= \lambda^2 \\]
\\[ Var(N)]= \lambda \\]

The sum of independent Poisson variables is a Poisson variable. Indeed, if \\(N_k \sim Poisson(\lambda_k)\\) with \\(k=1,...,n\\) and all of \\((N_k)\\) are independent, one can show that \\( N= \sum_{k=1}^{n} N_k \sim Poisson(\sum_{k=1}^{n} \lambda_k) \\)


text:
---
title: Student Voices Blog - Northern Illinois University
summary: Helped Write, Publish, and Manage NIU CoB's Social Media.
tags:
- Social Media
- Writting
date: 2017-05-27T00:00:00Z
external_link:
image:
  caption: Photo by NIU College of Business
  focal_point: Smart

---
As Director of Marketing, created the weblog topic structure, contribute guest posts, and guide three student writers todate (listed as authors here) on content development. Administer the weblog and post broadcasts across all college digital channels.

[Student Voices Blog](http://cobalpha.niu.edu/studentvoices/)

license: MIT

repository: LouisZmich/zmich-consulting

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: LouisZmich/zmich-consulting


text:
# VM Status

The state this server is in. Valid values include

```
 ``ACTIVE``,
``BUILDING``,
``DELETED``,
``ERROR``,
``HARD_REBOOT``,
``PASSWORD``,
``PAUSED``,
``REBOOT``,
``REBUILD``,
``RESCUED``,
``RESIZED``,
``REVERT_RESIZE``,
``SHUTOFF``,
``SOFT_DELETED``,
``STOPPED``,
``SUSPENDED``,
``UNKNOWN``,
``VERIFY_RESIZE``
```

repository: nayeembaig/cloudmesh-cloud

repo_name: nayeembaig/cloudmesh-cloud


text:
---
title: "Setting up a simple Blog with a Static Website Generator - Preface"
date: "2015-12-20"
description: "This outlines a series of blog posts that covers how to setup a simple blog using a static website generator."
categories:
    - "Education"
    - "Explanation"
    - "Tutorial"
tags:
    - "Hugo"
    - "CSS"
    - "HTML"
---

## Preface

This series of blog posts outline how to setup a simple blog with a static website generator -- in particular this very same website.  While this series of blog posts are intended for people who are not web designers, I assume that the reader is technical and familiar with Git and HTML.  As much as possible, I will try to list out the exact commands to run and include links to references for further information.

The main source of inspiration of this series of blog posts was derived from the official Hugo [tutorial](https://gohugo.io/tutorials/github-pages-blog/) on setting up a blog generated by Hugo and hosted on GitHub Pages.

## The list of posts

- [Part 1: Introduction to Static Website Generators][xref-1]
- [Part 2: Installation and Recommended Pre-requisites][xref-2]
- [Part 3: Quickstart - Basic Configuration and Usage][xref-3]
- [Part 4: Hugo configuration details (simple)][xref-4]

- [Part 5: Lanyon CSS and static stuff][xref-5]
  - testing CSS with [jsfiddle]({{< relref "2015-12-25-lanyon-css.md#fiddle" >}})

- [Part 6: Hugo Layouts][xref-6]
  - explanation of partials
  - explanation of posts/li.html posts/single.html posts/summary.html
  - masthead - one reason for separate root/index.html  - also seems to be a Hugo requirement
  - Summary vs Description - for some reason summary formatting sucks
  - pagination
  - Footer

- [Part 7: Advanced Usage and Troubleshooting/debugging][xref-7]
  - "hugo config"
  - Dump variables during testing
  - Trials and Travails
  - "hugo help list drafts"
  - "hugo help list future"
  - RSS feed

- Part 8: Advanced Configuration (maybe worthy of dedicated blog posts each)
  - Taxonomies - Categories and Tags [Taxonomies]({{< relref "2015-12-28-hugo-taxonomies.md" >}})
  - [Post Archives list]({{< relref "2015-12-29-hugo-post-archives-section.md" >}}) section
  - [About Me]({{< relref "2015-12-30-hugo-about-section.md" >}}) section
  - Shortcodes  (can refer to later part of https://gowalker.org/github.com/bobthecow/hugo) [post on shortcodes]({{< relref "2016-01-01-hugo-shortcodes.md" >}})
  - [Pygments](http://pygments.org) code syntax highlighting  (need to install on Macs?)  [post on pygments]({{< relref "2015-12-31-hugo-code-block-syntax-pygments.md" >}})
  - Google analytics  [analytics]({{< relref "2016-01-01-hugo-google-analytics.md" >}})
  - Disqus  [post on disqus]({{< relref "2016-01-02-hugo-disqus.md" >}})

- [Part 9: how to host on Github Pages][xref-9]

- [Part 10: Basic Setup for Amazon Web Services][xref-10]

## Other related posts
- [Github Markdown][xref-11]
- [Atom editor][xref-12]
- [Cloudfront invalidate cache][xref-13]
- [Amazon S3 IA][xref-14]

[link-1]: http://gohugo.io
[xref-1]: {{< relref "2015-12-21-introduction-static-website-generator.md" >}}
[xref-2]: {{< relref "2015-12-22-installing-hugo.md" >}}
[xref-3]: {{< relref "2015-12-23-basic-config-usage.md" >}}
[xref-4]: {{< relref "2015-12-24-hugo-configuration-details-simple.md" >}}
[xref-5]: {{< relref "2015-12-25-lanyon-css.md" >}}
[xref-6]: {{< relref "2015-12-26-hugo-layouts.md" >}}
[xref-7]: {{< relref "2015-12-27-hugo-advanced-usage-troubleshooting-debugging.md" >}}
[xref-9]: {{< relref "2016-01-03-github-pages.md" >}}
[xref-10]: {{< relref "2016-01-04-amazon-web-services.md" >}}
[xref-11]: {{< relref "2015-12-22-github-flavored-markdown.md" >}}
[xref-12]: {{< relref "2015-12-22-atom-editor.md" >}}
[xref-13]: {{< relref "2016-01-05-invalidate-cloudfront-cache.md" >}}
[xref-14]: {{< relref "2016-01-06-amazon-s3-ia.md" >}}


text:
### [CVE-2020-2039](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-2039)
![](https://img.shields.io/static/v1?label=Product&message=PAN-OS&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=9.1%3C%209.1.4%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-400%20Uncontrolled%20Resource%20Consumption&color=brighgreen)

### Description

An uncontrolled resource consumption vulnerability in Palo Alto Networks PAN-OS allows for a remote unauthenticated user to upload temporary files through the management web interface that are not properly deleted after the request is finished. It is possible for an attacker to disrupt the availability of the management web interface by repeatedly uploading files until available disk space is exhausted. This issue impacts: PAN-OS 8.1 versions earlier than PAN-OS 8.1.16; PAN-OS 9.0 versions earlier than PAN-OS 9.0.10; PAN-OS 9.1 versions earlier than PAN-OS 9.1.4; PAN-OS 10.0 versions earlier than PAN-OS 10.0.1.

### POC

#### Reference
- https://security.paloaltonetworks.com/CVE-2020-2039

#### Github
- https://github.com/404notf0und/CVE-Flow

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# Today I Learn ([@skpaik](https://skpaik.github.io "@skpaik"))

Hi! I'm Sudipta Kumar Paik. I write everthing, what I learn everyday.

## Git Reset hard head

[cmd] in terminar

  `git reset --hard HEAD`

Ref: https://stackoverflow.com/q/9529078
>**Tech:**  `git`, `reset`

>**Date:** 2020-04-15

## Python apply `PEP8` Standard

[cmd] in active virtualenv

  `pip install isort`

From the command line:

  `isort mypythonfile.py mypythonfile2.py`

From recursively:

  `isort -rc .`

or to see the proposed changes without applying them:

  `isort mypythonfile.py --diff`

Ref: https://pypi.org/project/isort/
>**Tech:**  `python`, `pep8`, `standard`

>**Date:** 2020-04-01

## Edit Mac's Hosts file
Install the MySQL server by using the Ubuntu package manager:

- Open a Finder window.
- Select Applications from the sidebar.
- Double-click on Utilities.
- Double-click Terminal.
- type `sudo nano /etc/hosts` and then hit return.
- Enter your administrator password and then hit return.
Once you're done, hold down the control and O keys to save the file, then control and X to exit.
- One last step: `sudo killall -HUP mDNSResponder`

Ref: https://www.imore.com/how-edit-your-macs-hosts-file-and-why-you-would-want#how-to-edit-the-hosts-file
>**Tech:**  `host`, `mac`

>**Date:** 2019-11-13

## Python3 Virtualenv in MAC OS

##### 1. Install virtualenv
> `sudo pip install virtualenv`

##### 2. Start virtualenv in python3
> `virtualenv -p python3 .env`

Here **.env** is environment name

##### 3. Activate virtualenv in python3
>  `source .env/bin/activate`

##### 3. Deactivate virtualenv in python3
>  `source deactivate`

>**Tech:**  `python3`, `virtualenv`, `mac`

>**Date:** 2019-10-31

## Install Docker CE in Ubuntu

##### 1. Update the `apt` package index:
`sudo apt-get update`

##### 2. Install packages to allow `apt` to use a repository over HTTPS::
`sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common`

##### 3. Add Docker’s official GPG key:
`curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -`

##### 4. Verify that you now have the key with the fingerprint:
`sudo apt-key fingerprint 0EBFCD88`

##### 5. Use the following command to set up the stable repository:
`sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"`

##### 6. Update the `apt` package index:
`sudo apt-get update`

##### 7. Install the latest version of Docker CE and containerd:
`sudo apt-get install docker-ce docker-ce-cli containerd.io`

##### 8. Verify that Docker CE is installed correctly by running the `hello-world` image:
`sudo docker run hello-world`

##### 9. Create the `docker` group:
`sudo groupadd docker`

##### 10. Add your user to the `docker` group:
`sudo usermod -aG docker $USER`

Ref: https://docs.docker.com/install/linux/docker-ce/ubuntu/
>**Tech:**  `docker`,`docker-ce`,`ubuntu`

>**Date:** 2019-07-01

## Remove Docker Containers, Images, Volumes, and Networks

##### Removing All Unused Objects

`sudo docker system prune`

##### Remove all unused volumes

`sudo docker system prune --volumes`

##### List of all active and inactive images
`sudo docker image ls -a`

##### Remove one or more images

`sudo docker image rm 75835a67d134 2a4cca5ac898`// Here '75835a67d134' & '2a4cca5ac898' is image ID

##### Delete all local Docker images
`docker rmi -f $(docker images -a -q)`

##### Delete all Docker containers including its volumes use
`docker rm -vf $(docker ps -a -q)`

##### List of all active and inactive containers

`sudo docker container ls -a`

##### Remove one or more containers

`sudo docker container rm cc3f2ff51cab cd20b396a061` // Here 'cc3f2ff51cab' & 'cd20b396a061' is container ID

##### Stop and remove all containers

`sudo docker container stop $(sudo docker container ls -aq)`

`sudo docker container rm $(sudo docker container ls -aq)`

N.B.: if no container running, then error may shown.

##### Completely uninstall docker

##### Step 1:
`sudo dpkg -l | grep -i docker`

##### Step 2:
`sudo apt-get purge -y docker-engine docker docker.io docker-ce`
`sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce`

##### Step 3:
`sudo rm -rf /var/lib/docker`
`sudo rm /etc/apparmor.d/docker`
`sudo groupdel docker`
`sudo rm -rf /var/run/docker.sock`

##### Uninstall old versions:
`sudo apt-get remove docker docker-engine docker.io containerd runc`

Ref:
1. https://linuxize.com/post/how-to-remove-docker-images-containers-volumes-and-networks
2. https://askubuntu.com/a/1021506/700201
>**Tech:**  `docker`, `ubuntu`

>**Date:** 2019-03-06

## Installing nano and vim in docker/Ubuntu

`apt-get update`

`apt-get install vim nano`

Ref: https://stackoverflow.com/a/37156748/705293
>**Tech:**  `vim`, `docker`, `nano`, `ubuntu`

>**Date:** 2019-03-06

## Installing MySQL in Ubuntu
Install the MySQL server by using the Ubuntu package manager:

`sudo apt-get update`

`sudo apt-get install mysql-server`

Ref: https://support.rackspace.com/how-to/installing-mysql-server-on-ubuntu/
>**Tech:**  `mysql`, `ubuntu`

>**Date:** 2019-03-04

## Uninstalling MySQL in Ubuntu

Use apt to uninstall and remove all MySQL packages:

`sudo apt-get remove --purge mysql-server mysql-client mysql-common -y`

`sudo apt-get autoremove -y`

`sudo apt-get autoclean`

Remove the MySQL folder:

`sudo rm -rf /etc/mysql`

Delete all MySQL files on your server:

`sudo find / -iname 'mysql*' -exec rm -rf {} \;`

Ref: https://help.cloud66.com/node/how-to-guides/databases/shells/uninstall-mysql.html

>**Tech:**  `'mysql'`, `ubuntu`
>**Date:** 2019-03-04

## Mongo dump and restore command
Dump or Take backup:

`mongodump -h <IP_ADDRESS>:27017 -d dbname --out bjson_folder`

Restore to database:

`mongorestore -h <IP_ADDRESS>:27017 -d dbname bjson_folder/dbname`

>**Here:**

>Host = <IP_ADDRESS>:27017(-h)

>Database name = dbname(-d)

>Dump locations BSON/JSON files = bjson_folder/(dbname auto create)(--out)

>Restore Locations of backup BSON/JSON folders = bjson_folder/dbname

>**Tech:**  `mongodb`

>**Date:** 2019-02-27

## Docker entering file system
`docker ps`

`docker exec -it name-of-container bash`
>**Tech:**  `docker`

>**Date:** 2019-02-07

## Unit Testing in ExpressJs(NodeJs)
Ref: https://codehandbook.org/unit-test-express-route
>**Tech:**  `mocha`, `nodejs`, `expressjs`

>**Date:** 2019-01-28

## Install Python & Django on Windows
Run command on Powershell

Download from https://www.python.org/downloads/

`pip install virtualenv`

`cd ~/Desktop`

`mkdir pages`

`cd pages`

`virtualenv venv`

`.\venv\Scripts\activate`

`pip install django`

`django-admin startproject app .`

`python manage.py startapp pages`

`deactivate`

Ref: https://www.codingforentrepreneurs.com/blog/install-python-django-on-windows/

>**Tech:**  `django`, `python`

>**Date:** 2019-01-23

## Activate PyCharm
* Ref: https://www.codeblogbt.com/archives/282803
* Or you can activate using [PyCharm_Activation_Code.txt](https://github.com/skpaik/today-i-learn/blob/master/PyCharm_Activation_Code.txt)
* Before activate please update hosts file to
`<IP_ADDRESS> account.jetbrains.com`
>**Tech:**  `pycharm`, `python`
>**Date:** 2019-01-22

## Check out a remote Git branch
`git checkout -b feature_connect_issue remotes/origin/feature_connect_issue`
Ref: https://stackoverflow.com/a/1783426/705293
>**Tech:**  `'git'`
>**Date:** 2019-01-16

## Delete Local Branch
`git branch -D branch_name`
Ref: https://stackoverflow.com/a/2003515/705293
>**Tech:**  `'git'`
>**Date:** 2019-01-16

## How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the **L**inux operating system, with the **A**pache web server. The site data is stored in a **M**ySQL database, and dynamic content is processed by **P**HP.
Ref: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
>**Tech:**  php, mysql
>**Date:** 2019-01-10

## Faveo
Faveo is a suport ticket system.
Ref: https://github.com/ladybirdweb/faveo-helpdesk
>**Tech:**  `'php'`,`'mysql'`
>**Date:** 2019-01-10

**Table of Contents**

[TOCM]

[TOC]

repository: swipswaps/today-i-learn

repo_name: swipswaps/today-i-learn


text:
ToDo
----

##Now
  * restrict file request to server root
  * pypy registration
  * mvp deployment

##Later
  * implemnet event subscription
  * implement log subscription
  * documentation
  * bitstar
  * event screen
  * task screen
  * generator screen
  * documentation
    * extract CliServProtocol from todo list into documentation
	  * Document Client-Server Protocol
	    * Client can have  N subscriptions from server
	      * MVP will have 1 or 2 subscriptions:
	        * events subscription (always on)
	          { action : 'subscribe',
	            source : 'events',
	            args: { interval-type : 'z' ,
	                    interval-time : '31' ,
	                    event-type : '*' }
	          }
	        * log subscription (only when run screen is open and displaying live run)
	          { action : 'subscribe',
	            source : 'run',
	            args: { task_id : '382' ,
	                    run_num : '3'   }
	          }
	    * Client can request data from server:
	      * odd event (event outside of subscription)
	        * { action: 'get', source: 'event', args: { event_id: 35 } }
	        * { action: 'get', source: 'event', args: { task_id: 3 } }
	      * search query (not a priority for MVP, ignore it for now just keep in mind more types of requests)
	        * { action: 'get', source: 'search', args: { q: 'djfl djfld dlfj' } }
	    * Client can request action from server
	      * { action: 'change', source: 'tasks', args: { apply: 'PAUSE', task_id: [ 383, 385, 387 ] } }
    * home page and quick start
    * convert docs MD into rst
	  * pandoc ?
  * Testing
   * test interaction in phantomjs
   * javascript tests and coverage
   * Subscription cases
     * [word1 word2] (search in event_string, task_name, generator name)
     * :a[age in days]
     * :e[event_id]
     * :t[event_task_id]
     * :h[event_task_id.run] historical log
     * :l[event_task_id] latest run log
     * :g[generator_id]
  * UI
    * hover over depend_on shows arrows

##Done
  * get log fragment event_id/task_id/run/start/end call
  * display log
  * implement log screen (run screen)
  * send task actions
  * document and implement utils.flatten_liks
  * refactor dropdowns: remove click and navigate to url
    * events url should be: /events/z/31/*
    * dropdowns should dynamically change url
  * design client server protocol able to:
    * to process actions
    * to implement log subscription
    * to pull info on events from outside query
  * runs link from event query
  * query screen
    * selected tasks sidebar
    * automatic action bar
  * back button bug
  * Implement swithching between screens
  * design Nav bar,toolbar ad sidebar
  * Bug: history does not refresh if same url provided in push state.
  * implement on sever side globals.meta.TimeVars
  * url scheme
	  * event list url: /events/<filter>?q=<search>
	  * event summary url: /event/3
	  * task summary url: /task/320
	  * log screen url: first log /log/320/0, last: /log/320/-1
   * UI
     * chckbox and link in table
   * generator schema changes
   * Generator object
   * Generator.setupEvent
   * Generator.nextEvent
   * Define screens, subscriptions
   * Action matrix
   * db changes
     * rename tables:
       * task -> task_type,
       * event_task*->task*
     * add updated_dt to event and change it on every task update
     * update db_model.pdf
  * cache superset of u31 and s31
  * key_group_value
    * write class
    * write tests
      * generic test
      * kval test
  * documentation
  	* document and test on ontimer.utils module
  	* learn sphinx
  * data propagation tree subscribers and filters
  	* design
  	* implementaion
    * implement subscriptions tracker object on server side with data propagation tree.
    * now freeze date
  	* test
  * Consider better name KeyGroupValue
   * Refactor
     * websocket connection from javascript (no hard coding)
  * rework page design with bootstrap
  * documentation
    * structure skeleton
    * templates for all modules

repository: walnutgeek/OnTimer

repo_name: walnutgeek/OnTimer


text:
# Office UI Fabric Date Picker

The Date Picker that comes out of the box, is a bit clunky, compared to what is available in Office UI Fabric. You can swap the existing DateOnly field, with this custom control.

## Add Custom Control to the field

![alt text](/images/addcontrol.jpg "Add the custom control to the field")

## Configure the control

![alt text](/images/configurecontrol.jpg "Add the custom control to the field")

## Use the control on Unified Interface form

![alt text](/images/usecontrol.jpg "Add the custom control to the field")


text:
# SpaceCaper

You can find the deployed project at (https://serene-snyder-b41916.netlify.com/).

## Contributors

|                                       [Arvin Agas](https://github.com/arvagas)                                        |                                       [Laura Daugherty](https://github.com/laura-daugherty)                                        |                                       [Lloyd Edwards](https://github.com/tactnician)                                        |                                       [Matthew Harshman](https://github.com/mjh09)                                        |                                       [Chance Dare](https://github.com/)                                        |
| :-----------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: |
|                      ![](https://avatars3.githubusercontent.com/u/10844020?s=400&v=4)                       |                      ![](https://avatars0.githubusercontent.com/u/49730401?s=400&u=21759ec2d44b4ff13c7e981ca9e9e32ec600c21a&v=4)                       |                      ![](https://ca.slack-edge.com/T4JUEB3ME-UES9LV23Z-cd5f6267284a-48)                       |                      ![](https://avatars0.githubusercontent.com/u/37376708?s=400&v=4)                       |                      ![](https://avatars3.githubusercontent.com/u/46852089?s=460&v=4)                       |

## Project Overview

[Trello Board](https://trello.com/b/0i0r5Xe5/cs-bw1)

Our project is a simple MUD game connecting with a Django backend that displays rooms from a map as the character moves through the game.

### Key Features

-    Authorization
-    Player can move
-    Player can initialize a game

## Tech Stack

### Front end built using:

#### React
#### Axios
#### Semantic UI
#### Styled Components
#### React Router
#### Terminal In React
#### Styled Components

#### Front end deployed to Netlify

# Installation Instructions

Install packages with the package manager npm by navigating to the root folder and using the comman
```npm i```

## Other Scripts

```npm start``` starts the local server to view and play the game in your browser.

# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a [code of conduct](./CODE_OF_CONDUCT.md). Please follow it in all your interactions with the project.

## Issue/Bug Request

 **If you are having an issue with the existing project code, please submit a bug report under the following guidelines:**
 - Check first to see if your issue has already been reported.
 - Check to see if the issue has recently been fixed by attempting to reproduce the issue using the latest master branch in the repository.
 - Create a live example of the problem.
 - Submit a detailed bug report including your environment & browser, steps to reproduce the issue, actual and expected outcomes,  where you believe the issue is originating from, and any potential solutions you have considered.

### Feature Requests

We would love to hear from you about new features which would improve this app and further the aims of our project. Please provide as much detail and information as possible to show us why you think your new feature should be implemented.

### Pull Requests

If you have developed a patch, bug fix, or new feature that would improve this app, please submit a pull request. It is best to communicate your ideas with the developers first before investing a great deal of time into a pull request to ensure that it will mesh smoothly with the project.

Remember that this project is licensed under the MIT license, and by submitting a pull request, you agree that your work will be, too.

#### Pull Request Guidelines

- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes to the interface, including new plist variables, exposed ports, useful file locations and container parameters.
- Ensure that your code conforms to our existing code conventions and test coverage.
- Include the relevant issue number, if applicable.
- You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.

### Attribution

These contribution guidelines have been adapted from [this good-Contributing.md-template](https://gist.github.com/PurpleBooth/b24679402957c63ec426).


text:
# Configuration Structure

These configuration sources are merged in the following order to produce config
for each hub.

| Source | Maintainer | Notes |
| - | - | - |
| Upstream defaults from z2jh | z2jh maintainers | [`hub-templates/basehub/Chart.yaml`](https://github.com/2i2c-org/pilot-hubs/blob/master/hub-templates/basehub/Chart.yaml) lists the z2jh version. Most of our configuration is directly from upstream |
| [`hub-templates/basehub/values.yaml`](https://github.com/2i2c-org/pilot-hubs/blob/master/hub-templates/basehub/values.yaml) | 2i2c engineers | Common to all hubs run from this repo |
| [Deployment script](https://github.com/2i2c-org/pilot-hubs/blob/master/deploy) | 2i2c engineers | Programmatic overrides for each type of hub, particularly around Auth0 integration and home page customization |
| [`config/hubs` (previously `hubs.yaml`)](https://github.com/2i2c-org/pilot-hubs/blob/master/config/hubs) | 2i2c engineers | Specific to each hub. There is one YAML file per cluster, and each cluster can have multiple hubs deployed.  [`config/hubs/schema.yaml`](https://github.com/2i2c-org/pilot-hubs/blob/master/config/hubs/schema.yaml) contains documentation and validation information for fields in this set of configuration. |
| [Configurator schema defaults](https://github.com/2i2c-org/pilot-hubs/blob/6248cf84f2e888cb89bbb75e591e9507dabf6f3c/hub-templates/basehub/values.yaml#L125) | 2i2c engineers | **If** there is a default set in the schema for available options in the configurator, it will always override the config elsewhere in our YAML files |
| Configurator | Hub admins | If hub admins 'unset' a value, it should go to what's configured via our yaml files|

## Location of common configuration

Finding out what the value for a particular piece of configuration is can be
a bit tricky, since there are many places to look at. Here, we'll look at some common
pieces of config people want to know values for, and where you can find them.

### Memory limits

The default memory limit and guarantee for all users across all our hubs is set
in [`hub-templates/basehub/values.yaml`](https://github.com/2i2c-org/pilot-hubs/blob/master/hub-templates/basehub/values.yaml#L104),
under `jupyterhub.singleuser.memory`. This is sometimes overriden on a per-hub
basis in the config for the hub under [`config/hubs`](https://github.com/2i2c-org/pilot-hubs/blob/master/config/hubs)

repository: balajialg/pilot-hubs

repo_name: balajialg/pilot-hubs


text:
#  HAMS Server
Primary Developer: [Majeed Mirza](https://github.com/MajeedMirza)

## About
The main logic for the server is located in the [node.service.js](services/node.service.js) file.
The [nodes.controller.js](controllers/api/nodes.controller.js) file handles api calls and routes them to the correct function in [node.service.js](services/node.service.js). The file which initiates the server is [server.js](server.js).

## Installation
Get [Node.js](https://nodejs.org/en/)

Clone the project

npm is the default package manager for Node (included in Node installation) and is used to install the [dependencies](package.json) for the project.

From within the project folder run this command in the terminal to install all required packages:
```
npm install
```

To start the server use this command in the terminal:
```
node server.js
```

Go to [http://localhost:3001](http://localhost:3001) in your browser to confirm that the HAMS Server is up and running.

## Testing
To run tests change the TEST variable to true in [config.json](config/config.json) then restart the server.

repository: MajeedMirza/HAMS

repo_name: MajeedMirza/HAMS


text:
# Singularity / Docker HPC Base image for building complex HPC Applications

## Purpose
To provide the docker container for singularity

## Build
- This project provides a simple Dockerfile for the purpose of illustration only. You need to extend/modify the Docker to
support whatever you want to do.
```
./build.sh
```

## Run
- To run the simple build image
```
./run.sh
```

## Reference
* [Singularity Tutorial](http://www.hpcadvisorycouncil.com/events/2017/stanford-workshop/pdf/GMKurtzer_Singularity_Keynote_Tuesday_02072017.pdf#43)
* [Singularity Tutorial](https://github.com/NIH-HPC/Singularity-Tutorial)
* [Singularity ware](https://github.com/singularityware/singularity/releases/)
* [Singularity for HPC ready?](https://www.researchgate.net/publication/321449363_Is_Singularity-based_Container_Technology_Ready_for_Running_MPI_Applications_on_HPC_Clouds)
* [Infiniband Driver](https://pkg-ofed.alioth.debian.org/howto/infiniband-howto-2.html)
* [Docker-to-Singualrity](https://github.com/singularityware/docker2singularity)
* [Singlarity](http://singularity.lbl.gov/docs-hpc)
* [OSU Microbenchmark](http://mvapich.cse.ohio-state.edu/benchmarks/)
* [OSU Microbenchmark Tutorial & Comparing InteMPI, OpenMPI, MVAPICH2] (https://ulhpc-tutorials.readthedocs.io/en/latest/advanced/OSU_MicroBenchmarks/)
* [Installation of OpenMPI] (http://lsi.ugr.es/jmantas/pdp/ayuda/datos/instalaciones/Install_OpenMPI_en.pdf)
* [OpenMPI](https://www.open-mpi.org/software/ompi/v3.0/)

repository: DrSnowbird/docker-hpc-base

repo_name: DrSnowbird/docker-hpc-base


text:
# Dotenv

> Load variables from the .env file.

Script to load variables described in a `.env` file before executing given command.

## Usage

Create a `.env` file.

```
PORT=3000
```

Then run your command prefixing it with `./dotenv`. e.g.

```shell
$ ./dotenv rails server
```

You also can _source_ the script to load the variables into a bash script.

```bash
source ./dotenv
echo $PORT
```

## License

The MIT License © 2017 Arthur Corenzan

repository: corenzan/dotenv

repo_name: corenzan/dotenv


text:
# streaker

Translates GitHub activity feeds into contribution streak status feeds.

(NOTE: README-driven development, doc state does not reflect code state)

## Update

Development on this project as described, beyond the initial planning stage, was discontinued in favor of a self-contained [on{x} recipe](https://www.onx.ms/#!recipeEditPage?scriptId=1380788571578731581&isPublished=true).

## How would this have worked?

GET a route in the app, the server will read your current GH activity feed and return an RSS item representing your current streak status. (Yes, _an_ item. It's ephemeral data- this only cares about whether you're streaking or you're not, the past is inconsequential.)

## What would it have been used for?

Plug your feed URL into the app as the input to an externally managed feed reader so you can get ghetto notifications about when your GitHub streak is in danger.

## Why?

Because I have a pigheaded sense of pride about my GitHub streak, and I want notifications when I'm in danger of breaking it, so I don't just absentmindedly forget to contribute one day and kill my streak (as I did on [March 22](https://github.com/stuartpb?tab=contributions&from=2013-03-22) and [September 29, 2013](https://github.com/stuartpb?tab=contributions&from=2013-09-29)).

repository: stuartpb/streaker

repo_name: stuartpb/streaker


text:
# Towers of Hanoi

A white board challenge intedned to help us explore data structures.

## Challenge

The Towers of Hanoi is a mathematical puzzle where you have 3 towers and N disks of different sizes.
The puzzle starts with the disks sorted (i.e. smaller disks sits on top of larger disks) on the left-most tower, and the objective of the puzzle is to move the disks to the right-most tower with the following restrictions:

- Only one disk can be moved at a given time.
- A disk is moved from the top of a tower to the top of another tower.
- A disk can't be placed on top of a smaller disk.

## Solution

I am using my own implimentation of a Stack and Node in this problem for practice.

The solution path for the puzzle in the case was harder than the implimentation. After some research I settled on the solution path as follows:

- A to B | A to C | B to C
- A to B | C to A | C to B
- A to B | A to C | B to C
- B to A | C to A | B to C

Once I settled on a recurring pattern figuring out the recursive steps was much simpler.
I set up the base case to be when we only had one disk left to move. The recursive case rotates the tower position makes the move, prints the move to the console and then continues the process.

![towers-of-hanoi.jpg](../../assets/towers-of-hanoi.jpg)

gha_language: C#


text:
# AmbientLight

Create an ambient light source which illuminates all the objects equally. Ambient light comes from all directions, adding ambient light ensures that object colors are rendered but does not show structure in 3D objects like directional and point lights do. Only one ambient light is supported.

Two spheres with ambient light

## Usage

Create an ambient light source with color and intensity.
```js
const ambientLight= new AmbientLight({
  color: [128, 128, 0],
  intensity: 2.0
});
```

## Methods

### constructor

The constructor for the `AmbientLight` class. Use this to create a new `AmbientLight`.

```js
const ambientLight = new AmbientLight({color, intensity});
```

* `color` - (*array*,)  RGB color of ambient light source, default value is `[255, 255, 255]`.
* `intensity` - (*number*) Strength of ambient light source, default value is `1.0`.

gha_language: TypeScript


text:
# PsdProperties
Represents information about PSD image

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bitsPerChannel** | **number** | Gets or sets the bits per channel. |
**channelsCount** | **number** | Gets or sets the channels count. |
**colorMode** | **string** | Gets or sets the color mode. | [optional]
**compression** | **string** | Gets or sets the compression. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[View Source]](../src/models/psdProperties.ts)


text:
# Running the example
Run the following command: `python3 Korg.py --name='smallDemo2' --dir='./demo/smallDemo2/*'` in the top level directory.
Expect: `We could not find any (model, (N), phi)-attacker A.`
# P and Q
P and Q are represented by the NFAs below. The Phi  is `G F w`, which can be read as always eventually `w = 1`. Just from looking at the diagrams below it should become apparant that this Phi might not be made true by P and Q. Study the diagrams and then read the explanation below.

# P Diagram
```
                                         A!
                                      +------+
                                      |      |
                                      |      v
+------------+                     +--+------+--+
|            |                     |            |
|            |        A!, B!       |            |
|   W == 1   +-------------------->+   W == 0   |
|            |                     |            |
|            |                     |            |
+------------+                     +------------+

```
# Q Diagram
```
+------------+                     +------------+
|            |         B?          |            |
|            +-------------------->+            |
|     Q0     |                     |     Q1     |
|            +<--------------------+            |
|            |         A?          |            |
+------------+                     +------------+

```

# Explanation
This Phi cannot be made false given P and the IO interface of Q. The point of this example is to show the limits of the tool. Since the original Phi cannot be made true given P and Q, finding an attacker will be a trivial exercise because attackers typically invalidate a property that was once valid.

repository: maxvonhippel/AttackerSynthesis

gha_language: Python

repo_name: maxvonhippel/AttackerSynthesis


text:
---
layout: post
title: Daily Report - 10/23
description: "daily report -- record what I learned today"
modified: 2016-10-23
tags: [daily log, ]
image:
  feature: Lascaux/Lascaux_II.jpg
  credit: Lascaux
  creditlink: https://en.wikipedia.org/wiki/Lascaux
---

Under the hood:
<hr>
The underlying implementation of a product implies that the implementation is not intuitively obvious from the apprearance,but the speaker is about to enable the listeners to grok it.

We can define RDDs any time we want, but Spark computes them only in a ***lazy fashion*** -- that is, the first time we used in an action. Explanation: This approach might seem unusual first, but makes a lot of sense when you are working with Big Data. Explanation: Save storage space and computing time. Once Spark sees the whole chain of transformations, it can compute just the data needed for its result.

unused but learned:

If you would like to reuse an RDD in ***multiple*** actions, you can ask Spark to persist it using RDD.persist(). We can ask Spark to persist our data in a number of persist using RDD.persist().

workflow,work as follows:

1. Create some input RDDs from external data
2. Transform them to define new RDDs using transformations like filter()
3. Ask Spark to persist() any intermmediate RDDs that will need to be reused
4. Launch actions such as count() and first() to kick off a parallel computation, which is then optimized and executed by Spark.

two way to create RDD:

- load data from external dataset
- parallelize a collection

To decide whether a given function is a transformation or an action, you can look at its return type: transformations return RDDs, whereas actiosn return some other data type.

use take( ) to retrieve a small amount of elements from the RDD.

use collect() to retrieve the entire RDD. It is useful when the RDD is downsized to a small one and you want to deal with it locally. Keep in mind that your entire dataset must fit in memory on a single machine.

In most cases, the RDDs are just too large to be collecte()d to the drive. Then it's common to write these data out to a distributed stoage system such as HDFS or Amazon S3. You can save the contents of an RDD using the saveAsFiles() action, saveAsSequenceFile(), or any of a member of actiosn for various built-in formats.

It's important to note that each time we call a new action, the entire RDD must be computed "from scratch". To avoid this efficiency, users can persist intermediate results.

lazy evalation: Spark will not begin to execute until it sees an action.

Serializable:
To serialize an object means to convert its state to a byte stream so that the byte stream can be reverted back into a copy of the object.


text:
# Eat-Da-Burger!

## Description
A restaurant application that allows users to log the names of burgers they would like to eat and track burgers they have already devoured. This app is deployed with Heroku using the Jaws database. This burger logger stores all burgers in the burger database, whether devoured or not!

## Table of Contents
* [Screenshot](#screenshot)
* [Contributing](#contributing)
* [Questions](#questions)
* [Links](#links)

## Usage
Whenever a user submits a burger's name, the application will display the burger on the left side of the page, waiting to be devoured. Each burger in the waiting area also has a "Devour it!" button. When the user clicks it, the burger will be moved to the right side of the page with all the "devoured" burgers.

Added the wrong burger or pressed the devour button prematurely? Users are able to delete any burger from either list or revert a devoured burger back to the waiting area.

![](./public/assets/images/screenshot.png)

## Contributing
To contribute to this project you can fork this GitHub repository.

## Questions
If you have any additional questions about this application you can reach out to me at<EMAIL_ADDRESS>You can check out some of my other projects at briannahebeler (https://github.com/briannahebeler).

## Links
* Deployed Application: https://burger-briheb.herokuapp.com/

* GitHub Repo: https://github.com/briannahebeler/burger

repository: briannahebeler/burger

repo_name: briannahebeler/burger


text:
---
title: WHS 1st X1 boys hockey team eye Manawatu Secondary Schools contest three-peat
date: 2019-08-21T04:32:18.006Z
tags:
  - Hockey
  - 1st XI Hockey
  - Manawatu Secondary Schools
  - Patrick Madder
  - Central U18
  - Sport
image: >-
  https://res.cloudinary.com/whanganuihigh/image/upload/v1566362166/WHS_1st_X1_ManawatuSS_contest_Chron_21.8.19.jpg
image_title: >-
  The strong Whanganui High School 1st X1 hockey team features New Zealand and
  Central U18 player Patrick Madder.
description: WHS 1st X1 boys hockey team eye Manawatu Secondary Schools contest three-peat.
short: WHS 1st X1 boys hockey team eye Manawatu Secondary Schools contest three-peat.
---
The Whanganui High School boys 1st X1 hockey team head into this evening's Manawatu Secondary Schools Division 1 final as favourites over Feilding High School.

During round robin play this season, the strong WHS side drew with Feilding before beating them 2-nil and tonight they will be hunting a three-peat in the Manawatu competition.

Named Senior Team of the Year at the Whanganui High School sports awards last season, the side includes New Zealand under-18 player Patrick Madder.

Coming off winning the 2017 Manawatu Secondary School Division 1 competition, the team knew they could be strong contenders for the trophy again in 2018. The boys had a consistent season, playing 23 games.

They drew two and won 21. They scored 122 goals and only had 12 scored against them, finishing the competition winning the Manawatu grade, making them back-to-back champs.

The team then went on to perform well at the Founders Cup in Palmerston North over winter tournament week winning the Tier 2 grade, which has given them the opportunity to play at Rankin Cup (Tier 1) in Christchurch in a fortnight.

Team manager Darrell Hoskin, however, was in no doubt Feilding would be tough and could certainly not be considered pushovers.

"Feilding High School has put a lot into the sports teams, including hockey. Their hockey and rugby sides are touring Japan later this year, so they will be hungry," Hoskin said.

"We do have a very strong side, though and will be playing to win."

_By Staff Reporter_
_Whanganui Chronicle 21/8/19_

gha_language: Blade


text:
\pagenumbering{gobble}

# Jonathan Sanders

## Experience

#### Recurse Center - Participant *September 2016 - present*
`Python`, `Flask/Django`, `Postgres/SQLAlchemy/SQL`, `Javascript`, `Full-Stack Web-Development`

I built [winthemini](https://github.com/j10sanders/crossword) - a social network for people who do the NYT Daily-Mini Crossword puzzle, contributed to open source projects like [proselint](http://proselint.com/), pair programmed on a bunch of projects, and learned Javascript.

#### Access Softek - Manager of NYC and Online Banking Tech Support/ IT/ Project Manager *2014 - 2016*

`SQL`, `Networking`, `Mobile Development`, `Project Management`, `Agile`

I managed the NYC group of Tech Support specialists and all technical support for our Online Banking product. I had widespread responsibilities that included: training, troubleshooting (often on Credit Unions' servers), and managing projects.

- Trained and oversaw on-boarding of new tech-support staff.
- Managed the NYC tech support team and all tech support working with our Online Banking product.
- Managed projects, such as the development of our ticket ticket-tracking software ([Request Tracker](https://bestpractical.com/request-tracker)).  I also led our internal transition from Redmine to Jira, and our transition from GoToMeeting to ScreenConnect.
- Managed product development for fixing bugs in live apps and making them ADA compliant.  I also managed/set sprints for Online Banking features and bug fixes.

#### Helm Society - Assistant to CEO/ Program Manager *2012 - 2014*

I worked alongside CEO Josh Klenoff in every stage of building this company.  I sold, managed accounts, recruited, and coded our account management processes.

- Managed a team of three programmers who customized “micro-site invitations” made with Ruby on Rails.
- Built company processes, including a system that ensured salesmen had a sufficient funnel of leads every day -- by delegating simple email responses and call-scheduling to an offsite team.  I also created an extensive CRM using just Google Docs (I believe it is still in use).

## Education

#### NYU - BA in Philosophy with a Minor in Business Studies  *2013*

#### Online (Coursera, Thinkful, Udacity): *2014 - current*
`Python`, `Full-Stack`, `Discrete Math`, `Algorithms`, `Databases for Python`, `Programming Languages`

## Skills & programming languages

- Python with web development in Flask and Django.
- Building and maintaining SQL databases, Postgres, SQLAlchemy
- Javascript, Ruby, Lisp/Racket, ML, Java
- HTML, CSS


text:
# PubNub HTML5 Modern JavaScript Library

PubNub for JS Docs have been moved to: http://www.pubnub.com/docs/javascript/javascript-sdk.html

#### Supports "Modern" Browsers

repository: eduarmreyes/agilityfeatrtc

repo_name: eduarmreyes/agilityfeatrtc


text:
## Code of Conduct

Be cooperative when you ask for help. We will spend time helping you for free,
so be please ready to spend your time too:
 * Read the server documentation and [Troubleshooting](doc/Troubleshooting.md)
   guide first to see if you can resolve the issue yourself.
 * Describe thoroughly the issue you are having and include (only the) relevant
   portions of server logs.
 * Be ready to repeat the course of actions against latest server binaries to
   generate more debug information or verify the bugfix.
 * Be ready to investigate behaviour of your device or gateway. These can be
   faulty too.

Be respectful to the maintainers and other contributors. Open source contributors
put long hours into developing projects and doing user support. Those projects
and user support are available for free. We believe this deserves some respect.

repository: gotthardp/lorawan-server

gha_language: Erlang

repo_name: gotthardp/lorawan-server


text:
---
layout: post
title:  "Will Apartment Storage Ideas Ever Rule the World"
postname: "apartment-storage-ideas"
date:   2017-07-24 10:08:07 +0700
categories: [resume]
---
 What Experts Aren't Saying About Apartment Storage Ideas and What This Means For You
======================================================================================

 What Apartment Storage Ideas Is - and What it Is Not
------------------------------------------------------

Property ValueBuilding an apartment space over the garage can help raise the worth of your premises. Apartment living is an excellent method to conserve money and you've got the liberty of moving around as you please. Second, as you are renting the apartment, you must be cautious in regards to the changes you're making.

Third, storage chests are incredibly versatile and can further help out with saving space because they're multi-purpose. Storage solutions are always a popular topic however big your space is, but its especially important once you reside in a little apartment. You may not have too much storage.

Apartment Storage Ideas for Dummies
------------------------------------

Apartment decorating is a great deal of fun, but it may also be challenging. You take a few small remodeling thoughts and combine them with a few easy projects and soon you are going to have the bathroom of your dreams. Bathroom shower curtain ideas can definitely assist you in getting the one that you want.

 The Importance of Apartment Storage Ideas
-------------------------------------------

Various hotels and apartments charge various prices, based on the services offered by them. When you reside in an apartment, it's important to handle your space well. A whole lot of apartments have really small bathrooms.

If you want more space to put away glassware, in addition, there are under-the-shelf stemware holders which are a handy solution. Because storage chests can serve a number of useful purposes. Storage cabinets not only offer a clean and organized appearance to the garage, but in addition allow it to be a lot easier to locate things.

Finally, living in a little space doesn't need to truly feel cluttered. It also enables you to arrange your space neatly. In both instances, it was unused space that I managed to use.

extension: markdown


text:
#  Swim Recon Library

Recon is object notation with attributes—like if JSON and XML had a baby.
Attributes facilitate uniformly disambiguating polymorphic structures. And
first-class language extensions for selectors, expressions, and functions make
Recon a highly expressive format for domain specific languages.

## Language Overview

Recon combines the simplicity of JSON with the expressiveness of XML. As shown
in the example below, Recon looks a bit like a hybrid of the two. Yet Recon is
deceptively simple: the grammar for Recon is scarcely larger than the grammar
for JSON. And this underlying uniformity makes Recon more expressive, and more
consistent to work with, than either XML or JSON.

```recon
@html {
  @head {
    @title "Greetings"
  }
  @body {
    @h1 "Introduction"
    @p [I have @a(href:"https://en.wikipedia.org/wiki/Markup_language")[markup syntax]
        for when you need it. But I'm not a text chauvinist. I'm a structured object
        notation first and foremost. The numbers {1, 2, 3} are parsed as numbers,
        not strings. Any my attributes make it easy to define, embed, and
        disambiguate microformats and domain specific languages.]
    @p [Need a microformat for time?  You'll find it falls out naturally after
        {{10 @minutes}} of using Recon. Need to build a DSL for real-time GUI
        widgets?  Recon helps you do so cleanly and concisely, like this:]
    @pie {
      title: "Events"
      linkStats: @link(host: "warp://traffic.swim.services", node: "swim:meta:mesh", lane: "linkStats", type: value)
      @slice {
        value: $max(0.1, $rate($linkStats.downMessageCount))
        label: @text($percent($value, $total))
        legend: @text([Down ({$round($value)}/s)])
        innerRadius: 10 + 7.5 * $value / $max($value) @pct
        outerRadius: 20 + 7.5 * $value / $max($value) @pct
      }
      @slice {
        value: $max(0.1, $rate($linkStats.upMessageCount))
        label: @text($percent($value, $total))
        legend: @text([Up ({$round($value)}/s)])
        innerRadius: 10 + 7.5 * $value / $max($value) @pct
        outerRadius: 20 + 7.5 * $value / $max($value) @pct
      }
    }
  }
}
```

The name Recon is shorthand for **Reco**rd **n**otation. Record Notation has
six primitive data types: _text_, _data_, _num_, _bool_ _extant_, and _absent_;
and one aggregate data type: _record_. Read on to learn about the underlying
structure of the language.

### Text Values

Text values take one of two forms: a quoted _string_, or an unquoted
_identifier_.

```recon
"string"
identifier
```

### Data Values

Binary data encodes as a leading '%' symbol, followed by a base64 literal.

```recon
%AA==
```

### Num Values

Numbers serialize as decimal literals.

```recon
-1
3.14
6.02e23
```

### Bool Values

Booleans are represented by the `true` and `false` identifiers.

```recon
true
false
```

### Extant Values

Extant symbolizes a thing that is defined, but which has no specific value.
Extant is represented by an empty token where a value is expected.

```recon
foo: # value of foo slot is extant
@bar # value of bar attr is extant
```

### Absent Values

Absent represents something that does not exist. Its only direct
representation in Record Notation is an empty document.

### Record Values

Record Notation has a single aggregate data type, called _record_. Records
play the combined role of array and associative array. Think of a record as
a partially keyed list—a sequence where some items may have keys, and other
items may lack keys. An array is a record in which no items have keys. An
associative array is a record in which every item has a key. An object is a
record where every item has a text key.

The example below contains a record with two ordered items, first a "subject"
field with value "Greetings", then the unkeyed string "Hello, Earthlings!".

```recon
{ subject: "Greetings", "Hello, Earthlings!" }
```

Items in a record are separated by a single comma, a single semicolon,
or one or new lines. Newline separated records provide a clean syntax
for pretty-printed documents.

```recon
{
  subject: "Re: Greetings"
  "Hi Martians!"
}
```

Records support arbitrary values as slot keys.

```recon
{
  @planet Jupiter: {}
  @god Jupiter: {}
}
```

### Blocks

Top-level documents can omit the curly braces around their root record.
The content of a record, sans curly braces, is called a _block_. When a block
contains only a single item, the value of the block reduces to the value of
the item it contains. The example block below is equivalent to the example
record with curly braces above.

```recon
subject: "Re: Greetings"
"Hi Martians!"
```
### Markup

Square brackets denote _markup_. Markup offers an inverted syntax for records,
with values embedded in text, as opposed to text embedded in records. Markup
looks like this:

```recon
[Hello, @em[world]!]
```

Markup is really just syntactic sugar for records. The above example expresses
the exact same structure as the example below.

```recon
{ "Hello, "; @em "world"; "!" }
```

Curly braces splice blocks into markup, lifting the enclosed block into the
markup's record. The following records are equivalent.

```recon
[Answer: {42}.]
{ "Answer", 42, "." }
```

Square brackets lift nested markup into the enclosing record. Make sure to
backslash escape square brackets if you want to include them verbatim.

```recon
[Say [what]?]
{ "Say ", "what", "?"}

[Say \[what\]?]
{ "Say [what]?" }
```

Sequential attributes within markup don't chain; each markup-embedded
attribute inserts a nested record.

```recon
[http@colon@slash@slash]
{ "http", @colon, @slash, @slash }
```

Attributes in markup can prefix curly brace enclosed blocks, as well as nested
markup.

```recon
[Goals: @select(max:2){fast,good,cheap}.]
{ "Goals: ", @select(max:2){fast,good,cheap}, "." }
```

Beware that whitespace inside markup is significant. There can be no
whitespace between markup-embedded attributes and the blocks they're intended
to modify. Notice how the single space added to the example below completely
changes its meaning, when compared to the previous example.

```recon
[Goals: @select(max:2) {fast,good,cheap}.]
{ "Goals: ", @select(max:2), " ", {fast,good,cheap}, "." }
```

### Attributes

The `@` sigil introduces an attribute. Attributes call out key fields of
a record. The markup `[Hello, @em[world]!]` further reduces to the form below.

```recon
{
  "Hello, "
  {
    "@em":
    "world"
  }
  "!"
}
```

Note that the `@em` field above has no explicit value. Recon models
unspecified–but existent–values as _extant_. We say that the record
`@em[world]` has an _extant attribute_ named `em`.

Of course, attributes can have specific associated values too. Place attribute
parameters in parentheses following the attribute's name.

```recon
@answer(42)
@event("onClick")
```

The above attributes are structurally equivalent to:

```recon
{"@answer":42}
{"@event":"onClick"}
```

Attribute parentheses enclose a block, meaning attribute values construct an
implicit record when needed. An example, with its desugared equivalent:

```recon
@img(src: "tesseract.png", width: 10, height: 10, depth: 10, time: -1)

{
  "@img": {
    src: "tesseract.png"
    width: 10
    height: 10
    depth: 10
    time: -1
  }
}
```

Attributes _modify_ adjacent values. Modified values interpolate into the
record formed by their adjacent attributes. Here are some examples of values
with prefix, postfix, and circumfix attributes:

```recon
@duration 30
30 @seconds
@duration 30 @seconds
@relative @duration 30 @seconds
```

The above attribute expressions desugar to the following records:

```recon
{ "@duration":, 30 }
{ 30, "@seconds": }
{ "@duration":, 30, "@seconds": }
{ "@relative":, "@duration":, 30, "@seconds": }
```

Modified records flatten into the record formed by their adjacent attributes.
So `@point{x:0,y:0}`, reduces to `{"@point":,x:0,y:0}`, not
`{"@point":,{x:0,y:0}}`.

### Selectors

TODO.

### Expressions

TODO.

### Functions

TODO.

## API Overview

**@swim/recon** uses [**@swim/structure**][structure] as its default abstract
syntax tree. Refer to the documentation for **@swim/structure** to learn how
to manipulate parsed Recon structures.

The `Recon` factory class provides static methods for parsing and serializing
Recon structures. Use `Recon.parse` to parse a **@swim/structure** `Value` from
a string:

```typescript
Recon.parse("[Welcome @a(href:'index.html')@em[home].]");
```

Use `Recon.toString` to serialize a structured `Value` to a Recon string:

```typescript
Recon.toString(Record.of("a", Slot.of("b", 2), "c"));
// "{a,b:2,c}"
```

Use "Recon.toBlockString" to write a top-level block when serializing documents:

```typescript
Recon.toBlockString(Record.of("a", Slot.of("b", 2), "c"));
// "a,b:2,c"
```

**@swim/recon** also adds extension methods to **@swim/structure** to make
parsing and serializing Recon more convenient.

The `Value.parseRecon` static method is an alias for `Recon.parse`.

```typescript
Value.parseRecon("[Hello, @em[world]!]");
```

The `Item.toRecon` and `Item.toReconBlock` instance methods delegate to
`Recon.toString` and `Recon.toBlockString`, respectively.

```typescript
Record.of("Hello, ", Record.of(Attr.of("em"), "world"), "!").toRecon();
// "[Hello, @em[world]!]"
```

Invoke `Item.toAny` to convert parsed Recon structures to plain old JavaScript
objects:

```typescript
Value.parseRecon("1, 2, 3").toAny();
// [1, 2, 3]

Value.parseRecon("a: 1, b: 2, c: 3").toAny();
// {"a": 1, "b": 2, "c": 3}

Value.parseRecon("[Hello, @em[world]!]").toAny();
// ["Hello, ",{"@em":null,"$1":"world"},"!"]
```

`Recon` also provides methods to get composable [**@swim/codec**][codec]
`Parser`s and `Writer`s for low-level parsing and serialization needs, such as
incremental parsing out of arbitrary `Input` streams.

The exported `ReconParser` and `ReconWriter` classes can be extended to
directly generate and serialize alternative syntax trees, or to extend the
Recon language itself by overriding parse methods. `ReconStructureParser` and
`ReconStructureWriter` provide the standard **@swim/structure**-based
`ReconParser` and `ReconWriter` implementations, with full support for Recon
selectors, expressions, and functions.

## Language Grammar

### Record Notation Grammar

Record Notation is the name of the minimal grammar for parsing Recon
structured values.

```
SP ::= #x20 | #x9

NL ::= #xA | #xD

WS ::= SP | NL

Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

NameStartChar ::=
  [A-Z] | "_" | [a-z] |
  [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] |
  [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] |
  [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] |
  [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]

NameChar ::=  NameStartChar | '-' | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]

MarkupChar ::= Char - ('\\' | '@' | '{' | '}' | '[' | ']')

StringChar ::= Char - ('"' | '\\' | '@' | '{' | '}' | '[' | ']' | '\b' | '\f' | '\n' | '\r' | '\t')

CharEscape ::= '\\' ('"' | '\\' | '/' | '@' | '{' | '}' | '[' | ']' | 'b' | 'f' | 'n' | 'r' | 't')

Base64Char ::= [A-Za-z0-9+/]

Block ::= WS* Slots WS*

Attr ::= '@' (Ident | String) ('(' Block ')')?

Slots ::= Slot SP* ((',' | ';' | NL) WS* Slots)?

Slot ::= BlockItem (SP* ':' SP* BlockItem?)?

BlockItem ::= BlockExpression SP* (Attr SP* BlockItem?)? | Attr SP* BlockItem? | Comment

InlineItem ::= Attr (Record | Markup)? | Record | Markup

Literal ::= Record | Markup | Data | Ident | String | Num | Bool | Selector

Record ::= '{' Block '}'

Markup ::= '[' (MarkupChar* | CharEscape | InlineItem)* ']'

Data ::= '%' (Base64Char{4})* (Base64Char Base64Char ((Base64Char '=') | ('=' '=')))?

Ident ::= NameStartChar NameChar*

String ::= ('"' (StringChar* | CharEscape)* '"') | ('\'' (StringChar* | CharEscape)* '\'')

Num ::= '-'? (([1-9] [0-9]*) | [0-9]) ('.' [0-9]+)? (('E' | 'e') ('+' | '-')? [0-9]+)?

Bool ::= 'true' | 'false'

Comment ::= '#' [^\n]*

# Extended by Recon Selectors grammar.
Selector ::=

# Extended by Recon Expressions grammar.
BlockExpression ::= Literal
```

### Recon Selectors Grammar

Recon Selectors extends the Record Notation grammar to support parsing
first-class selector expressions.

```
# Redefinition of Record Notation non-terminal.
Selector ::= '$' (Literal | '*:' | ':*' | '*' | '**' | '#' Integer | Filter)
             ('.' (Literal | '*:' | ':*' | '*' | '**') | '#' Integer | Filter | '(' Block ')')*

Filter ::= '[' BlockExpression ']'
```

### Recon Expressions Grammar

Recon Expressions extends the Record Notation grammar to support logical,
bitwise, algebraic, and functional expressions.

```
# Redefinition of Record Notation non-terminal.
BlockExpression ::= LambdaFunc

LambdaFunc ::= ConditionalOperator (SP* '=>' SP* ConditionalOperator)?

ConditionalOperator ::= OrOperator SP* ('?' SP* ConditionalOperator SP* ':' SP* ConditionalOperator)?

OrOperator ::= AndOperator SP* ('||' SP* AndOperator)*

AndOperator ::= BitwiseOrOperator SP* ('&&' SP* BitwiseOrOperator)*

BitwiseOrOperator ::= BitwiseXorOperator SP* ('|' SP* BitwiseXorOperator)*

BitwiseXorOperator ::= BitwiseAndOperator SP* ('^' SP* BitwiseAndOperator)*

BitwiseAndOperator ::= ComparisonOperator SP* ('&' SP* ComparisonOperator)*

ComparisonOperator ::= AttrExpression SP* (('<' | '<=' | '==' | '!=' | '>=' | '>') SP* AttrExpression)?

AttrExpression ::= AdditiveOperator SP* (Attr SP* AttrExpression?)? | Attr SP* AttrExpression?

AdditiveOperator ::= MultiplicativeOperator SP* (('+' | '-') SP* MultiplicativeOperator)*

MultiplicativeOperator ::= PrefixOperator SP* (('*' | '/' | '%') SP* PrefixOperator)*

PrefixOperator ::= InvokeOperator SP* | ('!' | '~' | '-' | '+') SP* PrefixOperator

InvokeOperator ::= Primary ('(' Block ')')*

Primary ::= Literal | '(' BlockExpression (',' BlockExpression)* ')'
```

[codec]: https://github.com/swimos/swim/tree/main/swim-js/swim-runtime/swim-core/@swim/codec
[structure]: https://github.com/swimos/swim/tree/main/swim-js/swim-runtime/swim-core/@swim/structure

repository: swimos/swim

gha_language: Java

repo_name: swimos/swim


text:
---
layout: postag
title: 'NOUN'
shortdef: 'noun'
udver: '2'
---

### Definition

The `NOUN` tag is intended for common nouns only. See [PROPN]() for
proper nouns and [PRON]() for pronouns.

Ukrainian nouns have the lexical feature [uk-feat/Gender]().
Furthermore, the nouns inflect for [uk-feat/Number]() and [uk-feat/Case]().

A verbal noun can be derived productively from almost every verb
(e.g. _читати_ “to read” → _читання_ “reading”).
While in other languages a corresponding form may be called gerund and tagged [VERB](),
in Ukrainian it is tagged `NOUN`. It has always the neuter gender and the full
number-case inflectional paradigm.

### Examples

- _дівчинка_ “girl”
- _кіт_ “cat”
- _дерево_ “tree”
- _повітря_ “air”
- _краса_ “beauty”
- _плавання_ “swimming”
<!-- Interlanguage links updated Út 9. května 2023, 20:03:25 CEST -->

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

repo_name: UniversalDependencies/docs


text:
# usbll2sr

Simple USBLL PCAP to Sigrok session file converter.

## Features

- Generates USB signaling from binary USBLL packets.
- Respect the packet timing as much as possible.
- Supports USB 2.0 Low-Speed and Full-Speed signaling.

## Usage

```sh
pipenv install
pipenv run ./usbll2sr.py ...
```

## Planned

- Actually test against Low-Speed devices.
- Automatically detect signal type (can this be done?).
- Implement High-Speed signaling (need a way to test it since sigrok does not support HS yet).


text:
---
layout: default
title: cookies
---

# cookies

Other languages: [français](/../cookbook/cookies.fr) | ...

## Problem

You want to set and retrieve cookies for a user browsing the site.

## Solution

Web.py *comes* with an easy to use method for setting/getting cookies.

### Setting Cookies
#### Overview

```
setcookie(name, value, expires="", domain=None, secure=False, samesite=None):
```

* *name* `(string)` - The actual name of the cookie, as stored by the browser, and returned to the server.
* *value* `(string)` - The value you want stored under that name.
* *expires* `(int)` - Optionally, is the time in seconds until the browser should expire the cookie.  Note: this must be an integer, not a string.
* *domain* `(string)` - The domain the cookie is valid for. By default, set to the host accessed, this allows you to set the domain, rather than just a host (such as `.webpy.org`).
* *secure* `(bool)`- If `True`, require that the cookie only be sent over HTTP/S.
* *samesite* (`None`, `'Strict'`, `'Lax'`) - If `None`, no `samesite` attribute will be set. Check RFC document [Same-site Cookies](https://tools.ietf.org/html/draft-west-first-party-cookies-07) for more details. *Note: This argument is available in web.py version released after Sep 16, 2019.*

#### Example

`web.setcookie()` can be used to set the cookie for a user, like this:

```
class CookieSet:
    def GET(self):
        i = web.input(age='25')
        web.setcookie('age', i.age, 3600)
        return "Age set in your cookie"
```

Calling the above class with GET will set a cookie named `age` with a default value equal to `25` (this default value actually comes from the `web.input` processing, NOT the `setcookie` function), which expires in 1 hour (3600 seconds).

The third (and optional) argument to `web.setcookie()`, `expires`, allows you to set when you want your cookie to expire.  Any negative number will expire the cookie immediately.  Any positive number is the number of seconds that the cookie will last (3600 would result in an hour long cookie).  Leaving this argument empty results in a session cookie, which expires when your browser shuts down.  To make the cookie permanent, simply update cookie expiration time at regular interval (e.g. when user logged in).

### Retrieving Cookies
#### Overview

There are many methods to retrieve cookies, depending on the desired reaction to a missing cookie.

##### Way 1 (return None if cookie is not found)

```
web.cookies().get(cookieName)  # cookieName is the name of the cookie submitted by the browser
```

##### Way 2 (raises exception AttributeError if cookie is not found)

```
foo = web.cookies()
foo.cookieName
```

##### Way 3 (avoids exception by setting default value for cookie if not found)

```
foo = web.cookies(cookieName=defaultValue)
foo.cookieName   # return the value (which could be default)
# cookieName is the name of the cookie submitted by the browser
```

#### Example

`web.cookies()` can be used to access an already set cookie. If a cookie is set using the `web.setcookie()` code from above, it can be retrieved like this:

```
class CookieGet:
    def GET(self):
        c = web.cookies(age="25")
        return "Your age is: " + c.age
```

The example sets a default value for the cookie if it does not exist. The reason for setting a default value is that if the cookie is attempted to be accessed, but does not exist, `web.cookies()` raises an exception.

Sometimes, you want to know specifically if something doesn't exist, in which case you can use something like the following:

```
class CookieGet:
    def GET(self):
        try:
             return "Your age is: " + web.cookies().age
        except:
             # Do whatever handling you need to, etc. here.
             return "Cookie does not exist."
```

This code attempts to use the cookie submitted by the browser, but does not give it a default value.  If the cookie doesn't exist, an exception is raised, and the `except` clause is executed, giving the server an opportunity to handle the lack of cookie.

or

```
class CookieGet:
    def GET(self):
        age=web.cookies().get('age')
        if age:
            return "Your age is: %s" % age
        else:
            return "Cookie does not exist."
```


text:
The stark form of erosion is breakage, encapsulated in the form of Stratifier. This erosion method allows you to stratify the terrain in a non-linear fashion. Unlike terracing, Stratification involves substrata/subterraces created in confined local zones, such as between two broken plates. Each stratified layer exists independent from the rest of the layer, creating a robust, realistic formation.

## Properties

- **Strength**: The amount of stratification to be applied. Low values produce more strata, with fractured, delicate substrata; high values produce stronger, larger strata.
- **Filtered**: When ON, creates smoother curvature for the plates.
- **Compact**: Applies a compact filter to reduce the size of the individual plates.
- **Expand**: Applies an expansion filter to increase the size of the individual plates.

[!TIP]
Apply two different Stratifier erosions to a single terrain: one with very low values, and one with default or slightly higher values. Then combine the two with Average 0.5. This will give you both delicate and larger plates.
[TIP!]

repository: QuadSpinner/GeoGlyph-Docs

branch_name: refs/heads/dev

repo_name: QuadSpinner/GeoGlyph-Docs


text:
This folder shows examples of running the whole workflow and running only the visualization.

#### Workflow
Folder example/workflow includes input examples for running the whole workflow, where:

- Reference: the folder stores reference genome.
- Annotations: the folder stores annotation file. Annotation file is in csv format and should have the format of seven columns:
	- Name: gene name
	- Type: can be rRNA, repreat_region, coding sequence, tRNA,... This annotation file is used in visualization.
	- Minimum: the start position of the gene on reference genome
	- Maximum: the end position of the gene on reference genome
	- Length: length of gene, literally, length = end - start + 1
	- \# Intervals: number of intervals of the gene.
	- Direction: forwad or reward.
- config.txt: shows the example of config file for the workflow.
- readids.txt: show the example of how to specify read IDs. If there are fastq files named SRR2146923_1.fastq, SRR2146923_2.fastq, SRR2146925_1.fastq, SRR2146925_2.fastq, only the IDs SRR2146923 and SRR2146925 are needed in the readids file.

#### Visualization:
Folder example/visualization includes examples for running the visualization phase.

The inputs for this phase include:
- Genome name.
- Annotation file.
- Heteroplasmy file: in csv format. This file is generated by the workflow.
- Conserved site file: in csv format. This file is generated by the workflow.
- Output filename: in html format.

repository: vtphan/HeteroplasmyWorkflow

repo_name: vtphan/HeteroplasmyWorkflow


text:
# bcrypt

[![Safety Dance](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
[![Build Status](https://travis-ci.org/Keats/rust-bcrypt.svg)](https://travis-ci.org/Keats/rust-bcrypt)
[![Documentation](https://docs.rs/bcrypt/badge.svg)](https://docs.rs/bcrypt)

## Installation
Add the following to Cargo.toml:

```toml
bcrypt = "0.15"
```

The minimum Rust version is 1.57.0.

## Usage
The crate makes 3 things public: `DEFAULT_COST`, `hash`, `verify`.

```rust
extern crate bcrypt;

use bcrypt::{DEFAULT_COST, hash, verify};

let hashed = hash("hunter2", DEFAULT_COST)?;
let valid = verify("hunter2", &hashed)?;
```

The cost needs to be an integer between 4 and 31 (see benchmarks to have an idea of the speed for each), the `DEFAULT_COST` is 12.

## `no_std`

`bcrypt` crate supports `no_std` platforms. When `alloc` feature is enabled,
all crate functionality is available.  When `alloc` is not enabled only the
raw `bcrypt()` function is usable.

## Benchmarks
Speed depends on the cost used: the highest the slowest.
Here are some benchmarks on a 2019 Macbook Pro to give you some ideas on the cost/speed ratio.
Note that I don't go above 14 as it takes too long.

```
test bench_cost_10      ... bench:  51,474,665 ns/iter (+/- 16,006,581)
test bench_cost_14      ... bench: 839,109,086 ns/iter (+/- 274,507,463)
test bench_cost_4       ... bench:     795,814 ns/iter (+/- 42,838)
test bench_cost_default ... bench: 195,344,338 ns/iter (+/- 8,329,675)
```

## Acknowledgments
This [gist](https://gist.github.com/rgdmarshall/ae3dc072445ed88b357a) for the hash splitting and the null termination.

## Recommendations
While bcrypt works well as an algorithm, using something like [Argon2](https://en.wikipedia.org/wiki/Argon2) is recommended
for new projects.

## Changelog

* 0.15.0: add an `alloc` feature that can be disabled.
* 0.14.0: use `subtle` crate for constant time comparison, update base64 and bump to 2021 edition
* 0.13.0: make zeroize dep opt-out and use fixed salt length
* 0.12.1: zero vec containing password in the hashing function before returning the hash
* 0.12.0: allow null bytes in password
* 0.11.0: update deps causing big bump in MSRV
* 0.10.1: fix panic with invalid hashes and allow `2x`
* 0.10.0: update blowfish to 0.8 and minimum Rust version to 1.43.0.
* 0.9.0: update base64 to 0.13 and getrandom to 0.2
* 0.8.2: fix no-std build
* 0.8.0: constant time verification for hash, remove custom base64 code from repo and add `std` feature
* 0.7.0: add HashParts::from_str and remove Error::description impl, it's deprecated
* 0.6.3: add `hash_with_salt` function and make `Version::format_for_version` public
* 0.6.2: update base64 to 0.12
* 0.6.1: update base64 to 0.11
* 0.6.0: allow users to choose the bcrypt version and default to 2b instead of 2y
* 0.5.0: expose the inner `bcrypt` function + edition 2018
* 0.4.0: make DEFAULT_COST const instead of static
* 0.3.0: forbid NULL bytes in passwords & update dependencies
* 0.2.2: update rand
* 0.2.1: update rand
* 0.2.0: replace rust-crypto with blowfish, use some more modern Rust things like `?` and handle more errors
* 0.1.6: update rand and base64 deps
* 0.1.5: update lazy-static to 1.0
* 0.1.4: Replace rustc-serialize dependency with bcrypt
* 0.1.3: Fix panic when password > 72 chars
* 0.1.1: make BcryptResult, BcryptError public and update dependencies
* 0.1.0: initial release

repository: Keats/rust-bcrypt

gha_language: Rust

repo_name: Keats/rust-bcrypt


text:
---
title: Scala client library
seotitle: Use the InfluxDB Scala client library
list_title: Scala
description: Use the InfluxDB Scala client library to interact with InfluxDB.
external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala
menu:
  influxdb_2_2:
    name: Scala
    parent: Client libraries
    params:
      url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala
weight: 201
---

Scala is a general-purpose programming language that supports both object-oriented and functional programming.

The documentation for this client library is available on GitHub.

Scala InfluxDB client


text:
Session Information
===================

Functions providing information about the query execution environment.

**current\_user** -\> varchar

Returns the current user running the query.

**Note**

This is part of the SQL standard and does not use parenthesis.


text:
---
title: Stormkit
homepage: https://stormkit.io
description: Stormkit builds, deploys and scales your JS apps seamlessly. It integrates smoothly to your git flow.
twitter: stormkitio
pricing: https://www.stormkit.io/pricing
freeplan: true
autodeployment: true
---

Stormkit simplifies deployments of static websites and application management for modern javascript apps.

It integrates seamlessly with your existing git flow (GitHub, GitLab, BitBucket) and deploys your application whenever you push to your repository.

Inject code snippets to your documents without deploying. Changes are effective immediately.

Publish multiple deployments to perform A/B tests.

Scale infinitely - it's powered by AWS Lambdas and S3.

Remote configuration (like Firebase for mobile apps)

Multiple environments for each application.

Lately, we have also redesigned the landing page which is now open source (https://github.com/stormkit-io/www-stormkit-io).

repository: cvrajeesh/staticwebsitehosting

repo_name: cvrajeesh/staticwebsitehosting


text:
---
title: "Spectrum Talk"
featuredImage: ./spectrum-talk-anjali-sudheer.jpeg
category: "sb"
date: "2019-08-30"
venue: "S1 EEE"
slug: "spectrum-talk-08-19"
tags:
    - spectrum talk
---

A technical talk was conducted as a part of IEEE spectrum talk on 30th August 2019 at 12.15 PM at S1 EEE. The talk was delivered by Anjali Sudhir from S3 EEE on the topic “Green Energy and Ocean Energy Harvesting”. Almost 25 students attended the talk.

She talked about the techniques of converting ocean waves into electricity to provide clean, reliable and low-cost electricity while producing minimal impacts on the environment. She pointed out the importance of a sustainable future. This was then followed by an interactive question and answer session in which all members actively participated.

The talk ended by around 12.45 PM. Amalendhu K R from S5 CSE proposed the vote of thanks.

repository: TheFirstMe/ieeesb

gha_language: JavaScript

repo_name: TheFirstMe/ieeesb


text:
# Overview
- The Linux kernel for our NVMM emulator
  - This is based on Linux kennel (linux-xlnx) provided by Xilinx.
  - https://github.com/Xilinx/linux-xlnx.git

- Our patch for linux-xlnx is under GPLv2.0 license.

# Requirements
- Following packages are required:
  - git
  - make
  - arm-linux-gnueabihf-gcc

# Procedures
### Fetch linux-xlnx from Xilinx official repository
 ```
 % git clone git@github.com:Xilinx/linux-xlnx.git
 ```

### Checkout **xilinx-v2019.1** tag
```
% cd linux-xlnx
% git checkout -b xilinx-v2019.1
```

### Copy **linux-xlnx-for-emulator.patch** and Apply it
```
% cp <path_to_linux-xlnx-for-emulator.patch> .
% git apply linux-xlnx-for-emulator.patch
```

### Run make
```
% export ARCH=arm
% export CROSS_COMPILE=arm-linx-gnueabihf-
% make xilinx_zynq_defconfig
% make UIMAGE_LOADADDR=0x8000 uImage
```

### When compilation was completed successfully, the kernel image (uImage) is located at:
- Copy it to your work directory
```
<path_to_linux-xlnx>/arch/arm/boot/uImage
```

repository: uyiromo/nvmtest

repo_name: uyiromo/nvmtest