text:
Hi! Let's tell Python how we're encoded.

```
# coding: utf-8
```

We need some tools, and it's polite to put them at the front.

```
from collections import defaultdict
from itertools import combinations
import json, sys
```

We're going to do some basic category theory. To start, we'll develop a notion
of a **partially-ordered set**, or **poset**, which is a simple kind of
mathematical structure. A poset has a set of **objects**, which can be labeled
arbitrarily, and a **less-than relation**, which lets us compare objects.
Suppose `X`, `Y`, and `Z` are valid labels, and we'll write the relation as
`≤`. Then:

* For any `X`, `X ≤ X`.
* For any `X` and `Y`, if `X ≤ Y` and `Y ≤ X` then `X = Y`.
* For any `X`, `Y`, and `Z`, if `X ≤ Y ≤ Z` then `X ≤ Z`.

```
class Poset(object):
    def __init__(self):
```

Note that directed acyclic graphs, or DAGs, which are a staple of computer
science (and thus will *not* be explained more!), are isomorphic to posets.
This beautiful fact lets us use graph techniques to represent our poset. We'll
use an **adjacency table**, a simple structure that answers whether, for two
vertices `u` and `v`, `u → v`. This adjacency relation `→` is not the same as
the less-than relation `≤` but they are clearly related; the former implies
the latter.

Note that, in the remainder of the code, `u` and `v` will generally be the
names of vertices. These are traditional names.

```
        self.graph = defaultdict(set)
```

We now present a simple DSL for posets. Recall that a **chain** `u → v → w → …
→ z` in a graph. We can thus add to a graph an entire chain at once.

```
    def addChain(self, chain):
        for u, v in zip(chain, chain[1:]):
            self.graph[u].add(v)
```

We can read in a text file.

```
    @classmethod
    def fromText(cls, text):
        self = cls()
```

Line by line.

```
        for line in text.split("\n"):
```

Lines starting with octothorpes are comments.

```
            if line.startswith("#"):
                continue
```

An example chain might be `"lion ≤ cat"`, if the user think that "cat" is more
general than "lion".

```
            chain = [w.strip() for w in line.split("≤")]
            self.addChain(chain)
        return self
```

We can also read in JSON. The encoding is relatively compact, using the fact
that a DAG's adjacency matrix only uses the upper triangle. I won't go more
into this, as it's not yet relevant.

```
    @classmethod
    def fromJSON(cls, text):
        labels, packed = json.loads(text)
        self = cls()
        for i, (u, v) in enumerate(combinations(labels, 2)):
            if packed & (1 << i):
                self.graph[u].add(v)
        return self
```

We'll often need to work with the set of all vertices of a graph.

```
    def verts(self):
        rv = set(self.graph.keys())
        for v in self.graph.itervalues():
            rv |= v
        return rv
```

