text:
# Welcome to CHERI Hackaton!
This is a repository for CHERI Hackaton.

## Getting Started
### Install Docker
Installation instructions:
* Ubuntu: https://docs.docker.com/install/linux/docker-ce/ubuntu/
* ChromeOS/Crostini/Debian: https://docs.docker.com/install/linux/docker-ce/debian/

Once docker is installed, add yourself to the docker group:

```bash
sudo usermod -aG docker $USER
```
NOTE: this doesn't affect your current shell, so you might want to re-login for getting the effect
of the usermod command or alternatively execute `sudo su -l $USER` to spawn a new shell where you
run everything else.

### Clone the Oak enclave git repository
Clone the repository, goto to the cheri-hackathon directory, and then enter into the development environment shell. This gives everyone deterministic environment with exactly same tools and absolute paths.

```bash
git clone https://github.com/project-oak/oak-enclave
cd oak-enclave/cheri-hackaton
./dev-env.sh
```
During first run it will build the docker image and this process can take a while.
When you run it second time the script runs instantly. If you modify Dockerfile (or updated version is pulled from git)
the container will be rebuilt automatically.

When you run the script it spawns you a shell inside docker container where you run commands mentioned below. Dev-env shell prompt looks like this:
```
dev@bf10557b852d:~/workdir$
```
The current directory is /home/dev/workdir - which is the mapped location of cheri-hackaton git repo. This is persistent location, everything else is by design ephemeral and will be discared as soon as you exit the shell. This allows you to quickly start from clean state.

As you have noticed the username inside docker container is 'dev' but the UID inside matches your UID outside, which means (a) you're not running as root, (b) you have access level to your files as you expect (c) your permissions on files won't be screwed up as a result of using dev-env.sh

You can also run `./dev-env.sh <command> <args..>` to run one-off command in dev-env shell.

### Build CHERI toolchain and CHERI OS
Run this once inside ./dev-env.sh shell:
```bash
build-scripts/build-cheri-sdk.sh
```

This will automatically clone all necessary CHERI repos into `cheri-repos`
and build CHERI SDK into `sdk` directory.
This way you get a compiler, binutils, debugger and qemu.

### Run the 'lo' example
To check that everything works as expected, compile and run a minimal code and practice running it
with Qemu and obtaining instruction traces.

See [lo/README.md](lo/README.md) for instructions.

### Run CHERI OS
Run CHERI OS in Qemu:
```bash
build-scripts/run-cherios.sh
```

### Try the CHERI OS alice bob demo

Read instructions in cheri-repos/cherios/demos/alice_bob/README.txt. CheriOS has been setup to run this demo automatically when it boots.

Running cherios with

```bash
cheribuild.py run-cherios
```

Will allow you to iterate a little faster than using the wrapper script.

### Start hacking
TODO: Description of what we need to build is here. \
TODO: Add some links.

Happy hacking!

repository: project-oak/oak-enclave

gha_language: Shell

repo_name: project-oak/oak-enclave


text:
# SCRAPIE

### Single cell RNA-seq Analysis Pipeline

This pipeline is a wrapper of various tools associated with single cell RNA-seq analysis. The pipeline is optimized for 3' based library preparation methods in NGS for single cell. This pipeline is specifically optimized for CEL-Seq2 libraries that have pseudo-paired reads. I plan to generalize this pipeline for expanded use.

Current library prep requirements are:
  * CEL-Seq2
  * Already lane merged fastq files that result in a single pair of fastqs.
    * Read 1 FASTQ
      * The UMI in position 1 - 6
      * The cell barcode in position 7-12
    * Read 2 FASTQ
      * The transcript 1-50 (or the max length of the second record)
  * Sequenced on Illumina platform
  * Relatively low throughput due to sample sheet requirements

## Getting Started

The pipeline is dockerized and contains all the necessary software dependencies to run quality control on raw reads, perform alignment and UMI counting, and run a basic differential expression analysis with a simple experiment design.

### Prerequisites

* Refer to the Sample Sheet README Wiki for creating the Sample Sheet

* Docker
  * https://docs.docker.com/v17.12/install/
  * Install per their instructions
  * If installing on Linux machine, must have superuser access to create and add users as a group
    * https://docs.docker.com/install/linux/linux-postinstall/
  * Docker commands in this repository are **not** ran as sudo
  * If running this repository on AWS, docker may fail due to AWS intricacies

### Host machine directory setup

On the local machine:
  * Create a directory that contains the following:
      * Reference_Genome_FASTA file
      * Reference_Annotation gtf file
      * Compressed and Lane Merged Read 1 FASTQ (gz)
      * Compressed and Lane Merged Read 2 FASTQ (gz)
      * SampleSheet.csv
  * Refer to this repository's wiki **Sample Sheet README** on creating the sample sheet
  * Sample sheet **must** be named SampleSheet.csv

After creating directory and adding the files, change into the directory and clone this repository.
```
cd pipeline_example
git clone https://github.com/tbeaux18/FatFlies_scRNA.git
```
This results in the following directory structure.
```
root:pipeline_example example$
.
├── FatFlies_scRNA
├── SampleSheet.csv
├── read1.fastq.gz
├── read2.fastq.gz
├── ref_genome.fa
└── ref_genome_annotation.gtf
```

To run the pipeline:
```
cd FatFlies_scRNA
./run_pipeline.sh
```

### Pipeline Procedure
By running this command:
  * Docker images will build
  * Docker runs the **ubuntur35:pipeline** container
  * Docker mounts the parent directory of FatFlies_scRNA
  * Sample Sheet is parsed and exchanges information with necessary input files such as zUMIs.yaml file
  * Quality Control of Raw Data
  * STAR Index is built with the provided FASTA, the GTF is not included in the index build
  * zUMIs pipeline begins
    * Stages
      * Filtering
      * Mapping
      * Counting
    * Output directory
      * <sample_sheet_basename>_zumi_output
        * BAM Files
        * zUMI log files
        * Count matrices
        * Alignment plots
  * Differential Expression Rscript runs
    * Performs DE on respective Control vs. Test Groups
    * Performs DE on respective Condition1 vs Condition2 Test Groups
    * Outputs **r_results** Directory
      * HTML files for interactive scatterplots for each comparison
      * CSV files for all and significant differential expresssed genes for each comparison
  * Logs are outputted for each step and are located in ~/Fatflies_scRNA/logs directory

### Limitations and Future Development

* Robust error handling will be included
* Sample sheet and pipeline usage will expand to include:
  * Different library preparation methods
  * More zUMIs parameters for customization
  * Different entrypoints

## Built With

### Code languages to build repository

