text:
# Building a Dynamic Progress Loader with Lottie

In this guide we will build a determinate progress loader with Lottie.
Determinate loaders are animations that show the progress of a download in real-time. Using Lottie's dynamic properties API we can change an animation while it plays it in response to a download progress.

![Boat_Loader_Animation](/images/Boat_Loader_Final.gif)

The final animation will be a boat rolling over the ocean, as the download reaches 100% the water will fill the screen. Once the download finishes a completion animation will play.

You can find the animation's After Effects file and Lottie JSON [Here](/AEP/Boat_Loader.zip)

## The Animation

This guide will not cover how to make an animation in After Effects, but we should know how the file we are working with is structured. The dynamic properties API in Lottie allows us to change the key-frame data backing a Lottie animation while the animation is playing. These animation properties match animation properties in After Effects.

![Boat_Loader_Comp](/images/Boat_Loader_Comp.png)

Our `Boat_Loader` animation has five layers in it: `Success`, `Boat`, `Chest`, `Fish` and `Bg`. Each of these layers have a number of properties we can change under `Transform`: `Position`, `Rotation`, `Scale`, `Opacity`. Some of these layers are a Precomp (Which stands for pre-composition); a layer that wraps another group of layers. We can even access the properties of a precomp's child layers if we would like. For this exercise we will just stick to moving the water and the boat.

![Boat_Loader](/images/Boat_Loader.gif)

Playing the animation as-is will animate the rolling waves for a second, then the waves disappear suddenly and the treasure chest opens. The animation has been built in two parts. The first half is a loop that will show the waves rolling forever. The second half is the success animation. Playing the animation from the end of a loop into the success animation is seamless. As the download progresses we want the water to fill the screen. We will need to manually move the waves up the screen by changing the `Wave` layer's `Position` property. Once the download is finished we will finish the current animation loop and then play the last half of the animation once to show the success.

## Getting Started

Let's start with some ground work. We need a new ViewController and a large download to track. Create a new UIViewController subclass, and import Lottie. In keeping with the maritime theme, the file we will be downloading is a 10mb oceanography map. Now lets create a network request to download our map.

####Swift:
```swift
var downloadTask: URLSessionDownloadTask?

func createDownloadTask() {
    let downloadRequest = URLRequest(url: URL(string: "https://upload.wikimedia.org/wikipedia/commons/f/ff/Pizigani_1367_Chart_10MB.jpg")!)
    let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main)

    downloadTask = session.downloadTask(with:downloadRequest)
    downloadTask!.resume()
 }
```
####Objective-C:
```objectivec
- (void)createDownloadTask {
  NSURLRequest *downloadRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://upload.wikimedia.org/wikipedia/commons/f/ff/Pizigani_1367_Chart_10MB.jpg"]];
  NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]
                                                        delegate:self
                                                   delegateQueue:[NSOperationQueue mainQueue]];
  _downloadTask = [session downloadTaskWithRequest:downloadRequest];
  [_downloadTask resume];
}

```

You will also need to make your view controller class adhere to the NSURLSessionDownloadDelegate protocol and add in the following stub methods.

####Swift:
```swift
class ViewController: UIViewController, URLSessionDownloadDelegate {
	func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {
	// Called when the download is finished.
  }

  func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) {
  	// Called as the download progresses.
  }
}
```

####Objective-C:
```objectivec
@interface LADownloadTestViewController () <NSURLSessionDownloadDelegate>

@end

- (void)URLSession:(nonnull NSURLSession *)session
      downloadTask:(nonnull NSURLSessionDownloadTask *)downloadTask
didFinishDownloadingToURL:(nonnull NSURL *)location {
	// Called when the download is finished.
}

- (void)URLSession:(NSURLSession *)session
      downloadTask:(NSURLSessionDownloadTask *)downloadTask
      didWriteData:(int64_t)bytesWritten
 totalBytesWritten:(int64_t)totalBytesWritten
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite {
	// Called as the download progresses.
}

```

## Building the UI
Now that we have our download task created, lets create the UI. We will need a single Lottie view for the animation, and a button to start the download. Add the animation's JSON [Boat_Loader.json](/AEP/Boat_Loader.zip) to the App bundle. Create the animation view, and set it to be a full-screen view.

####Swift:
```swift
private var boatAnimation: LOTAnimationView?

override func viewDidLoad() {
	super.viewDidLoad()

	// Create Boat Animation
	boatAnimation = LOTAnimationView(name: "Boat_Loader")
	// Set view to full screen, aspectFill
	boatAnimation!.autoresizingMask = [.flexibleHeight, .flexibleWidth]
	boatAnimation!.contentMode = .scaleAspectFill
	boatAnimation!.frame = view.bounds
	// Add the Animation
	view.addSubview(boatAnimation!)
}
 ```

####Objective-C
```objectivec
- (void)viewDidLoad {
	[super viewDidLoad];
	self.view.backgroundColor = [UIColor whiteColor];

	// Create Boat Animation
	_boatLoader = [LOTAnimationView animationNamed:@"Boat_Loader"];
	// Set view to full screen, aspectFill
	_boatLoader.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
	_boatLoader.contentMode = UIViewContentModeScaleAspectFill;
	_boatLoader.frame = self.view.bounds;
	// Add the Animation
	[self.view addSubview:_boatLoader];
}
```

Now add a button placed center in the screen that will start the download. Add this to the bottom of the `viewDidLoad` function. The button will need to call a function when pressed. Add the function that the button calls that will trigger the download.

####Swift:
```swift
override func viewDidLoad() {
    super.viewDidLoad()
    ...
	let button = UIButton(type: .system)
	button.setTitle("Start Download", for: .normal)
	button.sizeToFit()
	button.center = view.center
	button.addTarget(self, action: #selector(startDownload(button:)), for: .touchUpInside)
	view.addSubview(button)
}

@objc func startDownload(button: UIButton) {
    button.isHidden = true
    createDownloadTask()
}

 ```

####Objective-C
```objectivec
- (void)viewDidLoad {
	[super viewDidLoad];
	UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
	[button setTitle:@"Start Download" forState:UIControlStateNormal];
	[button sizeToFit];
	button.center = self.view.center;
	[button addTarget:self action:@selector(startDownload:) forControlEvents:UIControlEventTouchUpInside];
	[self.view addSubview:button];
}

- (void)startDownload:(UIButton *)sender {
  sender.hidden = YES;
  [self createDownloadTask];
}
```

##Making it all move

If you run the App now you should see a boat sitting on a wave. If you click on the download button the image will download, but the animation never plays. Boat_Loader_Props](Boat_Loader_Props.png)

First, let's look closer at the After Effects file. The animation has a layer named `Boat` which contains the boat and the rolling waves. We want to move this layer up the screen as the download progresses. We need to drive the position of the `Boat` layer with the progress of the download. Looking at the After Effects file we can see that the property we want to change is `Boat.Transform.Position` In order to change an animation we need two things. A `LOTKeypath` and a `LOTValueDelegate`.

A `LOTKeypath` is used to match views inside of a LOTAnimation to their counterparts in After Effects. Properties in After Effects are nested (Layer -> Objects -> Animatable Properties). `LOTKeypath` is used to search through the animation data to find the properties to change. They can be constructed explicitly ("Circle Layer.Circle Shape.Fill.Color") or with wild-cards ("\*\*.Fill.Color" will find all color properties belonging to objects named `Fill`). For more information see the documentation for `LOTKeypath`.

`LOTValueDelegate` is a protocol that is called for a specific keypath as an animation plays. It can override the keypath's data by returning new data for the keypath. There are several subclasses of `LOTValueDelegate`, one for each primitive type: Color, Number, Point, Size, and Path. There are also pre-built objects that adhere to `LOTValueDelegate` to perform basic animation driving functions. The pre-built objects come in three flavors each with subclasses for each primitive: `LOTValueCallback`, `LOTBlockCallback`, `LOTInterpolatorCallback`. For this excercise we will use a `LOTInterpolatorCallback`. For more information see the documentation for `LOTValueCallback`, `LOTBlockCallback`, `LOTInterpolatorCallback`.

Lets set up our `LOTInterpolatorCallback`. A `LOTInterpolatorCallback` contains a `startPoint`, an `endPoint`, and a `currentProgress` property. As the `currentProgress` property is driven from 0 to 1, the interpolator will move the animation property specified by the keypath from the `startPoint` to the `endPoint`. We will want the boat layer to move from the center of the screen up one entire screen height. Its important to note that Lottie maintains a weak reference to any delegate added. The view controller will hold the interpolator since it needs to make changes as the download progresses.

Dynamic properties work in the animation's coordinate space, so we will have to convert the screen coordinates into the `Boat` layer coordinates using the `convertPoint:toKeypathLayer` function on `LOTAnimationView`. This function finds the layer at the specified keypath and converts the given point from the animation's parent view coordinate space into the layers coordinate space.

Add this at the bottom of `viewDidLoad`.

####Swift:
```swift
// The center of the screen, where the boat will start
let screenCenter = CGPoint(x:view.bounds.midX, y:view.bounds.midY)
// The center one screen height above the screen. Where the boat will end up when the download completes
let offscreenCenter = CGPoint(x:view.bounds.midX, y:-view.bounds.midY)

// Convert points into animation view coordinate space.
let boatStartPoint = boatAnimation!.convert(screenCenter, toKeypathLayer: LOTKeypath(string: "Boat"))
let boatEndPoint = boatAnimation!.convert(offscreenCenter, toKeypathLayer: LOTKeypath(string: "Boat"))

// Set up out interpolator, to be driven by the download callback
positionInterpolator = LOTPointInterpolatorCallback(from: boatStartPoint, to: boatEndPoint)
 ```

####Objective-C
```objectivec
// The center of the screen
CGPoint screenCenter = CGPointMake(CGRectGetMidX(self.view.bounds), CGRectGetMidY(self.view.bounds));
// The center one screen height above the screen.
CGPoint offscreenCenter = CGPointMake(screenCenter.x, -screenCenter.y);

LOTKeypath *boatKeypath = [LOTKeypath keypathWithString:@"Boat"];

// Convert points into animation view coordinate space.
CGPoint boatStartPoint = [_boatLoader convertPoint:screenCenter toKeypathLayer:boatKeypath];
CGPoint boatEndPoint = [_boatLoader convertPoint:offscreenCenter toKeypathLayer:boatKeypath];

// Set up out interpolator, to be driven by the download callback
_positionInterpolator = [LOTPointInterpolatorCallback withFromPoint:boatStartPoint toPoint:boatEndPoint];

```

Now that we have a `_positionInterpolator` lets set it on the `Boat.Transform.Position` property of animation view and tell the animation view to loop the first half of the animation.

####Swift:
```swift
// Set the interpolator on the animation view for the Boat.Transform.Position keypath.
boatAnimation!.setValueDelegate(positionInterpolator!, for:LOTKeypath(string: "Boat.Transform.Position"))

//Play the first portion of the animation on loop until the download finishes.
boatAnimation!.loopAnimation = true
boatAnimation!.play(fromProgress: 0,
                    toProgress: 0.5,
                    withCompletion: nil)
 ```

####Objective-C
```objectivec
// Set the interpolator on the animation view for the Boat.Transform.Position keypath.
[_boatLoader setValueDelegate:_positionInterpolator forKeypath:[LOTKeypath keypathWithKeys:@"Boat", @"Transform", @"Position", nil]];

//Play the first portion of the animation on loop until the download finishes.
_boatLoader.loopAnimation = YES;
[_boatLoader playFromProgress:0 toProgress:0.5 withCompletion:nil];
```

