text:
---
id: 15
title: "Path Integral Interlude: Gaussian Integral"
subtitle: ""
date: "2023.07.12"
tags: "qft"
---

# The Most Important Integral in Quantum Field Theory

Last time, we used the path integral method to split a single complicated calculation up into several smaller calculations. We then took one of those smaller calculations and simplified it until it was just an integral. Today, we will evaluate that integral -- the most widely used integral in quantum field theory.

## The Full Integral

The integral at hand is as follows:

```math
\frac{1}{2 \pi} \int e^{i \frac{p_n^2}{2 m \hbar} \frac{t}{N}} e^{i \frac{p_n (y_a - y_b)}{\hbar}} dp_n
```

As is the grand tradition of this series, we will attack this problem in parts. We'll start with the simplest thing that takes the same form, then slowly build on it until we can calculate the entire thing. To whit, we'll start with the "simplest interesting part" of this integral:

```math
\int e^{-x^2} dx
```

We'll then quickly generalize this to encompass the first term in the integral:

```math
\int e^{-c x^2} dx
```

Finally, we'll add a linear term in the exponent:

```math
\int e^{-c x^2 + d x} dx
```

This is the essential form of the full integral, and will allow us to finally evaluate our "tiny path probability."

With all that said... into the breach.

## The Gaussian Integral

Consider the first step:

```math
\int e^{-x^2} dx
```

This is a deceptively complicated integral. In fact, this integral has *no algebraic solution* -- there is no antiderivative of $`e^{-x^2}`$ that can be written in terms of standard algebraic functions.

Luckily, we don't need such an antiderivative. In our original expression, this integral is over *all possible values* of momentum. In this case, that means all possible values of $`x`$. Thus we are specifically interested in the integral from $`-\infty`$ to $`\infty`$:

```math
\int_{-\infty}^{\infty} e^{-x^2} dx
```

This *can* be evaluated. However, it takes quite an absurd trick. This is one of the few tricks in this series that I have trouble motivating. I'll do my best, but know that this is deep mathematical wizardry.

## Deep Mathematical Wizardry

We'll start by imagining how this integral could be easier. Obviously, it would be easier if it had an antiderivative. Thus we might consider how we could alter this integral to get one with an antiderivative. The simplest way would be to multiply it by $`2 x`$:

```math
\int_{-\infty}^{\infty} 2 x e^{-x^2} dx
```

Any first-year calculus student could tell you the antiderivative of $`2 x e^{-x^2}`$ is $`-e^{-x^2}`$. Thus if we can somehow wrangle the integral into this form, we can evaluate it easily.

So how could we make our original integral look like this? Well, one way would be to change coordinates (somehow) to some $`dy`$ such that $`dy = 2 x dx`$. That would give us the crucial factor we need.

There is actually a promising candidate we might already be familiar with: *polar coordinates*. Polar coordinates are an alternative 2D coordinate system with the area factor

```math
dx dy = r dr d\theta
```

Note the multiplication by one of the variables. This is exactly what we need. Unfortunately, our integral is one-dimensional, not two-dimensional. Thus we can't use polar coordinates here...

...or can we?

## Wherein We Use Polar Coordinates Here

Once we have the idea to use polar coordinates, we might start trying to turn our one-dimensional integral into a two-dimensional integral. The easiest way to do this is by squaring the integral, then re-naming the other integration variable:

```math
\left(\int_{-\infty}^{\infty} e^{-x^2} dx\right)^2 = \int_{-\infty}^{\infty} e^{-x^2} dx \int_{-\infty}^{\infty} e^{-x^2} dx = \int_{-\infty}^{\infty} e^{-x^2} dx \int_{-\infty}^{\infty} e^{-y^2} dy
```

Since these integrals are over completely different variables, we can merge them. We can then use exponential properties to simplify the integrand:

```math
\int_{-\infty}^{\infty} e^{-x^2} dx \int_{-\infty}^{\infty} e^{-y^2} dy = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-(x^2 + y^2)} dx dy
```

And like magic, the radius $`x^2 + y^2`$ appears! The stage is now perfectly set for our change to polar coordinates:

```math
\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-(x^2 + y^2)} dx dy = \int_{0}^{\infty} \int_{0}^{2 \pi} e^{-r^2} r dr d\theta
```

Since the inner expression doesn't depend on $`\theta`$, the $`\theta`$ integral is trivial:

```math
\int_{0}^{\infty} \int_{0}^{2 \pi} e^{-r^2} r dr d\theta = 2 \pi \int_{0}^{\infty} e^{-r^2} r dr
```

Pulling the factor of two back into the integral and rearranging:

```math
\int_{0}^{\infty} \int_{0}^{2 \pi} e^{-r^2} r dr d\theta = \pi \int_{0}^{\infty} 2 r e^{-r^2} dr
```

This is the integral we dreamed about earlier. We can evaluate it using its antiderivative:

```math
\pi \int_{0}^{\infty} 2 r e^{-r^2} dr = \pi \left[-e^{-r^2}\right]_0^{\infty} = \pi
```

The number of places that $`\pi`$ shows up out of nowhere is truly absurd.

Thus by hopping up one dimension, we can use polar coordinates to evaluate this integral and find

```math
\left(\int_{-\infty}^{\infty} e^{-x^2} dx\right)^2 = \pi
```

and thus

```math
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
```

## Adding In a Constant

We've completed the first step of our process. Now we'll take the second step by adding a constant to the exponent:

```math
\int_{-\infty}^{\infty} e^{-c x^2} dx
```

After last step's dark magic, this is refreshingly simple. All we have to do is change coordinates to $`y = \sqrt{c} x`$:

```math
\int_{-\infty}^{\infty} e^{-y^2} dx = \int_{-\infty}^{\infty} e^{-y^2} \frac{dy}{\sqrt{c}}
```

Now we can just factor out the constant and use our previous result:

```math
\int_{-\infty}^{\infty} e^{-c x^2} dx = \frac{1}{\sqrt{c}} \int_{-\infty}^{\infty} e^{-y^2} dy = \sqrt{\frac{\pi}{c}}
```

Nice.

## Adding The Linear Term

We're finally ready to tackle the full (functional) form of the integral:

```math
\int_{-\infty}^{\infty} e^{-c x^2 + d x} dx
```

This is not as complicated as it seems. Whenever we see something of the form $`-c x^2 + d x`$, we should immediately think about completing the square:

```math
-c x^2 + d x = -c (x^2 - \frac{d}{c} x) = -c \left(\left(x - \frac{d}{2 c}\right)^2 - \frac{d^2}{4 c^2}\right) = -c \left(x - \frac{d}{2 c}\right)^2 + \frac{d^2}{4 c}
```

Substituting this into our exponent, we get

```math
\int_{-\infty}^{\infty} e^{-c x^2 + d x} dx = \int_{-\infty}^{\infty} e^{-c \left(x - \frac{d}{2 c}\right)^2 + \frac{d^2}{4 c}} dx
```

Now we see the magic of this approach. Using exponent properties, we can split this to a contant exponent and an exponent of the form $`e^{-c y^2}`$:

```math
\int_{-\infty}^{\infty} e^{-c \left(x - \frac{d}{2 c}\right)^2 + \frac{d^2}{4 c}} dx = \int_{-\infty}^{\infty} e^{-c \left(x - \frac{d}{2 c}\right)^2} e^{\frac{d^2}{4 c}} dx = e^{\frac{d^2}{4 c}} \int_{-\infty}^{\infty} e^{-c \left(x - \frac{d}{2 c}\right)^2} dx
```

This is now a simple change of variables away from our previous integral. Swapping to $`y = x - \frac{d}{2 c}`$:

```math
e^{\frac{d^2}{4 c}} \int_{-\infty}^{\infty} e^{-c \left(x - \frac{d}{2 c}\right)^2} dx = e^{\frac{d^2}{4 c}} \int_{-\infty}^{\infty} e^{-c y^2} dy = e^{\frac{d^2}{4 c}} \sqrt{\frac{\pi}{c}}
```

## Putting It All Together

We're finally ready to evaluate the probability density of our small path:

```math
\frac{1}{2 \pi} \int_{-\infty}^{\infty} e^{i \frac{p_n^2}{2 m \hbar} \frac{t}{N}} e^{i \frac{p_n (y_a - y_b)}{\hbar}} dp_n = e^{i \frac{p_n^2}{2 m \hbar} \frac{t}{N} + i \frac{p_n (y_a - y_b)}{\hbar}}
```

Our solution is for integrals of the form

```math
\int_{-\infty}^{\infty} e^{- c x^2 + d x}
```

The corresponding coefficients in our case are

```math
c = \frac{-i}{2 m \hbar} \frac{t}{N} \\
d = i \frac{y_a - y_b}{\hbar}
```

We will simplify a little by writing $`\frac{t}{N} = \delta_N t`$. Plugging and chugging, we find that

```math
\int_{-\infty}^{\infty} e^{- c x^2 + d x} = e^{\frac{d^2}{4 c}} \sqrt{\frac{\pi}{c}} = e^{-i m \frac{(y_b - y_a)^2}{2 \delta_N t}} \sqrt{\frac{i 2 m \hbar \pi}{\delta_N t}}
```

Finally, multiplying through by the constant $`\frac{1}{2 \pi}`$ gives us our final probability density:

```math
\frac{1}{2 \pi} \int e^{i \frac{p_n^2}{2 m \hbar} \frac{t}{N}} e^{i \frac{p_n (y_a - y_b)}{\hbar}} dp_n = e^{-i m \frac{(y_b - y_a)^2}{2 \delta_N t}} \sqrt{\frac{i m \hbar}{2 \pi \delta_N t}}
```

## Next Steps

If you made it this far, congratulations are in order. The Gaussian integral is not easy. However, the time investment to solve it is well worth it. With our solution in hand, we will be able to breeze through literally hundreds of calculations for the rest of this course. This is probably *the* single most common calculation in quantum field theory, and we've already done it. Next time, we'll see it pay dividends.


text:
# swartz
Swartz is a simple forum-ish web app, inspired by Hacker News and Reddit. I wrote this app to become more familiar with Clojure, especially in the context of a web app. I also wrote this as an example, a sort of, "Hello world," for the web, so that others coming to Clojure from another language have an example to work from.

## Usage

You can start the swartz server by running `lein ring server` (or `lein run`) from the project directory.

## License

Copyright © 2015 Austin Pocus

Distributed under the MIT License.

license: MIT

repository: ajpocus/swartz

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: ajpocus/swartz


text:
# Thursday
https://dvbe18.confinabox.com/byday/thu

10 Mistakes Hackers Want You to Make
Joe Kutner (Heroku)

https://dvbe18.confinabox.com/talk/SOK-9080/10_Mistakes_Hackers_Want_You_to_Make

Common mistakes made in Functional Java
Brian Vermeer (Blue4IT)

https://dvbe18.confinabox.com/talk/SXS-0514/Common_mistakes_made_in_Functional_Java

Is boilerplate code really so bad?
Trisha Gee (JetBrains)

https://dvbe18.confinabox.com/talk/OAT-4417/Is_boilerplate_code_really_so_bad%3F

Full-stack Reactive Java with Project Reactor & Spring Boot 2
Mark Heckler (Pivotal)

https://dvbe18.confinabox.com/talk/LPH-4584/Full-stack_Reactive_Java_with_Project_Reactor_&_Spring_Boot_2

From Java to Kotlin: the adventures of a smooth migration
Paulien van Alst (OpenValue)

https://dvbe18.confinabox.com/talk/ZQM-8903/From_Java_to_Kotlin:_the_adventures_of_a_smooth_migration