* [python3] (https://www.python.org/download/releases/3.0/)
* [bash] (https://www.gnu.org/software/bash/)
* [R] (https://www.r-project.org/)
* [Docker] (https://www.docker.com/)

### Docker container software

* [FASTQC] (https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)
* [Cutadapt] (https://cutadapt.readthedocs.io/en/stable/) - python3
* [zUMIs] (https://github.com/sdparekh/zUMIs)
* [STAR] (https://github.com/alexdobin/STAR)
* [Rsubread] (https://bioconductor.org/packages/release/bioc/html/Rsubread.html) - featureCounts

## Authors

* **Timothy Baker**
* **Amanda Wills**
* **Jasen Jackson**

## License

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

## Acknowledgments

* Dr. Jennifer Beshel, PhD
* Dr. Catherine Putonti, PhD
* Loyola University Chicago
* CEL-Seq2 authors

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Training a delivery drone with ml-Agents

This is a university project powered by [SIGMA Clermont](https://www.sigma-clermont.fr/fr) and made by the brazilian student [Matheus Chaves D'Carvalho](https://www.linkedin.com/in/matheus-chaves-d-carvalho-estudante-n%C3%ADvel-mestrado-eu-na-sigma-clermont-34b87a196/?locale=en_US) under the guidance of the Professor Christophe Bascoul.

Mainly aiming to guide future professors and students that have interest in this area,
this project is the development of an Artificial Intelligence capable of piloting a drone
to a position marked with 3 coordinates (x, y, z). Two different control approaches are developed in this project,
in the first one there is an independent stability control system and in the second one the stability control
must be done by the artificial intelligence.

## Requirements

* [Unity](https://unity.com/)
* [ML-Agents](https://github.com/Unity-Technologies/ml-agents/)
* [Python 3.6.1 or higher](https://www.python.org/downloads/)
* [NVIDIA CUDA Toolkit 10.1](https://developer.nvidia.com/cuda-toolkit)
* [NVIDIA cuDNN for CUDA 10.1](https://developer.nvidia.com/cudnn)

## Installation

To install this project and ML-Agents training you will
need an stable version of Unity (in this moment I dont recommend the 2020 version yet, so you can download the LTS 2019 version), a clone of this repo, the ML-Agents Toolkit, the latest version of Python, CUDA Toolkit 10.1 and its appropriate cuDNN.

#### Install Unity

I recomend you to get the LTS 2019 version because it`s a stable version now. This training was last
tested on Unity 2020.1.6f1.

#### Clone this repo:

You can clone it using the command:
```sh
git clone https://github.com/MatheusChavesDCarvalho/Delivery-drone-mlAgents
```

The `Projeto Real Oficial First Control\Assets\Scenes` folder contains the `Drone_scene` scene. The same goes for the second control. If you open the scene
in Unity you will see a few errors since the ML-Agents package still needs to be added.

#### Install the Unity ML-Agents Toolkit

Detailed instructions for installing ML-Agents Toolkit can be found on the
[ml-agents repo](https://github.com/Unity-Technologies/ml-agents/blob/release_8_docs/docs/Installation.md).

#### Install the Nvidia CUDA Toolkit 10.1

Detailed instructions for installing Nvidia CUDA Toolkit can be found on the
[CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html).

#### Install the Nvidia cuDNN

Detailed instructions for installing Nvidia CUDA Toolkit can be found on the
[nvidia cuDNN Documentation](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows).

### Training using the Unity ML-Agents Toolkit

In this project, we used the [Unity ML-Agents Toolkit](https://github.com/Unity-Technologies/ml-agents) to train the drone to go to a certain coordinate using two differents control approaches.

The episodes end immediately when the drone touches the cube located in the target coordinates, and are limited to a maximum of 10000 steps. At the beginning of each new episode, the drone is reset to its initial position at the center of the area, and the cube is moved to a random location.

#### First control approach

At first, the idea was to teach the agent to control an already programmed drone. That is, teaching the agent to control the drone with the same commands that can be done by a human with a remote control. In this situation, a stability control must exist in advance.

The python API will receive positive rewards when:

* The distance between the target and the drone decreases.
* Drone arrives at the target coordinates.

And negative rewards when:

* Drone collides with a structure.
* The distance between the target and the drone increases.
* Also a neagtive reward each step in order to decrease the duration of each episode.

Other reward schemes may work as well or better. You should experiment!

#### Second control approach

The reason for this control without a pre-existent stability control is to apply the commands directly to the drone without going for a pre-existing control system, this way it is possible to have a faster response with less real-time processing.

This control consists of directly controlling the four propellers of the drone. But in a real drone, normally the controlled parameter can be the rotation speed of each motor with a transfer function by passing this controlled data to a PWM signal.

While in unity, it is not enough to turn the propellers, you have to create force vectors directly on each one to simulate reality well.
For this, it is necessary to create a mathematical relationship by making the relationship between the rotation of a propeller and the force produced, also called thrust.

After some physical consideration, we got to this expression:

`𝐹(𝑁)=0,30625.𝜋(0,254)^2.(𝑉𝑟𝑜𝑡(𝑟𝑝𝑚).0,12760)^2`

Where `Vrot` is the rotation speed of a propeller and `F` is the thrust made by it in our simulation. If you want to know the complete developpement of the expression, you can find it on the file ChavesDCarvalho_ Matheus_RapportStage2A.pdf.

The python API will receive positive rewards when:

* The drone arrives at the target position;
* It maintains the inclination of the horizontal axes between -30 and 30 degrees;
* The current angular acceleration on the horizontal axes is less than the angular acceleration measured in the last iteration.

And negative rewards when:

* It collides with a structure;
* It moves away from the target;
* A negative punctuation for each step he performs in order to decrease the number of steps necessary to reach the destination;
* It does not maintain the inclination of the horizontal axes between -30 and 30 degrees;
* The current angular acceleration on the horizontal axes is greater than the previous one.

#### Using a Pre-trained Model

This project comes with a pre-trained model using the ML-Agents Toolkit. To see that behavior
in action, just go to the Prefab in the `Projeto Real Oficial First Control\Assets\MyPrefabs`.
Then go to the gameObject called `Drone` and choose the model you want to try in the `Behavior Parameters`.
Then hit **Play** in the Unity Editor.

#### Train

You can also train the drone yourself.
Detailed instructions on how to train using the ML-Agents Toolkit can be found on the [ml-agents repo](https://github.com/Unity-Technologies/ml-agents/blob/release_8_docs/docs/Training-ML-Agents.md).

To start training, just run this command:

`mlagents-learn config/ppo/Drone_training.yaml --run-id=[YOUR RUN ID]`

Then, press **Play** in the Unity Editor.

As the training runs, a `models` and a `summaries` folder will be automatically created in the root level of this project. As you might guess, the `models` folder stores the trained model files, and the `summaries` folder stores the event files where Tensorflow writes logs.

To monitor training, navigate into the `summaries` folder and run:

`tensorboard --logdir results --port 6006`

You can then view the live Tensorboard at `localhost:6006` on your browser.

#### Our Results

Since there is some randomness in the training process, your results might not look exactly like ours. Our reward gradually increased during training, as expected:

##### First Control Approach

##### Second Control Approach

## Support

This project is provided as-is without guarantees. Please contact me<EMAIL_ADDRESS>if:
* You run into issues downloading or installing after following the instructions above.
* You extend this project in an interesting way. We may not be able to provide support, but would love to hear about it.

## Citation of ml-Agents

Juliani, A., Berges, V., Teng, E., Cohen, A., Harper, J., Elion, C., Goy, C., Gao, Y., Henry, H., Mattar, M., Lange, D. (2020). Unity: A General Platform for Intelligent Agents. arXiv preprint arXiv:1809.02627. https://github.com/Unity-Technologies/ml-agents.

branch_name: refs/heads/main


text:
## HA Custom component for plant

This custom `plant` sensor is able to automaticly get the min/max levels for moisture, temperature, conductivity and brightness for a plant into a single UI element. You have only go to the openplantdatabase.io and search your the correct plantid for you plant. Beside that it works the same as the normal plant component.

Beside that you are still able to set the minimum and maximum values for each measurement.

It will change its state to "problem" if it is not within those limits.

repository: rolfberkenbosch/ha-component-plant

gha_language: Python

gha_license_id: MIT

repo_name: rolfberkenbosch/ha-component-plant


text:
# Web-Car

In the figure below, what you see is a LEGO Spike Prime connected to two motors and a Rasberry Pi. The Raspberry PI hosts a server using the python library flask that has a custom Graphical User Interface. The webpage can be accessed by any desktop or laptop of mobile device on the same wifi by going to [Pi ip-address]:5000. The graphical user interface also shown below consists of a wheel that can be used to control the direction that the car moves in and a slider that controls the velocity of the car. The inputs are taken from the webpage and communicated from the Raspberry PI to the Lego SPIKE PRIME using serial communication. The SPIKE PRIME then parses the user input into a motor response (i.e. increasing/decreasing the motors to speed up/slow down or their relative speeds to turn)

[Full Video](https://youtu.be/HMzt1AFN9BQ)

![Labelled Diagram](https://github.com/paccionesawyer/web-pi-car/blob/main/assets/PI_CAR_Labelled.jpg)

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

- [Raspberry Pi 4](https://www.google.com/search?q=raspberry+pi+4&sxsrf=ALeKk03vsMgGCu7PQVxu5BVM5yzeNxULQw:1613717510216&source=lnms&tbm=shop&sa=X&ved=2ahUKEwjM7dqXrvXuAhWYWc0KHdwgBTIQ_AUoAXoECAUQAw&biw=958&bih=1087)
  - Libraries
    - [Flask](https://flask.palletsprojects.com/en/1.1.x/) 3.4.6
    - [OpenCV](https://pypi.org/project/opencv-python/) 1.02
    - [Serial](https://pyserial.readthedocs.io/en/latest/pyserial.html) 3.4

- A LEGO SPIKE PRIME Kit [Purchase One Here.](https://education.lego.com/en-us/products/lego-education-spike-prime-set/45678#spike%E2%84%A2-prime)
  - The LEGO SPIKE PRIME kit IDE should be downloaded to update the firmware [here](https://education.lego.com/en-us/downloads/spike-prime/software)
    - Once the firmware is updated you can connect via Serial Communication using Putty or [this IDE](https://github.com/chrisbuerginrogers/ME35_21)

### Installing

Simply download the files in this repository and first run the code on the WIO Terminal using the Arduino IDE. Then run the SPIKE PRIME Code in REPL or the IDE that can be found here, [SPIKE PRIME IDE](https://github.com/chrisbuerginrogers/ME35_21). To run the PI code, use flask run --host=<IP_ADDRESS>. The file must be named app.py. This will start a webpage on your Raspberry Pi being served to port 5000.

![GUI](https://github.com/paccionesawyer/web-pi-car/blob/main/assets/gui.jpg)

## Authors

- **Sawyer Bailey Paccione** - *Raspberry PI CODE, SPIKE CODE* - [Portfolio](http://sawyerbaileypaccione.tech/)

## License

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

repository: paccionesawyer/web-pi-car

repo_name: paccionesawyer/web-pi-car


text:
# FutureNHS Test Approach

At Red Badger, we utilise Agile methodologies to release with regularity and predictability. Cross-functional teams are equipped with resources from all disciplines; Development, Test, User Experience, Design and Insights who collaborate to deliver to a consistently high quality.
Through a combination of automated tests and effective manual testing, our emphasis is on early defect detection. We aim to prioritise and address defects as early as possible in the development cycle.

We aim to deliver a high quality platform and migrate users in the shortest time possible. To enable this we are proposing to pursue testing strategies that will enable quick delivery, without sacrificing quality. Through test-driven development (TTD), incorporating comprehensive automation testing and targeted, effective manual testing locally and in Production, we are confident that we can minimise the number of issues that users will encounter.

## Contents

- [Proposed Testing Flow](#proposed-testing-flow)
  - [Continuous Integration Testing](#continuous-integration-testing)
- [Test Environments](#test-environments)
  - [Local Environment](#local-environment)
  - [Branch Environments](#branch-environments)
  - [Test Data](#test-data)
- [Feature Flags and Staging](#feature-flags-and-staging)
  - [Feature Flags](#feature-flags)
  - [No Staging Environment](#no-staging-environment)
  - [Infrastructure Changes](#infrastructure-changes)
  - [Performance Testing](#performance-testing)
- [Levels of Testing](#levels-of-testing)
  - [The Testing Pyramid](#the-testing-pyramid)
  - [Unit Tests](#unit-tests)
  - [Integration Tests](#integration-tests)
  - [End-to-End Tests](#end-to-end-tests)
  - [Snapshot Testing](#snapshot-testing)
  - [Manual Testing](#manual-testing)
- [Other Testing](#other-testing)
  - [Penetration Testing](#penetration-testing)
  - [Vulnerability Testing](#vulnerability-testing)
- [Testing Requirements](#testing-requirements)
  - [Platform / Browser requirements](#platform--browser-requirements)
- [Accessibility Requirements](#accessibility-requirements)
- [Issue Logging and Handling](#issue-logging-and-handling)
    - [Triage](#triage)
    - [Feature Requests ](#feature-requests)
    - [Tech Debt](#tech-debt)
    - [Writing a Unit Test](#writing-a-unit-test)
- [Testing Tooling](#testing-tooling)
    - [Automation](#automation)
    - [Manual Testing aids](#manual-testing-aids)

## Proposed Testing Flow

In the spirit of pursuing high-quality quick delivery, we are proposing the following process for each ticket:
1. Create a feature flag (if new feature).
2. Write TTD Unit/Integration tests.
3. Build the feature locally.
4. Get the TTD tests passing.
5. Add Snapshot and E2E tests (if relevant).
6. Create a Pull Request and get code reviewed.
7. QA performs exploratory manual testing locally.
8. Any blocker issues discovered are fixed immediately. Minor issues are logged and prioritised in the backlog.
9. When happy that acceptance criteria are met and there are no blocker issues, QA merges to master.
10. Test suite runs and passes on master.
11. Code deploys to Production as canary deployment/behind a feature flag.
12. QA verifies the code in Production.
13. Feature flag is toggled to allow access to a beta group (stakeholders, beta testers).
14. Once all parties are satisfied with a feature’s completed status, the feature flag is toggled to allow wider user groups to interact with the feature. This process can be segmented gradually i.e. allowing 5% of users see the feature, then 10%, 20%, etc.
15. Once all users have been given access to the feature for a period of time, the feature flag is removed.

### Continuous Integration Testing
Unit, Integration and Snapshot tests will be written and run each time before code is committed/merged/deployed, to act as a safety net to prevent feature regressions and help to reduce the number of bugs that make it into Production.
In addition to these standard tests an end-to-end testing suite will be developed, which will test all parts of the system in conjunction with each other. They will focus on ‘happy paths’ - common user journeys that are essential for the platform to operate effectively.

## Test Environments
### Local Environment
The earliest possible stage to test code is in a local environment. This would entail the QA checking out code from the GitHub repository to their laptop. They would then compile and run the platform locally and perform manual exploratory testing.

By testing locally we save time by not having to spin up a branch environment or rebuild any time a minor change to the code is made.

A snapshot of anonymised Production data will be spun up in a local database when testing locally. This will give us the best possible data to work with.

### Branch Environments
Occasionally we may want to spin up a branch environment for tickets that cannot be tested effectively in a local environment, e.g. if we need to test major infrastructure changes.

Again these would use a snapshot of anonymised Production data to facilitate testing. There is also potential to have live anonymised Production data available but this requires further investigation.

### Test Data
As mentioned above, to provide data used in the local branch environments we propose using actual Production data wherever possible. Obviously this presents issues surrounding privacy. To resolve this we propose anonymising everything at the point of snapshotting the Production data. This would entail stripping out any identifying information that could link data back to the person it was posted by or about.

## Feature Flags and Staging

### Feature Flags
We intend to use Feature Flagging to deploy code safely to Production. Please refer to the [Feature Flags](../architecture/decisions/0003_feature_flags.md) architectural decision record for more information.

### No Staging Environment
We are proposing to forgo a Staging Environment - please refer to the [No Staging Environment](../architecture/decisions/0004_no_staging_env.md) architectural decision record for more information.

### Infrastructure Changes
When it comes to making big infrastructure changes it is likely that we would opt to spin up a new environment entirely to deploy to rather than going straight into Production with a feature flag. This would mitigate the risk that the infrastructure changes might cause catastrophic failures in the live Production environment.
Once thoroughly tested in a temporary ‘staging’ environment the changes would be rolled out to Production.

### Performance Testing
To avoid negatively affecting Production performance it would be wise to test performance/load testing in a separate temporary environment that mirrors Production. We can use a framework such as Gatling in conjunction with Postman to perform load testing to stress the platform and measure performance. It would be useful to establish a baseline for future comparison.

## Levels of Testing
### The Testing Pyramid

![diagram of the testing pyramid](./test-pyramid.png)

Popularised by Mike Cohn, the idea of the Test Pyramid is fundamental to our approach to testing within Red Badger. Through previous experience and research, we have come to believe that the principles behind this model are of vital importance for a successful delivery built upon a solid foundation of quality assurance. As automation plays an increasingly important role in enabling continuous integration and delivery, it is vital that this area is given the highest attention.

### Unit Tests
These test the individual logic of a particular function or component in the application, isolated from the other components. The most important things to test at this level are conditional logic, looping and any kind of data manipulation (e.g., sorting of a list).
Unit tests are fast to run and independent of each other. When utilised with a focus on test-driven development (TDD) they act as documentation for a feature. They should be executed as often and early as possible to provide early feedback on code functionality and quality.
Unit tests are predominantly the concern of the developer working on a feature, but the tester will take an active role in writing tests and ensuring all scenarios are covered.

### Integration Tests
These tests ensure that the interaction between functions and components are working together to create the intended result. For example, in the React ecosystem, an appropriate level in a component tree (this might be an entire page) is rendered and populated with input data. Click events are simulated on the UI to make sure that the full logical application flow works as expected.
API tests also fall under this bracket. With these, a tester can verify that the back-end of the application is in a working state, without going through the additional layer of complexity interacting with a browser.

### End-to-End Tests
End-to-end (aka E2E or UI) testing generally mimics as closely as possible user interaction with the application. A browser, driven by software, simulates the user's journey through the web application. These are the most time consuming and therefore expensive tests in the suite.
We will also have End-to-end API tests that run solely on the API layer in combination with mocking/stubbing of data/responses to simulate a user’s interaction with the system. These will execute more quickly without the overhead of a browser rendering pages and interactions.

### Snapshot Testing
Snapshot comparison testing checks for styling regressions as new features are added to the application. The rendering of a component is compared with its previous incarnation and flagged up if a change is detected. These tests supplement more expensive UI tests by ensuring there are no regressions to individual components throughout the application, build after build.

### Manual Testing
Manual testing is often deemed an expensive overhead, however, it provides value by testing scenarios that may not have been caught by other testing methods.
A manual tester has the ability to view the site in the context of requirements, find errors and ignore false negatives far easier and faster than any automated test or screenshot comparison tool.
Manual testers understand the original story requirement and therefore are essential for confirming that a built feature actually solves the original problem defined by a story. They can also find edge cases in the application that may only be found during real browser testing, as opposed to rigid automated tests.
If any regressions are found by manual testing, the fix should come with an automated test at the lowest sensible level in the triangle.
In general, manual tests:
- Focus on testing features, rather than finding regressions.
- Can be scripted or exploratory in nature.
- Try and find as many bugs and regressions as possible in the previous steps.
- Allow manual testers' pattern recognition ability to quickly find issues on a wide range of browsers and devices.
- Provide feedback on the effectiveness of the automated suite of tests.

## Other Testing
### Penetration Testing
Penetration testing is a specialised style of testing that would largely need to be carried out by a third party service. It also appears to be a suggested requirement from the Government’s technology service manual: https://www.gov.uk/service-manual/technology/vulnerability-and-penetration-testing

### Vulnerability Testing
Azure provides the ability to scan for vulnerabilities in Docker images we push in our registry. This should provide a sufficient level of confidence that our services are secure, but it won’t hurt to include extra vulnerability testing in the remit of whichever third party we contract to perform the penetration testing.

## Testing Requirements
The Test Lead for the project will be responsible for manually testing to the following standards.
### Platform / Browser requirements
From ‘Platform Non Functional Requirements’:

Windows
- Internet Explorer 11 (35.87%)
- Edge (latest versions) (12.5%)
- Google Chrome (latest versions) (36.19%)
- Mozilla Firefox (latest versions) (0.98%)

MacOS
- Safari 12 and later (3.91%)
- Google Chrome (latest versions) (1.87%)
- Mozilla Firefox (latest versions) (0.2%)

iOS
- Safari for iOS 10.3 and later (5.66%)
- Google Chrome (latest versions) (0.26%)

Android
- Google Chrome (latest versions) (1.42%)
- Samsung Internet (latest versions) (0.6%)

(%s are from Google Analytics for all Kahootz sessions from 01/03/20-31/5/20)

Breakdown by device:
- Desktop: 82.89%
- Tablet: 9.8%
- Mobile: 7.31%

If we are to attempt to test every single user story on all required platforms this will result in a lower rate of delivery without adding much value, given the low numbers of users on the rarer platforms. We are reducing the number of required testing platforms for every user story in favour of periodic wider testing for the less popular platforms. The ideal time to do more comprehensive platform testing would be when a feature is complete in production but before enabling its feature flag for the wider user base.

The proposed requirements for a pull request to be merged to master/deployed to production should be that it is tested on the following platforms/browsers:

Windows
- Google Chrome (latest version)
- Internet Explorer 11
- Edge

Edge is more of an optional choice given its similarity to Google Chrome.

To reduce risks from not comprehensively testing all platforms we will rely on an automated test suite that can be run to check that the new features at least don’t break anything on the other platforms.

## Accessibility Requirements
https://www.gov.uk/service-manual/helping-people-to-use-your-service/understanding-wcag

- Text-to-speech (Screen Reader)
  - It should be possible for a user to have any text on screen read back to them by a Screen reader application.
  - All non-decorative images should have alt-text values that describe the image contents.
  - Form elements should have explicit labels.
  - Link text should be descriptive.
- Keyboard Navigation
  - It should be possible to operate and switch between every interactable element of a feature solely with the keyboard.
  - Tabbing through sections of the page should flow in a natural order.
  - It should be possible to play, pause and stop moving content with the keyboard.
- Magnification
  - It should be possible to see content clearly and interact with features when using a screen magnifier.
- Contrast
  - Chosen colours should provide enough contrast against their backgrounds to remain visible if the user changes their contrast settings.
- Text size 200%
  - Every feature is still usable when text size is increased by 200%
- Touch target areas (Mobile)
  - Touch target areas for interactive elements should be large enough to be easily selected.
- Landscape (Mobile)
  - When viewing content on mobile devices, it should still be readable when the device is in landscape orientation.

Other considerations:
- Any audio or video should have transcripts
- Video should have captions

Further testing information:
https://accessibility.18f.gov/checklist/

We might need to get an accessibility audit according to this https://www.gov.uk/service-manual/helping-people-to-use-your-service/testing-for-accessibility#getting-an-accessibility-audit

## Issue Logging and Handling
Anyone who discovers an issue should feel free to submit it on GitHub. This way the issues sit alongside the codebase and can be resolved automatically upon a relevant bug-fix being merged. When an issue is logged it should be added to the project backlog for prioritisation. If the person logging an issue feels it has enough urgency they should raise it with the product owner/wider team for discussion. Otherwise, regular ‘triage’ sessions will be held to discuss the bug backlog and whether there are any issues that can be brought into the current stream of work to be fixed.

### Triage
> “(In a hospital) the process of deciding how seriously ill or injured a person is, so that the most serious cases can be treated first”

A triage session is where various stakeholders for the project come together to go through the issue backlog to determine their severity and prioritise them for fixing going forwards.

### Feature Requests
Anyone within the team should feel free to make suggestions for improving the quality of a feature or the platform as a whole. This can be done in the form of a ‘feature request’ and should be logged in the same manner as a bug. It should then go into the backlog along with other issues and be triaged accordingly. If the feature request is deemed to have some value then it can be spun out into a ticket for further discovery or development.

### Tech Debt
Tech Debt should also be logged as an Issue, so it can be triaged accordingly. We will want to keep on top of Tech Debt so that it doesn’t get out of control and start to negatively impact our ability to deliver a quality platform.

### Writing a Unit Test
It has been suggested that when a bug is logged that the QA write a unit test for the issue. This will aid any developer fixing it, and also help to build a regression suite to ensure that the issue does not reappear in the future. It will be up to the QA to decide if the bug requires one and if their skills are up to the task.

## Testing Tooling
### Automation

- Unit/Integration tests - Jest
- E2E - Cypress
- API - Postman

Potential accessibility tools:

- [A11y](https://github.com/addyosmani/a11y)
- [AccessLintCI](https://github.com/accesslint/accesslint-ci)
- [Pa11y](http://pa11y.org/)

Honourable mentions:

- Puppeteer (Headless Chrome)
- Gatling (Load testing)

### Manual Testing aids
Some kind of VM for testing Internet Explorer.
Browserstack will be essential for testing cross-platform.

repository: nhos-project/futurenhs-platform

repo_name: nhos-project/futurenhs-platform


text:
# Manual on how to get the Bookmanager Service to run

## Instructions to get the Docker Service Running

1. First, make sure docker is installed and under settings confirm
   that the daemon on tcp box is checked

   * Download File Link: https://www.docker.com/products/docker-desktop

     * You will need to create a docker hub account to be able to download

   * Windows Installation Instructions: https://docs.docker.com/docker-for-windows/install/
   * Mac Installation Instructions: https://docs.docker.com/docker-for-mac/install/

2. Next, navigate to docker preferences

   * Windows 10 Pro or Edu: Under shared drives please make sure your
     local drives are checked
   *
   * Mac: Under file sharing please make sure your local drives are added
   *

3. For Windows users, if you do not have Git you will need to install it
   from the following link: https://git-scm.com/download/win
4. Navigate to your preferred location for downloading and open the
   Terminal/PowerShell in that directory
5. Clone the bookmanager-service to your prefered location using **git**
   and click on the folder that appears

   ```bash
   git clone git@github.com:cyberaide/bookmanager-service.git
   cd bookmanager-service
   ```

5. Within Terminal/Powershell type the following commands:

   ```bash
   docker build -t bigdata:v1 .
   python bmservice.py
   ```

6. Finally, navigate to http://localhost:5000/ or the displayed link to make sure the service works

## How to get Bookmanager to run with MkDocs

The site files for bookmanager are within the project repository (gh-pages by default, but in ours they're located in ```site```).

First perform the command of ```git-checkout``` on the main working branch (master) of the git repository where the source documentation is for your project, and then run the following command:

```mkdocs gh-deploy```

You've done it! Now unseen, MkDocs will build the docs and use ```ghp-import``` to commit to the ```gh-pages``` branch, then pushing the ```gh-pages``` branch out to GitHub.

Use ```mkdocs gh-deploy --help``` to get more options for the ```gh-deploy``` command.

Note: You can't review the built site right as it's pushed out to GitHub. So you might want to verify made changes to the docs first through using the ```build``` or ```serve``` commands and then reviewing the built files perhaps locally.

## References:

* <https://www.mkdocs.org/#getting-started>

* <https://www.mkdocs.org/user-guide/deploying-your-docs/>


text:
# Changelog

# 0.3.3

## Upgraded `@hex-engine/inspector` to 0.3.3 (non-breaking change)

This fixes a Typescript error due to the types for React not being included in the inspector.

# 0.3.2

## New feature: Select entity from Inspector

(Upgraded `@hex-engine/inspector` to 0.3.2 (non-breaking change))

This adds a feature to select rendered entities for inspection in the Inspector tree if the Inspector is in entity select mode.

## Bugfix: canvas.setPixelated wasn't working as intended

`imageSmoothingEnabled` wasn't getting set properly; now, it is.

# 0.3.1

## Upgraded `@hex-engine/core` to 0.3.1 (non-breaking change)

This fixes a bug where Components could not be re-disabled after they were disabled and then enabled.

# 0.3.0

## Upgraded `@hex-engine/core` to 0.3.0 (breaking change)

- `useIsEnabled` has been removed; use `useEnableDisable().isEnabled` instead
- `StateAccumulator` APIs (`useStateAccumulator`, `useListenerAccumulator`, `Component.stateAccumulator`, `Entity.stateAccumulator`) have been removed. Persist state in components instead:

```ts
// Before
const FRUITS = Symbol("FRUITS");

function MyComponent() {
	// To persist state per-MyComponent:
	const fruits = useStateAccumulator<string>(FRUITS);
	// Or, to persist state per-entity:
	const fruits = useEntity().stateAccumulator<string>(FRUITS);
	// Or, to persist state in the root entity:
	const fruits = useRootEntity().stateAccumulator<string>(FRUITS);

	// Do something with fruits
}

// After
function FruitStorage() {
	useType(FruitStorage);

	return {
		fruits: new Set<string>();
	}
}

function MyComponent() {
	// To persist state per-MyComponent:
	const {fruits} = useNewComponent(FruitStorage);
	// Or, to persist state per-entity:
	const {fruits} = useEntity().getComponent(FruitStorage) || useNewComponent(FruitStorage);
	// Or, to persist state in the root entity:
	const {fruits} = useRootEntity().getComponent(FruitStorage) || useNewRootComponent(FruitStorage);

	// Do something with fruits
}
```

## Implicit `Physics.Engine`

If you try to use a `Physics.Body` without having a `Physics.Engine` on the root component, it used to throw an error asking you to add one to the root component. Now, it will instead create one for you (with default settings). If you create your own `Physics.Engine` on the root component, then the behaviour is the same as it was prior to 0.3.0.

# 0.2.0

## `Vector`, `Angle`, and `Point` changes (breaking change)

- `Vector` and `Angle` have been removed; their methods and properties have been moved into `Point`.
- `Point` has been renamed to `Vector`.
- All places where `Angle` instances were present before, now bare numbers are used. For instance, `Geometry`'s `rotation` property used to be an `Angle`, but now it's a `number`.

# 0.1.0

Not documented

repository: colingourlay/hex-engine

repo_name: colingourlay/hex-engine


text:
---
subtitle: H2
---

# H2

## Supported Versions

- `2.0`
- `1.4`
- `1.3` {% include teams.html %}
- `1.2` {% include teams.html %}

## Support Level

        Compatible
        ✓

        Certified
        ✓

        Guaranteed
        ✓ {% include teams.html %}

Support Level determines the degree of support available for this database ([learn more](Learn More/Database Support Levels)).

## Driver

URL format
jdbc:h2:file

Ships with Flyway Command-line
Yes

Maven Central coordinates
com.h2database:h2

Supported versions
1.2.137 and later

Default Java class
org.h2.Driver

## SQL Script Syntax

- [Standard SQL syntax](Concepts/migrations#sql-based-migrations#syntax) with statement delimiter **;**
- $$ delimited strings

### Compatibility

- DDL exported by H2 can be used unchanged in a Flyway migration
- Any H2 SQL script executed by Flyway, can be executed by the h2 tools (after the placeholders have been replaced)

### Example

```sql
/* Single line comment */
CREATE TABLE test_data (
 value VARCHAR(25) NOT NULL PRIMARY KEY
);

/*
Multi-line
comment
*/

-- Sql-style comment

-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');
INSERT INTO test_user (name) VALUES ( $$'Mr. Semicolon+Linebreak;
another line'$$);
```

## Known Vulnerabilities

H2 has a known [RCE vulnerability](https://security.snyk.io/vuln/SNYK-JAVA-COMH2DATABASE-31685) that is unlikely to be fixed as it isn't enabled by default, and
it is not exploitable in Flyway's use of H2.

We will update our CLI to the fixed version as soon as it becomes available, but if this is a concern you can remove the H2 dependency if you do not require it
by deleting the `h2-<version>` JAR from the `drivers` folder

## Limitations

- Due to H2 limitations DOMAIN objects can only be cleaned in the current schema

url: https://raw.githubusercontent.com/nycjay/flyway/16730ccdbbb3fbd079a0b21fd3f58d0ea8e5898d/documentation/Flyway CLI and API/Supported Databases/H2.md

repository: nycjay/flyway

gha_language: Java

repo_name: nycjay/flyway


text:
![](https://img.shields.io/badge/android-API%2014%2B-red.svg)
[![GitHub release](https://img.shields.io/github/release/fattazzo/android-about-library.svg)](https://github.com/fattazzo/android-about-library/releases)
[![GitHub issues](https://img.shields.io/github/issues/fattazzo/android-about-library.svg)](https://github.com/fattazzo/android-about-library/issues)
![GitHub last commit](https://img.shields.io/github/last-commit/google/skia.svg)

# android-about-library

The AboutLibraries library allows you to easily generate beautiful about view fully customizable with less effort and code.

* [Overview](#overview)
* [Include in your project](#include-in-your-project)
* [Simple usage](#simple-usage)
* [Screenshots from sample app](#screenshots-from-sample-app)

## Overview

Here's a quick overview of functions it include:

* About this app section
  - Icon
  - Title
  - Default buttons ( like Google Play, GitHub, Apple Store, Website, etc... )
  - Custom buttons ( user difined buttons like Error Reporter, Licence, etc... )
* Author section
  - Profile image using Gravatar
  - Name
  - FloatingActionButton for social accounts and contacts ( email, GitHub, Facebook, Twitter, Google+, LinkedIn and Website)
* Other projects section
  - Icon
  - Name
  - Description
  - Store and project source button
* Multiple screen support

All the information can be displayed with multilanguage support!

## Include in your project

Available on JitPack

```javascript
repositories {
        maven { url "https://jitpack.io" }
    }
```

add the following dependency to your `build.gradle`

```javascript
implementation "com.github.fattazzo:android-about-library:0.5.2"

//required support lib modules
implementation "com.android.support:appcompat-v7:${versions.supportLib}"
implementation "com.android.support:gridlayout-v7:${versions.supportLib}"
implementation "com.android.support:design:${versions.supportLib}"
implementation "com.android.support:cardview-v7:${versions.supportLib}"
```
Verify the latest release at https://github.com/fattazzo/android-about-library/releases/latest

## Simple usage

```java
val aboutViewBuilder = AboutViewBuilder()
             .withInfoUrl(INFO_URL)
             .withAppId(context.applicationContext.packageName)
             .withLang("it")
             .withFlatStyleButtons(true) // default false
             .withAppBox(true) // default true
             .withAuthorBox(true) // default true
             .withOtherProjectsBox(true) // default true

val intent = Intent(this, com.gmail.fattazzo.aboutlibrary.activity.AboutActivity::class.java)
                .apply { putExtra(AboutActivity.EXTRA_BUILDER, aboutViewBuilder) }
startActivity(intent)
```

**Explanation**
* **withInfoUrl**: Url of info configuration. The configuration can be provided as url, jsonString or as a simple object in the app. [See the wiki](https://github.com/fattazzo/android-about-library/wiki/Data-source-configuration) to learn more.
* **withAppId**: App id used for display informations in the "About this app section"
* **withLang**: Language of about view
* **withAppBox**: Toggle "About this app section"
* **withAuthorBox**: Toggle "Author section"
* **withOtherProjectsBox**: Toggle "Other projects section"

For advanced configuration please refer to the [wiki](https://github.com/fattazzo/android-about-library/wiki).

## Screenshots from sample app

Standard screen

![](https://github.com/fattazzo/android-about-library/wiki/images/about.gif)

Landscape standard screen

![](https://github.com/fattazzo/android-about-library/wiki/images/screenshot05.png)

Landscape tablet screen

![](https://github.com/fattazzo/android-about-library/wiki/images/screenshot04.png)

## License

```
MIT License

Copyright (c) 2018 Gianluca Fattarsi

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

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

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

repository: fattazzo/android-about-library

gha_language: Kotlin

repo_name: fattazzo/android-about-library


text:
# Exercism C# test runner

A test runner automatically verifies if a submission passes all the tests.

This repository contains the C# test runner, which implements the [test runner interface][test-runner-interface].

## Running the tests

To run a solution's tests, follow these steps:

1. Open a command prompt in the root directory.
1. Run `./run.ps1 <exercise> <input-directory> <output-directory>`. This script will:
   1. Make sure all tests run (no skipped tests) for the solution found in `<input-directory>`.
   1. Run all the tests.
   1. Once the script has completed, the test results will be written to `<output-directory>/results.json`.

## Running the tests using Docker

To run a solution's tests using a Docker container, follow these steps:

1. Open a command prompt in the root directory.
1. Run `./run-in-docker.ps1 <exercise> <input-directory> <output-directory>`. This script will:
   1. Make sure all tests run (no skipped tests) for the solution found in `<input-directory>`.
   1. Run all the tests.
   1. Once the script has completed, the test results will be written to `<output-directory>/results.json`.

### Scripts

The scripts in this repository are written in PowerShell. As PowerShell is cross-platform nowadays, you can also install it on [Linux](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6) and [macOS](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-macos?view=powershell-6).

[test-runner-interface]: https://github.com/exercism/automated-tests/blob/master/docs/interface.md

repository: jrr/csharp-test-runner

repo_name: jrr/csharp-test-runner


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "[ICLR'21] Learning a Minimax Optimizer: A Pilot Study"
authors: [J. Shen*, X. Chen*, H. Heaton*, T. Chen, J. Liu, W. Yin, Z. Wang]
date: 2021-01-15T20:42:00-05:00
doi: ""

# Schedule page publish date (NOT publication's date).
publishDate: 2021-01-15T20:42:00-05:00

# Publication type.
# Legend: 0 = Uncategorized; 1 = Conference paper; 2 = Journal article;
# 3 = Preprint / Working Paper; 4 = Report; 5 = Book; 6 = Book section;
# 7 = Thesis; 8 = Patent
publication_types: ["1"]

# Publication name and optional abbreviated publication name.
publication: "International Conference on Learning Representations"
publication_short: "ICLR"

abstract: ""

# Summary. An optional shortened abstract.
summary: "We introduce the learning to optimize (L2O) methodology to the minimax problems for the first time, and addresses its accompanying unique challenges. We present Twin L2O, the first dedicated minimax L2O framework consisting of two LSTMs for updating min and max variables, respectively. We then discuss a crucial concern of Twin-L2O, i.e., its inevitably limited generalizability to unseen optimizees, and present two complementary strategies."

tags: []
categories: []
featured: false

# Custom links (optional).
#   Uncomment and edit lines below to show custom links.
# links:
# - name: Follow
#   url: https://twitter.com
#   icon_pack: fab
#   icon: twitter

url_pdf: https://openreview.net/pdf?id=nkIDwI6oO4_
url_code: https://github.com/VITA-Group/L2O-Minimax
url_dataset:
url_poster: https://drive.google.com/file/d/1KsOlQLpaeDn-Erfbsqo7HdvFwQPTqM6D/view?usp=sharing
url_project:
url_slides:
url_source:
url_video:

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: ""
  preview_only: false

# Associated Projects (optional).
#   Associate this publication with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `internal-project` references `content/project/internal-project/index.md`.
#   Otherwise, set `projects: []`.
projects: []

# Slides (optional).
#   Associate this publication with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides: "example"` references `content/slides/example/index.md`.
#   Otherwise, set `slides: ""`.
slides: ""
---


text:
# reveal-highlight-themes

Version: 8.3.0

Bundles the [Highlight.js](https://highlightjs.org/) syntax themes in a form that allows easy integration in [Reveal.js](https://lab.hakim.se/reveal-js).

Reveal.js internally uses Highlight.js for syntax highlighting in code blocks, but uses a slightly different format for the CSS. This project provides the original Highlight.js themes adapted to the Reveal.js format.

## Installation

If you are using Reveal.js to create a presentation, you can include the highlight themes by running the following:

```
bower install --save reveal-highlight-themes
```

This will download the themes to your local `bower_components` directory (the default location).

You can now change the default syntax highlighting theme by adding or changing the following line in your presentation's `index.html` file:

```html
<!-- For syntax highlighting -->
<link rel="stylesheet" href="bower_components/reveal-highlight-themes/styles/monokai_sublime.css" id="highlight-theme">
```

Simply put in the name of the desired stylesheet and your presentation should now use that instead of the default *Zenburn* syntax theme.

**Note**: If you are using the [Yeoman generator for Reveal.js](https://github.com/slara/generator-reveal), you need to change the stylesheet reference in the `templates/_index.html`.

## Credits

* Highlight.js: The original syntax themes are part of the [Highlight.js](https://highlightjs.org/) project. Please see the project's [license file](https://github.com/isagalaev/highlight.js/blob/master/LICENSE) for licensing information.

## License
Copyright (c) 2014 Nils Winkler. Licensed under the MIT license.

gha_language: HTML


text:
---
title: Cloud Container Compute
type: docs
weight: 20
aliases:
  - /users/cloud-container-compute
description: >
  Run containers on the EGI Cloud
---

The
[EGI Cloud Container Compute service](https://www.egi.eu/services/cloud-container/)
allows you to run container-based applications on the providers of the EGI
Federated Cloud. There are two main ways of executing containers:

1. Using docker (or a similar container runtime) on a VM, so you can just
   interact directly with the container runtime to run your applications. This
   fits simpler applications that can easily fit on one node and are composed by
   a small number of containers.

1. Using a container orchestration platform, e.g.
   [kubernetes](https://kubernetes.io) on a set of VMs to manage the
   applications in an automated way for you. This is usually suited for more
   complex applications that spawn several nodes and are composed of several
   containers that need to cooperate to deliver the expected functionality.

Follow the guides below to learn more about them.

The EGI Cloud Container Compute service was presented in one of the
[EGI Webinars](https://www.egi.eu/webinars/). See more details on the
[indico page](https://indico.egi.eu/event/5492/) and a video recording on
[YouTube](https://youtu.be/cZ3M47ON0pg).

repository: gwarf/documentation

repo_name: gwarf/documentation


text:
ephemeris
===

An example that sets the time on the GPS module using the Particle cloud clock,
 and then proceeds to load Satellite ephemeris data from NASA onto the module!
  This demo should have a separate ephemeris data download app, and save that data into firmware.
  I believe this data can be valid for as long as 14 days, so it should give you a good heads up.
  Future demos should be able to transmit this via the cloud, but doing it locally now proves the concept,
  and saves bandwidth.  :)

* ephemeris data for GPS
    * http://cddis.nasa.gov/Data_and_Derived_Products/GNSS/broadcast_ephemeris_data.html#codeTable
    * http://cddis.nasa.gov/Data_and_Derived_Products/GNSS/Real-time_products.html
    * ftp://cddis.gsfc.nasa.gov/gnss/00readme
    * ftp://cddis.gsfc.nasa.gov/gnss/data/satellite/
    * ftp://cddis.gsfc.nasa.gov/gnss/data/daily/2016/056/16n/
    * ftp://cddis.gsfc.nasa.gov/gnss/data/hourly/2016/056/19/

* almanac data for GPS
    * http://www.navcen.uscg.gov/?pageName=gpsAlmanacs
    * http://www.gdgps.net/products/broadcast-ephemeris.html

* PDFs on NMEA / GPS

    * http://www.mouser.com/ds/2/737/adafruit-ultimate-gps-779243.pdf
    * https://www.adafruit.com/datasheets/PMTK_A08.pdf
    * https://www.adafruit.com/datasheets/PMTK_A11.pdf
    * https://www.adafruit.com/datasheets/GTop%20EPO%20Format%20and%20Protocol-v14.pdf
    * https://www.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf
    * https://www.adafruit.com/datasheets/PA6B-Datasheet-A07.pdf

    * https://www2.u-blox.com/images/downloads/Product_Docs/NMEA-CommandManual_(FTX-HW-13002).pdf
    * ftp://<IP_ADDRESS>/Support/SimCom/SIM68/SIM28<EMAIL_ADDRESS>    * http://www.telit.com/fileadmin/user_upload/Telit_SGEE-EPO_Application_Note_r2.pdf

* NMEA checksum calculator -
    http://www.hhhh.org/wiml/proj/nmeaxor.html

* other projects in this space
    * http://arduino-projects4u.com/gps/
    * https://code.google.com/archive/p/trackuino/

* best example / available source code for loading EPO data - lets do this in firmware (and maybe node) - (will not accept anything that does not give proper attribution / licensing to f5eng and others)
    * https://github.com/f5eng/mt3339-utils

repository: wrtcoder/fancy-asset-tracker

repo_name: wrtcoder/fancy-asset-tracker


text:
# Project changelog

### October 10, 2012

Initial commit and code.

### November 16, 2012

- Optionally exclude a folder
- Set expiration headers of the static content
- Remove unnecessary headers in requests
- HTTP 403 (Forbidden) error handling

### March 15, 2013

Adding `Access-Control-Allow-Origin` for dynamic responses.

### April 22, 2013

Adding all error code overrides.

<hr>

By: [topsitemakers.com](http://www.topsitemakers.com).


text:
---
title: "Gen3 - TSV Formatting and Templates"
date: 2018-09-18T15:12:12-05:00
linktitle: /resources/user
layout: withtoc
menuname: userMenu
---

# TSV Formatting and Templates
---
TSVs, or tab-separated values files, are the most commonly used format for data submission to a Gen3 Data Commons.

One TSV is submitted per node in the graphical data model starting with the root node `program` and next its child node `project`. Note: often a data commons administrator will create these first two nodes for a data submitter, thus the data submitter should begin their submission by preparing TSVs for the child node(s) of `project`.

The column headers of a TSV are the properties of a node, and the rows in TSVs are individual data records. Thus, the number of rows in a TSV minus the header is the number of records that will be created or updated when the TSV is submitted to a Gen3 Data Commons.

---
## TSV Formatting Checklist

1. Specify the node `type` for every row. This is the name of the node (or `node_id`), and it must be exactly the same for every row.
2. Specify the `submitter_id` of every record by entering a unique text identifier in each row. Make sure you don't use the same value in more than one row of your TSV because every record in a project must have a unique `submitter_id`!
3. Specify the links to the parent node(s) for each record. Note: parent records must exist before submitting child records! You can specify either the links with either the `parents.submitter_id` or the `parents.id`
4. Fill in all required properties. Every row in the TSV must have a value for all required properties. Optional properties can be filled in for only some rows or the column can be left out entirely.

## Notes about TSV Formatting

* submitter_id

	Every row in the TSV / record in a node must have a unique `submitter_id`. This can be any textual identifier, usually something human-readable or encoding some information, e.g., `case-1234_lung_cancer`, `sample_blood_draw2_month6`.

* id

	Every record in every node in the data commons has the property `id`, which is a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier), not to be confused with "submitter_id" or "project_id".

* links

	Links are a special kind of property. Every node besides the root node `program` requires a link to it's "parent node".  The link is specified by "<parent-node-backref>.submitter_id". The "backref" of the parent node is usually the plural form of the parent node (e.g., "subjects.submitter_id" for a link to a "subject" record; if unsure, the backref will be in the template TSV downloadable from the data dictionary viewer).

	> Note: that you can alternatively specify links with the `id` property using the TSV column header `studies.id`. The value in this column would be the `id` (UUID) of your study instead of the `submitter_id`. When creating links, you can use `submitter_id`, `id`, or both, but only one is required. Most users prefer using a parent record's `submitter_id` to specify links because they're typically more human-readable than an `id`, which is a random 128-bit UUID.

	Some child-parent node relationships are one-to-many or many-to-many (i.e., "-to-many" relationships), meaning that one child record can have multiple parent records in the same parent node. For example, if a single `subject` belonged to three `studies`, then the `subject` TSV would specify the three links by submitting a comma-separated list of the parent submitter_ids: `study_1,study_2,study_3`.

    > Note: Comma-separated lists are generally how "array" variables (properties that take lists as their value), like links, are formatted in a TSV.

    If submitting multiple links in JSON format, the three parent studies would look like this:

```
  "studies": [
    {
      "submitter_id": "study_1"
    },
    {
      "submitter_id": "study_2"
    },
    {
      "submitter_id": "study_3"
    }
  ],
```

* program

	The `program` node has the property `name`, the `project` node has the property `code`, and every other node has the property `submitter_id`. These all serve the same basic function, which is to give that record a more human-readable call-name (the internal call-name is the UUID).

* project

	A project also has the property `project_id`, which is the unique combination of the program `name` and the project `code`. So, for your project, the program is `prog` and the project code is `proj`; so your `project_id` is the dash-separated combination: `prog-proj`.

## Template TSVs for metadata submission
* * *

Here are some sample TSV file templates for example nodes in a Gen3 data dictionary.

Look at the "Dictionary" section of a [Gen3 data commons](gen3.datacommons.io/dd) to find the complete list of nodes and download template TSVs for that data commons' data model.

[study.tsv](study.tsv)

[case.tsv](case.tsv)

[biospecimen.tsv](biospecimen.tsv)

[sample.tsv](sample.tsv)

[aliquot.tsv](aliquot.tsv)

[analyte.tsv](analyte.tsv)


text:
#[Eva](https://github.com/gsi-upm/Eva)
![alt tag](http://i61.tinypic.com/2dkjqe0.png)
##Introduction

Indoor evacuation systems are needed for rescue and safety management. One of the challenges is to provide users with personalised evacuation routes that can follow in real time.

To this end, this project aims at exploring the possibilities of GoogleGlass for participatory multiagent indoor evacuation simulations.  Participatory multiagent simulation combines scenario-guided agents and google-glass equipped humans that coexist in a shared virtual space and jointly perform simulations. In this project, the simulation will simulate an evacuation of the ground floor of the building B in the Telecommunication Engineering School of the Universidad Politécnica de Madrid.

##Structure

The project is divided in 3 parts:
- [Google Glass Application] (https://github.com/gsi-upm/Eva/tree/master/GoogleGlassApp)
- [Web Service] (https://github.com/gsi-upm/Eva/tree/master/mirror-api-server)
- [Smartphone Application] (https://github.com/gsi-upm/Eva/tree/master/SmartphoneApp)

The Google Glass application will show a map of the building and the user's location along with the route that he or she will have to follow to find the exit. It is developed using the Google's Glass Development Kit (GDK).

The web service will let us send notification cards to the Google Glass user with the aim of warning him about a recent emergency. The user will be able to launch the Google Glass App by tapping in the notification card. It is developed using the Google's Mirror API.

The android application has been developed with the aim making our service more accessible to more users that do not have the Google Glass device.

repository: patMoodley/Eva

repo_name: patMoodley/Eva


text:
---
date: 2016-09-13T09:00:00+00:00
title: Tutorials
aliases:
    - /documentation/tutorials/
    - /documentation/guides/
menu:
  main:
    parent: "Tutorials"
    name: "Overview"
    identifier: "tutorial-overview"
    weight: 10
---

## Getting started
We’ve created a set of showcase applications, services and corresponding blueprints that demonstrate Vamp’s core features - together we call them “Sava”. Sava is a mythical vampire from Serbia ([wiki](http://en.wikipedia.org/wiki/Sava_Savanovi%C4%87)), but in our case it is a [Github repo](https://github.com/magneticio/sava) full of examples to help us demonstrate Vamp.
You can work with Sava in the [Vamp hello world](/documentation/installation/hello-world/) setup (or any other Vamp installation).

1. [Deploy your first blueprint](/documentation/tutorials/deploy-your-first-blueprint/)
2. [Run a canary release](/documentation/tutorials/run-a-canary-release/)
3. [Split a monolith into services](/documentation/tutorials/split-a-monolith/)
4. [Merge a changed topology](/documentation/tutorials/merge-and-delete/)

## Learn more

* [Deploy and canary release Wordpress](/documentation/tutorials/deploy-wordpress-and-mysql)
This tutorial shows how to deploy Wordpress together with mySQL and set up a gateway to run a canary release

* [Automate a canary release with rollback](/documentation/tutorials/automate-a-canary-release)
Use workflows to automate a canary release and force a rollback (Vamp Runner)

* [Create a workflow that generates events](/documentation/tutorials/create-a-workflow)
Learn about the Vamp events system and create a simple workflow that interacts with the Vamp API


text:
### [CVE-2021-35312](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-35312)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

A vulnerability was found in CIR 2000 / Gestionale Amica Prodigy v1.7. The Amica Prodigy's executable "RemoteBackup.Service.exe" has incorrect permissions, allowing a local unprivileged user to replace it with a malicious file that will be executed with "LocalSystem" privileges.

### POC

#### Reference
- http://packetstormsecurity.com/files/163744/Amica-Prodigy-1.7-Privilege-Escalation.html
- https://packetstormsecurity.com/files/163744/Amica-Prodigy-1.7-Privilege-Escalation.html

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

repo_name: trickest/cve


text:
# Archfiend Changelog

All notable changes to this project will be documented in this file, in reverse chronological order.

## [0.1.2] (2020-04-09)

### Changes:

* support progname argument and block syntax by MultiLogger and DefaultFormatter
* generated daemons will use Rubocop version of at least 0.72.0

## [0.1.1] (2019-01-14)

### Changes:

* daemons gem removed in favor of Process.daemon
* add formatter setting for all loggers
* fix the usage of Forwardable
* split requires for runtime and cli phases

## [0.1.0] (2018-10-10)

### Changes:

* updated the documentation
* added the generator extensions interface
* extracted the gem

[0.1.2]: https://github.com/toptal/archfiend/compare/0.1.1...0.1.2
[0.1.1]: https://github.com/toptal/archfiend/compare/0.1.0...0.1.1
[0.1.0]: https://github.com/toptal/archfiend/compare/13d855f...0.1.0

repository: toptal/archfiend

gha_language: Ruby

repo_name: toptal/archfiend


text:
Go binding for [Cloudflare Quiche](https://github.com/cloudflare/quiche)

```
git clone --recursive https://github.com/goburrow/quiche
```

## Build

Build environment:

```
docker build -t quiche:builder -f docker/Dockerfile docker/
docker run -i -t -v "$PWD:/usr/src/quiche" -w "/usr/src/quiche" quiche:builder
```

Build dependencies:

```
cd deps/quiche
cargo build --release
```

Build application using this Go library:

```
GO_LDFLAGS="-L/absolute/path/to/libquiche" go build
```

To create a static binary, `CGO_LDFLAGS` may need to include `-ldl` (Linux) or `-framework Security` (MacOS)

repository: dotwoo/quiche

repo_name: dotwoo/quiche


text:
### Project Overview

 **Superhero Statistics**

The rise of superheroes and supervillains is at an all time high. The 'Academy of Super Beings(ASB)' was formed to bring order to it. We have with us the data of more than 500 super humans but we need your knowledge of descriptive statistics in figuring out the important insights from it.

**About the Dataset**

The dataset has details of 594 super hero characters with the following 17 features.

Feature	         Description

ID	    				 Unique character ID

Name	           Name of the character

Gender	         Male/Female

Intelligence	   Intelligence points of the character

Strength	       Strength points of the character

Speed	           Speed points of the character

Durability	     Durability points of the character

Power	           Power points of the character

Combat	         Combat points of the character

Total	           Total sum of all the above points of the character

Height	         Height of the character(-99 value equates to 'immeasurable')

Weight	         Weight of the character(-99 value equates to 'immeasurable')

SkinColor	       Skin color of the the character

EyeColor	       Eye color of the character

HairColor        Hair color of the character

Race	           Which race the character belongs to

**Why solve this project?**

After completing this project, you will have a better grip on the applications of descriptive statistics. In this project, you will be applying the following concepts:

*Bar plotting*

*Boxplot plotting*

*Pie-chart plotting*

*Subplot operations*

*Feature Correlation*

IQR operations

repository: ruchirshetye/ga-learner-dsmp-repo

repo_name: ruchirshetye/ga-learner-dsmp-repo


text:
# Java Kamayan

## Setup

Before you can start, you need to [install maven](http://maven.apache.org/install.html).
You might be able to use a package manager to install it easier (such as `brew`
for MacOS or `apt-get` for Ubuntu).

## Running the Java Kamayan

Once you have maven installed, you just need to run `mvn test`. This will run
all the tests, showing you which ones have failed.

After you have completed the first serving, all tests will be marked as
ignored. You will need to remove or comment out the `@Ignore` lines before you
can see if a particular test will pass or fail.

repository: bananno/kamayan

repo_name: bananno/kamayan


text:
# {Kipngeno Sigei Portfolio}
#### Personal Portfolio
### By Kipngeno Sigei
## Description
This is my personal portfolio website that is aimed to explain more about who i am.
## Setup/Installation Requirements
To visit this site, You need to have the following;
1. Internet bundles.
2. Mobile/Computer browser (e.g chrome,mozila firefox etc.)
## Known Bugs
No known bugs so far.
## Technologies Used
In this project, I have used html for writing website contents and CSS for styling of the page and also Javascript for specific responsiveness of my website.
## Support and contact details
For surport and Questions, feel free to reach me on,
<EMAIL_ADDRESS>Phone No. +254725059416

### License

* [[License: MIT]](LICENSE.md)
* Copyright (c) 2021 Kipngeno Sigei

repository: willardsigei/Techfolio

repo_name: willardsigei/Techfolio


text:
---
layout: post
title:  "AAI: BLAST vs Diamond"
date:   2019-01-16
excerpt: "Estimating Average Amino Acid Identity (AAI) with BLAST and Diamond."
category: Blog
tag:
- miga
- experiment
- bioinformatics
- technical
comments: true
---

# AAI: Average Amino Acid Identity

The Average Amino Acid Identity (AAI) is a very useful metric of similarity
between two genomes that can effectively be used for (among others)
taxonomic classification[^1].

Originally, this metric was proposed using BLAST as the search engine[^2], and
that's the default for the implementation I use in the Enveomics Collection[^3].
This works great for a few comparisons, but the long running time becomes a
problem when building an all-vs-all distance matrix, because the number of
comparisons grows quadratically with the number of genomes.
On average, a single-threaded AAI estimation with BLAST takes about 6 to 7
minutes, which means over 45 CPU days for a relatively small collection of 100
genomes.
I have implemented a quick estimator of AAI using only conserved genes for
distant pairs (hAAI, available as part of MiGA[^4]), and it solves the issue
effectively for about 70-95% of the comparisons (depending on the relatedness
of the genomes), but the problem remains for a constant fraction of the matrix
that can still add to CPU times in the order of years for collections with
about 10 thousand genomes.

For these large collections, I'm replacing the search/alignment engine of AAI
for Diamond, and here are some results.

# Time reduction

Is Diamond THAT much faster to worth the switch? Yes!
Diamond-based AAI takes, on average, between 6 and 16 seconds (depending on the
relatedness and completeness of the genomes), which is about 30 to 50 times
faster than BLAST.
In fact, the [CompareM]() implementation seems to be even faster, averaging (in
a smaller test set) about 3 seconds.
However, CompareM doesn't have all the whistles that I need in MiGA (*e.g.*,
SQLite3 support to store intermediate and final results), so I'm sticking with
the Enveomics Collection implementation.

# AAI correlation

I ran a large-scale experiment using all the genomes available from type
material (9,076 genomes, available at
[MiGA Online](http://microbial-genomes.org/projects/TypeMat)).
In this set, most pairs can be resolved using the hAAI (about 96%), so I'm
evaluating what happens with the remaining 3.4 million pairs (still a very large
number!).

Overall, the two estimates have a high correlation (Pearson's R = 0.988):

{% include gallery images="/assets/img/aai-blast-vs-diamond/aai-lighter.png" cyyaption="AAI BLAST vs Diamond" %}

However, upon closer inspection, it appears there are two regions with different
behaviors, splitting around 60% and 50% Diamond AAI:

{% include gallery images="/assets/img/aai-blast-vs-diamond/aai-diff.png" cyyaption="Difference in AAI estimations" %}

## Diamond AAI > 60%

For the closest pairs, it looks like the correlation is almost perfect, with a
Pearson's R = 0.992 (n = 83 thousand, or 2.4%).
Moreover, the absolute difference was usually less than 1 percentual point,
with an average difference of 0.88% on average
(Inter-Quartile Range -IQR-: 0.12-0.84%).
And the correlation was even better in the closest relatives (where single-digit
deviations could matter most).
For those with Diamond AAI > 90%, Pearson's R = 0.999, and the absolute
difference was 0.068% on average (IQR: 0-0.074%).

The results are still good. Not great, but pretty good.
The Pearson's R = 0.942 (n = 3.3 million, or 96.4%),
which means there is a high linear correlation, and an absolute difference of
1.2% on average (IQR: 0.58-1.38%).
This difference is not that bad: less than 1.5 points in more than 3/4 of pairs.
Staying within 2% of the estimate is actually pretty good for such low AAI.
However, the line is far from 1:1. A linear correlation indicates that, in this
region, `BLAST AAI = 10.92 + 0.657 * Diamond AAI`.
What about intermediate values?

## Diamond AAI between 50 and 60%

Here's where things get trickiest, because there is significant overlap from
both regimes: some higher values follow the 1:1 line closely, while some lower
values continue (with some shift) the non-1:1 linear trend seen in more distant
pairs.
For this region, Pearson's R = 0.753, which means a very low predictive power.
The absolute difference is a whopping 5.26% on average (IQR: 3.4-7.3%).
The overlap between regimes is seen the plot above, but it's even more clear
when we study the distribution of differences between BLAST and Diamond AAI for
each region in isolation:

{% include gallery images="/assets/img/aai-blast-vs-diamond/aai-diff-hist.png" cyyaption="Histograms of difference in AAI estimations" %}

Remember that I'm only using here the pairs for which hAAI failed, meaning that
**ALL** the pairs here matter (even distant pairs).
Perhaps this issue can be
corrected upon closer inspection of the pairs in this set, but in the meantime
this means that I need to implement reference taxonomic distributions in MiGA
using both BLAST AAI and Diamond AAI separately.
Speaking of which...

## Diamond AAI for taxonomy

We have established that the out-of-the-box replacement of BLAST for Diamond is
not without issues. However, can we still use this non-linearly-correlated
estimate to determine taxonomic affiliation?
Well... the overall correlation is actually pretty good, despite the
region-specific issues.
The Pearson's R = 0.988 for the entire distribution.
Moreover, we know this is not an effect of the dynamic ranges but an actual
monotonic correlation, because Spearman's rho = 0.938.
Not as impressive, but still pretty high.
In fact, the overall estimate is relatively close throughout, with an absolute
difference between estimates of 1.22% on average (IQR: 0.57-1.39%).

# Conclusions

Diamond shows a great potential as a BLAST replacement in the estimation of AAI,
but the distribution of identities needs to be further studied in order to
identify appropriate corrections that allow a 1:1.
Given Diamond-specific considerations
(such as empiric distribution specific for Diamond AAI), we can indeed use the
Diamond AAI values in MiGA.
Importantly, the accuracy of the taxonomic affiliations using Diamond AAI must
be re-evaluated.

# References

[^1]: Rodriguez-R LM, Konstantinidis KT. 2014. Bypassing Cultivation To Identify Bacterial Species. *Microbe* 9:111–118. [More details](/publication/bypassing-cultivation).

[^2]: Konstantinidis KT, Tiedje JM. 2005. Towards a Genome-Based Taxonomy for Prokaryotes. *J Bacteriol* 187(18):6258-6264. [DOI: 10.1128/JB.187.18.6258-6264.2005](https://doi.org/10.1128/JB.187.18.6258-6264.2005)

[^3]: Rodriguez-R LM, Konstantinidis KT. 2014. The enveomics collection: a toolbox for specialized analyses of microbial genomes and metagenomes. *PeerJ Pre* 4:e1900.2016. [More details](/publication/enveomics-collection).

[^4]: Rodriguez-R LM, et al. 2018. The Microbial Genomes Atlas (MiGA) webserver: taxonomic and gene diversity analysis of Archaea and Bacteria at the whole genome level. *NAR* 46(W1):W282-W288. [More details](/publication/miga-webserver)


text:
---
title: "Introduction"
date: 2020-03-04T20:29:45Z
draft: false
group: cli
weight: 501
---

Replicante Core comes with a command line tool, [`replictl`]({{< ref "./replictl/intro.md" >}}),
that is used to interact with Replicante Core Clusters and control the clusters it manages.


text:
git-undo(1) -- Remove latest commits
====================================

## SYNOPSIS

`git-undo` [-s, --soft, -h, --hard] [<commitcount>]

## DESCRIPTION

  Removes the latest commits.

## OPTIONS

  --soft or -s

  Rolls back the commit(s) but leaves the changes in the staging area.

  --hard or -h

  This option wipes your commit(s), so that your changes cannot be recovered. Use with care.
  To avoid being confused with `--help`, there will be a confirmation when `-h` is specified.

  <commitcount>

  Number of commits to remove. Defaults to *1*, thus remove the latest commit.

## EXAMPLES

  Removes the latest commit.

    $ git undo

  Removes the latest commit, restoring the staging area.

    $ git undo -s

  Remove the latest 3 commits:

    $ git undo 3

## AUTHOR

Written by Kenneth Reitz<EMAIL_ADDRESS>and Nick Lombard<EMAIL_ADDRESS>
## REPORTING BUGS

<<https://github.com/tj/git-extras/issues>>

## SEE ALSO

<<https://github.com/tj/git-extras>>

repository: tj/git-extras

repo_name: tj/git-extras


text:
*Note* - A MongoDB & Express based version of this exists on [this repo](https://github.com/brahmnoor/PreBookJS)! So take your pick.

## PreBook
![screenshot](https://cdn.pbrd.co/images/HRHJWWp.gif "screenshot")
A movie booking website made in HTML, PHP, MySQL and occasional snippets of Javascript. Key features -
1. User login & registeration - using PHP sessions and a MySQL database.
2. Movie booking - with seat selection, hall selection, time selection.
3. Commenting - To post reviews of a specific movie.
4. User buy history - to quickly checkout the history of tickets purchased by a user.

Important Note - This is not ready for production, because it has multiple problems arising in real life (see future updates should include section). It was built as a project, and should be appropriate as a starting point.

### Future Updates should Include
*Reasons why you shouldn't put this up on a production level yet.*
1. Hashing password. Storing unsalted, unhashed passwords should be a crime.
2. Adding a payment gateway.
3. Handling simuntaneous transactions (so a way to put a seat on a sort of hold for the duration of buying).
4. Adding email verification.

### How to set it up
1. Edit the db.php files with the details of your MySQL database.
2. Use the backup.sql file to import the backed up database to your MySQL to make sure that the database schema is similar.
3. Profit! :)

### Try Me?
1. Of course. You can [try me out](https://i.cs.hku.hk/~bschawla/project1/index.html "try me out").
2. Also, you can see the screenshots below.

### Screenshots
![screenshot](https://i.imgur.com/9JJxaFu.png "screenshot")

![screenshot](https://i.imgur.com/7C9CIc0.png "screenshot")

repository: brahmnoor/PreBook

gha_language: PHP

repo_name: brahmnoor/PreBook


text:
# Alternate Capitalization

### Code Wars Link

https://www.codewars.com/kata/alternate-capitalization

### Problem Domain

Given a string, capitalize the letters that occupy even indexes and odd indexes separately, and return as shown below. Index 0 will be considered even.

For example, capitalize("abcdef") = ['AbCdEf', 'aBcDeF']. See test cases for more examples.

The input will be a lowercase string with no spaces.

Good luck!

### Solutions

  - #### Basic Solution using forEach()
    This solution is basic in its logic.  I split the string into an array, then loop through each item in the array using the forEach method.  The call back function has been refactored to a fat arrow function and the if else block has been refactored to a ternary operator.  If the index of the array item is odd, I concatenate an uppercase value to the odd string and concatenate a lowercase value to the even string. If the index of the array item is even, I concatenate an uppercase value to the even string and concatenate a lowercase value to the odd string.  The values of the even and odd strings are returned as an array.

  - #### Solution Using array.map()
    By splitting the string into an array, I can run the values through array.map() using a call back function.  There are two call back functions, one for odd numbers and one for even numbers.  Array.map() returns a new array based on evaluating the index for being an odd number.  The odd_to_uppercase call back changes the case to uppercase if the index is odd.  The even_to_upper does the opposite.

  - #### Solution Using string.replace() with Regex
    The string.replace() method is being called using a regular expression and a callback.  One call back is for creating a string where odd number indexes are capitalized and the other is for even indexes.  The pattern looks for two characters next to each other.  Each character is captured by wrapping in parenthesis and then can be referenced by p1 and p2 in the call back.  The two callbacks don't discern between odd or even, just first or second.  First is odd and second is even.  If the string is odd in length, there will not be a second value in the last pair, so p2 needs to be evaluated for a value before being returned to the replace() method to be used as the replacement string.

gha_language: JavaScript


text:
# invisiblime
[![Build Status](https://travis-ci.org/jkloo/invisiblime.png)](https://travis-ci.org/jkloo/invisiblime)
[![Coverage Status](https://coveralls.io/repos/jkloo/invisiblime/badge.png)](https://coveralls.io/r/jkloo/invisiblime)

Sublime Text plugin to keep the ignored files/dirs in-sync between a sublime-project file and a VCS ignore file.

repository: jkloo/invisiblime

repo_name: jkloo/invisiblime


text:
---
layout: post
title: "Managing State across an Ant Swarm of AWS Lambda Tasks"
permalink: /2015/07/managing-state-across-lambda
published: true
tags:
  - Cloudstitch
  - Microservices
---

Background tasks are a critical component of web applications. These tasks often
perform work that takes too long to place inside the request-response loop of
the app server. For example, many of our tasks at
[Cloudstitch](http://www.cloudstitch.com/) involve synchronizing data between
third-party services like Eventbrite and Google Spreadsheets.

The typical background task setup most of us are used to is what you might call
the **Big Fat Worker Machine Model**. Whole computers, maybe EC2 instances,
running whatever you want. In this setup, handling a background task is as
simple as writing a program that takes and input and saves an output.

![](https://cdn-images-1.medium.com/max/1600/1*5YwojmmyjZ-AHvbIRvZw6w.png)
The **Big Fat Worker** model of background tasks.

But with the growing microservice trend, this worker-machine model no works. The
web of background tasks on AWS Lambda look more like a swarm of ants each
contributing a bit of labor to a piece of meat dropped on the ground. Some are
working in parallel. Others show up later to finish the job off. And messaging
between workers isn’t always explicit and linear: services like AWS Lambda
encourage execution to be triggered implicitly, via S3 and DynamoDB events,
rather than explicitly via function calls or queue pushes.

![](https://cdn-images-1.medium.com/max/1600/1*4eeQrojcm8paSeLiHdEoOQ.png)
A single background task accomplished with an **Ant Swarm** of workers.

Managing state across all the workers in that ant swarm can be a challenge:

* The work is split across many, possibly parallel workers
* Some execution, invocation, and restart control is ceded to the platform
* No global scope exists to monitor the state of the entire ant swarm operation at
once

I’ve tried a lot of different approaches to handling this problem while building
[Cloudstitch](http://www.cloudstitch.com/), and while I don’t have a silver
bullet solution, I have settled on a pattern that seems to be working well
enough to share. That approach is to **coordinate background tasks with
log-append job records in S3 (or DynamoDB). **What follows is targeted at the
AWS ecosystem but easily adaptable to other microservice infrastructures.

Here’s how it works. Each background task stores its state in a a job file. This
file is *logically* one JSON object, but *physically* a log structure of
refinements to some initiating object. Each **job-n** is an overwriting
refinement to **job-{n-1}**. That means the task is initially represented by a
single physical JSON object uploaded to S3. As microservices contribute work to
the task, they modify the state of the task by creating new files.

Your job metadata is logically one file, but physically a time-ordered log
structure in S3.

This strategy enables easy leveraging of the events S3 can throw to Lambda.
**Every time a refinement is appended to the log, it triggers a re-evaluation of
the overall job status. **That’s done by a router function which acts as the ant
queen, so to speak, to keep an eye on the swarm of ants as they report on their
status. When **job-n.json** is uploaded, the router is triggered, downloads and
merges **job-{1:n}.json **into a single state object, and decides what to do
next.

The lifecycle ends up looking like a back and forth between S3 events, the
router function, and worker functions:

* **Creation. **Uploading an initial **job.json** file to S3 kicks off the router,
which begins issuing lambda calls (or pushing log refinements which, passively
trigger more work).
* **Ant Swarm.** Each piece work done finishes with a log append in S3, triggering
the router to take a look and possibly request more work. For example, if all 10
of 10 web scraping sub-tasks are complete, the router might decide to initiate
the next phase of labor.
* **Completion**. Eventually, a log append is pushed that results in the logical
job file achieving some completion state. In this case the router finishes the
job off — notifying callers, saving to a database, whatever is appropriate.

Overall, I’m pretty pleased with the setup. It’s a bit more work up front to
organize a cascade of tasks this way, and there’s admittedly a lot bookkeeping
overhead if your sub-tasks are small, but it scales wonderfully.

**Here’s an NPM module called **[Pile
On](https://www.npmjs.com/package/pile-on)** I’ve created to help manage JSON
objects and arrays of this access pattern.** This just helps with the file
management described above. For example, you can:

    // Create a new Job File
    Pileon.create(S3Bucket, 'job.json', {state: 'running', x: 1});

    // Append/overwrite the Job File
    Pileon.append(S3Bucket, 'job.json', {state: 'finished', y: 3});

    // Fetch a promise for the merged file
    // {state: finished, x: 1, y:3}
    var promise = Pileon.readObject(S3Bucket, 'job.json');

I’ve got a few more helper libraries I’ll be packaging down the road to handle
the execution management of jobs managed this way. In the meantime I’d love your
thoughts. It’s a wild world of experimentation out there in microservice land
and I know there are a lot differing strategies.

extension: markdown