Now, if you run the App you should see the boat moving over the waves indefinitely. If you press the download button, the boat will continue to move over the waves but nothing else happens. We need to hook the download progress up to the `_positionInterpolator` in the request's delegate callback.

####Swift:
```swift
func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) {
    positionInterpolator?.currentProgress = CGFloat(totalBytesWritten) / CGFloat(totalBytesExpectedToWrite)
}

 ```

####Objective-C
```objectivec
- (void)URLSession:(NSURLSession *)session
      downloadTask:(NSURLSessionDownloadTask *)downloadTask
      didWriteData:(int64_t)bytesWritten
 totalBytesWritten:(int64_t)totalBytesWritten
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite {
  _positionInterpolator.currentProgress = (CGFloat)totalBytesWritten / (CGFloat)totalBytesExpectedToWrite;
}
```

Run the App and press download. You should see the water filling the screen as the download progresses! Fantastic! We're almost done! When the download finishes the animation should play through the current loop, then play the last half of the animation, which will notify the success of the download.

  Reset sped to 1 and play through the completion animation.
    _boatLoader.animationSpeed = 1;
    [_boatLoader playToProgress:1 withCompletion:nil];
  }];
}
```

Run the App, and now you should see the completion animation!

##Conclusion

Hopefully this has shown some of the power of dynamic properties with Lottie! This is only a small example of what can be achieved. Read the documentation on dynamic properties to see what else you can do. Happy animating!

repository: hackjutsu/lottie

repo_name: hackjutsu/lottie


text:
This is a collection of scripts for tagging components on AWS without having to go through the web UI

## Setup

Virtualenv:
```
virtualenv venv
. venv/bin/activate
```

Then install requirements:
```
pip install -r requirements.txt
```

## Example usage

```
$ ./tag_instance.py --region us-east-2 --instanceid i-0aa25268495ea9c0c --verbose
Current tags:
Lifecycle: 20210201
Owner: John Kinsella
Name: website
Jira:
Department: dept
Email<EMAIL_ADDRESS>
Updated tags (may have duplicates - AWS will dedupe):
Lifecycle: 20191101
Owner: John Kinsella
Name: website
Jira:
Department: dept
Email<EMAIL_ADDRESS>Owner: John Kinsella
Email<EMAIL_ADDRESS>Department: dept
Lifecycle: 20210201
Jira:

Updating...
Done.
```

repository: jlk/aws-tagger

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: jlk/aws-tagger


text:
---
id: t1
title: Joining Nimbus Testnet1
---

Testnet1 is a cutting edge highly breakable in-flux testnet we use to test new features. If you do join, please [take the time to report any bugs](https://github.com/status-im/nim-beacon-chain/issues).

## Joining Nimbus Testnet 1

Before following the instructions below, please make sure you have Go installed. Follow [official instructions](https://golang.org/doc/install) and make sure it's above version 1.12. This is required because we build the Libp2p Go daemon. You also need `git-lfs` installed - on Windows that's a command documented below, on other operating systems it can be installed using your system's package manager (e.g. `sudo apt-get install git-lfs`).

```bash
git clone https://github.com/status-im/nim-beacon-chain
cd nim-beacon-chain
git fetch
git checkout devel
make update

# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
# >>> WINDOWS ONLY <<<

make clean-testnet1 testnet1
./scripts/testnet1.sh
```

Your node should be connecting to others now:

```bash
DBG 2019-07-12 09:39:47+02:00 UPnP                                       topics="nat" tid=8215 msg="Internet Gateway Device found but it's not connected. Trying anyway."
DBG 2019-07-12 09:39:47+02:00 UPnP: added port mapping                   topics="nat" tid=8215 externalPort=9100 internalPort=9100 protocol=TCP
DBG 2019-07-12 09:39:47+02:00 UPnP: added port mapping                   topics="nat" tid=8215 externalPort=9100 internalPort=9100 protocol=UDP
INF 2019-07-12 09:39:47+02:00 Starting the LibP2P daemon                 tid=8215<EMAIL_ADDRESS>hostAddress=/ip4/<IP_ADDRESS>/tcp/9100 keyFile=/home/swader/.cache/nimbus/BeaconNode/testnet1/privkey.protobuf
INF 2019-07-12 09:39:48+02:00 Connecting to bootstrap nodes              tid=8215 bootstrapNodes="@[{PeerID: '12D3KooWQmdmkcSdRaeLy8dMf9mCMeakJtxgHfX5qGAfqmvu7wTX' Addresses: ['/ip4/<IP_ADDRESS>/tcp/9100']}]"
DBG 2019-07-12 09:39:49+02:00 Peer connected. Initiating sync            tid=8215 bestSlot=0 peer=12*vu7wTX remoteBestSlot=4552
DBG 2019-07-12 09:39:49+02:00 Waiting for block headers                  tid=8215 fromPeer=12*vu7wTX peer=12*vu7wTX remoteBestSlot=4552
DBG 2019-07-12 09:39:51+02:00 Block headers received. Requesting block bodies tid=8215 peer=12*vu7wTX
DBG 2019-07-12 09:39:57+02:00 Block received                             tid=8215 blck="(slot: 16, parent_root: \"4EDB527C\", state_root: \"27EEB0FE\", proposer_slashings_len: 0, attester_slashings_len: 0, attestations_len: 0, deposits_len: 0, voluntary_exits_len: 0, transfers_len: 0, signature: \"b5dbe5e4\")" blockRoot=76BE6B5D
DBG 2019-07-12 09:39:57+02:00 Advancing state with empty slots           tid=8215 stateSlot=0 targetSlot=15
INF 2019-07-12 09:39:57+02:00 Block resolved                             tid=8215 blck="(slot: 16, parent_root: \"4EDB527C\", state_root: \"27EEB0FE\", proposer_slashings_len: 0, attester_slashings_len: 0, attestations_len: 0, deposits_len: 0, voluntary_exits_len: 0, transfers_len: 0, signature: \"b5dbe5e4\")" blockRoot=76BE6B5D justifiedRoot=4EDB527C justifiedSlot=0
DBG 2019-07-12 09:39:57+02:00 Block received
```

license: MIT

repository: status-im/nimbus-site

branch_name: refs/heads/develop

gha_language: SCSS

gha_license_id: MIT

repo_name: status-im/nimbus-site


text:
# Getting Started with OpenTelemetry .NET for Metrics in 5 Minutes

## IMPORTANT NOTE

Metrics API and SDK is in alpha/experimental stage, and are not recommended for
any production use. Both the API, and SDK implementation is subject to
significant changes.

Please check the [Metric support
plan](https://github.com/open-telemetry/opentelemetry-dotnet/issues/1501).

## Sample usage

Check
[TestPrometheusExporter.cs](../../examples/Console/TestPrometheusExporter.cs)
for an example usage of currently implemented Metrics API/SDK along with
Prometheus exporter.

repository: victlu/opentelemetry-dotnet

repo_name: victlu/opentelemetry-dotnet


text:
# inference.py

This program can be used to run inference on a set of images and produce a file detailing the results. By default, the
program is configured to execute inference in the standard TensorFlow environment, but can be readily changed to use a
different inferencing platform. Please see the source code for details.

### Usage

To use, run the python script with the desired arguments specified. The script will produce two JSON files with the
results: `results.json`, which has the inference results, and `imgIds.json`, which is a list of the image IDs used.

The list of image IDs needs to specified because the COCO evaluator assumes it should evaluate the model over all images
by default, which may not be the case for the provided set of images.

### Arguments

`--dir (-d)` - Specifies the directory containing the images.

`--model (-m)` Path to machine learning model. See [inference_clients](inference_clients.md) for more information.

`--limit (-l)` Maximum number of images to be used for inference. Default 1000

repository: melhabr/inference-accuracy-evaluator

branch_name: refs/heads/master

repo_name: melhabr/inference-accuracy-evaluator


text:
# Contributing Guide

This project is fully open-sourced and will be automatically deployed whenever commits are pushed to `master` branch, so these are the guidelines to keep everything clean and in working order.

Note that contributions may be rejected on the basis of a contributor failing to follow these guidelines

## Rules

1. **No force-pushes** or modifying the Git history in any way.
2. If you have direct access to the repository **Create a branch for your changes** and create a pull request for that branch. If not, create a branch on a for of the repository and create a pull request from there.
   * It's common practice for repository to reject direct pushes to `master`, so make branching a habit!
   * If PRing from your own fork, **ensure that "Allow edits from maintainers" is checked**. This gives permission for maintainers to commit changes directly to your fork, speeding up the review process.
3. **Adhere to the prevailing code style** which we enforce using [`flake8`](https://flake8.pycqa.org/en/latest/index.html) and [`pre-commit`](https://pre-commit.com/).
   * Run `flake8` and `pre-commit` against your code before you push it.
   * [Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) are a powerful git feature for executing custom scripts when certain important git actions occur. The pre-commit hook is the first hook executed during the commit process and can be used to check the code being commited & abort the commit if issues, such as linting failures are detected. While git hooks can seem daunting to configure, the `pre-commit` framework abstracts this process away from you and is provided as a dev dependency for this project. Run `pipenv run pre-commit` when setting up the project and you'll never have to worry about commiting your code that fails linting.
4. **Make great commits**. A well structured git log is key to a project's maintainability; it efficiently provides insight into when and why things were done for future maintainers of the project.
    * Commits should be as narrow in scope as possible. Commits that span hundreds of lines across multiple unrelated functions and/or files are very hard for maintainers to follow. After about a week they'll probably be hard for you to follow too.
    * Avoid making minor commits for fixing typos or linting errors. Since you've already set up a `pre-commit` hook to run the linting pipeline before a commit, you shouldn't be commiting linting issues anyway.
    * A more in-depth guide to writing great commit messages can be found in Chris Beam's [*How to Write a Git Commit Message*](https://chris.beams.io/posts/git-commit/)
5. **Avoid frequent pushes to the main repository**. This goes for PRs opened against your fork as well. Try to batch your commits until you've finished working for that session, or you've reached a point where collaborators need your commits to continue their own work. This also provides you the opportunity to ammend commits for minor changes rather than having to commit them on their own because you've already pushed.
    * This includes merging master into your branch. Try to leave merging from master for after your PR passes review: a maintainer will bring your PR up to date before merging. Exceptions to this include: resolving merge conflicts, needing something that was pushed to master for your branch, or something was pushed to master that could potentially affect the functionality of what you're doing
6. **Don't fight the framework**. Every framework has its laws, but the frameworks we've picked out have been carefully chosen for their particular merits. If you can avoid it, please resist reimplementing swathes or framework logic - the work has already been done for you!
7. If someone is working on an issue or pull request. **do not open your own pull request for the same task**. Instead, collaborate with the author(s) of the existing pull request. Duplicate PRs opened without communicating with the other author(s) and/or repository authors will be closed. Communication is key, and there's no point in two separate implementations of the same thing.
    * One option is to fork the other contributor's repository and submit your changes to their branch with your own pull request. We suggest following these guidelines when interacting with their repository as well.
    * The author(s) of inactive PRs and claimed issues will be pinged after a week of inactivity for an update. Continued inactivity may result in the issue being released back to the community and/or PR closure.
8. **Work as a team** and collaborate whenever possible. Keep things friendly and help each other out - these are shared projects and nobody likes to have their feet trodded on.
9. All static content, such as images or audio, **must be licensed for open public use**.
    * Static content must be hosted by a service designed to do so. Failing to do so is known as "leeching" and is frowned upon, as it generates extra bandwidth to the host without providing benefit. It would be best if appropriately licensed content is added to the repository itself.

Above all, the needs of our community should come before the wants of an individual. Work together, build solutions to problems and try to do so in a way that people can learn from easily. Abuse of our trust may result in the loss of your Contributor role.

## Type Hinting

[PEP 484](https://www.python.org/dev/peps/pep-0484/) formally specifies type hints for Python functions, added to the Python Standard Library in version 3.5. Type hints are recognized by most modern code editing tools and provide useful insight into both the input and output types of a function, preventing the user from having to go through the codebase to determine these types.

For example:

```py
import typing as t

