text:
yii2-dependencies
==================

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist kuaukutsu/yii2-dependencies "*"
```

or add

```
"kuaukutsu/yii2-dependencies": "*"
```

to the require section of your composer.json.

Usage
-------------

Add the following in config/console.php:

```php
    'controllerMap' => [
        'dependence' => [
            'class' => 'kuaukutsu\dependencies\DependenceController'
        ]
    ]
```

Configuration
-------------

To use this command, you should first create a configuration file to describe what asset bundles should be combined and how they should be grouped. You can use the ```dependence/template``` sub-command to generate a template first and then modify it to fit for your needs.
```bash
yii dependence/template dependence.php
```

The command generates a file named ```dependence.php``` in the current directory. The content of this file looks like the following:
```php
    <?php
    /**
     * Configuration file for the "yii dependence" console command.
     */

    // In the console environment, some path aliases may not exist. Please define these:
    //Yii::setAlias('@webroot', __DIR__ . '/../web');
    //Yii::setAlias('@web', '/');

    return [
        // Asset manager configuration:
        'assetManager' => [
            'basePath' => '@webroot/assets',
            'baseUrl' => '@web',
        ],
        // Dependence manager configuration:
        'dependenceManager' => [
            'configPath' => '@webroot',
            'namespaceAsset' => 'app\\assets\\',
        ],
        // The list of asset bundles to dependence:
        'task' => [
            'all' => [
                'src' => [
                    '@app/assets'
                ]
            ],
            'yii' => [
                'src' => [
                    'yii\web\YiiAsset',
                    'yii\grid\GridViewAsset',
                    'yii\captcha\CaptchaAsset',
                    'yii\validators\ValidationAsset',
                    'yii\widgets\ActiveFormAsset',
                    'yii\widgets\MaskedInputAsset',
                    'yii\authclient\widgets\AuthChoiceAsset',
                ],
                'exclude' => [
                    'jquery.pjax.js'
                ]
            ],
            'single-page' => [
                'src' => [
<EMAIL_ADDRESS>                ]
            ],
            'controller' => [
                'src' => [
<EMAIL_ADDRESS>                ]
            ],
        ]
    ];

```
You should modify this file and specify which bundles you plan to include in the file dependencies.

With the configuration file, you can run the ```dependence``` command to generate a new files dependencies<EMAIL_ADDRESS>and<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(```dependenceManager['configPath']``` + ```task['name'].json ```):
```bash
yii dependence dependence.php
```
The generated files contain a list of dependencies in json format. How to use it, see [Asset processing with Grunt](https://yii2-cookbook.readthedocs.org/structure-asset-processing-with-grunt/)


text:
# Turiknox Google Trusted Stores

## Overview

A simple Magento module that will allow you to integrate the Google Trusted Stores badge and order confirmation code.

Please note that the module does not support the optional Google Shopping parameters or the user defined badge position.

## Requirements

Magento 1.8.x, 1.9.x

## Installation

Prior to installing the module, ensure that compilation is disabled.

System -> Tools -> Compilation

Copy the contents into your Magento project directory and refresh the cache.

## Usage

System -> Configuration -> Google API -> Google Trusted Stores.

license: MIT

repository: cygnetic/magento-google-trusted-stores

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: cygnetic/magento-google-trusted-stores


text:
# smart-home-monitoring
Monitor your Smart Home, Home Server, Home Network devices and so on with influxdb, telegraf, mqtt and grafana and others

I have got a very basic smart home setup at home. FritzBox as VDSL2 modem, a HP MicroServer as Home Server, an Ubiquiti Edgerouter X-SFP as distribution an PoE Switch for various WiFi Hardware (Ubiquiti Unifi AC-Lite for home network) and maybe a Ubiquiti Unifi AP for Freifunk Hochstift in a later stage.

Now i want to add some temperatur sensors with ESP8266 and DHT22 from WeMos in the future, so i would need to have a logging chain and data visualisation backend for humidity and temperatur.

So for starters i am starting this config drop / howto space on github, so maybe someone finds it usefull or wants to add some improvemnets (MR/PR are verrrrry welcome)

This is how it looks like as of now (Jan 2017):

Ubiquiti Edgerouter X-SFP Data collected via Telegraf via SNMP)
![alt tag](https://github.com/northalpha/smart-home-monitoring/blob/master/img/EdgeRouterDashboard.png)

Home Server Data collected via telegraf directly
![alt tag](https://github.com/northalpha/smart-home-monitoring/blob/master/img/TelegrafDashboard.png)

Please see the Wiki here for more step by step HowTos, which is basically meant to be a runbook for me if i have to set it up again :)

Idea and based on (mainly:) https://lkhill.com/using-influxdb-grafana-to-display-network-statistics/ and https://www.dev-eth0.de/blog/2016/12/06/grafana_snmp.html

repository: northalpha/smart-home-monitoring

repo_name: northalpha/smart-home-monitoring


text:
# Chatangle

[![Greenkeeper badge](https://badges.greenkeeper.io/pRizz/Chatangle.svg)](https://greenkeeper.io/)

A free, decentralized, global chatroom, powered by the IOTA tangle. This must be run in conjunction with the [Chatangle Backend](https://github.com/pRizz/Chatangle-Backend).

# Usage
You must have a working [Chatangle Backend](https://github.com/pRizz/Chatangle-Backend) running.

You must set some environment variables before running. These may be set from an IDE.

```bash
CHATANGLE_BACKEND_IP=localhost
CHATANGLE_BACKEND_PORT=8008
IS_CHATANGLE_BACKEND_SECURED=false
```

`IS_CHATANGLE_BACKEND_SECURED` determines whether the front end connects with the WebSocket protocol, `ws`, or the Secure WebSocket protocol, `wss`.

Running in dev mode:

```bash
npm run dev
```

or

```bash
npm run start
```

# Serving Over the Web

You must have a working [Chatangle Backend](https://github.com/pRizz/Chatangle-Backend) running.

You must set some environment variables before running. These may be set from an IDE.

```bash
CHATANGLE_BACKEND_IP=localhost
CHATANGLE_BACKEND_PORT=8008
IS_CHATANGLE_BACKEND_SECURED=false
```

`IS_CHATANGLE_BACKEND_SECURED` determines whether the front end connects with the WebSocket protocol, `ws`, or the Secure WebSocket protocol, `wss`.

To create build files:

```bash
npm build
```

This will generate all needed files in `./dist` which may then be served over S3 or any webserver.

repository: pRizz/Chatangle

gha_language: Vue

gha_license_id: MIT

repo_name: pRizz/Chatangle


text:
# Guess-cartoon

Responsive Website Development and Design Capstone project on Coursera.org
---
Built with Meteor.

Install meteor from https://www.meteor.com/install

Unzip guess-cartoon-main.zip in your 'user directory'.

To load the project run in the command line(Windows) or terminal(Mac Os):

```
cd guess-cartoon-main

meteor npm install --save @babel/runtime

meteor

