text:
# Continuous Integration Cortex Module
The current Cortex Continuous Integration module focus on the promotion of a Cortex .studiopkg package into a single environment and the automated test execution of all the tests associated with the package flows.

The module allows users to perform the following initial functionality:
* Import and publish flow packages via Cortex LivePortal
* Import test cases on the package
* Visualise previously executed test cases and test plans

Once a flow or a subtask has been imported:
* Further test cases may be defined, saved and executed
* Test cases may be grouped into test plans that may be saved and executed

## Table of Contents
1) [Dependencies](#dependencies)
    * [Cortex Version](#cortex-version)
    * [OCIs](#ocis)
    * [Files](#files)
    * [Other](#other)
1) [Support and Warranty](#support-and-warranty)
2) [Installation](#installation)
3) [How to use](#how-to-use)
4) [How you can contribute](#how-you-can-contribute)
5) [Versioning](#versioning)
6) [Licensing](#licensing)

## Dependencies
### Cortex Version
This version of the Continuous Integration module was developed in Cortex version 7.1. Some functionality may not be available on different versions of Cortex.

### OCIs
The  module requires the following Cortex OCIs:
* PowerShell
* HTTP

### Files
The Continuous Integration module requires the following files:
* [CTX-Logging.studiopkg](https://github.com/CortexIntelligentAutomation/CTX-Logging/releases/download/v1.0/CTX-Logging.studiopkg)
* [CTX-Logging Database create script](https://github.com/CortexIntelligentAutomation/CTX-Continuous-Integration/releases/download/v1.2/Cortex-Logging-Install.sql)
* [CTX-Continuous-Integration.studiopkg](https://github.com/CortexIntelligentAutomation/CTX-Continuous-Integration/releases/download/v1.2/Cortex-ContinuousIntegration-Install.sql)
* [CTX-ContinuousIntegration Database update script](https://github.com/CortexIntelligentAutomation/CTX-Continuous-Integration/releases/download/v1.2/Cortex-ContinuousIntegration-Install.sql)

### Other
The Continuous Integration module has the following additional requirements:
* CTX-Logging module

## Support and Warranty
This module is supplied as a template that you can amend and extend to fit your requirements, as such it is not supported as part of the Cortex Product suite under the Cortex product support agreement.

## Installation
Details of the installation can be found in the [Continuous Integration Deployment Plan](https://github.com/CortexIntelligentAutomation/CTX-Continuous-Integration/blob/master/CTX-Continuous-Integration%20-%20Deployment%20Plan.pdf).
## How to use
A detailed User Guide has been provided with instructions on how to use the flows/subtasks, available [here](https://github.com/CortexIntelligentAutomation/CTX-Continuous-Integration/blob/master/CTX-Continuous-Integration%20-%20User%20Guide.pdf). Configuration of subtask inputs and outputs are detailed in notes on the subtask workspace.

## How you can contribute
Unfortunately, we cannot offer pull requests at this time or accept any improvements.

## Versioning
Continuous Integration has the following versions, starting with the most recent:

Version | Release | Functionality | Notes
------------ | ------------- | ----------- | -----------
v1.2 | 21/02/2019 | Gateway-EF-Export-Flows | Updated
v1.2 | 21/02/2019 | Gateway-GAT-Get-Authentication-Token | Updated
v1.2 | 21/02/2019 | Gateway-GIFS-Get-Ids-From-StudioPackage | Updated
v1.2 | 21/02/2019 | Gateway-ISP-Import-Studio-Package | Updated
v1.2 | 21/02/2019 | AutomatedTest-RTOF-Run-Test-On-Flow | Updated
v1.2 | 21/02/2019 | CCI-Package-Deployment-UI | Updated
v1.1 | 16/05/2019 | AutomatedTest-Subtask-Test-Flow-Template | Created
v1.1 | 16/05/2019 | CCI-Package-Deployment-UI | Updated
v1.1 | 16/05/2019 | CCI-Package-Deployment | Updated
v1.1 | 16/05/2019 | CCI-Test-Management-UI | Updated
v1.1 | 16/05/2019 | CCI-Test-Cases-Execution | Updated
v1.1 | 16/05/2019 | AutomatedTest-IVID-Insert-Variables-Into-Database | Updated
v1.1 | 16/05/2019 | AutomatedTest-RTOF-Run-Test-On-Flow | Updated
v1.0 | 21/02/2019 | CCI-Package-Deployment-UI | Created
v1.0 | 21/02/2019 | CCI-Package-Deployment | Created
v1.0 | 21/02/2019 | CCI-Deployment-Process-UI | Created
v1.0 | 21/02/2019 | CCI-Test-Management-UI | Created
v1.0 | 21/02/2019 | CCI-Test-Cases-Execution | Created
v1.0 | 21/02/2019 | Gateway-EF-Export-Flows | Created
v1.0 | 21/02/2019 | Gateway-GAT-Get-Authentication-Token | Created
v1.0 | 21/02/2019 | Gateway-GIFS-Get-Ids-From-StudioPackage | Created
v1.0 | 21/02/2019 | Gateway-ISP-Import-Studio-Package | Created
v1.0 | 21/02/2019 | Gateway-PSP-Publish-Studio-Package | Created
v1.0 | 21/02/2019 | AutomatedTest-GRTC-Get-Relevant-Test-Cases | Created
v1.0 | 21/02/2019 | AutomatedTest-ITC-Import-Test-Case | Created
v1.0 | 21/02/2019 | AutomatedTest-IVID-Insert-Variables-Into-Database | Created
v1.0 | 21/02/2019 | AutomatedTest-RTOF-Run-Test-On-Flow | Created
v1.0 | 21/02/2019 | AutomatedTest-VTCF-Validate-Test-Cases-Files | Created
v1.0 | 21/02/2019 | CCI-PPR-Process-PowerShell-Response | Created

## Licensing
All functionality within this module is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).

Copyright 2018 Cortex Limited

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

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

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


text:
# FlySouth

FlySouth is a simple Ruby framework for specifying and running _migrations_ -- a sequence of instructions which enable versioning of non-code entities, such as database schemas.

Because FlySouth is designed to be light-weight and extensible, it makes no assumptions about the entity you wish to version. As a result, features such as database abstraction and SQL generation are not included. Instead, FlySouth aims to give you a solid foundation on which to build your own versioning scheme.

## Installation

TODO

## Example

Migrations are specified by defining methods in the `FlySouth::Migrations` module. All files containing migration code must be stored in a single directory, which contains no other `.rb` files. By default, FlySouth assumes this directory is named `migrations` and is found in the current working directory.

The name of each migration file consists of two parts, an identifier and a tag, separated by an underscore. The identifier is used for ordering, while the tag is used as a short description of the changes to be applied.

For example, here is a simple migration which versions a text file, to be stored in `migrations/1_create_file.rb`.

```ruby
module FlySouth::Migrations

  def create_file_up
    File.new 'example.txt'
  end

  def create_file_down
    File.delete 'example.txt'
  end

end
```

Executing `migrate` will run the _up_ action, causing example.txt to be created. The process can be reversed by running the _down_ action with `migrate -v INITIAL`.

Now, let's create a new version which adds a string of text to this file. The following is to be stored in `migrations/2_write_file.rb`.

```ruby
module FlySouth::Migrations

  def write_file_up
  	File.open('example.txt', 'w'){|f| f.write 'hello'}
  end

  def write_file_down
  	File.truncate 'example.txt', 0
  end

end
```

If you haven't noticed, the _down_ action should always perform the inverse of the operations in the _up_ action.

We can now transition to version 2 by execute `migrate` again. If we are not already in version 1, the first migration is run before the second. If we wish to return to version 1, we can do so by executing `migrate -v 1` or `migrave -v create_file`.

## Custom Runners

TODO

### Hooks

TODO

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
Ctrl architecture is explained in the below picture.

![Control Architecture Diagram](3-Developer-Guide/Control-Architecture.png)

Ctrl has following major components
1. CLI - CLI component accepts the commands from user and calls the callback functions in Commands component.
2. Commands - Commands component takes the appropriate sequence of actions for each command.
3. Configuration Manager - Configuration Manager is used to model the configuration of a cluster and to provide parameters that will be passed to the control component.
4. Ctrl_logger - Ctrl_logger is used for logging messages in the ctrl.
5. Power_control - Power_control component is responsible for power related commands. Currently this component can support on/off/reset commands for nodes.
6. Resource - Resource component is responsible for communication with resource manager.
7. BMC - BMC component is responsible for communication with BMC. For each new BMC that needs to be supported, a new BMC plugin has to be added.
8. PDU - PDU component is responsible for communication with PDU. For each new PDU that needs to be supported, a new PDU plugin has to be added.
9. OS_remote_access - OS remote access component provides SSH and Telnet plugins. These plugins will be useful to remotely login to a node/pdu and perform operations.

repository: intel-ctrlsys/actsys

repo_name: intel-ctrlsys/actsys


text:
# readme-generator

  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

  ## Example Video
  [![Video Image](https://img.youtube.com/vi/k4sKaUs6SBc/0.jpg)](https://www.youtube.com/watch?v=k4sKaUs6SBc)
  [Video Link](https://www.youtube.com/watch?v=k4sKaUs6SBc)

  ## Table of Contents
  - [Description](#Description)
  - [Installation](#Installation)
  - [Usage](#Usage)
  - [License](#License)
  - [Contributers](#Contributers)
  - [Tests](#Tests)
  - [Contact](#Contact)

  ## Description
  It creates a readme based on the answers to the prompts provided.

  ## Installation
  Install zip folder from github and install inquirer.

  ## Usage
  It can be used to generate readmes for any project.

  ## License
  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

  ## Contributers
  Ver Pasamic

  ## Tests
  No tests included in this project.

  ## Contact
  ### Github
  [vpasamic](https://github.com/vpasamic)

  ### Email
  Email me at<EMAIL_ADDRESS>

repository: vpasamic/readme-generator

repo_name: vpasamic/readme-generator


text:
---
layout: page
title: Brain Cancer Code Crackers
date:   2020-12-17
subheadline: "🎄12 Days of HPC"
teaser: "
 Blog post number 13 in our 12 days of HPC series looking at using the HPC to study gene expression differences during brain cancer!
"
author: Lucy Stead

image:
  thumb: blog/12dayshpc-2020/graphic12daysSmall.png

breadcrumb: true
---

_During the month of December we're featuring blog posts from researchers from across the University of Leeds showcasing the fantastic work they do using our High Performance Computing system. Follow us [@RC_at_Leeds](https://twitter.com/RC_at_leeds) to keep up to date with our 12 days of HPC blog series._

## What's your name?

Lucy Stead

## What department do you work in?

Leeds Institute of Medical Research

## What research question are you trying to answer?

 GBM tumours infiltrate the surrounding brain, making complete surgical removal impossible. The cells that remain are treatment with both radio- and chemotherapy but some inevitably survive and the tumours grown back in almost 100% of cases.  We must understand why GBM cells resist treatment before we can hope to prolong patient survival. Our approach is to collect and compare the molecular profiles (DNA and the information on the genes it encodes) of primary and recurrent GBM tumours to specifically characterise the cells that survived treatment, with the ultimate aim of finding ways to more effectively kill them.

We couldn't do our research without the HPC - but who are we? My group is a hybrid of experimental and computational biologists but all of them make use of the HPC - and they're the ones that do the really hard work. My all star group members are:
- Soon-to-be Dr Georgette Tanner - Computational Postdoc
- Ms Rhiannon Barrow - Experimental PhD student
- Ms Muna Al-Jabri - Hybrid PhD student
- Mr Shoaib Ajaib - Computational PhD student
- Ms Nazia Ahmed - Computational PhD student
- Ms Rebecca Prince - Hybrid MRes student
And the wonderful Mr Fabio Marcuccio who is an engineering PhD student in Dr Paolo Actis's lab and is co-supervised by me.

## How does HPC help your research?

Every cell (well, almost every cell) in a human's body contains a copy of that persons DNA. DNA is a code of 3 billion 'letters'. That code is read differently in different cells, making messenger copies of large portions of the DNA, multiple times. This means cells are FULL of data. Add to that: each cell in a tumour is different and we need both levels of information from all of them to understand about how that tumour behaves. Advances in technology are allowing us to mine the information in these cells to an unprecedented level. The HPC is invaluable in then letting us term that data into biological insight.

## What is the potential impact of your research?

We hope, one day, we will help to develop better treatments for brain cancer - and extend the predicted survival for a diagnosis of glioblastoma beyond an average of just 14 months.

## In your personal opinion what's the coolest thing about your research?

The fact that we can take a single cell, unable to be seen by the human eye, and produce GB of data on what it is and why to behaves the way it does.

## What's your favourite christmas film?

Bad Santa

gha_language: SCSS

gha_license_id: MIT


text:
---
hrs_structure:
  division: '1'
  volume: '1'
  title: '1'
  chapter: 10H
  section: 10H-7
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0010H-0007
    parent: HRS0010H
    name: 10H-7 No diminishment of rights or privileges
weight: 19035
title: No diminishment of rights or privileges
full_title: 10H-7 No diminishment of rights or privileges
---
**[§10H-7] No diminishment of rights or privileges.** Nothing contained in this chapter shall diminish, alter, or amend any existing rights or privileges enjoyed by the Native Hawaiian people that are not inconsistent with this chapter. [L 2011, c 195, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
With p5.party you can quickly test ideas for multiplayer games, realtime multi-user apps, and multi-computer art projects.

[p5.party Website](https://p5party.org)

[Documentation](https://www.notion.so/p5-party-Documentation-887564cad8ec455e9bee994362322f2e)

[Demos + Examples](https://p5party.org/examples)

[Discussion](https://github.com/jbakse/p5.party/discussions)

## What is it good for?

**Prototyping + Sketching**

[p5.party](http://p5.party) provides a simple, imperative interface for working with shared data inspired by the programming conventions used by the [p5.js](https://p5js.org/) api. p5.party let's you try ideas quickly without writing server code or setting up a front-end/back-end stack.

**Workshops + Classes**

p5.party uses a [deepstream.io](http://deepstream.io) server which is easy to set up and cheap—or free—to run. Many sketches and projects can connect to the same p5.party server, so students can focus on sketching instead of setting up servers.

<!-- **Turn Based Games and Apps**

Quickly get people connected and playing together. Try out ideas using many of your existing skills in p5.js. -->

## What is it not good for?

**Production**

p5.party is designed for prototypes. As your project grows, you'll need to look into other libraries and backends that suit your project's needs.

**Security**

Sketches built with p5.party are insecure. p5.party has no method to authenticate or authorize users. Multiple apps share a server and can read, write, and delete each other's data.

<!-- **Fast-Action Games**

Fast-action multiplayer games are inherently complex. Compensating for network latency requires [prediction and reconciliation](https://www.gabrielgambetta.com/client-server-game-architecture.html) strategies which are somewhat application specific and outside the scope of p5.party. -->

## Features

**Shared Data Objects**

With p5.party you can easily create a shared data object that is automatically synchronized between instances of your sketch. You can assign and read properties on these objects just like a plain old local javascript object.

**Multiple Apps and Rooms**

A single p5.party server can support many apps and each app can group users into rooms. p5.party keeps track of which clients are in each room and shares the data to the right clients.

**Client-side Hosting**

p5.party automatically designates one (and only one) guest in each room as the host. Your code can easily check if it is the host and take care of running the party. This lets you avoid writing server-side code and makes prototyping faster.

## Show Me Some Code!

<img src="assets/hello_p5party_opt.gif" align="right"/>

```html
<script<EMAIL_ADDRESS><script<EMAIL_ADDRESS>```

```javascript
let shared;

function preload() {
  // connect to server
  partyConnect("...", "hello_party");

  // load a shared data object
  shared = partyLoadShared("shared");
}

function setup() {
  createCanvas(400, 400);
  noStroke();
  fill("red");

  // set initial values if they are not set*
  shared.x ??= width * 0.5;
  shared.y ??= height * 0.5;
}

function mousePressed() {
  // write shared data
  shared.x = mouseX;
  shared.y = mouseY;
}

function draw() {
  background("white");
  // read shared data
  ellipse(shared.x, shared.y, 100, 100);
}
```

\*using the newish [ES2020 ??= Operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_nullish_assignment)

## Installation and Quickstart

The quickest way to get started with p5.party is to load it from a<EMAIL_ADDRESS>or download the latest [release](https://github.com/jbakse/p5.party/releases) .

Visit the [P5 Web Editor Quick Start Guide](https://www.notion.so/P5-js-Web-Editor-Quick-Start-Guide-5cc4a197886a4bda89573f5879e47c78) or [VS Code Quick Start Guide](https://www.notion.so/Hello-p5-party-c4c0f94127c1408e9d6dd51f91ac8414) to get started!

## Server Installation

You can set up a server in a few minutes using Heroku and a clone of the p5.party repo.

[Server Setup](https://www.notion.so/Server-Setup-d039a4be3a044878bd5ad0931f1c93bd)

## Contributing

We welcome new contibuters. Please feel free to start a [discusion](https://github.com/jbakse/p5.party/discussions), [post issues](https://github.com/jbakse/p5.party/issues), or [request features](https://github.com/jbakse/p5.party/issues). If you want to help with writing code or documentation, you can start by indicating your interest on an open issue or by creating your own.

## License

Distributed under the MIT License. See `license` for more information.

## Acknowledgements

p5.party builds on [deepstream.io](http://deepstream.io) and [sindresorhus/on-change](https://github.com/sindresorhus/on-change). Deepstream is a realtime data-sync server that can be easily self hosted on services like [heroku](heroku.com) or [aws](https://aws.amazon.com/free). on-change uses javascript [proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) to make a fully observable object. p5.party uses on-change to watch for changes to shared data objects and then communicates these changes to deepstream. p5.party also depends on a number of other great [packages](package.json).

- [deepstream.io](http://deepstream.io)
- [sindresorhus/on-change](https://github.com/sindresorhus/on-change)

## Contributors

p5.party was created by Justin Bakse, Munro Hoberman, and Isabel Anguera.

Contributions by Tanvi Mishra, Apurv Rayate, Hyacinth Weng,
MJ Gomez-Saavedra, Shayla Lee

## Thanks To

Jessie Han, An Kong, Kevin Lin, Malin Mabika, Tanvi Mishra, Brittany Price, Apurv Rayate, Beatriz Ribeiro Dos Santos, Tong Shao, Hyacinth Weng, Winnie Yuxiang Zhai, Joan Jingwen Zhang, Jasmine Chen, Joshua Davison, Caitlin Keating, Simone Liu, Zhuoran Ma, Rand Rivera, Runzhe Sha, Haotian Wang, Ziyi Wang

gha_language: JavaScript


text:
UNSEEN data mining
================
Timo Kelder
April 1, 2020

SEAS5 data
----------

We will be using the SEAS5 hindcast, which is a dataset running from 1981-2016. The hindcast is initialized every month with 25 ensemble members and the forecast run for 7 months. February is hence forecasted by 7 initialization months (August-February). We discard the first month of the forecast because of dependence between the forecasts, explained in the [evaluation section](Evaluation.md) and are left with 6 initialization month and 25 ensemble members forecasting february precipitation each year, totalling to an increase of 150 times the observed length.

We will create a workflow to download the data from CDS, see the initial analysis [here](https://nbviewer.jupyter.org/github/timokelder/UNSEEN-open/blob/intial_data/Initial_data_download.ipynb).

repository: timokelder/UNSEEN-open

repo_name: timokelder/UNSEEN-open


text:
## ESP32 Explorer

** WARNING!! - VERY EARLY CODE **

A utility library / application for investigating the ESP32.

Locked within an ESP32 at runtime is a wealth of information.  This includes:

* Your availabile memory
* Your WiFi connections
* Your GPIO status
* The files on your flash file system
* The status of your logging enablement
* The partitions in use
* The state of FreeRTOS tasks
* and *much* more ...

As I wrote applications to run on the ESP32, I found that from time to time I would need this information or wish to tweak some settings at runtime.  I would inject code into my application, perform those tests and then remove it.  As I wrote more applications, I found that I was repeating these steps over and over again.  This notion became the kernel of this project.

The purpose of the project is to produce a library which, when linked with your own application can reveal the content of your ESP32 at runtime **and** allow you to tweak settings.

When linked with your application, it will start listening as a network endpoint (an HTTP server) to accept external calls for information and receive external calls to change state and data.  In addition to the library you link with your ESP32 app, there is a web page that can be opened which presents the information in a series of tabbed pages.

![](docs/images/System.png)

Some pages have additional tabs on them.

## File System
The File System page shows the file system found on the ESP32.  From here you can see if the files you expect to be available are present.  You also have the opportunity to upload new and updated files.

![](docs/images/FileSystem.png)


text:
# Setup

* Create a project at https://console.developers.google.com
* Go to the `API Manager` and enable the `Drive` and `Calendar` APIs
* Go to `Credentials` and create a new OAuth Client ID of type 'Web application'
    * Use `http://localhost:4567/oauth2callback` as the redirect URL
    * Use `http://localhost:4567` as the JavaScript origin

Additional details on how to enable APIs and create credentials can be
found in the help guide in the console.

## Example Environment Settings

For convenience, application credentials can be read from the shell environment
or placed in a .env file.

After setup, your .env file might look something like:

```
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
```

# Running the calendar

To start the server, run

```
ruby app.rb
```

Open `http://localhost:4567/` in your browser to explore the calendar.

![Peek 2021-07-23 14-32](https://user-images.githubusercontent.com/16719922/126819932-618bb150-c8f8-4ca3-9ccd-8b19f45d57c4.gif)

repository: ferreiraandy/calendar-events

branch_name: refs/heads/main

repo_name: ferreiraandy/calendar-events


text:
# sudocore.dev

Sudocore's code base has been directly pulled from Bootstrap. All credit goes to Bootstrap and the Bootstrap Authors for developing such a wonderful framework.

Sudocore is intended to add more stylistic option straight from the box. Sudocore does this by adding more colors, buttons, and typography.

Deployment Status
[![Netlify Status](https://api.netlify.com/api/v1/badges/82bcd00e-c894-4ac2-81a7-845553b25b91/deploy-status)](https://app.netlify.com/sites/sudocore/deploys)


text:
Uglifile
========

This is a wrapper around the uglify.js code that produces a single file to be rendered out of express.

Usage
-----

		var uglifile = require("uglifile");

		app.get("/scripts/target.js", uglifile ({
		    dest: __basedir + "/scriptCache/target.js",
		    files: [
		    	__basedir + "/scriptSource/file1.js",
		    	__basedir + "/scriptSource/file2.js"
		    ],
		    // optional: forces compile each time
		    force: false,
		    // optional: can be used to prevent compression in dev
		    compress: true,
		    // optional: uglify mangle
		    mangle: true,
		    // optional: uglify squeeze
		    squeeze: true
		}));

MIT LICENCE
-----------

Copyright (c) 2012 Sugendran Ganess

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: alphashack/uglifile

repo_name: alphashack/uglifile


text:
# Cloud Native Buildpacks Orb

[![CircleCI](https://circleci.com/gh/jkutner/buildpacks-orb.svg?style=svg)](https://circleci.com/gh/jkutner/buildpacks-orb)

This is a [CircleCI Orb](https://circleci.com/orbs/) for using [Cloud Native Buildpacks](https://buildpacks.io) in your CircleCI jobs and workflows.

For more information and usage examples, see the [CircleCI documentation](https://circleci.com/orbs/registry/orb/jkutner/buildpacks).

repository: iynere/buildpacks-orb

repo_name: iynere/buildpacks-orb


text:
# 40. Combination Sum II

Difficulty: Medium

https://leetcode.com/problems/combination-sum-ii/

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.

Each number in candidates may only be used once in the combination.

**Note:**

* All numbers (including target) will be positive integers.
* The solution set must not contain duplicate combinations.

**Example 1:**
```
Input: candidates = [10,1,2,7,6,1,5], target = 8,
A solution set is:
[
  [1, 7],
  [1, 2, 5],
  [2, 6],
  [1, 1, 6]
]
```

**Example 2:**
```
Input: candidates = [2,5,2,1,2], target = 5,
A solution set is:
[
  [1,2,2],
  [5]
]
```

repository: jiadaizhao/LeetCode

repo_name: jiadaizhao/LeetCode


text:
# Deepview: View Synthesis with Learned Gradient Descent

An amateur implementation of Google's Deepview paper on View Synthesis with Multiplane Images (MPI) https://augmentedperception.github.io/deepview/

# Results

An MPI generated with this code with a trained model, at the moment, looks like this:

![MPI](results.png)

# Train

You can also run the following code in [this Colab notebook](https://colab.research.google.com/drive/1tr4N0shbCH2sLfgStZtZcVNPskY5mZOg?usp=sharing). I've also included [a copy of the notebook](colab_notebook.ipynb) in the repo and I've published [a blogpost](https://roblesnotes.com/blog/lightfields-deepview/) as well.

We'll use the [Spaces](https://github.com/augmentedperception/spaces_dataset) and the [Real Estate 10K](https://google.github.io/realestate10k/) datasets to train the model. I'll use the notebook format here so if the line starts with a ! bang it's bash and otherwise it's Python code.

Let's start with the spaces dataset:

    ! git clone https://github.com/Findeton/deepview.git
    ! cd deepview && git checkout . && git checkout main && git pull
    ! git clone https://github.com/augmentedperception/spaces_dataset.git
    ! cd deepview && pip3 install -r requirements.txt
    ! mkdir -p deepview/trained-models
    for i in range(10):
       !  cd deepview && DSET_NAME=spaces:1deterministic SPACES_PATH=/content/spaces_dataset/ python3 train.py

Now let's create an MPI:

    ! cd deepview && DSET_NAME=spaces:1deterministic SCENE_INDEX=1 SPACES_PATH=/content/spaces_dataset python3 tiled_render_spaces.py
    import IPython
    IPython.display.HTML(filename='/content/deepview/generated-html/deepview-mpi-viewer.html')

Let's use a reduced set of the Real State 10K dataset to further train it:

    ! git clone https://gitlab.com/Findeton/real-estate-10k-run0.git
    for i in range(10):
    ! cd deepview && DSET_NAME=re:1random RE_PATH=/content/real-estate-10k-run0/ python3 train.py

Let's show an MPI from that dataset:

    ! cd deepview && DSET_NAME=re:1random TILE_W=200 TILE_H=200 SCENE_INDEX=1 RE_PATH=/content/real-estate-10k-run0 python3 tiled_render_spaces.py
    import IPython
    IPython.display.HTML(filename='/content/deepview/generated-html/deepview-mpi-viewer.html')

You can use the full Real Estate 10K dataset to train the model, but it's large and requires pre-processing so I've split it into 39 repos! The first one is the following and you only have to replace the last number to get the rest:

https://gitlab.com/Findeton/real-estate-10g-1

repository: ml-lab/deepview

repo_name: ml-lab/deepview


text:
---
layout: engineering-education
status: publish
published: true
url: /engineering-education/a-step-by-step-guide-to-create-a-virtual-assistant-with-python/
title: A step-by-step guide to create a virtual assistant with python
description: A virtual assistant, also called an AI assistant or digital assistant, is an application program that understands natural language voice commands and completes tasks for the user.
author: aransiola-ayodele
date: 2021-04-10T00:00:00-01:00
topics: []
excerpt_separator: <!--more-->
images:

- url: /engineering-education/a-step-by-step-guide-to-create-a-virtual-assistant-with-python/hero.jpg
    alt: A mobile phone showing a virtual assistant signal
---
A virtual assistant, also known as an AI assistant or a digital assistant, is a computer program that recognizes natural language voice commands and performs tasks for the user. This article will use a python library to incorporate Alexa and will guide you through the process of creating your own voice assistant.
<!--more-->

For this tutorial, I will be writing the codes on Pycharm by Jetbrains.

PyCharm is an integrated development platform for computer programming, with an emphasis on the Python programming language. JetBrains, a Czech company, built it. To download Pycharm, click [here](https://www.jetbrains.com/pycharm/download/).

After downloading and installing Pycharm, launch the application and click on file on the file menu, then select new project. You will get a pop-up message asking you for a name for your project. Kindly give it a desired name, but for this article, we will give our project a title called “vitualBot”.

The project will load and once it is done, kindly clear your screen from the automated content to have a clean screen to write your codes in the main.py file.

### What does a virtual assistant do?
1. It listens for your command
2. It responds to your command with either a success or failure response.

For this project, we need 3 python libraries, which include

1. Python Speech Recognition: Speech recognition is the method of translating spoken words to text. Google Speech Engine, Google Cloud Speech API, Microsoft Bing Voice Recognition, and IBM Speech to Text are only a few of the speech recognition engines and APIs that Python supports.

The first step in a speech recognition system is to translate the audio signal into a computer-readable format. Typically, this is a spectrogram. It's a three-dimensional graph with time on the x-axis, frequency on the y-axis, and color representing strength.

To use the Python speech recognition library, click this [link](https://pypi.org/project/SpeechRecognition/) and you should see the page as shown in the image below. Copy the text circled in red and paste in your terminal.

![Speech Recognition library download page](/engineering-education/a-step-by-step-guide-to-create-a-virtual-assistant-with-python/python-speech.png)

Paste what you copied in the terminal and click enter. The package will be installed. Once this first package is installed, we need the second package, which is:

2. Python Text To Speech v3(Pyttsx3): this library is a text-to-speech conversion library in Python. It works offline and is compatible with both Python 2 and 3.

This package can be downloaded [here](https://pypi.org/project/pyttsx3/). You will copy the command found on the website and paste in the terminal just as you have done to install the first library.
![Python text to speech library download page](/engineering-education/a-step-by-step-guide-to-create-a-virtual-assistant-with-python/pyttsx3.png)

Once you have successfully installed the second package, we will continue to install the third package called:

3. Python Audio (PyAudio): this library provides Python bindings for PortAudio, the cross-platform audio I/O library. PyAudio allows you to quickly play and record audio on a number of devices using Python. Download the package [here](https://pypi.org/project/PyAudio/). Install the package using the steps used in 1 above.
![Python Audio library download page](/engineering-education/a-step-by-step-guide-to-create-a-virtual-assistant-with-python/pyaudio.png)

### Note:
for Linux users, installing the Pyaudio, you might encounter an error, to fix the error and install PyAudio successfully, kindly follow the steps below:

1. Install ***portaudio*** modules using this command:
```bash
sudo apt-get install libasound-dev
```
2. Download the portaudio archive from: [Link](http://files.portaudio.com/download.html)

3. Unzip the archive using:
```terminal
tar -zxvf [filename portaudio.tgz]
```
4. Enter the directory of the unzipped portaudio file, then run:
```terminal
 ./configure && make
 ```
5. Once that is successful, Install it by using this command:
```terminal
sudo make install
```
6. Lastly, install pyaudio:
```terminal
pip install pyaudio
```
We have successfully installed the three libraries. Now, let get our Virtual assistant alive!!!

```python
# import the library needed for the virtual assistant

import speech_recognition as assistance
import pyttsx3

# now, let us obtain voice input from the microphone
listener = assistance.Recognizer()

# the next line is to initiate the pttsx3 library
engine = pyttsx3.init()

# let take voice from our microphone and use pur microphone as source
with assistance.Microphone() as source:
    print("Say something...!")
    audio = listener.listen(source)

# recognize your speech using the Google Speech Recognizer
try:
    print("I heard you say " + listener.recognize_google(audio))
except assistance.UnknownValueError:
    print("Hey, I could not understand what you say")
except assistance.RequestError as e:
    print("Request from Google Speech Recognition failed; {0}".format(e))

#the engine will then repeat what you said before performing your command
engine.say(audio)
engine.runAndWait()

```

There are many things you can achieve with python libraries. With the above tutorial, you should be able to dive more into making your virtual assistant more smarter.

Thanks for reading.

repository: CodeLeom/engineering-education

repo_name: CodeLeom/engineering-education


text:
---
title: Particle Systems with Image Textures
video_number: 4.4
date: 2021-04-07
video_id: pUhv2CA0omA
repository: nature-of-code/4.4-image-textures
can_contribute: true

variations:
  - name: "Texture Maker"
    lang: "p5js"
    folder: "texture-maker"
    web_editor: NS4rB1Yx-
  - name: "Image Texture"
    lang: "p5js"
    folder: "image-texture"
    web_editor: TTVoNt58T
  - name: "Shader (WEBGL)"
    lang: "p5js"
    folder: "shader"
    web_editor: EXZmcc4m_

videos:
  - title: "Purple Rain - Coding Challenge #4"
    author: "The Coding Train"
    video_id: /CodingChallenges/004-purplerain
  - title: "Snowfall - Coding Challenge #88"
    author: "The Coding Train"
    video_id: /CodingChallenges/088-snowfall

topics:
  - title: "One more particle system video!"
    time: "0:00"
  - title: "Hopefully you'll make something neat."
    time: "0:57"
  - title: "Code! Adding applyForce() to our particle class."
    time: "1:25"
  - title: "Discuss! I've already made an image texture."
    time: "3:24"
  - title: "Code! Adding the image texture to the sketch."
    time: "4:37"
  - title: "Code! Adjusting the way the particles look."
    time: "6:28"
  - title: "Whoops! Let's see if there's a way to improve performance."
    time: "7:17"
  - title: "Explain! blendMode(ADD)."
    time: "8:58"
  - title: "Code! Let's try using blendMode(ADD)!"
    time: "9:53"
  - title: "Code! Adding in color, yay!"
    time: "10:36"
  - title: "Please share what you create!"
    time: "11:53"
  - title: "What's next?"
    time: "12:22"
---

It's time to expand beyond grayscale particles! In this video I demonstrate how to make a fire or smoke-like effect by using image textures and additive blending with a particle system.

repository: Joelnicolass/website

repo_name: Joelnicolass/website


text:
# Group Products

## Products [/product]

Represents the collection of products.

### Get Product [GET]

Returns a product.

+ Response 200

            {{schema 'product'}}

repository: rafaelkelly/ballad

repo_name: rafaelkelly/ballad


text:
# inputify

inputify has two main functions:
* Determines whether a given value is valid based on specified requirements
* Repeatedly prompts for user input on the command line until input meets specified requirements

repository: bradywhildin/inputify

repo_name: bradywhildin/inputify


text:
# CinemApp
React native exercise about consume the TMDB API.

This time I'm gonna make a faster (I hope) exercise with the [TMDB API](https://www.themoviedb.org/?language=en), which allow us to consume all the movie library in their database.

![Initial tools](https://lh3.googleusercontent.com/8mSCdyuID9js2vso-P4GY82eu-daA6lU2QdVZR-ZGOePg39m-pUZWH2ed74MNR8-stYRverjnlmr=s800)

First of all, I need the main idea for the app, so, I drew an scratch on my notebook with my color pens.

As a result, now I know (with a high probability) what's I'm going to do.

![enter image description here](https://lh3.googleusercontent.com/nO6mnnn-9n62yxEIH1Yw40t8gZbWHOylD613wQK660B4C1v9_NYQXxhF2AgD_1xKF-ImIWMuU8fK=s1000)

Yes, is rustic, archaic maybe, but enough for my main purpose.

From the last image I can recognize the next elements:

 - Splash screen
 - Main screen
 - Basic movie screen
 - Extended movie screen

That's all, now, I would like to write some features for every screen, ir order to get more detail before start to write code.

**Splash screen**

Just an icon in the middle of the screen. Obviously, right now I'm thinking about what kind of animation I will do, but, I in this moment a prefer thinking in a basic non-animated version to think in a hundred of possibilities.

**Main screen**

This screen has access to the three categories for this example: Popular, Top rated, and Upcoming.

From here, the user can access to search a movie, and back to the main screen. I drew a link to profile, but, to be honest, I don't think I'll have time enough to do that, so, I'll remove it.

The user will see an horizontal scroll with the movies in this category as well. Every movie section has the official poster about the movie that it represent.

**Basic movie screen**

Basically, here I'll show the basics about the movie:

 - Poster
 - Ranking value
 - Title
 - Original title
 - Genres
 - Short description
 - Favorite button
 - Play trailer button
 - Extends data button

**Extended movie screen**

Similar to the last screen, but, here we can find:

 - Title
 - Release year
 - Stars ranking
 - Numeric ranking
 - Total votes
 - Complete description
 - Back button
 - Share button

I think that I'll make some changes, but I'll try to keep this structure. Also, from the beginning, I need to code thinking about the Animated API, in order to achieve them easier in the future.

Next step is to structure the application (in order to have clear how do I need to create my folders), but, I'm haven't time to make a nice digital graphic, so, I'll write it right here:

 - Main app (App.js)
	 - Components
	- Assets
	- Screens
	- Providers

*Components*

This folder is going to have some little components for almost every part in the app. I'll try to encapsulate as many as I can.

*Assets*

Fonts, images, etc.

*Screens*

This is the place to keep the main interfaces, such as Splash, Main screen, Movie screens, etc.

*Providers*

This folder is going to have controllers in order to manage the internal database, http connections, and business logic.

**First code commit**

After add the first commit into the repository, I would like to remember what kind of libraries/resources I'm going to use in order to complete the app:

 - [React Native](https://facebook.github.io/react-native/)
 - [Animated API](https://facebook.github.io/react-native/docs/animated)
 - [SQLite3 Native plugin](https://github.com/andpor/react-native-sqlite-storage) (for persistence layer)
 - [TMDb API](https://developers.themoviedb.org/3/getting-started/introduction)
 - [Youtube component](https://github.com/inProgress-team/react-native-youtube) in order to show a trailer.
 - [NativeBase](https://nativebase.io). Maybe I need some component to avoid build it from scratch.
 - [Some fonts](www.1001freefonts.com/). Actually, right now I don't know what kind of font to use, but I hope not to take to much time making a decision.

From the above list, there are two thinks that I've never used in React Native: the TMDb API, and the Youtube Component, so, I need to study a little bit about them.

Also I figured out that I've never worked with SQLite3 in React Native, but, after a little while reading the documentation, I realized that is exactly the same library I used to work with jQuery Mobile in many projects a few years ago, so, I need to take care about it because I don't want surprises with this technology.

Let's started to code.

First of all, I'm gonna make the basic structure and navigation system. Then, I'm gonna to add some details one at time.

I started with the TMDb API, so, I needed to make the registration process, and then, to request the API access in order to use the services.

That didn't hurt, and soon I started to make queries from Postman. So, at this time I get the data for the categories in the app:

![Get upcoming](https://lh3.googleusercontent.com/OEF0GDLlPGGV_WtWWzGnO7HO08gT1JVilq4OzjRp4gkoY3dxj0eGjmF6axXUY-cSQR9VahPMXYDb=s800)
 - Popular
api.themoviedb.org/3/discover/movie?sort_by=popularity.desc&api_key=XXXX
 - Top rated
 api.themoviedb.org/3/discover/movie?sort_by=vote_average.desc&api_key=XXXX
 - Upcoming
 api.themoviedb.org/3/movie/upcoming?page=1&language=en-US&api_key=XXXX

The [Discover API examples](https://www.themoviedb.org/documentation/api/discover) section in the documentation offer some useful snippets.

At this moment I realized that the JSON response seems not to have all the data that I need. For example, I can't find the Youtube URL to the video, and all the properties *video* are false.

I got all the general data that I need:

 - Votes
 - Title
 - Original title
 - Genres (at last the ID's). I don't know how to extract the name genres, by the way.
 - Poster
 - Average qualification
 - Description
 - Release date
 - There is a property called *popularity*. Right now, I don't what's that exactly.
 - Original language from the movie

Until now is enough for my purpose, excepto by the video link. I need to learn how to extract that information. Actually, It would be cool to extract the actors list, but I think that's is not a very good idea because I've don't even started to write any line.

After a while checking the forum, I found a [good answer](https://www.themoviedb.org/talk/5451ec02c3a3680245005e3c) from (I think) the guy who give support to the API, but, it's not perfect, because I need to make a second query to get the video list:

    api.themoviedb.org/3/movie/299536/videos?api_key=XXXX
   ![enter image description here](https://lh3.googleusercontent.com/bfFeZiN3kVXxgenO7hI5hSUhLNFlMPCe10gPnDk7dcwU6PW9b7JfB6LDXOx4JcoGxApXQRCdt2cK=s500)

Where 299536 is the movie ID. In this case, Avengers, infinity wars.

In the same answer, this guy said that we can add another parameter to our regular queries to get the videos in the same response, but it doesn't works, at least for me, so, I left that option for now.

Just for curiosity, I wrote *images* instead *videos* in the last URL, and then I got the list of images from that movie. Very useful option.

    api.themoviedb.org/3/movie/299536/images?api_key=XXXX

![
](https://lh3.googleusercontent.com/Y9xl-g7uJ-wTMxOs6sc9NxJy7tcR5ju8SoUPQ1MuvEROt8h_E5M6CVCyWQhvBXFiBJW7MecoQBrj=s500)

One last query: Actors :)

To get the actors, I needed to write credits instead images in the last URL

    api.themoviedb.org/3/movie/299536/credits?api_key=XXXX

This services give photo, name, role played, votes, votes average, and other properties, but I got enough information until now.

Now that I have all the data, I can, finally, code the Splash screen interface.

I would like to do the same animation effect that I have in my [CV](https://github.com/gersonmontenegro/cv) project at the intro, where I emulated a "fluid" integration between the Xcode splash screen, and my own react-native Splash screen.

After a little while, I got back to the action, and I finished a first release candidate for the Splash Animation.

Below I put a gif that shows how is going.

Basically, I applied the same idea in the [previous project](https://github.com/gersonmontenegro/cv) , where I used react-native-splash-screen plugin the handle a fluid splash screen experience, as I tried to explain it in the below graphic:

![enter image description here](https://lh3.googleusercontent.com/y3kmVbXuI2a7R-Ts4OaIzhOFREOX5HpruYTzMTFkjq4DnD0zmJCOr7FmtrE9BYZLFhe8pFGINYRy=s800)

*So, what just happened?*
Normally, this is the process:
1. Xcode launch the regular Splash screen.
2. After that, the Javascript [bridge](https://hackernoon.com/understanding-react-native-bridge-concept-e9526066ddb8) is started to load.
3. React native load the first screen.

But thanks to the react-native-splash-screen plugin, I can "hide" the loading process of the bridge, and keep showing the natural Splash Screen from Xcode meanwhile the first screen from the RN project is loaded. So, the final process is:

 1. Xcode launch the regular Splash screen.
 2. JS Bridge (JSB) is started to load, and at the same time, keep showing the Xcode Splash screen.
 3. JSB finished the load, and hide Xcode Splash screen, and immediately, the first RN interfaces is loaded.

This behavior allows me give the user a great experience.

Then, I made an animation in order to create an app flow until the main interface.

Now, is time to create the main interface, and I have a idea that I want to implement.

After struggling with some things, I decided keep it as simple as I can, because I haven't time enough (you know, house chores and food doesn't make by itself), so, I made the minimal interface with basic components, like View, ScrollView, FlatList, Image, and Text:

After that, I started to think in an idea, not as simple, but not so complex, and, in a few minutes, I got the effect that I wanted at the beginning :)

I just turn the Views component to Animated.View, and I started to play with the height of the Main Movie:

    <Animated.View style={{ width: screenWidth }}>
        <Animated.View style={{ height: this.mainMovieHeight }}>
            <Image source={require('./../assets/img/movie.jpg')} />
        </Animated.View>
        <Animated.View style={{ width: screenWidth }}>
            {
            data.map((item) => (
            <Animated.View key={item.id} style={{ backgroundColor: '#555555', height: 150 }}>
                <Text style={{
                                        fontFamily: 'ObliviousFont',
                                        fontSize: 15,
                                        left: 5,
                                        top: 3,
                                        color: 'white'
                                    }}>
                    {item.name}
                </Text>
                <View style={{ marginTop: 5 }}>
                    <FlatList horizontal={true} data={moviesData} renderItem={({ item })=> (
                        <TouchableHighlight onPress={()=> this.onPressMovie()} style={{ marginLeft: 5, height: 150 }}>
                            <Image source={require('./../assets/img/movie_small.jpg')} />
                        </TouchableHighlight>
                        )}
                        />
                </View>
            </Animated.View>
            ))
            }
        </Animated.View>
    </Animated.View>

As you can see, I got the *mainMovieHeight* variable controlling the height of the main movie.

When one movie is pressed, the main movie is expanded:

    changeVariable(variable, v, delay) {
        return Animated.timing(
            variable, {
                toValue: v,
                duration: defaultTimeAnimation,
                delay: delay
            }
        );
    }

    onPressMovie = () => {
        this.changeVariable(this.mainMovieHeight, this.state.finalHeighMainMovie, 0).start();
    }

Obviously, this is only a first test in order to make a clean version.

repository: ThangLuuQuoc/cinemapp

repo_name: ThangLuuQuoc/cinemapp


text:
# Backpack/Card

## Usage

`BPKCard` contains the Backpack Card component. The card is a simple control view with a shadow, offering user interaction. It has a padded and non-padded variation. `BPKCard` can only have 1 direct subview and will add the appropriate constraints automatically when calling setting the `subview` property.

`BPKDividedCard` contains the Backpack Divided Card component. The divided card is a subclass of `BPKCard`. It can have 2 subviews and will add the appropriate constraints automatically when `-initWithPrimarySubview:secondarySubview:padded`/`init(primarySubview: secondarySubview: padded: )` or `-setPrimarySubview:secondarySubview`/`setSubviews(primarySubview: secondarySubview:)` are called. It's axis can be vertical or horizontal.

Cards have an accessibility configuration. By default this is `Container` which means the card is invisible to assistive technology. In this case, ensure that the content of the card provides users of AT with the same action as tapping the card, and explain actions clearly.

If using a `Button` or `Link` configuration, ensure that the accessibilityLabel used describes the whole content of the card and the same action.

Do not use `Button` or `Link` configurations if the card has multiple actions or if the copy is long.

### Objective-C

**`BPKCard`**

```objective-c
#import <Backpack/Card.h>

BPKCard *card = [[BPKCard alloc] initWithPadded:YES];
[card setSubview:myInnerView];
card.padded = NO;
```

**`BPKDividedCard`**

```objective-c
#import <Backpack/Card.h>

BPKDividedCard *dividedCard = [[BPKDividedCard alloc] initWithPrimarySubview:myFirstInnerView secondarySubview:mySecondInnerSubview padded:YES];
// dividedCard.padded = NO;
dividedCard.orientation = UILayoutConstraintAxisVertical;
```

### Swift

**`BPKCard`**

```swift
import Backpack

let card = BPKCard(paddded: true)
card.subview = myInnerView
card.padded = false
```

**`BPKDividedCard`**

```swift
import Backpack

let dividedCard = BPKDividedCard(
    primarySubview: myFirstInnerView,
    secondarySubview: mySecondInnerSubview,
    padded: true
)
// dividedCard.padded = false
dividedCard.orientation = .vertical
```

repository: stellz/backpack-ios

gha_language: Objective-C

repo_name: stellz/backpack-ios


text:
# Evergreen Binary Compression

## What is Evergreen Binary Compression?

Evergreen Binary Compression is a feature that reduces the amount of space used
on-device to store Cobalt Core binaries. The binaries are stored compressed,
using the
[LZ4 Frame Format](https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md),
and decompressed when they are loaded and run. This optional feature is off by
default but partners can enable it by following the instructions below.

## Storage Savings

Across all reference devices tested, including Raspberry Pi 2, we have seen
compression ratios just above 2.0. We therefore expect that partners can halve
the space used for Cobalt binary storage by enabling the feature for all
installation slots: the system image slot and the writable slots.

## Caveats

### Performance Costs

Because the Cobalt Core shared library must be decompressed before it's loaded,
there is necessarily some effect on startup latency and CPU memory usage. Based
on our analysis across a range of devices these effects are relatively small.

For startup latency, we measured an increase in `libcobalt` load time in the
hundreds of milliseconds for the low-powered Raspberry Pi 2 and in the tens of
milliseconds for more representative, higher-powered devices. This increase is
small in the context of overall app load time.

For CPU memory usage, `libcobalt.lz4` is decompressed to an in-memory ELF file
before the program is loaded. We therefore expect CPU memory usage to
temporarily increase by roughly the size of the uncompressed `libcobalt` and
then to return to a normal level once the library is loaded. And this is exactly
what we've seen in our analysis.

### Incompatibilities

This feature is incompatible with the Memory Mapped file feature that is
controlled by the `--loader_use_mmap_file` switch. With compression, we lose the
required 1:1 mapping between the file and virtual memory. So,
`--loader_use_mmap_file` should not be set if compression is enabled for any
installation slots (next section).

## Enabling Binary Compression

Separate steps are required in order for a partner to enable compression for a)
the system image slot and b) (Evergreen-Full only) the 2+ writable slots on a
device.

Compression for the system image slot is enabled by installing `libcobalt.lz4`
instead of `libcobalt.so` in the read-only system image slot (i.e., SLOT_0).
Starting with a to be determined Cobalt 23 release, the open-source releases on
[GitHub](https://github.com/youtube/cobalt/releases) include separate CRX
packages, denoted by a "compressed" suffix, that contain the pre-built and
LZ4-compressed Cobalt Core binary.

Compression for the writable slots is enabled by configuring Cobalt to launch
with the `--use_compressed_updates` flag:

```
$ ./loader_app --use_compressed_updates
```

This flag instructs the Cobalt Updater to request, download, and install
packages containing compressed Cobalt Core binaries from Google Update and
Google Downloads. As a result, the device ends up with `libcobalt.lz4` instead
of `libcobalt.so` in the relevant slot after its next update.

Note that the system image slot is independent from the writable slots with
respect to the compression feature: the feature can be enabled for the system
image slot but disabled for the writable slots, or vice versa. However, we
expect that partners will typically enable the feature for all slots in order to
take full advantage of the storage reduction.

## Disabling Binary Compression

The compression feature is turned off by default. Once enabled, though, it can
be disabled by undoing the steps required for enablement.

Compression for the system image slot is disabled by installing the uncompressed
`libcobalt.so` instead of `libcobalt.lz4` in the read-only system image slot.

Compression for the writable slots is disabled by configuring Cobalt to launch
**without** the `--use_compressed_updates` flag. The Cobalt Updater will then be
instructed to request, download, and install packages containing the
uncompressed Cobalt Core binaries.

Note that disabling compression for the writable slots is eventual in the sense
that the compressed Cobalt Core binaries in these slots will remain and continue
to be used until newer versions of Cobalt Core are available on Google Update
and Google Downloads.

## FAQ

### Should multiple apps that share binaries also share compression settings?

The [Cobalt Evergreen Overview doc](cobalt_evergreen_overview.md) describes
multi-app support, where multiple Cobalt-based applications share Cobalt Core
binaries (i.e., they share the same installation slot(s)). When multi-app
support is used then, yes, the apps should also share compression settings.

For the system image slot, this means that either `libcobalt.lz4` or
`libcobalt.so` is installed in the one, shared slot.

For the writable slots, this means that the loader app is either launched with
`--use_compressed_updates` set for all apps or launched without it for all apps.
Otherwise, the different apps would compete with respect to whether the writable
slots are upgraded to compressed or uncompressed binaries.

repository: youtube/cobalt

repo_name: youtube/cobalt


text:
# CONIKS Design Documents

http://coniks.org

The documents in this repo provide formal design specifications for the various
component of the CONIKS system.

The original [design document](https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-melara.pdf) (published at USENIX Security 2015)
provides a high-level description of the data structures and protocols
underlying CONIKS.

repository: coniks-sys/coniks-spec

repo_name: coniks-sys/coniks-spec


text:
This is ScraperFC, a Python package that I hope will give more people access to soccer stats. It's still very much a work in progress and I'm currently a full-time grad student so progress may be slow. I am trying to chip away at it though, so please, reach out with any problems you encounter or features you want to see added!

To install ScraperFC, run ```pip install ScraperFC``` from the command line.

Data can be scraped from the following sources:
* [FBRef](https://fbref.com/en/)
* [Understat](https://understat.com/)
* [FiveThirtyEight](https://projects.fivethirtyeight.com/soccer-predictions/)
* [WhoScored](https://www.whoscored.com/)

For usage examples, look at Examples.ipynb in the code directory.

All data used in the data viz examples is available at https://drive.google.com/drive/folders/1LhW3wcG5uoAAHcgPHRcJYmIQaMY9GlRI?usp=sharing.

I'd love to hear your feedback, bugs you find, or recommendations! You can reach me via email at<EMAIL_ADDRESS>or my Twitter handle is [@owen_seymour](https://twitter.com/owen_seymour).

repository: eddwebster/ScraperFC

repo_name: eddwebster/ScraperFC


text:
# July 20 2017

## Escalation changes:
- Some more earlier alien nerfs. Less pods in general.
- Disc pods are smaller in the earlier months. Pod chances also reduced.
- July pods now have set leader levels.
- August disc pods reduced in size by 1.
- September command pods have at least level 3 leaders.
- November command pods have at least level 4 leaders.
- December command pods have at least level 5 leaders.
- January command pods have at least level 6 leaders.
- February command pods have at least level 6 leaders.
- https://www.diffchecker.com/D6lAjqel

## General changes:
- Grapple distance from 15 to 20.
- Alloys from Scouts/Fighters from 30 to 33.
- Alloys from Raiders and Destroyers from 40 to 45.
- Alloys from Harvesters and Abductors from 58 to 63.
- Alloys from Transports and Terror Ships from 70 to 76.
- Alloys from Battleships and Assault Carriers from 82 to 85.
- Initial Timer on Bomb Disposal missions from 6 to 8.

## Alien buffs/nerfs:

### Chryssalid:
- Leader level 1: Damage from 0 to 4.

### Cyberdisc:
- 180 AR: New research level. Aim set to 2. HP set to 2.
- 240 AR: Rebalanced. Aim -2 to 8. HP from 3 to 4.

### Drones:
- 200 AR: Aim from 8 to 4.
- 430 AR: Aim from 0 to 4.

### Heavy Floaters:
- 200 AR: HP +2 to 5.

### Floaters:
- 230 AR: Aim from 5 to 4.

### Mechtoids:
- Leader level 9: Damage from 0 to 3.

### Mutons:
- 180 AR: Aim 4 to 2. HP 3 to 2.
- 220 AR: HP 2 to 3.
- 300 AR: Aim 8 to 6.
- 470 AR: DR increased by 1 from 0.
- Leader level 9: New Sprinter perk. (line 10)

### Muton Berserkers:
- 180 AR: New research level. Damage set to 0. HP set to 2. Mobility set to 1. Will set to 3.
- 220 AR: Rebalanced. Damage unchanged at 1. Mobility from 2 to 1.

### Outsiders:
- 230 AR: Aim from 12 to 6. iDefense=1002 to 2. HP from 3 to 1.
- 290 AR: Aim from 4 to 8. iDefense=2 to 1002. HP from 2 to 3.
- 370 AR: Aim from 4 to 6.
- Leader level 8: New perk level. HP set to 3. Covering Fire perk gained.

### Sectoids:
- 180 AR: Damage 1 to 0. Aim from 4 to 3. HP from 2 to 1.
- 240 AR: Aim from 4 to 3.
- 340 AR: Damage 0 to 1. HP 0 to 1.

### Sectoid Commanders:
- 170 AR: New research level. Damage set to 1. HP set to 3. Mobility to 2. Will set to 5.
- 230 AR: Rebalanced. Damage from 1 to 0. HP from 6 to 2. Mobility from 4 to 2. Will from 10 to 5.
- Leader level 1: HP from 1 to 4.

### Sectopods:
- Leader level 8: Damage from 0 to 1 (line 750)
- Leader level 9: Damage from 0 to 5. HP from 0 to 150. (line 752)

### Seekers:
- Leader level 6: New perk level. Covering Fire perk gained.
- Leader level 8: Old level 9 moved to level 8. Damage from 1 to 2. Aim from 10 to 2. HP from 20 to 10. Ready for Anything perk gained.
- Leader level 9: Added a new line with the following changes. Damage set to 4. Aim set to 10. HP set to 25. Combined Arms perk.

### Thin Mints:
- 190 AR: Damage from 1 to 0
- 240 AR: Damage 0 to 1.
- Leader level 9: HP from 10 to 20. (Line 10)

### Uber Ethereals:
- Leader level 1: HP from 28 to 250.

### Zombies:
- 190 AR: HP from 3 to 2.
- 240 AR: HP from 2 to 1.
- 320 AR: HP from 0 to 2.

### Ughxalt:
- Reduced damage of all soldiers by 1.

## Country changes:
- Bounties (% cash bonus from abductions): 20 to 18%

## Foundry Projects:
- Advanced Servomotors: Meld from 120 to 100.
- Alien Grenades: Meld unchanged from 10. Weapon fragments from 175 to 105.
- Alien Metallurgy: Meld from 100 to 80.
- Alien Nucleonics: Meld from 150 to 120.
- Ammo Conservation: Meld from 150 to 120. Weapon fragments unchanged from 125.
- Enhanced Ballistic Weaponry: Weapon fragments from 50 to 40.
- Enhanced Laser Weaponry: Alloys from 40 to 30. Weapon fragments from 75 to 45.
- Enhanced SCOPE: Weapon fragments from 95 to 45.
- Improved Arc Thrower: Weapon fragments from 60 to 50.
- Jellied Elerium: Meld from 100 to 80. Weapon fragments unchanged from 80.
- MEC Close Combat: Meld from 120 to 90. Weapon fragments unchanged from 40.
- Phoenix Coilguns: Meld from 100 to 80.
- Psi Warfare Systems: Meld from 90 to 50. Weapon fragments from 45 to 35.
- Shaped Armor: Meld from 70 to 60.
- Supercapacitors: Weapon fragments from 150 to 120.
- Tactical Rigging: Meld unchanged from 140. Weapon fragments from 150 to 250. Corpses from 40 to 50.
- Wingtip Sparrowhawks: Meld from 90 to 60. Weapon fragments from 70 to 50.

## Item changes:
- Repair modifier (in cash, alloys, elerium and meld) from 20% to 15%.
- Alloy Carbide Plating: Engineer cost from 35 to 65.
- Alloy Plating: DR from 0.2 to 0.
- Blaster Launcher: Damage from 18 to 19.
- Ceramic Plating: DR from 0.3 to 0.1.
- Chitin Plating: Cost from 80 to 150.
- Holo-Targeter: Engineer cost from 15 to 45.
- Neural Gunlink: Engineer cost from 40 to 70.
- Recoilless Rifle: Damage from 11 to 12.
- Reinforced Armor: HP from 2 to 3. DR from 1.3 to 1.0.
- Respirator Implant: Cost from 40 to 150. HP from 1 to 4. iElerium= from 8000 to 8030. Alloys from 0 to 40. Engineer cost from 25 to 75. Defense from 0 to -5. DR from 0 to 2. Mobility from 0 to -2.
- Tactical Sensors: Engineer cost from 35 to 55.
- Walker Gear: Engineer cost from 45 to 65.

## Loot changes:
- All other alien/Exalt Meld from kills from 0.5 to 0.8 .
- Alien Entertainment: Sell value from 250 to 350.
- Alien Food: Sell value from 10 to 12.
- Sectoid Corpses: 2 to 3.
- Floater Corpses: 3 to 4.
- Mechtoid: Elerium from 4 to 6. Alloys from 6 to 8.
- Muton Corpses: 4 to 5.
- Sectopod: Elerium from 6 to 8. Alloys from 6 to 9.
- Damaged UFO Power Source: Sell value from 30 to 40.
- Damaged UFO Navigation: Sell value from 15 to 20.
- UFO Power Source: Sell value from 60 to 75.
- UFO Navigation: Sell value from 30 to 40.

## Research/Tech:
- Advanced Aerospace Concepts: Weapon fragments from 150 to 80.
- Beam Lasers: Weapon fragments from 70 to 60.
- Advanced Beam Lasers: Weapon fragments from 80 to 70.
- Gauss Weapons: Weapon fragments from 225 to 105.
- Advanced Gauss Weapons: Weapon fragments from 260 to 70.
- Pulse Lasers: Weapon fragments from 285 to 155. iTime 88 to 100.
- Advanced Pulse Lasers: Weapon fragments from 320 to 90. iTime 95 to 70.
- Plasma Weapons: iTime 115 to 225.
- Advanced Plasma Weapons: iTime 125 to 135.
- Heavy Plasma Weapons: iTime 125 to 135.
- Vehicular Plasma Weapons: iTime unchanged at 125.
- Precision Plasma Weapons: iTime 125 to 135.
- Muton Elite Autopsy: Corpses required from 25 to 5.
- Note: Time in hours for 1 scientist is (iTime * Tech_Time_Balance * 72). TECH_TIME_BALANCE=10 in the INIs.

## Soldier changes:
### General Soldier changes.
- Technical Sergeant / Major: Exp required from 1900 to 1800.
- Gunnery Sergeant / Colonel: Exp required from 3200 to 3000.
- Master Sergeant / Field Commander: Exp required from 4600 to 4400.
- MEC Augmentation: Cash cost from 40 to 30. Meld cost from 60 to 45.

# July 07 2017

## Escalation changes:
- Some nerfs for first 2-4 months.
- https://www.diffchecker.com/u1NydC6Y

## General changes:
- Chance of successful training if soldier Will equals Psi Power's target will: 45% to 50%.
- Time for Psi training hours from 192 to 155.
- Number of soldier slots in PsiLab, GeneLabs and Cybernetics Lab/Repair Bay from 3 to 4.
- Into the Breach divisor set to 2.5. Formula is: MissionCompleteExp + (MissionCompleteExp/2.5)
- Currency for "Heavy" mission from 135 to 155.
- Loss condition for countries lost from 16 to 10.

## Alien buffs/nerfs:

### Chryssalid:
- 180: HP gain from 3 to 2.

### Cyberdisc:
- 100AR: HP gain from 11 to 15.
- 240AR: HP gain from 7 to 4.
- 330AR: HP gain from 3 to 4

### Ethereal:
- 1AR: HP gain from 10 to 20.

### Ughxalt:
- All Exalt Elites gain 1-3 more HP(depending on class) at 170 Alien Research.

## Country changes:
- Starting income for USA from 250 to 450.
- Starting income for Russia from 350 to 450.
- Starting income for China from 475 to 575.
- Starting income for UK from 500 to 600.
- Starting income for Germany from 500 to 600.
- Starting income for France from 200 to 400.
- Starting income for Japan from 500 to 600.
- Starting income for India from 500 to 600.
- Starting income for Australia from 475 to 575.
- Starting income for Canada from 450 to 550.
- Starting income for Egypt from 450 to 550.
- Starting income for Brazil from 500 to 600.
- Starting income for Argentina from 500 to 600.
- Starting income for Mexico from 450 to 550.
- Starting income for South Africa from 450 to 550.
- Starting income for Nigeria from 450 to 550.

- Wealthy Benefactor bonus from 850 to 950.
- Call to Arms bonus from 25% to 40%.
- The Old Path bonus from 20% to 25%.
- 1st Recce bonus from 4 to 5.
- Army of the Southern Cross bonus from 4 to 3.
- Xenological Remedies bonus from 34% to 40%.
- Robotics bonus from 2 to 3.
- Cyberware bonus from 20% to 40%.
- NeoPanzers bonus from 20% to 40%.
- Bounties bonus from 25% to 20%.
- Expertise bonus from 20% to 25%.
- Legacy of Uxmal bonus from 10% to 12%.
- Task Force Arrowhead bonus from 3 to 4.

- Germany eng/sci from 1/0 to 1/1.

## Base changes:
- Hangar power cost from 3 to 1.
- OTS currency cost from 200 to 150.
- Colonel / COL cost from 400 to 350.
- Field Commander / CMDR cost from 500 to 400.

## Item changes:
- Arc Thrower currency cost from 100 to 80.
- Chem Grenade currency cost from 120 to 90.
- Carapace Armor currency cost from 80 to 75.

## Foundry Projects:
- Advanced Combat Systems: Weapon fragments cost from 50 to 120.
- Alien Grenades: Meld cost from 15 to 10. Weapon fragments from 10 to 175.
- Ammo Conservation: Currency from 850 to 750.
- Armored Fighters: Meld cost from 200 to 150.
- Enhanced Ballistic Weaponry: Elerium cost from 0 to 10. Weapon fragments from 20 to 50.
- Enhanced Laser Weaponry: Elerium cost from 0 to 25. Weapon fragments from 45 to 75.

## Research/Tech:
- Advanced Power Armor iTime=110 to 130.
- Mobile Combat Exoskeletons iTime=110 to 130.
- Heavy Combat Exoskeletons iTime=110 to 130.
- Advanced Aerospace Concepts: Weapon fragments cost from 50 to 150.
- Alien Propulsion: Weapon fragments cost from 160 to 260.
- Experimental Warfare: Weapon fragments cost from 20 to 50.
- Gauss Weapons: Weapon fragments cost from 150 to 225.
- Advanced Gauss Weapons: Weapon fragments cost from 180 to 260.
- Pulse Lasers: Weapon fragments cost from 225 to 285.
- Advanced Pulse Lasers: Weapon fragments cost from 240 to 320.

- Berserker Autopsy: 5 to 9 items required.
- Cyberdisc Autopsy: 3 to 5 items required.
- Drone Autopsy: 5 to 10 items required.
- Heavy Floater Autopsy: 5 to 20.
- Mechtoid Autopsy: 3 to 6.
- Muton Elite Autopsy: 5 to 25.
- Sectoid Commander Autopsy: 5 to 8.
- Seeker Autopsy: 5 to 10 items required.
- Sectopod Autopsy: 3 to 5 items required.

## Soldier changes:
### General Soldier changes.
- Technical Sergeant / Major: Exp required from 2200 to 1900.
- Gunnery Sergeant / Colonel: Exp required from 3300 to 3200.
- Psi Sensitive Exp required from 250 to 200.
- Psi Talent Exp required from 500 to 400.
- Psi Adept Exp required from 850 to 750.
- Psi Psion Exp required from 1350 to 1150.
- Psi Master Exp required from 2000 to 1700.

### SHIVs:
- HP from 2 to 8.
- Other minor SHIV buffs. In general SHIVs have more HP.

https://www.diffchecker.com/ypecICAt

repository: Miradae/xcom-beyond-impossible

repo_name: Miradae/xcom-beyond-impossible


text:
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0] - 2020-12-05

### Added

- Support for Stimulus 2.0
- Adding getter to retrieve the lightGallery instance

### Changed

- **Breaking** Using the new `values` static property

```diff
- <div data-controller="lightbox" data-lightbox-options="{'index': 2}">
+ <div data-controller="lightbox" data-lightbox-options-value='{"index": 2}'>
```

## [1.0.0] - 2020-11-11

### Added

- Adding controller

repository: jinshen-cn/stimulus-lightbox

repo_name: jinshen-cn/stimulus-lightbox


text:
# Tada is a todo management system

Special marked code blocks turn into project issues.
Issue are closed automatically if the marked code block is removed.

This project inspired by [0pdd](http://www.0pdd.com).

## Syntax

Any form of comments is accepted.
First line should be marked with **@todo**.
Subsequent lines must have the same prefix as the marked line.

```
// @tada [#id] Title
// Detailed descriptions
```

The marker can be located at the beginning of the line, but in this case the text can only be single-line.

```
@tada Signle line plain text todo
```

Use **@todo** instead **@tada** in you repository, I cannot do this without consequences.

## Configurations

### Manage issues on master branch

```yml
on:
  push:
    branches:
      - master

jobs:
  todo:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: DronMDF/tada@v0
```

### Check TODOS for pull requests

@todo Describe branch and pr scenarios

repository: DronMDF/tada

gha_language: Python

repo_name: DronMDF/tada


text:
# Place.ge Scraper Data Files
A collection of monthly csv files that are the result of the [Place Ge Scraper](https://github.com/ForSetGeorgia/Scraper---Place.ge).

The scraper runs on the 15th of every month to record all of the records from the previous month. After the scraper is finished, a new CSV file will be added to this repository.

To download a CSV file do the following:
* Click on the link for the CSV file you want to download.
* On the new page, right click on either the 'Download' button or the 'View Raw' link and select 'Save Link As'.
* Indicate where you want to download the file and click the 'Save' button.


text:
<!--- 20180302AnswersSecondWorkShopTaller first feedback  -->
20180302: GAEB(Gabriel Andrés Espinosa Barrios) Returning/re-entry Engineering PhD Graduate Student.

University of the Andes. Cod:200311728 Id:110279864X.
#  COMPUTING TOOLS - SECOND WORKSHOP-TALLER 2
Python files AND commands for the Second WorkShop e-Kart Simulator.

Student:
Gabriel Andrés Espinosa Barrios

The link of the Answers files and results are in : https://github.com/gabrielespinosa/andresgmComputingTools/tree/master/03_taller02/Answers

repository: gabrielespinosa/andresgmComputingTools

repo_name: gabrielespinosa/andresgmComputingTools


text:
# react-itunes-api

A React application to consult and list information from iTunes API, the application is developed using *React 16.11*

Check the live [demo](http://www.marciogurka.com/react-itunes-api/)

## Available Scripts

In the project directory, you can run:

### `npm run start`

Runs the app in the development mode.

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.

You will also see any lint errors in the console.

### `npm run test`

Launches the test runner in the interactive watch mode.

### `npm run build`

Builds the app for production to the `build` folder.

It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed!

repository: marciogurka/react-itunes-api

repo_name: marciogurka/react-itunes-api


text:
# Controllers and Reconciliation

From the [kubebuilder book][controller]:

> Controllers are the core of Kubernetes, and of any operator.
>
> It’s a controller’s job to ensure that, for any given object, the actual state of the world (both the cluster state, and potentially external state like running containers for Kubelet or loadbalancers for a cloud provider) matches the desired state in the object.
> Each controller focuses on one root Kind, but may interact with other Kinds.
>
> We call this process reconciling.

[controller]: https://book.kubebuilder.io/cronjob-tutorial/controller-overview.html#whats-in-a-controller

Right now, we can create objects in our API but we won't do anything about it. Let's fix that.

# Let's see the Code

Kubebuilder has created our first controller in `controllers/mailguncluster_controller.go`. Let's take a look at what got generated:

```go
// MailgunClusterReconciler reconciles a MailgunCluster object
type MailgunClusterReconciler struct {
	client.Client
	Log logr.Logger
}

// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=mailgunclusters,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=mailgunclusters/status,verbs=get;update;patch

func (r *MailgunClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
	_ = context.Background()
	_ = r.Log.WithValues("mailguncluster", req.NamespacedName)

	// your logic here

	return ctrl.Result{}, nil
}
```

## RBAC Roles

The `// +kubebuilder...` lines tell kubebuilder to generate [RBAC] roles so the manager we're writing can access its own managed resources. These should already exist in `controllers/mailguncluster_controller.go`:

```go
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=mailgunclusters,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=mailgunclusters/status,verbs=get;update;patch
```

We also need to add rules that will let it retrieve (but not modify) Cluster API objects.
So we'll add another annotation for that, right below the other lines:

```go
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch
```

Make sure to add this annotation to `MailgunClusterReconciler`.

For `MailgunMachineReconciler`, access to Cluster API `Machine` object is needed, so you must add this annotation in `controllers/mailgunmachine_controller.go`:

```go
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status,verbs=get;list;watch
```

Regenerate the RBAC roles after you are done:

```bash
make manifests
```

[RBAC]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole

## State

Let's focus on that `struct` first.
First, a word of warning: no guarantees are made about parallel access, both on one machine or multiple machines.
That means you should not store any important state in memory: if you need it, write it into a Kubernetes object and store it.

We're going to be sending mail, so let's add a few extra fields:

```go
// MailgunClusterReconciler reconciles a MailgunCluster object
type MailgunClusterReconciler struct {
	client.Client
	Log       logr.Logger
	Mailgun   mailgun.Mailgun
	Recipient string
}
```

## Reconciliation

Now it's time for our Reconcile function.
Reconcile is only passed a name, not an object, so let's retrieve ours.

Here's a naive example:

```
func (r *MailgunClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
	ctx := context.Background()
	_ = r.Log.WithValues("mailguncluster", req.NamespacedName)

	var cluster infrav1.MailgunCluster
	if err := r.Get(ctx, req.NamespacedName, &cluster); err != nil {
		return ctrl.Result{}, err
	}

	return ctrl.Result{}, nil
}
```

By returning an error, we request that our controller will get `Reconcile()` called again.
That may not always be what we want - what if the object's been deleted? So let's check that:

```
var cluster infrav1.MailgunCluster
if err := r.Get(ctx, req.NamespacedName, &cluster); err != nil {
    // 	import apierrors "k8s.io/apimachinery/pkg/api/errors"
    if apierrors.IsNotFound(err) {
        return ctrl.Result{}, nil
    }
    return ctrl.Result{}, err
}
```

Now, if this were any old `kubebuilder` project we'd be done, but in our case we have one more object to retrieve.
Cluster API splits a cluster into two objects: the [`Cluster` defined by Cluster API itself][cluster].
We'll want to retrieve that as well.
Luckily, cluster API [provides a helper for us][getowner].

```go
cluster, err := util.GetOwnerCluster(ctx, r.Client, &mg)
if err != nil {
    return ctrl.Result{}, err

}
```

### client-go versions
At the time this document was written, `kubebuilder` pulls `client-go` version `1.14.1` into `go.mod` (it looks like `k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible`).

If you encounter an error when compiling like:

```
../pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/rest/request.go:598:31: not enough arguments in call to watch.NewStreamWatcher
    have (*versioned.Decoder)
    want (watch.Decoder, watch.Reporter)`
```

You may need to bump `client-go`. At time of writing, that means `1.15`, which looks like: `k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible`.

## The fun part

_More Documentation: [The Kubebuilder Book][book] has some excellent documentation on many things, including [how to write good controllers!][implement]_

[book]: https://book.kubebuilder.io/
[implement]: https://book.kubebuilder.io/cronjob-tutorial/controller-implementation.html

Now that we have our objects, it's time to do something with them!
This is where your provider really comes into its own.
In our case, let's try sending some mail:

```go
subject := fmt.Sprintf("[%s] New Cluster %s requested", mgCluster.Spec.Priority, cluster.Name)
body := fmt.Sprint("Hello! One cluster please.\n\n%s\n", mgCluster.Spec.Request)

msg := mailgun.NewMessage(mgCluster.Spec.Requester, subject, body, r.Recipient)
_, _, err = r.Mailgun.Send(msg)
if err != nil {
    return ctrl.Result{}, err
}
```

## Idempotency

But wait, this isn't quite right.
`Reconcile()` gets called periodically for updates, and any time any updates are made.
That would mean we're potentially sending an email every few minutes!
This is an important thing about controllers: they need to be [*idempotent*][idempotent].

So in our case, we'll store the result of sending a message, and then check to see if we've sent one before.

```go
if mgCluster.Status.MessageID != nil {
    // We already sent a message, so skip reconciliation
    return ctrl.Result{}, nil
}

subject := fmt.Sprintf("[%s] New Cluster %s requested", mgCluster.Spec.Priority, cluster.Name)
body := fmt.Sprintf("Hello! One cluster please.\n\n%s\n", mgCluster.Spec.Request)

msg := mailgun.NewMessage(mgCluster.Spec.Requester, subject, body, r.Recipient)
_, msgID, err := r.Mailgun.Send(msg)
if err != nil {
    return ctrl.Result{}, err
}

// patch from sigs.k8s.io/cluster-api/util/patch
helper, err := patch.NewHelper(&mgCluster, r.Client)
if err != nil {
    return ctrl.Result{}, err
}
mgCluster.Status.MessageID = &msgID
if err := helper.Patch(ctx, &mgCluster); err != nil {
    return ctrl.Result{}, errors.Wrapf(err, "couldn't patch cluster %q", mgCluster.Name)
}

return ctrl.Result{}, nil
```

[cluster]: https://godoc.org/sigs.k8s.io/cluster-api/api/v1beta1#Cluster
[getowner]: https://godoc.org/sigs.k8s.io/cluster-api/util#GetOwnerMachine
[idempotent]: https://stackoverflow.com/questions/1077412/what-is-an-idempotent-operation

#### A note about the status

Usually, the `Status` field should only be values that can be _computed from existing state_.
Things like whether a machine is running can be retrieved from an API, and cluster status can be queried by a healthcheck.
The message ID is ephemeral, so it should properly go in the `Spec` part of the object.
Anything that can't be recreated, either with some sort of deterministic generation method or by querying/observing actual state, needs to be in Spec.
This is to support proper disaster recovery of resources.
If you have a backup of your cluster and you want to restore it, Kubernetes doesn't let you restore both spec & status together.

We use the MessageID as a `Status` here to illustrate how one might issue status updates in a real application.

## Update `main.go` with your new fields

If you added fields to your reconciler, you'll need to update `main.go`.

Right now, it probably looks like this:

```go
if err = (&controllers.MailgunClusterReconciler{
    Client: mgr.GetClient(),
    Log:    ctrl.Log.WithName("controllers").WithName("MailgunCluster"),
}).SetupWithManager(mgr); err != nil {
    setupLog.Error(err, "unable to create controller", "controller", "MailgunCluster")
    os.Exit(1)
}
```

Let's add our configuration.
We're going to use environment variables for this:

```go
domain := os.Getenv("MAILGUN_DOMAIN")
if domain == "" {
    setupLog.Info("missing required env MAILGUN_DOMAIN")
    os.Exit(1)
}

apiKey := os.Getenv("MAILGUN_API_KEY")
if apiKey == "" {
    setupLog.Info("missing required env MAILGUN_API_KEY")
    os.Exit(1)
}

recipient := os.Getenv("MAIL_RECIPIENT")
if recipient == "" {
    setupLog.Info("missing required env MAIL_RECIPIENT")
    os.Exit(1)
}

mg := mailgun.NewMailgun(domain, apiKey)

if err = (&controllers.MailgunClusterReconciler{
    Client:    mgr.GetClient(),
    Log:       ctrl.Log.WithName("controllers").WithName("MailgunCluster"),
    Mailgun:   mg,
    Recipient: recipient,
}).SetupWithManager(mgr); err != nil {
    setupLog.Error(err, "unable to create controller", "controller", "MailgunCluster")
    os.Exit(1)
}
```

If you have some other state, you'll want to initialize it here!

repository: kubernetes-sigs/cluster-api

gha_language: Go

repo_name: kubernetes-sigs/cluster-api


text:
# lown

**lown** is a lightweight markup language inspired by BBCode and LISP.

## Features

* LISP inline syntax and BBCode block syntax
* Maths and emoji support
* Parse to HTML

See the [syntax reference](reference.md) for more information.

## Installation (macOS and Linux)

```
$ git clone https://github.com/oileurre/lown/
$ ln -s /usr/local/lown/src/lown.py /usr/local/bin
```

## Usage

```
$ lown file.lown > file.html
$ lown file.lown -s > file.html
```

`-s` stands for *standalone*.

repository: AlexNodex/lown

repo_name: AlexNodex/lown


text:
---
layout:     post
title:      Lecture 31 (Linear Algebra)
subtitle:
date:       2018-01-18
author:     Sun Yin
header-img: img/tags_linearAlgebra.png
catalog: true
tags:
    - Linear Algebra
---
## Lecture 31

**1. Basis Change and Image Compression**

**2. Basis Change and Linear Transform**

---

### 1. Basis Change and Image Compression

The image data usually have a very high dimension. For example a 256 * 256 image has a dimension over 60000. One way to compress the data size is to apply a new set of basis to represent data, and set the coefs of some unimportant basis to 0.

Let $${x}_{old}$$ be the coefs of old basis, $${x}_{new}$$ be the new basis and $$W$$ be the new basis, then

$$
{ x }_{ old }=W{ x }_{ new }
$$

$$
{ x }_{ new }={ W }^{ -1 }{ x }_{ old }
$$

So the key to choose a good basis is

1. Inversion computation is fast.
2. Set some coefs to 0 would not lose much infomation.

One common used basis is Fourier Basis which we have seen in lecture before. Another is Wavelt basis. The 8*8 Wavelt basis is shown below:

$$
\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \\ 1 \\ 1 \\ 1 \\ 1 \end{bmatrix},\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \\ -1 \\ -1 \\ -1 \\ -1 \end{bmatrix},\begin{bmatrix} 1 \\ 1 \\ -1 \\ -1 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix},\begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 1 \\ 1 \\ -1 \\ -1 \end{bmatrix},\begin{bmatrix} 1 \\ -1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix},...,\begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 1 \\ -1 \end{bmatrix}
$$

### 2. Basis Change and Linear Transform*

T is a linear transformation. And A is the corresponding matrix of T with respect to basis set V and B is the corresponding matrix of T with respect to basis set W. Then we have B is similar to A. That is to say, $$B={M}^{-1}AM$$.


text:
# Overview

This repository holds the business logic for building and managing the data pipelines used to power various data
services at MIT Open Learning. The core framework is Dagster which provides a flexible, and well structured approach to
building data applications.

repository: blaisep/ol-data-pipelines

repo_name: blaisep/ol-data-pipelines


text:
# Prepare
Download `peer` executable and make it accessible from `$PATH`
Spin up the [fabric network](../../../../benchmark/fabric-v1.4/four-nodes-docker/)

# Run
## Deploy
* use `./deploy.sh` to deploy the Analytic smart contract to blockchain.

## Install NodeJS SDK
`npm install`

## Populate Transactions
`node populate.js <orderer-address> <peer-address> <#-of-accounts> <#-of-txns>`
If `#-of-accounts=100`, 100 acounts named with *Acc0*, *Acc1*, ..., *Acc99* are created.

## Query Block Height
`node query_blk_height.js <orderer-address> <peer-address>`

## Benchmark Q1
`node bench_q1.js <orderer-address> <peer-address> <start-block> <end-block>`

## Benchmark Q2
`node bench_q2.js <orderer-address> <peer-address> <start-block> <end-block> <account-name>`


text:
#Starting a Container on Azure

Now that we have a virtual machine running with Docker on Azure we can test it out by running a Container.
We'll use our local Docker client in doing so.

The easiest way to verify that the Docker host is running and functional on Azure is to use [busybox](https://registry.hub.docker.com/_/busybox/) for creating a "Hello World" Container:
```
$  docker run busybox echo hello world
```

>Note: If you're using the VM created using the Azure CLI in Excercise 03 - you will need to add the --tls option right after `docker`

The output will look something like this
```
    Unable to find image 'busybox:latest' locally
    511136ea3c5a: Pull complete
    df7546f9f060: Pull complete
    ea13149945cb: Pull complete
    4986bf8c1536: Pull complete
    busybox:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
    Status: Downloaded newer image for busybox:latest
    hello world
```

Let's try running another container that might be a bit more useful.

Running the following command will start an [nginx](https://hub.docker.com/_/nginx/) server
```
$ docker run --name machinenginx -P -d nginx
```
The `-d` flag will ensure that the container runs in the background continuously.

When naming a container that name is allocated for that container, to completely remove it run the following:

```cli
$ docker rm machinenginx
```

The nginx image will by default expose port 80 and 443, because of the `EXPOSE` instruction within the image.
The `-P` flag will have Docker assign random ports to the container, so both port 80 and 443 will be exposed externally.

If you want to specify the public ports directly, so you don't get random public ports assigned you need to run it as follows

```cli
$ docker run --name machinenginx -p 49153:80 -p 49154:443 -d nginx
```

The 49153:80 and 49154:443 syntax is specifying the public port mapped to the private port (public:private).

You can verify that the ports have been mapped by running the `docker ps -a` command. The output should look similar to the following:
```
IMAGE               PORTS
nginx:latest        <IP_ADDRESS>:49153->80/tcp, <IP_ADDRESS>:49154->443/tcp
busybox:latest
```

To simplify it all, lets use standard ports (80, 443). By just running without specifying ports, it will use the defaults.

```cli
$ docker run --name machinenginx -p 80:80 -p 443:443 -d nginx
```

One thing to note about this is that these port will not be opened by Azure on the VM itself, so we need to do that as extra step in order to access nginx on port 80.

Using the Azure CLI we can run the following command to open public port 80 to port 49153 on the VM. Docker then ensures that inbound tcp traffic on VM port 49153 is routed to the nginx container.

We will need to log in the Azure CLI, if you're not already logged in:

```cli
$ azure login
```

This will present the following:

```cli
info:    Executing command login
info:    To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code {SOME CODE} to authenticate.
```

Follow the instructions and go to [https://aka.ms/devicelogin](https://aka.ms/devicelogin) and enter the code and authenticate.

To make sure you're using the correct subscription, if you have multiple subscriptions you can list the subscriptions by using:

```cli
$ azure account list
```

You'll get something like the following

```cli
info:    Executing command account list
data:    Name                                                              Id                                    Current  State
data:    ----------------------------------------------------------------  ------------------------------------  -------  --------
data:    [SOME SUBSCRIPTION]                                               00000000-0000-0000-0000-000000000000  true     Enabled
data:    [SOME OTHER SUBSCRIPTION]                                         00000000-0000-0000-0000-000000000000  false    Enabled
```

You'll notice that one of these are set as the current - verify that it actually is the subscription you want to use.
If it is not, you can change current by issuing the following command.

```cli
$ azure account set [SUBSCRIPTION ID]
```

>The port will probably be something else than 49153 - look at the output from `docker ps -a`command.

The following command will open a port in the firewall

```cli
$ azure network nsg rule create --resource-group {RESOURCE GROUP NAME} --nsg-name {NETWORK SECURITY GROUP NAME}
--name http --protocol tcp --direction inbound --priority 1000
--destination-port-range 80
--access allow
```

> If you created the machine using the `docker-machine`command without specifying resource group name use `docker-machine` as
> resource group name and YOUR_VM_NAME and postfixed with `-firewall` for the network security group name.

This should give you something like this:

```cli
info:    Executing command network nsg rule create
warn:    Using default --source-address-prefix *
warn:    Using default --destination-address-prefix *
+ Looking up the network security group "myfirstdockervm2-firewall"
+ Looking up the network security rule "http"
+ Creating a network security rule "http"
data:    Id                              : /subscriptions/{YOUR SUBSCRIPTION ID}/resourceGroups/{RESOURCE GROUP}/providers/Microsoft.Network/networkSecurityGroups/{NETWORK SECURITY GROUP}/securityRules/http
data:    Name                            : http
data:    Type                            : Microsoft.Network/networkSecurityGroups/securityRules
data:    Provisioning state              : Succeeded
data:    Source IP                       : *
data:    Source Port                     : *
data:    Destination IP                  : *
data:    Destination Port                : 80
data:    Protocol                        : Tcp
data:    Direction                       : Inbound
data:    Access                          : Allow
data:    Priority                        : 1000
info:    network nsg rule create command OK
```

We need the public IP address to be able to test that everything is working, you can get it from the portal or use the Azure CLI as well.

```cli
$ azure vm list-ip-address -g {RESOURCE GROUP}
```

It should yield the following:

```cli
info:    Executing command vm list-ip-address
+ Getting virtual machines
+ Looking up the NIC "{VM NAME}-nic"
+ Looking up the public ip "{VM NAME}-ip"
data:    Resource Group   Name              Public IP Address
data:    ---------------  ----------------  -----------------
data:    {RESOURCE GROUP} {VM NAME}         {IP ADDRESS}
info:    vm list-ip-address command OK
```

Open a browser and go to `http://{IP ADDRESS}` and you should see the nginx welcome page.

That's it for now. You can of course stop and remove these containers and images as we won't be using them again.

repository: azuredk/docker-on-azure-hol

gha_language: CSS

repo_name: azuredk/docker-on-azure-hol


text:
# Lambdas

## Overview

**Lambdas** is a web-based UI component which is a part of the Console UI.
It allows you to manage lambda functions, which are the key part of Kyma capabilities.

## Details

**Lambdas** allow you to:
- Create and modify lambda functions.
- Expose a function as API.
- Bind a function to a service.
- Write the code of the function. This option is available only through node.js.
- Manage dependencies.
- Add and remove labels.
- Enable API security.
- Select the function size.
- Direct access to Lambda dashboard.

### Configuration

**Lambdas** UI is deployed with the use of a [ConfigMap](templates/configmap.yaml).
The **ConfigMap**  includes the `config.js` file that is mounted as the asset of the Console application and injected as a configuration file.
Use this mechanism to overwrite the default configuration with custom values resulting from the Helm chart installation.

### Function size

You can modify the function size when you either create or update a function using  **Lambdas** UI.

The [ConfigMap](templates/configmap.yaml) contains a set of configurations for a function size, including:
- **resources** configuration with the following parameters: **requests** and **limits**.
- **horizontalPodAutoscaler** configuration with the following parameters: **minReplicas**, **maxReplicas** and **targetAverageUtilization**.

- The basic **requests** configuration for a function is as follows:

```
resources:
  requests:
    cpu: '100m'
    memory: '100Mi'
```

- You can configure the sizes using the following parameters:
1. S: `{memory: '128Mi', cpu: '100m', minReplicas: 1, maxReplicas: 2}`
2. M: `{memory: '256Mi', cpu: '500m', minReplicas: 2, maxReplicas: 5}`
3. L: `{memory: '512Mi', cpu: '1.0',  minReplicas: 5, maxReplicas: 10}`
4. XL:`{memory: '1024Mi', cpu: '2.0', minReplicas: 10, maxReplicas: 20}`

>**NOTE:** The size of the function may exhaust the resources of the Namespace. When creating a function, keep in mind the configured resource quotas.

The yaml file shows a sample M size function.

The function includes the container **test** with the `spec.deployment.spec.containers[0].resources` configuration, as well as the configuration for the **horizontalPodAutoscaler**.

```yaml
apiVersion: kubeless.io/v1beta1
kind: Function
metadata:
  annotations:
    function-size: M
  finalizers:
  - kubeless.io/function
  generation: 1
  name: test
  namespace: stage
spec:
  checksum: ""
  deployment:
    spec:
      replicas: 2
      template:
        spec:
          containers:
          - name: test
            resources:
              limits:
                cpu: 500m
                memory: 256Mi
              requests:
                cpu: 100m
                memory: 100Mi
  deps: ""
  function: |-
    module.exports = { main: function (event, context) {
        return "test";
    } }
  function-content-type: text
  handler: handler.main
  horizontalPodAutoscaler:
    metadata:
      labels:
        function: test
      name: test
      namespace: stage
    spec:
      maxReplicas: 5
      metrics:
      - resource:
          name: cpu
          targetAverageUtilization: 40
        type: Resource
      minReplicas: 2
      scaleTargetRef:
        apiVersion: apps/v1beta1
        kind: Deployment
        name: test
  runtime: nodejs8
  service:
    ports:
    - name: http-function-port
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      created-by: kubeless
      function: test
  timeout: ""
```

repository: rasyidmujahid/kyma

repo_name: rasyidmujahid/kyma