Flight of the Flux: a look at Reactor's execution model
Simon Baslé (Pivotal)

https://dvbe18.confinabox.com/talk/TZJ-2808/Flight_of_the_Flux:_a_look_at_Reactor's_execution_model

FP vs OOP: Choose Two
Brian Goetz (Oracle)

https://dvbe18.confinabox.com/talk/ZLX-5595/FP_vs_OOP:_Choose_Two


text:
#Summary
Apps that use only path permission to protect a content provider providing sensitive information are vulnerable to leaking sensitive information.

#Versions of Android in which the vulnerability can occur
Tested on Android 5.1.1 - Android 8.1

#Description of the vulnerability and corresponding exploit
Content Providers in Android provide an interface to components through which they can interact with the underlying data store.
Components running in the same process as that of the content provider have unlimited access to its methods.
If a content provider is *exported* then components running in processes other than its own also have unlimited access to its methods.
However, a content provider can limit access to components running in processes other than its own via *permissions*.
A permission can be declared to limit access to all of the data provided by the content provider or to a subset of the data provided by the content provider.
The content provider can do the latter by specifying <path-permission android:readPermission="some.string.identifier" android:path="some/path">
or <path-permission android:readPermission="some.string.identifier" android:pathPrefix="some/prefix"> or <path-permission android:readPermission="some.string.identifier" android:pathPattern="some/pattern">.

1.	android:path means that the permission applies to the exact path declared in android:path
2.	android:pathPrefix means that the permission applies to any path beginning with the value declared in pathPrefix.
3.	android:pathPattern means that the permission applies to any pattern that matches the value in android:pathPattern. android:pathPattern accepts two wildcard characters, "\*" i.e. sequence of 0 to many occurrences of the immediately preceding character, and ".\*" i.e. sequence of 0 or more characters.

*Issue:* **path-permission** does not protect an app's data. If a content provider is exported then a malicious component can access the content provider to get access to the data protected by path-permission without requesting for any kind of permission.

*Example:* This vulnerability is demonstrated by *Benign* and *Malicious*. The *AndroidManifest.xml* file in *Benign/app/src/main* defines a content provider called *UserDetailsContentProvider* in the <provider> tag, which is exported. The content provider protects the path prefix */user* with a signature-level permission, as specified in the *<path-permission>* tag. Signature-level permissions are granted to only apps that  share the same signature. Requests by apps that do not share the same signature will be disallowed by the system. However, when *UserDetailsContentProvider* is queried from *Malicious/.../MalActivity* for data stored in */user/ssn*, *UserDetailsContentProvider* returns the data in spite of *Malicious* not having requested the necessary *path-permission*.

# Steps to build the sample apps and to exploit the vulnerability

1. List targets:

    `$ avdmanager list targets`

2. List available Android Virtual Devices:

    `$ avdmanager list avd`

3. Create an emulator:

    `$ avdmanager create avd -n <name> -k <target>`

    *<target>* is obtained from the command listed in 1. *<name>* is the name you choose to give to the avd.

4. Start emulator:

    `$ emulator -avd <avd_name>`

    *<avd-name>* is obtained from the command listed in 2.

5. Build and install *Benign*:

    `$ cd Benign`

    Make sure there is a file called local.properties with an entry sdk=/path/to/Android/sdk.

    `$ ./gradlew installApi[VERSION]Debug`

6. Build and install *Malicious*:

    `$ cd Malicious`

    Make sure there is a file called local.properties with an entry sdk=/path/to/Android/sdk.

    `$ ./gradlew installApi[VERSION]Debug`

7. Open *Benign*.

    Enter the number 1 in place of ID

    Click "Get SSN" button. You should see a number displayed at the bottom of the screen.

8. Open *Malicious* in the emulator and click the button "Get SSN".

9. You will see a number appear in the display. This is the same number as the one displayed in *Benign*.

# References