go to http://localhost:3000/ in your browser
```

Have Fun!!!

repository: yurinmilo/guess-cartoon

branch_name: refs/heads/main

repo_name: yurinmilo/guess-cartoon


text:
[TOC]

# Overview

## NumPy

### What is NumPy?

NumPy is a Python extension module that provides efficient operation on
arrays of homogeneous data. It allows Python to serve as a high-level
language for manipulating numerical data, much like for example IDL or
MATLAB.

### What is a NumPy array?

A NumPy array is a multidimensional array of objects all of the same
type. In memory, it is an object which points to a block of memory,
keeps track of the type of data stored in that memory, keeps track of
how many dimensions there are and how large each one is, and -
importantly - the spacing between elements along each axis.

For example, you might have a NumPy array that represents the numbers
from zero to nine, stored as 32-bit integers, one right after another,
in a single block of memory. (for comparison, each Python integer needs
to have some type information stored alongside it). You might also have
the array of even numbers from zero to eight, stored in the same block
of memory, but with a gap of four bytes (one 32-bit integer) between
elements. This is called striding, and it means that you can often
create a new array referring to a subset of the elements in an array
without copying any data. Such subsets are called views. This is an
efficiency gain, obviously, but it also allows modification of selected
elements of an array in various ways.

An important constraint on NumPy arrays is that for a given axis, all
the elements must be spaced by the same number of bytes in memory. NumPy
cannot use double-indirection to access array elements, so indexing
modes that would require this must produce copies. This constraint makes
it possible for all the inner loops in NumPy’s internals to be written
in efficient C code.

NumPy arrays offer a number of other possibilities, including using a
memory-mapped disk file as the storage space for an array, and record
arrays, where each element can have a custom, compound data type.

### What advantages do NumPy arrays offer over (nested) Python lists?

Python’s lists are efficient general-purpose containers. They support
(fairly) efficient insertion, deletion, appending, and concatenation,
and Python’s list comprehensions make them easy to construct and
manipulate. However, they have certain limitations: they don’t support
“vectorized” operations like elementwise addition and multiplication,
and the fact that they can contain objects of differing types mean that
Python must store type information for every element, and must execute
type dispatching code when operating on each element. This also means
that very few list operations can be carried out by efficient C loops –
each iteration would require type checks and other Python API
bookkeeping.

## SciPy

### What is SciPy?

SciPy is a set of open source (BSD licensed) scientific and numerical
tools for Python. It currently supports special functions, integration,
ordinary differential equation (ODE) solvers, gradient optimization,
parallel programming tools, an expression-to-C++ compiler for fast
execution, and others. A good rule of thumb is that if it’s covered in a
general textbook on numerical computing (for example, the well-known
Numerical Recipes series), it’s probably implemented in SciPy.

### What is the difference between NumPy and SciPy?

In an ideal world, NumPy would contain nothing but the array data type
and the most basic operations: indexing, sorting, reshaping, basic
elementwise functions, et cetera. All numerical code would reside in
SciPy. However, one of NumPy’s important goals is compatibility, so
NumPy tries to retain all features supported by either of its
predecessors. Thus NumPy contains some linear algebra functions and
Fourier transforms, even though these more properly belong in SciPy. In
any case, SciPy contains more fully-featured versions of the linear
algebra modules, as well as many other numerical algorithms. If you are
doing scientific computing with Python, you should probably install both
NumPy and SciPy. Most new features belong in SciPy rather than NumPy.

### Why both numpy.linalg and scipy.linalg? What’s the difference?

scipy.linalg is a more complete wrapping of Fortran LAPACK using f2py.

One of the design goals of NumPy was to make it buildable without a
Fortran compiler, and if you don’t have LAPACK available NumPy will use
its own implementation. SciPy requires a Fortran compiler to be built,
and heavily depends on wrapped Fortran code.

The linalg modules in NumPy and SciPy have some common functions but
with different docstrings, and scipy.linalg contains functions not found
in numpy.linalg, such as functions related to LU decomposition and the
Schur decomposition, multiple ways of calculating the pseudoinverse, and
matrix transcendentals like the matrix logarithm. Some functions that
exist in both have augmented functionality in scipy.linalg; for example
scipy.linalg.eig() can take a second matrix argument for solving
generalized eigenvalue problems.

# Basic Usage

## Axes

- `0`: (Oy axis) vertical axis
- `1`: (Ox axis) horizontal axis

## Shape

```python
>>>a = np.array([[1, 2], [3, 4], [5, 6]])
>>>a.shape
(3, 2)
>>>a.reshape(3, 2)
```

- numpy.reshape(a, newshape, order='C')
    + Gives a new shape to an array without changing its data
- numpy.size(a, axis=None)
    + Default: return total elements
    + axis = 0: # of rows
    + axis = 1: # of columns

## ndarray

- https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html

## What is the preferred way to check for an empty (zero element) array?

If you are certain a variable is an array, then use the size attribute.
If the variable may be a list or other sequence type, use len(). The
size attribute is preferable to len because:

```python
>>> a = numpy.zeros((1,0))
>>> a.size
0
>>> len(a)
1
```

## I want to load data from a text file. How do I make this code more efficient?

Use `numpy.loadtxt()`. Even if your text file has header and footer
lines or comments, loadtxt can almost certainly read it; it is
convenient and efficient.

If you find this still too slow, you can try Pandas (it has a faster csv
reader for example). If that doesn’t help, you should consider changing
to a more efficient file format than plain text. There are a large
number of alternatives, depending on your needs (and on which version of
NumPy/SciPy you are using):

- Text files: slow, huge, portable, human-readable; built into NumPy
- pickle: somewhat slow, somewhat portable (may be incompatible with
  different NumPy versions); built into NumPy
- HDF5: high-powered kitchen-sink format; both PyTables and h5py provide
  a NumPy friendly interface on top of the core HDF5 library written in
  C.
- FITS: standard kitchen-sink format in astronomy; the astropy library
  provides a convenient Python interface through its io.fits package.
- .npy: NumPy native binary data format, simple, efficient, portable;
  built into NumPy as of 1.0.5.

## What is the difference between matrices and arrays?

Note: NumPy matrices will be deprecated, do not use them for new code.

## How do I find the indices of an array where some condition is true?

The prefered idiom for doing this is to use the function numpy.nonzero()
, or the nonzero() method of an array. Given an array a, the condition
a>3 returns a boolean array and since False is interpreted as 0 in
Python and NumPy, np.nonzero(a > 3) yields the indices of a where the
condition is true.

## Repeat elements of an array

- numpy.repeat(a, repeats, axis=None)

https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.repeat.html

## Construct an array by repeating A the number of times given by reps

- numpy.tile(A, reps)

https://docs.scipy.org/doc/numpy/reference/generated/numpy.tile.html

# np.linalg

something

# scipy.linalg

something


text:
# Raspir
A simple Python library to detect IR receivers signal

### Installation
It's quite easy to start using this library.
You can download it by using `pip` / `pip3` package manager.

```
pip3 install raspir
```

After this, just import the library in your Python file:

```
from raspir import raspir
```

### Get started
To start using this library you should first configure it, you can setup your Raspir by using:

```
# GPIO.BOARD numeration used
raspir.setup(signalPin=YOUR_SIGNAL_PIN)
raspir.listen(YOUR_CALLBACK)
```

`raspir.setup(**values)` accepts more than one option, but I suggest you to don't edit other options if it's not necessary.

`raspir.listen(callback)` will call your callback by passing in the value received from your sensor.

#### Fast example

```
from raspir import raspir
raspir.setup(signalPin=3)
raspir.listen(print)
```

Now it will print every IR signal received by the sensor.

### Options
- defaultInput (default: 1)

It's the input that your Raspberry will usually receive when there's not an infrared light pointed to the sensor.

- defaultCycles (default: 10000)

When a signal is received, Raspberry doesn't know when signal transmission ends. So it will wait to receive the defaultValue so many times as much is written in defaultCycles value. If the script is not working you can try to change this value according to your CPU frequency.

- signalPin (default: False)

This value is required to start using the script.
It's the PIN number where Raspberry needs to listen for signal. It must be expressed as GPIO.BOARD number (not BCM!)

- divider (default: 1000)

It's used to mark some numbers as true or not. Change it only if your code is not working with default value. Changing this parameter will change the decoding process, so it will change the final result.

- floodInterval (default: 250)

It's the amount of milliseconds after receiving a signal in which Raspberry will consider all other signals received as a copy of the last one.

### How to contribute
- Open a new branch for every feature / fix you're coding!
- Take a minute to think what you're next to do
- Take another minute
- Just a little bit more..
- Now you're ready
- Write your feature and, if possible, test it on a Raspberry
- Make a pull request to this repository

repository: SyncroIT/Raspir

gha_language: Python

repo_name: SyncroIT/Raspir


text:
# Sphaeria hederae var. ilicis (Nees) VARIETY

#### Status
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Sphaeria hederae (Moug.) Sacc., 1883

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
Overview
========
P# is a framework that provides the capability of creating asynchronous state-machines, sending events from one machine to another, and writing assertions about system properties (both safety and liveness).

During testing, the built-in P# testing engine captures and controls all (implicit as well as specified) nondeterminism in the system, thoroughly explores the actual executable code to discover bugs, and reports fully-reproducible bug traces. A P# bug trace provides a global order of all events and transitions, and thus is easier to debug.

Getting started with P#
=======================
First, build P# from source, following the instructions [here](BuildInstructions.md), or install our latest [NuGet package](https://www.nuget.org/packages/Microsoft.PSharp/).

Next, learn about the different ways of using P# [here](Overview.md), and how to write your first P# program [here](WriteFirstProgram.md).

Now you are ready to dive into various features and topics:
- [Machine termination](Features/MachineTermination.md)
- [Specifying models and safety/liveness properties](Features/SafetyLivenessProperties.md)
- [Using async/await in a machine](Features/AsyncAwaitSupport.md)
- [Sharing objects across machines](Features/ObjectSharing.md)
- [Synchronous execution of machines](Features/SynchronousExecution.md)
- [Using timers in P#](Features/Timers.md)
- [Logging](Features/Logging.md) and [tracking operation groups](Features/TrackingOperationGroups.md)

Learn how to use the P# testing infrastructure to thoroughly check safety and liveness properties, and deterministically reproduce bugs:
- [Testing P# programs and reproducing bugs](Testing/TestingMethodology.md)
- [Effectively checking liveness properties](Testing/LivenessChecking.md)
- [Testing async/await code using P#](Testing/TestingAsyncAwait.md)
- [Code and activity coverage](Testing/CodeCoverageVisualisation.md)
- [Semantics of uncaught exceptions](Testing/UncaughtExceptions.md)

## Tools
The following provides information regarding the available tools in the P# ecosystem:
- [P# Compiler](Tools/Compiler.md)
- [P# Trace Viewer](Tools/TraceViewer.md)
- [P# Race Detector](Tools/RaceDetection.md)
- [P# Batch Tester](https://github.com/p-org/PSharpBatchTesting)

## Code editing
We provide support for editing the P# language syntax in Visual Studio:
- [Visual Studio Editing Support](CodeEditors/VisualStudioLanguageSupport.md)

## Samples and applications
We provide a collection of samples that show how to use the P# framework to build and systematically test asynchronous, event-driven applications. The P# samples are available in the Git repository, under the Samples directory. You can read more [here](https://github.com/p-org/PSharp/tree/master/Samples).

We have also used P# to test applications on top of Azure Service Fabric and Orleans:
- [Testing Azure Service Fabric Applications](https://github.com/p-org/PSharpModels)
- [Testing Microsoft Orleans Applications](https://github.com/p-org/PSharpModels)

## Publications
List of publications on P#:
- **[Lasso Detection using Partial-State Caching](https://www.microsoft.com/en-us/research/publication/lasso-detection-using-partial-state-caching-2/)**. Rashmi Mudduluru, Pantazis Deligiannis, Ankush Desai, Akash Lal, Shaz Qadeer . In *Formal Methods in Computer-Aided Design* (FMCAD), 2017.
- **[Uncovering Bugs in Distributed Storage Systems During Testing (not in Production!)](https://www.usenix.org/node/194442)**. Pantazis Deligiannis, Matt McCutchen, Paul Thomson, Shuo Chen, Alastair F. Donaldson, John Erickson, Cheng Huang, Akash Lal, Rashmi Mudduluru, Shaz Qadeer and Wolfram Schulte. In the *14th USENIX Conference on File and Storage Technologies* (FAST), 2016.
- **[Asynchronous Programming, Analysis and Testing with State Machines](https://dl.acm.org/citation.cfm?id=2737996)**. Pantazis Deligiannis, Alastair F. Donaldson, Jeroen Ketema, Akash Lal and Paul Thomson. In the *36th Annual ACM SIGPLAN Conference on Programming Language Design and Implementation* (PLDI), 2015.

## Contributing
To start contributing to P#, read our [contribution guidelines](Contributing.md).

## Contact us
If you are interested in using P# in your project, or have any P# related questions, please send us an<EMAIL_ADDRESS>or open a new [issue](https://github.com/p-org/PSharp/issues).

repository: fniksic/PSharp

repo_name: fniksic/PSharp


text:
# ROT1
Like _ROT13_ but _ROT1_.

## What?
A useless nonsensical tool that will do a binary rot1 on it's stdin, and output the result to stdout.  For example, the ASCII character `A` which is `0100 0001` in binary, will become `1011 1110`, which is `¥` (the yen character) in the extended ASCII table. Note that the output will likely not be valid ASCII, and you will likely need to base64 encode that output if you want to be able to copy/paste it somewhere, like in an email.

## Usage
To _encrypt_ using `rot1`
```bash
$ echo "My secret message" | rot1 | base64
sobfjJqcjZqL35KajIyemJr1
$ _
```

To _decrypt_ using `rot1`
```bash
$ echo "sobfjJqcjZqL35KajIyemJr1" | base64 -d | rot1
"My secret message"
$ _
```
## Warning: Extreme Danger!!
It you didn't get it yet, this tool is not a real encryption/decryption utility, it's a joke swing on the _ROT13_ substitution cypher, which is related to the [Caesar Cipher](https://en.wikipedia.org/wiki/Caesar_cipher). **It will not protect your data in any way whatsoever**.

license: Unlicense


text:
./install.sh # not install_all.sh

Troubleshooting
---------------

1. At Torch installation, if "bash install-deps" fails, see here

https://www.digitalocean.com/community/questions/package-install-mirror-failed-to-fetch-403-forbidden
http://www.upubuntu.com/2012/04/how-to-fix-this-error-e-unable-to-fetch.html

2. At thpp installation's build.sh, if error occurs at gtest-1.7.0.zip, see here
https://www.bountysource.com/issues/37422078-fail-build-gtest-1-7-0-zip-unavailable

3. At thpp installation, if error occurs at THTensor...
refer this!
https://github.com/codeVerySlow/thpp/commit/d9f982c68d7522db9e77e50d135eaa86d84bab85

repository: Nardien/fblualib

repo_name: Nardien/fblualib


text:
# check_os_release #

This is a Nagios/Icinga plugin to check if the currently installed operating system version is outdated. It checks whether the installed version is about to reach end-of-life or whether a newer release is available.

Currently only Debian and Ubuntu are supported.

Information about releases and end-of-life dates is retrieved from https://salsa.debian.org/debian/distro-info-data/ or (if `--localDID` is specified) from the /usr/share/distro-info directory, which is provided by the distro-info-data package.

## Requirements

* Python 3
* internet access (to download the latest release data); or a local up-to-date installation of distro-info-data package (specify `--localDID` parameter to use this)

## Usage ##
```
usage: check_os_release [-h] [-v] [--eolWarningDays DAYS]
                        [--eolCriticalDays DAYS] [--eolIgnore]
                        [--releaseWarningDays DAYS]
                        [--releaseCriticalDays DAYS] [--releaseIgnore] [--lts]
                        [--server] [--cacheDir CACHEDIR]
                        [--cacheExpiration DAYS] [--localDID]