def foo(input_1: int, input_2: t.Dict[str, str]) -> bool:
    ...
```

Tell us that `foo` accepts an `int` and a `dict` with `str` keys and values, and returns a `bool`.

All functions declarations should be type hinted in code contributed to this repository

## Docstring Formatting Directive

Many documentation packages provide support for automatic documentation generation from the codebase's docstrings. These tools utilize special formatting directives to enable richer formatting in the generated documentation.

For example:

```py
import typing as t

def foo(bar: int, baz: t.Optional[t.Dict[str, str]] = None) -> bool:
    """
    Does some things with some stuff.

    :param bar: Some input
    :param baz: Optional, some dictionary with string keys and values

    :return: Some boolean
    """
    ...
```

Since we don't utilize automatic documentation generation, use of this syntax should not be used in the code contributed here. Should the purpose and type of the input variables not be easily discernable from the variable name and type annotation a prose explanation can be used. Explicit references to variables, function, classes, etc. should be wrapped with backticks (`` ` ``)

For example, the above docstring would become:

```py
import typing as t

def foo(bar: int, baz: t.Optional[t.Dict[str, str]] = None) -> bool:
    """
    Does some things with some stuff.

    This function takes an index, `bar` and checks for its presence in the database `baz`, passed as a dictionary. Returns `False` if `baz` is not passed.
    """
    ...
```

To provide further instruction on our docstring formatting syntax, here are the formatting options

```py
from discord.ext.commands import Context, command

@command()
def foo(ctx: Context, value: str) -> None:
  """Short description of a command."""

@command()
def bar(ctx: Context, value: str) -> None:
  """
  Longer single-line description of a command.
  """

@command()
def foobar(ctx: Context, value: str) -> None:
  """
  Title for a longer description (might also be a short explanation).

  Detailed multiline description.
  This may include the full explanation of how this command works.

  We can also have multiple sections like this.
  Or when necessary a list of accepted parameters and their explanation.

  Parameters:
  * value: str
      This is the `value` of this command.
      It is only a placeholder for this very explanation.
  """
```

Note that we end each sentence in docstrings with `.` to keep everything consistent

## Database table management

We use a custom way to define our database tables, this was implemented in [PR #11](https://github.com/Codin-Nerds/Neutron-Bot/pull/11) and updated in [PR #14](https://github.com/Codin-Nerds/Neutron-Bot/pull/14)
You can check those pull requests as they explains in detail what was added and how to use it.

### Making a new table

Every database table needs to have a it's own file. This file should be named by the table name (although this isn't mandatory).
This file needs to be stored under the `bot/database` directory and it should look like this:

```py
import asyncpg

from bot.core.bot import Bot
from bot.database import DBTable, Database

class Roles(DBTable):
    columns = {
        "serverid": "NUMERIC(40) UNIQUE NOT NULL",
        "_default": "NUMERIC(40) DEFAULT 0",
        "muted": "NUMERIC(40) DEFAULT 0",
        "staff": "NUMERIC(40) DEFAULT 0",
    }

    def __init__(self, bot: Bot, database: Database):
        super().__init__(database, "roles")
        self.bot = bot
        self.database = database

    async def set_staff_role(self, server_id: int, role_id: int) -> None:
        await self.db_upsert(
            columns=["serverid", "staff_role"],
            values=[server_id, role_id],
            conflict_columns=["serverid"]
        )

    async def get_staff_role(self, server_id: int) -> asyncpg.Record:
        return await self.db_get(
            columns="staff_role",
            specification="serverid=$1",
            sql_args=[guild.id]
        )

async def load(bot: Bot, database: Database) -> None:
    await database.add_table(Roles(bot, database))
```

You can see the use of a `load` function on the bottom of the file, similarly to what discord.py uses for cogs.

You can also notice the absence of `SQL` code in the `set_staff_role` and `get_staff_role`, this is because of the custom built functions to make the process of managing the database table easier and it's also considered more readable.

There are a total of 3 functions like this which provide the SQL abstraction layer: `DBTable.db_upsert`, `DBTable.db_get`, and `DBTable.db_set`. In case you'd need something more specific you will have to fall back to the SQL query, you can execute this query using `DBTable.db_execute(sql, [arg1, arg2])` or if you want to obtain data from the database, you can use the `DBTable.db_fetchone(sql, [arg1, arg2])` or `DBTable.db_fetch(sql, [arg1, arg2])`.

The `columns` class attribute on the top holds the column table structure which will be used for initial creation the table. The populate command will be executed automatically when the table loads and it will use the given sql arguments defined in the values of this dictionary.

