text:
RISK-FIVE

## About The Project
A Verilog based implementation of the RV32I Unprivileged RISC-V Instruction Set Architecture.
A subset of the RV32I Base Module has been implemented. The functions that have not been included are CSR functions, fence, ecall and ebreak.

## Current Design
- Entirely written in Verilog
- Requires 1 clock cycle to complete any instruction (except LOAD - Requires two cycles)
- Single RISC-V Hart only
- The privileged ISA is **not** implemented
- FENCE, FENCE.I and CSR instructions are not implemented.
- K Extension - Zkn and Zks - Implemented
  - The Bit-Manipulation and Cryptography Instruction Set that we are using is still in the experimental phase.
  - The extension has not been ratified by the RISC-V Foundation yet.

## ASIC Implementation
ASIC implementation of the processor from the Register Transfer Level (RTL)  stage to the GDSII stage (Physical Design)
- RTL Design in Verilog HDL
- Semi-custom ASIC flow in 180nm technology
- Performance comparison using area, power, timing, and delay reports for the post synthesis and post layout results at multiple clock frequencies.

## Future Scope
- Implement a classic 5-stage RISC pipeline.
- Evaluate the implementation of the privileged ISA.
- GPIO, LED, UART Support.

## Final Year Thesis
**Paulson K Antony** - 17BEC1147\
**Nikshith Narayan Ramesh** - 17BEC1097\
**Pranav Suryadevara** - 17BEC1073\
**Prof. Prathiba A** - Project Guide

**Vellore Institute of Technology, Chennai Campus,\
Vandalur-Kelambakkam Road,\
Chennai - 600127**

repository: paulsonkantony/risk-five

gha_language: Verilog

repo_name: paulsonkantony/risk-five


text:
# @urql/core

> The shared core for the highly customizable and versatile GraphQL client, urql