Check whether OS release is outdated.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase output verbosity
  --eolWarningDays DAYS
                        set WARNING status if less than DAYS until end-of-life
                        (default: 30)
  --eolCriticalDays DAYS
                        set CRITICAL status if less than DAYS until end-of-
                        life (default: 7)
  --eolIgnore           ignore end-of-life
  --releaseWarningDays DAYS
                        set WARNING status if new release available for more
                        than DAYS (default: 0)
  --releaseCriticalDays DAYS
                        set CRITICAL status if new release available for more
                        than DAYS (default: 30)
  --releaseIgnore       ignore any new release
  --lts                 [Ubuntu] check only for LTS releases
  --server              [Ubuntu] check for server EOL dates
  --cacheDir CACHEDIR   optional directory where data files should be cached
                        (default: no caching)
  --cacheExpiration DAYS
                        for how many days should data files be cached
                        (default: 7)
  --localDID            use local distro-info-data, from /usr/share/distro-
                        info
```


text:
# Installation
> `npm install --save @types/rx-lite-experimental`

# Summary
This package contains type definitions for rx-lite-experimental (https://github.com/Reactive-Extensions/RxJS).

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/rx-lite-experimental

Additional Details
 * Last updated: Wed, 29 Mar 2017 22:28:10 GMT
 * Dependencies: rx-lite
 * Global values: none

# Credits
These definitions were written by Igor Oleinikov <https://github.com/Igorbek>.

repository: iteaky/random

gha_language: Java

gha_license_id: Unlicense

repo_name: iteaky/random


text:
## Hybrid-Compute-Python-Manage-VM Changelog

# 1.0.0 (2018-10-25)

*Features*
* Add sample for managing Virtual Machines using Python SDK for working with Hybrid clouds. Eg. Azure Stack


text:
# Outreach WG

Date: February 3, 2020

## Attendees
**Members:**
* @bnb
* @cruzerld
* @erickzhao
* @sofianguy
* @vertedinde
* @felixrieseberg
* @MarshallOfSound

## Agenda
* Contributor Training feedback
    * Keeley to send out today
* Thoughts on using Tweet together?
    * Tierney to set up a private repo for us
* Find outcomes of contributor training and post in channel:
    * Send up examples of new PRs submitted
        * https://github.com/electron/electron/pull/21897
        * https://github.com/electron/governance/pull/229
        * Electron Fiddle PRs
    * Postman and Dropbox joined QA working group
    * GitHub query for handles of all members who were there
    * One of the groups doesn't user GitHub; we may need to ask them directly.
* Hack Weeks: Are we still doing them? Can we invite contributor training members to them?
    * The issues for hack weeks are pretty hard, and space can be limited
    * Biggest challenge for training is getting space, and convincing people to spend time on it
    * We should do hack weeks again; just keep attendance low

## Followup
* Create search query for GitHub usernames (Tierney)
* Add GitHub handle question to survey (Keeley)

repository: electron/governance

gha_language: Shell

repo_name: electron/governance


text:
---
title: "Useful Links"
description: "Set of useful links for Enterprise Scale"
layout: single
draft: false
weight: 9
menu:
  side:
    parent: es
series:
 - es
---

## Enterprise Scale Docs

| Link | Description |
|---|---|
| <https://aka.ms/enterprisescale/overview> | Enterprise Scale Docs |

## ARM Deployment

This is the main Enterprise Scale repo with direct links to the three reference architectures.

| Link | Description |
|---|---|
| <https://aka.ms/enterprisescale> | Enterprise Scale repo|
| [...../docs/reference/wingtip](<https://github.com/Azure/Enterprise-Scale/blob/main/docs/reference/wingtip/README.md>) | Wingtip - core management groups and platform |
| [...../docs/reference/contoso](<https://github.com/Azure/Enterprise-Scale/blob/main/docs/reference/contoso/Readme.md>) | Contoso - core plus Azure vWAN |
| [...../docs/reference/adventureworks](<https://github.com/Azure/Enterprise-Scale/blob/main/docs/reference/adventureworks/README.md>) | AdventureWorks - core plus hub & spoke |

## Terraform

There are a number of choices with Terraform, with the official module, community modules and the aztfmod solution.

| Link | Notes |
|---|---|
| [Enterprise Scale Terraform module](https://registry.terraform.io/modules/Azure/caf-enterprise-scale/azurerm/latest) | Recommended, official, extensible archetypes |
| [Management Groups module](https://github.com/terraform-azurerm-modules/terraform-azurerm-management-groups) | Community module |
| [Policy Definitions module](https://github.com/terraform-azurerm-modules/terraform-azurerm-azopsreference) | Community module |
| [Subscription vending machine](https://github.com/terraform-azurerm-examples/terraform-enterprisescale-starter) | Example community templates and CI/CD pipeline |
| [CAF aztfmod repo](https://github.com/Azure/caf-terraform-landingzones) | Complete, opinionated, not 100% ES aligned |

## Azure Policy

The main repo, including built-ins, samples, community contributions and the Azure Policy definition and structure page.

| Link | Description |
|---|---|
| <https://github.com/Azure/azure-policy> | Azure Policy repo |
| [...../tree/master/built-in-policies](https://github.com/Azure/azure-policy/tree/master/built-in-policies) | - built-in Azure Policies |
| [...../tree/master/samples](https://github.com/Azure/azure-policy/tree/master/samples) | - Azure Policy samples |
| <https://github.com/Azure/Community-Policy/> | Community Policy repo |
| <https://aka.ms/policydef> | Azure Policy definition structure |

## AzOps

AzOps provides CI/CD pipeline to generate a repo of a configuration. Committed changes to the repo will then push creates, updates and deletes back into Azure.

* [Getting started with AzOps](https://github.com/Azure/Enterprise-Scale/blob/main/docs/Deploy/getting-started.md)
* [Set up AzOps CI/CD](https://github.com/Azure/Enterprise-Scale/blob/main/docs/enterprise-scale-iab/setup-git-cicd.md)


text:
---
title: About the aws_regions Resource
platform: aws
---

# aws\_regions

Use the `aws_regions` InSpec audit resource to test properties of some or all AWS regions in bulk.

Note that this resource lists all AWS regions that are currently available to the caller.

## Syntax

An `aws_regions` resource block uses an optional filter to select a group of regions and then tests that group.

    describe aws_regions.where { region_name: 'us-not-there-1' } do
      it { should_not exist }
    end

## Examples

The following examples show how to use this InSpec audit resource.

### Check for a Particular Region

    describe aws_regions do
      its('region_names') { should include 'eu-west-2' }
    end

### Check an endpoint exists

    describe aws_regions do
      its('endpoints') { should include 'ec2.eu-west-2.amazonaws.com' }
    end

### Use the regions resource to check single regions in more detail

    aws_regions.region_names.each do |aws_region_name|
      describe aws_region(region_name: aws_region_name) do
        it { should exist }
      end
    end

## Filter Criteria

This resource supports the following filter criteria:  `region_names` and `endpoints`. Any of these may be used with `where`, as a block or as a method.

## Properties

*  `region_names` - an array of aws_region name strings
*  `endpoints` - an array of aws_region url strings

## AWS Permissions

Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `ec2:DescribeVpcs` action with Effect set to Allow.

You can find detailed documentation at [Actions, Resources, and Condition Keys for Amazon EC2](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonec2.html).

repository: mcanevet/inspec-aws

repo_name: mcanevet/inspec-aws


text:
# wp-web-parser
An abstract web parser plugin for Wordpress. It works in tandem with child plugins, written with a specific web resource in mind. **Work in progress**.

## Usage
Although the name does not suggest so, this particular plugin does not do any parsing whatsoever. Instead it serves as a gateway for actual parsers to send their data to, after they're done gathering it. An example of a parser is in the `sample_parsers` directory.

## Installation
Put the contents into a directory `called entropi-web-parser` inside the `wp-content/plugins` directory. After that install the actual parser[s] plugin[s].

repository: slavicd/wp-web-parser

gha_language: PHP

repo_name: slavicd/wp-web-parser


text:
## Writing
Write shitty first drafts.

If you practice writing every day, it’ll come easy to get words on paper when you’re under pressure to complete a writing project.

Track your writing and progress, how many words? When do you write best at what time?

The more you write, the more you develop your style.

Use outlines (for hierarchy) and rewrite later. Reference notes and links instead of pasting their content.

Prepare Research First, Compile a Draft Second. A zettelkasten can help with your research.

Whatever you put in can be used at any later time. You won’t ever produce any waste during your research but instead expand your knowledge base without even trying to do so.

We don’t use the perfect words in a perfect matter – instead, we humans are messy and make mistakes all the time, so we need to clean up afterwards.

Finishing a writing project isn’t just about the typing. There is composing, and there is editing. I understand composing to be additive, that is, whenever you compose, you add new stuff to your text. Editing is mostly subtractive, though.

Publishing early and publishing often seems to be a good idea still.

repository: voightco/tyrell

repo_name: voightco/tyrell


text:
---
title: "Advanced FP for the Enterprise Bee: Typeclasses"
header-image: https://miro.medium.com/max/700/0*oOFUf_kkNWyHzS8Q.jpg
category: articles
tags: [core]
link: https://medium.com/google-developer-experts/advanced-fp-for-the-enterprise-bee-typeclasses-2addc232ae23
---

This fifth post in a series introduces advanced FP concepts via Kotlin and Arrow. This article introduces Typeclasses, and reviews a practical example of Typeclasses from the Arrow library.

repository: arrow-kt/arrow-media

gha_language: SCSS

gha_license_id: NOASSERTION

repo_name: arrow-kt/arrow-media


text:
Title: Assignment 1 - Approaching a community
Date: 2013-09-15 9:00
Category: assignment1
Slug: assign1
Tags: i290m-ocpp
Author: Seb
Summary: Details about our first assignment

*ASSIGNMENT 1: Report on your experience contacting and explaining your intention to contribute to the community. Did you follow a 'script'? Was it a formal or informal process? Did you face any barriers to participation? Do you think your experience was personal or general? Please include in your post links to opening conversations with the open project. Include any relevant mailing list posts, wiki edits, and forum/issue tracker contributions.*

To submit this assignment, please use a pull request.  Your assignment should be
a file in Markdown format with the file name "first initial-last name-hyphen-'assign1.md'".  For example, John Doe should put a file named `jdoe-assign1.md` into the `content/assignment1/` directory.

Note that blog posts in Pelican include metadata at the top of the file.
See [here](http://docs.getpelican.com/en/latest/getting_started.html#file-metadata) to learn more about Pelican content metadata.
You should fill out the `Slug` field with the same value as the filename, without the file extension.  E.g `jdoe-assign1`

Please give your post an accurate Date.  Tag your post with the name of your project.  For example, you might have `Tags: peerlibrary` in the header of your entry.

Include a link to the email archives of your project (or forum, if there are no email archives).  Ideally, you should post to the message you used to introduce yourself to the group.  If that is not appropriate for some reason, please provide the next best thing.  We are looking for evidence that you have identified the technical infrastructure of the project and used it to engage the community directly.

gha_language: TeX


text:
# Go SQL proxy driver

Go SQL proxy driver aimed for heavy write performance

Status: planning

## Goal

* Provide Go SQL proxy driver to handle multiple data sources, primarily for master-slave, master-master replication RMDBS (i.e., MySQL, PostgreSQL)
* Slave DB will be choosen by default for SELECT operation
* Async DB INSERT/UPDATE/DELETE operations for maximium write IO throughput

repository: sandeepone/gosqlproxy

repo_name: sandeepone/gosqlproxy


text:
# How to compile the player for Raspberry Pi from linux
The mqtt library is heavily-templated, and takes a lot of memory to compile (>1G) which does not work on RPI.
To compile the player for RPI, use cross compiltion from linux machine with enough memory:

## install

### install cross compiler package for armhf (beaglebone / raspberry-pi 32 bit)
`sudo apt install crossbuild-essential-armhf`

### install sshfs so we can mount the pi's filesystem to the PC
`sudo apt install sshfs`

## mount rpi fs to linux

SSHFS here will mount the raspberry pi (its root - /) to the local filesystem

### activate the mount
`sudo sshfs ${RPI_USERNAME}@${RPI_IP}:/ $MOUNT_POINT`
example: `sudo sshfs pi@<IP_ADDRESS>:/ /mnt/rpi`

if for some reason there's an issue with the mount - do: `ls -l /mnt` if you see a lot of '?????????' on /mnt/rpi then run: `fusermount -u /mnt/rpi`
and run the sshfs command again.

## compile the player on linux with RPI mount

1. clone the repository to a directory on RPI file system (using the mount, or directly).
2. then `cd` to the project directory on the mount fs, for example: `cd /mnt/rpi/home/pi/dev/wavplayeralsa`
3. create the cmake build directory: `mkdir build && cd build`
4. run camke with relevant toolchain camke file: `cmake -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_FILE ..` where $TOOLCHAIN_FILE should point to the `toolchain-armv7l.cmake` file from cross-compile directory in the project repo. note that this file assumes rpi mounting point is at `/mnt/rpi`.
5. `make -j2` the generated project.
6. the executable is now in the build directory on the rpi

repository: eranws/wavplayeralsa

repo_name: eranws/wavplayeralsa


text:
---
layout: default
---

# 1993-03-04 - Encrypted voice protocol?

## Header Data

From: Theodore Ts'o<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 6a5e82dcbb4bf809e7047e0aca353884a2f14a10b10ef58f9264cb708d7f2bb2

Message ID: \<9303041539.AA25836@SOS\>

Reply To: _N/A_

UTC Datetime: 1993-03-04 15:40:37 UTC

Raw Date: Thu, 4 Mar 93 07:40:37 PST

## Raw message

```
{% raw  %}From: Theodore Ts'o<EMAIL_ADDRESS>Date: Thu, 4 Mar 93 07:40:37 PST
To<EMAIL_ADDRESS>Subject: Encrypted voice protocol?
Message-ID: <9303041539.AA25836@SOS>
MIME-Version: 1.0
Content-Type: text/plain