We want to apply [Tarjan's "strongly-connected components"
algorithm](https://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm)
to the graph. This algorithm does two things:

1. Each cycle in the graph will be converted to a single set of nodes.
1. A linear extension of the resulting graph is built for witnessing DAG-ness.

In DAG literature, linear extensions are often called "topological sorts" or
"topological orders".

```
    def tarjan(self):
```

Our bookkeeping. We have a stack of vertices, two annotations on vertices
called the "index" and "link", and our return value, which will be a list of
sets in topological order.

```
        stack = []
        indices = {}
        links = {}
        rv = []
```

Our main workhorse is a nested function which will visit every vertex.

As usual, I apologize for using the declare-define trick to create "static"
storage for the visitor; Tarjan's requires a counter which increments for
every visitation.

```
        def go(v, counter=[0]):
```

Here we use the counter to set our initial index and link.

```
            indices[v] = links[v] = counter[0]
            counter[0] += 1
```

The stack holds vertices which will be aggregated into components as
connections are found.

```
            stack.append(v)
```

Let's see if there are links which would give us a cycle. Our link number
needs to be compared to all of our reachable links. From our `v`, for each `v
→ u`, if we haven't visited `u`, then do that and see how cyclic we got.
Otherwise, if we *have* and it's in our stack, check their index. This might
be the hardest part of Tarjan's, and it took me a while to grok exactly why
this works; do not fret if it seems confusing for you too.

Also, I can't not read this delightful section as "If you not in indices?  Elif you in stack..."

```
            for u in self.graph.get(v, []):
                if u not in indices:
                    go(u)
                    links[v] = min(links[v], links[u])
                elif u in stack:
                    links[v] = min(links[v], indices[u])
```

If our link and index are the same, then we've found a cycle. We'll pop the
cycle off of the stack and into our return value.

```
            if links[v] == indices[v]:
                s = set()
                while True:
                    u = stack.pop()
                    s.add(u)
                    if u == v:
                        break
                rv.append(s)
```

Go.

```
        for v in self.verts():
            go(v)
        return rv
```

We will need some utilities now before we can reach the heart of the compiler.
First, a reachability relation. Recall that reachability in DAGs is the same
as less-than in posets, so this is an important building block.

I once again use the declare-define trick to allocate a static cache so that I
can memoize the relation.

```
    def isReachable(self, u, v, cache={}):
```

The cache key is the graph and vertices.

```
        k = self, u, v
        if k not in cache:
```

Assume that we aren't reachable, then look for a contradiction.

```
            cache[k] = False
```

For each vertex reachable from `u`, is it `v` or something reachable from `v`?
If so, then we have found reachability. Otherwise, this step recurses. The
cache *should* keep us from blowing too far down the stack, but I didn't
actually make this iterative.

```
            for vert in self.graph[u]:
                if v == vert or self.isReachable(vert, v):
                    cache[k] = True
                    break
        return cache[k]
```

The **transitive closure** of a DAG/poset has, for each `u` and `v`, an edge
`u → v` iff `u ≤ v`. As such, it is an extremely useful transitional structure
for fully representing the less-than relation. However, the transitive closure
also has the most edges of any representation, making it terrible for anything
other than temporary or intermediate work.

```
    def closure(self, verts):
        closure = Poset()
```

For each pair of vertices, if `u ≤ v` then `u → v`.

```
        for u, v in combinations(verts, 2):
            if self.isReachable(u, v):
                closure.graph[u].add(v)
        return closure
```

And the only reason we'll have for the transitive closure is building the
**transitive reduction**, which only has an edge between `u` and `v` if `u ≤
v` and also there isn't any vertex `w` in-between them so that `u ≤ w ≤ v`.

Informally, the transitive reduction doesn't have any "extra" or "spare"
edges; it has the fewest edges and tends to be the cleanest-looking.

```
    def reduce(self, verts):
        reduced = Poset()
        for u in verts:
```

As before, we assume that an edge will be required, and then search for
reasons to discard it.

```
            vs = self.graph[u].copy()
            for v1, v2 in combinations(vs, 2):
```

`u → v1 → v2`, so discard `u → v2`.

```
                if v2 in self.graph[v1]:
                    vs.discard(v2)
```

`u → v2 → v1`, so discard `u → v1`.

```
                elif v1 in self.graph[v2]:
                    vs.discard(v1)
            reduced.graph[u] = vs
        return reduced
```

Two more helpers. They will let us ask, for some `v`, which vertices `u` are
`u → v`, or `v → u`.

```
    def incoming(self, v):
        return set([u for u in self.graph if v in self.graph[u]])

    def outgoing(self, v):
        return self.graph[v]
```

An iterator over all edges.

```
    def iteredges(self):
        for u in self.graph.keys():
            for v in self.graph[u]:
                yield u, v
```

A helper for deleting vertices in-place.

```
    def delete(self, v):
        del self.graph[v]
        for s in self.graph.itervalues():
            s.discard(v)
```

This is as close as we'll get to a compilation step. We will go from a graph
which possibly has cycles, and hasn't been certified as a DAG, to a graph
which is in one-to-one correspondence with a poset by representing its
transitive reduction. It's important to reduce the number of edges because we
will later want to render the graph with DOT, and rendering a graph, like so
many other graph algorithms, is `O(|V|+|E|)`.

This is going to be an in-place algorithm, because that's how I originally
wrote the code.

```
    def compile(self):
```

We'll only visit each strongly-connected component once.

```
        seen = set()
        components = self.tarjan()
```

Here we'll loop over our strongly-connected components created by Tarjan's
algorithm. It is essential to note that the components are in topological
order. As we climb up the components, we'll replace any components with
multiple labels with a single combined-label vertex.

```
        for comp in components:
```

Skip components that don't need to be replaced.

```
            if len(comp) < 2:
                continue
```

Don't double-visit components.

```
            fs = frozenset(comp)
            if fs in seen:
                continue
            seen.add(fs)
```

Turn cycles like `u → v → u` into single vertices labeled `"u = v"`. It's
a…messy process. We must locate all of the edges adjacent to the component and
perform graph surgery.

```
            new = " = ".join(sorted(fs))
            ins = set()
            outs = set()
            for v in fs:
                ins.update(self.incoming(v))
                outs.update(self.outgoing(v))
                self.delete(v)
            ins.difference_update(fs)
            outs.difference_update(fs)
            for i in ins:
                self.graph[i].add(new)
            self.graph[new] = outs
```

But we can abstractly perform the relabeling directly from the list of
components, so that's nice.

```
        topo = [" = ".join(sorted(c)) if len(c) > 1 else list(c)[0] for c in components]
        topo.reverse()
```

Now we are ready to build the transitive reduction. We must first build the
transitive closure, and then build the reduction from that.

```
        closure = self.closure(topo)
        return closure.reduce(topo)
```

Our encoders. The JSON encoder just inverts our JSON decoding from earlier.

```
    def toJSON(self, verts):
        acc = 0
        for i, (u, v) in enumerate(combinations(verts, 2)):
            if v in self.graph[u]:
                acc |= 1 << i
        return json.dumps([list(verts), acc])
```

The DOT output is a little more interesting, but not by much. We don't emit a
full graph here but only the pieces, so that we can cleanly emit several
graphs into a single DOT file.

```
    def toDOT(self, attr=None):
        pieces = []
        for k in sorted(self.graph.keys()):
            for v in sorted(self.graph[k]):
                if attr is None:
                    edge = '"%s" -> "%s";' % (k, v)
                else:
                    edge = '"%s" -> "%s" [%s];' % (k, v, attr)
                pieces.append(edge)
        return "\n".join(pieces)
```

At this point, the rest of the file is the imperative goo to actually make
things work, and it's all in quite a bit of flux so it's not really worth
explaining in detail to me yet.

```
def getPoset(filename):
    with open(filename, "rb") as handle:
        return Poset.fromText(handle.read())

def compile(rest):
    filename, = rest
    p = getPoset(filename)
    reduced = p.compile()

    # Build a cheap succinct representation.
    with open(filename + ".json", "wb") as handle:
        handle.write(reduced.toJSON(topo))

    with open(filename + ".dot", "wb") as handle:
        handle.write("digraph {")
        handle.write(reduced.toDOT())
        handle.write("}")

def getFunctor(filename):
    d = {}
    with open(filename, "rb") as handle:
        text = handle.read()
        for line in text.split("\n"):
            if line.startswith("#") or not line:
                continue
            try:
                src, dest = line.split("→", 1)
            except ValueError:
                print "Bad line", line
                raise
            d[src.strip()] = dest.strip()
    return d

def doFunctor(rest):
    filename, = rest
    f = getFunctor(filename)
    src, dst, _ = filename.split(".", 2)
    a = getPoset(src + ".poset")
    b = getPoset(dst + ".poset")
    for u, v in a.iteredges():
        if not b.isReachable(f[u], f[v]):
            print u, "≤", v, "but not", f[u], "≤", f[v]
            raise ValueError((u, v))

    ga = a.toDOT("color=red")
    gb = b.toDOT("color=blue")

    with open(filename + ".dot", "wb") as handle:
        handle.write("digraph {")
        for k, v in f.iteritems():
            edge = '"%s" -> "%s" [style=dashed];\n' % (k, v)
            handle.write(edge)
        handle.write("subgraph {")
        handle.write(ga)
        handle.write("}\n")
        handle.write("subgraph {")
        handle.write(gb)
        handle.write("}\n")
        handle.write("}\n")

    with open(filename + ".json", "wb") as handle:
        handle.write(json.dumps(f))

if __name__ == "__main__":
    action = sys.argv[1]
    rest = sys.argv[2:]
    if action == "compile":
        print "Compiling poset", rest
        compile(rest)
    elif action == "functor":
        print "Compiling functor", rest
        doFunctor(rest)
    else:
        print "Don't know how to", action
        assert False
```

repository: MostAwesomeDude/klesi

repo_name: MostAwesomeDude/klesi


text:
# TestLua
Different experimentation with LUA (5.3)

## Requirements

QtCreator is needed to build this project (qmake).
Tested on Mac.

## Links

Here some links usefull to make this project :
1. Manual : https://www.lua.org/manual/5.3/manual.html
2. OOP pattern in LUA : http://lua-users.org/wiki/LibraryWithUserdataExample

license: MIT

repository: pbouamriou/TestLua

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: pbouamriou/TestLua


text:
```jsx
const { Paragraph } = require('reas');
<Paragraph>This is an <Code>inline code</Code>.</Paragraph>
```

```jsx
<Code block>
{`This is
a code block.`}
</Code>
```

repository: mahefnawy/reas

repo_name: mahefnawy/reas


text:
[Exercise 15.3 \[island-exercise\]](ex_3/)

This exercise develops a space-efficient variant of
the forward–backward algorithm described in
Figure [forward-backward-algorithm](#/) (page [forward-backward-algorithm](#/)).
We wish to compute $$\textbf{P} (\textbf{X}_k|\textbf{e}_{1:t})$$ for
$$k=1,\ldots ,t$$. This will be done with a divide-and-conquer
approach.

1.  Suppose, for simplicity, that $t$ is odd, and let the halfway point
    be $h=(t+1)/2$. Show that $$\textbf{P} (\textbf{X}_k|\textbf{e}_{1:t}) $$
     can be computed for
    $k=1,\ldots ,h$ given just the initial forward message
    $$\textbf{f}_{1:0}$$, the backward message $$\textbf{b}_{h+1:t}$$, and the evidence
    $$\textbf{e}_{1:h}$$.

2.  Show a similar result for the second half of the sequence.

3.  Given the results of (a) and (b), a recursive divide-and-conquer
    algorithm can be constructed by first running forward along the
    sequence and then backward from the end, storing just the required
    messages at the middle and the ends. Then the algorithm is called on
    each half. Write out the algorithm in detail.

4.  Compute the time and space complexity of the algorithm as a function
    of $t$, the length of the sequence. How does this change if we
    divide the input into more than two pieces?


text:
# PineDio Stack BL604 Firmware for ST7789 Display

Read the article: https://lupyuen.github.io/articles/pinedio

Demo Firmware for PineDio Stack BL604 with ST7789 SPI Display Controller in 4-Wire (8-bit) Mode.

TODO: LVGL Graphics Library

See ["PineCone BL602 Blasting Pixels to ST7789 Display with LVGL Library"](https://lupyuen.github.io/articles/display)

At the BL604 Command Prompt, enter...

```text
display_init
display_image
```

Enter `help` to see all commands.


text:
# Password Unlocker

## Author

* Rehema Faith

## Description

#### On Average, a person has at least 7 different accounts he or she has signed into, be it email, social media, entertainment or job portal accounts. It becomes really hard to remember all those passwords and even create new ones.This app helps you save all your passwords

## BDD

| Behaviour                | Input                           | Output                      |
| :---------------------:  | :-------------------------:     | :------------------------:  |
| Create Account           | Short code cc                   | Create and save account     |
| delete account           | short code dc                   | Delete account              |
|Find Account              | Short code fc                   | Find Accounts               |

## Installation

* Search for my github account and search for the repository password-locker
* fork it and clone it to your machine
* Open your terminal and navigate to the folder you put it in
* Run the run.py file

# Technologies Used

### Python 3.6

## License

[MIT LICENSE](LICENSE)

repository: rehemafaith/password-locker

repo_name: rehemafaith/password-locker


text:
# Project 1 - Flicks

Flicks is a movies app using the [The Movie Database API](http://docs.themoviedb.apiary.io/#).

Time spent: 10 hours spent in total

## User Stories

The following **required** functionality is completed:

- [√] User can view a list of movies currently playing in theaters. Poster images load asynchronously.
- [√] User can view movie details by tapping on a cell.
- [√] User sees loading state while waiting for the API.
- [√] User sees an error message when there is a network error.
- [√] User can pull to refresh the movie list.

The following **optional** features are implemented:

- [√] Add a tab bar for **Now Playing** and **Top Rated** movies.
- [√] Implement segmented control to switch between list view and grid view.
- [√] Add a search bar.
- [√] All images fade in.
- [√] For the large poster, load the low-res image first, switch to high-res when complete.
- [√] Customize the highlight and selection effect of the cell.
- [√] Customize the navigation bar.

The following **additional** features are implemented:

- [√] Load predefined image when movie poster not available
- [√] Translate digital date to English date format

## Video Walkthrough

Here's a walkthrough of implemented user stories:

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

## Notes

- I tried to fade in a background image of the movie when user taps on the table cell (highlighted), but the backgraound image shows on the entire screen instead of being constrainted within the single cell.
- I didn't put effort to get every information from API about the film to show in the details page (i.e. the rate and duration of the film), which may not be relevant to the objective of this project.

## License

    Copyright [yyyy] [name of copyright owner]

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

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

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


text:
---
title: "Decoding coding: My coding project ideas"
created_at: 2019-01-04T16:54:49.000Z
published_at: 2019-01-04T18:35:17.000Z
---
I learn best by doing, and learning coding via projects and making products is probably the best way to learn coding, for me. YMMV of course.

Here's some project ideas I came up with:

**Public Design Jobs 2.0**, with automated web scraper and posting. Public Design Jobs shows design and innovation jobs in governments worldwide. I built this job board in Wordpress and launched v1.0 last year. It was pretty well-received but I stopped development for it as the manual scraping and posting was too much work. I'd been looking for a suitable Wordpress scraper bot plugin but none worked as I wanted. So this year, I want to revamp it and code it from ground up, myself.

**Can't Wait** - a travel countdown profile page. I'm a big fan of [countdownto.xyz](https://countdownto.xyz/)  and had been using it to countdown to my trips for the year. There's something really inspiring about having a countdown timer against a huge, beautiful image of your travel destination. I did that last year and realised having something to look forward to make a big difference to the quality of my mental well-being. But the site could only track single events. I would love to have a profile page to track various trips throughout the year, and have a countdown for each, and be able to look back at the end of the year with some nice images.

**Lifelist** - a mashup of WIP/Makerlog, Year Progress but for lifegoals. I enjoy living a more intentional life. So far many of my 200wad posts had been from year-end reflections during a month of personal solo retreat in Bali. I'd love to have a task log for setting goals at beginning of year, tracking progress and showing some stats/streaks. This makes it much easier to do my reviews at the end of year. Not just numbers, but also providing inspiring, prompting questions throughout and reminders to reflect.

**Nagnag**, a task reminder Telegram bot - I enjoyed using the [Nagger iOS app](https://jackm.co.uk/nagger/). It's basically a task reminder app which sends you a notification every X number of minutes for Y number of times. But unfortunately the developer had stopped development for it for iOS 12 onwards. I want to make something similar but don't want to have to pay to maintain a developer account on the App Store, so I'm thinking of Telegram instead. Plus it's just so much more fun creating bots on Telegram and learning about conversational UI. There's various task reminder bots available on Telegram but none quite like Nagger, so this is my attempt at re-creating something I want.

**NomadFamily** - Nomadlist but for families. This project is probably just me preparing for the probable future with kids. A list site with the resources for family-friendly cities, with the right healthcare, family care, education and social arrangements for children.

**#1mvp1month 2.0** - automating some of the products that I made last year on [#1mvp1month](https://200wordsaday.com/words/my-maker-year-in-products-made-5185c0f4273ac376), and relaunching them.

Needless to say, I don't know any coding at this point and have no idea how I can even make them! So what do you think I'll need in terms of frameworks, languages, tools and resources? Anything I need to look out for, mistakes to avoid, good practices to adopt?

? Day 29 of the #200wad challenge.


text:
# v1.0 Release Note

"regularizeCNN" provides essential tools for evaluating the effects of different regularizers/optimizers when training a neural network.

## Structure

![Module diagram](./structure.svg  "Module diagram")

## System requirements

### Hardware (recommended)

* i7-950 or equivalent
* 8G+ DRAM
* Nvidia Geforce GPU with CUDA capability. 8G graphics memory.

### Hardware (only for small batch evaluation)

* i7-950 or equivalent
* 8G+ DRAM

### OS/Build Environment

\*\* Listed is my working environment. Some other may also work.

* Win7/8/10 /Ubuntu 18.04+/ Debian 9.7.0+
* Python 3.7
* Pytorch 1.5.0 + torchvision 0.6.0
* numpy 1.18.5
* matplotlib 3.2.2
* tqdm 4.46.1
* pillow 7.2.0

## Usage

**demoTrain.py** : Train a new neural-net with specified dataset and save to file "._outputs/\{timestamp\}.model".

**demoAdversary.py** : Load a pre-trained net from file and generate adversary samples that can fool the net.

gha_language: Python


text:
# Very-Simple-SMTPS

[![Build Status](http://ec2-52-63-33-178.ap-southeast-2.compute.amazonaws.com:31580/api/badges/matthewT53/Very-Simple-SMTPS/status.svg?ref=refs/heads/main)](http://ec2-52-63-33-178.ap-southeast-2.compute.amazonaws.com:31580/matthewT53/Very-Simple-SMTPS)

A small library written in C++ that uses libcurl to be able to send emails with binary attachments.

## Using in your project:
* Simply copy everything headers and src files into your own project.
* Also remove the meson.build files that are in each folder.
* **Note:** This library relies on the curl library, so you would need to install libcurl:
```sh
    sudo apt-get install libcurl4 libcurl4-openssl-dev # or libcurl4-gnutls-dev
```
* If you are on Windows, then you need to download the library file (*.a) and link to it.
* **NOTE:** When sending attachments, the fullpath to the file must be provided!

### Working with email providers:
* If you are using this library with gmail smtp then **you will need to enable access to less secure apps in your google account settings.**
* These links should help:
1. https://support.google.com/accounts/answer/6010255?hl=en
2. https://docs.bitnami.com/aws/faq/troubleshooting/troubleshoot-smtp-gmail/

## Examples:
* To run the examples, a few more dependencies will be required.
* To install these dependencies, please run the setup.sh script:
```sh
    # Installs python3 tools, ninja, cpputest as well as libcurl.
    $ sudo ./scripts/setup.sh
```
* **Note:** The recommendation is to execute this script while inside a python virtual environment.

## Building:
* To **build** the tests and the examples, **you will need gcc-9 or newer** to compile the latest C++17 features.
* To change the compiler, set the CC and CXX environment variables in scripts/build.sh:
```bash
#!/bin/bash

# Set the GCC compiler to version 8+ for C++17 features to work.
export CC=gcc-9     # Change it here
export CXX=g++-9    # And here

meson build && cd build
ninja
```
* **Note:** The build script must be run from the project's root directory.
```sh
    $ ./scripts/build.sh
```
* To run the unit tests:
```sh
    $ ./scripts/run_tests.sh
```

## Contributing:
#### Coding standards:
* See: https://github.com/lefticus/cppbestpractices

branch_name: refs/heads/main

gha_license_id: MIT


text:
---
title: Polar Area Chart
anchor: polar-area-chart
---
### Introduction
Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value.

This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context.

<div class="canvas-holder">
	<canvas width="250" height="125"></canvas>
</div>

### Example Usage

```javascript
new Chart(ctx, {
	data: data,
	type: 'polarArea',
	options: options
});
```

### Data Structure

The following options can be included in a polar area chart dataset to configure options for that specific dataset.

Some properties are specified as arrays. The first value applies to the first bar, the second value to the second bar, and so on.

Property | Type | Usage
--- | --- | ---
data | `Array<Number>` | The data to plot as bars
label | `String` | The label for the dataset which appears in the legend and tooltips
backgroundColor | `Array<Color>` | The fill color of the arcs. See [Colors](#getting-started-colors)
borderColor | `Array<Color>` | Arc border color
borderWidth | `Array<Number>` | Border width of arcs in pixels
hoverBackgroundColor | `Array<Color>` | Arc background color when hovered
hoverBorderColor | `Array<Color>` | Arc border color when hovered
hoverBorderWidth | `Array<Number>` | Border width of arc when hovered

An example data object using these attributes is shown below.

```javascript
var data = {
	datasets: [{
		data: [
			11,
			16,
			7,
			3,
			14
		],
		backgroundColor: [
			"#FF6384",
			"#4BC0C0",
			"#FFCE56",
			"#E7E9ED",
			"#36A2EB"
		],
		label: 'My dataset' // for legend
	}],
	labels: [
		"Red",
		"Green",
		"Yellow",
		"Grey",
		"Blue"
	]
};
```
As you can see, for the chart data you pass in an array of objects, with a value and a colour. The value attribute should be a number, while the color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.

### Chart Options

These are the customisation options specific to Polar Area charts. These options are merged with the [global chart configuration options](#global-chart-configuration), and form the options of the chart.

Name | Type | Default | Description
--- | --- | --- | ---
scale | Object | [See Scales](#scales) and [Defaults for Radial Linear Scale](#scales-radial-linear-scale) | Options for the one scale used on the chart. Use this to style the ticks, labels, and grid.
*scale*.type | String |"radialLinear" | As defined in ["Radial Linear"](#scales-radial-linear-scale).
*scale*.lineArc | Boolean | true | When true, lines are circular.
*animation*.animateRotate | Boolean |true | If true, will animate the rotation of the chart.
*animation*.animateScale | Boolean | true | If true, will animate scaling the chart.
*legend*.*labels*.generateLabels | Function | `function(data) {} ` | Returns labels for each the legend
*legend*.onClick | Function | function(event, legendItem) {} ` | Handles clicking an individual legend item
legendCallback | Function | `function(chart) ` | Generates the HTML legend via calls to `generateLegend`

You can override these for your `Chart` instance by passing a second argument into the `PolarArea` method as an object with the keys you want to override.

For example, we could have a polar area chart with a black stroke on each segment like so:

```javascript
new Chart(ctx, {
	data: data,
	type: "polarArea",
	options: {
		elements: {
			arc: {
				borderColor: "#000000"
			}
		}
	}
});
// This will create a chart with all of the default options, merged from the global config,
// and the PolarArea chart defaults but this particular instance will have `elements.arc.borderColor` set to `"#000000"`.
```

We can also change these defaults values for each PolarArea type that is created, this object is available at `Chart.defaults.polarArea`.

repository: MDEGroup/MDEForge

gha_language: HTML

repo_name: MDEGroup/MDEForge


text:
# Upgrade ManagerProxy Contract

A `ManagerProxy` proxy contract uses the `delegatecall` opcode to forward all function calls to a target implementation contract that is registered with the `Controller` with state managed by the proxy contract. Thus, the proxy contract can be upgraded by registering a new target implementation contract with the `Controller` by following the steps below.

Note: The addresses of all deployed contracts can be found [here](https://docs.livepeer.org/reference/deployed-contract-addresses).

## Deploy Target Implementation Contract

Set the Infura API key environment variable.

```
export INFURA_KEY=<INFURA_KEY>
```

Deploy the target implementation contract by using the `--tags` flag to specify the tag associated with the relevant deploy script.

```
PRIVATE_KEY=$(cat <PATH_TO_PRIVATE_KEY_FILE>) npx hardhat deploy --tags <TAGS> --network arbitrumMainnet
```

For example, `deploy/deploy_bonding_manager.ts` is the deploy script for the `BondingManager` target implementation contract and the following command would just run that specific deploy script.

```
PRIVATE_KEY=$(cat ~/path-to-private-key-file) npx hardhat deploy --tags BONDING_MANAGER --network arbitrumMainnet
```

After deployment, a file in the `deployments` directory containing the latest addresses of deployed contracts will be updated. The JSON file for the proxy will use the name of the contract i.e. `BondingManager` proxy -> `deployments/<NETWORK>/BondingManager.json` and the target implementation will use the name of the contract with the `Target` suffix i.e. `BondingManager` target implementation -> `deployments/<NETWORK>/BondingManagerTarget.json`. By default, the proxy file i.e. `deployments/<NETWORK>/BondingManager.json` will be updated as well even if we only want to update the target implementation file i.e. `deployments/<NETWORK>/BondingManagerTarget.json` to be updated. We can omit this change from the Git history just by running `git checkout -- deployments/<NETWORK>/BondingManager.json`.

## Verify Contract Code

Verify the contract code on arbiscan.io.

```
npx hardhat etherscan-verify --network arbitrumMainnet --license MIT --sleep
```

The `etherscan-verify` task might return an error for certain contracts. If this happens, an alternative approach is to generate a single "flattened" (contains code from all files that the contract depends on) `.sol` file that can be manually submitted on arbiscan.io.

```
npx hardhat flatten contracts/bonding/BondingManager.sol > flattened.sol
```

You can use https://arbiscan.io/verifyContract to manually submit contract code for public verification.

- The compiler config (i.e. version, optimizer runs, etc.) can be found in `hardhat.config.ts`  under `solidity.compilers`.
- For Compiler Type, select "Solidity (Single File)".
- For Open Source License Type, select "MIT"

When prompted for the code, you can copy and paste the contents of `flattened.sol`.

You can also use Tenderly to manually submit contract code for [private verification](https://docs.tenderly.co/monitoring/smart-contract-verification/verifying-a-smart-contract).

If you see an error related to multiple SPDX license identifiers, remove all SPDX license identifiers from `flattened.sol` except for a single one.

## View Contract Diff

Use the contract diff checker at https://arbiscan.io/contractdiffchecker to view the code diff between the current and new target implementation contracts in order to check that the verified code at address of the new target implementation contract contains the expected changes.

If the contract code is only privately verified in Tenderly, you can view the contract diff by copying the current target implementation contract code from arbiscan.io and the new target implementation contract code from Tenderly to local files and then running `diff current.sol new.sol`.

## Create Protocol Governor Update

Use [governor-scripts](https://github.com/livepeer/governor-scripts) to generate the update to be staged and executed by the protocol `Governor` that will register the target implementation contract with the `Controller`.

## Run Upgrade Simulation

Use [Tenderly](https://tenderly.co/) and/or Hardhat/Foundry to simulate the upgrade by creating a fork, staging/executing the protocol `Governor` update and verifying that the registration of the new target implementation contract is executed as expected.

## Stage and Execute Protocol Governor Update

The owner of the protocol `Governor` needs to submit a `stage()` transaction with the update and then after the update's delay is over (if the delay is 0 then the update is immediately executable) any address can submit an `execute()` transaction to execute the update to complete the registration of the new target implementation contract.

repository: livepeer/protocol

branch_name: refs/heads/confluence

gha_language: JavaScript

repo_name: livepeer/protocol


text:
> [Go to French version](/fr/Règlements/Décrets,%20ordonnances%20et%20règlements%20statutaires/2008/58.md)

# Corporate Interrelationships (Cooperative Credit Associations) Regulations

**SOR/2008-58**

Enabling authorities:
- [COOPERATIVE CREDIT ASSOCIATIONS ACT](/en/Acts/Statutes%20of%20Canada/1991/c.%2048.md)

Date registered: 6 March 2008

----------

Her Excellency the Governor General in Council, on the recommendation of the Minister of Finance, pursuant to section 80.1[a] and subsection 463(1)[b] of the [Cooperative Credit Associations Act](/en/Acts/Statutes%20of%20Canada/1991/c.%2048.md)[c], hereby makes the annexed Corporate Interrelationships (Cooperative Credit Associations) Regulations.

a: S.C. 2007, c. 37, s. 147

b: S.C. 2005, c. 54, s. 208

c: S.C. 1991, c. 48

## Interpretation

**1** The following definitions apply in these Regulations.

***Act*** means the [Cooperative Credit Associations Act](/en/Acts/Statutes%20of%20Canada/1991/c.%2048.md). (*Loi*)

***delivery shares*** means shares issued by a cooperative credit association to a particular subsidiary for the purpose of an acquisition made under subsection 80.1(1) of the Act. (*actions remises*)

***particular subsidiary*** means a subsidiary body corporate referred to in subsection 80.1(1) of the Act. (*filiale visée*)

## Corporate Interrelationships

**2** For the purpose of subsection 80.1(1) of the Act, the prescribed conditions are that
- **(a)** the consideration received by the cooperative credit association for the delivery shares is equal to the fair market value of those shares at the time of their issuance;
- **(b)** the class of shares of which the delivery shares are a part is widely held and shares of that class are actively traded on any of the following stock exchanges in Canada, namely,
	- **(i)** the Canadian Venture Exchange,
	- **(ii)** The Montreal Exchange, or
	- **(iii)** the Toronto Stock Exchange;
- **(c)** the sole purpose of effecting the acquisition by the particular subsidiary of delivery shares is to transfer them, as set out in paragraph 3(b), to the shareholders of another body corporate;
- **(d)** immediately before the acquisition of the delivery shares by the particular subsidiary, the other body corporate and its shareholders deal at arm’s length, to be determined in accordance with the [Income Tax Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(5th%20Supp.).md), with the cooperative credit association and the particular subsidiary; and
- **(e)** immediately before the acquisition of the delivery shares by the particular subsidiary, the particular subsidiary and the other body corporate are not resident in Canada, for the purposes of the [Income Tax Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(5th%20Supp.).md).
> SOR/2010-71, s. 8(F).

**3** For the purpose of subsection 80.1(2) of the Act, the prescribed conditions are that
- **(a)** the particular subsidiary does not acquire a beneficial interest in the delivery shares as a result of its acquisition of those shares and the beneficial interest is acquired by the shareholders of the other body corporate;
- **(b)** the acquisition by the particular subsidiary of the delivery shares is followed immediately by a transfer of the delivery shares by the particular subsidiary to shareholders of the other body corporate;
- **(c)** immediately after the transfer of the delivery shares to the shareholders of the other body corporate, the particular subsidiary and the other body corporate are not resident in Canada, for the purposes of the [Income Tax Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(5th%20Supp.).md); and
- **(d)** after the transfer of the delivery shares to the shareholders of the other body corporate, the other body corporate is a subsidiary body corporate of the particular subsidiary.

**4** For the purpose of subsection 80.1(3) of the Act, the prescribed requirements are that, within 30 days after one of the conditions described in section 2 or 3 is not met or ceases to be met, the cooperative credit association shall
- **(a)** cancel the delivery shares on the condition that, if the by-laws limit the number of authorized shares, the delivery shares may be restored to the status of authorized but unissued shares;
- **(b)** return the consideration received by the cooperative credit association for the delivery shares to the particular subsidiary; and
- **(c)** cancel the entry for the consideration in the stated capital account of the cooperative credit association.

## Coming into Force

[*]**5** These Regulations come into force on the day on which section 147 of An Act to amend the law governing financial institutions and to provide for related and consequential matters, chapter 6 of the Statutes of Canada, 2007, comes into force or, if it is later, on the day on which they are registered.

*: [Note: Regulations in force March 8, 2008, *see* SI/2008-33.]

repository: TravisMadill/CanadianLaws

path: /en/Regulations/Statutory Orders and Regulations/2008/58.md

repo_name: TravisMadill/CanadianLaws


text:
# Episode #09 of 12 - Leasing a Car

![](episode-09.jpg)

	"I'd buy a two- or three-year-old car any day over a new car, because someone
	else broke it in and took a bunch of depreciation with them." - Erik Folgate,
	Money Crashers blog

Like houses, people don't always have the cash to buy a car outright. Financing a car requires an initial deposit, which some struggle to save up, so leasing becomes an attractive option. Leasing a car means you can "purchase" a car for a low monthly payment that's typically lower than the monthly payments when buying on finance. When you lease a car, you get a new car for a fixed period, like three years. After those three years, you can purchase the car outright or continue your lease for another three years and get a new car.

Unlike borrowing for a house where the value can go up or down, borrowing for a car will instantly put you into negative equity. Cars lose their value as soon as you drive them out of the dealership.

## What's the Difference in Cost?

To make an informed decision, here's a breakdown of the costs of each of our options if we decide to purchase a reasonably priced car:

	Price of car: $4,500
	(Buying on finance over 36 months and leasing over 36 months)

| Cost         | Outright | On Finance (0% APR) | On Finance (5.4% APR) | Lease (5% interest) |
| ------------ | -------- | ------------------- | --------------------- | ------------------- |
| Initial cost | $4,500   | $2,250              | $450                  | $450                |
| Monthly cost | $0       | $62.5               | $121.88               | $204.64             |
| Overall cost | $4,500   | $4,500              | $4,837.5              | $5,469.64           |

You can also use online calculators for tailored results. I used the [Car Finance Calculator](https://www.carfinance247.co.uk/car-finance-calculator) and [Auto Lease Calculator](http://www.calculator.net/auto-lease-calculator.html).

## The Cost of Repairs

After 36 months of the lease, you can trade in your three-year-old car for a newer car and continue to pay your lease every month. Repairs are costlier the older your car gets. Since you get a new car every few years, the cost of repairs when leasing could be lower.

However, since you don't own your leased car, you're responsible for returning it under the following conditions:

1. **Pristine**. If there's a functional issue, it's a no-brainer to get it fixed when you own a car. If there's aesthetic damage, like a dent from a minor collision, as the car owner you have the option of repairing the damage or not repairing the damage. If it doesn't affect the function of the vehicle, owners might delay repairs. With a leased car, you must fix everything, both functional and aesthetic. If you turn the car in without fixing everything, you'll receive a large bill.
2. **Mileage**. You're required to only drive a certain number of miles every year as determined by your lease. If you're only allowed to drive 15,000 miles per year and you go beyond this, you'll pay a large per-mile penalty when you turn the car in.
3. **Servicing**. Some leases require you to get your car serviced by the manufacturer, meaning you can't use your local discount garage. For example, leasing a Mercedes often means you'll have to go to a Mercedes-approved garage for servicing and repairs.
3. **Exit**. If you own a car but no longer need it, you can sell it. If you lease a car, you'll have to pay a penalty for ending the lease early.

**In summary**, consider the implications of getting a car on a lease, and if you can, avoid purchasing any car new. Let someone else take the hit with this depreciating purchase.

repository: magnobiet/highbrow-lessons

repo_name: magnobiet/highbrow-lessons


text:
# @chriscdn/vuex-undo-redo

An undo/redo for Vuex.

## Motivation

There are many Vuex undo/redo solutions, but I couldn't find one that fit my needs.

The difficulty is knowing when to snapshot the Vuex state. Most implementations do this by observing the store for action or mutation events.

Neither approach worked for me since some actions in my store make multiple mutations. This lead to either:

- too many snapshots being created by actions when observing mutations; or
- not having a snapshot created after a mutation when only observing actions.

This module works by observing mutations and debouncing the snapshot creation method. This ensures a snapshot is only made after no mutation event is observed for a period of one second. This allows an action to make multiple consecutive mutations with only one snapshot being created.

This may or may not suit your requirements, but has worked well for me.

## Features

- can be dynamically added and removed from an existing store
- can be setup to snapshot and restore all or parts of your Vuex store
- convenient `canUndo` and `canRedo` reactive properties (to use in your UI)
- can be configured to ignore specific mutation events
- `suspend` and `resume` functions to suspend and resume the creation of snapshots

## Installing

Using npm:

```bash
$ npm install @chriscdn/vuex-undo-redo
```

Using yarn:

```bash
$ yarn add @chriscdn/vuex-undo-redo
```

## Setup

A getter and mutation named `vuexUndoRedo` must be added to your Vuex store (the names can be configured).

The `vuexUndoRedo` getter return value is added to the undo stack when a snapshot is made. This can be setup to return the entire Vuex state or just a section of it. The value gets passed to the `vuexUndoRedo` mutation when an undo or redo event takes place.

The `vuexUndoRedo` mutation receives the undo/redo payload when the `undo()` or `redo()` method is called. The mutation should apply the payload to the store to complete the state change.

For example, the following getter and mutation could be used to snapshot and restore the entire Vuex state.

```js
// getter
vuexUndoRedo(state, getters) {
	return state
}

// mutation
vuexUndoRedo(state, payload) {
	Object.assign(state, payload)
}
```

A `VuexUndoRedo` instance can be instantiated as follows:

```js
import VuexUndoRedo from '@chriscdn/vuex-undo-redo'

const vuexUndoRedo = VuexUndoRedo(store[, options])
```

It's up to you to decide how you'd like to store the `vuexUndoRedo` instance. For example, to make it globally available you could add it to the Vue prototype:

```js
Vue.prototype.$vuexUndoRedo = VuexUndoRedo(store, options);
```

You could also make it a local variable in a Vue component. This might be useful if interaction with the API is limited to that component:

```js
created() {
	this.vuexUndoRedo = VuexUndoRedo(this.$store, options)
},

beforeDestroy() {
	this.vuexUndoRedo.destroy()
}

```

## API

### Constructor options

The default options are as follows and can be overridden:

```js
const options = {
  stackSize: 10, // how many undo snapshots to store
  debounceTime: 1000, // the debounce time before creating a snapshot
  ignoreMutations: [], // an array of mutations to ignore
  mutation: "vuexUndoRedo", // the name of the mutation (see above)
  getter: "vuexUndoRedo", // the name of the getter (see above)
};
```

### Instance properties

The `canUndo` and `canRedo` reactive properties return `true` or `false`. These can be used in the user interface to enable or disable buttons.

```html
<button :disabled="!vuexUndoRedo.canUndo" @click="vuexUndoRedo.undo">
  Undo
</button>
<button :disabled="!vuexUndoRedo.canRedo" @click="vuexUndoRedo.redo">
  Redo
</button>
```

### Instance methods

#### Undo or Redo

```js
// Pops the undo stack and passes the value to the vuexUndoRedo mutation
vuexUndoRedo.undo();

// Pops the redo stack and passes the value to the vuexUndoRedo mutation
vuexUndoRedo.redo();
```

#### Reset the undo/redo stack

```js
vuexUndoRedo.reset();
```

#### Suspend/resume snapshots

```js
// suspend observing mutations
vuexUndoRedo.suspend();

// resume observing mutations (enabled by default)
vuexUndoRedo.resume();
```

#### Destroy the instance

```js
// stop observing the store and destroy the instance
vuexUndoRedo.destroy();
```

## Credits

...

## License

MIT

repository: chriscdn/vuex-undo-redo

repo_name: chriscdn/vuex-undo-redo


text:
[![CircleCI](https://circleci.com/gh/arenadotio/ocaml-mssql.svg?style=shield)](https://circleci.com/gh/arenadotio/ocaml-mssql)
[![Coverage Status](https://coveralls.io/repos/github/arenadotio/ocaml-mssql/badge.svg?branch=master)](https://coveralls.io/github/arenadotio/ocaml-mssql?branch=master)
[![GitHub release](https://img.shields.io/github/release/arenadotio/ocaml-mssql.svg)](https://github.com/arenadotio/ocaml-mssql/releases/latest)
[![Documentation](https://img.shields.io/badge/documentation-odoc-blue)](https://arenadotio.github.io/ocaml-mssql/mssql/index.html)

**Mssql** is an [Async](https://github.com/janestreet/async) OCaml SQL Server
library, currently using [FreeTDS](https://github.com/kennknowles/ocaml-freetds).

## Features

- Queries run in a background thread and play nicely with Async (assuming
  you're pinning `freetds` so it releases the runtime lock)
- Supports single connections or connection pools
- Supports automatic conversions for common data types
- Supports parameterized queries (although internally it's not very nice;
  we parse the query for $ parameters and then insert quoted params)
- We have workarounds for FreeTDS madness, like how there's no simple way to
  know what date format FreeTDS was configured with
- Intellegently handles concurrent usage for both executing queries and with
  transactions
- Heavily [tested](test/test_mssql.ml)

Regarding concurrent usage, the following code is safe:

```
let%map res1 = Mssql.execute db "SELECT * FROM table_a"
and res2 = Mssql.execute db "SELECT * FROM table_b"
in
...
```

Since we don't support actual concurrency, this will run one query and then
the other (order is not defined).

This is also safe and will never cause a duplicate primary key error, since
we prevent concurrent usage of a connection outside of a transactio if a
transaction is in progress on that connection:

```
Mssql.execute_unit "CREATE TABLE x (id INT PRIMARY KEY)"
>>= fun () ->
let%map () =
  Mssql.with_transaction db (fun db ->
    Mssql.execute_unit db "INSERT INTO x (id) VALUES (1)"
    >>= fun ()->
    Mssql.execute_unit db ~params:Mssql.Param.[Some (Int 1)]
      "DELETE FROM x WHERE id = $1")
and Mssql.execute db "INSERT INTO x (id) VALUES (1)"
```

Obviously this only works if we know about the transaction, so using
`Mssql.begin_transaction` or `Mssql.execute_unit "begin"` won't have this
feature.

## Contributions

This library is heavily optimized for our use-case, but we would love to see
contributions to:

 - Support Lwt and blocking IO
 - Support parameterized queries in a better way
 - Switch to pure OCaml and not use FreeTDS

This is not an exhaustive list -- feel free to create an issue if you're
considering making a new feature and want to know if we'll accept it, or just
open a pull request.

## Installation

You can [find mssql on opam](https://opam.ocaml.org/packages/mssql/):

```
opam install mssql
```

Or you can pin this repo if you want:

```
opam pin add mssql https://github.com/arenadotio/ocaml-mssql.git
```

## Usage

The [tests](test/test_mssql.ml) are full of examples and you can find
[documentation here](https://arenadotio.github.io/ocaml-mssql/mssql/index.html).

### Example

```
Mssql.with_conn ~host ~db ~user ~password (fun db ->
  Mssql.execute_unit db
    "CREATE TABLE example (id INT NOT NULL, value INT NOT NULL)"
  >>= fun () ->
  Mssql.execute_unit db "INSERT INTO example (id, value) VALUES (1, 2)"
  >>= fun () ->
  Mssql.execute db ~params:Mssql.Param.[Some (Int 1)]
    "SELECT id FROM example WHERE id = $1"
  >>| function
  | [ row ] ->
    let id = Mssql.Row.int_exn row "id"
    and value = Mssql.Row.int_exn row "value" in
    printf "Got row with id=%d value=%d" id value
  | _ -> assert false)
```

repository: dune-universe/dune-universe

repo_name: dune-universe/dune-universe


text:
Python's Flying Circus
======================

This is pretty much the SIMPLEST, CRUDEST and CHEAPEST remote-controlled stuff
you can do, almost all by yourself, that will fly (kinda).

Obviously, you can buy something better. I've done it, because I've always felt
a need to do a flying remote controlled model. Finally fulfilled, I can do
something more productive.

Along the way, completely by accident, I've managed to learn about both:
Micropython and ESP-12S (ESP8266). Together they are a simple, fast to use and
simply beautiful duo. The avionics code is under 100 lines-of-code, the
controller - around 200.

I've scrubbed my initial idea of flying a rpi zero - for various good reasons.
I've never wanted to do it with AVR/STM32 + RFMxy because of a tedious
complexity and unfun debugging.

It took me 4 years to finish since I got the styrofoam base - but I estimate the
total work-days to be less than 4. The pandemic helped by allowing me to move to
the countryside for a while. I guess I should call it "Perseverance", but the
name seems taken. It's a busy year.

Parts
-----
- Larger styrofoam plane (mine has 49cm nose-to-tail)
- ESP-12S (other will work; ESP-12S has 4MB of flash, µPython is cool with
  1MB).
- 2x 5g servo for controlling ailerons (wing part)
- 1x servo (I had 9g, 5g would do) to controll the tail. I'm unsure if this is
  required.
- A lipo battery which can provide high current.
- A DC-DC step-up converter that stabilizes 3.3V from 2 - 5V (I used Pololu
  u1v10f3 converter which is tiny).
- Joystick or gamepad. You can try using an accelerometer in the laptop, or a
  mobile, or some touch screens. Go wild. Controlling it is hard though.
- Some glue, wires, soldering iron.
- Something to flash the ESP-12S (rpi, ftdi, some serial bridge).

If going for a powered craft and not a glider:
- 2x fast DC motor, for example for a small quadrocopter like hubsan.
- IRLZ44N - a mosfet for controlling power to the motors.
- A capacitor, 100nF, or 1uF - to limit noise (probably not needed)
- a schottky diode for limiting noise of switched selenoids in the motors (probably not needed)

Glider wasn't really fun. My total was 97 grams.

The wifi range between ESP and my laptop turned out to be more than required to
fly on the open area. I had more problems with the near by river or the gamepad
range than the wifi.

Steps
-----
Cut holes, glue servos, connect ailerons and elevator to servos. Connect wires,
solder stuff. Do a better job than I did.

Program the ESP-12S: Programming the ESP-12S requires some serial interface.
Like FTDI based USB bridge, or a raspberry pi. NodeMCU has the serial converter
included but is heavier. After flashing the micropython on the ESP with
esptool.py you can upload the code over the wifi and the serial is no longer
needed.

Put main.py and fly.py onto the ESP-12S using webrepl.

I suggest starting with gliding only and calibrate servos neutral position to
fly straight. Than calibrate the movement ranges so it responds, but remains
controllable. Gamepads have a short control range and need to be well
calibrated. I think.

Then enable motor power and use a fishing net to pick the plane out of the
river.

Media
-----

Pictures.
![Nose battery](media/01_nose_battery.jpg)
![02_cockpit.jpg](media/02_cockpit.jpg)
![03a_mess.jpg](media/03a_mess.jpg)
![03b_mess.jpg](media/03b_mess.jpg)
![04_aileron_servo.jpg](media/04_aileron_servo.jpg)
![05_motor.jpg](media/05_motor.jpg)
![06_cabling.jpg](media/06_cabling.jpg)
![07_elevator.jpg](media/07_elevator.jpg)
![08_pads.jpg](media/08_pads.jpg)

Moving pictures:
- ![Noise on battery made by motors without capacitors](media/cmp_power_noise_without_cap_with_poor_battery.mp4)
- ![Added a 100nf capacitor](media/cmp_power_noise_with_cap_with_poor_battery.mp4)

I was chasing a problem where the ESP was suddently turning off. I though that
was because of the noise, but it turned out that is was the overcurrent
protection in the battery which was triggered - partially because of noise,
mostly because of too high current. Capacitor helped a bit and I've left it
there.

With a better battery the thrust improved too:
![cmp_true_power_good_battery.mp4](media/cmp_true_power_good_battery.mp4)

repository: blaa/flyingpython

repo_name: blaa/flyingpython


text:
# starburst theme

A modified Sunburst theme, with better support for ES6.

![A screenshot of your theme](https://f.cloud.github.com/assets/69169/2289498/4c3cb0ec-a009-11e3-8dbd-077ee11741e5.gif)

repository: Anillusion/atom-starburst

repo_name: Anillusion/atom-starburst


text:
---
layout: default
---

# 1997-09-14 - Anti-GAK Software Release

## Header Data

From: Anonymous<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 00440411f6e261e6dff7bb6f8a865b670beb0babcbca690eeff2375defbf328b

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-09-14 01:47:01 UTC

Raw Date: Sun, 14 Sep 1997 09:47:01 +0800

## Raw message

```
{% raw  %}From: Anonymous<EMAIL_ADDRESS>Date: Sun, 14 Sep 1997 09:47:01 +0800
To<EMAIL_ADDRESS>Subject: Anti-GAK Software Release
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

          Convert your GAKware to CRAKware!  **

	       http://www.antigak.com.ai/

	         Available Jan. 1, 1999
                    Ecash Preferred
 (Double-blinded, FinCEN Resistance Rating 3 or higher)

"Browser Booster is a cypherpunk's wet dream!"  - Anonymous

"More powerful than C2Net's StrongArm plug-in." - Also Anonymous

"My line was tapped, but I didn't care.  They thought I was
 chatting about roller derby, but I was really transferring
 US $100,000. to safe accounts beyond their reach." - L.D.

         Another fine product from Anti-GAK Software
  "Making the Net safe for privacy and commerce ... again."

                          ---

  ** CRAK = Cryptographically Resistant Access to Keys

{% endraw %}
```

## Thread

+ Return to [September 1997](/archive/1997/09)

+ Return to "[Anonymous <anon@anon.efga.org>](/authors/anonymous_anon_at_anon_efga_org_)"

+ 1997-09-14 (Sun, 14 Sep 1997 09:47:01 +0800) - Anti-GAK Software Release - _Anonymous<EMAIL_ADDRESS>


text:
# GitAnalyzer

**GitAnalyzer** is a tool finding the code, design and project management issues by using the behavioral analysis metrics on Git repository. From practice, project managers love the GitAnalyzer at first sight.

![ui-view](/screenshots/ui-view.png)

This tool is inspired by the book of "[Your Code as a Crime Scene](https://pragprog.com/book/atcrime/your-code-as-a-crime-scene)" by Adam Tornhill. This book has great proposals of behavioral analysis on version control repositories, and GitAnalyzer takes the best of them (little bit rethought to don't rely on actual code). The main idea permeating this tool is that you don't need to spend hours doing static code analysis. You have all the information in your Git repository. Just look how your team behaves with each its part.

Reason to build GitAnalyzer is making a repository analysis tool with convenient user interface and easy to change.

## Non-functional features

- Works with several Git repositories and merging the statistics from all of them.
- Supports multi-team and multi-location projects
- Supports incremental updates to support up-to-date information without any manual actions.
- Caches the statistics in memory within uptime. Caches statistics to disk to decrease network communications in startup.

### Basic concepts

- **Change**. In GitAnalyzer the change is an atomic unit of measurement. Change here is a commit made to the single file by the single author within the single task. Change is a fractional value: e.g. if 4 commits made in same task for same file by the same author each commit will represent 0.25 part of this change. So amount of changes can be fractional.
- **Task**. Some commits are just continuous commits related to same task. Weight of such commits should be distributed across themselves. Currently we can only keep track of tasks using the comments of commits. You specify the prefix of the JIRA by special property, and system will group all the commits related to the same JIRA number.
- **Files and modules**. File is a source file in file system. Module is a root directory for source subtree acting as a separate unit. GitAnalyzer finds modules by existance of the build descriptor in a root directory of module, or by existance of sub-directory "src."
- **Author**. Author is an actual author in Git, not a committer. Author is identified by couple Name-E-mail. Author should represent a single person. When you have a situation when some person has several names/e-mails, You can unite them all via the property file by declaring them as aliases. All contribution made from these aliases will be grouped to the single author then.
- **Filtering**. Some commits are undesirable in metrics. These are: service commits, commits made by scripts, merge commits and commits generated by git-rebase. Build descriptors are also undesirable in some metrics (e.g. dependency graph). These files and commits are filtered out and don't appear in results.

### Application modes

GitAnalyzer can be run as either a server or a standalone client. There are 3 startup modes for it:
- **Server mode**. It starts a Java process on the server machine and provides an HTTP interface for thin client. GitAnalyzer performs the incremental updates in background to make the data always up-to-date. To run application in server mode use command-line parameter ```-server```.
- **Client mode**. It starts a Java process with reduced server as well as a client browser. When user closes the browser the server shuts down. Statistics gathering performs once. To run application in client mode use command-line parameter ```-client``` or without parameters. This is a default mode.
- **Installation mode**. It starts in command-line mode, installs the application to directory you specified, and gives up. To install the application use command-line parameter ```-install```.

## Collected metrics

*All examples are made on base of Hibernate repository as of Dec 04, 2016.*

### Maintenance cost

Every file in repository is being changed intermittently. Some files are changed much more often than others. These changes are often caused by bad design, complexity, tight coupling and other undesired factors. In ideal world we should have equal amount of changes distributed across the whole codebase.

Every change comes not for free for companies. They pay developers making these changes, QA testing regression, support, etc.. So, these undesired changes often take more than 80% of the project's cost.

In this metric, we calculate the amount of changes per file, then order them by descending, and draw a plot.

![lc-files-chart](/screenshots/lc-files-chart.png)

Integral value: area below the plot is the overall changes' cost in money. This area for top 5% files is the same as for all remaining files. And reducing this value can significantly reduce the maintenance cost of project.

A table below the plot shows the files to be addressed.

![lc-files-table](/screenshots/lc-files-table.png)

Table is ranged by changes percent. First column shows the absolute amount of changes, second is relative amount (%). Last two columns open the pop-up showing the authors and teams mostly contributing to this file. Red rows mark the files to address. They have ten times bigger amount than ideal. If Amount is above the ideal, the row is amber. Green rows are below the ideal.

This page also shows this metric on module basis.

![lc-modules-chart](/screenshots/lc-modules-chart.png)

![lc-modules-table](/screenshots/lc-modules-table.png)

### Merge bottlenecks

This metric shows files and modules changed by unique authors. The more autors some file (or module) has the more conflicts it produces at merge. Such files and modules are merge bottlenecks in project. Common advice here: introducing code ownership to codebase; looking where SRP principle is violated.

The first bar chart shows the top 30 modules by count of unique authors. Highest bars are merge bottlenecks to be addressed.

![mb-modules-chart](/screenshots/mb-modules-chart.png)

Tables below show the modules and files ordered by by count of unique authors.

![mb-modules-table](/screenshots/mb-modules-table.png)

![mb-files-table](/screenshots/mb-files-table.png)

Red rows are files (modules) with count > 100. Amber: > 20. Last two columns open the pop-up showing the authors and teams mostly contributing to the given file (module).

### Stability analysis

This is a temporal metric based on the first and last changes in files. Usually the file or module is being changed first 3 months. And then when application architecture stabilizes, it's kept untouched for years. But some files/modules are changing within all their lifetime. This is an indicator that architecture is unstable in these places. There could be another cause of that: some files/modules are changed often because of multiple change requests to corresponding functionality. This could be a management issue, or just a false positive result.

Scatter plot ranges all the modules by first and last commit. First change here is a first commit. Last change is a recent commit. X axis is a time between first and last commit. Y axis is a time sinse the last commit. We usually don't want to see X more than Y. So, the red zone shows all "unstable" modules. The farther point from the line y=x, the less stable the module's architecture. The hottest are in bottom-right corner.

![stability-modules-chart](/screenshots/stability-modules-chart.png)

Table below shows the detailed age information.

![stability-modules-table](/screenshots/stability-modules-table.png)

Age is a time from first change until now. Time from last change is self-descriptive.

(*Stability %*) is (*Time from last change*) / (*Age*) * 100%.

Red rows indicate *Stability* less than 20%. Amder: between 20% and 50%.

The same metrics is collected on the file basis.

![stability-files-table](/screenshots/stability-files-table.png)

### Activity analysis

This temporal metric shows the authors', teams' and whole project's activity on monthly basis. This metric can narrate many interesting stories above the project. For example, if some team has instantly decreasing line this could mean that team has either low motivation or some other factors preventing normal contribution. If the plot has waves that can mean that work is doing by raids: silent periods alternate with periods of rush. Sometimes contribution grows or falls significantly at a time, and it's interesting to find a cause of that.

![a-all](/screenshots/a-all.png)

![a-team](/screenshots/a-team.png)

![a-author](/screenshots/a-author.png)

X axis is a timeline quantized by months. Y axis is amount of changes.

### Implicit dependencies

This metric shows the actual dependencies between files or modules. Some dependencies are explicitly set and expected by design. For example, your web application depends on some library providing authorization. But some dependences are just wondering. For example, if change in database causes changes in UI module, this dependency is implicit and undesirable. Finding such dependencies is a complex task. But finding and decoupling them gets benefits in decreasing complexity of code. Such dependencies can be found by analyzing which files (modules) are often being changed together (i.e appear in the same commit.) Then we can build a graph of such files (modules) and find clusters in this graph.

![id-modules-graph](/screenshots/id-modules-graph.png)

Nodes are modules; edges are connections. Every node and edge of this graph is weighted. Weight of edge is a count of commits where two modules appeared together. Weight of node is a sum of all connecting edges. The higher weight the thicker lines. Edges having weight less than 3 are filtered out. Nodes having no edges are filtered out.

![id-files-table](/screenshots/id-files-table.png)

In this table: *count of connections* is a count of commits where two files appeared together. Rows with number less than 3 are filtered out. Rows are ordered by count of connections from greatest to least. First 10% of rows are red. Next 40% are amber.

### Contributors performance

This metric shows absolute and relative amount of changes per on team bases, on location basis and for every author individually. It can be used for team performance analysis only if all the people are doing very similar and routine work. Why? Because precision of this metric is arguable. It shows just a number of changes, but doesn't take complesxity of these changes into account. Currently so many non-measurable factors affect performance that we can say we have no precise metrics for that. All of them are just empirical.

Using the filtering by mask you can look who is contributing more to different file types. For example, who is writing unit tests and who is not. You can also filter by module path and look who is mostly contributing to particular file or module.
Performance by locations shows two maps. First map shows the absolute and relative amount of changes per location. Second map shows the efficiency: average amount of changes per author.

![c-locations-map](/screenshots/c-locations-map.png)

![c-locations-map-eff](/screenshots/c-locations-map-eff.png)

Performance by teams shows two bar charts. First chart shows the absolute and relative amount of changes per team. Second map shows the efficiency: average amount of changes per author.

![c-teams-chart](/screenshots/c-teams-chart.png)

![c-teams-chart-eff](/screenshots/c-teams-chart-eff.png)

Teams performance is also detailed in table.

![c-teams-table](/screenshots/c-teams-table.png)

In this table: *Count of changes* is absolute amount, *Summary contribution* is relative amount, and *Changes per member* is efficiency.

The last table shows the individual performance in absolute and relative numbers.

![c-authors-table](/screenshots/c-authors-table.png)

### Top contributors of the file/module

These tables show which teams and authors are mostly contributing to the module. It allows you find who is responsible for that file/module. Or who has bigger expertise of this file/module. This is useful when you want to get an advice or assistance, or assign some work to appropriate person.

![popup-topauthors-file](/screenshots/popup-topauthors-file.png)

![popup-topauthors-module](/screenshots/popup-topauthors-module.png)

![popup-topteams-file](/screenshots/popup-topteams-file.png)

![popup-topteams-module](/screenshots/popup-topteams-module.png)

These tables can be opened from links "*Authors*" and "*Teams*" wherever you find them in other tables.

### Top contribution of the author/team

These tables show which files and modules are mostly changed by the given team/author. In other words, who is the actual owner of particular code.

![popup-topfiles-author](/screenshots/popup-topfiles-author.png)

![popup-topfiles-team](/screenshots/popup-topfiles-team.png)

![popup-topmodules-author](/screenshots/popup-topmodules-author.png)

![popup-topmodules-team](/screenshots/popup-topmodules-team.png)

These tables can be opened from links "*Files*" and "*Modules*" wherever you find them in other tables.

## Additional features

Date and file path filtering

![form-filter](/screenshots/form-filter.png)

Search and export to CSV in tables

![form-search-export](/screenshots/form-search-export.png)

# Installation and configuration

## Prerequisites
- **Java 1.8** or higher should be installed.
- **Git** should be installed.
- **Repositories** must be checked out and connected to remotes.

## Installation

Download the JAR file and run

```java -jar <path to JAR file> -install -configFolder="<path to configuration directory>" -cacheFolder="<path to cache directory>"```

Parameters ```-configFolder``` and ```-cacheFolder``` are optional. If you skip them the default folders ```<path to JAR file>/conf``` and ```<path to JAR file>/cache``` will be created.

Application should be manually configured after installation.

## Configuration

After installation, the configuration folder will contain 5 property files:

**1. application.properties**

This file contains basic configuration of the application and processed data. It includes:
  - ```GIT.read.batch.size=<numeric value, default 1024>```. Mandatory.

    When performing data gathering, GitAnalyzer creates about 16 threads reading the Git repository. This property specifies how many files should be processed by each thread. This property is equal to count of external requests done by each reader thread.
  - ```GIT.max.connection.attempts=<numeric value, default 5>```. Mandatory.

    When performing data gathering, the particular command can fail due to network or remote server issue. GitAnalyzer re-attempts the connection to server in this case. This property specifies how many attempts will be made before GitAnalyzer gives up and fails the update process.
  - ```GIT.service.commit.markers=<comma separated list of string values>```

    Some commits made to version control system are just service commits. These are commits like "bump up snapshot version", "migration from other VCS", etc. Service commits should be filtered out and do not take part in analysis. You specify the list of string values in this property. If commit has any of these values in description it's being matched as a "service commit" and filtered out.
  - ```GIT.service.author.markers=<comma separated list of author names>```

    Some authors are just service authors. They do not reflect real developers and just reflects the scripts used within the build/deployment tasks. You can filter out all the contribution of such authors. You should specify names of them (not emails) separated by comma. Name should completely match the author name.
  - ```GIT.build.file.markers=<comma separated list of build descriptor files>```

    Some files are service files used by the build automation tool. These are files like pom.xml, .gradle, etc. These files take part in some metrics, and excluded in some other. In addition, these files are sometimes used by GitAnalyzer as module separating markers. You can specify the comma-separated list of file names. All paths ending by these names will be marked as a "build descriptor file."
  - ```GIT.refactoring.commits.min.size=500```. Mandatory.

    Some commits are really huge, but they have only minor changes. For example, if you renamed a single source file (which is referred from 1000 other source files), you have to change all these 1000. But the change in still minor. Some metrics should decrease the weight of such commits. So you can specify the threshold by this property. If commit has more files than threshold this commit is marked as "refactoring."
  - ```GIT.jira.prefix=<Jira prefix in format [A-Z]*-, for example: AAA->```

    GIT doesn't keep the information about branches, so only we can do is relying on issue tracking system (like JIRA) and its internal numbers. If project has a policy to keep the task numbers in commit's comment we can group the commits with same task reference and then distribute the contribution weight.
  - ```GIT.repository.paths=<comma separated list of repository root paths>```. Mandatory.

    List of repositories in file system (on same machine when you run the server.)
  - ```GIT.branch.names=<comma separated list of branch names>```. Mandatory.

    List of branch names of repositories. This property should be parallel to "GIT.repository.paths" property: count of values should be equal. First value of one property should correspond to first value of other property. Second should correspond to second, and so forth. Recommended branches: develop for Git flow, master for other cases.
  - ```GIT.repository.filename.prefixes=<comma separated list of prefixes>```. Mandatory if there are more than one repository.

    List of prefixes for filenames for each repository specified. All file paths in Git repository will be prefixed with single prefix in statistics. This property should be parallel to "GIT.repository.paths" property: count of values should be equal. First value of one property should correspond to first value of other property. Second should correspond to second, and so forth. Recommended branches: develop for Git flow, master for other cases.
  - ```GIT.log.min.date=<date in format YYYY-MM-dd>, for example: 2016-11-21 14:20:21```

    Minimum date of commits. Only commits after this date will be analyzed. This can be used in single run (-client) mode.
  - ```GIT.log.max.date=<date in format YYYY-MM-dd>, for example: 2016-11-21 14:20:21>```

    Maximum date of commits. Only commits before this date will be analyzed. This can be used in single run (-client) mode.
  - ```GIT.update.interval.hours=24```. Mandatory.

    Interval between incremental updates. Value is in hours. Daily update is default.
  - ```HTTP.server.thread.count=10```. Mandatory.

    Count of HTTP requests can be processed simultaneously.
  - ```HTTP.server.host=localhost```. Mandatory.

    Server host. This setting is used in client mode.
  - ```HTTP.server.port=<numeric value, default 8000>```. Mandatory.

    Server port.
  - ```HTTP.browser.path=<path to the browser executable file>```. Mandatory.

    Path to browser. This setting is used in client mode.

  - ```FileAuthorsAnalyzer.min.authors.count=<numeric value, default 5>```. Mandatory.

(and other similar settings) are used in analysis algorithms. Changing them is not recommended.

**2. author.emails.mapping.properties**

It is not a rare situation when some person commits to Git from different accounts. This property file defines the mapping between real and alias author emails. All aliases will be grouped to real email. All commits made with alias email will be treated as made by single author.
Example:
```
author1.1<EMAIL_ADDRESS>author1.2<EMAIL_ADDRESS>```
All commits made by<EMAIL_ADDRESS>and<EMAIL_ADDRESS>will be joined with<EMAIL_ADDRESS>and treated as made by<EMAIL_ADDRESS>
**3. author.names.mapping.properties**

It is not a rare situation when some person commits to Git from different accounts. This property file defines the mapping between real and alias author names. All aliases will be grouped to real name. All commits made with alias name will be treated as made by single author.
Example:
```
author1.1=Author 1
author1.2=Author 1
```
All commits made by ```author1.1``` and ```author1.2``` will be joined with ```Author 1``` and treated as made by ```Author 1```.

**4. locations.properties**

Mapping ```<author email>=<location>```. Author email should not be an alias (see **author.emails.mapping.properties**). Location is a country abbreviation as per ISO 3166-1 alpha-2.

**5. teams.properties**

Mapping ```<author email>=<team name>```. Author email should not be an alias (see author.emails.mapping.properties). Team name is any string value.

# For contributors

If you want to participate in this project, below is a brief description of its architecture and dependencies.

Dependencies:

- Java 1.8+, no other server-side runtime dependencies
- JUnit 4.12
- Lumino admin template
- Bootstrap 3
- Alchemy.js
- Chart.js 1.0.1, 2.3.0
- JQVMap 1.5.1
- JQuery 1.11.1, 2.2.4

Architecture:

![architecture](/screenshots/architecture.png)

repository: AndreyKunin/git-analyzer

gha_language: Java

repo_name: AndreyKunin/git-analyzer


text:
# Vehicle

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Unique identification of a vehicle via the name. |
**startlocation** | **str** | Start address of the vehicle |
**endlocation** | **str** | End address of the vehicle. The optimisation takes into account the travel back to this location. | [optional]
**capacity** | **int** | Load capacity of the vehicle. For example, 30 tons is the digit 30. | [optional]
**capacity2** | **int** | Load capacity of the vehicle (second metric). For example, 400 items. | [optional]
**shiftstart** | **int** | Starting time of the shift of this vehicle. | [optional]
**shiftend** | **int** |  | [optional]
**type** | **list[str]** |  | [optional]
**unavailable** | **list[date]** |  | [optional]
**working_days** | **list[str]** |  | [optional]
**overtime** | **bool** | Indication if vehicle can go in overtime or not. | [optional]
**overtime_end** | **int** | Last timeblock of overtime. | [optional]
**breaks** | [**VehicleBreaks**](VehicleBreaks.md) |  | [optional]
**category** | **str** |  | [optional]

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

repository: solvice/solvice-routing-client

repo_name: solvice/solvice-routing-client


text:
# vROps Build

In order to get this utility to work on a vROps system natively, a custom toolchain must be compiled under the SLES 11
system that vROps uses.  This process will require SLES 11 media or an active SuSE enterprise subscription in order to
download the appropriate packaging:

```
sudo zypper install gcc gcc-c++ make ncurses patch zlib-devel wget tar xz awk netcfg wget-openssl1 curl-openssl1 libtool automake autoconf
```

# Openssl
* Download OpenSSL from https://github.com/openssl/openssl/releases (tar.gz) and scp to vrops system
```
tar -xzvf openssl*
cd openssl-Open*
./config --prefix=/usr --openssldir=/usr/local/openssl shared
make
make install
echo "export LD_LIBRARY_PATH=/usr/local/lib${LD_LIBRARY_PATH}" >> ~/.bash_profile
echo "export LC_ALL=en_US.utf8" >> ~/.bash_profile
echo "export LANG=en_US.utf8" >> ~/.bash_profile
chmod 755 ~/.bash_profile
# Reexecute base_profile, or relogin
cd ~
. ./.bash_profile
echo $LD_LIBRARY_PATH   # Make sure you get output!!!
```

# Curl (Against OpneSSL libs, above)
* Download Curl version 7.52.0 from https://github.com/curl/curl/releases (tar.gz) and scp to vrops system
  * Must be an older version to support the older verion of autoconf on SLES
```
tar -xzvf curl-*.tar.gz
cd curl/
./buildconf
./configure --prefix=/usr/local --with-ssl --disable-shared
make
make install
echo insecure >> $HOME/.curlrc
wget https://raw.githubusercontent.com/curl/curl/curl-7_53_0/lib/mk-ca-bundle.pl
perl mk-ca-bundle.pl -k
export SSL_CERT_FILE=`pwd`/ca-bundle.crt
echo "export SSL_CERT_FILE=`pwd`/ca-bundle.crt" >> ~/.bash_profile
cd ..
```

# Other libraries

```
curl -O https://zlib.net/zlib-1.2.11.tar.gz
tar -xzvf zlib-1.2.11.tar.gz
cd zlib-1.2.11/
./configure
make
make install
cd ..

curl -O https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz
tar -xzvf readline-7.0.tar.gz
cd readline-7.0/
./configure
make
make install
cd ..

```

# Real Python
* Only was able to get Python 3.6.1 to work (issue with CTypes on 3.7.x)
```
curl -O https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
tar -xzvf Python-3.6.1.tgz
cd Python-3.6.1/
./configure --enable-shared --prefix=/usr/local --exec-prefix=/usr/local
make
make install
```

# Pipenv for rest of environment buildout
```
pip3 install pipenv
```

repository: postnati/vropscli

repo_name: postnati/vropscli


text:
# CodingMonkey Bot (Python)

This version is fixing the connection issue in javascript version.

## Instruction

Bot backend is deployed on Heroku, so the backend can be running on cloud. In Procfile, it indicates the commands performed in server end.

If you want to run locally, the command should be:

```
$ python runBot
```

in root directory

repository: lovexi/CodingMonkey-Bot-Python-version

repo_name: lovexi/CodingMonkey-Bot-Python-version


text:
---
date: 2020-12-31 14:55:06
layout: post
title: "Runyon Canyon"
subtitle:
description:
image: ../assets/img/travel/feature_img/runyon_canyon.jpg
optimized_image: ../assets/img/travel/feature_img/opt_runyon_canyon.jpg
category: travel
tags:
  - travel
  - 1hikeaweek
author: mario
paginate: true
---

Hello! Another local hike across Hollywood to welcome a new hire at the company I am working at. The hike is called [Runyon Canyon Trail](https://www.alltrails.com/trail/us/california/runyon-canyon-trail) that is 2.7 miles with 748ft elevation gain.

First time hiking with coworkers and don't want to scare them off with 10+ miles hike :D. The hike is relatively chill and enjoying nature in the morning.

Somehow, there were places to take amazing pictures as shown below.

Not much to say about this place but many people come here to run or to stroll. My coworkers know the in and out of food around LA so we had brunch in a restaurant called [Republique](https://www.yelp.com/biz/republique-los-angeles-6).

Was it pricey? I think so. Was it good? Absolutely. Is it worth it? I think so too. The decoration and the quality of the food are good. I highly recommend coming here if you like brunch, especially after a hike. Inside the restaurant, you can take Insta-esque pictures.

I am not sure if the hike is enough to burn the calories consumed but it was worth it. Until next time, bye for now!


text:
Specifications
==============

Links to various specifications relevant to the project:

- [Extensible Markup Language (XML) 1.0 (Fifth Edition)](https://www.w3.org/tr/xml/)
- [Extensible Markup Language (XML) 1.1 (Second Edition)](https://www.w3.org/tr/xml11/)
- [Namespaces in XML 1.0 (Third Edition)](https://www.w3.org/tr/xml-names/)
- [XML Schema Part 0: Primer (Second Edition)](https://www.w3.org/tr/xmlschema-0/)
- [XML Schema Part 1: Structures (Second Edition)](https://www.w3.org/tr/xmlschema-1/)
- [XML Schema Part 2: Datatypes (Second Edition)](https://www.w3.org/tr/xmlschema-2/)
- [Simple Object Access Protocol (SOAP) 1.1](https://www.w3.org/tr/soap11/)
- [Simple Object Access Protocol (SOAP) 1.2 Part 1: Messaging Framework (Second Edition)](https://www.w3.org/tr/soap12-part1/)
- [Simple Object Access Protocol (SOAP) 1.2 Part 2: Adjuncts (Second Edition)](https://www.w3.org/tr/soap12-part2/)
- [Simple Object Access Protocol (SOAP) 1.2 Specific Assertions and Test Collection (Second Edition)](https://www.w3.org/tr/soap12-testcollection/)
- [Web Services Description Language (WSDL) 1.1](https://www.w3.org/tr/wsdl)
- [Web Services Description Language (WSDL) 2.0 Part 0: Primer](https://www.w3.org/tr/wsdl20-primer)
- [Web Services Description Language (WSDL) 2.0 Part 1: Core Language](https://www.w3.org/tr/wsdl20)
- [Web Services Description Language (WSDL) 2.0 Part 2: Adjuncts](https://www.w3.org/tr/wsdl20-adjuncts)
- [Web Services Description Language (WSDL) 2.0 Additional MEPs](https://www.w3.org/tr/wsdl20-additional-meps/)
- [Web Services Addressing 1.0 - Core](https://www.w3.org/tr/ws-addr-core/)
- [Web Services Addressing 1.0 - SOAP Binding](https://www.w3.org/tr/ws-addr-soap/)
- [Web Services Addressing 1.0 - WSDL Binding](https://www.w3.org/tr/ws-addr-wsdl/)
- [Web Services Architecture](https://www.w3.org/tr/ws-arch/)
- [Web Services Security 1.0](https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf)
- [Web Services Security 1.1](https://www.oasis-open.org/committees/download.php/16790/wss-v1.1-spec-os-SOAPMessageSecurity.pdf)

- [WSDL 1.1 Binding Extension for SOAP 1.2](https://www.w3.org/submission/wsdl11soap12/)

repository: soapteam/soapfish

repo_name: soapteam/soapfish


text:
# sysinfo

## Intro
sysinfo - reads various system information

## Description
The sysinfo() system call is used to retrieve various system information related to the system's current status. It returns, among other metrics, the amount of time in idle, system, user and iowait, as well as the number of running and total processes, and the total amount of free and available memory.

This system call provides a highly efficient and convenient way to quickly access many system metrics, making it useful for the monitoring of system performance. However, it is subject to TOCTOU (time of check, time of use) vulnerabilities, so it is important to take appropriate precaution when using it.

## Arguments
* `info`:`struct sysinfo*`[K] - A pointer to a struct sysinfo, which receives all the data accumulated by sysinfo.

### Available Tags
* K - Originated from kernel-space.
* U - Originated from user space (for example, pointer to user space memory used to get it)
* TOCTOU - Vulnerable to TOCTOU (time of check, time of use)
* OPT - Optional argument - might not always be available (passed with null value)

## Hooks
### sys_newstat
#### Type
kprobes + ftrace
#### Purpose
To measure the amount of time the system is in idle, user and system mode, as well as the amount of free and available system memory.

## Example Use Case
A system administrator could use this system call to measure and monitor the performance of their system in real-time.

## Issues
sysinfo() is subject to TOCTOU (time of check, time of use) vulnerabilities, so it is important to take appropriate precaution when using it.

## Related Events
* sys_exit - when this event is triggered, sysinfo can be used to provide a more accurate picture of the system's current performance.
* sys_fork - this event allows the user to measure the number of active processes in the system.

> This document was automatically generated by OpenAI and needs review. It might
> not be accurate and might contain errors. The authors of Tracee recommend that
> the user reads the "events.go" source file to understand the events and their
> arguments better.

repository: aquasecurity/tracee

gha_language: Go

repo_name: aquasecurity/tracee


text:
# NOT READY YET, JOEL

# A pre-Christmas Diet for Mojolicious

(image of a Christmas pudding with cream, maybe flaming)

You've just read
[How to lose Weight in the Browser](https://browserdiet.com)
and you want to know to slim down your Mojo app.

## Hypnotoad

No, it's not in here.  It can set the HTTP headers to turn it into a
[reverse proxy](https://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad)
, but a popular setup is sitting Hypnotoad behind Nginx or Apache/mod_proxy.
Those servers should let you play with the ```Expires``` header.

No, I didn't mention
[Plack](https://metacpan.org/pod/Plack).
Maybe if I'm good this year, Santa will tell me how I should be using it.
Probably something to do with
```
Plack::Response->header('Expires' => 'Tue, 25 Dec 2018 07:28:00 GMT');
```
but I wouldn't know.

## Mojo::Headers

Well, that was easy.  Just use
[Mojo::Headers](https://mojolicious.org/perldoc/Mojo/Headers#expires)
to set the ```Expires``` header.

But, wait!  That sets it for the page which isn't fat at all.
You only want to stop the javascript files from reloading every single time
and killing your mobile audience.

## ```defer``` and ```async```

tell your script to load after the main page
with
```
%= script defer
TODO check syntax
```

## but it needs to load **FIRST**!

Sigh - you _really_ want the world on a plate.

Well ... if you must, you'll need to install the
[StaticCache plugin](https://metacpan.org/pod/Mojolicious::Plugin::StaticCache)
written for you only last year by
[Luc Didry](https://fiat-tux.fr/).
It sets the ```Control-Cache``` header for all static files served by Mojolicious.
With your javascript and css files in the ```public``` directory,
they should only be downloaded once and use the cached version until it expires.
The default **max-age** is 30 days and
if you want you can even cache during development with ```even_in_dev => 1```.

## Try it out

The [Browser calories](https://github.com/zenorocha/browser-calories)
plugin for Firefox, Chrome and Opera breaks down the file sizes of your web page
into a nice little traffic light report measuring the HTML, images, CSS, JavaScript
and other parts of your page against
user-configurable limits on what you think is acceptable.

Google's [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
measures performance on both mobile and desktop.


text:
## Training and eval content

The directory contains:

1. **[/prod](https://github.com/searchisko/project-classifier-poc/blob/master/data/content/prod)**
directory: resources of the **classified categories**
as well as the randomly-sampled **None-category** content of 7500 docs from StackOverflow,
New York Times and Twitter. The resources has removed stopwords and numbers, persisted stemming.
These resources were used for training the **production service** model.

3. **[/none_content](https://github.com/searchisko/project-classifier-poc/blob/master/data/content/none_content)**
directory with sets of irrelevant documents used for performance evaluation
on negative data set (in analyses and when estimating the categories threshold).

4. **[/books_test](https://github.com/searchisko/project-classifier-poc/blob/master/data/content/books_test)**
directory with the preprocessed data set of books
from **developer.redhat.com/resources** used as experimental sample for classification of unclassified
content from developer.redhat resources, that the service is eventually expected to score and search in.

You can find the full relevant data set downloaded using the
[products_downloader](https://github.com/searchisko/project-classifier-poc/blob/master/data/products_downloader.py)
zipped in
[here](https://drive.google.com/open?id=0B_42L5-Ve7j2d3pTQm5kaUhlM28) (as on 07-2017).

repository: searchisko/project-classifier-poc

gha_language: Jupyter Notebook

repo_name: searchisko/project-classifier-poc


text:
---
title: "About Us"
permalink: /about-us/
layout: splash
header:
 overlay_color: "#616161"
 overlay_filter: "1"
excerpt: "Learn more about OpenPrinting"
---
## OpenPrinting

- [How did this all begin?](/history/)
- [Our principal achievements](/achievements/)
- [What we are currently doing](/current/)

## A Brief History

Before 2006, linuxprinting.org and Free Standards Group's OpenPrinting WorkGroup were working on the printing architecture for Linux. Till Kamppeter was the manager of linuxprinting.org and FSG's OpenPrinting WG was led by Tom Hastings, Michael Sweet, Ira McDonald, Claudia Alimpich, Glen Petrie, and Norm Jacobs. linuxprinting.org was known as the *de facto* standard repository for printer drivers on Linux. In parallel, FSG's OpenPrinting workgroup designed standard APIs for the Linux/Unix printing workflow.

In July 2006 linuxprinting.org merged with FSG's OP WorkGroup and Till Kamppeter was hired to lead OpenPrinting. On January 22, 2007, the FSG and the Open Source Development Labs(OSDL) merged to form **The Linux Foundation**. Now, OpenPrinting is a free software organization under The Linux Foundation.

## Major Roles

OpenPrinting
* Works on the development of new printing architectures, technologies, printing infrastructure, and interface standards for Linux and UNIX-style operating systems.
* Collaborates with IEEE-ISTO [Printer Working Group](http://www.pwg.org/) (PWG) on IPP projects.
* Is working with [SANE](http://www.sane-project.org/) to make driverless scanning a reality.
* Maintains [cups-filters](/achievements/#cups-filters) which allows CUPS to be used on any Unix-based (non-macOS) system.
* Is responsible for the [Foomatic database](https://openprinting.org/printers).
* Is working on the [Common Print Dialog Backends](/achievements/#common-print-dialog-backends) project.
* Takes care of integrating the printing infrastructure with all types of operating systems (classic distro, immutable distro, ...) and software distribution technologies ([Snap](https://snapcraft.io/), [Docker](https://hub.docker.com/), ...)

### Our Code of Conduct: [Code of Conduct](/codeofconduct/)


text:
!SLIDE
# Traditional MVC
## Model View Controller
### [http://st-www.cs.illinois.edu/users/smarch/st-docs/mvc.html](http://st-www.cs.illinois.edu/users/smarch/st-docs/mvc.html)

!SLIDE
# View
* Manages graphical output
* Designed to be nested
* Changes based on model
* Triggers controller actions

!SLIDE
# Controller
* Interprets user input
* Commands model and view to change
* 1 to 1 with views
* Communicates with other controllers

!SLIDE
# Model
* Manages behavior and data
* Responds to requests about state (from view)
* Responds to instructions to change state (from controller)


text:
# Client for [turbinehq.com](https://turbinehq.com) API

[turbinehq.com](https://turbinehq.com) is an online web app to manage purchase orders, expenses and time-off requests.

This package is a client for their API.

_Note: I am not affiliated with nor endorsed by [turbinehq.com](https://turbinehq.com)_

## Installation

`composer require stephanecoinon/turbine`

### Integration with Laravel

Although this package is vanilla PHP, it offers a Laravel service provider which
binds an authenticated `Turbine` instance in the container.

Laravel version >= 5.5 will discover the package and register the service provider
automatically.

Add these parameters to your `.env`:

```ini
TURBINE_EMAIL=your_email
TURBINE_PASSWORD=your_password
# Replace "yourcompany" below with your turbinehq subdomain:
TURBINE_URL=https://yourcompany.turbinehq.com/api/v1/
```

Add this `turbine` configuration key to your `config/services.php`:

```php
return [
    // ...

    'turbine' => [
        'email' => env('TURBINE_EMAIL'),
        'password' => env('TURBINE_PASSWORD'),
        'url' => env('TURBINE_URL'),
    ],

    // ...
];
```

## Usage in plain PHP

```php
<?php

use StephaneCoinon\Turbine\Exceptions\AuthenticationException;
use StephaneCoinon\Turbine\Turbine;

require 'vendor/autoload.php';

$turbine = new Turbine;

try {
<EMAIL_ADDRESS>'your_turbine_password');
} catch (AuthenticationException $e) {
    echo 'Login failed: ' . $e->getMessage();
    die();
}

// Login succeeded...

$employees = $turbine->employees(); // returns a Collection of Employee instances

```

## Usage in Laravel

You can resolve an authenticated instance of `\StephaneCoinon\Turbine\Turbine` out of
the container. And because the instance is already authenticated in the turbine API,
all you have to do is call one of the methods to fetch data from an API endpoint:

```php
use \StephaneCoinon\Turbine\Turbine;

$employees = app(Turbine::class)->employees();
```

or use the facade:

```php
use \StephaneCoinon\Turbine\Laravel\Facades\Turbine;

$employees = Turbine::employees();
```

## Tests

`./vendor/bin/phpunit`

## License

This package is open-sourced software licensed under the [MIT license](./LICENSE.md).

repository: stephanecoinon/turbine

repo_name: stephanecoinon/turbine