text:
CookieCutter Py-Mac-Tool
=============================

A minimal cookiecutter template for a python tool, with a focus on deployment to macOS.

[cookiecutter](https://github.com/audreyr/cookiecutter)

Inspired by: [cookiecutter-pipproject](https://github.com/wdm0006/cookiecutter-pipproject.git)

Goals
-------

The goal of this template is to provide a quick and simple starting point for macOS admins who want to quickly write,
test and release a simple tool, and keep on top of release management after that.

The template provides:

 * Basic skeleton for a python commandline tool
 * Testing with pytest
 * Versioning with bumpversion
 * Scripted release management
 * An autopkg template (the only macOS specific thing about it)

It's deliberately minimal and is supposed to provide a more robust and scalable alternative to just bashing out a few lines one day, and realising you have a sprawling Cthulu of code the next!

Using the template
----------------------

#### Clone the template ####

    $ pip install cookiecutter
    $ cookiecutter https://github.com/gkluoe/cookiecutter-py-mac-tool.git

You will be asked about your basic info (name, project name, app name, etc.). This info will be used in your new project.

A new directory will be created, matching your chosen app name, and a new local git repository will be initialised in it.

#### Initialise Git ####

At this point you'll probably want to make sure you have an empty git repository on a server ready for your new project.
If a repository is found at https://github.com/yourusername/projectname, then you'll be asked:

    We found a remote git repository which looks like it matches this project.
    Do you want to add it as a git remote?

If you answer yes, the remote repository will be added as a git remote, ready for you to push your first commit.

#### Add some functionality ####

The file `projectname/__init__.py` is set up so that you can add some arguments to the `process_args()` function, and then do something with them in `main()`.

That's really all there is to it!

#### Add some tests ####

The template is configured to be used with `pytest`. Any function named test_\*() in any file named test_\*.py inside the 'tests' folder will be collected and run as a test.

Included are 2 sample tests, which:

 1. Run your project against pylint (*test_lint()*)
 2. Check that the version number reported by the tool matches the version number in setup.py (*test_version()*)

#### Run the tests ####
    $ python setup.py test

#### Make a release ####

Once you're happy with your functionality, you can make a release.

    $ ./release.sh [ major | minor | patch ]

This creates a new tag and commits it locally. You'll then want to push the release to your git server:

    $ git push origin [new version]

And then, you probably want to build a package for deployment. The directory `autopkg-recipe` contains an autopkg recipe which you could either copy to your recipes repo, or use directly, like so:

    $ autopkg run --verbose -d autopkg-recipes [project].pkg

You'll end up with a package to install your tool to `/usr/local/bin`. The tool is a wrapper script which uses the functionality in your `__init__.py` file.

Contributing
--------------

Issues/Pull requests welcome. I'm particularly keen for this documetation to be helpful to newcomers, so suggestions for modifications are really appreciated.

License
---------

Apache licensed.

repository: gkluoe/cookiecutter-py-mac-tool

repo_name: gkluoe/cookiecutter-py-mac-tool


text:
# TCP server

[中文页](README_ZH.md) | English

## Introduction

This software package is a TCP server that supports multi-client connection and communication. Using a simple API, you can create a server and communicate with different clients.

This server has the following characteristics:

- Simultaneous operation of multiple servers
- Multiple network card support, support binding to specific IP
- Support blocking reception and non-blocking notification callback reception.
- Support independent exchange of data with different clients.

## Instructions for use

### Dependence

- RT-Thread 3.1.0+
- SAL
- DFS (select)

### Get the package

To use the tcpserver software package, you need to select it in the RT-Thread package management. The specific path is as follows:

```
RT-Thread online packages --->
    IoT-internet of things --->
        [*] TCP Server:A TCP server that supports multiple clients
            (tcpserv) tcpserver name
            (4096) tcpserver stack size
            (12) tcpserver thread priority
            (512) Maximum possible socket usage
            (5) Number of clients supported
            [] Enable debugging features
            [*] Enable sample
                Version (latest) --->
```

- **tcpserver name**: Configure the name of tcpserver
- **tcpserver stack size**: Configure the size of the thread stack
- **tcpserver thread priority**: Configure thread priority
- **Maximum possible socket usage**: the maximum value of sockets that the system may use
- **Number of clients supported**: The number of clients that support simultaneous connections
- **Enable debugging features**: Enable debugging features
- **Enable sample**: Enable sample code
- **Version**: software package version selection

### Using packages

#### API details

##### Create server

Create a TCP server and pass in the ip address and port number of the server.

```
struct tcpserver *tcpserver_create(const char *ip, rt_uint16_t port);
```

**Function Parameters**

| Parameters | Description |
| -------- | --------------------------------- |
| ip | ip address to bind |
| port | Port number to bind |
| **Back** | **——** |
|> 0 | Success, return a tcp server handle. |
| = 0 | Failure |

##### Destroy the server

Destroy a TCP server and reclaim resources.

```
rt_err_t tcpserver_destroy(struct tcpserver *server);
```

**Function Parameters**

| Parameters | Description |
| -------- | ------------------------- |
| server | The handle of the tcp server to be destroyed |
| **Back** | **——** |
| = 0 | Success |
| <0 | Failure |

##### Get the client

Obtain a TCP client, and block a client.

```
tcpclient_t tcpserver_accept(struct tcpserver *server, rt_int32_t timeout);
```

**Function Parameters**

| Parameters | Description |
| -------- | ------------------------------------------------ |
| server | tcp server handle |
| timeout | Waiting timeout time, RT_WAITING_FOREVER means waiting forever. |
| **Return** | **——** |
|> 0 | Success, return a tcp client handle. |
| = 0 | Failure |

##### Close the client

Close a TCP client.

```
rt_err_t tcpserver_close(tcpclient_t client);
```

**Function Parameters**

| Parameters | Description |
| -------- | ---------------- |
| client | tcp client handle |
| **Back** | **——** |
| = 0 | Success. |
| <0 | Failure |

##### Receive data from the client

Receive data from the client.

```
rt_size_t tcpserver_recv(tcpclient_t client, void *buf, rt_size_t size, rt_int32_t timeout);
```

**Function Parameters**

| Parameters | Description |
| -------- | ------------------------------------------------ |
| client | tcp client handle |
| buf | buffer address |
| size | Buffer size |
| timeout | Waiting timeout time, RT_WAITING_FOREVER means waiting forever. |
| **Back** | **——** |
|> 0 | Success, return the received data length. |
| = 0 | Failure |

##### Send data to the client

Send data to the client.

```
rt_size_t tcpserver_send(tcpclient_t client, void *buf, rt_size_t size, rt_int32_t timeout);
```

**Function Parameters**

| Parameters | Description |
| -------- | ---------------------------- |
| client | tcp client handle |
| buf | buffer address |
| size | Buffer size |
| timeout | Waiting timeout time, **not yet implemented** |
| **Return** | **——** |
|> 0 | Success, the length of the data sent. |
| = 0 | Failure |

##### Set event notification callback function

Set the event notification callback function of the server.

```
void tcpserver_set_notify_callback(struct tcpserver *server,
                                   void (*tcpserver_event_notify)(tcpclient_t client, rt_uint8_t event));
```

**Function Parameters**

| Parameters | Description |
| ---------------------- | ---------------- |
| server | tcp server handle |
| tcpserver_event_notify | Function pointer to be set |
| **Back** | **——** |

#### Run the sample program

The software package comes with a sample program for the echo server. After opening the sample program of the software package, you can use it.

Compile, download and run, there will be two commands, `tcpserver` and `tcpserver_stop`. They are creating TCP server and closing TCP server.

First enter the IP address and port number to create a server, and then you can use the network debugging assistant to communicate with this server. Enter `tcpserver_stop` to shut down the server.

```
 \ | /
-RT-Thread Operating System
 / | \ 3.1.3 build Jul 11 2019
 2006-2019 Copyright by rt-thread team
lwIP-2.0.2 initialized!
[4] I/sal.skt: Socket Abstraction Layer initialize success.
msh />ifconfig
network interface device: e0 (Default)
MTU: 1500
MAC: 00 04 a3 12 34 56
FLAGS: UP LINK_UP INTERNET_UP DHCP_ENABLE ETHARP BROADCAST IGMP
ip address: <IP_ADDRESS> # Local IP address
gw address: <IP_ADDRESS>
net mask: <IP_ADDRESS>
dns server #0: <IP_ADDRESS>
dns server #1: <IP_ADDRESS>
msh />tcpserver <IP_ADDRESS> 5000 # Create server
msh />[173861] D/tcpserv: client connect:5 # The client connects successfully
[180220] D/tcpserv: client disconnect:5 # The client disconnects
msh />tcpserver_stop # Shut down the server
msh />
```

## Precautions

- The timeout mechanism of the tcpserver_send function has not been implemented yet
- If the number of supported clients has not been reached, but the total connection is wrong, it may be limited by lwip.

## contact information

- Maintainer<EMAIL_ADDRESS>- Homepage: [tcpserver](<https://github.com/Guozhanxin/tcpserver>)

repository: Guozhanxin/tcpserver

branch_name: refs/heads/master

extension: md

gha_language: C

license_type: permissive

repo_name: Guozhanxin/tcpserver


text:
# Cabbage

The `tst` branch is published at:
[rabbit-cabbage.netlify.app](https://rabbit-cabbage.netlify.app/)

Cabbage is a "full-fat" example project that I use for learning about
[Supabase](https://github.com/supabase/supabase).

I also publish articles on the [Kopi blog](http://kopi.cloud/blog/) using
Cabbage as a worked example. Yes, those articles are (partly) content marketing
for Kopi.

Ask questions or make suggestions in the Discussions of the Github repo.

## Structure

* [.github](/.github) - github action config
* [/app/](/app) - client app
* [/database/](/database) - database schema management
* [/doc/](/doc) - misc documentation, notes, etc.
* [/gradle/](/gradle) - gradle wrapper stuff
  * used for bootstrapping Gradle

I'm using [Gradle](https://docs.gradle.org/current/userguide/userguide.html),
[Flyway](https://flywaydb.org/documentation/), Java etc. just because they're
the tools that I know best.
I'm not saying this is the Correct Way to do things.

license: MIT

repository: jasonadkison/cabbage

branch_name: refs/heads/main

repo_name: jasonadkison/cabbage


text:
Jan 20 2014
===========

### Todo
- write notes in markdown format
- show some of the syntax
- encourage other members to record what they do, as they do it
  to assist their memory

### Done
- Wrote down some commends in markdown
- Demonstrated making journal entries with different categories

### Discussion
- Stuff that is more than a goal or agenda item goes here, like verbal
  explanations of an algorithm idea you want to implement.

Jan 20 2014
===========

### Todo
- comment on Assets.odt in journal
- talk about differences from whats going to to original implementation
- Illustrate a path generation technique

### Done
- Discussed one difference
- Posted a working path generator

### Discussion
- Original game had colored bariers. I want to change this to colored paths so
  that the procedural level generation is easier to program and checking for
  solvability is easier.
- Path generator does not produce actual mazes, is only meant to illustrate joining paths and storing them separately

repository: MDBrothers/MazeGame

repo_name: MDBrothers/MazeGame


text:
# Egret Engine 5.1.2 Release Notes

---

Egret engine was officially released in December 2017 version 5.1. This version is a functional iteration of the 5.1 version, the main goal is to add support for WeChat mini game and add AssetsManager Explorer.

## WeChat mini game

Egret engine has been added in the 5.1.1 version of WeChat mini game support, this feature is currently a lot of developers to actively use and feedback, we collected a lot of developer feedback, and added the following features:

* Create WeChat mini game project can not be passed into the appid, Egret engine for developers to set a WeChat for developers to provide the default value
* Added the current release target function, developers can set the current release target. For example, if you set the publishing target to wxgame, the developer will have to go egret build / egret publish / egret run without adding the --target wxgame field.
* WeChat mini game support package updated to version 1.0.4, the new project template adds a WeChat mini game API can be directly called the Demo, and add manually modify the screen size of the API
* Egret engine project template upgrade, developers do not need to manually modify the `` `scripts / config.ts``` can automatically generate a small game project
* Add `` `egret run --target wxgame``` command, developers can start this app by directly launching WeChat web developer tool to preview the game.

Due to the addition of these features, we strongly encourage developers to use Wechat Engine version 5.1.2 for the development of WeChat mini games instead of the 5.1.1 version released two weeks ago.

## Resource Manager AssetsManager

The Egret Engine introduced a Resource Manager named ResourceManager as an alternative to the RES module in version 4.0. After a year of user feedback gathering and functional iteration, we formally adopted ResourceManager as the default module for creating new projects in version 5.1.2, replacing the RES module completely and officially changing it to the AssetsManager.

The previous ResourceManager module has exactly 90% of the APIs of the RES module, and the AssetsManager inherits this. At the same time, the AssetsManager fully supports the configuration of the RES module like `` `default.res.json``` File to ensure that as much as possible to ensure that developers continue to use their familiar workflow and a gradual migration.

While updating AssetsManager, we also added two very useful build pipeline plug-ins for the resource management module, namely:

* Resource configuration file automatically generated plug-in, developers can use this plug-in `` `default.res.json`` configuration file automatically generated
* Texture set automatically merge plug-ins, developers can use this plugin to automatically merge textures in egret publish``

When using the AssetsManager instead of the RES module, the following incompatibilities exist:

* RES.Analyzer API is no longer supported, instead RES.Processor API is used instead
* If you try to get a configuration that does not exist in the resource configuration file, an exception is currently thrown instead of returning null

Although we advise developers to use the AssetManager module, the Egret engine still allows developers to continue using the RES module. Instead, the developer only needs to modify the `` assetsmanager`` in the `` `egretProperties.json``` configuration file to `` `res``` and execute` `` egret clean``` can.

## BUG fix

* Fixed bug where release mode was set to commonjs if developer used custom namespace on className property of exml file,
* Fixed exml file generated exml.e.d.ts file, the skin file does not inherit the problem of eui.Skin correctly
* Modified egret publish's default publishing path to fix conflicts that Egret Wing has posted while merging textures
* Fixed bug where eui layout was abnormal under certain circumstances
* Fixed an irregular mask drawing position offset problem
* Fixed an issue with using filters that caused the drawing position to shift

# More features stay tuned

In the egret engine 5.1 update log, we mentioned that version 5.1 will provide developers with the following features step by step:

* Switch the built-in resource load module to the Egret ResourceManager
* Improve EUI loading speed and resource size
* Dramatically improve native App performance
* More release platform support
* Faster build speed

Currently, we have completed the support of the built-in resource loading module migration ResourceManager (renamed AssetsManager) and the WeChat mini game publishing platform, and initially improved the loading speed and resource size of the EUI. We will provide the following functions as soon as possible Ensure that version 5.1 stable

* Further improve EUI's loading speed and resource size
* Dramatically improve native App performance
* WeChat gaming platform better support
* Faster build speed

repository: joyjjjjz/egret-core

gha_license_id: NOASSERTION

repo_name: joyjjjjz/egret-core


text:
---
name: Feature request
about: Suggest a new feature for Project Klokwrk
title: ""
labels: "feature"
assignees: ""
---

<!--
  Please use Markdown syntax throughout the report for improved clarity.
  https://guides.github.com/features/mastering-markdown/
-->

## Basic information
* Project Klokwrk version:
  <!-- released version or snapshot version -->
  <!-- for snapshot version include main branch commit SHA (i.e. as given from "git rev-parse HEAD" command) -->
* Gradle version info:
  <!-- output of "./gradlew --version" command -->
* Module:
  <!-- Please, include name(s) of relevant Project Klokwrk's module(s). If not related to any specific module, specify "project" instead. -->

## Feature description
<!--
  Please, describe the feature you envision.
  For example, you might include (pseudo-)code snippets showing what it might look like.
-->

### Current behavior
<!-- Please, provide the current behavior around this topic, if applicable. -->

### Wanted behavior
<!-- Please, describe the desired outcome around the suggested feature. -->

### Possible workarounds
<!-- Please, share any workarounds for the described feature, if applicable. -->

repository: samuelzv/klokwrk-project

repo_name: samuelzv/klokwrk-project


text:
# newbie

# Getting Started with Me

This project is available with [Create Newbie App](https://github.com/maloymace/newbie.git).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

## How to prepare Me

Read about the process at [Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-deploy-a-react-application-to-digitalocean-app-platform)
* `mkdir maloymace`
* `cd maloymace`
* `git clone https://github.com/maloymace/newbie.git`
* `cd newbie`
* `install nodejs`
* `npm start`

**Note: you need node_modules folder here, so, to get it you can just run `npx create-react-app digital-ocean-app` in other dir and find it! Don't forget copy to the newbie**

repository: dimonstrik/newbie

repo_name: dimonstrik/newbie


text:
# Type Rider

## About the game

### General

* The game is an infinite runner with typing controls.
* You take control of a spirit that is stuck in some kind glitch in the space-time continuum.

### Controls

* Move by typing the displayed keywords and pressing 'Enter', the direction is shown by arrows on the HUD.
* You can erase letters with 'Backspace', or erase an incomplete keyword with 'Enter'.
* Hold 'Spacebar' to fast-forward.
* Press 'Escape' while playing to pause the game.
* If power-ups are available, use them by pressing '1', '2' or '3'. This is shown on the HUD.

### Mechanics

* Obstacles damage you, avoid them. A healthbar is shown on the HUD.
* Score increases in two ways:
	* By picking up coins.
	* By surviving. Score is added non-stop based on your current velocity.
* The difficulty setting affects four things:
	* Initial velocity.
	* Acceleration (your velocity increases over time so you will lose eventually).
	* Score multiplier.
	* The length of the keywords.
* Power-ups can be picked up, here are some details:
	* They are not activated automatically.
	* Once picked up, activate them at any time with '1', '2, or '3'.
	* You can only have one of each type of power-up at any time.
* Using power-ups helps you survive, there are three types:
	* Invulnerability: Become invulnerable for a few seconds. Keybind: '1'.
	* Slow-motion: Slow time for a few seconds. Keybind: '2'.
	* WASD: Move freely for a few seconds with the WASD or arrow keys. Keybind: '3'.
* Keywords:
	* Correct letters are highlighted green.
	* Wrong letters are highlighted red.
	* Letters that go past the length of the word are displayed as red asterisks.

## Attributions

Assets not listed below were made by us.

### Sounds

* Power-up used: [jobro](https://freesound.org/s/33523/)
* Power-up ending: [tec_studio](https://freesound.org/s/125645/)

### Textures

* Space skybox: [Adam Bielecki](https://assetstore.unity.com/packages/2d/textures-materials/milky-way-skybox-94001)
* Floor dirt texture: [Wikipedia](https://commons.wikimedia.org/wiki/File:Dirt_texture.jpg)
* Asteroid texture: [Wikipedia](https://commons.wikimedia.org/wiki/File:Rock_high_resolution_texture.jpg)
* Table wood texture: [Wikipedia](https://commons.wikimedia.org/wiki/File:Surface_wood_chipboard.jpg)

### Keywords

* Word-banks: [first20hours](https://github.com/first20hours/google-10000-english?fbclid=IwAR1Mi3qfB4rwz5EMBJL7slensN3lWBD2gnVuTAQLCYZwXxc2ddoF7FRxeYg)

repository: CGDD-Savitr/TypeRider-Zombies

repo_name: CGDD-Savitr/TypeRider-Zombies


text:
![screenshot](http://i.imgur.com/cRUIsqK.png)
# Hapi Universal Redux
Fork from Rick Wong's [React Isomorphic Starterkit](https://github.com/RickWong/react-isomorphic-starterkit), with [Redux](https://github.com/gaearon/redux) added to the isomorphic mix.

Isomorphic starterkit with server-side React rendering using
[npm](https://www.npmjs.com/),
[piping](https://github.com/mdlawson/piping),
[webpack](https://webpack.github.io/),
[webpack-dev-server](https://github.com/webpack/webpack-dev-server),
[hapi.js](http://www.hapijs.com/),
[babel.js](http://babeljs.io/),
[react.js](https://facebook.github.io/react),
[redux](https://github.com/gaearon/redux),
[react-router](https://github.com/rackt/react-router),
[react-hot-loader](https://gaearon.github.io/react-hot-loader),
[react-transmit](https://github.com/RickWong/react-transmit),
[radium](https://github.com/FormidableLabs/radium)

## Features

- Fully automated with npm run scripts
- Server hot reloads with piping and Hapi.js
- Webpack for watch + production builds
- React.js + Router on the client and server
- React Hot Loader for instant client updates
- Babel.js automatically compiles ES6 + ES7
- React Transmit to preload on server to client
- Radium for styling components
- Redux for managing app state

It just works out-of-the-box.

## Installation

```bash
	git clone https://github.com/luandro/hapi-universal-redux.git
	cd hapi-universal-redux

	npm install
	npm run dev     # changed from original for ease

	# production build and run
	NODE_ENV=production npm run build
	NODE_ENV=production npm run start
```

## Usage

Run `npm run dev` in your terminal and play with `views/Main.js` to get a feel of
the server-side rendering and client-side hot updates.

## License

BSD 3-Clause license. Copyright © 2015, Rick Wong and Luandro. All rights reserved.

repository: Evangelize/api-server

repo_name: Evangelize/api-server


text:
# CPT

> A template for npm module use coffee script

## Getting Started

### First
Install `gulp`.
If you haven't use `Gulp` , I think you should use it to save your short life.
To install `gulp` you can have a look at this repo https://github.com/gulpjs/gulp or just use this command:

```shell
    npm i -g gulp
```

### Second
Clone this repo:

```shell
    git clone git@github.com:xeodou/CPT.git
```

## Usage

### Compile Coffee Script

Use `gulp coffee` transfer coffeescript to javascript.

### Test

Use `gulp mocha` to test your code with mocha.

## License

MIT

repository: xeodou/cpt

repo_name: xeodou/cpt


text:
---
layout: page
title: About Author
permalink: /about/
tags: about
---

This website is maintained by [Hyeji Kim](http://sites.utexas.edu/hkim/)

Creators:

* [Hyeji Kim](http://sites.utexas.edu/hkim/)
* [Sewoong Oh](https://homes.cs.washington.edu/~sewoong/)
* [Pramod Viswanath](http://pramodv.ece.illinois.edu/)

List of contributors:

- John Do
- Please [reach us](https://hyejikim1.github.io/contact) to contribute a post on our website.


text:
## Install

Clone the repository:

```sh
git clone https://github.com/exogen/badge-matrix.git
cd badge-matrix
```

Install dependencies. Note that one of the dependencies is
[node-canvas](https://github.com/Automattic/node-canvas), which has system
requirements that must be satisfied outside of npm.

```sh
npm install
```

The file `Verdana.ttf` should ideally exist in the root of the repository
(it’s used as the default font for measuring text width). But we can’t
distribute it due to licensing, so you should place the file there yourself.
A helper command is included:

```sh
npm run add-font
```

Then start the server:

```sh
npm run start
```

## Deploy to Heroku

First associate the repository with an app.

Create a new app:

```sh
heroku create my-badges-app
```

…or if you already have one:

```sh
heroku git:remote -a my-badges-app
```

Then simply run:

```sh
npm run deploy
```

The deploy script will ensure that you have a `heroku` remote, set your
app’s buildpack, and push.

repository: coolzoom/badge-matrix

gha_license_id: MIT

repo_name: coolzoom/badge-matrix


text:
# Scalability basics

- Web hosts - Bluehost, GoDaddy etc.
- Shared hosts vs VPS(**Virtual Private Server**):
  - In shared hosts, you have to share an OS on a machine with others.
  - In VPS, you get a dedicated virtual machine on some server, with fixed allocation of RAM, CPU etc.
  - Example of VPS - **Amazon EC2**; allows you to start/stop more virtual machines dynamically based on real-time server load.
- Types of scaling:
  - **Vertical scaling**:
    - Add more CPU to the server.
    - Not feasible due to real-life constraints (one server cannot have more than, say 128 GB).
  - **Horizontal scaling**:
    - Use cheaper hardware, but more of them.
    - So need **load balancing**.
    - Load balancer will have the public IP, not the internal multiple servers.
    - Should we duplicate data on all servers??
    - Maybe we can use one server for images, one for videos, one for music etc.
    - But the problem with that is that this does not solve the scalability problem at all. If all the user are just loading php files, then we are back at the original problem.
    - We can load balance based on the server load; the next request will be sent to the server with the least load.
    - Or we can round-robin simply.
    - We can also set the DNS server to return the internal IP names in round-robin.
    - If a power user connects to IP1, he will not be assigned to IP2 for the second request because of OS/browser-level **caching**.
    - Note that we need to allocate a machine specifically for **user session files**.
    - Because lets say the user adds product A while being connected to IP1, and adds product B while on IP2. So no consistency.
    - We could use just one server for all the data, including session variables, but what if that machine goes down??
    - For redundancy, we could use **RAID**.
    - Or we could just use a distributed database.
    - We can also use cookies to store the IP of the server they were on. So that they always get connected to the same server.
      This way no way to sync session variables at all.
    - Rather than storing data in the cookie, we can just store a random user-id in that cookie. This is so that cookies do not expose any internals.
    - The random-id will be remembered by the load balancer.
    - If the user disables cookies, then we are in trouble!

# Scalability vs Performance

- A service is said to be scalable if when we increase the resources in a system, it results in increased performance in a manner proportional to resources added.
- Increasing performance in general means serving more units of work, but it can also be to handle larger units of work, such as when datasets grow.
- In distributed systems there are other reasons for adding resources to a system; for example to improve the **reliability** of the offered service.
- Introducing redundancy is an important first line of defense against failures.
- An always-on service is said to be scalable if adding resources to facilitate redundancy does not result in a loss of performance.

## Why is scalability so hard?

- Because **scalability cannot be an after-thought**.
  It requires applications and platforms to be designed with scaling in mind, such that adding resources actually results in improving the performance or that if redundancy is introduced the system performance is not adversely affected.
- A second problem area is that growing a system through scale-out generally results in a system that has to come to terms with **heterogeneity**.
  Resources in the system increase in diversity as next generations of hardware come on line, as bigger or more powerful resources become more cost-effective or when some resources are placed further apart.
  Heterogeneity means that some nodes will be able to process faster or store more data than other nodes in a system and algorithms that rely on uniformity either break down under these conditions or underutilize the newer resources.

![scalability-terminology-overview](assets/scalability-terminology-overview.jpg)

## General recommendations:

- Immutability as the default.
- Referential transparency.
- Laziness.
- Think about your data! (Different data need different guarantees)

---

# Replication

## Master-Slave

- Operations done on master replicated on all the slaves. Each machine is completely independent having its own db etc.
- Algorithms that elect a slave to a master on master failure.
- We can also load-balance the read queries by redirecting the read queries to the slaves.
- Problem is that if master dies, writes will fail till the election is complete.
  ![Multi-slave design illustration](assets/master-slave.png)

## Master-Master

- 2 masters and multiple slaves for each master.
  ![Multi-master design illustration](assets/master-master.png)

## Buddy replication

- What me and my flatmates do with our room keys.
  ![Buddy replication before failure](assets/buddy-replication1.jpg)
  ![Buddy replication after failure](assets/buddy-replication2.jpg)

## Multi-tier load balancing + replication

![Multi-tier design illustration](assets/multi-tier.png)

- Point of failure: Load balancer itself.
- Solution - Make a master-master design from 2 load balancers :p

## Partitioning

![Partitioning design illustration](assets/partitioning.png)

- If user's name starts with A-M, send them to partition 1, else partition 2.
  ![Sharding partition](assets/sharding_partitioning.jpg)
  ![Sharding replication](assets/sharding_replication.jpg)

## High Availability

![HA design illustration](assets/high-availability.png)

- If one master dies, the other takes over.

# Consistency patterns

With multiple copies of the same data, we are faced with options on how to synchronize them so clients have a consistent view of the data.
Recall the definition of consistency from the CAP theorem - **Every read receives the most recent write or an error**.

## Weak consistency

- After a write, reads may or may not see it. A best effort approach is taken.
- This approach is seen in systems such as memcached.
- Weak consistency works well in real time use cases such as VoIP, video chat, and realtime multiplayer games.
- For example, if you are on a phone call and lose reception for a few seconds, when you regain connection you do not hear what was spoken during connection loss.

## Eventual consistency

- After a write, reads will eventually see it (typically within milliseconds). Data is replicated asynchronously.
- This approach is seen in systems such as DNS and email. Eventual consistency works well in highly available systems.

## Strong consistency

- After a write, reads will see it. Data is replicated synchronously.
- This approach is seen in file systems and RDBMSes. Strong consistency works well in systems that need transactions.

# Availability patterns

There are two main patterns to support high availability: **fail-over** and **replication**.

## Fail-over

### Active-passive

- Heartbeats are sent between the active and the passive server on standby.
- If the heartbeat is interrupted, the passive server takes over the active's IP address and resumes service.

### Active-active

- Both servers are managing traffic, spreading the load between them.

### Limitations of failover

- Fail-over adds more hardware and additional complexity.
- There is a potential for loss of data if the active system fails before any newly written data can be replicated to the passive.

---

# Load balancer

![Load balancer design](assets/load-balancer.png)

**Uses**:

- Preventing requests from going to unhealthy servers.
- Preventing overloading resources.
- Helping eliminate single points of failure.
- SSL termination - Decrypt incoming requests and encrypt server responses so backend servers do not have to perform these potentially expensive operations.
  Removes the need to install X.509 certificates on each server
- Session persistence - Issue cookies and route a specific client's requests to same instance if the web apps do not keep track of sessions

To protect against failures, it's common to set up multiple load balancers, either in _active-passive_ or _active-active_ mode.
A load balancer is also a kind of **reverse-proxy**.

## Limitations of load balancer

- The load balancer can become a performance bottleneck if it does not have enough resources or if it is not configured properly.
- A single load balancer is a single point of failure, configuring multiple load balancers further increases complexity.

## Reverse-proxy vs Forward-proxy

- Forward proxy is installed in the front of the client machine.
- Reverse proxy is installed in front of the servers.

---

# DNS (Domain Name System)

![DNS architecture](assets/DNS.jpg)

# Miscellaneous

## Partition tolerance strategies.
- Lets say the cluster had 10 servers.
- 1 server crashed leading to 2 connected graphs of size 7 and 2.
- If we let all the remaining nodes be alive and serving requests, it can lead to inconsistency.
- Now, we can let the smaller cluster deactivate itself entirely and let the bigger one run, so that atleast the system is functional and consistent.
- But how do we know which cluster is smaller or larger?
- Note that there is no centralized coordinator over here.
- One solution is that every node will ping every other node.
- If the number of acks is >= n/2, then that means the current node is in the majority cluster and should be kept alive.
- Otherwise, the current node is in the minority cluster and should be deactivated.
- But there is a problem in this strategy. What if there are multiple partitions, and none of the subgraphs are of atleast n/2 size.
- In this case the whole system gets deactivated.
- By the way this is called a quorum.
- Source - <https://www.youtube.com/channel/UC-X5TC3ir8_8pi0ElvVXnFQ>.

## Types of Failures
- Crash (or even worse; crashloop).
- Data corruption.
- Dependent service dead suddenly.
- DDOS attack.
- Cascading failure (thundering herd).
- Testing (Heisenbug).
- Natual disaster.

- Network failure -> Handled by TCP-IP.

### Single Node failures

#### Fail stop
- Crash
- Power outage.
- Hardware failure.
- Disk/memory full.

**Solutions:**
- Checkpoint state and restart -> High latency.
- Replicate state and fail-over -> Costly (Requires multiple servers).

#### Byzantine Failures
- Everything that is not fail-stop.
- Bit flip in memory.
- Node starts running malicious code deployed by rogue employee.
- Too many failures -> solution impossible.
- Goal is to turn it into fail-stop state using checksums, assertions, timeouts etc.
- Handling byzantine failures are extremely hard.
- Most systems do not need to worry about these.
- Most common failure -> Flaky/Malicious node is sending wrong/conflicting messages.
- Examples: Bitcoin and flight controls.
- Watch [this](https://www.youtube.com/watch?v=_e4wNoTV3Gw) to learn more.

# Measuring reliability and performance.

- **SLI (Service Level Indicator)**: What are we measuring (Query response for example)??
- **SLI (Service Level Objective)**: How well we want to do the SLI?? (99.5% request served within 1.5 ms).
- **SLA (Service Level Agreement)**: Consequences on failing SLI (penalty fees).


text:
---
layout: post
title: Setting up a Web Server on Ubuntu/Debian
date: 2011-07-23 00:59:09.000000000 +01:00
categories:
- Linux
- Server Administration
- Web Development
tags:
- apache
- apt-get
- debian
- mysql
- php
- phpmyadmin
- ubuntu
- web server
status: publish
type: post
published: true
author: Joseph Wynn
---

Setting up a web server with Apache, PHP, and MySQL on any Debian-based system is really easy thanks to APT (Advanced Packaging Tool). Follow along and you'll have a web server set up within fifteen minutes.<!--more-->

#### Requirements

*   apt-get
*   root privileges, or sudo
*   70MB free space
*   15 minutes

#### Install Apache

```
sudo apt-get install apache2
```

#### Enabling .htaccess overrides

.htaccess overrides are a common component of many web applications. To enable .htaccess overrides, first open `/etc/apache2/sites-available/default` with the text editor of your choice (e.g. `sudo nano /etc/apache2/sites-available/default`). Inside the `<VirtualHost *:80>` section, set `AllowOverride` to `All`.

Next, create a symbolic link to the rewrite module in the mods-enabled directory:

```
sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
```

Now restart Apache for the changes to take effect (see [Starting and stopping the web server](#starting-and-stopping-the-web-server)).

#### Install PHP

```
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
```

Note that the php5 package may already include libapache2-mod-php5, so the second command might not be required.

#### Install MySQL

```
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
```

#### Starting and stopping the web server

After installing everything, you should restart Apache to make sure it reads your updated configuration file. Simply use `sudo apache2ctl graceful-stop` to stop the server and `sudo apache2ctl start` to start it again. (It is good to get into the habit of doing a `graceful-restart` instead of a plain `restart`, as well as doing a `graceful-stop` instead of a regular `stop`.)

### Optional Extras

Below is a list of useful tools and modules that I recommend installing. Remember to restart your web server after installing a new module.

#### phpMyAdmin

phpMyAdmin is an in-browser MySQL administration interface written in PHP. Installing phpMyAdmin will require an extra 20MB of disk space, as it is dependant on several other packages.

```
sudo apt-get install phpmyadmin
```

Once phpMyAdmin is installed, open `/etc/apache2/apache2.conf` with the text editor of your choice (e.g. `sudo nano /etc/apache2/apache2.conf`) and add this line at the bottom of the file:

```
Include /etc/phpmyadmin/apache.conf
```

#### APC

APC (Alternative PHP Cache) can provide significant performance boosts to PHP applications by optimising and caching PHP intermediate code. I highly recommend installing APC as it a great caching mechanism and will even be [built into the PHP core as of version 5.4](http://en.wikipedia.org/wiki/List_of_PHP_accelerators#Alternative_PHP_Cache_.28APC.29).

```
sudo apt-get install php-apc
```

The APC team have written a script which is useful for monitoring the cache and fine-tuning settings. Unfortunately the script isn't downloaded when you install APC using apt-get, but you can [get the script here](http://pastebin.com/GKSyafs1).

#### cURL

cURL is a PHP library that allows you to communicate with different types of servers using many protocols including APTTP, HTTPS, FTP, telnet, LDAP, and more. cURL is especially useful for making API calls.

```
sudo apt-get install php5-curl
```

#### PHP GD

The GD library allows you to create and manipulate images in various formats including <acronym title="Graphic Interchange Format">GIF</acronym>, <acronym title="Portable Network Graphics">PNG</acronym>, <acronym title="Joint Photographic Experts Group">JPEG</acronym>, <acronym title="Wireless Bitmap">WBMP</acronym>, and <acronym title="X PixMap">XPM</acronym>. It is almost essential for any image processing like cropping and resizing.

```
sudo apt-get install php5-gd
```

branch_name: refs/heads/jekyll-src

gha_language: HTML


text:
# 2. Complete the data inventory form

Prepare a pre-submission [data inventory form](https://goo.gl/forms/)

Having this information helps the Gen3 submission team prepare for your project and setup your storage access credentials using the authentication method you provide in the form.

gha_language: Python


text:
# 26. Request Logging

- Add a middleware to log something for each request.
- Requires creating a struct with some request values and passing it down through context.
- Ensure web.Respond updates the value.

## File Changes:

```
Modified cmd/sales-api/internal/handlers/check.go
Modified cmd/sales-api/internal/handlers/product.go
Modified cmd/sales-api/internal/handlers/routes.go
Modified internal/mid/errors.go
Added    internal/mid/logger.go
Modified internal/platform/web/response.go
Modified internal/platform/web/web.go
```

gha_language: Go


text:
# train-winrm - Train Plugin for connecting to Windows via Remote Management

[![Gem Version](https://badge.fury.io/rb/train-winrm.svg)](https://badge.fury.io/rb/train-winrm)
[![Build status](https://badge.buildkite.com/f293066ffe281ec41dc14fe941a2bafbdfa8110c0cd4024c88.svg?branch=master)](https://buildkite.com/chef-oss/inspec-train-winrm-master-verify)

* **Project State: Active**
* **Issues Response SLA: 3 business days**
* **Pull Request Response SLA: 3 business days**

This plugin allows applications that rely on Train to communicate with the WinRM API.  For example, you could use this to audit Windows Server 2016 machines.

This plugin relies on the `winrm` and `winrm-fs` gems for implementation.

Train itself has no CLI, nor a sophisticated test harness.  Chef InSpec does have such facilities, so installing Train plugins will require a Chef InSpec installation.  You do not need to use or understand Chef InSpec.

Train plugins may be developed without a Chef InSpec installation.

## To Install this as a User

### ChefDK Installation

After August 2019, this plugin will be distributed with ChefDK; you do not need to install it separately.

### Manual Installation using `inspec plugin install`

Train plugins are distributed as gems.  You may choose to manage the gem yourself, but if you are an Chef InSpec user, Chef InSpec can handle it for you.

You will need Chef InSpec v2.3 or later.

Simply run:

```
$ inspec plugin install train-winrm
```

You can then run, using Chef InSpec as an example:

```
you@home $ inspec some-profile winrm://someuser@somehost --password somepassword
```

From Ruby code, you may use this plugin as follows:
```
require 'train'
transport = Train.create(
  'winrm',
  host: '<IP_ADDRESS>',
  user: 'Administrator',
  password: '...',
  ssl: true,
  self_signed: true
)
conn = transport.connection
```

## Target Options for Train-WinRM

### host

Required `String`. The hostname or IP address used for connection.

#### port

Optional `Integer`, default 5985 (plain) or 5896 (SSL). The port number to which the connection should be made.

### user

Optional `String`, username used for sign in.  Default `Administrator`.

### password

Optional `String`, password used for sign in. None sent if not provided.

### ssl

Optional `Boolean`. Defaults to `false`. Determines whether to use SSL to encrypt communications.

Several other options exist. To see these options, run:

```
puts Train.options('winrm')
```

## Reporting Issues

Bugs, typos, limitations, and frustrations are welcome to be reported through the [GitHub issues page for the train-winrm project](https://github.com/inspec/train-winrm/issues).

You may also ask questions in the #inspec channel of the Chef Community Slack team.  However, for an issue to get traction, please report it as a github issue.

## Development on this Plugin

### Development Process

If you wish to contribute to this plugin, please use the usual fork-branch-push-PR cycle.  All functional changes need new tests, and bugfixes are expected to include a new test that demonstrates the bug.

### Reference Information

[Plugin Development](https://github.com/inspec/train/blob/master/docs/dev/plugins.md) is documented on the `train` project on GitHub.

### Unit tests

Run `bundle exec rake test:unit` to run the unit tests.

### Testing changes against a Windows Machine

Install Vagrant and VirtualBox. Check the Vagrantfile to verify that it references a Windows 2016 evaluation VagrantBox to which you have access.

Then, run `bundle exec rake test:integration`. There are sub-tasks you can use to run only the integration tests; to see a list of all tasks, run `rake -aT`.

repository: inspec/train-winrm

gha_language: Ruby

repo_name: inspec/train-winrm


text:
#  Todo File

1) Initiate location tracking on app startup if sending chats exist in core data :white_check_mark:
2) Recreate location subscription when app started with background request (https://github.com/malcommac/SwiftLocation#background_monitoring) :white_check_mark:
3) Allow alternative backend servers :white_check_mark:
4) Change to full usernames when sending, don't recreate assuming server name :white_check_mark:
5) Delete keys locally when used in a received pre-key message  :white_check_mark:
6) Fix occasional failure to load OLM account data from KeyChain and subsequent deletion of all data :white_check_mark:
7) When loading from keychain does fail delete stored chats as well :white_check_mark:
8) Fix 'Failed to Send Message' error. :white_check_mark:
9) When Stop Transmission clicked in Chat screen only delete chat if not also receiving :white_check_mark:
10) Create method to delete chat :white_check_mark:
11) Handle no prekeys available remotely :white_check_mark:
12) Ensure device deleted on server when logging out :white_check_mark:
13) Fix appearance of navbar items on content screen :white_check_mark:
14) Improve error descriptions :white_check_mark:
15) Handle upoad new prekeys when running low :white_check_mark:
16) Perform sync on loading content and chat pages :white_check_mark:
17) Animate sync icon :white_check_mark:
18) Handle preservation of user data on logout :white_check_mark:
19) Fix timeout on sync :white_check_mark:
22) Fix hidden text on chat screen in dark mode :white_check_mark:
23) Centre map on pin on page load :white_check_mark:
24) Fix fail on alternate syncs :white_check_mark:
25) Prevent infinite loop in newLocationReceived :white_check_mark:
26) Send locaiton update immediately on new chat creation to check user/device name etc :white_check_mark:
27) Fix chat from same user different device doesn't appear as new device. :white_check_mark:
28) Add text to login page clarifying exact login address :white_check_mark:
29) Set zoom level for intial map :white_check_mark:
30) Fix allow multiple openings of set server dialog :white_check_mark:
31) Fix location pin only shows once :white_check_mark:
32) Fix location pin doesn't update :white_check_mark:
33) Fix doesn't stop location tracking when deleting last transmitting chat :white_check_mark:
34) Allow dismissal of altered chat alert
35) Handle user deleted chat but still receiving chats
36) Handle transmission of user stopped sending location
37) Check altered session warning correctly displayed
38) Fix transmission pop up not displayed on physical phone
39) Fix New Chat modal warnings appear when loded with existsing text even if text valid
40) Fix background colors
41) Fix re-establishing session

Note:

To ensure toDevice messages go through update 'since' when syncing.

Note:

Iphone connecting and disconnecting? Use `sudo killall -STOP -c usbd`

repository: matthewroche/Swift-Maps

repo_name: matthewroche/Swift-Maps


text:
# Phylogenomics with PHYling

PHYling is a package for building species trees by identifying homologs to a core set of phylogenetic marker genes and performs the steps to identify, extract sequences, align, and build trees. It is mostly aimed around using existing protein profile Hidden Markov Models. Taking advantage of the work from OrthoDB and BUSCO team we can use markers from those projects as input.

## Fungi work

A set of protein coding markers were developed over the course of the **A**ssembling the **F**ungal **T**ree **O**f **L**ife (AFTOL). (Citations) The first set of 3 protein coding markers were RPB1, RPB2, and EF1alpha we call AFTOL1. Further work using a collection of **N** genomes identified a set of 70 markers called AFTOL2 which were all named by their _Saccharomyces cerevisiae_ gene names ([Floudas 2012](http://dx.doi.org/10.1126/science.1221748)). Further work from the Joint Genome Institute orthologous gene clustering of Dikarya fungal genomes in ~2011 generated a set of markers we named JGI_1086. This set of 434 were generally single copy genes found in the Dikarya fungi.

Additional work using the BUSCO / OrthoDB v9 release - fungi_odb9 - have also been deployed as markers for phylogenomic studies (cite Li et al) which number ~300 (Check that). Some of my analyses found these markers did not perform as well as the JGI_1086 set. The version 10 OrthoDB markers were released in (check date) and the fungi_odb10 set tested. Tests with this marker set on the 1000 fungal genome dataset has demonstrated better congruence with previous expectations of the fungal phylogenetic tree.

# Preparing data for PHYling

Checking out the code

Creating folders:
 - pep
 - cds

 config.txt file

# Running PHYling

PHYling can be downloaded from [github](https://github.com/stajichlab/PHYling_unified). This can be checked out with.
```bash
git clone https://github.com/stajichlab/PHYling_unified.git
```
### Tool Dependencies
 - [HMMer](http://hmmer.org/) 3.x including the easel tools (esl-XXX).
 - [TrimAl](http://trimal.cgenomics.org/)
 - [muscle](http://drive5.com) if you want to do _de novo_ alignment instead of aligning to the HMMs with hmmalign

### Data Dependencies
 The folder of HMM models need to be a directory called HMM. Each model set (eg JGI_1086, fungi_odb10) are in a folder with that name within the HMM folder.
 Several datasets are available from [1KFG HMMs repository](https://github.com/1KFG/PHYling_HMMs_fungi).
 - AFTOL_1
 - AFTOL_70
 - Roz200
 - JGI_1086

Additional current best practices markers are available from [BUSCO Fungi](https://busco.ezlab.org/frames/fungi.htm) [fungi_odb10] or for other organisms [BUSCO v4 / ODB10](https://busco.ezlab.org/busco_v4_data.html)

## Preparing input data

Protein files are typically named with a common suffix (`aa.fasta`) and are located in the `pep` folder. This default can be changed in the `config.txt` file with the `PEPDIR` and `PEPEXT` parameters.

Here's a complete `config.txt` example
```text
#basic setup needs to be changed
PHYLING_DIR=__FIXME__
HMM=__CHANGEME__
PREFIX=__CHANGEME__
HMM_FOLDER=HMM
PEPDIR=pep
CDSDIR=cds
INPEPEXT=aa.fasta
INCDSEXT=cds.fasta
ALLSEQNAME=allseq
OUTPEPEXT=aa.fa
OUTCDSEXT=cds.fa
LISTFILE=pepfile.lst
BESTHITEXT=best
HMMSEARCH_CUTOFF=1e-30
HMMSEARCH_OUTDIR=search
ALN_OUTDIR=aln
LANGUAGE=en
#job runs
JOBCPU=2 # per job CPUs
TOTALCPU=8 # total CPUs to use
QUEUEING=parallel
QUEUE=
TEMP=/tmp/__CHANGEME__
# tree building - not yet integrated into PHYling
OUTGROUP=__CHANGEME__
EXTRARAXML=
EXTRAIQTREE="-nt AUTO -m TESTMERGE -bb 1000 -alrt 1000"
```
## Initialize

```
PHYling init
```

## Searching for homologs

```bash
PHYling search
```

```bash
PHYling search -q slurm
```

```bash
PHYling search -q slurm --force
```

## Aligning

```bash
PHYling aln
```

```bash
PHYling aln -q slurm
```


text:
# Changelog

## v1.0.1 - 2021-06-14

### Added

- Added source maps to build output.

## v1.0.0 - 2020-09-26

### Added

- Added ES Module build.

### Changed

- **BREAKING** `deleteCount` will only fallback to default if omitted.
- Refactored internals in modern JavaScript.

## v0.0.3 - 2017-04-07

### Fixed

- Fixed an issue where `deleteCount` of `0` would use fallback to default.

## v0.0.2 - 2017-04-07

### Fixed

- Fixed an issue where strings would be concatenated with `,` separator.

## v0.0.1 - 2017-04-05

Initial public version! :tada:

repository: jacobbuck/immutable-splice

gha_language: JavaScript

repo_name: jacobbuck/immutable-splice


text:
# #195 LCResonator

Measure the resonant frequency of an LC coil or inductance of an inductor

![LCResonator_build](./assets/LCResonator_build.jpg?raw=true)

## Notes

Again I'm inspired by one of [w2aew's videos](https://www.youtube.com/watch?v=Ff5xOENID7w).
I really needed something like this, as my attempts at winding my own inductors (for some RF projects)
have failed miserably, and it's a really usefull thing to be able to measure the inductance
of a custom coil (or unknown inductor), and/or resononant frequency of the resulting LC pair.

The circuit is used to measure the resonant frequency of an LC circuit. It works in two ways:
* by attaching an LC circuit without the calibration capacitor
* by inserting a known-value calibration capacitor, the inductance of the inductor can be derived (calculated)

If the capacitane is known, then the inductance may be calculated with a re-arrangement of the LC resonant frequency formula:

```
L = 1 / ( C * (2πf)^2 )
```

### JFET Selection

The [original circuit](http://archive.org/stream/73-magazine-1990-09/09_September_1990#page/n49/mode/1up) used a 2N5245 N-JFET with 470Ω R2,
w2aew used a J310 with 1kΩ R2. I ended up comparing J201 and J310 qith a range of R2 values.

| JFET   | Idss    | Vgs(off)       |
|--------|---------|----------------|
| 2N5245 | 5-15mA  | -1V to -6V     |
| J310   | 24-60mA | -2V to -6.5V   |
| J201   | 0.2-1mA | -0.3V to -1.5V |

### Breadboard Test Results

I did my first tests on a breadboard build:

![LCResonator_bb_build](./assets/LCResonator_bb_build.jpg?raw=true)

Here are some measurements. Where "n/a" it means I was not able to provoke an oscillation.

| JFET | R2    | C1    | C2   | f        | L(nom) | L(calc) |
|------|-------|-------|------|----------|--------|-----------|
| J310 | 4.7kΩ | 150pF | 33pF | 438kHz   | 1mH    | [0.88mH](https://www.wolframalpha.com/input/?i=1+%2F+%28+150pF+*+%282%CF%80*+438kHz%29^2+%29) |
| J310 | 2.2kΩ |  50pF | 33pF | 660kHz   | 1mH    | [1.16mH](https://www.wolframalpha.com/input/?i=1+%2F+%28+50pF+*+%282%CF%80*+660kHz%29^2+%29) |
| J310 | 4.7kΩ | 150pF | 33pF | 1.307MHz | 100µH  | [99µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+150pF+*+%282%CF%80*+1.307MHz%29^2+%29) |
| J310 | 2.2kΩ | 150pF | 33pF | 1.311MHz | 100µH  | [98µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+150pF+*+%282%CF%80*+1.311MHz%29^2+%29) |
| J310 | 2.2kΩ |  50pF | 33pF | 1.988MHz | 100µH  | [128µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+50pF+*+%282%CF%80*+1.988MHz%29^2+%29) |
| J201 | 2.2kΩ |  50pF | 33pF | 2.088MHz | 100µH  | [116µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+50pF+*+%282%CF%80*+2.088MHz%29^2+%29) |
| J201 | 4.7kΩ |  33pF | 15pF | 2.43MHz  | 100µH  | [130µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+33pF+*+%282%CF%80*+2.43MHz%29^2+%29) |
| J201 | 4.7kΩ |  50pF | 15pF | 2.08MHz  | 100µH  | [117µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+50pF+*+%282%CF%80*+2.08MHz%29^2+%29) |
| J201 | 2.2kΩ | 150pF | 33pF | 1.33MHz  | 100µH  | [95µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+150pF+*+%282%CF%80*+1.33MHz%29^2+%29) |
| J201 | 4.7kΩ | 470pF | 15pF | n/a      | 100µH  | n/a |
| J201 | 2.2kΩ | 470pF | 33pF | n/a      | 100µH  | n/a |
| J201 | 2.2kΩ |  33pF | 33pF | 8.196MHz | 10µH   | [11.4µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+33pF+*+%282%CF%80*+8.196MHz%29^2+%29) |
| J310 |   1kΩ |  50pF | 33pF | 6.729MHz | 10µH   | [11.2µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+50pF+*+%282%CF%80*6.729MHz%29^2+%29) |
| J310 | 2.2kΩ |  33pF | 33pF | 7.82MHz  | 10µH   | [12.5µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+33pF+*+%282%CF%80*+7.82MHz%29^2+%29) |
| J310 | 2.2kΩ |  50pF | 33pF | n/a      | 10µH   | n/a |
| J310 |   1kΩ | 150pF | 33pF | n/a      | 10µH   | n/a |
| J201 | 2.2kΩ | 150pF | 33pF | n/a      | 10µH   | n/a |
| J201 | 2.2kΩ |  50pF | 33pF | n/a      | 10µH   | n/a |
| J310 | 2.2kΩ |  50pF | 33pF | n/a      | 1µH    | n/a |
| J310 | 2.2kΩ |  33pF | 33pF | n/a      | 1µH    | n/a |
| J310 | 4.7kΩ |  33pF | 33pF | n/a      | 1µH    | n/a |
| J201 | 2.2kΩ |  33pF | 15pF | n/a      | 1µH    | n/a |

### Findings - Breadboard Tests

As long as the oscillation can be sustained, measured results and inferred inductance is surprisingly close to theory.

In summary, with a breadboard build and 9V supply:

* 10µH is minimum inductance I could measure
* more accurate results with C1=50pF or higher
* if C1 too high (over 150pF), can't sustain oscillation
* R2 sweet spot is around 2.2kΩ

I hoped that a protoboard or PCB build would helps sustain oscillation
and in particular measure inductors below 10µH. Which turns out to be true .. read on for the results - they are good!

Sample trace measuring a 100µH choke with J201, R2=2.2kΩ, and C1=50pF:

![J201/100µH/2.2kΩ/50pF](./assets/scope_J201L100uR22C50.gif?raw=true)

Sample trace measuring a 10µH choke with J201, R2=2.2kΩ, and C1=33pF:

![J201/10µH/2.2kΩ/33pF](./assets/scope_J201L10uR22C33.gif?raw=true)

### PCB Test Results

So next I've copied w2aew and put the circuit on a copper PCB (with 6 islands), and the improvement is staggering.
I'm able to measure much lower inductances without having to raise the power rail from 9V.
I made both L1 and C1 interchangeable (with pins on the board to add random capacitors, inductors, coils or LC modules)

A few minor component switches/selections:

* I put J310's down on the board, even though J201 seemed to perform in the same ballpark
* replaced "ordinary" ceramic disc capacitors with supposedly higher-quality multi-layer ceramics
* C2 33nF replaced with a 30nF multi-layer ceramic
* I settled on 2.2kΩ for R2 (FET source load)

Here are some measurements:

| C1    | f         | L(nom) | L(calc) |
|-------|-----------|--------|-----------|
|  50pF |  6.802MHz | 10µH   | [10.95µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+50pF+*+%282%CF%80+*+6.802MHz%29^2+%29) |
| 150pF |  4.255MHz | 10µH   | [9.33µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+150pF+*+%282%CF%80+*+4.255MHz%29^2+%29) |
| 150pF | 12.608MHz |  1µH   | [1.06µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+150pF+*+%282%CF%80+*+12.608MHz%29^2+%29) |
|  30pF | 24.631MHz |  1µH   | [1.39µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+30pF+*+%282%CF%80+*+24.631MHz%29^2+%29) |
|  30pF | 34.094MHz | hand wound #1  | [0.73µH](https://www.wolframalpha.com/input/?i=1+%2F+%28+30pF+*+%282%CF%80+*+34.094MHz%29^2+%29) |

The hand wound #1 coil is simply an 8mm diameter coil, about 2mm long, with 4.5 turns of 0.2mm enamelled copper wire.
According to [this coil calculator](http://www.66pacific.com/calculators/coil_calc.aspx)
the inductance should be ablout 0.28µH. My measurement says 0.73µH,
and given the accuracy of the other readings with "known" inductors, I'm encouraged to go with my measured value.
No wonder my RF circuits are all off - it seems coil inductance calculators need to be treated with a big pinch of salt.

 Here's a measurement of a 1µH choke and C1=30pF:

![1µH/30pF](./assets/scope_pcb1uh30pf.gif?raw=true)

And a sub-1µH custom coil with C1=30pF:

![custom coil #1/30pF](./assets/scope_pcbL1h30pf.gif?raw=true)

## Construction

![Breadboard](./assets/LCResonator_bb.jpg?raw=true)

![The Schematic](./assets/LCResonator_schematic.jpg?raw=true)

Here's the build on a breadboard:

![LCResonator_bb_build](./assets/LCResonator_bb_build.jpg?raw=true)

And now on a chopped-up PCB:

![LCResonator_build](./assets/LCResonator_build.jpg?raw=true)

## Credits and References

* [LC circuit](https://en.wikipedia.org/wiki/LC_circuit) - wikipedia
* [Measuring coil inductance and IF transformer resonant frequency](https://www.youtube.com/watch?v=Ff5xOENID7w) - w2aew
* [The Coil Tester](http://archive.org/stream/73-magazine-1990-09/09_September_1990#page/n49/mode/1up) - article from 73 Amateur Radio - September 1990
* [L/C/F and Single-Layer Coil Winding Calculator](http://www.arrl.org/shop/L-C-F-and-Single-Layer-Coil-Winding-Calculator/) - ARRL Store
* [2N5245 datasheet](http://www.farnell.com/datasheets/46878.pdf)
* [J310 datasheet](https://www.futurlec.com/Transistors/J310.shtml)
* [J201 datasheet](https://www.futurlec.com/Transistors/J201.shtml)
* [JFET](https://en.wikipedia.org/wiki/JFET) - wikipedia
* [a coil calculator](http://www.66pacific.com/calculators/coil_calc.aspx)
* [..as mentioned on my blog](https://blog.tardate.com/2016/03/littlearduinoprojects195-coil-resonance.html)

repository: tardate/LittleArduinoProjects

repo_name: tardate/LittleArduinoProjects


text:
---
name: code PR
about: A template PR for contributing to the /logic folder
---

<!--
  make this PR easy to find:

  - assign: yourself
  - labels:
  - request a review
-->

## Continuous Integration (CI)

- [ ] Linting passes
- [ ] Tests pass

## It Does

- [ ] have a nice function name that matches the file name
- [ ] has nice parameter names and default values
- [ ] have an exported function, and no other things
- [ ] has a JSDoc comment
  - [ ] is well formatted
  - [ ] parameter names match function's parameter names
  - [ ] default parameters are documented
  - [ ] has complete and clear descriptions
  - [ ] has correct type annotations
  - [ ] includes at least one example
- [ ] have good formatting
- [ ] use short comments to describe the strategy
- [ ] be a simple and readable implementation
- [ ] use short comments to describe important language feature choices
- [ ] use clear and helpful variable names
- [ ] declare variables in the smallest scope possible
- [ ] have a spec file:
  - [ ] There are at least 8 test cases
  - [ ] All `describe`s and `it`s have clear and helpful names
  - [ ] All test names actually describe what is being tested
  - [ ] Tests are grouped logically using `describe`
  - [ ] There is only one `expect` inside every `it`
  - [ ] There is no logic (loops, conditionals, ...) in the test cases
  - [ ] Side-effects are tested, if necessary
  - [ ] Tricky edge cases are tested (extra credit)
- [ ] spelling is clear and understandable
- [ ] no unused, commented code

## It Does Not

- [ ] read or write from the DOM
- [ ] log to the console
- [ ] use `prompt`, `alert` or `confirm`

repository: colevandersWands/new-ci

repo_name: colevandersWands/new-ci


text:
Kanboard
========

Kanboard is a project management software that use the Kanban methodology.

Official website: <http://kanboard.net>

- Get a visual and clear overview of your project
- Multiple boards with the ability to drag and drop tasks
- Open source and self-hosted
- Super simple installation
- Translated in 22 languages
- Distributed under [MIT License](LICENSE)
- [List of features are available on the website](http://kanboard.net/features)
- [Change Log](ChangeLog)

[![Build Status](https://travis-ci.org/fguillot/kanboard.svg)](https://travis-ci.org/fguillot/kanboard)

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/fguillot/kanboard/badges/quality-score.png?s=2b6490781608657cc8c43d02285bfafb4f489528)](https://scrutinizer-ci.com/g/fguillot/kanboard/)

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

Known bugs and feature requests
-------------------------------

- Bug tracker: <https://github.com/fguillot/kanboard/issues>

Authors
-------

- Main developer: Frédéric Guillot (fguillot)
- [List of contributors](CONTRIBUTORS.md)

Documentation
-------------

- [Read the documentation](doc/index.markdown)

Related projects
----------------

- [Kanboard API python client by @freekoder](https://github.com/freekoder/kanboard-py)
- [Kanboard Presenter by David Eberlein](https://github.com/davideberlein/kanboard-presenter)
- [CSV2Kanboard by @ashbike](https://github.com/ashbike/csv2kanboard)
- [Kanboard for Yunohost by @mbugeia](https://github.com/mbugeia/kanboard_ynh)
- [Trello import script by @matueranet](https://github.com/matueranet/kanboard-import-trello)
- [Chrome extension by Timo](https://chrome.google.com/webstore/detail/kanboard-quickmenu/akjbeplnnihghabpgcfmfhfmifjljneh?utm_source=chrome-ntp-icon), [Source code](https://github.com/BlueTeck/kanboard_chrome_extension)
- [Wunderlist To Kanboard script by EpocDotFr](https://github.com/EpocDotFr/WunderlistToKanboard)
- [Python client script by @dzudek](https://gist.github.com/fguillot/84c70d4928eb1e0cb374)

## Setting Up on Shipped
This is an sample project to demonstrate how to create/deploy a PHP application using Shipped.

### Step 1. Set Up GitHub

[Git](https://git-scm.com/) is a source and version control system hosted on the web, and [GitHub](https://github.com/) is a repository of Git projects. Shipped stores your projects on GitHub, and you'll need a GitHub account to use Shipped. If you already have a GitHub account, skip to step 2. Otherwise, navigate to the [GitHub home page](https://github.com/) using any modern browser (we recommend Chrome), click on [Sign up](https://github.com/join) and follow the instructions to create a free account. You don't need to do anything more with GitHub at this time; Shipped will do it all for you.

### Step 2. Login to Shipped
Your GitHub account is all you need to login to Shipped. Navigate to the [Shipped welcome page](http://ciscocloud.github.io/) and click on the big green "Sign up with GitHub" button.

![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/welcome.Png)

Shipped displays its home page.  If not, select Create New Project from the Your Projects dropdown to get the popup:

## Create Your Kanboard Project with Shipped

### Step 3 Compose Your Project
Use any modern browser (we recommend Chrome) to navigate to the the Shipped welcome page. If you're not logged, click on the big green "Sign up with GitHub" button to login. If this is your first project, Shipped automatically pops up a Create New Project form; if not, select Create New Project from the Your Projects dropdown to get the popup:
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/createproject.Png)

Enter a name for your project (we'll use "Kanboard-Dev" for this project) and press Start Composing. Shipped displays a list of development services:
### Step 4 Fork the Github project
#### Fork CiscoCloud/Kanboard as your repository master project branch.
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/fork.Png)

### Step 5 Add a service
The development services listed are examples of what Shipped calls "microservices" - supporting services used by a project. We can choose as many microservices as needed for a project. Shipped installs whatever is needed to deploy the selected microservices on one of the VMs it creates for you.

#### Step 5.1 Select a service type.

For this project we will select **"PHP"** which create PHP installed VM
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/selectservice.Png)

Click on the Select button to the right of this service. Shipped pops up the Service Configuration form that you'll use to specify the GitHub repository where Shipped will store the source code using the service:

#### Step 5.2 Provide github repository name.

![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/selectrepo.Png)

This form allow us to specify:

| Name | Description          |
| ------------------- | -------------------- |
| Name of GitHub Repository|	The name of the GitHub repository where Shipped stores the source code using this service. Shipped automatically creates the repository if necessary|
| GitHub Organization|	The GitHub account owning the repository. This can be your personal account, or the account of a company or organization associated with your account. |
| Private Public	The type of repository to create | private (available only to specific GitHub users) or public (viewable by any web user). You need a paid GitHub account to create a private repository.|

### Step 6. Build Your Project
#### Step 6.1 Initiate Build process.

 Specify "Kanboard" for the repository name and press Add Service. Shipped re-displays the Compose Your Project form with the repository name for the selected service above the Build Project button.
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/buildproject.Png)

To build your project, press the Build Project button. The button label changes to Building, and a status bar moves across the button while Shipped creates your GitHub repository and stores the description of your project in its database. When it's finished, it pops up the Let's Get Set Up form containing the command to bootstrap the project on your computer:
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/buildlocal.Png)

## Bootstrap Your Local Development Environment
Bootstrapping a Shipped project means downloading the project's source code to your machine; setting up a local Git repository tied to the cloud-based repository created by Shipped; installing the pre-requisite software Vagrant and VirtualBox (if necessary); creating and the virtual machines that host your development environment; setting up a continuous integration build; and brings up a web server running the new application. The process is fully automatic; you just need to copy and paste the command presented by Shipped when you created the project.

### Step 7.1 Bootstrap your environment (Refer 7.2 for fast bootstrap)

The bootstrap process runs in a command-line terminal window, so the first step in bootstrapping your project is opening a terminal window. The way you do this depends on your operating system:

| Os Type | Action          |
| ------------------- | -------------------- |
| OS X (Mac)|	Press Command + Space to open Spotlight Search. Type Terminal and double-click the Terminal Application. Menu option Shell -> New Window will open a new window for you. |
| Ubuntu |	Press Ctrl+Alt+T |
| Windows |	Click Start, type "cmd", and press Enter for a normal terminal window, or Ctrl+Shift+Enter for an Administrator terminal window. You will need an Administrator window if the bootstrap process needs to install Vagrant and VirtualBox. If you already have this software installed, you can use a normal terminal window. |

When you completed creating your project in Step 6, Shipped popped up the Let's Get Set Up form containing the bootstrap command:
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/buildlocal.Png)

Execute these command in console/terminal.
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/console.Png)

and on the Shipped browser window, which displays a circular animation ticking off each step in the bootstrap process as it happens:
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/buildstatus.Png)

Among its other actions, the Shipped bootstrap process brings up a web server on a newly-created VM and uses it to run your application. The last few lines output on the terminal window show you Shipped is running the application:
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/consoleout.Png)

#### OR

### Step 7.2 (*optional) Fast bootstrap your environment

In case you dont this build to be deployed locally. you can opt for fast bootstrap option.

you can set **fast** option while running your cli command inside terminal/console
for example:

shipped.exe -t FJLDKmsJvvoFlpVssIAYkbKrImXeovaV Local bootstrap 9c38dd91-5bdf-11e5-9640-0242ac110008 fast

![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/fastbuild.Png)

This flag will skip all the Vagrant related process in bootstrap. This means it stops after cloning the repository(s) and downloading files. you can still proceed with local commit to initiate a shipped build.

If we wants to build locally, we needs to bootstrap again.

## Build and Deploy the Application

### Step 8 Run a Build

Among the tasks Shipped performed during bootstrap was to store the application's source code in a local Git repository tied to the Git repository in the cloud, and set up a continuous integration build, so that any commit to the repository automatically triggers a build. When the bootstrap process completes, the Shipped browser window displays the command you need to run your first build:

![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/pushbuild.Png)

Once again, select the command by clicking on it, copy and paste it into your terminal window. The command changes the directory to the one containing your new local Git repository and commits the initial copy of the application source to your cloud-based remote Git repository

This automatically triggers a build, you see this in event section at your browser window

### Step 9 Deploy Your Project to the Cloud

The last step in the bootstrap process is deploying your project's application to the Cisco cloud. To do this, click on the Deploy tab at the top left of the screen. Shipped displays the Deploy tab with a message that there are currently no deployed environments:

#### Step 9.1 Create environment.
Create a new Environment as

![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/newenv.Png)

#### Step 9.2 Deploy to environment.
Shipped shows the message "Deploying to environment..." under the environment name. please click on that , and a short time later replaces it with a "Deployed successfully" message:
![](https://github.com/CiscoCloud/kanboard/blob/master/shipped/images/deploy.Png)

Congratulations! You've deployed your Kanboard application to the cloud. Click on the URL in the "Deployed successfully" message to see the application running in its new environment

repository: CiscoCloud/kanboard

repo_name: CiscoCloud/kanboard


text:
+++
title = "Launching a Serverless Project"
weight = 56
+++

- Click **Product list**
- Click the **three dots** in front of your Product, click Launch.
![launch-1](/images/launch-1.png)

- Name it **demo-service** and click Next.
- Type **serverless-wksp-sample-`<FIRSTNAME-LASTNAME>`/sam/nodejs** for **CodeS3Bucket** and click Next.
- Type **demo-service** for **ProjectName**.
- Type **demo-service-repo** for **RepositoryName**.
- Type **Repository for our demo service** for **RepositoryDescription**.
- Accept all defaults by clicking Next
- Review and click **Launch**

Click on the AWS CloudFormation Stack URL to keep up with the product provisioning.
![launch-2](/images/launch-2.png)

Once the stack status shows as **CREATE_COMPLETE** inspect the [AWS CodePipeline](https://console.aws.amazon.com/codesuite/codepipeline/pipelines/demo-service/view) create for your project.
![pipeline-1](/images/pipeline-1.png)

{{% notice info %}}
The pipeline has been triggered since we uploaded the content of the `sample.zip` to our repository and it interprets the upload action as an **initial commit**. It might take around 10-15 minutes for the whole pipeline to complete.
{{% /notice %}}

![pipeline-2](/images/pipeline-2.png?width=20pc)

One way to check your resources were properly created for each environment is to check on the AWS Lambda console.

![pipeline-2](/images/lambda-1.png)

gha_language: CSS


text:
---
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Add-PnPSiteDesignTask.html
external help file: PnP.PowerShell.dll-Help.xml
title: Add-PnPSiteDesignTask
---

# Add-PnPSiteDesignTask

## SYNOPSIS
This command is used to apply a published site design to a specified site collection target. It schedules the operation, allowing for the application of larger site scripts (Invoke-PnPSiteDesign is limited to 30 actions and subactions).
This command is intended to replace Invoke-PnPSiteDesign and is useful when you need to apply a large number of actions or multiple site scripts.

## SYNTAX

```powershell
Add-PnPSiteDesignTask -SiteDesignId <Guid> [-WebUrl <String>] [-Connection <PnPConnection>]
```

## DESCRIPTION

Allows to apply a site design to a specified site collection. This command is intended to be used when you need to apply a large number of actions or multiple site scripts.

## EXAMPLES

### EXAMPLE 1
```powershell
Add-PnPSiteDesignTask -SiteDesignId 501z8c32-4147-44d4-8607-26c2f67cae82
```

This example applies a site design the currently connected to site. Executing the commands will schedule the site design to be queued and run against the designated site collection.

### EXAMPLE 2
```powershell
Add-PnPSiteDesignTask -SiteDesignId 501z8c32-4147-44d4-8607-26c2f67cae82 -WebUrl "https://contoso.sharepoint.com/sites/project"
```

This example applies a site design to the designated site. Executing the commands will schedule the site design to be queued and run against the designated site collection.

## PARAMETERS

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

```yaml
Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SiteDesignId
The ID of the site design to apply.

```yaml
Type: Guid
Parameter Sets: (All)

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WebUrl
The URL of the site collection where the site design will be applied. If not specified the design will be applied to the site you connected to with Connect-PnPOnline.

```yaml
Type: String
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## RELATED LINKS

[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

repository: radityoardi/PnP-PowerShell

branch_name: refs/heads/dev

repo_name: radityoardi/PnP-PowerShell


text:
# SBFL
The Package for SBFL (spectrum-Based Fault Localisation)

## Implemented techniques
- Ochiai: `from sbfl import ochiai`
- Op2: `from sbfl import op2`
- DStar: `from sbfl import dstar`
- Tarantula: `from sbfl import tarantula`

## Package Installation
```bash
git clone https://github.com/agb94/sbfl
cd sbfl
python setup.py install
```

## Usage
```python
from sbfl import ochiai
from sbfl.utils import ranking

X = [
  [3, 5, 0, 1, 0], # test 1
  [1, 0, 5, 4, 0], # test 2
  [0, 1, 0, 3, 1]  # test 3
]
y = [
  1, # pass
  0, # fail
  1  # pass
]

scores = ochiai(X, y)
# array([0.5       , 0.        , 0.70710678, 0.40824829, 0.        ])
ranking(scores)
# array([2, 5, 1, 3, 5])
```

The fault localisation methods expect two arguments: `X` and `y`.
- `X`: the coverage matrix
  - rows: test cases
  - columns: program elements
  - `X[i,j]` represents how many times the jth program element is covered by the ith test case.
- `y`: the test result (0: fail, 1: pass).

The helper method `ranking` takes the scores and computes the ranking for each element (descending order of score)

## Create a custom scoring method from a user-defined ranking formula

```python
from sbfl.utils import matrix_to_index

def custom(X, y):
    def my_formula(ep, np, ef, nf):
        # calculating the score from the index
        score = ...
        return score
    return my_formula(*matrix_to_index(X, y))
 ```
### What does each index mean?
For each program element,
- `ep`: the number of passing tests execute the element
- `np`: the number of passing tests do not execute the element
- `ef`: the number of failing tests execute the element
- `nf`: the number of failing tests do not execute the element


text:
# Predicting US Primaries 2016 through Twitter

This project tries to predict the results of the US Primaries 2016 using data from the days preceding each primary. For this, we implement four models - Count, MaxSoFar, BagSentiments and TimeSentiments.

This repo contains a demonstration that can be accessed through the file `demo_nlp.php`

## Requirements for the Project:
* [scikit-learn 0.17.1](http://scikit-learn.org/stable/)
* python-2.7

## Running the models
In order to run the **Count** model:
`python baseline.py`
If you want to run the model for a specific place, you can run it through
`python demo_baseline.py <place>`

In order to run the **MaxSoFar** model:
`python frequent_permute_data.py`

In order to run the **BagSentiments** model:
`python new_permute_data.py`

In order to run the **TimeSentiments** model:
`python permute_data.py`
If you want to run the model for a specific place, you can run it through
`python demo_predict.py <place> <number of days to Primary>`

## Approach
A paper describing the approach has been added to this folder itself by the name of `Predicting Elections through Twitter.pdf`


text:
# Spring Boot Modular Project

## Description

Spring boot project with

* **Java 11**
* **Spring Boot 2.6+**
* **TLS 1.2 + 1.3 enabled** and properly configured (optionally redirecting HTTP to HTTPS when enabling the HTTP port).
* **HTTP2 enabled**
* **JWT** authentication
* **JUnit 5 / AssertJ / Mockito** for state-of-the-art testing
* **OpenAPI 3** with *Springdoc*

Features:

* **Modular architecture**: App, Platform and common / business modules
* API (Service, DTO, Exception)
* Persistence (Spring Data Repository, JPA)
* Service Layer
* REST controller (CRUD)

* **Access Log** filter, logging all requests (method, URI, response status and execution time)
* **Performance Logging** filter, logging performance tree of nested service calls
* **Logging of all endpoints** on startup
* **Docker support** (Docker and Docker-Compose files), with **Prometheus** monitoring / **Grafana** dashboard.

* **Business metrics**: custom Micrometer *gauge* to expose number of records (notes)

### Setting up TLS

The application uses a TLS server certificate issued by a test CA (certificate authority).
Clients need to trust this CA in order to connect. The test client already has a properly set up client truststore
including this CA certificate.

When connecting with other clients (browser, Postman, ...), you need to add this CA as trusted root CA (browser:
certificates, add trusted root certificate).
The CA certificate is located in the project root (`test_ca_001.cer`).

### Setting up JWT authentication

JWTs (JSON Web Tokens) are used for authentication. For testing purpose, this app
contains a REST endpoint where JWT tokens can be issued for any user.

Signing and verifying JWTs requires a Key Pair (private key for signing, public key for verifying).
An example key pair is already included and configured. To create your own key pair, use:

* **For RSA 4096 key:**
  ```bash
  ssh-keygen -t rsa -b 4096 -m PEM -f jwt.key
  openssl rsa -in jwt.key -pubout -outform PEM -out jwt.pub.pem
  ```

Do not enter a password (not required).

* **For EC 256 key:**
   ```bash
  ssh-keygen -t ecdsa -b 256 -m PEM -f jwt.key
  openssl ec -in jwt.key -pubout -outform PEM -out jwt.pub.pem
  ```

Afterwards extract the private and public keys into separate files:

```bash
openssl pkcs8 -topk8 -inform PEM -outform PEM -in jwt.key -out jwt.pem -nocrypt
```

This yields the `jwt.pem` private key and `jwt.pub.pem` public key.

In the configuration (`application-yml`), enable JWT authentication using:

```yaml
ch.frostnova.platform.security:
 auth: jwt
 signing:
   key-type: RSA
   public-key: jwt.pub.pem
   private-key: jwt.pem
 ```

- `key-type` is required (either **RSA** or **EC**)
- `public-key` is required to validate JWT tokens.
- `private-key` is optional, if configured the application can issue arbitrary JWT tokens in the `/login` endpoint (only
  for testing - do not use for production. Refer to swagger-ui for usage).

## Build

To build this project with Gradle (default tasks: _clean build install_):

    ./gradlew

## Start

To start this project with Gradle:

    ./gradlew start

## OpenAPI 3 Documentation (Springdoc)

The OpenAPI 3 schema is available at: [https://localhost:8443/v3/api-docs]()

The Swagger UI is available at: [https://localhost:8443/swagger-ui/index.html]()

## Authentication

The note endpoint requires **authentication using JWT** (header: Authorization: Bearer {jwt}).

**For testing**, you can configure the signing private-key in the security config, which enables the **login endpoint**,
which can issue arbitrary valid JWT tokens. (WARNING: only configure this for testing):
[https://localhost:8443/login/{{tenant}}/{{user}}?roles={{roles}} ]()

## Actuator Endpoints

Info endpoint: https://localhost:8443/info

```json
{
  "name": "spring-multi-module",
  "description": "Spring Boot Multi Module Project",
  "version": "1.0.0-SNAPSHOT",
  "cpu": {
    "usage": "0.01%"
  },
  "memory": {
    "used": "605.73MB",
    "allocated": "2.41GB",
    "usage": "24.56%"
  }
}
```

* Health: https://localhost:8443/health
* Metrics: https://localhost:8443/metrics
* HTTP request metrics: https://localhost:8443/metrics/http.server.requests
* Prometheus: https://localhost:8443/prometheus
* Metrics, custom gauge (number of notes in the DB):

  https://localhost:8443/metrics/business.metrics.notes.count

  https://localhost:8443/prometheus?includedNames=business_metrics_notes_count

## Docker

This project is dockerized using Docker Compose. The docker configuation resides in the `docker/config` directory.
Common tasks and docker-compose commands
(some tasks can be executed using the docker-compose gradle plugin):

| Task          | with docker-compose | with gradle |
| -------------:|:---------------------|------------|
| **Deploy/Start** | `docker-compose up -d` | `gradle composeup` |
| Build images      | `docker-compose build` | `gradle composebuild` |
| Follow logs | `docker logs -f spring-boot-modular` | - |
| Download logs | - | `gradle composelogs` |
| **Stop/undeploy** | `docker-compose down` |  `gradle composedown` |
| Stop/undeploy,
remove volumes
and images | `docker-compose down -v --rmi local` | - |

### Monitoring

The `docker-compose` file also includes Prometheus and Grafana, along with a preconfigured dashboard.

Open the dashboard at port 3000, e.g. http://localhost:3000, with user `admin` and password `admin`:

![Grafana Dashboard](grafana.png)

## Housekeeping

### Dependency management

To check for dependency updates, run:

gradle dependencyUpdates This will report all available newer versions of the dependencies, so you can update them in
the `build.gradle`.


text:
---
layout: post
title: "JPEG XT Image Compression with Hue Compensation for Two-Layer HDR Coding"
date: 2019-04-25 13:07:31
categories: arXiv_CV
tags: arXiv_CV
author: Hiroyuki Kobayashi, Hitoshi Kiya
mathjax: true
---

* content
{:toc}

##### Abstract
We propose a novel JPEG XT image compression with hue compensation for two-layer HDR coding. LDR images produced from JPEG XT bitstreams have some distortion in hue due to tone mapping operations. In order to suppress the color distortion, we apply a novel hue compensation method based on the maximally saturated colors. Moreover, the bitstreams generated by using the proposed method are fully compatible with the JPEG XT standard. In an experiment, the proposed method is demonstrated not only to produce images with small hue degradation but also to maintain well-mapped luminance, in terms of three kinds of criterion: TMQI, hue value in CIEDE2000, and the maximally saturated color on the constant-hue plane.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1904.11315](http://arxiv.org/abs/1904.11315)

##### PDF
[http://arxiv.org/pdf/1904.11315](http://arxiv.org/pdf/1904.11315)


text:
# Peroneutypa corniculata (Ehrh.) Berl., 1902 SPECIES

#### Status
ACCEPTED

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

#### Published in
null

#### Original name
Sphaeria corniculata (Wallr.) Oliv.

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
---
title: Introductions
date: '2019-01-01'
---

Hi, I'm Ward 👋

I'm a full-stack engineer with a background in journalism. I started this blog to share how I approach problems and arrive at solutions.

The topics will lean toward math and JavaScript, where my interests gravitate (aside from music).

Thus, the title: aleph node. For the unfamiliar, it's low-level wordplay marrying aleph null--an infinite number who's existence introduced me to the magic of set theory--and Node, the leading JavaScript runtime.

Feel free to lurk my past work and follow my latest hot takes.

repository: alephnode/alephnode

repo_name: alephnode/alephnode


text:
## Simple Laravel Community website
Hello, this is a simple community website similar to Stack Overflow that I enjoyed making with Laravel 5.6 in my free time.

Features:
+ User log in and sign up.
+ Display all questions with pagination and filter by categories.
+ create new question.
+ Answer and vote to questions.
+ Select favourite questions.
+ Display user profile with his points, own questions, and his favourite ones.
+ User select best answer to his question.
+ Search questions box

More features to come :)

## Installation
Clone the repo

    git clone https://bitbucket.org/boolfalse/moeddami-community-site

Composer install

    cd CommunitySite
    composer install

Database setup

    php artisan migrate

Seed the database (if you want)

    php -d "memory_limit = 1500M" artisan db:seed

To login use any user from database after seeding.

The password For all users is: test

## Contributing
Thank you for considering contributing to this project.

## License

This is an open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

repository: boolfalse/community-site

repo_name: boolfalse/community-site


text:
# Welcome to the PatientCare development site!

PatientCare is a full patient care management system.

## Features
Scheduling
Patient Records
Billing
Document Review
Phone logs
User management
All the documentation is located in the wiki, so have a look there for help on how to get started, read tutorials, view sample descriptions and peruse the reference docs.

## Installation Instructions
#### Files:

1. Click the zip button at the top of this page.

2. Copy zip file to your server.

3. Unzip files

3a. Windows: Use software to unzip

3b. Unix based systems: Type "unzip PatientCare-master.zip"

4. Make sure that you unzip the files in the directory that you want them.

#### Database:

1. Create a database in your DBMS of choice

2. Open php/connect_to_mysql.php

3. Change the $dbname, $user, and $pass to the proper values

4. Important schema.sql (located in the root of the zip file) into your database

#### Logging in for the first time:

1. Go to the home page of the application and click "Register for a live demo."

2. Fill out the form. Key: P@t!N+13

3. Login with new Admin user.


text:
# OctoPatch
OctoPatch is a lightweight engine to wire up different types of signal sources and receivers to a information flow grid.

This project will be developed turing the streams of tom wendel (http://twitch.tv/tomwendel) and changes, features and issues are discussed in the AusLiebeZumCode discord server (https://discord.gg/2rDsMj5)

repository: yannickschrade/OctoPatch

repo_name: yannickschrade/OctoPatch


text:
---
title: "list_customers.py"
description: "list_customers.py"
date: "2017-11-23"
classes:
    - "SoftLayer_Account"
    - "SoftLayer_Brand"
tags:
    - "brands"
---

```
'''
List customers.

The script retrieves all the customers in a brand account.
It displays the same result like in https://agent.softlayer.com/customer/account/list

Important manual pages
http://sldn.softlayer.com/reference/services/SoftLayer_Brand/getOwnedAccounts
http://sldn.softlayer.com/reference/datatypes/SoftLayer_Account
http://sldn.softlayer.com/article/Object-Masks

License: http://sldn.softlayer.com/article/License
Author: SoftLayer Technologies, Inc<EMAIL_ADDRESS>'''

import SoftLayer.API
import json

USERNAME = 'set me'
API_KEY = 'set me'

brandId = 4

client = SoftLayer.create_client_from_env(username=USERNAME, api_key=API_KEY)

brandService = client['SoftLayer_Brand']
objectMask = "mask[accountStatus[name], masterUser[username], hardwareCount, virtualGuestCount, userCount, openTicketCount]"

try:
    result = brandService.getOwnedAccounts(id=brandId, mask=objectMask)
    print(json.dumps(result, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to list the customers. "
          % (e.faultCode, e.faultString))

```