People may find this very interesting.....  the Pro Audio Spectrum 16
soundboard can play and record sound at the same time; as far as I know,
this is the only commercially available board on the market that will do
this.  (Commercially available is important, because it means that
people would be able to purchase said board cheaply, or perhaps
alreadydy have.)

So for roughly $200 US, and a little software, it should be possible to
put together something that would do encrypted voice communications over
the network.  Is there any interest in developing some sort of standard
protocol and software to do encrypted, compressed voice communications
over TCP/IP?

I can think some obvious design constraints right away; it should be
device independent, which means it needs to be able to support multiple
sampling rates, and negotiate sampling rates, in case one side as a
limited range of sampling rates to choose from.  It should support both
multiple private and public key encryption algorithms, as well as
multiple choicese of compression technologies.  We'd probably want to
have a core set of algorithms that everyone would be expected to
support, for the sake of interoperability, and allow for people to
experment with more powerful encryption/compression techniquese.

And finally, for obvious reasons, at least one implementation should be
developed in a non-COCOM country.  :-)

Is this something that people would be interested in working on?

						- Ted

------- Forwarded Message

From: "Linux Activists"<EMAIL_ADDRESS>To: "Linux-Activists"<EMAIL_ADDRESS>Reply-To: "Linux-Activists"<EMAIL_ADDRESS>X-Note1: Remember to put 'X-Mn-Key: SOUND' to your mail body or header
Subject: Linux-Activists - SOUND Channel digest. 93-2-4-3:1
X-Mn-Key: SOUND
Sender<EMAIL_ADDRESS>Date: Thu, 4 Mar 1993 08:25:39 +0200

From<EMAIL_ADDRESS>(Hannu Savolainen)
Subject: Preliminary GUS driver available
Date: Thu, 4 Mar 1993 02:29:29 +0200

Hi folks,

There is a very early testing version of the GUS
(Gravis Ultrasound) driver available at

klingon.epas.utoronto.ca (the GUS archive site) in
directory pub/pc/ultrasound/submit.

This version contains a simple API which makes it possible to write
applications for GUS under Linux. Since there is no such applications
yet, this is just a hacker's release.

*** This is just a pre pre pre alpha version. I will release an official
version after a couple of months. The official and supported version is
1.0 which you propably have already ***

Additionally this version contains some changes for SB and PAS users. It
is for example possible to record and play at the same time with PAS16
(there is a new devicefile (/dev/dsp1 (minor 19)), whic is connected to
the SB DSP emulator of PAS.

......

------- End Forwarded Message

{% endraw %}
```

## Thread

+ Return to [March 1993](/archive/1993/03)

+ Return to "[Theodore Ts'o <tytso@Athena.MIT.EDU>](/authors/theodore_tso_tytso_at_athena_mit_edu_)"

+ 1993-03-04 (Thu, 4 Mar 93 07:40:37 PST) - Encrypted voice protocol? - _Theodore Ts'o<EMAIL_ADDRESS>


text:
# Python/OpenMDAO Install Notes

* Install Julia
* Create and activate a Python virtual environment. Install OpenMDAO,
  `matplotlib`, and all the other Python-related stuff with `pip`.
* `$ pip install julia`
* Open up a python prompt and do this:

  ```
  >>> import julia
  >>> julia.install()
  ```

  That gave a Julia error indicating that `PyCall` wasn't installed, and then
  installed it for me.

* Next check out `CCBlade.jl` from GitHub and install it from the Julia REPL
  (type `]` in the Julia REPL to get to the package manager prompt):

  ```
  $ julia
  pkg> develop <path/to/CCBlade.jl>
  ```

Now the Python scripts in `src/` work (just do `python
<path/to/script.py>`) provided that it can find the airfoil data file.


text:
# RobofontTools-scripts

Some scripts to use with [Robofont](http://robofont.com) font editor.

—

### select

Some scripts related to selecting and deselecting stuff.

**Groups to Selection** script thanks to Josep Patau ([Tipo Pepel](http://tipopepel.com)).

### tools

- **SpaceCenterKernCheck** is also a extension though I’m not sure if makes sense if you can simply run this script and get the same. Check the *ReadMe.md* file in its folder for info about what it does.

- **scriptRunner** allows to run a previously selected script from a button window. Useful if you run often a script and don’t want to loose time navigating the menu to find it each time.

—

All you find here is released under the [MIT license](http://opensource.org/licenses/MIT).

repository: casasin/RobofontTools

repo_name: casasin/RobofontTools


text:
---
layout: post
title: "The Problem With Lazy Evaluation"
published: true
categories: []

---

Imagine you have a landlord who collects your rent check and deposits it in a very unpredictable way. Sometimes he does it immediately. Sometimes he collects the checks for months before cashing them.

Initially you feel happy about this system because you get to live in your apartment without the money actually leaving your bank account. But soon you realize that the extra money is just a mirage. You can't plan how much money you need to have at any given time because your landlord may cash your checks right when you don't have the balance to back it.

This is the danger of lazy evaluation.


text:
[![Terraform](https://github.com/snowex-hackweek/jupyterhub/actions/workflows/Terraform.yml/badge.svg)](https://github.com/snowex-hackweek/jupyterhub/actions/workflows/Terraform.yml)
[![Helm](https://github.com/snowex-hackweek/jupyterhub/actions/workflows/Helm.yml/badge.svg)](https://github.com/snowex-hackweek/jupyterhub/actions/workflows/Helm.yml)

# JupyterHub for SnowEx Hackweek 2021
https://snowex.hackweek.io

### notes
This repository contains the infrastructure-as-code configuration for the SnowEx JupyterHub, if you're curious how this works, below are reference links to more thorough documentation:

  - https://github.com/pangeo-data/terraform-deploy/tree/master/aws-examples
  - https://zero-to-jupyterhub.readthedocs.io/en/stable/
  - https://pilot.2i2c.org/en/latest/admin/howto/replicate.html

repository: snowex-hackweek/jupyterhub

gha_language: HCL

repo_name: snowex-hackweek/jupyterhub


text:
\m/ Package Repository
===

Published under MIT license.

Variations: (\m/|Mini) (Phar|Package) Repository ;)

All you need is: static web-server as repository, cron (to generate global manifest) and Phar php extension.

Requirements:
 * PHP 5.4+
 * crond
 * any web-server for repository (static, no php required!)
 * Enabled Phar extension for PHP (`phar.readonly = Off` in php.ini)

Where is it would be helpful?
===

In big projects may be. You create many not big git repositories for libraries. For each small library!
Then you can use your packages in any project. Just `mpr init && mpr install my_mega_library` :)
And also if you use mpr you protecting your project from dummies, who like to change something not in repository!
Phar archives created by mpr is gzip compressed.

Installation
===

Server-side:
* Create new web host (e.g. http://mpr.greevex.ru)
* Modify your server-side config `/path/to/mpr/server/config.json`
* Enable to cron script `* * * * * /usr/bin/php /path/to/mpr/server/check.php`

Client-side:
* Modify your client-side config `/path/to/mpr/client/config.json`
* Enjoy!

Optional for easy use
```
* mkdir ~/bin
* echo '/usr/bin/php /path/to/mpr/client/mpr.run.php $*' > ~/bin/mpr
* chmod 0755 ~/bin/mpr
```

Usage
===

* `mpr init` - to initialize repository in current directory
* `mpr search <query>` - to search packages
* `mpr update` - update package list from server (auto-update every minute anyway)
* `mpr upgrade [package_name]` - update local package(s) to new version (if exists)
* `mpr install <package_name>` - to install package and dependencies
* `mpr remove <package_name>` - to remove package (Package dependencies would not be removed!)

Real usage example
===
```