1.  [Official Android Documentation](https://developer.android.com/guide/topics/providers/content-provider-creating.html)

2.  [Inspecting Android Apps with Drozer](https://blog.abstractj.org/articles/inspecting-android-apps-drozer.html)


text:
# homeserver
My homeserver setup

### Install debian
The Debian GUI installer is pretty good, try to get the non-free image if you foresee that you would need non-free drivers and such.
### Set up ssh server:
Disallow password log in, disallow root log in
## Install zsh & oh-my-zsh

* `ZSH_THEME="bira"`
* `COMPLETION_WAITING_DOTS="true"`
* `export EDITOR='vim'`
* `export LANG=en_US.UTF-8`
* `umask 027`
* `setopt nosharehistory`
* `w`
*
```
zstyle ':completion:*' matcher-list '' \
'm:{a-z\-}={A-Z\_}' \
'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \
'r:[[:ascii:]]||[[:ascii:]]=** r:|=* m:{a-z\-}={A-Z\_}'
```

## Router port forward ssh to a non-standard port
## Install HDD monitoring tools:
* Install the smartmontools package that contains smartd.
* Edit `/etc/default/smartmontools`, add these line: `start_smartd=yes` and `smartd_opts="--interval=28800"`
* interval = 8h
* edit `/etc/rsyslog.conf` and add `if ($msg contains "smartd") then /var/log/smartd.log` to log smartd
* add `cat /proc/mdstat` to `.zshrc`
* add `DEVICESCAN -d removable -n standby -m ankel -M exec /usr/share/smartmontools/smartd-runner` to `/etc/smartd.conf`
## Install services that we need

repository: ankel/homeserver

repo_name: ankel/homeserver


text:
##### Open Source DOM Component

# The Lineup

## All the usual suspects

<address>
 by Read Write Tools <time datetime=2020-01-05>Jan 5, 2020</time></address>

Abstract

The rwt-lineup DOM component is a flexible menu using round images as hyperlinks, with a pullbar to expand items that have overflowed its single-line container.

### Motivation

Sometimes a visual menu is better than a textual menu.

The rwt-lineup DOM component applies circular styling to
square images, providing a fully iconic interface. For situations where there
are too many hyperlinks to fit in a single line, the extras are kept hidden
until activated by the user, using either the visual pullbar or the component's `toggleMenu`
method or through its event interface.

This component is a light-hearted take on "The Line Up" of "all the usual
suspects". It's designed for use in a website's top banner area.

The component has these features:

   * A single line of icons is displayed in the container's collapsed state. The full
      set of icons is display in the expanded state, accommodating any number of menu
      items.
   * The menu item corresponding to the current page is highlighted and scrolled into
      view when the page is loaded.
   * The menu has an event interface for expanding and collapsing itself.
   * The menu emits a custom event to close sibling menus and dialog boxes.
   * Menu items may be kept separate from the DOM component, allowing the webmaster
      to change its contents in a single centralized place. Alternatively, menu items
      may be slotted directly between the component's opening and closing tags.
   * A keyboard listener is provided to allow a shortcut key to expand/collapse the
      menu.
   * A half-height pullbar for expanding the container is displayed along the bottom
      margin, appearing larger on hover.
   * The first few times that a visitor interacts with your website, the pullbar
      pulses to draw attention to itself.

#### In the wild

To see an example of this component in use, visit the DOPPELMARKS
website. It uses this component at the top of the page. To understand what's
going on under the hood, use the browser's inspector to view the HTML source
code and network activity, and follow along as you read this documentation.

### Installation

#### Prerequisites

The rwt-lineup DOM component works in any browser that
supports modern W3C standards. Templates are written using BLUE
PHRASE notation, which can be compiled into HTML using the free Read Write View
desktop app. It has no other prerequisites. Distribution and installation are
done with either NPM or via Github.

#### Download

	Download using NPM

OPTION 1: Familiar with Node.js and the package.json file?
Great. Install the component with this command:

npm install rwt-lineup

OPTION 2: No prior experience using NPM?
Just follow these general steps:

Install Node.js/NPM on your development computer.

Create a package.json file in the root of your web project using the command:

npm init

Download and install the DOM component using the command:

npm install rwt-lineup

Important note: This DOM component uses Node.js and NPM and package.json as a convenient distribution and installation mechanism. The DOM component itself does not need them.

	Download using Github

If you prefer using Github directly, simply follow these steps:

Create a node_modules directory in the root of your web project.

Clone the rwt-lineup DOM component into it using the command:

git clone https://github.com/readwritetools/rwt-lineup.git

### Using the DOM component

After installation, you need to add two things to your HTML page to make use of
it.

   * Add a `script` tag to load the component's `rwt-lineup.js` file:
```html
<script src='/node_modules/rwt-lineup/rwt-lineup.js' type=module></script>
```

   * Add the component tag somewhere on the page.

      * For scripting purposes, apply an `id` attribute.
      * Apply a `sourceref` attribute with a reference to an HTML file containing the
         menu's hyperlinks.
      * Optionally, apply a `shortcut` attribute with something like `F9`, `F10`, etc. for
         hotkey access.
      * For WAI-ARIA accessibility apply a `role=navigation` attribute.
      * For simple menus, the `sourceref` may be omitted and the menu hyperlinks may be
         slotted into the DOM component. Simply place the hyperlinks directly between the
`<rwt-lineup>` and `</rwt-lineup>` tags.
      * Here's an example HTML tag where the menu items are in a separate file:
```html
<rwt-lineup id=lineup sourceref='/menu.html' shortcut=F10 role=navigation></rwt-lineup>
```

#### Menu template

The content and format of the menu items should follow this pattern, which uses
anchors `<a>` that enclose images `<img>`.

```html
<a href='/path/to/page1.html' tabindex=301 <img src='/img/page1.jpg' title='Page 1' ></a>
<a href='/path/to/page2.html' tabindex=301 <img src='/img/page2.jpg' title='Page 2' ></a>
<a href='/path/to/page3.html' tabindex=301 <img src='/img/page3.jpg' title='Page 3' ></a>
```

#### Self identification

The menu item corresponding to the current page can be highlighted when it
identifies itself to the menu. This is accomplished by adding a `meta` tag to the
page that contains the short-form URL of the page itself. For example, if the
page's full URL is `https://example.com:443/services.html` the shortform URL would
be `/services.html`.

The short-form URL should be added to a special-purpose `meta` tag, like this:

```html
<meta name='lineup:this-url' content='/services.html' />
```

### Customization

#### Menu item size and spacing

The images that you provide should be square. They will be resized using the
value you specify with the CSS `--img-size` variable. Spacing between the icons
can be adjusted with the `--img-margin` variable.

The height of the pullbar can be made more or less prominent by setting the `--pullbar-height`
variable.

The `--width` variable can be used to shorten the width of the component's inner
container.

```css
rwt-lineup {
    --img-size: 64px;
    --img-margin: 16px;
    --width: 100%;
    --pullbar-height: 1rem;
}
```

#### Menu color scheme

The default color palette for the menu uses a dark mode theme. You can use CSS
to override the variables' defaults:

```css
rwt-lineup {
    --color: var(--pure-white);
    --accent-color1: var(--title-blue);
    --accent-color2: var(--yellow);
    --accent-color3: var(--dark-gray);
    --background: var(--transparent-black);
    --accent-background1: var(--light-black);
    --accent-background2: var(--pure-black);
}
```

### Life-cycle events

The component issues life-cycle events.

component-loaded

Sent when the component is fully loaded and ready to be used. As a convenience you can use the waitOnLoading() method which returns a promise that resolves when the component-loaded event is received. Call this asynchronously with await.

### Event controllers

The menu can be controlled with its event interface.

toggle-lineup

The component listens on DOM document for toggle-lineup messages. Upon receipt it will expand or collapse the lineup.

keydown

The component listens on DOM document for keydown messages. If the user presses the configured shortcut key (F9, F10, etc) it will collapse/expand the menu. The Esc key collapses the menu.

collapse-popup

The component listens on DOM document for collapse-popup messages, which are sent by sibling menus or dialog boxes. Upon receipt it will collapse itself.

click

The component listens on DOM document for click messages. When the user clicks anywhere outside the menu, it collapses itself.

---

### Reference

		Documentation	 		READ WRITE HUB

		Source code	 			github

		Component catalog	 	DOM COMPONENTS

		Package installation	 npm

		Publication venue		READ WRITE STACK

### License

The rwt-lineup DOM component is licensed under the MIT
License.

	MIT License

Copyright © 2020 Read Write Tools.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: readwritetools/rwt-lineup

repo_name: readwritetools/rwt-lineup


text:
![TigerGraph Banner](docs/images/github/tgcloudbanner.png)

[![Pull Requests Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com)
[![GitHub issues](https://img.shields.io/github/issues-raw/tigergraph/ecosys)](https://github.com/tigergraph/ecosys/issues)
[![Contributors](https://img.shields.io/github/contributors/tigergraph/ecosys)](https://github.com/tigergraph/ecosys/graphs/contributors)
[![Discord](https://img.shields.io/discord/640707678297128980?label=Community%20Chat)](https://discordapp.com/channels/640707678297128980)
[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/tigergraph?style=flat)](https://www.reddit.com/r/tigergraph/)

## TigerGraph's Ecosystem

[TigerGraph](https://www.tigergraph.com) is dedicated to building the world's fastest and most scalable graph platform. We also know that a product is nothing without it's community. This repository is dedicated to provide TigerGraph's community with all the essential in-house and community developed tools to get the most value out of your TigerGraph solutions.

## Table of Contents

* [Developer Guides](#developer-guides)
* [Getting Started](#getting-started)
* [Certifications](#certifications)
* [Developer Resources](#tigergraphs-developer-resources)
* [Connect with Community](#connecting-with-community)
* [Contributing](#contributing-to-the-comunity)
* [Talk to Developers](#talk-with-tigergraph-developers)
* [Reporting Issues](#reporting-issues)
* [License](#license)

## Developer Guides
> [For a complete list of resources we highly encourage you to checkout TigerGraph's Community Driven AWESOME page](./awesome.md)

### Getting Started
* [What is graph](https://www.tigergraph.com/certification-graph-fundamentals/) - Certification 1
* [Setting up your Environment](/) - Developer vs Enterprise vs Cloud
* [Useful Development Tools and Patterns](./third-party/README.md) - Coming Soon
* [Schema Development](/) - Coming Soon
* [GSQL Basics](https://www.tigergraph.com/certification-gsql-101/) - Certification 2
* [GSQL Algorithms](https://docs.tigergraph.com/graph-algorithm-library)
* [Projects Showcase](/) - Coming Soon

### Data Import Export
* [How to Import Data into List Structure](/) - Coming Soon

### Tools and Integration Guides
* [Full Stack Architecture](/) - Coming Soon
* [TigerGraph and Apache Spark](/) - Coming Soon
* [TigerGraph and Kafka](/) - Coming Soon
* [TigerGraph and Elastic{Search}](/) - Coming Soon
* [TigerGraph and Docker](/) - Coming Soon
* [TigerGraph and Jupyter Notebooks](/) - Coming Soon
* [TigerGraph and Flutter](/) - Coming Soon

### Visualizations
* [Visualization Tools](/) - Coming Soon
* [Visualization Examples](/) - Coming Soon

## Certifications

![TigerGraph Badges](docs/images/github/badgesSmall.png)

[Graph Fundementals](https://www.tigergraph.com/certification-graph-fundamentals/) is a course designed for people who are new to graph database and graph-based analytics. There are four modules that are designed to take you from a graph newbie to being fluent in the concepts, capabilities and use cases of a native parallel graph database.

[GSQL 101](https://www.tigergraph.com/certification-gsql-101/) provides the basics of programming in GSQL, and enables you to create and use TigerGraph’s graph database and analytics solution

## TigerGraph's Developer Resources

- A [Documentation](https://docs.tigergraph.com/) place that contains patterns, code snippts, and all of TigerGraph's functionality.
- A [YouTube channel](https://youtube.com/TigerGraph) with recorded guru sessions, starter kit demos, and GSQL functions.
- A [Blog](https://www.tigergraph.com/blog/) with technology insights and inspiring stories from developers.
- A [Developer FAQ](https://www.tigergraph.com/developerfaq/) to answer common questions.

## Community

### Connecting

Join the community lead chat room  ![Discord](https://img.shields.io/discord/640707678297128980?label=Community%20Chat&logo=discord&style=social)

Share the latest news or your thoughts ![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/tigergraph?style=social)

Watch and follow the community growth in Github ![GitHub stars](https://img.shields.io/github/stars/tigergraph/ecosys?style=social)

Keep up-to-date on TigerGraph's latest news ![Twitter Follow](https://img.shields.io/twitter/follow/TigerGraphDB?style=social)

### Contributing

> [Please follow these steps to contribute.](CONTRIBUTING.md)

## Talk with TigerGraph Developers
[Open Office Hours: Ask Our Engineers Questions](https://info.tigergraph.com/officehours)

[Developer Fourm](https://groups.google.com/a/opengsql.org/forum/#!forum/gsql-users)

## Reporting Issues

### Bug Issue?
If you think you've found a bug, first read the [how to report a bug](https://www.TigerGraph/bog/how-to-report-a-bug/) article and follow its instructions.

If you're confident it's a new bug and have confirmed that someone else is facing the same issue, go ahead and create a new GitHub issue. Be sure to include as much information as possible so we can reproduce the bug.

### Security Issue?

If you think you have found a vulnerability, please report responsibly. Don't create GitHub issues for security issues. Instead, please send an email to<EMAIL_ADDRESS>and we'll look into it immediately.

## License

Copyright © 2020 TigerGraph

The content of this repository is bound by the following licenses:

- The computer software is licensed under the [Apache License 2.0](LICENSE.md) license.

[![ForTheBadge built-with-love](http://ForTheBadge.com/images/badges/built-with-love.svg)](https://tigergraph.com)

repository: wsheffel/ecosys

repo_name: wsheffel/ecosys


text:
# Modular multiplicative inverse

Source: [GeeksforGeeks](https://www.geeksforgeeks.org/multiplicative-inverse-under-modulo-m/amp/)
Source: [Wikipedia - Modular Multiplicative Inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse)

Given two integers ‘a’ and ‘m’, find modular multiplicative inverse of ‘a’ under modulo ‘m’.
The modular multiplicative inverse is an integer ‘x’ such that.

a x ≅ 1 (mod m)

The value of x should be in {0, 1, 2, … m-1}, i.e., in the range of integer modulo m.
The multiplicative inverse of “a modulo m” exists if and only if a and m are relatively prime (i.e., if gcd(a, m) = 1).

## Example

> Input:  a = 3, m = 11
> Output: 4
> Since (4*3) mod 11 = 1, 4 is modulo inverse of 3(under 11).
> One might think, 15 also as a valid output as "(15*3) mod 11"
is also 1, but 15 is not in ring {0, 1, 2, ... 10}, so not
valid.
>
> Input:  a = 10, m = 17
> Output: 12
> Since (10*12) mod 17 = 1, 12 is modulo inverse of 10(under 17).

branch_name: refs/heads/main


text:
---
layout: post
item_id:<PHONE_NUMBER>
title: >-
    Coronavirus can travel twice as far as official ‘safe distance’ and stay in air for 30 minutes, Chinese study finds
author: Tatu D'Oquei
date: 2020-03-09 14:44:38
pub_date: 2020-03-09 14:44:38
time_added: 2020-03-23 21:04:50
categories: []
tags: []
image: https://cdn.i-scmp.com/sites/default/files/styles/og_image_scmp_generic/public/d8/images/methode/2020/03/11/c2b098b0-620e-11ea-8e9f-2d196083a37c_image_hires_161511.jpg?itok=l5Ag_02i&v=1583914519
---

The coronavirus that causes Covid-19 can linger in the air for at least 30 minutes and travel up to 4.5 metres – further than the “safe distance” advised by health authorities around the world, according to a study by a team of Chinese government epidemiologists.

**Link:** [https://www.scmp.com/news/china/science/article/3074351/coronavirus-can-travel-twice-far-official-safe-distance-and-stay](https://www.scmp.com/news/china/science/article/3074351/coronavirus-can-travel-twice-far-official-safe-distance-and-stay)


text:
# JealouSy
This repository contains my small JS snippets.

[![Build Status](https://travis-ci.com/rymis/jealousy.svg?branch=master)](https://travis-ci.com/rymis/jealousy)

## render_template.js
Template rendering library. Template is some Node tree with special data-for/data-arguments tags.
Function renderTemplate allows to generate function which renders template into some tag you specified.

repository: rymis/jealousy

gha_language: JavaScript

repo_name: rymis/jealousy


text:
# Panop [![Build Status](https://travis-ci.org/mdemarne/panop-core.svg)](https://travis-ci.org/mdemarne/panop-core)
Simple Tool For Parallel Online Search

## About
Some internal search systems for website are simply not accurate enough.
Often, external indexed-based search tools are not sufficient either,
especially when the data is moving fast, or only specific subsets of websites
are targeted.

One way to avoid this is to do online analysis and search: this is what
Panop is for.

Panop will provide you a simple interface that allows you to select the target
of a search and its settings, as well as domain boundaries and search
depth. It will then return you a list of URLs matching your requirements
and allow you to browse through it.

Panop is a command-line-based tool.

## How to use
Panop is coded in Scala and uses SBT. To compile and use Panop, please clone
this repository. Execute:
```
sbt publishLocal
```
and then:
```
sbt script
```
...to generate a script at the root of the project. You can then move the
script anywhere in your system (e.g. in your bash path). To learn how to use
Panop, simply run:
```
panop --help
```

## Note
The use of Panop can produce some workload on websites, depending of
its settings.

## TODO
- Decentralize Master's synchronization. ideally, this should be done with
a tool such as Spark. But since it's a command-line based tool as well, it
would probably be harder to manage.
- Support folder-based research as well. Windows search is bad enough that this
tool could actually be useful there.

repository: mdemarne/panop-core

repo_name: mdemarne/panop-core


text:
# Testing LionBot

  1. Make sure that you have done all of the setup requirements and have gotten everything working properly. Check out the [Contributing](https://github.com/thecolumbialion/lionbot/blob/master/CONTRIBUTING.md) page if you haven't yet. The most important part is that you have downloaded all of the python dependencies (Flask, Dialogflow...) and ngrok.

  2. Next, just because we want everyone to be able to test changes that they have made to the bot without messing with others' work, you'll want your own personal test Dialogflow agent. There are a few things we have to do for this.

  #### Get a copy of our LionBot Agent
  Go to the [Dialogflow](dialogflow.com) website. Log in. You should be added to LionBot at this point. Go to the LionBot agent.
  Your browser should look something like the following:
  ![Image of LionBot console](./imgs/LionBotConsole.png?raw=true)
  Now, click on go to the settings page by clicking on the wheel next to the bot:
  ![Lionbot Settings](./imgs/LionBotConsoleSettingsWheel.jpg?raw=true)
  Now, you should be in the settings page and there should an **Export and Import** field, click on it:
  ![Lionbot Export Import](./imgs/ExportImportTag.jpg?raw=true)
  Then, click on **Export as Zip**. This should download a zip file of the current LionBot containing the Intents and Entities of the agent.
  ![LionBot Export Button](./imgs/ExportButton.jpg?raw=true)

  #### Create a new Dialogflow agent/project
  Click on the create new agent button on the drop-down menu for your Dialogflow projects.
  ![Create New Agent](./imgs/CreateNewAgent.jpg?raw=true)
  You can use the default settings, make sure that you name your agent. The creation should take a few seconds.
  ![Create New Agent Settings](./imgs/AgentCreationSettings.png?raw=true)

  #### Import the LionBot agent.
  You want to have your new Dialogflow agent become a copy of Lionbot. So, you'll want to use the **Restore From Zip** option make your newly created agent a copy of LionBot.
  ![Restore LionBot](./imgs/RestoreLionbot.jpg?raw=true)

  3. Make sure that we now have our agent in v2, v1 is deprecated. So we can't use it anymore.

  4. Now we want to connect our webhook to the agent so that we can test any changes we make to the webhook. Remember from the [Contributing](https://github.com/thecolumbialion/lionbot/blob/master/CONTRIBUTING.md) page how we deploy the webhook locally.
  In one bash instance, _with our virtual environment activated_, run `$ python testapp.py`, then in another bash instance run `$ ngrok http 5000`. In the ngrok window, the localhost instance will be forwarded to an actual url (e.g. `http://das87968.ngrok.io`) that you can copy and paste.

  Now, you should use this, to deploy a webhook for your test agent. Go to the fulfillment's page, enable webhook, and copy the url you got from ngrok with `/webhook` appended to the end. And remember to scroll down and click **SAVE**.
  ![Enable Webook](./imgs/EnableWebhook.png?raw=true)

  Now, you should be good to go, you can enter your test queries in the test window.

  _Note_: Since we have set the debug flag in the flask config, you don't need to reset the webhook if you need to fix a bug. Just change it and save the file, the webhook should automagically update.
  ![Test the Bot](./imgs/TestNOW.jpg?raw=true)

  If you don't see the responses you were expecting, remember to switch from `Default response` to `Actions on Google` _after_ when you try a test query.
  ![Actions](./imgs/ActionsOnGoogle.jpg?raw=true)


text:
# WCF Facility - Registration

## How to register WCF Facility

It is very easy to register WCF Facility using the AddFacility method of the IWindsorContainer. The code below shows how this can be done.

```csharp
container.AddFacility<WcfFacility>(f => f.CloseTimeout = TimeSpan.Zero)
    .Register(Component.For<IMyService>()
    .ImplementedBy<MyService>()
    .ActAs(new DefaultServiceModel()))
```

In the above example, IMyservice is the service contract and MyService is the implementation of the contract.

You can also use the DependsOn() method to specify custom dependencies for the service as in the example below.

```csharp
container.AddFacility<WcfFacility>(f => f.CloseTimeout = TimeSpan.Zero)
    .Register(Component.For<IMyService>()
    .DependsOn(new { number = 42 })
    .ImplementedBy<MyService>()
    .ActAs(new DefaultServiceModel()))
```

It is required to update the .svc file to set the Castle.Windsor factory:

```
<%@ ServiceHost
  Language="C#"
  Service="MyService"
  Factory="Castle.Facilities.WcfIntegration.DefaultServiceHostFactory, Castle.Facilities.WcfIntegration" %>
```

Additionally, it is possible to load the configuration from a separate config file. For example:

```csharp
Container.AddFacility<WcfFacility>()
    .Install(Castle.Windsor.Installer.Configuration.FromXmlFile("Windsor.config"));

```

In this case, you must add a Windsor.config file to the project - an example is:

```xml
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <components>
    <component id="BistroServices" service="IMyService" type="MyService" lifestyle="transient">
    </component>
  </components>
</configuration>
```

## non-HTTP Protocol WCF Services

For HTTP protocol WCF services hosted under IIS, the Application_Start is called when the application is first started. To be more precisely, it is called when the HttpApplication type is instantiated and this occurs when the first HTTP request comes into the application. Under the hood, the global.asax file is compiled into a derived type of System.Web.HttpApplication and the corresponding global methods are mapped to the events exposed from HttpApplication.

### Using AppInitialize

The global.asax instantiation does not work for non-HTTP protocols such as net.tcp and net.pipe that are enabled through hosting via Windows Activation Service (WAS) on IIS7 and later as there is no counterpart for HttpApplication.

Fortunately, ASP.NET provides a simple hook that works in a protocol agnostic way. The hook is based on the following AppInitialize method:

```csharp
public static void AppInitialize();
```

This method can be put in any type that is defined in a C# file in the application's `App_Code` directory. When the AppDomain is started, ASP.NET reflects whether there is a type that has such as method signature.

So, Create a class and put it into a folder called `App_Code` in the root of your project and give it a method signature as defined below. You can then initialise your IoC container in there and register it with the DefaultServiceHostFactory.

```csharp
public class AnyClassName
{
    public static void AppInitialize()
    {
        DefaultServiceHostFactory.RegisterContainer(((CastleContainer)IoC.Container).WindsorContainer.Kernel);
    }
}
```

:information_source: If you are switching from WCF activation to Windsor's WcfFacility, please make sure to remove the ServiceBehavior attribute from service type.

repository: Chcwh/Windsor-doc-cn

repo_name: Chcwh/Windsor-doc-cn


text:
# NRPE Exporter for Prometheus [![Build Status](https://travis-ci.org/criteo/nrpe_exporter.svg?branch=master)](https://travis-ci.org/criteo/nrpe_exporter)

## Disclaimer: This project is inspired from the RobustPerception's [exporter](https://github.com/RobustPerception/nrpe_exporter) This is not an official Criteo product

## Building & Running
    go get -v github.com/criteo/nrpe_exporter
    cd $GOPATH/src/github.com/criteo/nrpe_exporter
    dep ensure -vendor-only
    go install

## What to expect ?

1. This project aims to be a complete drop-in replacement for a Nagios based monitoring
2. At the moment only numerics (float) performance-datas are exported, we plan to support even metric-system ones (ie: size=40GB) in a near future

## Example Prometheus scrape-config
```
scrape_configs:

   - job_name: 'nrpe'
     scrape_interval: "60s"
     metrics_path: /run
     params:
         arg: ['10','5']
 #        port: ['5666'] #Default
         command: ['foo']
     static_configs:
       - targets:
           - server.example.com
     relabel_configs:
       - source_labels: ['__address__']
         target_label: '__param_target'
       - source_labels: ['__param_target']
         target_label: 'instance'
       - target_label: '__address__'
         replacement: "localhost:9235"
```


text:
# Introduction

### We love pull requests!
First off, thank you for considering contributing to wealthbot.io. It's people like you that can help bring wealth management to the masses.

### Guidelines
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.

### Contributions
wealthbot.io is an open source project and we love to receive contributions from our community — you! There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into wealthbot.io itself.

### Never contributed to open source before?  Feel free to ask for help; everyone is a beginner at first.

If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge.

# Getting started
### How to submit a contribution
For something that is bigger than a one or two line fix:

1. Create your own fork of the code
2. Do the changes in your fork
3. Send a pull request indicating that you have a CLA on file.

### Small fixes
Small contributions such as fixing spelling errors, where the content is small enough to not be considered intellectual property, can be submitted by a contributor as a patch, without a CLA.

As a rule of thumb, changes are obvious fixes if they do not introduce any new functionality or creative thinking. As long as the change does not affect functionality, some likely examples include the following:

* Spelling / grammar fixes
* Typo correction, white space and formatting changes
* Comment clean up
* Bug fixes that change default return values or error codes stored in constants
* Adding logging messages or debugging output
* Changes to ‘metadata’ files like Gemfile, .gitignore, build scripts, etc.
* Moving source files from one directory or package to another

# How to report a bug
If you find a security vulnerability, do NOT open an issue. Email<EMAIL_ADDRESS>instead.

In order to determine whether you are dealing with a security issue, ask yourself these two questions:

* Can I access something that's not mine, or something I shouldn't have access to?
* Can I disable something for other people?

If the answer to either of those two questions are "yes", then you're probably dealing with a security issue. Note that even if you answer "no" to both questions, you may still be dealing with a security issue, so if you're unsure, just email us at<EMAIL_ADDRESS>
### How to file a bug report
File an issue here on Github. When filing an issue, make sure to answer these five questions:

1. What version of PHP and Symfony are you using?
2. What operating system and processor architecture are you using?
3. What did you do?
4. What did you expect to see?
5. What did you see instead?

General questions should go to<EMAIL_ADDRESS>instead of the issue tracker. We'll do our best to answer or ask you to file an issue if you've tripped over a bug.

# How to suggest a feature or enhancement
Do you have a feature you’d like to see? We’d love to hear your ideas for improving wealthbot.io!

Please use [our public roadmap on Trello](https://trello.com/b/klhsT5Xj/wealthbot-io-roadmap-and-ideas) for feature requests.

Before making your feature requests, double-check our Backlog list and the 'In Progress' list to the right. If a feature is already there, we've captured it and we’re on it—no need to reach out. Feel free to subscribe to the card to track our progress.

Don’t see your feature listed already? Then get in touch! You can comment on this card or send an email to<EMAIL_ADDRESS>and someone on our team will take a look. Be sure to let us know the following info:

* What is the pain point that the feature is trying to address?
* What would it do that isn’t already in the app?
* How would you or other users benefit from the feature?

# Code review process
At this point you're waiting on us. We like to at least comment on pull requests within three business days (and, typically, one business day). We may suggest some changes or improvements or alternatives.

Some things that will increase the chance that your pull request is accepted:

* Write tests.
* Write a good commit message.

# Community
You can chat with the team and the wealthbot community on https://wealthbot.slack.com. Email<EMAIL_ADDRESS>for an invite.

# Thank You
A huge shout out to all our contributors and a special thank you to [@nayafia](https://github.com/nayafia) for making our contribution guide 1000X times better with her [contributing template](https://github.com/nayafia/contributing-template).

repository: wealthbot-io/wealthbot

gha_language: PHP

gha_license_id: NOASSERTION

repo_name: wealthbot-io/wealthbot


text:
# Plot with Matplotlib

Code in this folder demonstrates how to make different types of plots with matplotlib.

Saved images can be referenced by readme files like this:

![](demo.png)


text:
---
layout: default
---

# 1994-06-15 - Re: How many on cypherpunks?

## Header Data

From: Ezekial Palmer<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 46a841f0fd27323fc3d2d901798213e5d77332fb50fd341f1dd42dad013e56ff

Message ID: \<199406150451.AA14626@xtropia\>

Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-06-15 05:10:36 UTC

Raw Date: Tue, 14 Jun 94 22:10:36 PDT

## Raw message

```
{% raw  %}From: Ezekial Palmer<EMAIL_ADDRESS>Date: Tue, 14 Jun 94 22:10:36 PDT
To<EMAIL_ADDRESS>Subject: Re: How many on cypherpunks?
In-Reply-To<EMAIL_ADDRESS>Message-ID: <199406150451.AA14626@xtropia>
MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

    From<EMAIL_ADDRESS>    Date: Tue, 14 Jun 94 15:48:14 +0530
    Subject: How many on cypherpunks?

    They came for the Jews,
    and I was silent because I was not a Jew;
    They came for the Trade Unionists,
    and I did not protest, because I did not
    belong to a trade union;
    They came for the Catholics, and I said nothing
    because I was not a Catholic;
    And then they came for me.
    There was no one left to say anything...

    ----Father Niemoeller

So, why'd you "forget" the start of the quote??

Zeke

In Germany they first came for the Communists, and I didn't speak up because I
wasn't a Communist. Then they came for the Jews, and I didn't speak up because
I wasn't a Jew.  Then they came for the trade unionists, and I didn't speak up
because I wasn't a trade unionist.  Then they came for the Catholics, and I
didn't speak up because I was a Protestant.  Then they came for me -- and by
that time no one was left to speak up.

Pastor Martin Niemoller

-----BEGIN PGP SIGNATURE-----
Version: 2.3a

iQCVAgUBLf5e/BVg/9j67wWxAQFhegP+OSa9YOou6rJZHCiyMkc4ZAEUSf7NicYo
SPJnkkKJZQq/x/mhggb/x8uXKXwYefK/JwI9ZhOaGxDefG4psaV0/2AlgQgZXjdf
82QQVlYwsfOoG8f+xnZWWguR/8QgpsEfMTp2uXIQX46opZg0FYTtU5GvSjXPZoZ2
U4KgWwrig6M=
=Ynhj
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [June 1994](/archive/1994/06)

+ Return to "[Ezekial Palmer <an60011@anon.penet.fi>](/authors/ezekial_palmer_an60011_at_anon_penet_fi_)"
+ Return to "[rishab@dxm.ernet.in](/authors/rishab_at_dxm_ernet_in)"

+ 1994-06-14 (Tue, 14 Jun 94 03:22:27 PDT) - [How many on cypherpunks?](/archive/1994/06/013ca865a83b4146a6f03074e57bb5298c06b9d2630b9c9a1622893d9c49ee67) -<EMAIL_ADDRESS>  + 1994-06-15 (Tue, 14 Jun 94 22:10:36 PDT) - Re: How many on cypherpunks? - _Ezekial Palmer<EMAIL_ADDRESS>

gha_license_id: MIT


text:
Boomtrain is a predictive intelligence platform for marketers that leverages machine learning to drive increased clicks, engagement and revenue through customer communications. [Visit Website](http://boomtrain.com).

The Boomtrain integration with Segment.io supports the `identify`, `track` and `page` methods.  Our Javascript integration code is open sourced on Github. [Feel free to check it out](https://github.com/boomtrain/segmentio_integration).

## Getting Started
Steps to connect.
 - Turn on Boomtrain integration via Segment dashboard.
 - Enter your Boomtrain API Key.

If you're not sure where to find your Boomtrain API Key, contact [Boomtrain<EMAIL_ADDRESS>or your Boomtrain CSM directly.

When you turn on Boomtrain in Segment, this is what happens:
- The Boomtrain snippet will start asynchronously loading Boomtrain's Javascript library onto your page.
- Once loaded, the Boomtrain Javascript library will automatically start sending events to the Boomtrain system indicating that the current page has been viewed.
- When users visit pages on your site, the "viewed" events sent to the Boomtrain system will trigger ingestion of your content and processing by our machine learning algorithms.
- To start sending custom events and user data, use the Javascript methods described below.

## Identify
When you call [`identify`](https://segment.com/docs/spec/identify) on analytics.js, we call `person.set` on the Boomtrain Javascript Library with the `traits` object. A `userId` must be specified.  For additional details about the Boomtrain `person.set` methods see [this article](https://boomtrain.readme.io/docs/personset-attributes-callback) on the Boomtrain Developer Documentation.

## Track
When you call [`track`](https://segment.com/docs/spec/track), we will send the `event` you specify to the `track` method on the Boomtrain Javascript library, along with the properties you provide.  For additional details about the Boomtrain `track` method see [this article](https://boomtrain.readme.io/docs/track-an-activity-1) on the Boomtrain Developer Documentation.

## Settings
Segment lets you change these settings on the Integrations page, without having to touch any code.
### App ID
The App ID for your app can be taken from the integration guide provided by Boomtrain to your company.  For additional information about your App ID or integration details, contact your Boomtrain CSM or [support@boomtrain.com](mailto:support@boomtrain.com).

If you have any questions, or sueggestions on we can improve this documentation, feel free to [contact us](http://boomtrain.com/contact/).


text:
# Unreleased

- Removed debug line

# 0.2.1

- Added test script to npm for CI automation
- Added build status to README
- Changed gulp tasks to run in sequence
- Added lcov report for CircleCI
- Added npm and dependencies badges to README

# 0.2.0

- Added inline option for serialisation

# 0.1.1

- Added installation, usage and extending example to README

# 0.1.0

- Added basic files and configured package.json
- Added test, standards and coverage scripts
- Symlinked npm scripts to bin for development
- Added first version of library and tests

repository: peterjwest/serialise-js

repo_name: peterjwest/serialise-js


text:
---
title: "Length bonus"
---

How much longer than the default length to make your apron.

## Effect of this option on the pattern

![This image shows the effect of this option by superimposing several variants that have a different value for this option](albert_lengthbonus_sample.svg "Effect of this option on the pattern")

repository: freesewing/freesewing

branch_name: refs/heads/develop

repo_name: freesewing/freesewing


text:
# pyglsim [V 0.1]
A Python / OpenGL framework for teaching simulation methods

## About pyglsim
pyglsim is a little project for upcoming iterations of my simulation methods course -- previously CS 290 AJ at the University of Regina computer science department.

The purpose of pyglsim is to provide students with an easy to hack graphical interface to work with in order to program various physical simulations in python -- without any extra frills.

## Features
In progress:
* 3D Rendering of gl-defined objects *
* External "classes" that allow for the programming of object motion
* Everything else...

## Contact
* Trevor M. Tomesh<EMAIL_ADDRESS>

license: Unlicense

repository: trevortomesh/pyglsim

repo_name: trevortomesh/pyglsim


text:
# Homeseer 3 EnOcean plugin

### This project is licensed under the 3-clause BSD license.

**If you like or use this project then observe the following :**

1. I would like to know if people use it - this makes it more likely I will do additional coding.
2. If you feel this have any value for you then feel free to donate me something from below :
    - EnOcean Co2 sensor : http://pressacdirect.com/shop/building-sensors/enocean-co2-sensor/ (868MHz)
    - Other EnOcean devices (868MHz) temp, humidity, pir, switches or something else.
    - Home Automation hardware like zwave etc.
    - Or you can write to me if you would donate something else like money/hardware/interesting stuff
3. If you have any suggestions or patches for improvement the please add an issue in the github or write to me.

I can be contacted by email at nicolai __at__ npossible.net

You can also try to catch me on IRC freenode / ##zwave - look for CyberDuck


text:
# Shared Playlist
Web interface to create a playlist collaboratively and play it on a central location such as (and currently limited to) an Aldebaran robot (e.g. Pepper or Nao).

![screenshot](https://github.com/hedgehogarray/shared_playlist/blob/master/img/shared-playlist-screenshot.png)


text:
### What is the Filecoin Mining Process

An active participant in the filecoin consensus process is a storage miner and expected consensus block proposer. They are responsible for storing data for the filecoin network and also for driving the filecoin consensus process. Miners should constantly be performing Proofs of SpaceTime, and also checking if they have a winning `ticket` to propose a block for each round. Rounds are currently set to take around 30 seconds, in order to account for network propagation around the world. The details of both processes are defined here.

Any block proposer must be a storage miner, but storage miners can avoid performing the block proposer tasks, however in this way, they will be losing out on block rewards and transaction fees.

## The Miner Actor

After successfully calling `CreateMiner`, a miner actor will be created on-chain, and registered in the storage market. This miner, like all other Filecoin State Machine actors, has a fixed set of methods that can be used to interact with or control it.

For details on the methods on the miner actor, see its entry in the [actors spec](actors.md#storage-miner-actor).

### Owner Worker distinction

The miner actor has two distinct 'controller' addresses. One is the worker, which is the address which will be responsible for doing all of the work, submitting proofs, committing new sectors, and all other day to day activities. The owner address is the address that created the miner, paid the collateral, and has block rewards paid out to it. The reason for the distinction is to allow different parties to fulfil the different roles. One example would be for the owner to be a multisig wallet, or a cold storage key, and the worker key to be a 'hot wallet' key.

### Storage Mining Cycle

Storage miners must continually produce Proofs of SpaceTime over their storage to convince the network that they are actually storing the sectors that they have committed to. Each PoSt covers a miner's entire storage.

#### Step 0: Registration

To initially become a miner, a miner first register a new miner actor on-chain. This is done through the storage market actor's [`CreateMiner`](actors.md#createstorageminer) method. The call will then create a new miner actor instance and return its address.

The next step is to place one or more storage market asks on the market. This is done through the storage markets [`AddAsk`](actors.md#addask) method. A miner may create a single ask for their entire storage, or partition their storage up in some way with multiple asks (at potentially different prices).

After that, they need to make deals with clients and begin filling up sectors with data. For more information on making deals, see the section on [deal](storage-market.md#deal).

When they have a full sector, they should seal it. This is done by invoking [`PoRep.Seal`](proofs.md#seal) on the sector.

#### Step 1: Commit

When the miner has completed their first seal, they should post it on-chain using [CommitSector](actors.md#commitsector). If the miner had zero committed sectors prior to this call, this begins their proving period.

The proving period is a fixed amount of time in which the miner must submit a Proof of Space Time to the network.

During this period, the miner may also commit to new sectors, but they will not be included in proofs of space time until the next proving period starts.

TODO: sectors need to be globally unique. This can be done either by having the seal proof prove the sector is unique to this miner in some way, or by having a giant global map on-chain is checked against on each submission. As the system moves towards sector aggregation, the latter option will become unworkable, so more thought needs to go into how that proof statement could work.

#### Step 2: Proving Storage (PoSt creation)

At the beginning of their proving period, miners collect the proving set (the set of all live sealed sectors on the chain at this point), and then call `ProveStorage`. This process will take the entire proving period to complete.

```go
func ProveStorage(sectorSize BytesAmount, sectors []commR, startTime BlockHeight) (PoSTProof, []FaultSet) {
	var proofs []Proofs
	var seeds []Seed
	var faults []FaultSet
	for t := 0; t < ProvingPeriod; t += ReseedPeriod {
		seeds = append(seeds, GetSeedFromBlock(startTime+t))
		proof, faultset := GenPost(sectors, seeds[t], vdfParams)
		proofs = append(proofs, proof)
		faults = append(faults, faultset)
	}
	return GenPostSnark(sectorSize, sectors, seeds, proofs), faults
}
```

Note: See ['Proof of Space Time'](proofs.md#proof-of-space-time) for more details.

The proving set remains consistent during the proving period. Any sectors added in the meantime will be included in the next proving set, at the beginning of the next proving period.

#### Step 3: PoSt Submission

When the miner has completed their PoSt, they must submit it to the network by calling [SubmitPoSt](actors.md#submitpost). There are two different times that this *could* be done.

1. **Standard Submission**: A standard submission is one that makes it on-chain before the end of the proving period. The length of time it takes to compute the PoSts is set such that there is a grace period between then and the actual end of the proving period, so that the effects of network congestion on typical miner actions is minimized.
2. **Penalized Submission**: A penalized submission is one that makes it on-chain after the end of the proving period, but before the generation attack threshold. These submissions count as valid PoSt submissions, but the miner must pay a penalty for their late submission. (See '[Faults](faults.md)' for more information)
   - Note: In this case, the next PoSt should still be started at the beginning of the proving period, even if the current one is not yet complete. Miners must submit one PoSt per proving period.

Along with the PoSt submission, miners may also submit a set of sectors that they wish to remove from their proving set. This is done by selecting the sectors in the 'done' bitfield passed to `SubmitPoSt`.

### Stop Mining

In order to stop mining, a miner must complete all of its storage contracts, and remove them from their proving set during a PoSt submission. A miner may then call [`DePledge()`](actors.md#depledge) to retrieve their collateral. `DePledge` must be called twice, once to start the cooldown, and once again after the cooldown to reclaim the funds. The cooldown period is to allow clients whose files have been dropped by a miner to slash them before they get their money back and get away with it.

### Faults

Faults are described in the [faults document](faults.md).

### On Being Slashed (WIP, needs discussion)

If a miner is slashed for failing to submit their PoSt on time, they currently lose all their pledge collateral. They do not necessarily lose their storage collateral. Storage collateral is lost when a miner's clients slash them for no longer having the data. Missing a PoSt does not necessarily imply that a miner no longer has the data. There should be an additional timeout here where the miner can submit a PoSt, along with 'refilling' their pledge collateral. If a miner does this, they can continue mining, their mining power will be reinstated, and clients can be assured that their data is still there.

TODO: disambiguate the two collaterals across the entire spec

Review Discussion Note: Taking all of a miners collateral for going over the deadline for PoSt submission is really really painful, and is likely to dissuade people from even mining filecoin in the first place (If my internet going out could cause me to lose a very large amount of money, that leads to some pretty hard decisions around profitability). One potential strategy could be to only penalize miners for the amount of sectors they could have generated in that timeframe.

## Mining Blocks

Having registered as a miner, it's time to start making and checking tickets. At this point, the miner should already be running chain validation, which includes keeping track of the latest [TipSets](./expected-consensus.md#tipsets) seen on the network.

For additional details around how consensus works in Filecoin, see the [expected consensus spec](./expected-consensus.md). For the purposes of this section, there is a consensus protocol (Expected Consensus) that guarantees a fair process for determining what blocks have been generated in a round, whether a miner should mine a block themselves, and some rules pertaining to how "Tickets" should be validated during block validation.

### Receiving Blocks

When receiving blocks from the network (via [block propagation](data-propagation.md)), a miner must do the following:

1. Check their validity (see [below](#block-validation)).
2. Assemble a TipSet with all valid blocks with common parents and the same number of tickets in their `Tickets` array.

A miner may sometimes receive blocks belonging to different TipSets (i.e. whose parents are not the same). In that case, they must choose which TipSet to mine on.

Chain selection is a crucial component of how the Filecoin blockchain works. Every chain has an associated weight accounting for the number of blocks mined on it and so the power (storage) they track. It is always preferable to mine atop a heavier TipSet rather than a lighter one. While a miner may be foregoing block rewards earned in the past, this lighter chain is likely to be abandoned by other miners forfeiting any block reward earned as miners converge on a final chain. For more on this, see [chain selection](./expected-consensus.md#chain-selection) in the Expected Consensus spec.

### Block Validation

The block structure and serialization is detailed in [the datastructures spec - block](data-structures.md#block). Check there for details on fields and types.

In order to validate a block coming in from the network at round `N` was well mined a miner must do the following:

```go
func VerifyBlock(blk Block) {
    // 1. Verify Signature
    pubk := GetPublicKey(blk.Miner)
    if !ValidateSignature(blk.Signature, pubk, blk) {
        Fatal("invalid block signature")
    }

    // 2. Verify Timestamp
    // first check that it is not in the future
    if blk.GetTime() > time.Now() {
        Fatal("block was generated too far in the future")
    }
    // next check that it is appropriately delayed from its parents
    if blk.GetTime() <= blk.minParentTime() + BLOCK_DELAY {
        Fatal("block was generated too soon")
    }

    // 3. Verify ParentWeight
    if blk.ParentWeight != ComputeWeight(blk.Parents) {
        Fatal("invalid parent weight")
    }

    // 4. Verify Tickets
    if !VerifyTickets(blk) {
        Fatal("tickets were invalid")
    }

    // 5. Verify ElectionProof
    randomnessLookbackTipset := RandomnessLookback(blk)
    lookbackTicket := minTicket(randomnessLookbackTipset)
    challenge := sha256.Sum(lookbackTicket)

    if !ValidateSignature(blk.ElectionProof, pubk, challenge) {
        Fatal("election proof was not a valid signature of the last ticket")
    }

    powerLookbackTipset := PowerLookback(blk)
    minerPower := GetPower(powerLookbackTipset.state, blk.Miner)
    totalPower := GetTotalPower(powerLookbackTipset.state)
    if !IsProofAWinner(blk.ElectionProof, minerPower, totalPower) {
        Fatal("election proof was not a winner")
    }

    // 6. Verify StateRoot
    state := GetParentState(blk.Parents)
    for i, msg := range blk.Messages {
        receipt := ApplyMessage(state, msg)
        if receipt != blk.MessageReceipts[i] {
            Fatal("message receipt mismatch")
        }
    }
    if state.Cid() != blk.StateRoot {
        Fatal("state roots mismatch")
    }
}
```

Ticket validation is detailed as follows:

```go
func RandomnessLookback(blk Block) TipSet {
	return chain.GetAncestorTipset(blk, K)
}

func PowerLookback(blk Block) TipSet {
	return chain.GetAncestorTipset(blk, L)
}

func IsProofAWinner(p ElectionProof, minersPower, totalPower Integer) bool {
	return Integer.FromBytes(sha256.Sum(p))*totalPower < minersPower*2^32
}

func VerifyTickets(b Block) error {
	// Start with the `Tickets` array
	// get the smallest ticket from the blocks parent tipset
	parTicket := GetSmallestTicket(b.Parents)

	// Verify each ticket in the chain of tickets. There will be one ticket
	// plus one ticket for each failed election attempt.
	for _, ticket := range b.Tickets {
		challenge := sha256.Sum(parTicket.Signature)

		// Check VDF
		if !VerifyVDF(ticket.VDFProof, ticket.VDFResult, challenge) {
			return "VDF was not run properly"
		}

		// Check VRF
		pubk := getPublicKeyForMiner(b.Miner)
		if !VerifySignature(ticket.Signature, pubk, ticket.VDFResult) {
			return "Ticket was not a valid signature over the parent ticket"
		}
		// in case mining this block generated multiple tickets
		parTicket = ticket
	}

	return nil
}
```

If all of this lines up, the block is valid. The miner repeats this for all blocks in a TipSet, and for all TipSets formed from incoming blocks.

Once they've ensured all blocks in the heaviest TipSet received were properly mined, they can mine on top of it. If they weren't, the miner may need to ensure the next heaviest `Tipset` was properly mined. This might mean the same `Tipset` with invalid blocks removed, or an altogether different one.

If no valid blocks are received, a miner may mine atop the same `TipSet` running leader election again using the next ticket in the ticket chain, and also generating a [new ticket](./expected-consensus.md#losing-tickets) in the process (see the [expected consensus spec](./expected-consensus.md) for more).

### Ticket Generation

For details of ticket generation, see the [expected consensus spec](./expected-consensus.md#ticket-generation).

Ticket generation is the twin process of leader election (i.e. generating `ElectionProof`s). Every ticket scratch (i.e. round of leader election) has the miner generate a new ticket to include in the `Tickets` array of their block.

New tickets are generated using the smallest ticket from the parent TipSet at height `H` and added to the `Tickets` array. Generating a new ticket will take some amount of time (as imposed by the VDF in Expected Consensus).

Because of this, on expectation, as it is produced, the miner will hear about other blocks being mined on the network. By the time they have generated their new ticket, they can check whether they themselves are eligible to mine a new block.

If the lookback ticket yields a valid `ElectionProof`, the miner publishes their block (see [block generation](#block-creation)) including the new ticket and earns a block reward. They then assemble a new TipSet using any valid blocks they heard about while generating the ticket  (likely of height `H+1`) and mine atop the smallest ticket in that new TipSet.

### Scratching a losing ticket

If a miner fails to generate a valid `ElectionProof` using their lookback ticket, they may not yet publish a new block at height `H+1`. The miner will likely hear about other blocks being mined on the network at height `H+1` and can thus assemble a new TipSet to mine off of with these blocks (as above).

If the miner hears of no new blocks, they must instead draw a new ticket to scratch in order to try leader election again (as other miners will). In order to do so, they must generate a new ticket once more.

Now, rather than generating this new ticket from the smallest ticket from the parent TipSet (as above), the miner will instead use their ticket from the last round, now in the `Tickets` array.

This process is repeated until either a winning ticket is found (and block published) or a new valid TipSet comes in from the network. If a new TipSet comes in from the network, and it is heavier chain than the miner's own, they should abandon their process to mine atop this new block. Due to the way chain selection works in filecoin, a chain with more blocks will be preferred (see the [Expected Consensus spec](./expected-consensus.md#chain-selection) for more details).

The `Tickets` array in the block to be published grows with each round (and a new ticket generated).

### Block Creation

Scratching a winning ticket, and armed with a valid `ElectionProof`, a miner can now publish a new block!

To create a block, the eligible miner must compute a few fields:

- `Tickets` - An array containing a new ticket, and, if applicable, any intermediary tickets generated to prove appropriate delay for any failed election attempts. See [ticket generation](./expected-consensus.md#ticket-generation).
- `ElectionProof` - A signature over the final ticket from the `Tickets` array proving. See [ticket generation](./expected-consensus.md#ticket-generation).
- `Timestamp` - A Unix Timestamp generated at block creation. We use an unsigned integer to represent a UTC timestamp. The Timestamp in the newly created block must satisfy the following conditions:
  - the timestamp on the block is not in the future
  - the timestamp on the block is at least BLOCK_DELAY higher than the latest of its parents, with BLOCK_DELAY taking on the same value as that needed to generate a valid VDF proof for a new Ticket (currently set to 30 seconds).
- `ParentWeight` - As described in [Chain Weighting](./expected-consensus.md#chain-weighting).
- `ParentState` - Note that it will not end up in the newly generated block, but is necessary to compute to generate other fields. To compute this:
  - Take the `ParentState` of one of the blocks in the chosen parent set (invariant: this is the same value for all blocks in a given parent set).
  - For each block in the parent set, ordered by their tickets:
    - Apply each message in the block to the parent state, in order. If a message was already applied in a previous block, skip it.
    - Transaction fees are given to the miner of the block that the first occurance of the message is included in. If there are two blocks in the parent set, and they both contain the exact same set of messages, the second one will receive no fees.
    - It is valid for messages in two different blocks of the parent set to conflict, that is, A conflicting message from the combined set of messages will always error.  Regardless of conflicts all messages are applied to the state.
    - TODO: define message conflicts in the state-machine doc, and link to it from here
- `MsgRoot` - To compute this:
  - Select a set of messages from the mempool to include in the block.
  - Insert them into a Merkle Tree and take its root.
- `StateRoot` - Apply each chosen message to the `ParentState` to get this.
- `ReceiptsRoot` - To compute this:
  - Apply the set of messages selected above to the parent state, collecting invocation receipts as this happens.
  - Insert them into a Merkle Tree and take its root.
- `BlockSig` - A signature with the miner's private key (must also match the ticket signature) over the entire block. This is to ensure that nobody tampers with the block after it propagates to the network, since unlike normal PoW blockchains, a winning ticket is found independently of block generation.

An eligible miner can start by filling out `Parents`, `Tickets` and `ElectionProof` with values from the ticket checking process.

Next, they compute the aggregate state of their selected parent blocks, the `ParentState`. This is done by taking the aggregate parent state of the blocks' parent TipSet, sorting the parent blocks by their tickets, and applying each message in each block to that state. Any message whose nonce is already used (duplicate message) in an earlier block should be skipped (application of this message should fail anyway). Note that re-applied messages may result in different receipts than they produced in their original blocks, an open question is how to represent the receipt trie of this tipsets 'virtual block'. For more details on message execution and state transitions, see the [Filecoin state machine](state-machine.md) document.

Once the miner has the aggregate `ParentState`, they must apply the mining reward. This is done by adding the correct amount to the miner owner's account balance in the state tree. See [block reward](#block-rewards) for details.

Now, a set of messages is selected to put into the block. For each message, the miner subtracts `msg.GasPrice * msg.GasLimit` from the sender's account balance, returning a fatal processing error if the sender does not have enough funds (this message should not be included in the chain).

They then apply the messages state transition, and generate a receipt for it containing the total gas actually used by the execution, the executions exit code, and the return value (see [receipt](data-structures.md#message-receipt) for more details). Then, they refund the sender in the amount of `(msg.GasLimit - GasUsed) * msg.GasPrice`. In the event of a message processing error, the remaining gas is refunded to the user, and all other state changes are reverted. (Note: this is a divergence from the way things are done in Ethereum)

Each message should be applied on the resultant state of the previous message execution, unless that message execution failed, in which case all state changes caused by that message are thrown out. The final state tree after this process will be the block's `StateRoot`.

The miner merklizes the set of messages selected, and put the root in `MsgRoot`. They gather the receipts from each execution into a set, merklize them, and put that root in `ReceiptsRoot`. Finally, they set the `StateRoot` field with the resultant state.

Note that the `ParentState` field from the expected consensus document is left out, this is to help minimize the size of the block header. The parent state for any given parent set should be computed by the client and cached locally.

Finally, the miner can generate a Unix Timestamp to add to their block, to show that the block generation was appropriately delayed.

The miner will wait until BLOCK_DELAY has passed since the latest block in the parent set was generated to timestamp and send out their block. We recommend using NTP or another clock synchronization protocol to ensure that the timestamp is correctly generated (lest the block be rejected). While this timestamp does not provide a hard proof that the block was delayed (we rely on the VDF in the ticket-chain to do so), it provides some softer form of block delay by ensuring that honest miners will reject undelayed blocks.

Now the block is complete, all that's left is to sign it. The miner serializes the block now (without the signature field), takes the sha256 hash of it, and signs that hash. They place the resultant signature in the `BlockSig` field.

#### Block Broadcast

An eligible miner broadcasts the completed block to the network (via [block propagation](data-propagation.md)), and assuming everything was done correctly, the network will accept it and other miners will mine on top of it, earning the miner a block reward!

### Block Rewards

Over the entire lifetime of the protocol, 1,400,000,000 FIL (`TotalIssuance`) will be given out to miners. The rate at which the funds are given out is set to halve every six years, smoothly (not a fixed jump like in Bitcoin). These funds are initially held by the network account actor, and are transferred to miners in blocks that they mine. The reward amount remains fixed for a period of 1 week (given our 30 second block time, this  is 20,160 blocks, the `AdjustmentPeriod`) and is then adjusted. Over time, the reward will eventually become zero as the fractional amount given out at each step shrinks the network account's balance to 0.

The equation for the current block reward is of the form:

```
Reward = IV * (Decay ^ (BlockHeight / 20160))
```

`IV` is the initial value, and is computed by taking:

```
IV = TotalIssuance * (1 - Decay)
```

`Decay` is computed by:

```
Decay = e^(ln(0.5) / (HalvingPeriodBlocks / AdjustmentPeriod))
```

```
// Given one block every 30 seconds, this is how many blocks are in six years
HalvingPeriodBlocks = 6 * 365 * 24 * 60 * 2
```

Note: Due to jitter in EC, and the gregorian calendar, there may be some error in the issuance schedule over time. This is expected to be small enough that it's not worth correcting for. Additionally, since the payout mechanism is transferring from the network account to the miner, there is no risk of minting *too much* FIL.

### Open Questions

- How should receipts for tipsets 'virtual blocks' be referenced? It is common for applications to provide the merkleproof of a receipt to prove that a transaction was successfully executed.

### Future Work
There are many ideas for improving upon the storage miner, here are ideas that may be potentially implemented in the future.

- **Sector Resealing**: Miners should be able to 're-seal' sectors, to allow them to take a set of sectors with mostly expired pieces, and combine the not-yet-expired pieces into a single (or multiple) sectors.
- **Sector Transfer**: Miners should be able to re-delegate the responsibility of storing data to another miner. This is tricky for many reasons, and will not be implemented in the initial release of Filecoin, but could provide interesting capabilities down the road.

repository: arsstone/specs

repo_name: arsstone/specs


text:
#### Named Captures

This example shows a ```MatchData``` with named captures.

@[ruby](show.rb)

The output shows details of the ```MatchData```.

@[yaml](show.yaml)

gha_language: Ruby


text:
---
layout: default
---

# 1997-01-08 - Re: [STATS] Cypherpunks subscriptions on and off

## Header Data

From: Black Unicorn<EMAIL_ADDRESS>To: Dale Thorn<EMAIL_ADDRESS>Message Hash: e071efcb60a1b663ba10e50899844d101ecc77124bc699ebe449c5ded63630a2

Message ID: \<Pine.SUN.3.94.970108041301.8693D-100000@polaris\>

Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-01-08 20:24:49 UTC

Raw Date: Wed, 8 Jan 1997 12:24:49 -0800 (PST)

## Raw message

```
{% raw  %}From: Black Unicorn<EMAIL_ADDRESS>Date: Wed, 8 Jan 1997 12:24:49 -0800 (PST)
To: Dale Thorn<EMAIL_ADDRESS>Subject: Re: [STATS] Cypherpunks subscriptions on and off
In-Reply-To<EMAIL_ADDRESS>Message-ID: <Pine.SUN.3.94.970108041301.8693D-100000@polaris>
MIME-Version: 1.0
Content-Type: text/plain

On Tue, 7 Jan 1997, Dale Thorn wrote:

> The following table shows cypherpunks subscription activity
> for the period 12 Oct 1996 thru 07 January 1996.

[...]

> Totals:    87            655    725          7.5          8.3
>
> Interpretation:
>
> Unless the reversal of gain/loss in the 5th data row is permanent,
> c-punks are losing 0.8 bodies per day, or 294 subscribers per year.

[...]

> In effect, Sandy is going to have to cut the number of daily posts
> (to the moderated list) from, say, 100 per day down to, say, 20 or
> 25 per day.  This would certainly be a goal of his, since most of the
> subscriber comments I've heard indicate that even 50 posts per day of
> "relevant political/social commentary" is way too high for them.

Big assumption here.  That the list needs more than the 50 or so people
who are active posters in the first place.

More fear from Mr. Thorn that his own time in the spotlight might be
drawing to a close.  God forbid his captive audience might vanish.

--
Forward complaints to : European Association of Envelope Manufactures
Finger for Public Key   Gutenbergstrasse 21;Postfach;CH-3001;Bern
Vote Monarchist         Switzerland

{% endraw %}
```

## Thread

+ Return to [January 1997](/archive/1997/01)
+ Return to [February 1997](/archive/1997/02)

+ Return to "[aga <aga@dhp.com>](/authors/aga_aga_at_dhp_com_)"
+ Return to "[Black Unicorn <unicorn@schloss.li>](/authors/black_unicorn_unicorn_at_schloss_li_)"
+ Return to "[Dale Thorn <dthorn@gte.net>](/authors/dale_thorn_dthorn_at_gte_net_)"
+ Return to "[Kent Crispin <kent@songbird.com>](/authors/kent_crispin_kent_at_songbird_com_)"

+ 1997-01-08 (Tue, 7 Jan 1997 21:11:55 -0800 (PST)) - [[STATS] Cypherpunks subscriptions on and off](/archive/1997/01/f9e4eddae50be9fc3c9a2705c1e2f9d86744304ac0ac49121867056ef5e6d1aa) - _Dale Thorn<EMAIL_ADDRESS>  + 1997-01-08 (Wed, 8 Jan 1997 07:05:35 -0800 (PST)) - [Re: [STATS] Cypherpunks subscriptions on and off](/archive/1997/01/7b596de2fe5673fe3cd434a34748b3c2362f6415a1b0c2d2489dcdfb1d4d61d8) - _Kent Crispin<EMAIL_ADDRESS>    + 1997-01-09 (Wed, 8 Jan 1997 21:51:53 -0800 (PST)) - [Re: [STATS] Cypherpunks subscriptions on and off](/archive/1997/01/348b9a8094a67a77efa1c900fd61fde465e6b0f24818b07ff218464bfbb4fc7c) - _Dale Thorn<EMAIL_ADDRESS>  + 1997-01-08 (Wed, 8 Jan 1997 12:24:49 -0800 (PST)) - Re: [STATS] Cypherpunks subscriptions on and off - _Black Unicorn<EMAIL_ADDRESS>  + 1997-01-18 (Fri, 17 Jan 1997 20:18:12 -0800 (PST)) - [[STATS] Cypherpunks-unedited subscriptions](/archive/1997/01/307623b17b4f0f9f674440a1660ad96bfc227dd928df55ff2186c38c2510e074) - _Dale Thorn<EMAIL_ADDRESS>  + 1997-02-13 (Wed, 12 Feb 1997 22:39:16 -0800 (PST)) - [[STATS] Cypherpunks-unedited subscriptions](/archive/1997/02/53aadd69588af7c346285f5608321be08ee8bce2d6217b598dd1be2f3b27e169) - _Dale Thorn<EMAIL_ADDRESS>    + 1997-02-13 (Thu, 13 Feb 1997 09:01:13 -0800 (PST)) - [Re: [STATS] Cypherpunks-unedited subscriptions](/archive/1997/02/cebfb17ed844c5571c092a7811981e2324f44c63a03c6074a3b8957530c1049b) - _aga<EMAIL_ADDRESS>


text:
### edb_server by matthrew

##### Available resources
 - posts 3
 - comments 2
 - profile object
 - db db
You can use GET, POST, PUT, PATCH and DELETE. Changes aren't persisted between calls.

##### Source
https://github.com/Matthrews/edb_server/blob/main/db.json


text:
---
noheader: true
layout: documentation
location: Examples
---

# Plot Trajectory Trends
------------------------

If we don't have real data and cell sets, we can generate the simulate data and cell sets following the steps in [generate data](generate_data) and [plotting_cell_sets](plotting_cell_sets).

## Calculate the Transport Maps

We can get the transport maps through [optimal_transport]({{site.baseurl}}/cli_documentation#transport-maps).

```sh
wot optimal_transport --matrix matrix.txt \
 --cell_days days.txt --out tmaps
```

## Calculate the Trajectories
We can get the trajectories through
[trajectory]({{site.baseurl}}/cli_documentation#trajectory).
```sh
wot trajectory --tmap . --cell_set cell_sets.gmt --day 7
```

## Calculate Trajectory Trends
Now we can get the trajectory trends through
[trajectory_trends]({{site.baseurl}}/cli_documentation#trajectory-trends).
```sh
wot trajectory_trends --trajectory trajectory.txt --cell_days days.txt --matrix matrix.txt
```

## Plot Trajectory Trends
The result of trajectory trends are mean value of one tip's ancestors and descendants. Specifically, given time point, and the tips in this time point, we will find each tip's ancestors and descendants, and calculate their mean value of each gene expression rate.

## The Plot

![Trajectory Trends]({{site.baseurl}}/images/trajectory_trends.png)

repository: FlameHuang/wot

repo_name: FlameHuang/wot


text:
---
comments: true
date: 2011-04-23
layout: post
slug: auto-update-visual-studio-extensions
title: Auto-update Visual Studio Extensions
wordpress_id: 220
tags:
- code
---

VSX extensions/packages published and installed through the visual studio gallery will automatically check for updates and allow you to install the newest versions.

If you're not deploying your extension through the gallery, or just want auto-update capability for yourself, you can mimic this process yourself using the [IVSExtensionManager](http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.extensionmanager.ivsextensionmanager.aspx) interface.  But when I wanted implement this, _exactly_ how to do it was not documented anywhere.

The process is actually straight-forward:

**You'll need to reference:**

    Microsoft.VisualStudio.ExtensionManager.dll
    Microsoft.VisualStudio.OLE.Interop
    Microsoft.VisualStudio.Shell.Interop.8.0

Warning, the extension assembly isn't published in the .NET components, you'll have to manually browse to the GAC to reference it:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.ExtensionManager\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\Microsoft.VisualStudio.ExtensionManager.dll

    var manager = Package.GetGlobalService(typeof(SVsExtensionManager)) as IVsExtensionManager;

Using the manager, get a list of installed extensions

    var names = new string[] { "Ganji", "Ganji.History", "Ganji.Margin" };
    var myExtensions = manager.GetInstalledExtensions().Where(ext =>names.Contains(ext.Header.Name)).ToList();

Next, we want to be able to download and then install a new version of our extension.
This is the general logic.  The details follow.

    bool needsRestart = false;
    foreach (var extension in myExtensions)
    {
        var newVersion = FetchIfUpdated(extension, webRepository.Where(r => r.Name == extension.Header.Name).SingleOrDefault());
        if (newVersion != null)
        {
            Install(manager, extension, newVersion);
            needsRestart = true;
        }
    }
    // Client needs to restart
    return needsRestart;

You can check and fetch a new version with the [IVsExtensionRepository](http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.extensionmanager.ivsextensionrepository.aspx) manager.

    private IInstallableExtension FetchIfUpdated( IInstalledExtension extension, RepositoryEntry entry)
    {
        var version = extension.Header.Version;
        var repoManager = Package.GetGlobalService(typeof(SVsExtensionRepository)) as IVsExtensionRepository;
        try
        {
            var newestVersion = repoManager.Download(entry);
            if (newestVersion.Header.Version > extension.Header.Version)
            {
                return newestVersion;
            }
        }
        catch (Exception ex)
        {
            // may not have internet connection, etc...
            Console.WriteLine(ex.Message);
        }
        return null;
    }

But you have to define your own IRepositoryEntry, which will be used as a parameter in the Download call.

    class RepositoryEntry : IRepositoryEntry
    {
        public string Name { get; set; }
        public string DownloadUrl { get; set; }
        public string VsixReferences { get; set; }
    }

Finally, installing the extension involves disabling your old extension, uninstalling it, installing the new extension, then enabling it.  A restart will be required before it takes affect however.

    private RestartReason Install( IVsExtensionManager manager, IInstalledExtension currentExtention, IInstallableExtension updatedExtension)
    {
        // Uninstall old
        manager.Disable(currentExtention);
        manager.Uninstall(currentExtention);

        // Install newer version
        var restartReason = manager.Install(updatedExtension, false);

        // Check newly installed version and enable (which is not the case by default)
        var newlyInstalledVersion = manager.GetInstalledExtension(updatedExtension.Header.Identifier);
        if (newlyInstalledVersion != null)
        {
            manager.Enable(newlyInstalledVersion);

            Console.WriteLine(string.Format("Updated: from {0} to {1} at {2}",
               currentExtention.Header.Version,
               newlyInstalledVersion.Header.Version,
               newlyInstalledVersion.InstallPath));
        }

        return restartReason;
    }

extension: markdown


text:
# i3wedge.sh

## Set tilt geometries for the missing wedge for tomograms in an i3 database

## Usage:
`i3wedge.sh`

## Sets:
None.

## Sources:
None.

## Does:
1. Reads [`MAPS`](i3setup.md#maps), and line by line:
    * Calls [`i3stat`](i3stat.md) -sh -f
      [`dir`](maps.md#dir)/[`map`](maps.md#map)
    * if [`WDGCOMP`](i3param.md#wdgcomp) is set to true then:
        * Calls [`i3wedge`](i3wedge2.md) -tlt [`tlt`](maps.md#tlt)
          [`I3D`](i3setup.md#i3d) [`map`](maps.md#map)

## Calls:
* [i3stat](i3stat.md) -sh -f [`dir`](maps.md#dir)/[`map`](maps.md#map)
* [i3wedge](i3wedge2.md) -tlt [`tlt`](maps.md#tlt) [`I3D`](i3setup.md#i3d)
  [`map`](maps.md#map)


text:
# Web scrapping, Beautiful Soup, Selenium - Various explorations in web scraping with Python and jumping timidly in surveillance capitalism (webscraping_with_python)

**Some files extracted from the post on exploring web scraping with Python and the requirements for python.**

**Few files from the exploration**
```bash
example_1.html
example_2.html
example_3.html
googleGetLucky_1.py
googleGetLucky_2.py
grabIt_1.py
grabItSaveIt_1.py
mapIt_1.py
mapIt_2.py
seleniumControl_1.py
seleniumControl_2.py
seleniumControl_3.py
seleniumControl_4.py
seleniumControl_5.py
slurpThatSoup_1.py
slurpThatSoup_2.py
slurpThatSoup_3.py
slurpThatSoup_4.py
slurpThatSoup_5.py
slurpThatSoup_6.py
Three_short_works_Gustave_Flaubert.txt
```

**Commands to install the required python libraries**
```bash

# install requests and beautifulsoup4
pip install requests
pip install beautifulsoup4

# install pyperclip
pip install pyperclip

# check if pyperclip is working
# go to a python console
>>> import pyperclip
>>> import requests
>>> import beautifulsoup4

```

**Check if the installed librairies are working**
```python
# check if pyperclip is working
# go to a python console
>>> import pyperclip
>>> import requests
>>> import beautifulsoup4

# if you get no errors, you are fine...
```

**Installing the selenium Module**
```bash
# required installation
pip3 install selenium

# better using homebrew
brew install geckodriver

# check version
geckodriver --version

# which
which geckodriver

# Source: https://www.dev2qa.com/how-to-resolve-webdriverexception-geckodriver-executable-needs-to-be-in-path/

```

repository: bflaven/BlogArticlesExamples

gha_language: HTML

repo_name: bflaven/BlogArticlesExamples


text:
# Setup

If changing the base model latte files, you'll need to recreate them for the tests to take effect.

These can be generated by creating a MySQL database, import the `models_mysql.sql` file and create the base model files.

`./bin/granadabuilder tests/testdb2modelconf.json`

Modify the `testdb2modelconf.json` file temporarily to suit your environment.

repository: GranadaORM/Builder

repo_name: GranadaORM/Builder


text:
# NASA_EVA_Gamification - PHASE 2

MediaWiki extension for gamification of wiki tasks, based on the requirements of NASA's Extravehicular Activities team.
### This guide is a continuation of [Phase 1](https://github.com/SWEN670NASAEVA/NASA_EVA_Gamification)
Phase 1 was prepared by:  Michael Salgo, Victoria Guadagno, Okechukwu Ogudebe, Jacqueline Macfadyen, Kevin Fortier, and Montrell Nuble

## NASA_EVA_Gamification Extension Installation Instructions

1. Make sure the “LocalSettings.php” file that you saved on the precious section is placed at the root level of the “MediaWiki” folder.

2. Obtain the code from [GitHub](https://github.com/SWEN670NASAEVA2/NASA_EVA_Gamification)

3. Copy the `NASA_EVA_Gamification-master` directory to the `MediaWiki/extensions/NASA_WIKI_Gamification` directory.  Pay attention that when we create the new directory inside the Mediwiki/extensions, we are dropping the “-master” part of the name.

	#### Note: The "Documentation" and "installation_instructions_windows_and_centos" folders are not part of the code and may be removed from the "NASA_WIKI_Gamification" extension at installation.

4. Navigate to the “MediaWiki” directory and open the `LocalSettings.php` file so you can edit it:

	a) Change the default “MediaWiki” logo:
		Find $wgLogo.  and replace everthing after the '=' sign with the following:
		"$wgResourceBasePath/extensions/NASA_EVA_Gamification/images/nasa-wiki-logo.png";

	b) Add global variables:
		Scroll down to the bottom of the page (after the last line) and paste the following lines:

		# Nasa Eva Gamification >> Phase 1
		wfLoadExtension('NASA_EVA_Gamification');
		$wgShowDebug = true;
		$wgDebugComments = true;
		$wgEnableParserCache = false;
		$wgCachePages = false;

		# Nasa Eva Gamification >> Phase 2
		$wgPhase2Images = "$wgResourceBasePath/extensions/NASA_EVA_Gamification/images/";
		$wgProfilePage=$wgServer.$wgResourceBasePath."/index.php/Special:UserGamificationProfile";
		$wgBadges=array('platinum'=>'500','gold'=>'200','silver'=>'100','bronze'=>'50');
		$wgPoints = array(0=>50, 1=>100);
		$wgLeaderBoardPointScale=100;

	c) Save the file.

	#### Note: $wgShowDebug = true; is for debugging purposes; so, it is recommended to have it set to “true” in a development 	environment and set to “false” in a production environment.

5. From a shell prompt,

	a) Navigate to the folder where you have saved the "MediaWiki"

	b) Run `php maintenance/update.php`

	#### Note: if you get a security error, run the shell prompt as an administrator.

6. Move and replace the following files “From” the specified folder “To” the specified folder.

	a)
		File: WikiPage.php
		From folder: `mediawiki/extensions/NASA_EVA_Gamification/`
		To folder:  `mediawiki/includes/page/`

	b)
	  File: Revision.php
		From folder: `mediawiki/extensions/NASA_EVA_Gamification/`
		To folder:   `mediawiki/includes/`

7. From a shell prompt,

	a) Navigate to the folder where you have saved the `MediaWiki`

	b) Run `runphp.cmd`

8. Open a web browser and access you local instance: `http:localhost:8080`

	a) From the left hand-side navigation select `Special pages`

	b) Scroll down (almost until the end of the page) and verify that under the `Other Special pages` section the "User Gamification Profile" extension has been successfully installed.

	c) Click on `User Gamification Profile` to confirm.

9. Done.

## Note
This extension was designed for MediaWiki 1.27 or later


text:
Learn about the kinds of problems Machine Learning is good at, and what it cannot do.
We will explore the core concepts around this mysterious technology, and build a real solution from scratch.

## Slides

https://docs.google.com/presentation/d/1Hke2c67_q8KHQqByjX3Wdt6I8sTIl1GhpGcpVo9ZtRI/edit?usp=sharing

## Give Feedback

https://goo.gl/forms/F21XQDR3jxZofIKA3

# Requirements

## Go and some dependencies

Go and you can use `dep` to get the dependencies, or manually `go get` everything.

You can install `wget` with Brew:

```
brew install wget
```

## Dataset

News20 http://www.cs.cmu.edu/afs/cs.cmu.edu/project/theo-20/www/data/news20.tar.gz

To get it you can:

`$ make dataset`

## Word embeddings

http://nlp.stanford.edu/data/glove.6B.zip

Only the 100 dim

To get it:

`$ make wordemb`

# Some Python2/Tensorflow dependencies

`$ make install`

## Install Tensorflow Go CGO bindings

https://www.tensorflow.org/install/install_go

repository: machinebox/womenwhogo

repo_name: machinebox/womenwhogo