After you've created your table file, you'll need to reference it in the `db_tables` list defined in [`bot/__main__.py`](https://github.com/Codin-Nerds/Neutron-Bot/blob/master/bot/__main__.py).

The table will be loaded with the bots initiation automatically.

### Using caching

The database system also introduces a built-in way to easily use caching for your database. This means you can use synchronous functions to read your database from cache rather than making asynchronous calls to the database itself and reading it from there. Not only does that means you don't have to use async functions, it also makes accessing the database data faster.

Even through it's advantages, there are cases where caching isn't wanted in order to prevent using up too much memory. If this is your case, you don't have to do absolutely anything, just make the database as described in the section above, but if you do want caching, just read along.

In order to use caching, all you need to do is specify the `caching` class parameter, similarly to the `columns` parameter, except this one is optional. By including it the lower-level methods will automatically populate a `self.cache` dictionary for you based on your caching structure in this dictionary. This class variable looks like this:

```py
class FooTable(DBTable):
    caching = {
        "key": (int, "serverid"),

        "_default": int,
        "muted": (int, 0),
        "staff": None
    }
   ...
```

The `"key"` is used to hold the column which will be used as a unique identifier, under which the other column values will be stored, you can think of it as the primary key for caching. This is the key you'll use to access the cache itself (`self.cache[some_serverid]`).

The rest of the values follow simple syntax guidelines: the key represents the name of that column, and the value can be one of the 3 examples shown above:

1. **`int`**: This value definition only provides the datatype which this column should be using. This is the type that will be used to convert the `asyncpg.Record`. in this case, the following would be stored to cache `int(specific_record)`
2. **`(int, 0)`**: This acts similarly to the above except it also provides a default value of `0`.
3. **`None`**: This syntax will assume the same as the one with the pure data type, but the data type will be set to `t.Any` rather than something specific. If this type is used, you'll be storing the `asyncpg.Record` instances rather than any specified data type.

In order to get the values from your cache you can use 2 new getter/setter methods: `DBTable.cache_get(key, column)` and `DBTable.cache_update(key, column, value)`. Usage of these methods can be seen in a full table example here:

```py
class FooTable(DBTable):
    columns = {
        "serverid": "NUMERIC(40) UNIQUE NOT NULL",
        "_default": "NUMERIC(40) DEFAULT 0",
        "muted": "NUMERIC(40) DEFAULT 0",
        "staff": "NUMERIC(40) DEFAULT 0",
    }
    caching = {
        "key": (int, "serverid"),

        "_default": (int, 0),
        "muted": (int, 0),
        "staff": (int, 0)
    }

    def __init__(self, bot: Bot, database: Database):
        super().__init__(database, "roles")
        self.bot = bot
        self.database = database

    async def _set_role(self, role_name: str, guild_id: int, role_id: int) -> None:
        """Set a `role_name` column to store `role_id` for the specific `guild_id`."""
        await self.db_upsert(
            columns=["serverid", role_name],
            values=[guild_id, role_id],
            conflict_columns=["serverid"]
        )
        self.cache_update(guild.id, role_name, role.id)  # Cache setter function

    def _get_role(self, role_name: str, guild_id: int) -> int:
        """Get a `role_name` column for specific `guild_id` from cache."""
        return self.cache_get(guild_id, role_name)  # Cache getter function
```

### Referencing the database inside of your cogs

After that you've set up your database table classes with your custom functions, you're ready to use them inside of a cog, doing that is pretty simple:

```py
from discord.ext.commands import Cog

from bot.core.bot import Bot
from bot.database.roles import Roles, Context, command

class Foo(Cog):
    def __init__(self, bot: bot):
        self.bot = bot
        self.roles_db: Roles = Roles.reference()

    async def set_staff(self, ctx: Context, staff_role_id: int) -> None:
        await self.roles_db.set_staff_role(ctx.guild.id, staff_role_id)
```

Notice that the type of `self.roles_db` is hard defined. This is because the return type `Roles.reference()` is only set to an instance of `DBTable` not the specific table. That means that if you didn't hard define the type hint for it, your code editor won't be able to provide meaningful suggestions from that database table class.

## Work in Progress (WIP) PRs

Github provides a PR feature that allows PR author to mark it as WIP. This provides both a visual and functional indicator that the contents of the PR are in a draft state and not yet ready for formal review.

This feature should be utilized in place of the traditional method of prepending \[WIP\] to the PR title.

Methods of marking PR as a draft:

1. When creating it

   ![image](https://user-images.githubusercontent.com/20902250/94499351-bc736e80-01fc-11eb-8e99-a7863dd1428a.png)
2. After it was crated

   ![image](https://user-images.githubusercontent.com/20902250/94499276-8930df80-01fc-11eb-9292-7f0c6101b995.png)

As stated earlier **ensure that "Allow edits from maintainers" is checked** This gives permission for maintainers to commit changes directly to your fork, speeding up the review process.

## Changes to this Arrangement

All projects evolve over time, and this contribution guide is no different. This document is open to pull requests or changes by contributors. If you believe you have something valuable to add or change, please don't hesitate to do so in a PR.

repository: COMPUTER-AIII/Neutron-Bot

repo_name: COMPUTER-AIII/Neutron-Bot


text:
## Go to target
![Go to target](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/blob/master/s1.gif)

## Zoned cleanup
![Zoned cleanup](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/blob/master/s2.gif)

## Defined zones
![Defined zones](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/blob/master/s3.gif)

## Configuration options

| Key | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `entity` | `string` | `True` | - | ID of Xiaomi vacuum entity |
| `map_image` | `string` | `False` | - | Path to image of map |
| `map_camera` | `string` | `False` | - | Id of map camera entity |
| `camera_refresh_interval` | `integer` | `False` | 5 | Update interval for map camera in seconds |
| `calibration_points` | `list` | `True` | - | Pairs of coordinates: in vacuum system and on map image. See: [Calibration](#calibration)  |
| `zones` | `list` | `False` | Empty | List of predefined zones |
| `modes` | `list` | `False` | `[go_to_target, zoned_cleanup, predefined_zones]` | List of displayed modes. Possible values: `go_to_target`, `zoned_cleanup`, `predefined_zones` |
| `default_mode` | `string` | `False` | - | Default selected mode. Possible values: `go_to_target`, `zoned_cleanup`, `predefined_zones` |
| `debug` | `boolean` | `False` | `false` | Enables alerts with coordinates after holding `Start` button. Possible values: `true`, `false` |
| `service` | `string` | `False` | `vacuum.send_command` | Allows to define service used after clicking `Start` button. See: [Defining service](#defining-service) |
| `ignore_zones_limit` | `boolean` | `False` | `false` | Disables 5 zones limit. Possible values: `true`, `false`. See: [Defining service](#defining-service) |
| `language` | `string` | `False` | `en` | Language used to display card. Possible values: `en`, `pl`, `es`, `de` |

## Example usage:
```yaml
views:
- name: Example
  cards:
    - type: custom:xiaomi-vacuum-map-card
      entity: vacuum.xiaomi_vacuum
      map_image: '/local/custom_lovelace/xiaomi_vacuum_map_card/map.png'
      calibration_points:
        - vacuum:
            x: 25500
            y: 25500
          map:
            x: 466
            y: 1889
        - vacuum:
            x: 26500
            y: 26500
          map:
            x: 730
            y: 1625
        - vacuum:
            x: 25500
            y: 26500
          map:
            x: 466
            y: 1625
      zones:
        - [[25500, 25500, 26500, 26500]]
        - [[24215, 28125, 29465, 32175]]
        - [[24245, 25190, 27495, 27940], [27492, 26789, 28942, 27889]]
        - [[28972, 26715, 31072, 27915], [29457, 27903, 31107, 29203], [30198, 29215, 31498, 31215], [29461, 31228, 31511, 32478]]
```

## Calibration

To calibrate this card you have to provide exactly 3 pairs of coordinates.

Each pair must consist of:
* coordinates of point in vacuum system (extracted by FloleVac or just by sending vacuum to a desired point)
* coordinates of matching point on a map image

For the best outcome calibration points should form a right triangle.

If you have used this card before a migration guide will appear instead of actual card.
## Defining service

You can use `service` parameter for example to run a script instead of starting a vacuum directly. Provided service will be run with following parameters:
* `entity_id` - id of a vacuum
* `command` - one of two:
  * `app_goto_target` - for _Go to target_ mode
  * `zoned_cleanup` - for _Zoned cleanup_ and _Predefined zones_ modes
* `params` - point or a list of zones (the same value as displayed in `debug` mode)

| WARNING: in current version of Home Assistant service `vacuum.send_command` does not support templates! |
| --- |
| To overcome this issue you can use a [*script*](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/raw/master/examples/vacuum_send_command_multiple_zones.yaml) and a [*python script*](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/raw/master/examples/vacuum_send_command.py). |

Example HA script that can be used with this card is available [*here*](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/raw/master/examples/vacuum_send_command.yaml).

## Hints
* To find out values for `calibration_points` you can use service `vacuum.send_command` with data:
  ```json
  {
    "entity_id": "vacuum.xiaomi_vacuum",
    "command": "app_goto_target",
    "params": [25500, 25500]
  }
  ```
  Alternatively you can use `vacuum.xiaomi_clean_zone`:
    ```json
    {
      "entity_id": "vacuum.xiaomi_vacuum",
      "zone": [[25500, 25500, 26500, 26500]],
      "repeats": 1
    }
    ```
* You can find out coordinates for zones using two methods:
  * Enabling `debug` in settings, drawing zone in `Zoned cleanup` mode and holding `Start` button. Note: this method also works for other modes.
  * Android App [*FloleVac*](https://play.google.com/store/apps/details?id=de.flole.xiaomi)

* To add another language modify file [*texts.js*](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Xiaomi-Vacuum-Map-card/raw/master/dist/texts.js) and set `language` parameter in cards configuration.

## FAQ
* **Does this card can show live map?**

  Yes, to show a camera feed as a background set property `map_camera` in configuration.

* **Does this card require rooted device?**

  No, in basic version it uses a static image as a map. Root is required to create camera that will show a live map.

* **How to create map?**

  You can use any image you want, the easiest way is to use screenshot from Mi Home/FloleVac.

## Community
Thread on [community.home-assistant.io](https://community.home-assistant.io/): [Xiaomi Vacuum Interactive Map Card](https://community.home-assistant.io/t/xiaomi-vacuum-interactive-map-card/)

repository: Spudmn/lovelace-xiaomi-vacuum-map-card

repo_name: Spudmn/lovelace-xiaomi-vacuum-map-card


text:
# AlphabetStore

**A basic implementation of React.js and Redux, Integrated with JsonDB.**

> To run this project on localhost(3000) follow the below steps:

##### Step 1:
    Npm configuration steps:
        1. npm install
        2. npm install axios
        3. npm start

##### Step 2:
    To run json server run this commands:
        1. Move(cut & paste) the db.json file one directory up.
        2. npm install -g json-server
        3. json-server --watch db.json -p 4000

The above app was made using Facebook's create-react-app .

gha_language: JavaScript


text:
# PokedexApp

https://whiterkim.github.io/Pokedex/

This project was generated with [Angular CLI](https://github.com/angular/angular-cli).

This project uses [PokeApi](https://pokeapi.co/) as the data source.

repository: whiterkim/Pokedex

gha_language: TypeScript

repo_name: whiterkim/Pokedex


text:
---
layout: post
title:      "Sinatra: Simple yet Refined"
date:       2020-02-20 04:54:13 +0000
permalink:  sinatra_simple_yet_refined
---

 It is interesting that when we have an open slate, how much harder it is to create something. When allowed to develop anything you want, it seems you want to organize everything and nothing.  How does one think of ideas without overwhelming one with ideas? That is the curse of not having a definitive direction. That was the curse of my second project in Sinatra.

It started easy enough as this was my second project in Flatiron's online web development curriculum. I felt more confident in my abilities with this project than with the Ruby CLI project. The project is closer to the development I want to do and have done in the past.

**The requirements are: **

Build an MVC Sinatra Application.
Use ActiveRecord with Sinatra.
Use Multiple Models.
Use at least one has_many relationship.
Must have user accounts. The user that created a given piece of content should be the only person who can modify that content.
It would be best if you validated user input to ensure that the wrong data isn't created.
Any validation failures must be shown to the user with an error message.
So with all the background information out in the open, I decided what topic to code. I looked from within and find something that I genuinely enjoy and build an app around it. My love of wine was a natural choice. I am a level 1 Sommelier and have enjoyed tasting great wines for years. Why not try to create something that will save those reviews and show me other reviews as well. The Winelister was born out of that thought process.

The flow of the app is the reviewer can see reviews of wines at the start, then will sign up to be able to review wines. Those reviews are added to the overall list but are saved on the reviewer's wine list. The system then allows a person always to have a list of wine reviewed, and another list of other wines to try. The reviewer can add wines, edit their wines, or delete them from the list if they don't want them on.

The app sounds easy to do but has some complexity for a new programmer like me. Based on Flatiron's list of requirements and also just common sense, I needed to add to the complexity. I want to break down three things that I found challenging, then show you how I set the app up, and finally discuss my feelings about the project.

The first level of complexity was allowing users to sign up, sign out, and of course, sign in. While this is pretty standard, you need to make sure forms are working correctly, the views show correctly, and the user is adequately redirected once done.

The second level of complexity was making sure that a person could only take action on their additions. This is accomplished by checking the current user versus the user's params. If they didn't match, then they are not allowed to make any additions, changes, or deletions. This also had to hold for many different levels like user information, review information, and wine lists.

The third level of complexity was making sure that people's information was secure. When a person logs into the app, they need to know their password information is decrypted from the public. Bcrypt was enabled to make sure this happened.

**MODEL**

I created three model classes: User, Course, and UserCourses
As an instructor, a User has many Courses.
As a student, a User has many UserCourses where UserCourse is a join-table that stores User-Course relationships.

**VIEW**

At the root of my views, I created the layout, login, welcome, and sign up. The layout handles both the header/navigation and the footer. Login and sign up are obvious ones not needing explanation. The final is the welcome screen, which is the main home page when someone is not signed in.

My views are then grouped based on users and winereviews. I added a third view, which is winelists, but that is a stretch goal for me in the next few weeks.
I mainly set up my crud (create, update, read, delete) in the winereviews class.

**CONTROLLERS**

I have three main controllers in use with the winelist controller as part of my stretch goal. The application controller inherits Base, which allows me to set up helpers for the rest of the app. I also enabled my sessions and session secret to encrypt passwords. The next controller is my UsersController, which inherits from the ApplicationController. The User controller defines the routes that are relevant for users of the app like login, signup, and an index of all users. The final controller is the winereviews controller. This controller directs all reviews and forces the user to be signed in to post. Once signed in, the reviewer can add, edit, or destroy their reviews only.

That wraps up my blog post explaining my second app for flatiron school. I enjoyed the Sinatra experience as it started to get into more HTML and design attributes. While the backend is essential, I would instead like to work on frontend aspects.The content of your blog post goes here.

extension: markdown


text:
# AsyncAPI Support

Spectral is a generic linter, but a lot of effort has been put in to making sure [AsyncAPI v2](https://www.asyncapi.com/docs/specifications/2.0.0/) is well supported.

Run Spectral against a document without specifying a ruleset will trigger an auto-detect, where Spectral will look to see if `asyncapi: 2.0.0` is in the root of the document. If it finds it, it will load `spectral:asyncapi`, which is documented in our [Reference > AsyncAPI Rules](../reference/asyncapi-rules.md).


text:
# Dida.js

> An audio stream blender for the browser.

## Install

Install with `npm`

```bash
$ npm install dida.js
```

Or install with `yarn`

```bash
$ yarn add dida.js
```

```js
import Dida from 'dida.js';
```

Or umd builds are also available

```html
<script src="path/to/dida.js"></script>
```

Will expose the global variable to `window.Dida`.

## Usage

```js
const dida = new Dida({
  // Default volume
  volume: 0.7,

  // Whether to cache the played audio data
  cache: true,

  // Audio segment size
  chunk: 64 * 1024,

  // Maximum time difference between audio and video synchronization
  maxTimeDiff: 200,

  // Whether to automatically terminate the audio stream
  autoEnd: true,

  // Automatically terminate the audio stream
  autoEndTime: 5000,

  // Activate audio after trying to touch the screen on the mobile
  touchResume: true,

  // Time stamp calibration can be returned when preparing to play the next audio segment
  onNext: t => t,

  // When loading into an audio stream
  onLoad: () => null,

  // Stop playing
  onStop: () => null,

  // When starting to play
  onPlay: () => null,

  // When terminating loading
  onEnd: () => null,

  // When destroyed
  onDestroy: () => null,

  // When audio segmentation decoding is completed
  onDecodeDone: () => null,

  // When decoding is wrong
  onDecodeError: () => null,

  // When the volume changes
  onVolumeChange: () => null,

  // When freeing memory
  onFreeMemory: () => null,
});
```

## Api

```js
// getter and setter of the volume from 0 to 1;
dida.volume;

// Load a Uint8Array and a corresponding timestamp
dida.load(uint8, timestamp);

// Manually terminate loading
dida.end();

// Play by the specified timestamp
dida.play(timestamp);

// Stop play
dida.stop();
```

## License

MIT © [Harvey Zack](https://sleepy.im/)


text:
---
layout: default
permalink: /404.html
---

404

File not found

The site configured at this address does not contain the requested file.

If this is your site, make sure that the filename case matches the URL.
For root URLs (like http://example.com/) you must provide an index.html file.

Back to Home


text:
[![Build Status](https://travis-ci.org/pandzel/RobotsTxt-HTTP.png?branch=master)](https://travis-ci.org/pandzel/RobotsTxt-HTTP)
[![Maven Central](https://img.shields.io/maven-central/v/com.panforge/robots-http.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.panforge%22%20AND%20a:%22robots-http%22)

# RobotsTxt-HTTP
Apache HttpClient wrapper with ability to process and apply [robots.txt](http://www.robotstxt.org/orig.html) file directives.

## Instructions

Building the source code:

* Run 'mvn clean install'

Using in your own project:

* Add dependency to the pom.xml

```xml
  <dependencies>
  ...
    <dependency>
        <groupId>com.panforge</groupId>
        <artifactId>robots-http</artifactId>
        <version>1.0.10</version>
    </dependency>
  ...
  </dependencies>
```

* Use in the code

```java
try (CloseableHttpClient httpClient = new HttpClientWrapper(HttpClients.createSystem())) {
  // use hhtpClient to conduct HTTP communication
}
```

## Requirements

* Java JDK 11 or higher

## Licensing
Copyright 2018 Piotr Andzel

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.

A copy of the license is available in the repository's [LICENSE](LICENSE.txt) file.

repository: pandzel/RobotsTxt-HTTP

gha_language: Java

repo_name: pandzel/RobotsTxt-HTTP


text:
Funkwhale.audio Ansible Role
=========
[![Galaxy](https://img.shields.io/badge/galaxy-kevit.ansible-role-funkwhale-blue.svg?style=flat)](https://galaxy.ansible.com/kevit/ansible-role-funkwhale)
[![Build Status](https://travis-ci.org/kevit/ansible-role-funkwhale.svg?branch=master)](https://travis-ci.org/kevit/ansible-role-funkwhale)

A brief description of the role goes here.

Requirements
------------

Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.

Role Variables
--------------

| Name              | Default Value       | Description          |
|-------------------|---------------------|----------------------|
| `` | `` |  |

Dependencies
------------

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook
----------------

    - hosts: all
      roles:
         - kevit.ansible-role-funkwhale

License
-------

MIT

repository: AlexeyLev/ansible-role-funkwhale

repo_name: AlexeyLev/ansible-role-funkwhale


text:
# volumiolcd
Simple display for Volumio using LCD1602A I2C module

Using LCD library from https://github.com/mongonta0716/hd44780

To install add line to /etc/rc.local before `exit 0`

`/home/volumio/volumiolcd/venv/bin/python /home/volumio/volumiolcd/screen.py`

Adjust the paths to match your installation

To use the python virtual environment from the repository make sure that the VIRTUAL_ENV variable in `venv/bin/activate` is matching actual path.

## Disclaimer:

This is not using a preferred plugin management system as I am not crazy enough to use JS and npm. It actually blocks Volumio automatic update system. Use with caution.

repository: jwolansk/volumiolcd

repo_name: jwolansk/volumiolcd


text:
Ansible role: rbenv
=========

Installs [rbenv](https://github.com/sstephenson/rbenv).

Requirements
------------

None.

Role Variables
--------------
Available variables are listed below, along with default values (see `defaults/main.yml`):

    rbenv_repo: "https://github.com/rbenv/rbenv.git"

The repository that rbenv is to be cloned from.

    rbenv_plugins:
      - { name: "ruby-build", repo: "https://github.com/rbenv/ruby-build.git", version: "master" }

The rbenv plugins that are also to be installed.

    rbenv_root: "~/.rbenv"

The location that rbenv is to be installed to.

    rbenv_user: "{{ ansible_user }}"

The user account that rbenv is to be installed for.

Dependencies
------------

  - [adrianjuhl.git](https://galaxy.ansible.com/adrianjuhl/git/)

Example Playbook
----------------

    - hosts: servers
      roles:
         - { role: adrianjuhl.rbenv }

License
-------

MIT

Author Information
------------------

[Adrian Juhl](http://github.com/adrianjuhl)

repository: adrianjuhl/ansible-role-rbenv

repo_name: adrianjuhl/ansible-role-rbenv


text:
## Overview
  ![Bitcoin Cash logo](../projects/logo/bitcoin_cash.png)
  Name: Bitcoin Cash
  [Website](https://www.bitcoincash.org/)
  Year founded: Aug 2017
  Currency: coin [BCH](https://coinmarketcap.com/currencies/bitcoin-cash/)
## Business Model
   Bitcoin Cash is a split from Bitcoin with a protocol upgrade to fix on-chain capacity. If Bitcoin Cash gets majority of PoW then it becomes de facto Bitcoin.
It will be a Bitcoin without segwit as soft fork, where upgrades of the protocol are done mainly through hard forks, without changing the economic rules of the Bitcoin.
## Contacts
   [GitHub](https://github.com/bitcoin-abc)
   [Bitcointalk](https://bitcointalk.org/index.php?topic=2040221.0)
   [Forum](http://www.bccforums.net/)
## About
[Reddit](http://reddit.com/r/Bitcoinabc)


text:
# Centimani

>Quickly creating development customize tmpelate cli

[![NPM](https://nodei.co/npm/centimani.png?downloads&downloadRank)](https://nodei.co/npm/centimani/)

## Install

If you haven't already got Node.js, then [go get it](http://nodejs.org/).

```
npm install centimani -g
```

## Features

- Customize template what you want.
- Provide cli instruction from setting json.

## Introduction

### Using init instruction

1.Creating setting.json file, writing folder structure.

	$ centimani init

#### Example Setting.json
	{
	    "controller": [
	    {
	        "templates": "./templ/templ.php",
	        "distPath": "./dist/php/",
	        "injectionFile": [
	        {
	            "templates": "./templ/controllerTemplInjection.php",
	            "distPath": "./source/controller.php"
	        },
	        {
	            "templates": "./templ/controllerTemplInjection.php",
	            "distPath": "./source/controller2.php"
	        }],
	        "suffix": "php"
	    },
	    {
	        "templates": "./templ/templ.js",
	        "distPath": "./dist/js/",
	        "suffix": "js",
	        "prefix": "page"
	    },
	    {
	        "templates": "./templ/templ.css",
	        "distPath": "./dist/css/",
	        "suffix": "css"
	    }],
	    "class": [
	    {
	        "templates":"./templ/templ2.php",
	        "distPath":"./dist/php/",
	    }]

	}

There is two instruction help you creating base code with customize template.

	$ centimani new controller test

It`s creating test.php at "./dist/php/" path.
According to "./templ/controllerTemplInjection.php" which is template file,creating you want!

#### Example controllerTemplInjection.php

	<?php
	class {{class_name}}
	{

	}

Creating **test.php** as below

	<?php
	class test
	{

	}

Templates use [mustache](https://github.com/janl/mustache.js/), use {{class_name}} replace name.

#### Example controllerTemplInjection.php

It`s also appending template code.

	Route::get('/', '{{class_name}}@show');

Appending to **controller.php** as below

	Route::get('/', 'test@show');

#### Screenshots

![Sample](https://github.com/FelixLinBH/Centimani/blob/master/example.gif?raw=true)

## Authors

* **Felix Lin** - [Github](https://github.com/FelixLinBH)

## License

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

repository: FelixLinBH/Centimani

repo_name: FelixLinBH/Centimani


text:
---
period: "Flow-1"
title: "ES-next, Babel, Typescript and WebPack "
date: "19-02-2020"
pageintro: |
  The evolution of JavaScript.
  es2015, es2016 ...
  Webpack.
  Babel.
  TypeScript.
---

### What to Read:

<!--BEGIN readings ##-->

- [:book: (Skim only) The TC39 Process (5 min.) ](https://tc39.github.io/process-document/)
- [:book: Babel.io (skim only, reference for Bable)](https://babeljs.io/)
- [:book: Webpack (skim only, reference for WebPack)](https://webpack.js.org/concepts/)
  <!--END readings ##-->

### Lecture

<!--BEGIN lectures ##-->
- [:tv: My introduction to todays lecture (10 min.)](https://youtu.be/rEoMS1MK2Us)
- [:tv: :book: History of JavaScript, ECMAScript, TC39 (text with video) (12. min) ](https://medium.com/free-code-camp/ecmascript-tc39-and-the-history-of-javascript-26067498feb9)
    - [:tv: Short intro to WebPack (14 min.)](https://www.youtube.com/watch?v=GU-2T7k9NfI)
    - [:tv: WebPack Dev Server(7 min.)](https://www.youtube.com/watch?v=GU-2T7k9NfI)
    - [:tv: WebPack Core Concepts(19 min.)](https://www.youtube.com/watch?v=8DDVr6wjJzQ)
- [:tv: Short intro to Babel](https://www.youtube.com/watch?v=C2PDAGCrk_g)

----
- [:tv: A number of small hints related to the exercises, and what is expected from you at the exam, related to todays lecture (10 min.)](https://www.youtube.com/watch?v=Ft-OqQte1mQ&feature=youtu.be)
### Extra

If you wan't to see some of the very newest JavaScript additions (recomended, but not required)

- [:tv: ES Next Features That'll Make You Dance (25 min.)](https://www.youtube.com/watch?v=9yK4t2CuIHQ)

<!--END lectures ##-->

### Exercises:

<!--BEGIN exercises ##-->

- [Webpack, Babel exercises](https://docs.google.com/document/d/1PIMMeYPqN8Qzo4qsgjjuNAC0_15RIEVjD0DbBhcaP-0/edit?usp=sharing)

<!--END exercises ##-->


text:
## [2.0.0](https://github.com/twada/rejected-or-not/releases/tag/v2.0.0) (2020-04-19)

#### Features

* [Sync with behavior changes in Node13](https://github.com/twada/rejected-or-not/pull/4)

#### Breaking Changes

* If the validation function passed to `assert.rejects()` returns a value other than true, an assertion error will be thrown instead of the original error. ([6624cc1f](https://github.com/twada/rejected-or-not/commit/6624cc1f815543efc4d38b6c8f8439f83589c58e))
* If a constructor function is passed to validate the instance of errors thrown in `assert.reject()`, an assertion error will be thrown instead of the original error. ([aa73271b](https://github.com/twada/rejected-or-not/commit/aa73271b87f6861544d102f2572ece649cdd0c7b))

## [1.1.0](https://github.com/twada/rejected-or-not/releases/tag/v1.1.0) (2020-04-18)

#### Features

* [Sync with improvement of regex validation introduced in Node 12.5.0](https://github.com/twada/rejected-or-not/pull/1)
* [Sync with upstream changes in ERR_INVALID_ARG_TYPE message](https://github.com/twada/rejected-or-not/pull/3)

### [1.0.1](https://github.com/twada/rejected-or-not/releases/tag/v1.0.1) (2018-10-05)

#### Chore

  * rename `block` to `promiseFn` ([7843c1f4](https://github.com/twada/rejected-or-not/commit/7843c1f4d12d9932d5ad9a2620c547bf290d001b), [4ba08c71](https://github.com/twada/rejected-or-not/commit/4ba08c71761686073aa457a9bddb1a49a1c150d9))

## [1.0.0](https://github.com/twada/rejected-or-not/releases/tag/v1.0.0) (2018-05-11)

#### Features

  * the first stable release

## [0.1.0](https://github.com/twada/rejected-or-not/releases/tag/v0.1.0) (2018-05-09)

#### Features

  * initial release

repository: twada/rejected-or-not

repo_name: twada/rejected-or-not


text:
---
layout: impl

title: Reflection for UNIX, iOS Edition
homepage: https://www.attachmate.com/products/reflection/unix/
license: Proprietary
first-release:
    date: 2005  # according to Wikipedia
latest-release:
    version: <IP_ADDRESS>
    date: 2015-09-24
#changelog: TODO
client: yes
server: no
#platforms:
#    - iphone
#    - ipad
# TODO: also available for android, but the versions are not completely in sync
#  (as I write this, the android version is <IP_ADDRESS> from April 22, 2015)
#
# TODO: They also have a client / server for Unix and Windows, called
#  Reflection for Secure IT (formerly F-Secure SSH), see
#   https://www.attachmate.com/products/reflection-security-it/
#
# https://www.attachmate.com/library/docs/reflection-for-secure-it-client-for-unix.html
# https://www.attachmate.com/library/docs/reflection-for-secure-it-client-for-windows-tech-specs.html
# https://www.attachmate.com/library/docs/reflection-for-secure-it-server-for-unix-tech-specs.html
# https://www.attachmate.com/library/docs/reflection-for-secure-it-server-for-windows-tech-specs.html
#
#
# Beyond that, they even have a "web client"?

remarks: |
    * Mobile client for Android and iOS.
    * Available at
        [Apple App Store](https://itunes.apple.com/us/app/id920472514),
        [Google Play](https://play.google.com/store/apps/details?id=rTablet.Android&hl=en).
    * They also offer clients and servers for Unix and Windows, under the name Reflection for Secure IT
      (formerly known as F-Secure SSH). These should be covered by a separate entry.
    * 2015-07-10: Version <IP_ADDRESS> for iOS identifies itself on the wire as `SSH-2.0-libssh2_1.4.3`, so likely based on [libssh2](/impls/libssh2.html).
protocols:
    cipher:
        - aes128-ctr
        - aes192-ctr
        - aes256-ctr
        - aes256-cbc
        -<EMAIL_ADDRESS>        - aes192-cbc
        - aes128-cbc
        - blowfish-cbc
        - arcfour128
        - arcfour
        - cast128-cbc
        - 3des-cbc
    compression:
        - none
    hostkey:
        - ssh-rsa
        - ssh-dss
    kex:
        - diffie-hellman-group14-sha1
        - diffie-hellman-group-exchange-sha1
        - diffie-hellman-group1-sha1
    mac:
        - hmac-sha1
        - hmac-sha1-96
        - hmac-md5
        - hmac-md5-96
        - hmac-ripemd160
        -<EMAIL_ADDRESS>#    userauth:
#        - unknown
---

repository: HansN/ssh-comparison

gha_language: CSS

repo_name: HansN/ssh-comparison


text:
---
permalink: configure-vhosts-on-a-lamp-stack/
audit_date: '2019-02-01'
title: Configure vhosts on a LAMP stack
type: article
created_date: '2019-02-01'
created_by: Rackspace Community
last_modified_date: '2019-12-20'
last_modified_by: Stephanie Fillmon
product: Cloud Servers
product_url: cloud-servers
---

Whether you host a single site, or dozens of sites on your new Linux® Apache® MySQL® PHP® (LAMP) server, virtual hosts (vhosts) help you efficiently organize your sites.

In the following example, the LAMP server is already configured to serve content directly from the **/var/www/html** directory in the example below:

    /var/www
    ├── html
    │   └── index.html
    └── vhosts

The existing **index.html** file is the standard Apache test page. You can immediately serve content by replacing the existing file with your own site files. Alternatively, you can serve one or more sites by using vhosts. Your LAMP stack contains a template that you can modify to create new vhost configuration files for each site that you need to host.

### How to configure vhosts

**Note:** On the Ubuntu® operating system, each vhost has its own separate configuration file, and is then enabled in Apache.

Use the following instructions to configure your vhosts:

**Note:** Replace _yoursitename.com_ in the instructions below with your actual site or domain name. We recommend that you use the top-level domain such as .com, .net, and so on on one server.

1. Navigate to the **sites-available** folder by using the following command:

    `$ cd /etc/apache2/sites-available`

2. Find and replace the default site name, example.com, in the **default.template** file by using the `sed` stream editor and the following commands:

    1. Test the output by using the following command:

        `$ sed -e 's/example.com/yoursitename.com/' default.template`

    2. Write the changes to a new vhost for this file by using the following command:

        `$ sed -e 's/example.com/yoursitename.com/' default.template > yoursitename.com.conf`

    3. Verify that the file was written with the proper project name by using the following command:

        `$ cat yoursitename.com.conf`

3. Add the project to the list of available sites in the Apache configuration file by using the following command:

    `$ a2ensite yoursitename.com.conf`

4. Create the directory for your site by using the following command:

    `$ mkdir -p /var/www/vhosts/yoursitename.com`

    **Note:** The vhost that you made previously is configured to look in this directory.

5. Repeat steps 1 - 4 to add additional vhosts.

### Test your vhost configuration

This test should produce a response of `Syntax OK`. Test the configuration by using the following command:

    `$ apache2ctl configtest`

Restart Apache to finalize the configuration change by using the following command:

    `$ apache2ctl restart`

### Vhost configuration example

In this example, you create sites for three customers, one of which is a completely different mobile site.

You configure the vhosts for all three customers by using the following command sequence:

        $ cd /etc/apache2/sites-available
        $ sed -e 's/example.com/site1.com/' default.template > site1.com.conf
        $ sed -e 's/example.com/site2.com/' default.template > site2.com.conf
        $ sed -e 's/example.com/site3.com/' default.template > site3.com.conf
        $ sed -e 's/example.com/mobile.site3.com/' default.template > mobile.site3.com.conf
        $ a2ensite site1.com.confsite2.com.confsite3.com.confmobile.site3.com.conf
        $ mkdir -p /var/www/vhosts/site1.com /var/www/vhosts/site2.com /var/www/vhosts/site3.com /var/www/vhosts/mobile.site3.com
        $ apache2ctl configtest
        $ apache2ctl restart
        /var/www/
        ├── html
        │   └── index.html
        └── vhosts
            ├── mobile.site3.com
            ├── site1.com
            ├── site2.com
            ├── site3.com

Each directory below the vhosts directory is a _document root_ for the listed site. A document root is a directory that is stored on your host's servers and that is designated for holding web pages. As HTTP requests come into the server, Apache determines which domain the request is for, then routes the request to the appropriate document root, as specified in the vhosts configuration file.

repository: rackerlabs/rackspace-how-to

gha_language: Shell

repo_name: rackerlabs/rackspace-how-to


text:
---
layout: post
title: "Self-explainer: privacy-preserving contact tracing"
published: 2020-04-26
image: contact-graph.png
---

> *Self-explainer:* experimenting with taking my usual rough notes on
various topics of interest and posting only very slightly nicer
versions of them publicly.

## Context and problem

Way back in the first few weeks of the Bay Area pandemic
shelter-in-place orders, I happened upon an [interesting
tweet](https://twitter.com/carmelatroncoso/status/1246122416943837185)
from [Carmela Troncoso](http://www.carmelatroncoso.com/), a security
professor at [EPFL](https://www.epfl.ch/en/).  The thread was about a
decentralized project for _contact tracing_ called
[DP-3T](https://github.com/DP-3T). I read the [simplified 3-page
brief](https://github.com/DP-3T/documents/blob/master/DP3T%20-%20Simplified%20Three%20Page%20Brief.pdf),
found it pretty interesting, and bookmarked the longer [white
paper](https://github.com/DP-3T/documents/blob/master/DP3T%20White%20Paper.pdf)
to read later. A week later (!), the news was abuzz with stories about
the [Google and Apple's joint
project](https://www.blog.google/inside-google/company-announcements/apple-and-google-partner-covid-19-contact-tracing-technology/)
to bring a similar technology to their mobile devices.

When someone is diagnosed with the target infectious disease (eg,
COVID-19), public health officials would like to identify everyone who
has recently been in close physical proximity to the diagnosed person
in order to take protective actions to minimize further spread. The
key problem here is identifying this set of potentially affected
people, known as _contact-tracing_.  The _decentralized
privacy-preserving_ variant of this problem is, to a first
approximation, how to achieve this goal without simply building a
massive central database that tracks everyone's whereabouts at all
times, a [solution which has its own risks and
drawbacks](https://www.eff.org/deeplinks/2020/04/challenge-proximity-apps-covid-19-contact-tracing).

## The key trick: ephemeral identifiers

So if Alice has been diagnosed with disease X, how can we identify the
set of people who may have been inadvertently exposed to infection via
their proximity to her over the past several days? Remember that we
don't want a centralized log of GPS coordinates, or a real-identity
snapshot of your personal connections.

The key trick is the use of _ephemeral identifiers_, a private stream
of codes generated by each installed copy of the app, similar to
2-factor authentication (TFA) apps like [Google
Authenticator](https://rcoh.me/posts/two-factor-auth/). An informal
simplified caricature (since writing this the project itself has a
similar [nice cartoon summarizing it as
well](https://github.com/DP-3T/documents/blob/master/public_engagement/cartoon/en/comic-en.pdf))
of the mechanism is as follows:

1. Everywhere Alice goes, her phone is constantly broadcasting her
_current_ ephemeral code, which changes at some regular intervals (eg,
hourly). Her app locally (ie, on-device) stores a timestamped list of
all of its generated codes, and everyone else's copy of the app is
doing the same.

2. Every copy of the app is also constantly _listening_ for codes, and
locally (again) recording timestamped records every one that it
"sees". This data acts as a kind of anonymized and device-local
contact history.

3. If Alice is diagnosed with the disease, her doctor publishes (with
her consent) the list of her codes from the past several days to some
accessible location with some annotation indicating people who were in
contact with these codes are at risk. Everyone else's copy of the app
can periodically poll this source and compare the published list of
"at-risk" ephemeral identifiers against their local copy of observed
identifiers. If there is a match, the user knows they _may_ have been
exposed and can take some action (getting tested, self-quarantine,
etc).

This solution seems like it should satisfy the core functional
requirement: identifying users who were in close physical proximity to
later-diagnosed individuals (assuming everyone is using the app at all
times). Proving the desired privacy properties is a more subtle and
complex question, and also depends crucially on careful attention to
implementation details. However, at a high level it seems plausible
that, assuming the identifiers do not "leak" information, the design
does a reasonable job of limiting the utility of the system for
unintended or malicious use cases like ad targeting or political
dissident hunting.

## Additional details and complications

The [materials posted on the DP-3T
Github](https://github.com/DP-3T/documents) are quite interesting and
get into deeper details of the practical and legal aspects of the
system. For example, the caricature above is not strictly accurate -
infected users actually upload an ephemeral ID-generating seed (which
is itself ephemeral!) instead of their raw ephemeral IDs (see
[FAQ](https://github.com/DP-3T/documents/blob/master/FAQ.md)).

From the perspective of (especially European) privacy regulations and
principles, one [key
claim](https://github.com/DP-3T/documents/blob/master/DP3T%20-%20Data%20Protection%20and%20Security.pdf)
is that the ephemeral ID-based design ensures that:

> ... from the server's perspective, the data held is effectively not
  personal data, and cannot be linked back to individuals during
  normal operation.

That is, in some sense any installed copy of the app is (by design) a
"dumb" ephemeral ID publisher and receiver, no more and no less.

Some other interesting questions explored are:

* how can user privacy be compromised if a user's phone is physically confiscated?
* how to avoid users spamming/DoS'ing the system with false diagnoses?
* how could a user opt-in to sharing additional granular information
  that epidemiologists would find useful?
* what are the back-of-the-envelope scale requirements for the backend
  that publishes the infected ephemeral IDs (eg, queries per second)?

## Will it work?

The effectiveness of this kind of effort would depend on

* maximizing participation/adoption/coverage
* minimizing "fragmentation" - everyone should be using the _same_
  system (at least within a geographical area)
* actual actions taken in response to the contact-tracing information

In some jurisdictions the government can more or less impose app
adoption by fiat, while in others users will have to be persuaded to
voluntarily participate. Public-private partnerships with influential
commercial entities (say, Google+Apple) might be one way to achieve
this. Likewise, the immediate actions triggered by the risk signals
will vary depending on local political and legal conditions.

When rolled out, how would the efficacy of these solutions be
measured? In the absence of randomized controlled trials, what kinds
of data analysis techniques could researchers use to estimate the
influence of these kinds of systems on the the [all-important $R_t$
parameters](https://rt.live/)?


text:
# BreadProofer
An Arduino-controlled bread proofing box that measures the temperature and humidity using DHT11 sensors and uses a relay board to drive a humidifier and heating elements to adjust the values accordingly.

## Hardware used:

- [Arduino Nano](https://www.amazon.de/dp/B06XR1PPCL/ref=pe_386171_37038021_TE_3p_dp_1) (1x)
- [SODIAL 5V 4-Channel Relay Module](https://www.amazon.de/dp/B00L8VFVTK) (1x)
    - Driver current: 15-20mA
    - Relay specs:  250V AC, 10A ; 30V DC, 10A
- [Ecloud Shop DHT11 sensor](https://www.amazon.de/dp/B01MQNMCKV) (3x)
    - Temperature: 0°C - 50°C (+/- 2°C)
    - Relative humidity: 20% - 95% (+/- 5%)
- [Heating elements](http://www.conrad.be/ce/nl/product/189297/Thermo-Verwarmingsfolie-Zelfklevend-230-V-65-W-Veiligheidstype-IPX4-l-x-b-300-mm-x-120-mm) (6x)
    - 230V, 65W max.
    - Surface temperature: 95°C
    - Size: 300 mm x 120 mm
- [Bionaire compact warm mist humidifier, model: CM1](http://www.bionaireeurope.com/Product.aspx?cid=1194&pid=7402) (1x)
    - 2.25 l Removable water tank
    - 4,8 l / 24 h warm mist output
    - 230V, 220W
- Salvaged Motorola Pebl mini-USB charger
    - 5V, 1A

## Connections:

Microcontroller/sensors/relay board power (5V): Ground and 5V lines go from the phone charger to an intermediary perfboard.
From here, the Arduino Nano is powered on its GND and Vin pins. The DHT11 sensors and the 4-channel relay board are powered from the perfboard to their GND and VCC lines.

Microcontroller/sensors/relay board data connections: The DATA lines on the 3 DHT11 sensors are connected to the MCU's pins 2, 3 and 4.
The IN1, IN2 and IN3 pins on the 4-channel relay board are connected to the MCU's pins 5, 6 and 7 (for the three pairs of heating elements), the IN4 pin on the relay board is connected to the MCU's pin 8 (for the humidifier).

Heating element power (230V): one wire of the power cable of each heating element power cable is connected to the main power cable. The other wires of elements 1 and 2 are joined and routed to the Normally Open (NO) contact of relay 1. Those of elements 3 and 4 are routed to the NO contact of relay 2. Those of 5 and 6 are route to the NO contact of relay 3. The Common (C) contacts of relays 1, 2 and 3 are wired to the other wire of the input power cable.

Humidifier power (230V): one of the wires of the humidifier power cable goes directly to the input power cable, the other of the two is connected to the NO contact of relay 4. The C contact of relay 4 is wired to the input power cable.

## Settings (to be verified empirically):

Humidity (min/max): 60% / 80%
The humidity levels are kept high to avoid the outer layer of the dough from cracking during the proofing process.

Temperature (min/max): 30.3°C / 34.3°C
The optimal growth temperature of Saccharomyces cerevisiae is 32.3°C. (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3067424/pdf/1861-10.pdf)

## Current progress:

Done:
- Box (schematics TBD)
- Placement of humidifier
- Placement of heating elements (heat transfer might be insufficient so extra heat sinks may be needed to spread the heat)

To be done:
- Placement of 5V electronics
    - Arduino Nano
    - 4-channel relay board
    - DHT11 sensors
    - Connections from sensors to MCU
    - Connections from MCU to relay board

- Placement of 230V electronics
    - 10A circuit breaker, used as main power switch
    - Power supply for 5V electronics (Motorola Pebl charger; 5V, 1000 mA)
    - Connections from mains to heating elements
    - Connections from mains to humidifier
    - Connections from mains to outputs of relay board
    - Connections from outputs of relay board to heating elements / humidifier

## Pictures:

[![Imgur](http://i.imgur.com/R9KHoGP.jpg)](http://imgur.com/a/kUsNQ)

[![Imgur](http://i.imgur.com/tIC3VmRm.jpg)](http://i.imgur.com/tIC3VmR.jpg)
[![Imgur](http://i.imgur.com/KduqnEqm.jpg)](http://i.imgur.com/KduqnEq.jpg)
[![Imgur](http://i.imgur.com/sEzSUT2m.jpg)](http://i.imgur.com/sEzSUT2.jpg)
[![Imgur](http://i.imgur.com/USNG6VQm.jpg)](http://i.imgur.com/USNG6VQ.jpg)
[![Imgur](http://i.imgur.com/82RdciXm.jpg)](http://i.imgur.com/82RdciX.jpg)
[![Imgur](http://i.imgur.com/0Koec39m.jpg)](http://i.imgur.com/0Koec39.jpg)

repository: Lophies/BreadProofer

repo_name: Lophies/BreadProofer


text:
---
hrs_structure:
  division: '3'
  volume: '12'
  title: '29'
  chapter: '539'
  section: 539-11
type: hrs_section
tags:
  - Property
  - Family
menu:
  hrs:
    identifier: HRS_0539-0011
    parent: HRS0539
    name: 539-11 Short title; rules of construction
weight: 64055
title: Short title; rules of construction
full_title: 539-11 Short title; rules of construction
---
**[§539-11] Short title; rules of construction.** (a) This chapter shall be known as and may be cited as the Uniform TOD Security Registration Act.

(b) This chapter shall be liberally construed and applied to promote its underlying purposes and policy and to make uniform the laws with respect to the subject of this chapter among states enacting it.

(c) Unless displaced by the particular provisions of this chapter, the principles of law and equity supplement its provisions. [L 1998, c 63, pt of §1]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
---
title: "Soichi Hayashi"
description: "Software Engineer"
date: 2020-10-06T08:50:45+00:00
lastmod: 2020-10-06T08:50:45+00:00
draft: false
images: []
---

![Soichi Hayashi](/images/contributors/soichi.jpg)

Soichi is senior software engineer and technical lead of the brainlife.io platform. His passion is to make supercomputers easier to use by researchers and scientists. He graduated with a B.S. in computer science and physics from Henderson State University and worked for Acxiom as a software engineer providing business intelligence and analytics solutions to various fortune 500 companies such as Discover, Citigroup, Dell/EMC. He joined Indiana University in 2008 to work for the Open Science Grid and joined the CTIL team in 2019.

repository: soichih/dsla

repo_name: soichih/dsla


text:
---
title: " Deploy Gerrit Artifacts"
sidebar: gerritdoc_sidebar
permalink: dev-release-deploy-config.html
---
## Deploy Configuration settings for Maven Central

Some Gerrit artifacts (e.g. the Gerrit WAR file, the Gerrit Plugin API
and the Gerrit Extension API) are published on Maven Central in the
`com.google.gerrit` repository.

To be able to publish artifacts to Maven Central some preparations must
be done:

  - Create an account on [Sonatype’s
    Jira](https://issues.sonatype.org/secure/Signup!default.jspa).

    Sonatype is the company that runs Maven Central and you need a
    Sonatype account to be able to upload artifacts to Maven Central.

  - Configure your Sonatype user and password in `~/.m2/settings.xml`:

        <server>
          <id>sonatype-nexus-staging</id>
          <username>USER</username>
          <password>PASSWORD</password>
        </server>

  - Request permissions to upload artifacts to the `com.google.gerrit`
    repository on Maven Central:

    Ask for this permission by adding a comment on the
    [OSSRH-7392](https://issues.sonatype.org/browse/OSSRH-7392) Jira
    ticket at Sonatype.

    The request needs to be approved by someone who already has this
    permission by commenting on the same issue.

  - Generate and publish a PGP key

    A PGP key is needed to be able to sign the release artifacts before
    the upload to Maven Central, and to sign the release announcement
    email.

    Generate and publish a PGP key as described in [Working with PGP
    Signatures](http://central.sonatype.org/pages/working-with-pgp-signatures.html).
    In addition to the keyserver mentioned there it is recommended to
    also publish the key to the [Ubuntu key
    server](https://keyserver.ubuntu.com/).

    Please be aware that after publishing your public key it may take a
    while until it is visible to the Sonatype server.

    Add an entry for the public key in the [key
    list](https://gerrit.googlesource.com/homepage/+/md-pages/releases/public-keys.md)
    on the homepage.

    The PGP passphrase can be put in `~/.m2/settings.xml`:

        <settings>
          <profiles>
            <profile>
              <id>gpg</id>
              <properties>
                <gpg.executable>gpg2</gpg.executable>
                <gpg.passphrase>mypassphrase</gpg.passphrase>
              </properties>
            </profile>
          </profiles>
          <activeProfiles>
            <activeProfile>gpg</activeProfile>
          </activeProfiles>
        </settings>

    It can also be included in the key chain on OS X.

## Deploy Configuration in Maven `settings.xml`

Gerrit Subproject Artifacts are stored on [Google Cloud
Storage](https://developers.google.com/storage/). Via the [Developers
Console](https://console.developers.google.com/project/164060093628) the
Gerrit maintainers have access to the `Gerrit Code Review` project. This
projects host several buckets for storing Gerrit artifacts:

  - `gerrit-api`:

    Bucket to store the Gerrit Extension API Jar and the Gerrit Plugin
    API Jar.

  - `gerrit-maven`:

    Bucket to store Gerrit Subproject Artifacts (e.g. `gwtjsonrpc`
    etc.).

To upload artifacts to a bucket the user must authenticate with a
username and password. The username and password need to be retrieved
from the [Storage Setting in the Google Cloud Platform
Console](https://console.cloud.google.com/storage/settings?project=api-project-164060093628):

Select the `Interoperability` tab, and if no keys are listed under
`Interoperable storage access keys`, select *Create a new key*.

Using `Access Key` as username and `Secret` as the password, add the
configuration in the `~/.m2/settings.xml` file to make the credentials
known to Maven:

```
  <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <servers>
      <server>
        <id>gerrit-api-repository</id>
        <username>GOOG..EXAMPLE.....EXAMPLE</username>
        <password>EXAMPLE..EXAMPLE..EXAMPLE</password>
      </server>
      <server>
        <id>gerrit-maven-repository</id>
        <username>GOOG..EXAMPLE.....EXAMPLE</username>
        <password>EXAMPLE..EXAMPLE..EXAMPLE</password>
      </server>
      <server>
        <id>gerrit-plugins-repository</id>
        <username>GOOG..EXAMPLE.....EXAMPLE</username>
        <password>EXAMPLE..EXAMPLE..EXAMPLE</password>
      </server>
    </servers>
  </settings>
```

### Gerrit Subprojects

  - You will need to have the following in the `pom.xml` to make it
    deployable to the `gerrit-maven` storage bucket:

<!-- end list -->

```
  <distributionManagement>
    <repository>
      <id>gerrit-maven-repository</id>
      <name>Gerrit Maven Repository</name>
      <url>gs://gerrit-maven</url>
      <uniqueVersion>true</uniqueVersion>
    </repository>
  </distributionManagement>
```

> **Note**
>
> In case of JGit the `pom.xml` already contains a
> `distributionManagement` section. To deploy the artifacts to the
> `gerrit-maven` repository, replace the existing
> `distributionManagement` section with this snippet.

  - Add these two snippets to the `pom.xml` to enable the wagon
    provider:

<!-- end list -->

```
  <pluginRepositories>
    <pluginRepository>
      <id>gerrit-maven</id>
      <url>https://gerrit-maven.commondatastorage.googleapis.com</url>
    </pluginRepository>
  </pluginRepositories>
```

```
  <build>
    <extensions>
      <extension>
        <groupId>com.googlesource.gerrit</groupId>
        <artifactId>gs-maven-wagon</artifactId>
        <version>3.3</version>
      </extension>
    </extensions>
  </build>
```

## GERRIT

Part of [Gerrit Code Review](index.html)

## SEARCHBOX

repository: omunroe-com/gerrihmpg

repo_name: omunroe-com/gerrihmpg


text:
# Image Classification Python* Sample

This topic demonstrates how to run the Image Classification sample application, which performs
inference using image classification networks such as AlexNet and GoogLeNet.

## How It Works

Upon the start-up, the sample application reads command line parameters and loads a network and an image to the Inference
Engine plugin. When inference is done, the application creates an
output image and outputs data to the standard output stream.

> **NOTE**: By default, Inference Engine samples and demos expect input with BGR channels order. If you trained your model to work with RGB order, you need to manually rearrange the default channels order in the sample or demo application or reconvert your model using the Model Optimizer tool with `--reverse_input_channels` argument specified. For more information about the argument, refer to **When to Reverse Input Channels** section of [Converting a Model Using General Conversion Parameters](./docs/MO_DG/prepare_model/convert_model/Converting_Model_General.md).

## Running

Run the application with the `-h` option yields the usage message:
```
python3 classification_sample.py -h
```
The command yields the following usage message:
```
usage: classification_sample.py [-h] -m MODEL -i INPUT [INPUT ...]
                                [-l CPU_EXTENSION] [-pp PLUGIN_DIR]
                                [-d DEVICE] [--labels LABELS] [-nt NUMBER_TOP]

Options:
  -h, --help            Show this help message and exit.
  -m MODEL, --model MODEL
                        Required. Path to an .xml file with a trained model.
  -i INPUT [INPUT ...], --input INPUT [INPUT ...]
                        Required. Path to a folder with images or path to an
                        image files
  -l CPU_EXTENSION, --cpu_extension CPU_EXTENSION
                        Optional. Required for CPU custom layers. MKLDNN (CPU)-targeted custom layers.
                        Absolute path to a shared library with the kernels
                        implementations.
  -pp PLUGIN_DIR, --plugin_dir PLUGIN_DIR
                        Optional. Path to a plugin folder
  -d DEVICE, --device DEVICE
                        Optional. Specify the target device to infer on; CPU,
                        GPU, FPGA, HDDL or MYRIAD is acceptable. The sample
                        will look for a suitable plugin for device specified.
                        Default value is CPU
  --labels LABELS       Optional. Path to a labels mapping file
  -nt NUMBER_TOP, --number_top NUMBER_TOP
                        Optional. Number of top results
```

Running the application with the empty list of options yields the usage message given above.

To run the sample, you can use AlexNet and GoogLeNet or other image classification models. You can download the pre-trained models with the OpenVINO [Model Downloader](https://github.com/opencv/open_model_zoo/tree/2018/model_downloader) or from [https://download.01.org/opencv/](https://download.01.org/opencv/).

> **NOTE**: Before running the sample with a trained model, make sure the model is converted to the Inference Engine format (\*.xml + \*.bin) using the [Model Optimizer tool](./docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).

For example, to perform inference of an AlexNet model (previously converted to the Inference Engine format) on CPU, use the following command:

```
    python3 classification_sample.py -i <path_to_image>/cat.bmp -m <path_to_model>/alexnet_fp32.xml
```

## Sample Output

By default the application outputs top-10 inference results.
Add the `-nt` option to the previous command to modify the number of top output results.
For example, to get the top-5 results on GPU, run the following command:
```
    python3 classification_sample.py -i <path_to_image>/cat.bmp -m <path_to_model>/alexnet_fp32.xml -nt 5 -d GPU
```

## See Also
* [Using Inference Engine Samples](./docs/IE_DG/Samples_Overview.md)
* [Model Optimizer tool](./docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
* [Model Downloader](https://github.com/opencv/open_model_zoo/tree/2018/model_downloader)


text:
Author: Rydberg Supo Escalante

# File: fpzase.R

The file fpzase.R contain all the functions for the statistical analysis

- filter.pzase: function to filter columns with missing values or variance equal to zeto.

- correlation.dataset: function to reduce a dataset by sorting ascendingly its covariables according to the p-value of simple linear regressions against a variable of interest. Variables with a correlation coefficent greater than |0.8| are dropped and only the variable with the smallest p-value is conserved.

- staic: function to perform a stepwise Akaike Information Criterion forward regression in a given dataset and generate the best model for a fixed number of variables

- model.construction: function to actually construct the best predictive model for a given dataset. It calls the staic function to generate a subset of covariables and evaluate all the models for a fixed number of variables between them. The model with the best R2 is selected.

- random.linear.model: funtion to create random linear models of a fixed number of variables from a dataset.

- plot.model.variables: function to create a heatmap of the correlation coefficient between the variables of a model.

- gg.intervals: function to plot the confidence intervals for the estimated coefficients of a model.

- plot.scatter.model: function to create a scatter plot between the experimental values and the predicted values of a linear model.

- cross.validation: function to perform repated n-fold cross-validation of a model.

- cv.rmse.density: function to plot the distribution of RMSE generated after repeated n-fold cross validation of a model.

- parameter.name: function to add the real name of the variables of a model.

# File: models_construction.R

The file models_construction.R takes seven inputs:

- kinetic_parameters.csv: A CSV file containing the relative experimental means of the kinetic parameters.

- relative_variancs.csv: A CSV file containing the relative experimental variances of the kinetic parameters.

- electrostatic_potentials.csv: A CSV file containing a dataset with the physicochemical descriptors.

- fluctuations.csv: A CSV file containing a dataset with the stability descriptors derived by normal mode analysis.

- rmsf_backbone.csv: A CSV file containing a dataset with the stability descriptors derived by molecular dynamics.

- geometrical_descriptors.csv: A CSV file containing a dataset with the geometrical descriptors.

- descriptors.txt: A text file with the real name of all the descriptros for each data set

The outputs are a group of figures for each modeled kinetic parameter. Three of them are for each individual model (stability, physicochemical and geometrical model) that contains:

- A table with a summary of the model

- A table comparing the prediction RMSE and R2 of the model against a random model of the same kind of predictors

- A scatter plot between fitted and experimental values for the model

- A heatmap for the pearson correlation coefficient between the variables of the model

- A plot of the confidence intervals for the coefficients of the variables of the model

- A comparison of the density plots for the RMSE of prediction of the model and a random model of the same kind of predictors

The fourth plot is for a weighted model fitted with the predictions of the individual models that contains:

- A table with a summary of the model

- A table comparing the prediction RMSE and R2 of the weighted model and the individual models

- A scatter plot between fitted and experimental values for the model

- A comparison of the density plots for the RMSE of prediction between the weighted model and the individual models

path: /models construction/README.md


text:
# EntryClearIconColor
Set the color for the clear icon in a Xamarin Forms entry

* [https://blog.depechie.com/posts/2021-03-28-xf-clear-icon-color/](https://blog.depechie.com/posts/2021-03-28-xf-clear-icon-color/)

![EntryClearIcon](https://github.com/Depechie/depblog/blob/main/content/posts/2021-03-28-XF-Clear-icon-color/images/entryclear.png)

repository: Depechie/EntryClearIconColor

repo_name: Depechie/EntryClearIconColor


text:
---
layout: page
title: Clubs
subtitle: after school clubs 2016-17
---

Rose Park has a variety of after school clubs.

|	Club Name	|	Advisor	|	Meeting Days	|	Meeting Times	|	# of Students	|	Contact Email	|
|----|----|----|-----|----|----|
|	Aces	|	Vincent	|	1st Friday of Every Month 	|	3:00-4:30	|	25, 6th Grade Only	|<EMAIL_ADDRESS>|
|	Battle of the Books	|	R. Coutras 	|	During Lunch	|	10:55-12:20	|	10-20	|<EMAIL_ADDRESS>|
|	Coding Club	|	R. Coutras 	|	Either Mon, Tues, or Thurs	|	3:10-4:10	|	25	|<EMAIL_ADDRESS>|
|	Drama	|	J. Jemison	|	Tues and Thurs	|	3:15-4:30	|	40-50	|<EMAIL_ADDRESS>|
|	Math Club	|	S. Welch	|	Every Other Thurs	|	3:00-4:00	|	15-20	|<EMAIL_ADDRESS>|
|	Newpaper	|	A. Lyell	|	During the Day	|	10:20-11:10	|	10-15	|<EMAIL_ADDRESS>|
|	Pen and Paper	|	J. Martindale	|	Tuesday	|	3:15-4:30	|	15-20	|<EMAIL_ADDRESS>|
|	Science Club	|	C. Denning	|	Every Other Wed	|	3:00-4:30	|	45-60	|<EMAIL_ADDRESS>|
|	Science Olympiad	|	C. Denning	|	Monday	|	3:00-4:00	|	20	|<EMAIL_ADDRESS>|
|	Student Government Assoc (SGA)	|	N. Boleyjack	|	Every Other Wed	|	3:00-4:00	|	25-30	|<EMAIL_ADDRESS>|
|	Technology Student Assoc (TSA)	|	R. Clifton	|	Tuesday	|	3:00-4:00	|	25	|<EMAIL_ADDRESS>|
|	VEX Robotics	|	R. Clifton	|	Tuesday	|	3:00-4:00	|	15	|<EMAIL_ADDRESS>|