[greevex@ironman ~]$ mkdir mpr-test
[greevex@ironman ~]$ cd mpr-test/
[greevex@ironman mpr-test]$ mpr init
[mpr] Initializing mpr repository...
[mpr] Repository was initialized! Now you can install packages!
[greevex@ironman mpr-test]$ mpr search lib
Update package list...
Receiving http://mpr.greevex.ru/manifest-global.mpr.json.gz...OK!
============================== | ========== | ============================================================
                        -NAME- |  -VERSION- |                                                -DESCRIPTION-
------------------------------ | ---------- | ------------------------------------------------------------
               restapi_service |        2.0 |                             RestAPI service (server) for SDS
          twitter_streamclient |        3.0 |      Client for Twitter Streaming API based on Phirehose lib
===== Total: 2 =============== | ========== | ============================================================
---
[greevex@ironman mpr-test]$ mpr install restapi_service
Searching package restapi_service...
Loading package list from cache. 52 seconds before next update.
Checking local packages...
Installing package...
=== Warning! ===
Package would not work without installed dependencies.
If you don't want to install dependencies you can not install this package!
Dependencies: grunge
Do you want to install all dependencies? [y/n]: y
Installing dependencies...
Checking grunge...
Searching package grunge...
Checking local packages...
Installing package...
Receiving http://mpr.greevex.ru/grunge/grunge.phar...OK!
Downloading content... [1903504 bytes]
Content downloaded to /home/greevex/mpr-test/grunge.phar!
Package installed!
Receiving http://mpr.greevex.ru/restapi_service/restapi_service.phar...OK!
Downloading content... [39260 bytes]
Content downloaded to /home/greevex/mpr-test/libs/restapi_service.phar!
Installed packages: grunge, restapi_service
[greevex@ironman mpr-test]$ tree .
.
|-- grunge.phar
`-- libs
    `-- restapi_service.phar

1 directory, 2 files

```

repository: infostars/mpr

repo_name: infostars/mpr


text:
# alpine-syncthing_relay

Custom alpine image in deploying syncthing relay node. If you want to contribute some bandwidth with the Syncthing project, this would be greatly appreciated.

This container is used to relay communications between two Syncthing peers that can't have a direct connection with each other.

## How to use

1. Copy the alpine-syncthing_relay.Dockerfile. Customize it as you see fit.
2. Build it by running this command.
```bash
buildah bud -f alpine-syncthing_relay.Dockerfile -t alpine-syncthing_relay .
```
3. Create named volume for this container. This is just to save private keys of your relay, but it's not really important though.
```bash
podman volume create alpine-syncthing_relay
```
4. Run the container. Don't adjust the ports, since those are the default ports used by Syncthing relay.
```bash
podman run --rm -a stdout -a stderr --name alpine-syncthing_relay -v alpine-syncthing_relay:/data -p 22067:22067 -p 22070:22070 alpine-syncthing_relay:latest
```
5. You can verify if your relay has joined the public relay lists by having this log on your log output.
```
pool.go:54: Joined https://relays.syncthing.net/endpoint rejoining in 48m0s
```
6. Once you verify is everything is working, run your container as a system service. This is to manage the container using systemd. One benefits of running it as a service is it's auto restart function.

## Contribution
I got the Dockerfile from [Kyle Manna's docker-syncthing-relay repository](https://github.com/kylemanna/docker-syncthing-relay).


text:
# React Weather App

Simple application for fetching weather data and displaying it using react and redux

### Getting Started

There are two methods for getting started with this repo.

#### To run

```
> npm install
> npm start
```

gha_language: JavaScript


text:
Behat-ExtensionDriverLocator
=========================
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tkotosz/behat-extension-driver-locator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/tkotosz/behat-extension-driver-locator/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/tkotosz/behat-extension-driver-locator/badges/build.png?b=master)](https://scrutinizer-ci.com/g/tkotosz/behat-extension-driver-locator/build-status/master)
[![Build Status](https://travis-ci.org/tkotosz/behat-extension-driver-locator.svg?branch=master)](https://travis-ci.org/tkotosz/behat-extension-driver-locator)

Behat-ExtensionDriverLocator helps you load external drivers/services (like image uploaders, output formatters, etc) dinamically.
The DriverLocator can find you a service in a preconfigured namespace by a given driverkey.
- It validates that the class implements the DriverInterface or your specific interface.
- It will call the configure method of the driver to get the config tree of the driver specific configurations
- It will validate the loaded config against the provided config tree.
- It will pass the valid config and the DI container to the load method of the driver in order to get a properly loaded service.
The package also provide a Driver Node Builder which can create the drivers node for your behat extension. (see usage below)

Installation
------------

Install by adding to your `composer.json`:

```bash
composer require --dev bex/behat-extension-driver-locator
```

Usage
-----

1. In your behat extension's configure method use the Driver Node Builder to build the drivers configuration node:

    ```php
        $driverNodeBuilder = DriverNodeBuilder::getInstance($driverNamespace, $driverParent);
        $driverNodeBuilder->buildDriverNodes($builder, $activeDriversNodeName, $driversCofigurationNodeName, $defaultDriverKeys);
    ```

    where:
    - the `$driverNamespace` is the namespace where the DriverNodeBuilder should look for the drivers when validating a given driver key
      e.g.: `My\\Awesome\\BehatExtension\\Driver`
    - the `$driverParent` is the parent class/interface which should be implemented by all driver
      e.g.: `My\\Awesome\\BehatExtension\\Driver\\MyAwesomeDriverInterface`
      (note that all driver need to implement the `Bex\Behat\ExtensionDriverLocator\DriverInterface`)
    - the `$builder` is an `Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition` instance which you get in your behat extension's configure method as a parameter, the DriverNodeBuilder will add the drivers node to this builder.
    - the `$activeDriversNodeName` is the name of the node where the user will be able to specify which driver should be used for your extension
      e.g.: `active_my_awesome_drivers`
    - the `driversCofigurationNodeName` is the name of the drivers node, the additional configuration of all driver will be under this node
      e.g.: `my_awesome_drivers`
    - the `$defaultDriverKeys` is the driverkey of the default driver(s) which will be used when the config is empty in the behat.yml
      e.g.: `first_awesomeness`
    - Note: The driverkey is always the lowercased and underlined version of the driver's classname.
      e.g. FirstAwesomeness -> first_awesomeness
      e.g. First -> first

    With the example configurations a valid config would look like this:
    ```yml
    default:
      extensions:
       My\\Awesome\\BehatExtension: ~
    ```
    or
    ```yml
    default:
      extensions:
       My\\Awesome\\BehatExtension:
         active_my_awesome_drivers: first_awesomeness
         my_awesome_drivers:
           first_awesomeness:
             # ... all driver specific configuration goes here ...
    ```

1. In your behat extension's load method use the Driver Locator to load the active driver(s):
Note that it will validate the driver specific configs automatically.

    ```php
        $driverLocator = DriverLocator::getInstance($driverNamespace, $driverParent);
        $drivers = $driverLocator->findDrivers($container, $activeDrivers, $driverConfigs);
    ```
    where:
    - the `$driverNamespace` is the namespace where the DriverLocator should look for the drivers
      e.g.: `My\\Awesome\\BehatExtension\\Driver`
    - the `$driverParent` is the parent class/interface which should be implemented by all driver
      e.g.: `My\\Awesome\\BehatExtension\\Driver\\MyAwesomeDriverInterface`
    - the `$container` is an `Symfony\Component\DependencyInjection\ContainerBuilder` instance which you get in your behat extension's load method as a parameter, the DriverLocator will pass this container to the load method of each driver
    - the `$activeDrivers` are the active image drivers from the $config param which you get in the load method
      e.g.: $config['active_my_awesome_drivers']
    - the `$driverConfigs` are the driver specific configuration values from the $config param
      e.g.: $config['my_awesome_drivers']

repository: tkotosz/behat-extension-driver-locator

repo_name: tkotosz/behat-extension-driver-locator


text:
# raspberry
This repository stores configuration files, resources and how-tos for setting up and using a Raspberry Pi (Model 3).

**This guide is primarily targeted to macOS users.**

## First setup
NOOBS is an operating system installation manager for the Raspberry Pi ([available for download here](raspberrypi.org/downloads)).

### Install NOOBS
Once you've downloaded the NOOBS zip file, you'll need to copy the contents to a formatted SD card on your computer:

1. Format your SD card with [SD Card Formatter](https://www.sdcard.org/downloads/formatter_4/), select the SD card volume and under `Quick format`, type `RASPBERRYPI`.
2. Unzip & copy the extracted files onto the root directory of the SD card:

        $ unzip NOOBS_v2_8_1.zip -d NOOBS/
        $ sudo cp -R NOOBS/* /Volumes/RASPBERRYPI/

3. Eject the SD card, it's ready for its first boot.

### Install Raspbian
When you boot the Raspberry Pi for the first time, choose Raspbian as the OS to install (it's pre-installed + really nice).

The install should take some time to complete (~30 minutes), and then you should be all set!

## Configuration
Configuring your Pi is a key part of insuring it is properly accessible and easily usable.

For info on how to configurate your Rasperry Pi, [checkout this guide](CONFIGURATION.md).

## Kodi
Kodi is media centre software which runs on Raspberry Pi.

For info on how to add Kodi to your Raspberry Pi, [checkout this guide](KODI.md).

## VNC
VNC is a graphical desktop sharing system used to remotely control another computer.

For info on how to add VNC to your Raspberry Pi, [checkout this guide](VNC.md).

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

repository: mehdibaha/raspberrypi

repo_name: mehdibaha/raspberrypi


text:
# Test-Driven Development

In this exercise, you will practice _Test-Driven Development_, TDD for short, in which tests help you write the code instead of only being a way to check code for correctness. The idea is simple:
- Before writing code, write tests for the simplest feature your code will have.
- Write code to makes the tests pass
- Write tests for the next feature
- Write code to makes these new tests pass
- ... and so on ...

This has multiple benefits:
- You are forced to think of what exactly your code should do, including edge cases, before you write the code. Thus, you cannot fall into the trap of simply writing one test per code path and forgetting about the paths that the code does not explicitly handle.
- You can get a feel for the API of the code you're writing. If writing the tests is painful, using the code outside of tests will probably be painful too.
- You work on less code at a time between testing phases, so it's easier to figure out which part of the code is responsible for test failures: the one you just wrote!
- Since you wrote the tests before the code, they are good examples of how the code should work, which can be useful to the rest of the team.

 Follow these steps:

- Create a class representing tickets.
  Tickets should have a category (Normal, VIP, ...), a location, and a music group associated with it.
  For simplicity, you can assume that music groups can be uniquely identified by their name.

- Create a class representing the actual shop. The shop should hold all currently available tickets and should allow the following operations:
  - You should be able to add new tickets to your shop.
  - You should be able to buy a ticket, given different requirements (the location/the group/the category or all of them).
  - You should be able to improve the category of any ticket (i.e., change its category to VIP)  given a special promotion campaign.
  - You should be able to change their ticket with an equivalent one (i.e., same group and category) in another given location, if available.
  - You should have a way to print nicely the currently available tickets.

Implement the shop using TDD. You are free to add any methods/classes that you like.

repository: CeliaBenquet/public

repo_name: CeliaBenquet/public


text:
# extract-quickmemo
Extract LG quickmemo note data to .txt files

I found myself wanting to transfer my notes from LG QuickMemo+ to another app.

Unfortunately I couldn't find a way of extracting that data cleanly from the app, so I wrote this.

# Install

**requires:** Python. Minimum version: 3.6

**if git:** *git clone https://github.com/rBrenick/extract-quickmemo*

**if manual:** download package zip and put it in some folder on disk.

# How To Use

1. Open the app and export the notes.

(Your app will probably be in english, but the buttons should be in a similar location)

![export note 1](docs/quickmemo_export.png)
![export note 2](docs/quickmemo_export_as.png)

2.

3. Put them in the 'quickmemo_lqm_files' folder.

4. Open Command Line in the folder

(you can quickly do so by typing **cmd** into the address bar of the folder)

![opening command line in folder](docs/quickmemo_start_command_line_in_folder.png)

5. Run this command: **python extract_files.py**

![opening command line in folder](docs/quickmemo_command_line_run.png)

# Result
.txt files with the note contents should be output into *extract_quickmemo\quickmemo_output*

repository: rBrenick/extract-quickmemo

repo_name: rBrenick/extract-quickmemo


text:
---
title: choice
description: choice validation  {{validatorType}}  will check whether the value entered is matching the properties defined.
author: rxcontributortwo
category: form-validations
type:tabs
linktitle: choice
---

# When to use
Suppose you want to create a employee form in which you want employee to enter value of a particular choice which contains fields like department, hobbies and skills.Here the field is taken in the form of array and according to that the choice is applied on the property by applying minlength and maxLength. Here depending upon the requirement these scenarios may arise.

The skills field in which you want the user to enter maximum three skills and minimum of one skill.

Apply choice validation based on matched condition in the form, like if the department  is ‘dotnet’ then the skills value should be maximum three and minimum one.

The Custom Message on Hobbies field.

    <data-scope scope="['decorator','validator']">

Apply choice validation dynamically based on server rules.

    </data-scope>

Let’s see how choice  {{validatorType}}  fulfil the need.

# Basic choice Validation
<data-scope scope="['decorator','template-driven-directives','template-driven-decorators']">
First we need to create a Employee Model and define a property of hobbies in the model to achieve the functional need of point 1.

</data-scope>
Through Angular FormBuilder service we create FormGroup in the component.
<data-scope scope="['decorator']">
Here we have covered Add and Edit form operations.
</data-scope>

<data-scope scope="['validator','template-driven-directives','template-driven-decorators']">
Here we have covered Add form operations.
</data-scope>

<data-scope scope="['decorator']">

Next, we need to write html code.

</data-scope>

<data-scope scope="['validator','template-driven-directives','template-driven-decorators']">

Next, we need to write html code.

</data-scope>

# ChoiceConfig
<data-scope scope="['decorator']">
Below options are not mandatory to use in the `@choice()` decorator. If needed then use the below options.
</data-scope>
<data-scope scope="['validator']">
Below options are not mandatory to use in the `RxwebValidators.choice()` validator. If needed then use the below options.
</data-scope>
<data-scope scope="['template-driven-directives','template-driven-decorators']">
Below options are not mandatory to use in the `choice` validation. If needed then use the below options.
</data-scope>

Option	Description

minLength	MinLength  is to define a minLength of field which is in form of array

maxLength	MaxLength  is to define a maxLength of field which is in form of array

conditionalExpression	Choice validation should be applied if the condition is matched in the `conditionalExpression` function. Validation framework will pass two parameters at the time of `conditionalExpression` check. Those two parameters are current `FormGroup` value and root `FormGroup` value. You can apply the condition on respective object value.If there is need of dynamic validation means it is not fixed in client code, it will change based on some criterias. In this scenario you can bind the expression based on the expression value is coming from the web server in `string` format. The `conditionalExpression` will work as same as client function.

message	To override the global configuration message and set the custom error message on respective FormControl

## minLength
Type :  `number`
minLength  is to define a minLength of field which is in form of array

## maxLength
Type :  `number`
maxLength number is for define a maxLength number of range

## conditionalExpression
Type :  `Function`  |  `string`

choice validation should be applied if the condition is matched in the `conditionalExpression` function. Validation framework will pass two parameters at the time of `conditionalExpression` check. Those two parameters are current `FormGroup` value and root `FormGroup` value. You can apply the condition on respective object value.
If there is need of dynamic validation means it is not fixed in client code, it will change based on some criterias. In this scenario you can bind the expression based on the expression value is coming from the web server in `string` format. The `conditionalExpression` will work as same as client function.

<data-scope scope="['validator','decorator']">
> Binding `conditionalExpression` with `Function` object.

</data-scope>

> Binding `conditionalExpression` with `string` object.

## message
Type :  `string`
To override the global configuration message and set the custom error message on respective FormControl

# Complete choice Example

This Complete choice example which includes all the ChoiceConfig properties will fulfil the requirement of scenarios 1, 2 and 3.

[!TabGroup]
# [Example](#tab\completeexample)

# [/Example]
<data-scope scope="['decorator','template-driven-directives','template-driven-decorators']">
# [Model](#tab\completemodel)

# [/Model]
</data-scope>
# [Component](#tab\completecomponent)

# [/Component]
# [Html](#tab\completehtml)

# [/Html]
***

<data-scope scope="['decorator','validator']">
# Dynamic choice Example

This Dynamic Choice example which execute based on json passed. conditional expression with function would be not apply in dynamic choice example.

[!TabGroup]
# [Example](#tab\dynamicexample)

# [/Example]
<data-scope scope="['decorator']">
# [Model](#tab\dynamicmodel)

# [/Model]
</data-scope>
# [Component](#tab\dynamiccomponent)

# [/Component]
# [Json](#tab\dynamicjson)

# [/Json]
# [Html](#tab\dynamichtml)

# [/Html]
***
</data-scope>

repository: azizkhani/rxweb

repo_name: azizkhani/rxweb


text:
Focus Points
=======

A plugin for Lightroom (on Mac) to show which focus point was active when the picture was taken.

Supported Cameras
--------
* Canon cameras with support for AF-Points position and size from the Exif fields when possible
* Nikon D7200
* Nikon D800
* Fuji cameras with support for face recognition when possible - Should work with all recent X bodies (X-T2, X-T1, X-T10, X-Pro2, X-Pro1, X-A3, X-A2, X-A1, X-A10, X-E2S, X-E2, X-E1, X100T, X30, X70, etc)
* Olympus cameras where 'AF Point Selected' appears in Metadata (Should work on recent E-* bodies)

Installing
--------
1. Use the green button in this webpage called "Clone or download".
2. Extract the zip and (optionally) rename the folder from "focuspoints.lrdevplugin" to "focuspoints.lrplugin"
3. Move this folder to where you'd normally kept your Lightroom plugins.
4. Open Lightroom and go to File -> Plug-in Manager. Then click the "Add" button and select the folder
5. Once installed, in Library mode with a photo selected go to "Library -> Plug-in Extras -> Focus Point"

Supported AF-Points
--------
Currently, 5 types of AF-points will be displayed :

*  The AF-Point is selected and in focus
*  The AF-Point is selected
*  The AF-Point is in focus
*  The AF-Point is inactive
*  A face was detected by the camera at this position

Please note that not all cameras save the needed information in the Exifs of the photo. Thus, the accuracy of the displayed points will greatly depend on whether or not your camera supports it.

Adding your own camera
--------
If you wish to contribute, this should be as painless as possible. You will need to map all of your camera's focus points to pixel coordinates. Refer to the "focus_points/nikon corporation/nikon d7200.txt" as an example.
```
-- 1st column
B1 = {810, 1550}
C1 = {810, 1865}
D1 = {810, 2210}