More documentation is available at [formidable.com/open-source/urql](https://formidable.com/open-source/urql/).

license: MIT

repository: yamalight/urql

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: yamalight/urql


text:
# Expression

`lambuild` uses the Expression Engine [antonmedv/expr](https://github.com/antonmedv/expr) to filter events and generate the buildspec dynamically.

The following parameters are passed to expressions.

.path | type | example | description
--- | --- | --- | ---
.event | [Event](#type-event) | |
.repo | [Repository](#type-repository) | |
.sha | string | |
.ref | string | |
.aws.Region | string | `us-east-1` |
.aws.AccountID | string | |
.aws.CodeBuild.ProjectName | string | |
.getCommit | `func() *github.Commit` | |
.getCommitMessage | `func() string` | |
.getPR | `func() *github.PullRequest` | | get an associated pull request
.getPRNumber | `func() int` | | get an associated pull request number
.getPRFiles | `func() []*github.CommitFile` | | get associated pull request files
.getPRFileNames | `func() []string` | | get associated pull request file paths
.getPRLabelNames | `func() []string` | | get associated pull request label names

Please see [go-github's document](https://pkg.go.dev/github.com/google/go-github/v35/github) too.

* [*github.Commit](https://pkg.go.dev/github.com/google/go-github/v35/github#Commit)
* [*github.PullRequest](https://pkg.go.dev/github.com/google/go-github/v35/github#PullRequest)
* [*github.CommitFile](https://pkg.go.dev/github.com/google/go-github/v35/github#CommitFile)

_Note that the above go-github version may be different from actual version which lambuild uses, because it is difficult to maintain the document properly. Please check [go.mod](../go.mod)._

To avoid unneeded GitHub API call, `lambuild` doesn't call API until the function is called at the expression, and the result is cached in the Lambda Function's request scope.

This is the reason why the type of parameters like `getPRFileNames` is function.

## Type: Event

.path | type | example | description
--- | --- | --- | ---
.Body | string | | GitHub Webhook's payload
.Headers | [Headers](#type-headers) | | [GitHub Webhook's Delivery headers](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#delivery-headers)
.Payload | interface{} | | [*github.PullRequestEvent](https://pkg.go.dev/github.com/google/go-github/v35/github#PullRequestEvent) or [*github.PushEvent](https://pkg.go.dev/github.com/google/go-github/v35/github#PushEvent)

## Type: Headers

[GitHub Webhook's Delivery headers](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#delivery-headers)

.path | type | example | description
--- | --- | --- | ---
.Event | string | `push` | `x-github-event`
.Delivery | string | | `x-github-delivery`
.Signature | string | | `x-hub-signature-256`

## Type: Repository

.path | type | example | description
--- | --- | --- | ---
.FullName | string | `suzuki-shunsuke/test-lambuild` |
.Owner | string | `suzuki-shunsuke` |
.Name | string | `test-lambuild` |

repository: vadasambar/lambuild

branch_name: refs/heads/main

repo_name: vadasambar/lambuild


text:
# TidyStrongParams

Strong params can end up making your controllers very fat and form objects aren't always the best cure.
Tidy Strong Params (TSP) takes inspiration from ActiveModelSerialiers and aims to separate param white-listing from the rest of your controller logic whilst also allowing for flexibility in it's implementation.

TSP provides a simple way for storing your list of white-listed params in their own directory, hopefully with minimal overhead.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'tidy_strong_params'
```

## Usage

#### Overview

Create a params directory and create a params class inheriting from `TidyStrongParams::StrongParams` for each whitelist

```
class BookStrongParams < TidyStrongParams::StrongParams
  params  :tile,
          :publisher,
          :year,
          authors: %i[first_name last_name]
end
```

A `tidy_strong_parms` method is available on each controller which returns the whitelisted params defined by its corresponding StrongParms class. eg. BookStrongParams for the books controller

```
Class BooksController < ApplicationController
  def update
    @book.update(tidy_strong_params)
  end
end
```

#### `TidyStrongParams::StrongParams`
##### `params` (Class method)

The `params` helper method takes the list of parameters you would usually pass as arguments to `permit()` in your controller.

##### params (instance method)

The params class method above is the simplest and cleanest way to pass a list of permitted attributes. However if you require more control eg. (conditionally permit params) then you can define your own `params` instance method which should return an array of permitted attributes. eg.

```
class BookStrongParams < TidyStrongParams::StrongParams
  def params
    [
      :tile,
      publisher
    ]
  end

  def publisher
    :publisher if raw_params[:book][:publisher] == 'Faber&Faber'
  end
end
```

It overrides anything built using the `params` class method

##### `required` (Class method)
By default params are required to be nested under their resource name. eg. for the books controller it would be equivalent of calling `params.require(:books)`. The name of this required parameter can be changed of disabled (pass false) using the `required` class method.

```
class BookStrongParams < TidyStrongParams::StrongParams
  required :old_books
  params  :tile,
          :publisher
end

expects `{ old_books: { tile: "", publisher: ''} }`
```

##### `tap_params` (instance method)

Allows you to tap into and tweak the list of permitted attributes before they are returned. The main difference between this and the params instance method, is this method is called after `require` and can be used in conjunction with the `params` class helper.

```
class BookStrongParams < TidyStrongParams::StrongParams
  params  :tile,
          :publisher

  def tap_params(whitelist)
    whitelist[:authors] = ['tom', 'dick', 'harry'] unless whitelist[:authors]
    whitelist[:request_meta] = raw_params[:book].keys.length
  end
end
```

##### `restrict` (class method)
Although a `tidy_strong_params` method is injected into each controller the `TidyStrongParams::StrongParams` class can be used directly, just pass in the required `raw_params` argument to the `restrict` method.
Note `resource_name` is only needed if there is no `required` key declared on the BookStrongParams class. Scope is optional

```
Class BooksController < ApplicationController
  tidy_params_scope :current_user

  def create
    Book.create(CreateBookStrongParams.restrict(raw_params: params, scope: current_user))
  end

  def update
    @book.update(UpdateBookStrongParams.restrict(raw_params: params, resource_name: 'book'))
  end
end
```

#### `tidy_params_scope` (Class method added to controllers)

As scope for TSP can be set at the controller level which is then passed to the `StrongParams` class. Useful for passing things like `current_user`. If the same scope is used everywhere then may best to set `tidy_params_scope` on the `ApplicationController`.

```
Class BooksController < ApplicationController
  tidy_params_scope :current_user

  def update
    @book.update(tidy_strong_params)
  end
end
```
Then scope can be assessed as an attribute in the StrongParams class

```
class BookStrongParams < TidyStrongParams::StrongParams
  params  :tile,
          :publisher

  def tap_params(whitelist)
    whitelist.delete(:tile) = unless scope.current_user&.admin?
    whitelist[:user_id] = scope.current_user&.id
  end
end
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tidy_strong_params. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the TidyStrongParams project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tidy_strong_params/blob/master/CODE_OF_CONDUCT.md).

gha_language: Ruby


text:
# Robotic Challenge
Robotic challenge in three different scenarios where turtlebot must reach a goal passed as a parameter, planning a path and avoiding obstacles while trying to perform in the shortest time possible. There are three different scenarios which are described here and there are some screenshots in the bottom of the readme.
-  **Scenario 1:** Room with all obstacles defined in map which are considered in planning phase
- **Scenario 2**: Room with at least an obstacle undefined in map that can't be considered in planning phase
- **Scenario 3:** Robotics labs that could have obstacles.
## Credits
[Luis Merino](https://github.com/lmercab)
[David Alejo Teissière](https://github.com/david-alejo)
[PyOrca Algorithm To avoid obstacles](https://github.com/Muon/pyorca)
[Python Robotics algorithms](https://github.com/AtsushiSakai/PythonRobotics)
# Dependencies:
[Ros kinetic](http://wiki.ros.org/kinetic/Installation)
[Python](https://www.python.org/downloads/)
# Usage
The challenge has three different scenarios and there is a way to execute each one.
All of them will work with the same nodes and algorithms but will have different parameters.

In order to import the module you should create the pkg with the following command `catkin_create_pkg robotics_challenge rospy`  and move /robotics_challenge content in it.
You must prepare the project folder before launching any scenario: `source ./devel/setup.bash` in your project directory.

Scenario 1:
```
roslaunch robotics_challenge robotics_challenge1.launch
```
Scenario 2:
```
roslaunch robotics_challenge robotics_challenge2.launch
```
Scenario 3:
```
roslaunch robotics_challenge robotics_challenge3.launch
```

If you need further help with ros commands check my [Ros Kinetic commands gist](https://gist.github.com/Kazzpa/5e88584811270419eaea57b7e87195df)
# Nodes
- [Control Node](#control-node)
- [Orca Node](#orca-node)
- [Planner Node](#planner-node)
## Control Node:
[code](robotics_challenge/scripts/controlGoalParameterServer.py)
##### It manages the route to follow and calculates the direction in which to move, taking into account the distance to the next point of the route and the direction in which it is located. It will control the exception that can give orca, solving it with a bug algorithm, in which it will always move towards a direction, to avoid possible collisions that the orca algorithm cannot solve. On the other hand, it will publish a marker that will refer to the point to which it has to move at the moment, represented as a small blue sphere.

### Topics:
##### Publisher:
 - Twist **/cmd_vel/tracker**
 - Twist **/cmd_vel_mux/input/navi**
 - Marker **/visualization_marker**
##### Subscriber:
 -  Bool **/is_goal_within_obstacle**
 -  Path **/path_plan**
### Parameters:
 -  Path **path:** List of points the robot must follow,undefined until callback from /path_plan.
 -  Bool **path_set:** Variable to know if path has already been defined or not.
 -  Bool **skipping_goal:** Defines if orca had a problem finding a new movement to avoid obstacles, set in callback from /is_goal_within_obstacle
 -  Float **skip_goal_max_distance:** Max distance where a goal will be skipped if skipping_goal is True
 - Float **goal_tolerance:** Distance where a goal will be considered reached.
 - Float **linear_max:** Max linear speed robot will be able to move.
 - Float **angular_max:** Max angular speed robot will be rotating.
 - Float **angle_tolerance:** Degrees where the robot will move slower and adjust the rotation.
 - Float **linear_turning:** Speed the robot will be moving when turning to achieve the degrees to goal defined in angle_tolerance.
### Functions:
  - **__main__**: It initializes the node and defines the time ratio to which the command function will be executed, by which iterates the points of the path.
 - **command ( Int i )**:  calculates the linear and angular speed to achieve the current goal without exceed the limits defined, also manages if a goal in path should be skipped when called from `/is_goal_within_obstacle` , if the goal should be skipped it will calculate a new linea and angular velocity based in a bug algorithm to avoid the obstacle, this will be called if an exception has been raised in orca node .
Returns the current or next index in path , and a boolean to determine if the current goal was reached.
 - **path_received ( Path path )**: callback of `/path_plan` which sets the path.
 - **skip_goal ( Bool skipping_goal )**: callback of `/is_goal_within_obstacle` which sets skipping_goal to true if the goal is unreachable by orca.
 - **robot_closer_next_goal ( Int i )**: Returns the next point of the path that is closer to the current position of turtlebot
 - **publish ( Float lin_vel Float ang_vel )**: publish to the `/cmd_vel/tracker` topic the  desirable speed which will be sent to Orca node.
 - **publish_navi ( Float lin_vel,Float ang_vel )**: publish to the `/cmd_vel_mux/input/navi` topic the speed to move, this function will only be called if skipping_goal is set to true, as a way to resolve a local minimun in with orca algorithm.
 - **marker_goal ( Float goalx,Float goaly )**: Publish to `/visualization_marker` the next goal so we can visualize it in rviz.
## Orca Node:
[Code](robotics_challenge/scripts/orcaGazebo.py)
##### In charge of avoiding the obstacles received by the radar and therefore transform the speed coming from control node to one that avoids these obstacles, if not possible send a signal to control to solve the problem.
### Topics:
##### Publisher:
 - Twist **/cmd_vel_mux/input/navi**
 -  Bool **/is_goal_within_obstacle**
 - Marker **/visualization_marker**
##### Subscriber:
 - Twist **/cmd_vel/tracker**
 - LaserScan **/scan**
### Parameters:
 -  Float **linear_threshold:** Threshold where if isn't exceeded orca won't take action.
 -  Float **linear_max:** Max linear speed robot will be able to move.
 -  Float **radius:** Radius of the obstacle, which are named Agents in orca.
 -  Float **delta_t:** Time between every call to orca, which is defined as rate of sleep.
 -  Float* **max_distance_obstacle:** Max distance where a obstacle will be considered by orca to be avoided
 -  Array **v_orca:** Speed considered for orca in vector
 -  Float **linear:** Linear speed to be published after being calculated
 -  Float **angular:** Angular speed to be published after being calculated
### Functions:
  - **__main__**: It initializes the node and sets it to sleep while not shutdown has been invoked.
  - **callback_cmd_vel ( Float [] data)**: Invoked if received from `/cmd_vel/tracker`, transform the speed in to a vector and saves it as v_orca, as it will be used by orca.
  - **callback_scan ( LaserScan Data)**: analyzes the obstacles retrieved from LaserScan, filters the ones who are farther than max_distance_obstacle, and transform v_orca in a new vector to avoid the obstacles. If orca can't transform the direction a new one, it will raise an exception and True will be send in `/is_goal_within_obstacle` topic
  - **publish ( Float lin_vel, Float ang_vel)**: publish the calculated velocity to turtlebot.
  - **orca_apply ( Agent [] agents)**: calls orca algorithm to resolve which direction must the robot move to avoid obstacles. More info in their own repo linked in credits.

## Planner Node:
[code](robotics_challenge/scripts/planner_node.py)
##### Will calculate a path to the goal avoiding obstacles defined in the costmap, this will be calculated once. We will be using an a -star algorithm considering both the travelled distance and the distance to goal.
### Topics:
##### Publisher:
 - Marker **/path**
 -  Path **/path_plan**
##### Subscriber:
 - OccupancyGrid **/costmap_2d/costmap/costmap**
### Parameters:
 -  String **goal_path:** File path to save the path plan.
 -  Float [] **init:** Init coords where the robot will start the path.
 -  Float [] **goal:** Goal coords that the robot must reach
### Functions:
  - **__main__**: It initializes the node and sets it to sleep while not shutdown has been invoked.
  - **map_callback**: Retrieves the information from `/costmap_2d/costmap/costmap` and calls calculate_pat, publish_path_msg, publish_path_marker, and finally saveAsYaml functions
  - **calculate_path (Float [] init, Float [] goal)**:  will call the dijkstra algorithm that is modified to work as an AStar algorithm, and return the points that compose the path.
  - **publish_path_msg(Path path)**: Once calculated by calculate_path this will reverse the list of points as they come from the goal to init, and it will publish in `/path_plan` topic so the robot can star following it.
  - **publish_path_marker(path path)**: This will publish the path as Markers in `/path` so rviz can visualize it.
  - **save_as_yaml(Path path)**: Saves the path as a yaml so a node can read it as ros params, this was used before the topic path_plan was created.
 ### Comparision between astar and dijkstra planning
We can see that the dijkstra algorithm takes a lot more of points into account, and isn't going in a certain direction,
 while astar takes in account the distance to the goal, will take the points that are forward the goal.
 Points explored with Dijksta algorithm
 ![Points explored by dijkstra](img/dijkstra_plan.png)
  Points explored with AStar algorithm
 ![Points explored by astar](img/astar_plan.png)

 ### Images
 #### Challenge 1,2:
 Challenge 1 being completed, image from rviz
 ![challenge 1 in rviz](img/challenge1_rviz.png)
 Challenge 2 being completed, image from gazebo
 ![challenge 2 in gazebo](img/challenge2_gazebo.png)
 Challenge 2 being completed, image from rviz
 ![challenge 2 in rviz](img/challenge2_rviz.png)
 #### Challenge 3:
 Challenge 3 being completed, image from gazebo
 ![challenge 3 in gazebo](img/challenge3_gazebo.png)
 Challenge 3 being completed, image from rviz
 ![challenge 3 in rviz](img/challenge3_rviz.png)


text:
**Tear in My Heart双手简谱** 和五线谱完全对应。

_Tear in My Heart_ 是哥伦布俄亥俄州组合Twenty One Pilots演唱的一首歌曲，首周已打入Billboard Hot
100（公告牌百强单曲榜）。乐队成立于2009年，乐队由Tyler Joseph和Josh Dun组成。21号飞行员于2012年签Fueled by
Ramen。于2009年12月29日推出自己发行的同名专辑《Twenty One Pilots》。2011年再次自己发行专辑《Regional at
Best》。由 Fueled by Ramen唱片公司发行的新专辑《Vessel》于2013年发行。

歌词下方是 _Tear in My Heart钢琴谱_ ，希望大家喜欢。

### Tear in My Heart歌词：

An-nyŏng-ha-se-yo

Sometimes you've got to bleed to know,
That you're alive and have a soul,
But it takes someone to come around to show you how.

She's the tear in my heart, I'm alive,
She's the tear in my heart, I'm on fire,
She's the tear in my heart, Take me higher,
Than I've ever been.

The songs on the radio are ok,
But my taste in music is your face,
And it takes a song to come around to show you how.

She's the tear in my heart, I'm alive,
She's the tear in my heart, I'm on fire,
She's the tear in my heart, Take me higher,
Than I've ever been.

Than I've ever been
Than I've ever been
Than I've ever been

You fell asleep in my car, I drove the whole time,
But that's ok, I'll just avoid the holes so you sleep fine,
I'm driving here I sit, cursing my government,
For not using my taxes to fill holes with more cement.

You fell asleep in my car, I drove the whole time,
But that's ok, I'll just avoid the holes so you sleep fine,
I'm driving here I sit, cursing my government,
For not using my taxes to fill holes with more cement.

Sometimes you've got to bleed to know,
That you're alive and have a soul,
But it takes someone to come around to show you how.

She's the tear in my heart, I'm alive,
She's the tear in my heart, I'm on fire,
She's the tear in my heart, Take me higher,
Than I've ever been.

url: https://raw.githubusercontent.com/Emptyspirit/everyonepiano-music-database/fb8ba03dd9474f049b18d9822c40a395229b7aca/流行/Tear in My Heart-Twenty One Pilots/README.md


text:
# pdf-hsm-signature
A simple pdf signing module using an HSM.

The pdf-hsm-signature project is being developed to be used by the CLCERT Random Beacon to sign the every minute generated PDF documents. It contains two implementations (using Python and Java) of scripts used to sign and verify PDF documents using a Hardware Security Module (HSM).

## Python Implementation

The first implementation was written in Python 3 using the endesive library to handle, sign and verify the signature of PDF documents. This library depends on as1ncrypto to make cryptographical operations.

[Here]() you will find a step by step tutorial to sign and verify a PDF using an HSM using the Python implementation.

## Java Implementation

The second implementation was written in Java using the Apache PDFBox to sign and verify the PDF documents and the Bouncy Castle Crypto API to make the cryptographical operations.

[Here]() you will find a step by step tutorial to sign and verify a PDF using an HSM using the Java implementation.

repository: gonzalejandro/pdf-hsm-signature

gha_language: Python

repo_name: gonzalejandro/pdf-hsm-signature


text:
PAHDI
===========

PAHDI (PHP Advanced HTML DOM Implementation) is a library that provides an advanced implementation of the Document Object Model in PHP starting from HTML code.

It follows W3C standards and some browser-specific methods.

It can parse an HTML file or a string and create the resulting DOM structure with the same methods available in the browsers with JavaScript.

Usage
-----

Parse an HTML string:

```php
//Include the class
require_once "PAHDI/src/PAHDI.php";

//Parse the HTML code
$document = PAHDI::parseString("<div id='test' class='foo'></div>");

//Get an element by id
$div = $document->getElementById("test");

//Print element's class name
echo $div->className;  //foo

```

Parse a remote HTML page:

```php
//Include the class
require_once "PAHDI/src/PAHDI.php";

//Parse the HTML code
$document = PAHDI::parseRemoteSource("http://www.urlToParse.com");

```

Parse a local HTML file:

```php
//Include the class
require_once "PAHDI/src/PAHDI.php";

//Parse the HTML code
$document = PAHDI::parseLocalSource("path/to/file.html");

```

Main differences from JavaScript
-------
For performance reasons there are some differences with JavaScript DOM implementation, the most notable are:

* HTMLCollection and NodeList instances are not "live"
* Elements style values are not validated
* Elements tag names are always lowercased

Licensed under BSD license.


text:
# check.js
Small JavaScript testing library (~1.5kb minified), ES3 compliant

```javascript
// create new test suite instance

var tests = check.suite('Test suite #1');

// add test(s)

tests('Test 1: add 3 to 4', function(done, eq){
  // call done() to resolve test,
  // use eq() to check that expressions are equivalent
  done(eq(3 + 4, 7));
});

// run tests

tests.run(function(completed, total, successes){
  console.log(
    completed + 'tests completed of ' + total +
    ', ' + successes + 'successes.'
  )
});
```

## Reference documentation

### `check.suite(suiteName [, onProgress])`

Creates a new test suite with the name `suiteName`, overwrites any existing test suite with the same name. Returns a tests suite instance (see below). Provide an optional `onProgress` function (see `check.run()` below) to autorun the test suite after page load.

### `check.add(suiteName, testDescription, testFunction)`

Add a test to the suite `suiteName`. If the suite does not exist yet, it will be created. Provide a descriptive string, `testDescription`, and a function, `testFunction`, that executes the test. The test function is provided with two arguments, the function `done()` and the function `eq()`. The function `eq()` is a reference to `check.eq()`, for convenience. The function `done()` is a callback to resolve the test (see below).

### `check.run(suiteName, onProgress)`

Run all tests in the suite `suiteName`, call `onProgress()` (see below) after each test is resolved.

### `check.eq(expression1, expression2)`

Utility function for comparing expressions for equivalence, returns `true` if equivalent, `false` otherwise. Accepts objects, nested objects, arrays, nested arrays, dates, JavaScript primitive values and literal values.

```javascript
check.eq({a:1, b:2},
         {b:2, a:1});     // true
check.eq(['a'], {0:'a'})  // false, array is not equivalent to object
check.eq(+Infinity, 1/0); // true, both are positive Infinity
check.eq(null, {});       // false
check.eq(null, null);     // true
check.eq(0, '0');         // false, different types
check.eq(Number.isNaN,
         Number.isNaN);   // true, identifies NaN values
check.eq(function(){a+b},
         function(){a+b}) // true, compares functions as strings
```

### Test suite instance functionality

#### `TestSuiteInstance(testDescription, testFunction)`

Shorthand for `check.add(suiteName, testDescription, testFunction)`.

```javascript
// this code

check.add('Test suite #1', 'Test 1: add 3 to 4', function(done, eq){
  done(eq(3 + 4, 7));
});

// is equivalent to this code

var tests = check.suite('Test suite #1');
tests('Test 1: add 3 to 4', function(done, eq){
  done(eq(3 + 4, 7));
});
```

#### `TestSuiteInstance.run(onProgress)`

Shorthand for `check.run(suiteName, onProgress)`.

### The `done()` function

Each test function is provided with a callback function, `done()`, to resolve the test. If `done()` is called without any argument or with an argument of `true` or `undefined`, the test is considered a success. If called with a falsy value, the test is considered failed. If called with a string or a truthy value other than `true`, the test is considered a fail, with the provided argument converted to a string to be used as a failure message in the failure array.

### The `onProgress()` function

Each time a test is resolved (completes or fails), the `onProgress` function is called with 6 arguments:

```javascript
onProgress(
  completed, // integer of completed/resolved tests
  total,     // integer of total tests in suite
  successes, // integer of successful tests
  failures,  // array of failed tests
  pending,   // array of pending/unresolved tests
  testsArray // array of tests, each index is an array of [testDescription, testFunction]
)
```

### Running asynchronuous tests

Each test function is provided with the callback function `done()` to resolve the test. This allows for asynchronuous test functions, e.g.

```javascript
check.add('Async test suite', 'Async test #1', function(done, eq){
  setTimeout(done, 1234); // calls done() about 1234 msecs after the test is run
});
```

Note that errors thrown in async functions will not be captured by the `check` testrunner.

### Capturing errors

For synchronuous tests, the `check` testrunner captures errors and resolves the test. For asynchronuous tests, errors must be captured manually.

```javascript
check.add('Error test suite', 'Error test #1: Throw error' function(done, eq){
  throw Error('This message will show in the failure array').
});

check.add('Error test suite', 'Error test #2: Create error', function(done, eq){
  callUnexistingFunction(); // this does not exist, throws an error which will be captured
  done();
});

check.add('Error test suite', 'Error test #3: Async error', function(done, eq){
  setTimeout(function(){
    try{ // errors are not automatically captured in async tests
      callUnexistingFunction();
      done();
    }catch(err){ // catch errors manually
      done(err.message);
    }
  }, 2000);
});
```


text:
# Total Pensionable Salary for Teachers Retirement Board Members FY 2015

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/total-pensionable-salary-for-teachers-retirement-board-members-fy-2015) |
| Metadata | [Link](https://data.ct.gov/api/views/6b9p-qjxh) |
| Data: JSON | [100 Rows](https://data.ct.gov/api/views/6b9p-qjxh/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.ct.gov/api/views/6b9p-qjxh/rows.csv?max_rows=100) |
| Host | data.ct.gov |
| Id | 6b9p-qjxh |
| Name | Total Pensionable Salary for Teachers Retirement Board Members FY 2015 |
| Attribution | Connecticut Teachers Retirement Board |
| Category | Government |
| Tags | teachers, retirement, pension, salary |
| Created | 2016-09-28T15:25:00Z |
| Publication Date | 2016-09-28T15:35:02Z |

## Description

A listing of total salaries paid to all members of the Teachers Retirement Board, by town or district.

## Columns

```ls
| Included | Schema Type    | Field Name               | Name                     | Data Type | Render Type |
| ======== | ============== | ======================== | ======================== | ========= | =========== |
| Yes      | series tag     | town_number              | Town Number              | text      | number      |
| Yes      | series tag     | town_or_district         | Town or District         | text      | text        |
| Yes      | numeric metric | total_pensionable_salary | Total Pensionable Salary | money     | money       |
| Yes      | numeric metric | count_of_members         | Count of members         | number    | number      |
```

## Time Field

```ls
Value = 2015
Format & Zone = yyyy
```

## Data Commands

```ls
series e:6b9p-qjxh d:2015-01-01T00:00:00.000Z t:town_number=241 t:town_or_district=ACES m:total_pensionable_salary=21659028.77 m:count_of_members=293

series e:6b9p-qjxh d:2015-01-01T00:00:00.000Z t:town_number=307 t:town_or_district="AF BRIDGEPORT ACADEMY" m:total_pensionable_salary=1859170 m:count_of_members=36

series e:6b9p-qjxh d:2015-01-01T00:00:00.000Z t:town_number=309 t:town_or_district="AF HARTFORD ACADEMY" m:total_pensionable_salary=2641423 m:count_of_members=62
```

## Meta Commands

```ls
metric m:total_pensionable_salary p:double l:"Total Pensionable Salary" t:dataTypeName=money

metric m:count_of_members p:integer l:"Count of members" t:dataTypeName=number

entity e:6b9p-qjxh l:"Total Pensionable Salary for Teachers Retirement Board Members FY 2015" t:attribution="Connecticut Teachers Retirement Board" t:url=https://data.ct.gov/api/views/6b9p-qjxh

property e:6b9p-qjxh t:meta.view v:id=6b9p-qjxh v:category=Government v:attributionLink=http://www.ct.gov/trb v:averageRating=0 v:name="Total Pensionable Salary for Teachers Retirement Board Members FY 2015" v:attribution="Connecticut Teachers Retirement Board"

property e:6b9p-qjxh t:meta.view.license v:name="Public Domain"

property e:6b9p-qjxh t:meta.view.owner v:id=cvy9-n6sb v:screenName="Tyler Kleykamp" v:lastNotificationSeenAt=1492608796 v:displayName="Tyler Kleykamp"

property e:6b9p-qjxh t:meta.view.tableauthor v:id=cvy9-n6sb v:screenName="Tyler Kleykamp" v:roleName=administrator v:lastNotificationSeenAt=1492608796 v:displayName="Tyler Kleykamp"
```

## Top Records

```ls
| town_number | town_or_district      | total_pensionable_salary | count_of_members |
| =========== | ===================== | ======================== | ================ |
| 241         | ACES                  | 21659028.77              | 293              |
| 307         | AF BRIDGEPORT ACADEMY | 1859170.00               | 36               |
| 309         | AF HARTFORD ACADEMY   | 2641423.00               | 62               |
| 29          | AMISTAD ACADEMY       | 4334275.56               | 84               |
| 1           | ANDOVER BD OF ED      | 2142799.90               | 31               |
| 2           | ANSONIA BD OF ED      | 12465909.32              | 206              |
| 3           | ASHFORD BD OF ED      | 2841461.66               | 47               |
| 244         | ASNUNTUCK CTC         | 203125.31                | 8                |
| 4           | AVON BD OF ED         | 26227525.57              | 301              |
| 5           | BARKHAMSTED BD OF ED  | 1767181.40               | 27               |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
# Adding LALRPOP to your `Cargo.toml` file

LALRPOP works as a preprocessor that is integrated with cargo. When
LALRPOP is invoked, it will search your source directory for files
with the extension `lalrpop` and create corresponding `rs` files. So,
for example, if we have a file `calculator.lalrpop`, the preprocessor
will create a Rust file `calculator.rs`. As an aside, the syntax of
LALRPOP intentionally hews fairly close to Rust, so it should be
possible to use the Rust plugin to edit lalrpop files as well, as long
as it's not too picky (the emacs rust-mode, in particular, works just
fine).

To start, let's use `cargo new` to make a new project. We'll call it
`calculator`:

```
> cargo new --bin calculator
```

We now have to edit the generated [`calculator/Cargo.toml`][calculator-Cargo.toml]
file to invoke the LALRPOP preprocessor. The resulting file should
look something like:

[calculator-Cargo.toml]: https://github.com/lalrpop/lalrpop/blob/master/doc/calculator/Cargo.toml

```
[package]
name = "calculator"
version = "0.1.0"
authors = ["Niko Matsakis<EMAIL_ADDRESS>edition = "2021"

[build-dependencies] # <-- We added this and everything after!
lalrpop = "0.20.0"

[dependencies]
lalrpop-util = { version = "0.20.0", features = ["lexer"] }
```

Cargo can run [build scripts] as a pre-processing step,
named `build.rs` by default. The `[build-dependencies]`
section specifies the dependencies for build scripts -- in this
case, just LALRPOP.

[build scripts]: https://doc.rust-lang.org/cargo/reference/build-scripts.html

The `[dependencies]` section describes the dependencies that LALRPOP
needs at runtime. All LALRPOP parsers require at least the
`lalrpop-util` crate.

Next we have to add `build.rs` itself. For those unfamiliar with [this feature], the `build.rs` file
should be placed next to your `Cargo.toml` file and not inside the `src` folder with the rest of
your Rust code. This should just look like the following:

[this feature]: https://doc.rust-lang.org/cargo/reference/build-scripts.html

```rust
fn main() {
    lalrpop::process_root().unwrap();
}
```

The function `process_root` processes your `src` directory, converting
all `lalrpop` files into `rs` files. It is smart enough to check
timestamps and do nothing if the `rs` file is newer than the `lalrpop`
file, and to mark the generated `rs` file as read-only. It returns an
`io::Result<()>`, so the `unwrap()` call just asserts that no
file-system errors occurred.

*NOTE:* On Windows, the necessary APIs are not yet stable, so
timestamp checking is disabled.

repository: lalrpop/lalrpop

gha_language: Rust

repo_name: lalrpop/lalrpop


text:
# Backup Postgresql databases to Google Cloud Storage

This docker image uploads a pg_dump backup of a database to GCS. It's based almost entirely on the work of [Nullpixel](https://github.com/nullpixel/postgres-docker-gcs-backup).

## Usage

### Environment variables
| Variable                | Description                                                                                |
|-------------------------|----------------------------------------------------------------------------------------------------------------|
| `POSTGRES_DATABASE`     | The name of the database to backup.                                                                            |
| `POSTGRES_HOST`         | The host of the database to backup.                                                                            |
| `POSTGRES_PORT`         | The port of the database to backup.  **Default:** 5432                                                         |
| `POSTGRES_USER`         | The username of the backup user.                                                                               |
| `POSTGRES_PASSWORD`     | The password of the backup user.                                                                               |
| `POSTGRES_EXTRA_OPTS`   | Any additional options you wish to pass to `pg_dump`. **Default:** `''`                                        |
| `GCLOUD_KEYFILE_BASE64` | The GCP service account's credential file, in base64. See below for recommendations regarding this.            |
| `GCLOUD_PROJECT_ID`     | The Project ID which the bucket you wish to backup to is in.                                                   |

repository: hunter-io/docker-postgres-gcs-backup

repo_name: hunter-io/docker-postgres-gcs-backup


text:
# origami-terminator
Terminator-style key bindings for the Origami Package (Sublime Text 3)

## Usage

- Install the [Origami plugin](https://github.com/SublimeText/Origami) for Sublime Text 3.

- Open the user keybindings by: Preferences -> Package Settings -> Origami -> 'Keybindings - User'

- Copy the contents of terminator.sublime-keymap to 'Keybindings - User' and save.

- Done

repository: suprafly/origami-terminator

repo_name: suprafly/origami-terminator


text:
# File downloader

You can start downloading files by creating a cron job like this:

```
0,10,20,30,40,50 * * * * bash $PATH/script.sh > /tmp/downloader.output $SAVING_AT
```

I am running the script every 6 times in 1 hour you can create you custom cron job time by the help of this [website](https://crontab.guru/).

repository: chadidi/wget-bash

repo_name: chadidi/wget-bash


text:
# Vault AWS Module

This repo contains a module for how to deploy a [Vault](https://www.vaultproject.io/) cluster on [AWS](https://aws.amazon.com/) using [Terraform](https://www.terraform.io/). It follows the patterns laid out in the [Vault Reference Architecture](https://learn.hashicorp.com/vault/operations/ops-reference-architecture) and the [Vault Deployment Guide](https://www.vaultproject.io/guides/operations/deployment-guide.html).

## Contents

* A Terraform module to install Vault into AWS.
* A packer directory containing the packer code to build Vault and Consul AMIs
* The module can be used with the Packer built AMIs or user data to configure up to the standard listed in the [Deployment Guide](https://www.vaultproject.io/guides/operations/deployment-guide.html).

This module is specifically designed to deliver the [Reference Architecture](https://learn.hashicorp.com/vault/operations/ops-reference-architecture) and as such adheres to that pattern. This means that it has these specifics that are not configurable:
* A Vault cluster using TLS
* A Consul cluster using TLS
* The Vault cluster is backed by a Consul cluster for storage
* The Vault cluster is intended to be deployed into a _private_ subnet(s)
* The security groups attached to the Vault and Consul cluster members are non-configurable and allow for full functionality (see below)

The module has these specifics that are configurable:
* The Vault cluster can be set up as _n_ standalone instances or inside an ASG depending on your preference.
* The Vault cluster can be fronted by an _internal_ or _external_ ELB or not, depending on your preference.
* The number of Vault nodes can be configured, though 3 is the default and recommended number
* The Consul cluster can be set up as _n_ standalone instances or inside an ASG depending on your preference.
* The number of Consul nodes can be configured though 5 is the default, 5 as per the recommended architecture.
* The recommended architecture suggests that the 3 Vault nodes be spread across 3 separate availability zones, but this module will take fewer than that.
* While this module manages the security groups to allow for the correct function of the cluster, it is possible to add further security groups to the instances if other connectivity is desired.
* The module can be set to install and configure Vault and Consul via user data or this can be turned off.
* The module contains packer scripts to build Vault and Consul AMIs as per the deployment guide if required so that you have the option of using user data, using the module AMI or building your own AMI.
* The Vault cluster can be set up to use AWS KMS key for auto unseal (something that is recommended if using an ASG)

## Versions
This module is written for Terraform 11.10 and has been tested with this version only.
This module has been tested with Ubuntu 18.04 and Centos 7.x OS
This has been tested with Vault 1.x
This has been tested with Consul 1.3.x, 1.4.x, and 1.5.x.

## Setup
This module is to deliver a Vault cluster on Linux with systemd on AWS and assumes you already have a VPC in place with subnets for public and private facing hosts as well as the security groups to allow communication between them for management.

## Usage
```hcl
module vault_cluster {

  # This source should be the tag for this module if pulling from git or the public terraform module registry
  source                 = "../terraform-aws-vault/vault-cluster"

  cluster_name       = "${var.cluster_name}"
  vault_ami_id       = "${var.vault_ami_id}"
  consul_ami_id      = "${var.consul_ami_id}"

  # Change the referenced module name here to match yours or to pull from an existing remote state store
  private_subnets    = "${module.vpc.private_subnets}"
  public_subnets     = "${module.vpc.public_subnets}"
  vpc_id             = "${module.vpc.vpc_id}"

  use_asg            = false
  use_elb            = false
  internal_elb       = false
  use_auto_unseal    = true
  availability_zones = "${var.availability_zones}"
  aws_region         = "${var.global_region}"
  vault_cluster_size = 3
  consul_cluster_size = 5
  use_userdata      = true

  # Use vault_binary if you want to supply the file from an S3 bucket, else use the version number to download it
  # vault_binary    = "vault.zip"
  vault_version     = "1.2.1"
  consul_version    = "1.4.5"
}
```
## Variables
### Required Input Variables
* cluster_name        - name of your cluster
* vault_ami_id        - The AMI id for the Vault cluster server instances. This can be the same as the consul_ami_id if you are using the user data install method.
* consul_ami_id       - The AMI id for the Consul cluster server instances
* instance_type       - The AWS instance type you wish for the Vault and Consul servers
* ssh_key_name        - The AWS key-pair name to use for the instances
* private_subnets     - a list of the private subnets the cluster will be installed to.
* public_subnets      - a list of the public subnets the ELB will be installed to.
* availability_zones  - The availability zones that the cluster will be installed in. This should match up with the private_subnets list so that there is at least 1 subnet in each AZ.
* vpc_id              - The AWS VPC id
* aws_region          - The region the Vault cluster will be deployed in

### Optional Input Variables
These are listed below with their defined defaults. If you wish to change the variable value then define it in the code block for the module. see the `variables.tf` file for descriptions.

#### Cluster behaviour
* use_asg (false)
* use_elb (false)
* use_userdata (false)
* use_auto_unseal (false)
* internal_elb (true)
* vault_cluster_size (3)
* consul_cluster_size (5)
* consul_cluster_tag (My_consul_cluster)
* vault_cluster_tag (My_vault_cluster)
* consul_storage_tag_key (CONSUL_STORAGE_CLUSTER_TAG)
* additional_sg_ids ([])

#### ASG Variables
* health_check_grace_period (300)
* wait_for_capacity_timeout (10m)
* enabled_metrics ([])
* termination_policies (Default)

#### ELB Variables
* cross_zone_load_balancing (true)
* idle_timeout (60)
* connection_draining (true)
* connection_draining_timeout (300)
* lb_port (8200)
* vault_api_port (8200)
* health_check_protocol (HTTPS)
* health_check_path (/v1/sys/health)
* health_check_interval (15)
* health_check_healthy_threshold (2)
* health_check_unhealthy_threshold (2)
* health_check_timeout (5)

#### Userdata Variables
* vault_binary ("")
* vault_version ("")
* consul_version ("")
* consul_binary ("")

#### KMS Variables
* kms_deletion_days (7)
* kms_key_rotate (false)

### Output Variables
* vault_cluster_instance_ids - The instance IDs for the Vault instances.
* vault_cluster_instance_ips - The instance IPs for the Vault instances.
* consul_cluster_instance_ids - The instance IDs for the Consul instances.
* consul_cluster_instance_ips - The instance IPs for the Consul instances.
* elb_dns - the DNS name for the internal ELB
* cluster_server_role - The role name for the IAM role assigned to the cluster instances for use with attaching policies.

## Infrastructure Options
This module will install Vault as `$var.vault_cluster_size` individual instances or as `$var.vault_cluster_size` instances inside an ASG
This behaviour is controlled by the use of a boolean variable `use_asg`
The default is false
```hcl
  /* This variable is a boolean that determines whether the Vault cluster is
  provisioned inside an ASG. */

  use_asg           = false
```
This module will install Vault with or without an _internal_ ELB/
This behaviour is controlled by the use of a boolean variable `use_elb`
The default is false
```hcl
  /* This variable is a boolean that determines whether the Vault cluster is
  provisioned behind an ELB */

  use_elb           = false
```
If an ELB is used then you have the option for this to be an internal (recommended) or external by use of the internal_elb variable.

```hcl
/* this variable is a boolean that determines if the ELB is internal or
 external. If use_elb is set to false then it will have no effect*/

internal_elb = false
```

## Use of awskms autounseal
This module will configure and deploy a AWS KMS key and set the cluster to use this for auto unsealing. This behaviour is controlled by the use of a boolean variable `use_auto_unseal` The default is false
```hcl
/* This variable controls the creation of a KMS key for use with awskms
seal operations */

use_auto_unseal   = false
```
## User Data Install

If the `use_userdata` variable is set to `false` then no post install user data configuration will take place and it is assumed that the cluster configuration will be done via some other method. This module also provides Packer scripts to perform this. See below *Packer Install*

If the `use_userdata` variable is set to `true` then the user data scripts will be used and the user data install files must be set up prior to deployment. The steps for doing this are below.

```hcl
  /* User Data. This sets up the configuration of the cluster.
  If use use_userdata variable is set to false then none of these need be
  configured as they will not be used and they are set to default variables in
  the module variables.tf.  */

  vault_binary        = "s3://my_install_bucket/vault.zip"
  consul_version      = "1.3.1"
  consul_cluster_size = 5
```
This user data install will install Vault and Consul binaries either from the S3 location or download them directly from the [hashicorp releases](https://releases.hashicorp.com/) page.
This behaviour is controlled by the use of the [vault|consul] version and bin variables.
```hcl
  # This will mean the install will look for the Vault binary in the S3 bucket
  vault_binary      = "s3://my_install_bucket/vault.zip"
  # This will mean the install will download the release from releases page
  vault_version  = "1.0.1"
  # This will mean the install will look for the Consul binary in the S3 bucket
  consul_bin     = "s3://my_install_bucket/consul.zip"
  # This will mean the install will download the release from releases page
  consul_version = "1.3.1"
```
You should use either the *binary* or the *version* for each application. If you put in both, the install  will only look in the S3 bucket.
You can have the behaviour different for each application if you wish.

## Packer Install
The packer directory contains 2 packer configurations - one to install the Vault nodes and one to install the Consul nodes. This will give you 2 AMIs that can be used in the module as:
```hcl
vault_ami_id           = "${var.vault_ami_id}"
consul_ami_id          = "${var.consul_ami_id}"
```
If you pre-build the AMIs via this method then you should also set the use_userdata variable to false so that the Vault and Consul installs are not overwritten.

```
use_userdata = false
```

## Final Configuration
If the cluster has been configured either by the user data or Packer method from this module then there is one final step that is required to complete the configuration as per the deployment guide. This final step cannot (and arguably should not) be completed at the Terraform deployment stage and so a directory called 'config' in the examples directory contains the scripts to perform this.

This directory contains configuration scripts which update the base Consul installation to meet more stringent security and operational requirements that are typically seen in production environments.

The vision for this section of the repository is to house the most popular tools for configuration management such as Ansible, Chef, Puppet and Salt. As a baseline that should work in most environments, Bash scripts are provided.

repository: shizman/terraform-aws-vault

repo_name: shizman/terraform-aws-vault


text:
# monk

![https://thenounproject.com/term/monk/583034/](https://d30y9cdsu7xlg0.cloudfront.net/png/583034-200.png)

A wise peer-to-peer network, versatile tool for network management.
Feel the freedom of not having to think about the delivery of your data.

## Installing

~~TODO: add this to hpm repo!~~ Awaiting hpm rewrite (will it happen?)

Installer (uses github):

```
pastebin run dpTDJfcV
```

## Commands

- `man monk`: Probably opens this README.md, idk

### Service (rc.lua)

- `rc monk start`: I wonder what that does?
- `rc monk stop`: Read some linux manuals I guess
- `rc monk enable`: Or try `man rc` if you know what I mean
- `rc monk disable`: Now to the interesting commands
- `rc monk restart`: Quality of life, `stop` and `start` in sequence
- `rc monk reload`: Quality of life, reloads config without restart, for busy servers
- `rc monk status`: AdVaNcEd, check for service stats and status

### Executable

- `monk configurator`: Launch the configurator. Good place to start after installing
- `monk config <variable> [value]`: Read/write config. Preferred over direct file editing
- `monk register-rc`: Register service in rc, also can be done in `configurator`
- `monk generate-config`: Write default config to `monk.cfg.example`

## Config

**NOTE**: `monk config` is preferred over direct editing of main config

| Config   | Location                   | Description
| -------- | -------------------------- | ---
| Main     | `/etc/monk/monk.cfg`       | `rc.d` config and more
| Protocol | `/etc/monk/protocol/?.cfg` | Replace `?` with protocol name

## Events

- `monk_general(header: table, payload: string)`: General messages.
  Event for messages on port `500` ([Ports](#ports)).
  The `header` is left untouched, but `payload` is

- `monk_service(event: string, options: any)`: Service events. Possible events:
  - `start`: Service started! Hooray!
  - `stop`: Service stopped, dependents may stop themselves
  - `online`: Just connected to a network, `options: string` name of network
  - `offline`: Just lost connection, `options: string` name of network

## Protocols

| Name                  | Version | Description
| --------------------- | ------: | ---
| [mIP](doc/mIP.md)     |       1 | Routing, fragmentation
| [mTCP](doc/mTCP.md)   |       1 | Streams, delivery check
| [mBCP](doc/mBCP.md)   |       1 | Backwards compatibility
| [mLCB](doc/mLCB.md)   |       1 | Link card for long bridges
| [mRWB](doc/mRWB.md)   |       1 | Link over Internet (capital I)

## Quick FAQ

- Q: Does this all even work?\
  A: I sure hope so
- Q: Is this your first time doing something like this?\
  A: First time doing such a big project, on lua too
- Q: Does this project scare you?\
  A: A bit
- Q: How did this project start?\
  A: Well, I woke up this morning... Then there was a ~~hole~~ project
- Q: Is this FAQ here just for jokes?\
  A: Mostly
- Q: Can you fit more jokes here?\
  A: Apparently no

## Network

Those are the only strictly reserved ports, `monk` can be used on any port.

###


text:
# MobileTogether-TTS
Text-to-speech example solutions built with MobileTogether

These solutions are described in the Altova blog post titled Text to Speech for Mobile Apps available at https://blog.altova.com/text-to-speech-for-mobile-apps

You can download the free-to-use MobileTogether Designer at  http://www.altova.com/download/mobiletogether-designer.html

Open the either .mtd file in the MobileTogether Designer to examine how it was built and execute it in the MobileTogether Simulator.

The MobileTogether Simulator will execute text-to-speech functionality.

Download the MobileTogether Mobile App for your device at the app store and connect to the MobileTogether Demo Server to run more demo apps.

Once the MobileTogether Mobile App is installed, you can also run the text-to-speech apps on your mobile device by using MobileTogether Designer as a server.

Altova MobileTogether is a cross-platform mobile development framework for building data-centric apps. MobileTogether allows you to build one solution for all platforms -- in record time -- and deliver it to end users on their devices of choice.

repository: altova/MobileTogether-TTS

repo_name: altova/MobileTogether-TTS


text:
# cp4s-configuration

This repo contains files and configuration information used in conjunction with IBM Cloud Pak for Security.

Full documenation for the Cloud Pak is available [here](https://www.ibm.com/docs/en/cloud-paks/cp-security)

## Resize PVCs

The YAML files provided in this folder should be used when expanding the PVC size as documented in IBM Cloud Pak for Security administration tasks. These procedures are only applicable where the storage class used does not support `volumeExpansion`

Licensed under [Apache 2.0 License](https://github.com/cp4sec/cp4s-configuration/blob/main/LICENSE)


text:
---
permalink: /csc_466_2020_winter/schedule/
title: "CSC 466 Winter 2020 Schedule"
excerpt: "Anderson Data Science Research Lab."
---

{% include base_path %}

# Table of contents
1. [Syllabus](/csc_466_2020_winter/)
2. [Schedule](/csc_466_2020_winter/schedule/)
3. [Technology](/csc_466_2020_winter/technology/)
4. [Project](/csc_466_2020_winter/project/)

# Schedule
Below is our tentative schedule. It is subject to change, but any changes will be reflected here.

## Important Dates
* January 6 (Monday) - Classes begin
* January 20 (Monday) - Martin Luther King, Jr.'s birthday observed (no class)
* January 21 (Tuesday) - Classes follow a Monday schedule (I assume this means no class for us)
* March 13 (Friday) - Last day of classes
* March 16-20 (Monday - Friday) - Final exams

## Week 1 (1/7 and 1/9)
About Me

Go over Syllabus

Icebreaker

Chapter 1 (Intro) and Chapter 2 (Preliminaries)

Bayesian Classification Slides

[Lab 1 - Python, NumPy, and Pandas](https://classroom.github.com/a/efsRItDZ)

## Week 2 (1/14 and 1/16)
Bayesian Classifier Slides

Week 2 - Chapter 12 - Learning with Trees

Lab 2 - Bayesian Classifier and Report

## Week 3 (1/23)
No class on Tuesday

Chapter 13 - Decision by Committee

Lab 3 - Decision Tree

## Week 4 (1/28 and 1/30)
Chpater 13 - Decision by Committee

Gradient Boosting Slides

Lab 3 - Decision Tree and Report

## Week 5 (2/4 and 2/6)
Chapter 13 - Decision by Committee

Thursday 2/6 - Exam 1

## Week 6 (2/11 and 2/13)
Chapter 14 - Unsupervised Learning - Kmeans (supplemented by Hierarchical clustering notes)
* Priority sections: 14.1.1 (skip 14.1.2 and 14.1.3 and 14.1.4) and 14.1.5
* Optional: The rest of the chapter requires an intro to neural networks

Clustering Slides

Clustering Worksheet
* More on UPGMA

Lab 4 - Choosing an algorithm and answering questions

## Week 7 (2/18 and 2/20)
Assignment of project

Chapter 6 - Dimensionality reduction

PCA Notes

PCA Worksheet

No official class on Thursday (Out of town)

## Week 8 (2/25 and 2/27)
Collaborative Filtering

Lab 5 - Clustering and its uses

## Week 9 (3/3 and 3/5)
Graph Algorithms (https://learning.oreilly.com/library/view/graph-algorithms/9781492047674/)

In class activity

Lab 6 - Collaborative Filtering and Report

## Week 10 (3/10 and 3/12)
PageRank

Lab 7 - Graph Algorithms and Page Rank and Report

Lab 8 - Ethics of KDD sourced opinion column (Examples)
* This lab is worth 10 points.
* Write a 1-2 report on an issue related to the use or misuse of KDD methods.
* You may state your opinion, but your opinions should be supported by logic which should be supported by sources.
* You must have at least three distinct sources (just put the links to them at the end and they don't count in terms of pages :)

Thursday 3/12 - Exam 2

# Other
Useful material not covered directly above.
* Neural Network Hacking Recipe


text:
---
title: Ghost CMS with Gatsby JAMstack
id: jamstack-ghostgatsby
---

This tutorial will guide you through the process of deploying and hosting a [Ghost CMS](https://ghost.org/) with [Gatsby](https://www.gatsbyjs.org/) front-end using the serverless approach.

## What We're Building

By the end of the tutorial, you will have deployed into your AWS account:
* An AWS Fargate ECS cluster, service, and [Docker Task](api/nodes/DockerTask.md) for the Ghost CMS
* An AWS ELB application load balancer in front of the Ghost CMS service
* An AWS Aurora MySql Serverless [Database](api/nodes/Database.md) behind the Ghost CMS service
* An AWS CodeBuild Project for Gatsby as a [Website Builder](api/nodes/Website.md)
* The Amazon S3 Bucket for Gatsby content to serve as a CDN origin [Object Store](api/nodes/ObjectStore.md)
* An Amazon CloudFront distribution that delivers your static web content to users quickly and securely as a [CDN](api/nodes/CDN.md)
* A Lambda [EdgeFunction](api/nodes/EdgeFunction.md) to assert secure headers in requests to CloudFront

You can deploy the whole infrastructure in minutes, resulting in a fully functional CMS-sourced static site available through a CDN. Modest template additions for a custom domain and ssl certificates are missing but otherwise this architecture suitable for real workloads.

> __These are intricate stacks and more than the hello world template. Meaningful AWS fees may apply. We suggest deploying them for an hour to have fun with the possibilities of the Serverless JAMstack, but don't forget to delete the CloudFormation stack before considering the long-term costs with https://calculator.aws__
>
> The brilliant thing about this architecture is that the expensive Ghost infrastructure is only necessary when you're editing or building content. Once a build is delivered to the CDN, Ghost could be shut down.

### Ghost CMS Architecture

Feel free to play around:

This stack provides the Ghost CMS web client and API through an Elastic Load Balancer. It's a heavyweight stack by serverless tutorial standards, providing a load-balanced container service and MySQL cluster. Because we're using AWS managed services, AWS SAM, and CloudFormation, everything can be replicated as infrastructure-as-code and there are zero servers to manage.

### Gatsby Front-end Architecture

## Setup

### Project Repository

The following repository is referenced throughout this tutorial:

- Gatsby Starter - Ghost, with AWS SAM templates

### Requirements and Assumptions

The following software is used in this tutorial:

- You'll want to consider installing the Gatsby CLI for local development but you can deploy a functional blog without it
- [Sign up](https://app.stackery.io/sign-up) for a Stackery account if you haven't already. This guide assumes an environment named 'development' linked to an AWS account of your choosing
- This guide will create AWS infrastructure in your default VPC and default ECS Fargate cluster, etc.

#### Deploy Quick Start

You can deploy each example stack into your own AWS account using these three Stackery CLI commands:

`stackery create` will initialize a new repo in your GitHub account, initializing it with the contents of the referenced blueprint repository.

```text
stackery create --stack-name 'jamstack-ghost' \
--git-provider 'github' \
--blueprint-git-url 'https://github.com/ryanycoleman/gatsby-starter-ghost'
```

`stackery deploy` will deploy the newly created stack into your AWS account.

```text
stackery deploy --stack-name 'jamstack-ghost' \
--env-name 'development' \
--git-ref 'master'
```

Once this stack is deployed, you'll need to retrieve a few pieces of data from the AWS Console and provide them as [Stackery Environment parameter data](https://docs.stackery.io/docs/using-stackery/environments/) which will be used by the following Gatsby stack.

First, identify the Elastic Load Balancer address in the AWS Console for EC2. It'll look like `http://ghostapilb-#number.#region.elb.amazonaws.com/`.

You'll then setup your Ghost CMS via that URL /ghost but note that because this stack isn't configured with a custom domain, the ELB is not protecting your data over SSL. Use throwaway information for this step or refactor the SAM template to use a custom domain and SSL certificate.

Once you've signed up for the admin account, navigate to '/ghost/#/settings/integrations'. Here you'll add a custom integration named Gatsby. You'll want to retrieve the 'Content API Key' and 'API URL' which you'll use to create environment data similar to the following example.

```code
{
"ghostApiUrl": "API URL Here",
"ghostContentApiKey": "Content API Key Here"
}
```

Once saved into your Stackery environment, you can create and deploy the Gatsby stack.

```text
stackery create --stack-name 'jamstack-ghost' \
--git-provider 'github' \
--blueprint-git-url 'https://github.com/ryanycoleman/gatsby-starter-ghost'
```

`stackery deploy` will deploy the newly created stack into your AWS account.

```text
stackery deploy --stack-name 'jamstack-ghost' \
--env-name 'development' \
--git-ref 'master'
```

The Website Builder resource in this stack will connect the Gatsby static site generator to the Ghost CMS, source content from it, and deliver that built content to an S3 bucket which serves as a CloudFront origin. That's it! You're all done. At this point you can edit/add content in Ghost CMS, log into CodeBuild and re-run the stack-provisioned job to rebuild your site. Future revisions of this stack could include a webhook to automatically rebuild Gatsby when Ghost changes.

repository: stackery/gatsby-starter-ghost

gha_language: JavaScript

repo_name: stackery/gatsby-starter-ghost


text:
# hidePrints

Hides print to console called by any function using `with` statement.

## Example

```python
from bsmLib import hidePrints

with hidePrints():
    x = 1
    print("Hello") # Won't print

# Will print
print(x)
print("Good Bye")
```

repository: BSMRKRS/bsmLib

repo_name: BSMRKRS/bsmLib


text:
# Nuvoton OpenOCD Guide #

[OpenOCD-Nuvoton.zip](https://github.com/Cascoda/cascoda-sdk-priv/files/3596028/OpenOCD-Nuvoton.zip)

This archive contains all the necessary files for running Nuvoton's OpenOCD
build on 32- and 64-bit Windows machine. Unfortunately, GitHub does not allow
the upload of 7z files, so I have doubly-compressed it as a .zip file to work
around this.

## Note on flashing ##

Unfortunately, flashing through the OpenOCD GDB server is not possible: you
**must not run any GDB `load` commands**! Attempting to do so puts OpenOCD in
an invalid state that is difficult to recover from, and may flash the chip with
corrupted data. If you have used a `load` command, you may need to change the
port that OpenOCD runs on, as detailed below.

Instead, we recommend flashing your binaries using [the Nuvoton ICP Programming
Tool](https://www.nuvoton.com/tool-and-software/software-development-tool/programmer/)
before starting the GDB server.

## How to start the GDB server ##

After you have extracted the contents of the archive, open a shell in the
`src/` directory within the extracted folder. Then, execute the following
command:

```
./openocd.exe -f ../tcl/interface/nulink.cfg -f ../tcl/target/numicroM23.cfg -c "gdb_port 3335"
```

This guide assumes you are using the MinGW Bash shell - the syntax for running
`openocd.exe` may be different for Powershell or the Windows command line.

The first two arguments configure OpenOCD to use the NuLink debugger, and to
debug a Nuvoton M23 CPU, respectively. The final arguments sets the port that
the GDB server will run on. There is nothing special about the number 3335, and
the default port number is 3333 (selected when you delete `-c "gdb_port 3335"`
from the invocation). This argument has been added because ports may fail to be
released by OpenOCD in the event of a crash (such as when attempting to flash a
binary through GDB).

If you have just flashed a binary using the NuMicro ICP Programming Tool, you
must disconnect from the NuLink, or OpenOCD will not be able to use the
hardware.

## How to start the GDB client ##

First, you must start the platform-specific Gnu debugger. We recommend doing
this within the build directory, for easy access to object files.

```
$ arm-none-eabi-gdb
```

Then, you must connect to the GDB server:

```
(gdb) target extended-remote localhost:3335
```

The port that the client connects to (port 3335 in this example) must match the
port that the server is running on. This command assumes that the GDB client is
running on the same machine. If the server is running on a different machine,
you must replace `localhost` with the local IP address of that machine.

## OpenOCD specific commands ##

The main command you need to know is `monitor reset halt`. This resets the
microcontroller and halts the CPU within the reset handler.
- Note that `monitor reset` does not actually halt the microcontroller, which
  is what the Segger GDB server would do. It can then be halted with `monitor
halt`.

You can see the other available commands by using `monitor help`. There is some
overlap in the commands presented by the server (accessed through `monitor`)
and native GDB instructions. We recommend using the corresponding GDB command
if both are available.

You must give GDB access to the debugging symbols corresponding to the flashed
binary in order to use GDB to its full extent. You can do this with the `file`
command. For instance, if you flashed your Chili with `sed-standalone.bin`, you
would run: ``` (gdb) file bin/sed-standalone ```

repository: CiaranWoodward/cascoda-sdk

repo_name: CiaranWoodward/cascoda-sdk


text:
---
type: legal
---

# Frequently Asked Questions

## What is API Platform Con and which audience is it targeting?

The API Platform Conference offers a 2-days digest of the latest trends and best practices of [API Platform’s](https://api-platform.com/) ecosystem. This conference brings together innovative companies, project leaders and highly skilled developers. Large topics will be discussed in English but also in French: APIs, PHP, Symfony, JavaScript, Svelte, Docker... If you are a developer, a CTO or decision-maker specialized in one of these technologies: this event is made for you!

## Where does the event take place and how do we get there?

The API Platform Conference takes place in [Lille](https://en.lilletourism.com/), meeting point of big European cities and touristic capital of the Flemish region. The conferences are held in [Euratechnologies](https://www.euratechnologies.com/), the 1st startup incubator and accelerator in Europe. All conferences will be streamed online.

## Can you help me find a place to stay?

Rooms have been pre-booked and negotiated in Lille to a special price. [Take a look](https://all.accor.com/lien_externe.svlt?goto=rech_resa&destination=0802,0918,3165,5240&sourceid=TICOOP&dayIn=21&monthIn=09&yearIn=2023&nightNb=1&preferredCode=TICOOP&merchantid=par-accorFR) and book them asap (we recommend to use Google Chrome on a private browsing to do so). The **Offre spéciale** mention should appear on each hotel, contact us if it’s not the case.

## Is there a Code of Conduct?

The API Platform Conference is dedicated to providing **an inclusive experience for everyone**. Take a look at our [Code of Conduct page](/con/2023/code-of-conduct/).

## Is there a Nursing room at the event?

If you need to pump milk, there will be a room reserved for you with a refrigerator. If you want to bring your baby and you are breastfeeding, please contact [Cécile](mailto:cecile@les-tilleuls.coop), and she will ensure that you are welcomed with the best conditions.

## What is the refund policy?

Tickets **are non refundable**. Tickets will only be refunded if Les-Tilleuls.coop cancels the event. However, you can transfer your ticket by your own: please reach<EMAIL_ADDRESS>once you've found a buyer so that she can change the name on the badge.

## Can I access to a car park?

Once you’re arrived in Lille, we invite you to use public transport. You will find all travel information on how to get to the event [on this link](#venue).

The nearest metro station is Canteleu, located at 10min walking distance from the event. Lille is also a bike-friendly city and has a bike-sharing station in front of the main track. There are, however, paid car parks nearby but in limited numbers.

## Is the on-site event accessible to people with reduced mobility?

Yes: the main entrance, all conference rooms, the exhibitors village and toilets are accessible to people with reduced mobility. You need a special arrangement? Email<EMAIL_ADDRESS>and she will come back to you asap.

## I haven’t received the access to the online conference, how do I get it?

Your invitation with your personal access will be sent a couple of hours before the D-day. If you didn’t receive anything, check your spam or trash for an email from<EMAIL_ADDRESS>If you still do not find it, email us<EMAIL_ADDRESS>with your order email or order ID and we will get it to you as soon as possible.

## When does the event start?

The doors will open on **September 21 at 08:15 AM** and the opening keynote will start at 09:10 AM. After presenting a piece of ID at the reception desk, you will receive your access badge.

## How do I buy my ticket? Can I buy it at the registration desk?

You can buy your ticket on [our website](#pricing). You can also buy tickets at our registration desk.

## Can I join and leave the event at any time?

Your badge allows you to enter and exit the venue as you wish.

## Is there a special price?

The API Platform Conference, whether it is the in-person or online edition, is **free for students or unemployed developers**. Contact us at<EMAIL_ADDRESS>to get your voucher (a proof of school attendance will be asked).

## Can I get lunch at the venue?

The on-site edition of the API Platform Conference gives you access to **coffee and vegetarian lunch breaks** provided by our caterer. Otherwise, several restaurants and food trucks are surrounding the area.

## Is there wifi?

A wifi connection will be provided by Euratechnologies. Logins will be indicated on your badge.

## Can I leave my belongings in a cloakroom?

There will be **a cloakroom** available at the venue. Les-Tilleuls.coop declines all responsibility for loss or theft.

## Do I have a guaranteed seat?

**Seats are not allocated**: we advise you to be present a few minutes before the launch of each conference.

## Can I ask questions at speakers?

During the last minutes of each conference, it would be possible to **question the speakers**.

## Am I allowed to take pictures of the conference?

You can take pictures of the venue and of the conferences, just **be careful to not disturb the speakers during their talk** and do not insist on taking pictures of the participants. Note that you are likely to be photographed and to appear on our communication media.

## How can I share the event through social media?

Use the hashtag **#ApiPlatformCon** and don’t forget to mention [@apiPlatform](https://twitter.com/ApiPlatform)!

## Can I distribute flyers?

Unless you are a partner of the event, **it is forbidden to distribute anything to the participants** without the prior authorisation of the organisers.

repository: api-platform/website

gha_language: TypeScript

repo_name: api-platform/website


text:
# Lecture #1: Introduction to Simulations & Bash

In this repository

```
Lecture/
Reading/
HW/
```

# HW Assignment #1

~Submit HW by Jan 15th, 9:30 AM (Before next class period)~

```
1.) Create a bash script that accomplishes the following tasks:

For a number n which ranges from 1 to 100 perform the following conditional actions:

- If n is odd, print "Odd"
- If n is even and in the inclusive range of 5 to 9, print "Even and Blue"
- If n is even and in the inclusive range of 10 to 20, print "Even and Red"
- If n is even and greater than 60 print "Potato"

In the same script, you will also print all odd numbers to a file called "yourname_odd.txt", and all even numbers to a  file called "yourname_even.txt"

2.) Make the script executable, run your script, and direct the output to a file titled "yourname.txt"

3.) Upload all three text files to github, as well as your script which should be titled "yourname.sh"
```

gha_language: Jupyter Notebook


text:
# PyAono [![Build Status](https://travis-ci.org/OpenMined/PyAono.svg?branch=master)](https://travis-ci.org/OpenMined/PyAono)

❗
This library has been deprecated due to changes in strategy and roadmap. To actively contribute based on our current roadmap, checkout [OpenMined](https://github.com/OpenMined/OpenMined), [PySyft](https://github.com/OpenMined/PySyft), or [join our slack](https://openmined.slack.com/messages/team_pysyft)
---

A Python implementation of the homomorphic encryption scheme by Yoshinori Aono et al.

This scheme was first introduced in the paper - "Fast and Secure Linear Regression and Biometric Authentication with Security Update" by Yoshinori Aono et al. A really unique feature supported by this proposal is the support for key switching. All the code is written in PARI library in C++.

This code also has an independent header containing a PARI implementation of the Knuth-Yao's Algorithm for sampling from a discrete Gaussian distribution. The paper followed for understanding and implementing the algorithm - High Precision Discrete Gaussian Sampling on FPGAs.

NOTE : Running the homomorphic multiplication gives a ![equation](http://latex.codecogs.com/gif.latex?%24l*l%24) matrix as opposed to the message being ![equation](http://latex.codecogs.com/gif.latex?%241*l%24). This is because after homomorphic multiplication, we don't get message but we get ![equation](http://latex.codecogs.com/gif.latex?%24m%5ET*m%24).

## Running

1. Install [Docker](https://www.docker.com/)

   * If you're on macOS and use [Homebrew](https://brew.sh), run `brew cask install docker; open -a docker`

2. Run these commands:

``` shell
make build
make run
```

## Development

1. Install [Docker](https://www.docker.com/)

    * If you're on macOS and use [Homebrew](https://brew.sh), run `brew cask install docker; open -a docker`

2. Run `make build`

3. Edit source code as you wish

4. Run `make dev`

## Notes

### What's new in the latest version?
We just rolled out the support for key switching/rotation. Check it out by running `init_key_switching.py`. You can also run `init.py` to check out homomorphic operations working.

This scheme has an `advantage` over other schemes that the key switching can both, increase as well as decrease the security level of the ciphertext!

### News
New here? Check out our sample tutorial on YouTube recorded by Mayank. The tutorial covers a basic overview of how to use the API. More in-depth tutorials coming soon. Keep checking out YouTube channel and our GitHub repositories.

### Contribute
Welcome! If you are intrigued by our work and want to contribute, then please go through the tutorial as mentioned in the `News` section and contact any of the contributors. You should also go through this introductory video by Andrew Trask, of the OpenMined platform.

### Difference between Key Rotation and Security Update
`Key Rotation` means that we change ciphertext associated with the key-pair `(pk1, sk1)`, where `pk1` is used to encrypt the message and `sk1` is used to decrypt to message to another ciphertext associated with keypair `(pk2, sk2)`, without decrypting the first ciphertext.

We specifically call it `Key Rotation` when the parameters have this relation ```n1 = n2```.

We call it `Security Update` if the paramters have this relation ```n1 < n2```, meaning that the security of new ciphertext has been updated and increased.

### Notes regarding the use and order of homomorphic function and key switching [`Important`]
The following cases of operations have been implemented. Support for other cases might require some more literature reading and will follow shortly. Please take a look at he following options which are presently supported:

#### `NOTE`:
The scheme only supports `ONE` homomorphic multiplication at the moment.

#### `Notations`:
 * `normal-ciphertext` means a ciphertext which has never been refreshed via either key rotation or security update and has only been operated additively or has never undergone any operation is just fresh.
 * `mult-ciphertext` means a ciphertext which has undergone `ONE` multiplication no matter if it has undergone key rotation or security update before or not. Note that a `mult-ciphertext` `CANNOT` be rotated or refreshed by key rotation or security update because of it's peculiar structure. It has to be decrypted.
 * `rotated-ciphertext` means a ciphertext which has undergone refreshment via either key rotation or security update.

#### `NOTE`:
If `+` is supported it implies `-` is permitted as well.

#### `Permitted operations and their outputs`:
 * ``` normal-ciphertext + normal-ciphertext = normal-ciphertext```  and ``` normal-ciphertext * normal-ciphertext = mult-ciphertext```
 * ```mult-ciphertext + mult-ciphertext = mult-ciphertext```
 * ```rotated-ciphertext + rotated-ciphertext = rotated-ciphertext``` and ```rotated-ciphertext * rotated-ciphertext = mult-ciphertext```
 * ```rotated-ciphertext + normal-ciphertext = rotated-ciphertext``` and ```rotated-ciphertext * normal-ciphertext = mult-ciphertext```
 * ```normal-ciphertext + rotated-ciphertext = rotated-ciphertext``` and ```normal-ciphertext * rotated-ciphertext = mult-ciphertext```
 * ```mult-ciphertext + normal-ciphertext = mult-ciphertext``` and ```normal-ciphertext + mult-ciphertext = mult-ciphertext```[?]
 * ```mult-ciphertext + rotated-ciphertext = mult-ciphertext``` and ```rotated-ciphertext + mult-ciphertext = mult-ciphertext```[?]

#### `[?] Meaning`:
The above bullets marked with [?] means that these operations don't exist conventionally in the actual paper. I have implemented them as my own decision given they might come in handy during the course of our project. I implemented them in this way (illustrating just one example, rest are similar to this one):

```mult-ciphertext + (normal-ciphertext-of-1s * normal-ciphertext) = mult-ciphertext```

`normal-ciphertext-of-1s` mean that it is a ciphertext which is deliberately made my encrypting a vector of just all 1s, so that if it is multiplied with anything (say `x`), this `x` remains same, but since `x` is of type - `normal-ciphertext` and also this `normal-ciphertext-of-1s` is also of the type - `normal-ciphertext`, this means their homomorphic multiplication `*` will yield a ciphertext encrypting `x` of the type - `mult-ciphertext`. This makes the whole above homomorphic addition as ```mult-ciphertext + mult-ciphertext = mult-ciphertext```.

--------

### Importing API
The API can be imported using the command ```import Aono```. It currently supports the following functions and classes:

--------

## Functions Supported:
### 1. ```pari_init(pari_size, max_prime)```
```pari_init()``` is the function that needs to be called before dealing with this API. `pari_size` defines the size of stack we'll be using, and `max_prime` defines the pre computed prime table.
#### Arguments: ```pari_size (int)```, ```max_prime (int)```
### 2. ```pari_close()```
```pari_close()``` function has to be called at the end of each program to clear the memory used.

--------

## Classes:
### ```pari_GEN```
    This class abstracts the GEN variable in C++, making it available through python interface. The class is compatible with +, *, /, -, __getitem__ , %, and print.
  * Class Data:
    1. `value` (`GEN`)

  * ```__init__(self, x)```
    The constructor converts x to a GEN variable. Arguments: `x` (`int`)

### ```parameters```
  * Class Data:
    1. `n`, `s`, `sigma`, `l`, `lambda` (`ints`)
    2. `q`, `p` (`pari_GEN`)

### ```secret_key```
  * Class Data:
    1. `sk` (`pari_GEN`)
    2. `params` (`parameters*`)

  * ```__init__(self, sk = None, parmas = None)```
    The constructor initiates class data.
    Arguments: `sk` (`pari_GEN`), `params` (`parameters*`)

  * ```decrypt(self, ct)```
    ```decrypt()``` method returns the plaintext (`pari_GEN`) encrypted in ciphertext `ct`.    Arguments: `ct` (`pari_GEN`)

  * ```serialize(self)```
    TO BE IMPLEMENTED

### ```public_key```
  * Class Data:
    1. `pk` (`public_key_pack*`)
    2. `params` (`parameters*`)
    3. `g` (`globalvars*`)

  * ```__init__(self, pk = None, params = None, g = None)```
    The constructor initiates the class data.
    Arguments: `pk` (`public_key_pack*`), `params` (`parameters*`), `g` (`globalvars*`)

  * ```encrypt(self, pt)```
    ```encrypt()``` method returns the ciphertext (`GEN`) which encrypts plaintext `pt`.
    Arguments: `pt` (`pari_GEN`)

  * ```serialize(self)```
    TO BE IMPLEMENTED

### ```key_pair```
  * Class Data:
    1. `sk` (`secret_key`)
    2. `pk` (`public_key`)

### ```key_gen```
  * ```generate_key(self, lambda, l, n, s, sigma, degree_p)```
    ```generate_key()``` method returns the keys, which is of type `key_pair`. Here `s` defines the tailprune and `degree_p` defines the `bit_size` of `p` to be generated.
    Arguments: `lambda` (`int`), `l` (`int`), `n` (`int`), `s` (`int`), `sigma` (`int`), `degree_p` (`int`).

  * ```deserialize(self)```
    TO BE IMPLEMENTED

### ```ciphertext```
    The class is compatible with `’+’, '*', and '-' operators`
  * Class Data:
    1. `value` (`pari_GEN`)
    2. `pk` (`public_key*`)
    3. `params` (`parameters*`)

  * ```__init__(self, plaintext = None, pk, params)```
    The constuctor method takes two arguments: `plaintext` (`pari_GEN` variable), `pk` (`public_key*`), `params` (`parameters*`)

TODO - Remove `params`, it can be taken from `pk`.

  * ```decrypt(self, sk)```
    ```decrypt()``` method returns the decrypted `ciphertext` which is `pari_GEN` variable.
Arguments: `sk` (`secret_key*`)

### ```updation_key```
* Class Data:
    1. `pk` (`public_key_pack*`)
    2. `params` (`parameters*`)
    3. `old_params` (`parameters*`)
    4. `g` (`globalvars*`)
    5. `XComponent` (`pari_GEN`)
    6. `YComponent` (`pari_GEN`)

  * ```__init__(self, X, Y, params, params_old, g, pk)```
    The constructor initiates the class data.
    Arguments: `pk` (`public_key_pack*`), `params` (`parameters*`), `g` (`globalvars*`)

  * ```cipher_switch(self, ciphertext)```
    ```cipher_switch()``` method returns the ciphertext (`ciphertext`) which is obtained by switching the ciphertext passed to function with the updatation key.
    Arguments: `ct` (`ciphertext`)

### ```updation_key_gen```

  * ```generate_key(self, key_pair*, key_pair*)```
    ```generate_key()``` method returns the updation key (`updation_key`) which is the key that can be used to switch any ciphertext which is associated with the first (in order of arguments) `key_pair` to the ciphertext which is associated with the second `key_pair`.
    Arguments: `key1` (`key_pair`), `key2` (`key_pair`)

--------

## TODO:
- [x] Tweaks to homomorphic functions to support rotated or updated ciphertexts.

- [x] Support for plaintext-ciphertext multiplication.

- [x] Basic testing suite.

- [x] Taking care of negative errors by mapping ciphertext to a symmteric group before decryption.

- [x] Add a matrix reading support to testing suite.

- [x] Add key switching tests to testing suite.

- [x] Update README with pari_GEN.

- [ ] Add bootstrapping support.

- [ ] Serialization and Deserialization support.

repository: iamtrask/PyAono

repo_name: iamtrask/PyAono


text:
# in_hand_recognition_manager.py

![](images/in_hand_recognition_manager.png)

## What Is This

This node concatenate transformations for recognizing object in hand.

## Subscribing Topic

* `~input` (`geometry_msgs/PoseStamped`)

  Teacher pose.

* `~input/result` (`geometry_msgs/PoseStamped`)

  Difference pose.

## Publishing Topic

* `~output` (`geometry_msgs/PoseStamped`)

  Concatenated transformations.

* `~output/recognition` (`geometry_msgs/PoseStamped`)

  This topic is just a relay of `~input`.

## Sample

```bash
roslaunch jsk_pcl_ros sample_in_hand_recognition_manager.launch
```

branch_name: refs/heads/carma-develop


text:
# Discord_Ow_Match_Maker - A discord bot to create gathers, specificly for Overwatch
Version 0.2.0

A gather is a custom game made for 12 random (or not random) players and they play with and against eachother.
The idea is simple. Once the bot is activated, it will take care of registering the players and dividing them into 2 teams.

Current supported commands:

!register - register the player to the queue
!remove 	- remove the player from the queue
!status 	- displays the current players registered to the queue
!url 		  - posts a link to our Overwatch Facebook Group and to our Github page
!version	- shows the current bot version

Installation:
1. download nodeJS from https://nodejs.org/en/download/
2. run npm -g install npm to be on the latest version
3. Create your own bot on discord site (Check google/youtube if you are not familiar with how to do it)
4. Download the files
5. Run npm install in the downloaded project folder
6. Change the TOKEN in the config file.
7. Run the bot with the command of "node app"

Once activated, the bot will run until terminated.

How this bot works:

In order to register, a player MUST type !register <Battle tag> for example: !register Kaffa#12345.
(Otherwise, registration wont work and an error will be displayed).
If a player wants to leave the queue, he should type !remove.
!status will print the current players registered into the queue.
When the list fills with 12 players (Changeable in config file), the bot will create 2 teams.
Current version supports random shuffle only
for the players. We also plan on adding a balancing system - see Future Plans.
A message will now be displayed, showing the team players along with their SR. (Yes, we use Battle.net API to fetch SR information by Btag)
Now, a player must create a custom game, set the rules currectly and invite all the players into the game.
All players must manually move to their respective gather channel (Team1, Team 2), the bot will not open such channels or move players to it.
Meanwhile on discord, players can keep registering to a new queue which will start a new game once reached 12 players.
The bot can spot when a player has gone offline/idle/dnd and automatically remove him from the list.
It will also check if a player is already in the list and will not add him again.

Future plans:
Balance teams by SR. (High Priority).
Balance teams by main roles played.
Cosmetic changes to the bot.
Allow admin to quickly change the game size from 12 to any even number below it.
Allow the admin to change the need for Battle Tag (Low priority).
Random map chosen by the bot.
Specific map chosen by the admin.

branch_name: refs/heads/develop


text:
# Building this program

## Release builds

This program was written so that the same code could produce the coarse grained, and fined grained code from the same source.

### Fine Grained

To build the fine grained application, run:

1. `make clean` This will clean all previous object files.
2. `make` This will build the fine grained implementation, which is the default.

By default the `Makefile` will output the binary as `appserver` in the current directory.
This can be changed however, by specifing the `BIN` environment variable before running any make commands.
Example:

`BIN=exampleserver make`, which will place the application at `exampleserver` in the current directory.

### Coarse Grained

To build the coarse grained application, run:

1. `make clean` This will clean all previous object files. This is important, as the two implementations require different compiler flags, and mixing the object files will produce incorrect output.
2. `make` This will build the coarse grained implementation.

By default the `Makefile` will output the binary as `$(BIN)-coarse` in the current directory.
This prefix can be changed however, by specifing the `BIN` environment variable before running any make commands.
Example:

`BIN=exampleserver make`, which will place the application at `exampleserver-coarse` in the current directory.

## Debug Builds

This source can also generate debug builds that provide useful debugging information on stderr. They can be built by appending `debug` to the make build commands above.

For example, to build the corase grained debug implementation, run `make coarse-debug` instead of just `make coarse`. Run the `make clean` command beforehand as usual.

## External Libraries Note

The `chan.{c,h}` file and the `queue.{c,h}` file were originally a part of an external library. However, they have been heavily modified by me for use with this project (especially `queue.{c,h}`). The original library can be found: <https://github.com/tylertreat/chan/>. It is licensed under the Apache-2.0 License. The original library provided a thread safe channel implementation, for use for communicating across threads. I have adapted it by modifing the backing queue structure to be limitless, which required essentially a complete rewrite of `queue.c`.

path: /Proj 2/README.md


text:
# cookiecutter-cmake
cmake boilerplate include catch2 as unit testing

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

## Usage
```
cookiecutter https://github.com/Michael-Liao/cookiecutter-cmake
```
## Features
* Catch: for easy unit testing
* CMake: for packaging
* Command line interface using boost program options

repository: Michael-Liao/cookiecutter-cmake

repo_name: Michael-Liao/cookiecutter-cmake


text:
# TimeSeries
Various computations for time series.

This sub-project springs from our research into pattern detection using time
series datasets. Specifically the Nox EEG datasets.
From it a we explored various features regarding time series, including how to
compute various entropies. One such entropy, Permutation Entropy, was of
additional interest as we believe that a novel processing approach can be
introduced to speed up certain computations, as well as simplify the code base.

repository: IIIM-IS/TimeSeries

repo_name: IIIM-IS/TimeSeries


text:
# TokenCompleteTextView
Gmail style MultiAutoCompleteTextView for Xamarin.Android

*This is a like for like port of the splitwise TokenCompleteTextView for Android: https://github.com/splitwise/TokenAutoComplete*

## IMPORTANT
This project is still an early work in progress, and is not fully implemented. There followeijng items are yet to be completed:

- Android activity cycle (i.e. restore / sleep)
- Documentation and samples
- Extensive testing

repository: mattwhetton/TokenCompleteTextView

repo_name: mattwhetton/TokenCompleteTextView


text:
# Lab 1 - Cost management and EC2 scaling
### Overview
The catsndogs.lol environment has been running on a spare laptop, but today you will move everying to a new AWS ECS cluster.
Because the company is cost-conscious, the majority of our capacity will use EC2 Spot fleet instances. Because elasticity is also important, you will set up Auto Scaling for the Spot fleet to scale up and down as demand increases and decreases.
For long-term stability of core capacity, you will also add a small group of on-demand EC2 instances to the cluster.
At the end of this lab you will have an ECS cluster composed of Spot fleet instances with Auto Scaling enabled, and an on-demand instance from an Auto Scaling group.

### High-level Instructions
1.	In the ECS console, create a new ECS cluster. Use the cluster creation wizard to create a new cluster composed of Spot instances:

	a.	The cluster should be named **catsndogsECScluster**. This name is used in later labs, so if you name the cluster something else you will have to remember this when running later commands.

   	b.	Select several instance types from a range of instance types. It is recommended you use smaller instance sizes rather than large ones. For example: m5.large, c5.large, m4.large, c4.large, r4.large, i3.large.

   	c.	Set a maximum bid price of $0.25.

   	d.	Set the number of instances to 3.

   	e.	Launch instances into the VPC named ECSVPC, using the private subnets.

   	f.	Use the security group with InstanceSecurityGroup in the name.

   	g.	For the Container Instance role, use the IAM Role with catsndogssetup-EC2Role in the name.

   	h.	For the Spot Fleet request role, use the catsndogssetup-SpotFleetTaggingRole

2.	Open the CloudFormation console and select the stack that has been created. Click the Template tab and look at the User Data for the EcsSpotFleet resource in the template. More information about this script can be found on the AWS Compute blog: https://aws.amazon.com/blogs/compute/powering-your-amazon-ecs-cluster-with-amazon-ec2-spot-instances/

3.	Create a CloudWatch alarm called **ScaleOut** that will be used to scale out the Spot fleet:

   	a.	Use the ECS metric MemoryReservation.

   	b.	The alarm should enter the ALARM state when the value is over 20% for more than two minutes. This will require changing the monitoring period.

   	c.	For the Statistic use the Standard metric Maximum.

   	d.	Delete the pre-created Notification action.

4.	Repeat step 3 to create a new alarm called **ScaleIn**. Have the alarm enter an ALARM state when the metric is below 20%.

5.	Set up Auto Scaling for the Spot fleet. Spot fleet Auto Scaling is a property of the Spot request, so this is located in the EC2 Console Spot Requests.

   	a. Set Auto Scaling to scale between 3 and 10 instances.

   	b. Create two Auto Scaling policies, one called ScaleUp and one called ScaleDown. You may have to click the link that says *Scale Spot fleet using step or simple scaling policies*

   	c. In the ScaleUp policy, use Define Steps to add 2 instances when the MemoryReservation is between 20 and 50, and add 3 instances when the MemoryReservation is over 50.

   	d. In the ScaleDown policy, use Define Steps to remove 1 instance when the MemoryReservation is between 10 and 20, and remove 2 instances when the MemoryReservation is below 10.

6.	Create an Auto Scaling group of on-demand instances to provide long-term core capacity for the ECS cluster. If you have used Auto Scaling groups with ECS before, you can launch a CloudFormation stack to create this automatically. The CloudFormation template is called `cfn-templates/Lab1-add-ondemand-asg-to-cluster.yml` If you have not used Auto Scaling groups with ECS, you can follow the steps below to learn how to do this:

7.	You will need a copy of the AMI ID of an instance that was launched when you created the ECS cluster earlier. You can find this from the properties of any of the Spot fleet instances.

8.	Create a new Launch Configuration:

   	a.	Use the AMI ID you copied in step 7.

   	b.	Use an m4.large instance type.

   	c.	Use the IAM Role with EC2InstanceProfile in the name.

   	d.	Paste in the following User Data:

		#!/bin/bash

		echo ECS_CLUSTER=catsndogsECScluster >> /etc/ecs/ecs.config

	e.	Use the security group with InstanceSecurityGroup in the name.

9.	Create an Auto Scaling group using the Launch Configuration you just created:

   	a.	Start with 1 instance.

   	b.	Launch instances into the VPC named ECSVPC, using the private subnets.

   	c.	Do not configure any scaling policies or notifications.

You should now have an ECS cluster composed of three instances from the Spot fleet request, and one instance from the on-demand Auto Scaling group.

# What's Next
[ECS Service deployment and task Auto Scaling](../Lab-2-Artifacts/)

# Detailed Instructions
[Cost management and EC2 scaling - Detailed Instructions](./lab1-detailed-steps.md)