-- an so on
```
The best way I found to do this was to set up a ruler/tape measure, get out my camera and I took a photo at each of the focus points lining it up exactly with the 1-inch mark. I then imported those pictures into Lightroom and ran this plugin so I could see the metadata. From the metadata, I could see the focus points name. I then took the image into photoshop and measured from the top left corner of the image to the center of the focus point. I compared the preview from the camera to my photoshop selection and got as close as possible. Once you have done all of that, add the file to "focus_points/{camera_maker}/{camera_model}.txt" using all lowercase. Then all is done.

If 2 or more cameras share a common points mapping, then PointsRendererFactory will need to be updated to know this. For example, the D7200 and D7100 could share a common focus points map (I don't know). If they do, PointsRendererFactory can be updated in code. I would prefer not see copying and pasting of focus point files such as "nikon d7200.txt" and "nikon d7100.txt" containing the exact same info.

If adding a camera which does not needed mapped because the focus point is given dynamically (like Fuji) or is a pattern (like A7Rii), create a new {ModelName}Delegate.getDefaultAfPoints(photo, metaData) for the camera and dynamically return the correct x,y point for the selected autofocus. Update PointsRendererFactory to set this delegate method on the Renderer.

Known Issues
--------
1. Not currently working on Windows.
2. Lightroom has a bug where lrPhoto:getDevelopSettings()["Orientation"] always returns nil. Lightroom does not
track if you have rotated the photo in development. As such, if the photo was rotated, the focus point could be
wrong. The code attempts to resolve this, but it's only an attempt.
3. Not compatible if photo was edited in Photoshop. If the photo has been edited in Photoshop, the metadata in the photo telling the focus point was deleted. Perhaps in the future I can update the code to look for the original file and get the focus point from that.

TODOs
--------
 * check for "normal" to make sure the width is bigger than the height. if not, prompt
  the user to ask which way the photo was rotated
 * show ExifTool license in plugin

Contributing as a Developer
--------
Please see the Contributing.md file before being any new work.

License
--------

    Copyright 2016 Joshua Musselwhite, Whizzbang Inc.

    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:
---
layout: post
title: "Vietnamese guests can test drive VinFast Lux with foreign experts, partners of Ferrari, Rolls-Royce"
description: My Cars.
image: 'https://live.staticflickr.com/65535/48785561498_b947ced955_z.jpg'
category: ''
tags:
- NEWS CAR
introduction:

---
In order to refresh the test driving program for guests, VinFast chose to bring foreign experts to sit in the car with the experience. Those who come to try VinFast Lux A2.0 and Lux SA2.0 will be instructed by experts to test the performance of these high-end models.

Specifically, the new program launched by VinFast will take place in two big cities, Hanoi (September 26- September 29) and Binh Duong (October 4 to October 10). In Hanoi, the test drive place is in the Vinhomes Riverside ecological urban area, Long Bien district. Meanwhile, Dai Nam racetrack will be the place to try VinFast Lux cars in Binh Duong. Every customer can register for a test drive.

There are 3 test drives designed specifically for VinFast to experience the outstanding features of the Lux A2.0 and Lux SA2.0 models. The instructors are experts from PitCrew. This is a partner with many world famous brands such as Ferrari, Audi, Bentley, BMW, Mercedes-Benz or Rolls-Royce ...

Lux A2.0 has 2 engine options, both are 2-liter 4-cylinder engines but the output power varies, is 174 horsepower and 228 horsepower. SUV Lux SA2.0 only 228 horsepower engine. Rear-wheel drive is standard and optional AWD.

As expected, a total of 30 Lux A2.0 and Lux SA2.0 with all colors such as black, white, silver, gray, orange, brown, blue and red were brought to the event. Therefore, in addition to testing performance, Vietnamese customers can refer to the actual car model with a variety of paint colors to choose from.

Currently, VinFast Lux A2.0 and Lux SA2.0 are still in the process of booking customers. There are still many people waiting for their turn to take the car. These are the two most advanced models of VinFast so far. The price of Lux A2.0 is 990 million and Lux SA2.0 is 1,414 billion. This is the preferential price of VinFast.

gha_language: HTML


text:
# FUT Web App - TamperMonkey scripts

[![Join the chat at https://gitter.im/futwebapp-tampermonkey/Lobby](https://badges.gitter.im/futwebapp-tampermonkey/Lobby.svg)](https://gitter.im/futwebapp-tampermonkey/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This is a fork from the original repository here https://github.com/Mardaneus86/futwebapp-tampermonkey and updated for FIFA22.

FIFA 22's companion app for FIFA Ultimate Team, the FUT 22 Web App, is a website that let's you trade and manage your team on the go.

This TamperMonkey script is meant to enhance the FUT 22 Web App experience. You can install the script following the instructions below. Afterwards you will get a settings button on the bottom right of the web app, where you can enable every feature by itself. The script provides a certain degree of customization possibilities.

:warning: Using this script is at your own risk. EA might (temp-)ban you for altering parts of their Web App.

:bangbang: Do not request autobuyer features. Because they are considered to be cheating, it will not be added.

You can donate to the original creator for his hard work :beers: :+1:

[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/timklingeleers)

## Features
- [x] Futbin integration
  - [x] Show Futbin prices on all player cards throughout the app
  - [x] Show link to player on Futbin
  - [x] Mark bargains (BIN price lower then Futbin value)
- [x] Find minimum BIN value of players
- [x] Refresh transfer list
- [x] Increase transfer list size
- [x] Extra card information (contracts)
- [x] Total coin value for cards on the transfer list

## Installation
Make sure you have user scripts enabled in your browser (these instructions refer to the latest versions of the browser):

* Firefox - install [Tampermonkey](https://tampermonkey.net/?ext=dhdg&browser=firefox). :warning: Has issues loading properly (see issue #115)
* Chrome - install [Tampermonkey](https://tampermonkey.net/?ext=dhdg&browser=chrome).
* Opera - install [Tampermonkey](https://tampermonkey.net/?ext=dhdg&browser=opera).
* Safari - install [Tampermonkey](https://tampermonkey.net/?ext=dhdg&browser=safari).
* Dolphin - install [Tampermonkey](https://tampermonkey.net/?ext=dhdg&browser=dolphin).
* UC Browser - install [Tampermonkey](https://tampermonkey.net/?ext=dhdg&browser=ucweb).

### Install scripts
Install the scripts via [OpenUserJS][install-script]. Or find the latest version and release notes at the [releases page](https://github.com/djizus/futwebapp-tampermonkey/releases).

## Feature requests, Issues and Contribution
I don't plan to support this script regularly, you can still post in Issues and I may look into it.

[issue-list]: https://github.com/djizus/futwebapp-tampermonkey/issues
[install-script]: https://openuserjs.org/install/djizus/FUT_Enhancer.user.js

repository: saadmaluk/futwebapp-tampermonkey

repo_name: saadmaluk/futwebapp-tampermonkey


text:
# Lyophyllum leucocephalum (Bull.) Singer, 1943 SPECIES

#### Status
SYNONYM

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

#### Published in
Annls mycol. 41(1/3): 100 (1943)

#### Original name
Agaricus leucocephalus Bull., 1792

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Lyophyllaceae/Calocybe/Calocybe constricta/ Syn. Lyophyllum leucocephalum/README.md

repo_name: mdoering/backbone


text:
---
layout: component-detail
group: components

title: Buttons
description: A button is used to perform an action when the user clicks or touches it.
status: Beta

github_link: https://github.com/apluslms/a-plus-design-system/issues/1

variations:
- title: Button types
  description: There are three button styles with semantic meanings. Each view should have up to one "default" action and up to one "danger" action.
  pattern: buttons/button-types.html
- title: Sizes
  description: Sizes `-lg`, `-sm` and `-xs` are available for all buttons. These can be used to fit into the space available and the surroundings on the page. While these are _not_ Bootstrap buttons, the sizes are designed to match Bootstrap 3.
  pattern: buttons/button-sizes.html
- title: Assistive technology example
  description: If you have buttons which don't have unique text, but their purpose is clear in context (for example, they're inside table rows), use `.sr-only` to ensure they have discernable names for users of assistive technology.
  pattern: buttons/button-at.html
---

## General guidelines

Buttons should always perform an action. An action might be "log in", "submit (an exercise)" or "save and continue later".

Carefully limit the number of different styles visible to users to ensure that the impact of the special styles isn't diluted.

Note that you need to choose both a style and a size. Both must be declared as separate classes.

## Usage

| Button type     | Purpose                                                                          |
| --------------- |----------------------------------------------------------------------------------|
| Default         | Used at most once per "view" (see below). It should be the action we expect most users to use. |
| Danger          | Only for actions with serious, destructive effects. There should be very few of these (see below).  |
| Secondary       | All buttons which are neither "default" nor "danger"-styled.  |

Except where space is limited (for example, adding actions to rows of a table), stick to one size in one view.

The default action should never be smaller than secondary or danger actions, but may be the same size.

### What is a view?

In most cases, a view is one web page, but there might be some exceptions:

- A modal window is one view and is distinct from the page it is on top of.
- An embedded exercise is one view, providing is has a clear border.
- If a button is needed inside an accordion or other collapsible section, the whole page, as is visible at any time, is one view. This means two different accordion panels can both have default action buttons if, and only if, they cannot be open at the same time.

### What are "serious, destructive effects"?

A serious destructive effect is one which:

- **Removes something that is stored permanently** - cached data is temporary, so clearing a cache isn't removing anything stored permanently.
- **Removal can't be undone** - there's no way to quickly "undo" the action.

This means that _'log out'_, for example, should not have the danger style applied.

Very few, if any, student-facing interfaces need this style.

In general, a good pattern is to use a secondary button to start the deletion, then show a confirmation, for example, in a modal or on a new page, which includes the danger button.

Use these as sparingly as possible. If you need multiple in one view, use secondary buttons with a confirmation step.

## Labels

Button labels tell users what will happen when they click the button. Use verbs that describe the action, such as _'Add'_ or _'Delete'_. Use sentence-style capitalisation (only the first word in a phrase and any proper nouns capitalised) and no more than three words for button labels.

If there are many buttons on the same page (for example, the buttons perform an action on an item which is represented by a row of a table), ensure they have distinctive labels for assistive technology users. You can achieve this using an `.sr-only` class.

## Should it be a link?

Buttons should not be used as part of navigation. If clicking a button opens a new page without performing any action (and without starting an action, as in the "confirmation page" example), use a text link instead.

If something performs an action or starts an action, always use a button.

repository: apluslms/a-plus-design-system

repo_name: apluslms/a-plus-design-system


text:
# Up/down swap patch applied 'iperf'

Usually `iperf` client sends data to iperf server, which is uplink test. Upon client' request, this package makes the server send data back to the client in the same connection, which is downlink test.

In a nutshell, this is a package for download speed test, using `iperf`. It works on tcp or udp layer, not http layer.

The base code is from [iperf-2.0.5](http://sourceforge.net/projects/iperf/), and [update patch](http://www.loria.fr/~lnussbau/) provided by Lucas Nussbaum was applied.

```bash
$ ./configure
$ make
$ ./src/iperf
```

**`NOTE`** This project was prepared for my another project, [iperf-stress](https://github.com/appkr/iperf). This acts as a sub-module of that project.

license: NCSA

repository: appkr/iperf

repo_name: appkr/iperf


text:
# Tic Tac Toe implementation in Ruby

This is the Ruby implementation of the famous Tic-Tac-Toe game. It runs on the command line interface.

Check out [Problem #1 in The Odin Project](https://www.theodinproject.com/courses/ruby-programming/lessons/oop) for the problem definition.

## Getting Started

Clone this repository onto your local machine.

### Prerequisites

You need to have Ruby installed in your machine. For more instructions on this, please use [the official documentation](https://www.ruby-lang.org/en/documentation/installation/).

### Installing

Run the `install.sh` script with proper permissions.

`$ ./install.sh`

## Running the game

You can run the game by executing `ttt` from your command line interface

`$ ttt`

## Authors

[**Sava Vuckovic**](https://github.com/savavuckovic)

[**Kevin Wahome**](https://github.com/talihomz)

## License

This project is licensed under the MIT License


text:
# \<lit-state>

A lightweight state management with localstorage persistance.

## Installation
```bash
#npm i @danielturner/lit-state

```

## Usage
After adding lit-state to your application you need to replace LitElement
with LitState for *ANY* view that is going to be using or managing state.

Example:
```javascript
import { css, html } from 'lit-element';
import { LitState } from '../../lit-state/index.js';

export class TestState extends LitState {
```

Setting state in properties is your next step:
```javascript
  static get properties() {
    return {
      state: {
        type: Object,
      },
    };
  }
```
Note: Your properties *should* have more properties than state

Set the initial value for state in the constructor, don't forget to set
the keys you are interested in following for this view.

```javascript
  constructor() {
    super();
    this.state = {
      welcome: '',
      counter: 0,
    };
  }
```
Note: Your constructor most likely will have more than just state.

One place in your app (possible the app's shell) will control the state.
This element is the controller. Place it in your render method.
```html
      <lit-controller></lit-controller>
```
To initialize a value outside the constructor use the firstUpdated method
Calling the notify change triggers a state change across your app.

```javascript
  firstUpdated() {
    this.notifyChange('welcome', 'Welcome to state');
  }
```
State changes can be anything, and any time during your apps lifecycle.
```javascript
  __increment() {
    this.counter += 1;
    this.notifyChange('counter', this.counter);
  }
```
Or leverage the updated lifecycle.
```javascript
  updated(changeProperties) {
    changedProperties.forEach((oldValue, propName) => {
      console.log(`${propName} changed. oldValue: ${oldValue}`);
      this.notifyChange(propName, this[propName]);
    });
  }
```
LitState uses two events
*stateChanged*
and
*stateChangeRequest*

It is not recommended to use these to trigger updates.

## Configuration
If you want to use sessionStorage instead of localStorage to limit the
persistence to the session. Simply change the controller element in the render
method to the following.

```html
  <lit-controller sessionStorage>
```

## Reading state
Since you are using the this.state object and lit element updates are processed
as part of the normal lit-element lifecycle.
"LitElement-based components update asynchronously in response to observed
property changes..."
[Lit Element Lifecycle](https://lit-element.polymer-project.org/guide/lifecycle)

The short version is if you use

```javascript
  return html`
    <p>${this.state.message}</p>
  `
```
The DOM will automatically update when the state changes are detected.

## No, really reading state
If you want to load the state within an element and it is not simply to output
in a template, you might want to leverage the updated function from lit element.

[Lit Element Lifecycle](https://lit-element.polymer-project.org/guide/lifecycle#upated)

repository: DanielTurner/lit-state

repo_name: DanielTurner/lit-state


text:
---
title: Lab Session 10
date: 2021-03-24 11:00:00 +0100
categories: [Labs]
tags: [python, Levenshtein, nltk, xsltproc, xsl, xml, xslt, transformation]
pin: false
math: true
---

Today, we're going to finish up the curriculum tied to the section on Python programming in the course notes.
Then we're going to start with some XML processing using XSLT.

> PS: No labs will be held during the Easter, i.e week 13.
> There will be one more round of labs after Easter in order to finish the programming curriculum.

## Part 1: Wrapping up Python with a note on recursion

In order to understand the lecture notes on the
[Levenshtein function](https://lingkurs.h.uib.no/webroot/index.php?page=python/levenshtein&lang=en&course=ling123)
we first need to understand **recursion**, which is an important concept in computer programming.

Recursion is the process in which a function **calls itself**. That may sound confusing, but it's not that hard to grasp
once you see it in action. Let me give you an example.

If you've done any high school or college-level mathematics, you've probably heard of the *factorial*.
A factorial $$n!$$ is the product (the sum of multiplicating) all positive integers less than or equal to $$n$$.
For example, the factorial $$5!$$ is equal to $$5 * 4 * 3 * 2 * 1 = 120$$. The factorial of 1 is 1.

You may have noticed that $$5! = 5 * 4!$$,  and that $$4! = 4 * 3!$$, and so on until you get to $$1!$$ which is just 1.
The formula for calculating a factorial can therefore be stated as:

$$n! = n * (n - 1)!$$

Here, the factorial `n!` is defined *by itself*, which means that this formula uses recursion.
However, the formula doesn't really make sense unless we know that
$$1! = 1$$, or else it would just continue into the negatives and go on forever.

We can define our own factorial function recursively in Python like this:

```python
def factorial_recursive(n):
    if n == 1:  # base case
        return 1

    else:   # recursive case
        return n * factorial_recursive(n - 1)

print(factorial_recursive(5))
```

Executing the code above will output `120`, which is the correct answer for $$5!$$.
It's important to understand that when we call `factorial(n)` we will first have to run `factorial(n - 1)`
before being able to return `n * factorial_recursive(n - 1)`. This applies for all numbers, except for 1, which is the
**base case** (A.K.A the "terminating condition"). `factorial_recursive(5)` will therefore have to wait for
`factorial_recursive(4)` to finish before outputting the answer. Each time a recursive call results in an additional
function call, the first function will have to wait for the "newest" function to finish executing in order to know what
to return. The structure of how older recursive function calls have to wait for the newer function calls to finish
executing is often referred to the "call stack". A stack is a data structure in programming, but
it is intuitively the same as a stack of books. If you want to access the bottom book, you need to remove the books
on top first. Here's a visualization of the stack for our factorial function. Notice how each function call (except for
the last one) has to wait before knowing what to return.

![An example of recursion with the factorial function](/assets/img/lab-post-10/recursion-example.gif){: .center}
_An example of recursion with the factorial function_

Okay, so I hope that recursion makes a little more sense to you. You can always look up many more examples online,
like [this one](https://www.geeksforgeeks.org/recursion/) or
[this one](https://afteracademy.com/blog/what-is-recursion-in-programming). Now, let's move on to the Levenshtein function
from the lecture notes:

```python
def levenshtein_dist(string, target):
    if not string:
        return len(target)
    if not target:
        return len(string)

    if string[0] == target[0]:
        return levenshtein_dist(string[1:], target[1:])

    lins = levenshtein_dist(string, target[1:]) + 1
    lsub = levenshtein_dist(string[1:], target[1:]) + 1
    ldel = levenshtein_dist(string[1:], target) + 1

    return min(lins, lsub, ldel)

print(levenshtein_dist("fine", "fined"))
print(levenshtein_dist("aloud", "allowed"))
```

The program above lets us know that the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance)
between the words "fine" and "fined" is 1, which makes sense because you only need to append a single 'd' into the
last position of the word "fine" to get "fined". On the other hand, the
Levenshtein distance between "aloud" and "allowed" is three, because there are three steps needed to transform
"aloud" to "allowed":
  1. insert a second "l" between the "l" and the "o": `alloud`
  2. replace the "u" in the second to last index with a "w": `allowd`
  3. Insert an "e" between the "w" and the "d": `allowed`

So how does the code work? Well, it loops over the input string recursively and compares different parts of the input
string to different parts of the target string to find out whether it would be easiest to insert,
substitute or delete a character in order to get closer to the target string.
Let's go through the code and see what is going on. We'll start with the **base case**:

```python
def levenshtein_dist(string, target):
    # Recursion terminating conditions
    if not string:
        return len(target)
    if not target:
        return len(string)
```

There are two terminating conditions in the base case:
  1. `if not string` says that if the input string is empty, then the Levenshtein distance between the input string and
     the target string is simply the length of the target string.
  2. `if not target` is the same as `if not string`, only for an empty target string instead. The number of insertions needed
     to match an empty string is always equal to the length of the non-empty string.

Then there's the recursive case, which has two parts. The first part states that if the initial character of both strings
are the same, we can move right along and check the rest of the string.

```python
    if string[0] == target[0]:
        return levenshtein_dist(string[1:], target[1:])
```

In other words, if we run
`levenshtein_dist("pie", "pier")`, this part of the code will be executed exactly three times, as there are three
characters in the same position in both words.

Finally, there's the part where the function keeps track of the "cost" of the different operations to calculate
the Levenshtein distance. This is more similar to the example of the recursive factorial function at the beginning,
except that we're only adding numbers together instead of multiplying.

```python
    lins = levenshtein_dist(string, target[1:]) + 1
    lsub = levenshtein_dist(string[1:], target[1:]) + 1
    ldel = levenshtein_dist(string[1:], target) + 1

    return min(lins, lsub, ldel)
```

It is important to note that while the function always returns the minimum value of the cost for insertion,
deletion and substitution, when we check multiple characters in a row we can still use different operations in succession.
The point is that in the end, we'll have a series of numbers (only 1's in this case) we need to add together.
The sum we have at the end is the final output to the terminal.

If you find this hard to understand, don't worry. Everyone struggles with recursion the first time they learn about it.
Let me know if there's anything in particular you don't understand! And remember, the important part about recursion
is figuring out what the *base case*/*terminating condition* is. If a recursive function doesn't have a terminating
condition, well... It'll just run forever! (or at least until the Python maximum recursion depth limit is exceeded).

![A recursion meme](/assets/img/lab-post-10/recursion-meme.gif){: .center}

---

### Exercise 1.1: Minimum edit distance (Levenshtein)

The Levenshtein function uses the same cost of 1 for all edits. One could argue that a substitution is a combination of a
deletion and an insertion, so it should be more costly.
Change the program so that a substitution has a cost of 2, and test for different strings.

### Exercise 1.2: Recursive functions

a) Write a Python function that recursively reverses an input string.

b) Create a function that recursively counts the number of vowels in a string.

---

## Part 2: Introduction to XSLT

### Exercise 2.1: Filtering XML with XSLT
Look at the examples in the [lecture notes](https://lingkurs.h.uib.no/webroot/index.php?page=xml/xsl-filtering&lang=en&course=ling123).

a) Try formatting words and tags in other ways.

b) Try to reconstruct the plain text.

path: /_posts/2021-03-23-Lab Session 10.md


text:
# zkp-ecdsa

![NPM](https://img.shields.io/npm/v/@cloudflare/zkp-ecdsa?style=plastic) ![NPM](https://img.shields.io/npm/l/@cloudflare/zkp-ecdsa?style=plastic)

This is a TypeScript library for Zero-Knowledge proof for ECDSA signatures.

It enables proving knowledge of a ECDSA-P256 signature under one of many
public keys that are stored in a list.

## Installation

[![NPM](https://nodei.co/npm/@cloudflare/zkp-ecdsa.png)](https://www.npmjs.com/package/@cloudflare/zkp-ecdsa)

```sh
 $ npm install @cloudflare/zkp-ecdsa
```

## Usage

First, sign a message using ECDSA (P-256), then create a proof showing that the public key was used to sign the message and that key is in the list, but without revealing which key was used.

```ts
import {
    SignatureProofList, SystemParametersList, generateParamsList, keyToInt,
    proveSignatureList, verifySignatureList,
} from '@cloudflare/zkp-ecdsa'

// Message to be signed.
const msg = new TextEncoder().encode('kilroy was here');

// Generate a keypair for signing.
const keyPair = await crypto.subtle.generateKey(
    { name: 'ECDSA', namedCurve: 'P-256' },
    true,
    [ 'sign', 'verify'],
);

// Sign a message as usual.
const msgHash = new Uint8Array(await crypto.subtle.digest('SHA-256', msg));
const signature = new Uint8Array(
    await crypto.subtle.sign(
        { name: 'ECDSA', hash: 'SHA-256' },
        keyPair.privateKey, msg,
    )
);

// Add the public key to the list,
const testPubKey = await keyToInt(keyPair.publicKey);
const listKeys = [
    testPubKey, BigInt(4), BigInt(5), BigInt(6), BigInt(7), BigInt(8),
];

// Create a zero-knowledge proof of the signature.
const params = generateParamsList();
const proof = await proveSignatureList(
    params,
    msgHash,
    signature,
    keyPair.publicKey,
    0,
    listKeys
);

// Verify that zero-knowledge proof is valid.
const valid = await verifySignatureList(params, msgHash, listKeys, proof);
console.assert(valid)
```

---

## Usage

#### Building

```sh
 $ npm ci
 $ npm run build
```

#### Testing

```sh
 $ npm ci
 $ npm run build
 $ npm test
```

---

## Development

#### Benchmark

```sh
 $ npm ci
 $ npm run bench
```

#### Flamegraph

```sh
 $ npm ci
 $ npm run flame
```

#### Webpack

This package compiles to ESModules (instead of CommonJS).
Assumes webpack is installed.

```sh
 $ npm ci
 $ npm run build
 $ webpack --config webpack.config.cjs
```

#### Linter & Formatter

```sh
 $ npm ci
 $ npm run lint
 $ npm run lint:fix
 $ npm run format
```

---

### References

Proof using Groth-Kohlweiss: https://eprint.iacr.org/2014/764

#### Future Work / Possible enhancements
 - Accelerate verification in another language.

---

### License

[Apache 2.0](LICENSE.txt)

repository: marcellobardus/proof-of-membership

repo_name: marcellobardus/proof-of-membership