text:
---
date: 2017-11-07T01:21:25-05:00
title: "In One Video"
seo_title: "In One Video | C++ | GOUP"
subheader:
     greeting: C++ - Programming Language
     description: This course covers the basics of programming in C++. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!
description: This tutorial covers the C++ language in one video.
author: GOUP
image: getting-input-from-users.png
video: raZSmcariyU
url: /programming-languages/c++/in-one-video/
weight: 32
---

## C++ Overview
C++ is a general purpose, staticly typed, object oriented programming language
that began in 1979 by Danish Computer Scientist Bjarne Stroustrup. For several
years the language evolved until it's official release in 1985.

C++ is essentially an extension of the C programming language. It actually began
as a fork of an early pre-standardized C. And while C is not a strict subset of
C++ the two languages are largly compatiable and In many instances C code can be
used with little or no modification as C++ code.

Becuase C++ is an extension of C, many of the things you can do in C you can also
do in C++. But in addition C++ gives you all the power and flexibility of object orientation.
So you can use low level system calls, manage memory and deal with pointers. while
at the same time working with classes, objects, inheritance and all the features
of an object oriented language.

So C++ really lives in two worlds.

### How C++ Runs

All c++ programs must utilize a compiler who's job is to compile the c++ code down
into machine code readable by the computer. So anytime you want to run a c++ program
you have to compile it first.

C++ relies on the user to manage the program's memory, although there are garbage
collectors avaiable for C++.

### Choosing an IDE

Many developers choose to write C++ using a basic text editor, but there are also
more specilized integrated development enviornments, some of the most popular
include Code Blocks, Eclipse and Net Beans.

## Code

### Printing
{{< code lang="cpp" >}}
cout << "Hello" << endl;
cout << "World";
cout << "!" << endl;
{{< /code >}}

### Variables and Data Types
{{< code lang="cpp" >}}
/*
Names are case-sensitive and may begin with:
     letters, _
After, may include
     letters, numbers, _
Convention says
     Start with a lowercase word, then additional words are capitalized
     ex. myFirstVariable
*/
string name = "Mike";    // string of characters, not primitive
char testGrade = 'A';    // single 8-bit character.

// you can make them unsigned by adding "unsigned" prefix
short age0 = 10;         // atleast 16-bits signed integer
int age1 = 20;           // atleast 16-bits signed integer (not smaller than short)
long age2 = 30;          // atleast 32-bits signed integer
long long age3 = 40;     // atleast 64-bits signed integer

float gpa0 = 2.5f;       // single percision floating point
double gpa1 = 3.5;       // double-precision floating point
long double gpa2 = 3.5;  // extended-precision floating point

bool isTall;             // 1 bit -> true/false
isTall = true;

name = "John";

cout << "Your name is " << name << endl;
{{< /code >}}

### Casting and Converting
{{< code lang="cpp" >}}
cout <<  (int)3.14 << endl;
cout << (double)3 / 2 << endl;
{{< /code >}}

### Pointers
{{< code lang="cpp" >}}
int num = 10;
cout << &num << endl;

int *pNum = #
cout << pNum << endl;
cout << *pNum << endl;
{{< /code >}}

### Strings
{{< code lang="cpp" >}}
#include <string>
string greeting = "Hello";
//      indexes:   01234

cout << greeting.length();
cout << greeting[0] << endl;
cout << greeting.find("llo") << endl;
cout << greeting.substr(2) << endl;
cout << greeting.substr(1, 3) << endl;
{{< /code >}}

### Numbers
{{< code lang="cpp" >}}
cout << 2 * 3 << endl;       // Basic Arithmetic: +, -, /, *
cout << 10 % 3 << endl;      // Modulus Op. : returns remainder of 10/3
cout << 1 + 2 * 3 << endl;   // order of operations
cout << 10 / 3.0 << endl;    // int's and doubles

int num = 10;
num += 100; // +=, -=, /=, *=
cout << num << endl;

num++;
cout << num << endl;

// Math class has useful math methods
#import <cmath>
cout << pow(2, 3) << endl;
cout << sqrt(144) << endl;
cout << round(2.7) << endl;
{{< /code >}}

### User Input
{{< code lang="cpp" >}}
string name;
cout << "Enter your name: ";
cin >> name;
cout << "Hello " << name << endl;

int num1, num2;
cout << "Enter first num: ";
cin >> num1;
cout << "Enter second num: ";
cin >> num2;
cout << "Answer: " << num1 + num2 << endl;
{{< /code >}}

### Arrays
{{< code lang="cpp" >}}
// int luckyNumbers[6];
int luckyNumbers[] = {4, 8, 15, 16, 23, 42};
//         indexes:    0  1  2   3   4   5
luckyNumbers[0] = 90;
cout << luckyNumbers[0] << endl;
cout << luckyNumbers[1] << endl;
{{< /code >}}

### 2 Dimensional Arrays
{{< code lang="cpp" >}}
// int  numberGrid[2][3];
int numberGrid[2][3] = { {1, 2, 3}, {4, 5, 6} };
numberGrid[0][1] = 99;

cout << numberGrid[0][0] << endl;
cout << numberGrid[0][1] << endl;
{{< /code >}}

### Vectors
{{< code lang="cpp" >}}
// #include <vector>
vector<string> friends;
friends.push_back("Oscar");
friends.push_back("Angela");
friends.push_back("Kevin");
friends.insert(friends.begin() + 1, "Jim");

// friends.erase(friends.begin() + 1);
cout << friends.at(0) << endl;
cout << friends.at(1) << endl;
cout << friends.at(2) << endl;
cout << friends.size() << endl;
{{< /code >}}

### Functions
{{< code lang="cpp" >}}
int addNumbers(int num1, int num2);

int main()
{
     int sum = addNumbers(4, 60);
     cout << sum << endl;

     return 0;
}

int addNumbers(int num1, int num2){
     return num1 + num2;
}
{{< /code >}}

### If Statements
{{< code lang="cpp" >}}
bool isStudent = false;
bool isSmart = false;

if(isStudent && isSmart){
     cout << "You are a student" << endl;
} else if(isStudent && !isSmart){
     cout << "You are not a smart student" << endl;
} else {
     cout << "You are not a student and not smart" << endl;
}

// >, <, >=, <=, !=, ==
if(1 > 3){
     cout << "number omparison was true" << endl;
}

if('a' > 'b'){
     cout << "character comparison was true" << endl;
}

string myString = "cat";
if(myString.compare("cat") != 0){
     cout << "string comparison was true" << endl;
}
{{< /code >}}

### Switch Statements
{{< code lang="cpp" >}}
char myGrade = 'A';
switch(myGrade){
     case 'A':
          cout << "You Pass" << endl;
          break;
     case 'F':
          cout << "You fail" << endl;
          break;
     default:
          cout << "Invalid grade" << endl;
}
{{< /code >}}

### While Loops
{{< code lang="cpp" >}}
int index = 1;
while(index <= 5){
     cout << index << endl;
     index++;
}

do{
     cout << index << endl;
     index++;
}while(index <= 5);
{{< /code >}}

### For Loops
{{< code lang="cpp" >}}
for(int i = 0; i < 5; i++){
     cout << i << endl;
}
{{< /code >}}

### Exception Catching
{{< code lang="cpp" >}}
double division(int a, int b) {
   if( b == 0 ) {
      throw "Division by zero error!";
   }
   return (a/b);
}

int main(){
     try {
        division(10, 0);
     } catch (const char* msg) {
      cerr << msg << endl;
     }
     return 0;
}
{{< /code >}}

### Classes and Objects
{{< code lang="cpp" >}}
class Book{
     public:
          string title;
          string author;

          void readBook(){
               cout << "Reading " + this->title + " by " + this->author << endl;
          }
};

Book book1;
book1.title = "Harry Potter";
book1.author = "JK Rowling";

book1.readBook();
cout << book1.title << endl;

Book book2;
book2.title = "Lord of the Rings";
book2.author = "JRR Tolkien";

book2.readBook();
cout << book2.title << endl;
{{< /code >}}

### Constructors
{{< code lang="cpp" >}}
class Book{
     public:
          string title;
          string author;

          Book(string title, string author){
               this->title = title;
               this->author = author;
          }

          void readBook(){
               cout << "Reading " + this->title + " by " + this->author << endl;
          }
};

Book book1("Harry Potter", "JK Rowling");
cout << book1.title << endl;

Book book2("Lord of the Rings", "JRR Tolkien");
cout << book2.title << endl;

{{< /code >}}

### Getters and Setters
{{< code lang="cpp" >}}
class Book{
     private:
          string title;
          string author;
     public:
          Book(string title, string author){
               this->setTitle(title);
               this->setAuthor(author);
          }

          string getTitle(){
               return this->title;
          }
          void setTitle(string title){
               this->title = title;
          }
          string getAuthor(){
               return this->author;
          }
          void setAuthor(string author){
               this->author = author;
          }

          void readBook(){
               cout << "Reading " + this->title + " by " + this->author << endl;
          }
};

Book book1("Harry Potter", "JK Rowling");
cout << book1.getTitle() << endl;

Book book2("Lord of the Rings", "JRR Tolkien");
cout << book2.getTitle() << endl;

{{< /code >}}

### Inheritance
{{< code lang="cpp" >}}
class Chef{
     public:

          string name;
          int age;

          Chef(string name, int age){
               this->name = name;
               this->age = age;
          }

          void makeChicken(){
               cout << "The chef makes chicken" << endl;
          }

          void makeSalad(){
               cout << "The chef makes salad" << endl;
          }

          void makeSpecialDish(){
               cout << "The chef makes a special dish" << endl;
          }
};

class ItalianChef : public Chef{
     public:

          string countryOfOrigin;

          ItalianChef(string name, int age, string countryOfOrigin) : Chef(name, age){
               this->countryOfOrigin = countryOfOrigin;
          }

          void makePasta(){
               cout << "The chef makes pasta" << endl;
          }

          // override
          void makeSpecialDish(){
               cout << "The chef makes chicken parm" << endl;
          }
};

Chef myChef("Gordon Ramsay", 50);
myChef.makeChicken();

ItalianChef myItalianChef("Massimo Bottura", 55, "Italy");
myItalianChef.makeChicken();
cout << myItalianChef.age << endl;
{{< /code >}}

### Abstract Classes and Methods
{{< code lang="cpp" >}}
class Vehicle{
     public:
          virtual void move() = 0;
          void getDescription(){
               cout << "Vehicles are used for transportation" << endl;
          }
};

class Bicycle : public Vehicle{
     public:
          void move(){
               cout << "The bicycle pedals forward" << endl;
          }
};

class Plane : public Vehicle{
     public:
          virtual void move(){
               cout << "The plane flys through the sky" << endl;
          }
};

Plane myPlane;
myPlane.move();
{{< /code >}}


text:
# 03. Delete taxa

## Background/Motivation
A collection manager wants to delete a taxon record.

## Preconditions
There is an existing taxon record that the user wants to delete.

## Course of events
  1. The user selects the taxon to be deleted.
  2. The user deletes the taxon.

## Alternative paths

## Success post-conditions
The taxon record is deleted from the database and is no longer viewable from the user interface.

## Notes
Based on PlutoF use case from https://plutof.ut.ee/assets/varia/manuals/docs/taxonomy_manual_3_en.pdf

repository: DINA-Web/dina-use-cases

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: DINA-Web/dina-use-cases


text:
---
title: "#8 - pnpm"
date: "2017-05-23"
---

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/324063275&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe>

pnpm - fast, disk space efficient package manager, drop-in replacement for npm.

- https://pnpm.js.org
- https://twitter.com/pnpmjs
- https://www.kochan.io/nodejs/why-should-we-use-pnpm.html

<!-- end -->
**Transcript**

pnpm is an alternative package manager for Node.js. It is a drop-in replacement for npm, but faster and more efficient.

Why not Yarn?
After a few days of Yarn release, author of pnpm, Zoltan Kochan, realized that Yarn is just a small improvement over npm. Although it makes installations faster and it has some nice new features, it uses the same flat node_modules structure that npm does (since version 3).

Prior to npm version 3, the node_modules structure was predictable and clean, as every dependency in node_modules had its own node_modules folder with all of its dependencies specified in package.json.

This approach had two serious issues:
- frequently packages were creating too deep dependency trees, which caused long directory paths issue on Windows
- packages were copy pasted several times when they were required in different dependencies

To solve these issues, npm rethought the node_modules structure and came up with flattening in npm version 3.

And flattened dependency trees come with a bunch of issues:
- modules can access packages they don’t depend on
- the algorithm of flattening a dependency tree is pretty complex
- some of the packages have to be copied inside one project’s node_modules folder

Unlike npm vesion 3, pnpm tries to solve the issues that npm version 2 had, without flattening the dependency tree.

In a node_modules folder created by pnpm, all packages have their own dependencies grouped together, but the directory tree is never as deep as with npm2. pnpm keeps all dependencies flat but uses symlinks to group them together.

Flattening is hard. A package manager can be deterministic but no human can easily predict how will a flattened dependency tree look like. Pnpm not only has a lockfile, the files in its node_modules folder are organized always the same way, the way they are described in package.json files.

To understand pnpm algorithm in details I recommend to read a blog post by Zoltan: "Why should we use pnpm?".

Pnpm is very efficien in Disk Space usage.
When you install a package, it is saved in a global store on your machine, then pnpm creates a hard link from it instead of copying. For each version of a module, there is only ever one copy kept on disk. When using npm or yarn for example, if you have 100 packages using lodash, you will have 100 copies of lodash on disk. Pnpm allows you to save gigabytes of disk space!

And all these hadrlinks and symlinks also work on Windows operating system!

 What about speed: pnpm is not only faster than npm, it is faster than Yarn. It is faster than Yarn both with cold and hot cache. Yarn copies files from cache whereas pnpm just links them from the global store.

 pnpm is 10 times faster than npm and 30% faster than Yarn - see benchmarks on GitHub.

pnpm supports offline mode - it saves all the downloaded package tarballs in a local registry mirror. It never makes requests when a package is available locally. With the --offline parameter, HTTP requests can be prohibited at all.

By default pnpm connects to registry.npmjs.org and works as a drop-in replacement for npm.

Visit pnpm.js.org website and follow the @pnpmjs Twitter account for updates.

Code with React and prosper!

license: MIT

gha_language: CSS


text:
# Technology Roadmap

## Roadmap to Launch

![Roadmap Q4 2021 - Q4 2022](/assets/illustrations/roadmap.png "Subject to change given Diem roadmap")

## Web 3 Foundation Open Grant

![W3F Grant](/assets/w3f_grant.png "Project Supported By Web3 Foundation Grants Program")

We have now completed the Web3 foundation grant milestones to [bring Move VM smart contracts to Polkadot
](https://blog.pontem.network/pontem-network-is-the-first-to-make-diems-move-language-available-on-polkadot-dc1f3498ffcb).

You can see the full Pontem Network Grant Proposal in our [GitHub](https://github.com/pontem-network/Open-Grants-Program/blob/master/applications/pontem.md).

## Substrate Builders Program

![Substrate Builders Program](/assets/substrate_builders.png "Project Is Participant Of Substrate Builders Program")

Pontem Network is a participant of [Substrate Builders Program](https://substrate.io/ecosystem/substrate-builders-program/).

Milestones completion:

* ✅ [Milestone #1](https://www.parity.io/blog/substrate-builders-program-milestone-update-october-2021).
* 🚧 Milestone #2 - In progress.
* 🚧 Milestone #3 - In progress.


text:
+++
title = "Create GitHub Repository"
chapter = false
weight = 10
+++

We will be using a GitHub repo to declare the desired state of our EKS cluster. This repo will eventually include your workload manifests, HelmReleases etc.

You can start with an empty repository and push that to GitHub, or use the one you intend to deploy to the cluster. As a suggestion create a blank **public** repo on GitHub called `my-eks-config` and make sure you tick `Initialize this Repository with a README`:

![github_repo_settings](/images/gh_repo_init.png)

For instructions on how to create a repository on GitHub [follow these steps.](https://help.github.com/articles/create-a-repo).

{{% notice info %}}
In the **Cloud9** environment, a user SSH key pair is not automatically created. [Use these instructions](https://help.github.com/en/github/authenticating-to-github/checking-for-existing-ssh-keys) to create an SSH key pair for use as your git repository deploy keys.
{{% /notice %}}

You will also want to add your ssh. Instructions to do so [are here](https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account).

The pbcopy will not work on amazon linux, so instead just run:

```bash
cat ~/.ssh/id_rsa.pub
# just copy content to clip manually using mouse/trackpad
```


text:
heroJS
=========
![heroJS logo](https://github.com/ivanruby/herojs/blob/master/assets/logo/hero3A.jpg)

Hero.js is a Javascript Library built to provide Local or Offline Storage, Geo-location and caching functionality to web pages.
It makes use of HTML5 localStorage, geolocation and cache objects to provide offline storage and information related to the location of the device accessing the web page.

Functionalities
===========

- hero.db : Object that implements DB operations (Insert, Get, Update, Remove, Search and Sort) with method chaining.
- hero.geo : Object that implements geolocation. Uses metwit's api as a default geolocation resolver
- hero.cache: Object programmatically creates a cache manifest file (as of now it just prints the contents supposed to be on the manifest on the console)

TODO:
================

- Create and implement test cases
- Find a better way to implement method chaining (without having to use the .ok() )
- Implement better queries on hero.db
- Implement db schema
- Implement a auto-increment field

License
=======
[MIT](https://raw.githubusercontent.com/ivanruby/herojs/master/LICENSE)

*Cheers!*

Ivan Ruby

repository: ivanruby/herojs

repo_name: ivanruby/herojs


text:
# Essential Tasks, Outcomes, and Rubrics

## Assessment vs, Grading

>Compare pedagogical models of Code.org CS Principles & CS Discoveries, Unity Create With Code, TestOut.

**Formative Assessment:** taking stock of how the unit/lesson *is going* - what are the students learning, who is getting it, who is not, how is the pacing, etc.

**Summative Assessment:** taking stock of how the unit *went*.

**Grading:** assigning a level of mastery to each student's work on a task/lesson/unit. Grading is required to fit into a set of external constraints. It translates the results of assessments into "reportcardese."

| Grade | Meaning |
| :---: | ------- |
| A     | Near mastery of terms & concepts; able to transfer skills and understandings to **new** problems. |
| B     | Substantial, but incomplete, mastery of terms & concepts; able to transfer skills and understandings to **similar** problems. |
| C     | Able to accurately follow procedures and understands essential terminology & concepts
| D     |
| F     | The available evidence is inadequate to form a judgement of what the student understands & can do. |

## What I Grade

## Why I Grade It

## Essential Tasks

The six essential tasks summarize the core of work in computer science and related fields. The specific activities and types of projects vary with course. Most projects offer opportunities to demonstrate growith in several of the essential tasks. Formative assessments usually focus on one or two of the objectives that contribute to an essential task.

### AA: Applying abstractions and models

Computational thinking

#### CS Principles

#### Game Design & Programming

### AE: Analyzing the effects of developments in computing

#### CS Principles

#### Game Design & Programming

### AW: Analyzing their computational work and the work of others

#### CS Principles

#### Game Design & Programming

* Reviewing games & game development tools
* Developing a critical vocbulary - understanding the frameworks and language that game developers have developed to understand and communicate about their work.
* Code reviews

### CP: Collaborating with peers on computing activities

* Using collaboration tools to facilitate a group project:
  - Google Docs
  - GitHub
* Project management
  - Dividing up work and documenting responsibilities, so that each member of the team has a defined contribution that can be accomplished with minimal dependance on others.
  - Knowing what you are responsible for
  - Communicating about progress and challenges.
* Critiquing group process

#### CS Principles

#### Game Design & Programming

### CR: Communicating computational thought processes, procedures, and results to others

* Computational Thinking
  - Knowing the elements of algorithms (sequencing, branching, iteration)
  - Knowing the properties of an algorithm
    - Completion / finite execution time
    - Correctness
    - Definite - unambiguous statement, defined inputs and outputs
* Vocabulary

#### CS Principles

#### Game Design & Programming

### DI: Designing and implementing creative solutions and artifacts

* Using an iterative design process
  - Educational Technology: ET.4.ID.a - Design Process
  - Educational Technology: ET.4.ID.c - Prototypes
* Using a revision control system to manage a code base
  - WA CS Learning Standards: 3B-AP-20
* Breaking a task down into steps
  - Educational Technology: ET.5.CT.c - Problem Decomposition
* Identifying a MVP
* Knowing the languages and development tools used in the domain (Unity, Visual Studio, Code Studio, C#, JavaScript, etc.).
  - WA CS Learning Standards: 3B-AP-20
* Working with algorithms:

#### CS Principles

* JavaScript

#### Game Design & Programming

* C#
* Unity
* Visual Studio or Rider
* Git & GitHub

## Outcomes

## Rubrics

[Generic Rubric Descriptors](https://docs.google.com/spreadsheets/d/1B_XH8y4SVR3iqoKCU21Bgjpm5uAQBamGSd2qYQWkTRM/edit?usp=sharing)

<iframe src="https://docs.google.com/spreadsheets/d/1B_XH8y4SVR3iqoKCU21Bgjpm5uAQBamGSd2qYQWkTRM/edit?usp=sharing" width="100%">

## Categories

repository: Teaching-Master/Syllabi

repo_name: Teaching-Master/Syllabi


text:
# NOTICE
There is now a working, native intgration between Okta and AWS SSO. Should you come across this repository, please use that integration instead. :smile:

Additionally, [AWS announced](https://aws.amazon.com/about-aws/whats-new/2020/09/aws-single-sign-on-adds-account-assignment-apis-and-aws-cloudformation-support-to-automate-multi-account-access-management/) AWS SSO related CloudFormation resources and administrative APIs on 2020-09-10.

----

# Okta AWS SSO SCIM Groups Connector <!-- omit in toc -->

- [What it Does](#what-it-does)
- [Why it Exists](#why-it-exists)
- [What it Does Not Do](#what-it-does-not-do)
- [Operational Considerations](#operational-considerations)
  - [Group Names](#group-names)
  - [Group Renames](#group-renames)
  - [Scalability](#scalability)
    - [Event Delivery Guarantees](#event-delivery-guarantees)
    - [Event Amalgamation](#event-amalgamation)
    - [Number of Users and Groups](#number-of-users-and-groups)
- [Infrastructure/Architecture](#infrastructurearchitecture)
- [Project Structure](#project-structure)
- [Deployment](#deployment)
  - [Deploying to AWS](#deploying-to-aws)
  - [Manage Your Secrets](#manage-your-secrets)
  - [Configuring an Event Hook in Okta](#configuring-an-event-hook-in-okta)
  - [Inspecting Logs (optional)](#inspecting-logs-optional)

# What it Does
This application listens to group membership events from Okta and synchronizes membership changes to identically named groups in AWS SSO which begin with the prefix `AWS_`. Changes are effected by interacting with the SCIM 2.0 endpoint provided by AWS SSO for automatic provisioning.

# Why it Exists
The company I work for ([BriteCore](https://www.britecore.com/)) utilizes Okta as our identity provider and wants to adopt AWS Single Sign-on (SSO) to simplify access and access management for our growing number of AWS accounts.

[AWS SSO supports SAML 2.0 IdPs and automated provisioning via SCIM][aws-sso-external-idp-docs], but unfortunately there's an issue with the SCIM provisioning between Okta and AWS SSO at this time (2020-04-11). Specifically, attempting to push group membership from Okta to AWS SSO results an error like the following.

> Failed on 03-26-2020 03:49:35PM UTC: Unable to update Group Push mapping target App group AWS_SecurityRO: Error while creating user group AWS_SecurityRO: Bad Request. Errors reported by remote server: Request is unparsable, syntactically incorrect, or violates schema.

This is particularly unfortunate because it is not possible to manage group membership directly in AWS SSO while SCIM provisioning is enabled. Disabling automatic provisioning and just using Okta as the IdP is an option, but one which comes with a big downside: managing user provisioning in two places. :frowning:

In speaking with AWS Support, I was informed that this is a known issue with a planned resolution. Unfortunately, but not unsurprisingly, only a rough timeline of 3-6 months from 2020-03-27 was available. Realizing SCIM is an open protocol and not wanting to wait an unknown amount of time for a fix, I decided to make my own. I also hope to help out [others facing the same issue][okta-support-forum-issue]. :smile:

[okta-support-forum-issue]: https://support.okta.com/help/s/question/0D51Y000081nHGTSA2/cannot-use-groups-push-with-aws-sso
[aws-sso-external-idp-docs]: https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-identity-source-idp.html

# What it Does Not Do
This application **does not**:

  * Add/remove/update users in AWS SSO based on changes in Okta.
  * Add/remove groups in AWS SSO based on changes in Okta.
  * Syncrhonize group name/description changes in AWS SSO based on changes in Okta.

This is because:
 * The SCIM integration between AWS SSO and Okta works for the first two points.
 * Okta does not provide hookable events around group renames and description updates.

# Operational Considerations
I put this solution together quickly and in my spare time. My aim was to solve the general need, not solve the problem perfectly. I welcome contributions and will likely introduce a few improvements myself, but for now there are a few things you should keep in mind if you choose to utilize it yourself.

 ## Group Names
This application will only pay attention to group membership changes for groups beginning with the `AWS_` prefix. This prefix is not currently configurable.

## Group Renames

Renaming a group in Okta will break ongoing synchronization.

As noted in the [What it Does Not Do](#what-it-does-not-do) section, this application does not synchronize renames. As indicated in the [What it Does](#what-it-does) section, it only synchronizes group names which match exactly.

To work around this limitation, create a new group with the desired name (remember, it must start with `AWS_`), migrate all membership from the existing group to the new one, and then delete the old one.

 ## Scalability

While the underlying technology is scalable, I've conducted no significant load testing for this solution.

### Event Delivery Guarantees
Okta events are delivered at least once and do not guarantee ordering. This could present an issue if the same user's presence in is rapidly changed in the same group. In this case, out of order or repeated executions could leave the membership in an undesired state.

Practically speaking, this is very unlikely to be an issue during normal use of this application for the following reasons:

  * Adding and removing a user from the same group are actions which are very likely to be temporally distanced enough from each other that ordering is preserved.
  * Adding/removing users is effectively idempotent when isolated from ordering issues.

### Event Amalgamation
Okta may amalgamate multiple events which occur temporally close together into a single event delivery. This application currently attempts to effect all changes indicated in a received event at the time of its receipt.

Currently, the Lambda function (and Okta) have a 3 second timeout in place which could be exceeded depending upon the number of events sent in a single notification. This problem is aggravated by the fact that AWS SSO's SCIM implementation does not currently allow batch changes.

In practice, I've not yet seen this be an issue, even when adding/remove a number of users to/from a group at the same time via Okta's UI.

### Number of Users and Groups
To gather sufficient information to generate the group membership patches, this application requests member and group listings from AWS SSO's SCIM API. To avoid dealing with pagination and the latency of multiple requests, it currently makes a request for the first 1000 users and 1000 groups. It does not handle multiple pages.

Practically, this means the application will not work in all cases if you have more than 1000 users or more than 1000 groups. It's also possible that latency could become problematic with large numbers of users or that there is an execution time error that will caues a request for such a large number of users/groups to fail.

The user directory I've used to test this application has around 250 users and less than 5 groups.

# Infrastructure/Architecture
This application's infrastructure is defined using [AWS SAM][]. It is fully serverless, written in Python, and intended to be deployed to the AWS Cloud. At this time, it is expected to be manually deployed using [AWS SAM CLI][] (see the [Deployment](#deployment) section).

At a high level:
 * [AWS Lambda][] is utilized for all compute.
 * [AWS API Gateway][] is used to define and host the API.
 * [AWS Secrets Manager][] is used to securely store/access secrets.
 * [AWS IAM][] is used to create an application specific policy and roles.

Please see [template.yaml](template.yaml) for more details regarding the infrastructure.

[AWS SAM]: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html
[AWS SAM CLI]: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html
[AWS Lambda]: https://aws.amazon.com/lambda/
[AWS API Gateway]: https://docs.aws.amazon.com/apigateway/
[AWS Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/
[AWS IAM]: https://docs.aws.amazon.com/iam/

# Project Structure
This is a simple application with a simple structure.

- [app](app/) - Code for the application's Lambda functions.
- [events](events/) - Invocation events that you can use to invoke the function.
- [tests](tests/) - Unit tests for the application code.
- [template.yaml](template.yaml) - A template that defines the application's AWS resources.

>:notebook: **Note**
>
> Currently the `events/` and `tests/` directories contain only boiler plate files instantiated when this project was created from a template.

# Deployment
> :notebook: **Note**
>
> For the time being, the steps below are focused exclusively on deploying this application to AWS and configuring the needed event hook in Okta. They assume you have already:
>
> 1. Configured a SAML 2.0 application in Okta.
> 2. Configured AWS SSO to use Okta as its IdP.
> 3. Enabled SCIM provisioning in AWS SSO and Okta.
>    * You will also need the SCIM endpoint and access key provided during this process. The URL is retrievable at any time, but access keys are only provided at the time of creation.
>
> Please refer to the documentation [here (1)](https://controltower.aws-management.tools/infrastructure/sso/okta_sso/) and [here (2)](https://docs.aws.amazon.com/singlesignon/latest/userguide/provision-automatically.html) before beginning if you have not already taken these actions.

## Deploying to AWS

This application is defined using [AWS SAM][] and is currently intended to be manually deployed using [AWS SAM CLI][]. To deploy this application to your own AWS account, first do the following:

 1. [Install Docker][docker-install]
 2. Install Python 3 – Recommended: [Use pyenv and pyenv-virtualenv][install-python3]
 3. Install SAM CLI the SAM CLI – Recommended: `pip install aws-sam-cli` in your venv.

[docker-install]: https://hub.docker.com/search/?type=edition&offering=community
[install-python3]: https://github.com/pyenv/pyenv

With the above needs satisfied, run the following commands in your shell to deploy the application for the first time:

```bash
sam build --use-container
sam deploy --guided
```

The first command will build source of the application. The second command will package and deploy it to AWS following a series of prompts:

* **Stack Name**: The name of the stack to deploy to CloudFormation. This should be unique to your account and region.
* **AWS Region**: The AWS region where you want to deploy the application.
* **Parameter ScimUrl**: The SCIM url provided to you when you configured automatic provisioning in AWS SSO.
* **Confirm changes before deploy**: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes.
* **Allow SAM CLI IAM role creation**: The SAM template for this application creates IAM roles, so you will need to allow SAM CLI to create IAM roles.
* **Save arguments to samconfig.toml**: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run `sam deploy` without parameters to deploy changes to your application.

You can find your API Gateway Endpoint URL in the output values displayed after deployment. Take note of it as you'll need it to configure an event hook in Okta. You'll also need to retrieve the value of the API it created from AWS API Gateway.

## Manage Your Secrets
Navigate to the secret created by the deployment (it's named `app/okta-aws-sso-scim-groups-connector`) and retrieve the secret value. In plain text, it should look like the following:

```json
 {
   "aws_sso_scim_key": "<MUST BE PROVIDED>",
   "auth_token_for_okta": "<a 256 character generated string>"
 }
```

To proceed:
1. Take note of the `auth_token_for_okta`; you'll need it to configure Okta.
2. Input the SCIM access key/token as the value for `aws_sso_scim_key`.

## Configuring an Event Hook in Okta
Please follow the instructions in [Okta's documentation](https://console.aws.amazon.com/secretsmanager/home?region=us-east-1#/secret?name=app%2Fokta-to-aws-sso).

As depicted below, you'll need to provide the following inputs:

1. **Name**: This can be anything you want.
2. **URL**: This is the SCIM endpoint URL provided by AWS SSO when configuring automatic provisioning.
3. **Authentication field**: You must use 'Authorization'
4. **Authentication secret**: The value found in `auth_token_for_okta`.
5. **Custom header fields**: Add `x-api-key` and set the API key as its value.
6. **Subscribe to events**: Subscribe to 'User added to group' and 'User removed from group'.

![okta-config-screenshot](docs/assets/okta-event-hook-configuration.png)

If your event hook verifies successfully, everything should be working.

## Inspecting Logs (optional)
SAM CLI has a command called `sam logs`. The `sam logs` command lets you fetch logs generated by a deployed Lambda function from the command line.

`NOTE`: This command works for all AWS Lambda functions; not just the ones you deploy using SAM.

You can find more information and examples about filtering Lambda function logs in the [SAM CLI Documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-logging.html).

gha_language: Python

gha_license_id: MIT


text:
---
template: FamilyChecklist
slug: parents/family-checklist
title: New Family Checklist
checklist:
  - cell1: Have you received a tour of the centre and received our welcome email?
  - cell1: >-
      Have you contacted Centrelink/myGov to obtain information and update your
      information? (including authorising your child’s attendance in the [mygov
      app](https://my.gov.au/) or via telephone)?
  - cell1: >-
      Have you been informed of the centre’s rating and assessment status and
      our quality improvement plan?
  - cell1: Have you been introduced to educators?
  - cell1: 'Enrolment Form, CWA and Direct Debit Authority Form completed?'
  - cell1: "Have you been informed of the centre policies and procedures including; Open-\rDoor Policy, Sun Safety Policy, Emergency Management Plan, Immunisation\r Policy, and Medical Conditions Policy and Procedures?"
  - cell1: "Advised of hours of operation, fee policy and schedule; including charges for\r public holidays, sick days and absent days?"

  - cell1: "Completed Medication Conditions Form and uploaded onto QK Enrol? (if\r applicable)"
  - cell1: "Have you been informed about the various Educator-Parent communication\r methods used within the centre?"
  - cell1: "You have access to the My Family Lounge: QK Enrol and QK Journeys?\r (Downloaded the My Family Lounge App.)"
  - cell1: "Discussed the curriculum and the features of our educational programs?\r Completed the All About Me form and your Child’s Learning Plan?"
  - cell1: Been shown the sign in and out Kiosk?
  - cell1: Reviewed the recommendations for what your child needs to bring?
  - cell1: Been provided a centre calendar of events and discussed upcoming events?
checklistDownload:
  file: /images/uploads/family-checklist.pdf
  preview: /images/uploads/family-checklist.jpg
  title: >-
    Download our printable family checklist to get you and your child ready to
    start at one of our centres.
meta:
  canonicalLink: ''
  description: ''
  noindex: false
  title: ''
---
### We aim to ensure that parents have all the necessary information so your children feel settled and excited to start at our centre.

Having complete the orientation sessions we find that parents and children are familiar with the environment and educators and it does not take long for children to settle.

There are some important things you need to make sure you have completed before the first day. Please use New Family Checklist to remind you of task needing to be completed.

We also recommend you read the Parent Information section of the website to review the following:

* [Settling Tips](/parents/settling-tips/)
* [Frequently Asked Questions?](/parents/faqs/)
* [FAQ: What should my child wear to the centre?](/parents/faqs/)
* [FAQ: What to Pack in Your Child’s Bag?](/parents/faqs/)

repository: thriveweb/great-start-elc

gha_language: JavaScript

repo_name: thriveweb/great-start-elc


text:
# Virtualized Windows 11 with GPU passthrough

[Arch Wiki: PCI passthrough via OVMF](https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF)

Big thanks to Joona Halonen for
[his instructions](https://github.com/JoonaHa/Single-GPU-VFIO-Win10/)!

Install the necessary software on the host
- QEMU is the emulator
- OVFM is the UEFI firmware for the VM
- Virt-manager is the GUI for configuring the VM
``` bash
sudo apt install qemu ovmf virt-manager
```

Create the VM using virt-manager.
For the best performance the disk should not be a file on the host filesystem,
but instead a separate LVM volume as instructed
[here](https://bashtheshell.com/guide/configuring-lvm-storage-for-qemukvm-vms-using-virt-manager-on-centos-7/).
Using a ZFS zvol is also possible,
but creating snapshots
[is not practical](https://www.reddit.com/r/zfs/comments/4oa4xb/comment/d4bofw9/),
as they consume the same amount of space as the original zvol.

### VM installation
Virt-manager settings
- Chipset
  - Q35 is for modern quests with PCIe
  - i440FX is for legacy quests
- Firmware
  - `OVMF_CODE_4M.ms.fd` or similar has support for Secure Boot with the
    Microsoft Windows keys
- Boot Options: ensure that the SATA CDROM drive is enabled in the boot device order
- Disk bus
  - Select VirtIO, as it's significantly faster
  - [Installing VirtIO drivers during Windows installation](https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Virtio_disk)
    requires,
    that you add a second SATA CDROM drive using the Add Hardware button.
  - Download the
    [VirtIO Windows drivers](https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md)
    and attach it to the second SATA CDROM drive.
    Please note that the drivers may not be WHQL signed and may therefore cause issues with Secure Boot
    as described later.
    This is a [known issue](https://bugzilla.redhat.com/show_bug.cgi?id=1844726),
    as fully WHQL signed drivers are only provided for Red Hat enterprise customers.
- Add a TPM
  - Model: CRB (it's a
    [newer and simpler](https://kevinlocke.name/bits/2021/12/10/windows-11-guest-virtio-libvirt/)
    implementation than TIS)
  - CRB only supports TPM >= 2.0, so the version choice should not matter.

Once the settings are configured, start the VM.
Don't close the settings window instead, as your settings are not saved until you start the installation.
Start the Windows installation.
When prompted for the storage drivers, select "Load driver", click OK and select "E:\amd64\w11\viostor.inf".
When you reboot after the installation, you may get the bluescreen error "Kernel security check failure".
If this happens, just let Windows to fix it on its own, and reboot the virtual machine.
This is likely caused by the signing issues of the VirtIO storage driver.
Don't log in with your Microsoft account during the installation,
and instead skip it using the
[instructions on my website](https://agx.fi/it/checklists.html#windows-installation).

### GPU setup
- Attach the GPU PCIe devices in the virt-manager VM settings
- Boot the VM
- If the driver does not load due to e.g. Code 43, follow the
  [Arch Wiki instructions](https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Video_card_driver_virtualisation_detection)
  to hide the virtualization from the driver

### Performance tuning
- Add a network controller with "Device model: virtio"'
  - This may give you the aforementioned blue screen, but Windows will fix it on its own by disabling the device.
- CPU pinning: follow the
  [Arch Wiki instructions](https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#CPU_pinning)
  - Use fixed cores in the XML
  - Disable these cores for the host
  - Use IO threads for the VirtIO disk
- If using an AMD CPU, enable the TOPOEXT flag with the
  [Arch Wiki instructions](https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Improving_performance_on_AMD_CPUs)
- Configure huge pages
  - Enable huge pages in the VM settings
  - Use the scripts from this repo to reserve the memory or use your own configs

### Issues
Nvidia dmesg spam
- This can cause lag spikes! (Based on my personal experience.)
- [Reddit](https://www.reddit.com/r/VFIO/comments/dhdkiv/stop_modprobe_spam/)
- [Reddit 2](https://www.reddit.com/r/VFIO/comments/90tg4h/comment/e2tppqv/)
- [Launchpad](https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1824177)
- [Launchpad 2](https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1655584)

Add this to your `/etc/modprobe/some-nvidia-script.conf`.
Replace the version number with the one you're using.
```
blacklist nvidia
blacklist nvidia_drm
blacklist nvidia_modeset
blacklist nvidia_uvm

blacklist nvidia_370
blacklist nvidia_370_drm
blacklist nvidia_370_modeset
blacklist nvidia_370_uvm

alias nvidia off
alias nvidia-uvm off
alias nvidia-modeset off
alias nvidia-drm off
```
You may also have to add the GPU UIDs to the kernel parameters to prevent the Nvidia driver from grabbing the device.

repository: AgenttiX/linux-scripts

repo_name: AgenttiX/linux-scripts


text:
django-pagination
=================

A set of utilities for creating robust pagination tools throughout a django application.

This modification includes paginate_by tag for multi choice objects per page.

Installation:
=================
In 'settings.py' add following lines (if they aren't already added):

```python
TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.media",
    "django.core.context_processors.request",
    "django.contrib.messages.context_processors.messages",
    "django.core.context_processors.static",
)
```

In the MIDDLEWARE_CLASSES add ```'pagination.middleware.PaginationMiddleware'```

And in the INSTALLED_APPS add ```'pagination'```

Example:
=================
```{% perpageselect 10 20 30 %}``` will show dropdown list with choices 10, 20 and 30 objects per page.
```{% perpageanchors 10 20 30 %}``` will show anchors with choices 10, 20 and 30 objects per page.

Usage:
=================
```
{% load pagination_tags %}

    {% autopaginate object_list 10 %} <!--OR THIS {% perpageselect 10 20 30 %} -->
        {% for post in object_list %}
           bla-bla-bla
        {% endfor %}
    {% paginate %}
```

repository: maksymx/django-pagination

repo_name: maksymx/django-pagination


text:
# Thistlewaite's Algorithm

<image src="assets/Cube2.png" height="500"/>

**Left - Blue, Front - Red, Right - Green, Back - Orange, Up - Yellow, Down - White**

- Algorithm to solve Rubik's Cube.

- It consists of 4 Phases , in my implementation , it can take upto 58 moves to solve the Rubik's Cube.

- In Phase 1 , all the bad edges are fixed. A edge is good if it can be taken to its orginal position without using U or D moves, else it is bad. After this the cube can be solved without using the moves U and D.

- In Phase 2, place all the blue and green facelets on either left or right face. To make things easier, consider both blue and green faclets as a single color, say blue. Once this is done, we can solve this state without U,D,F,B moves.

- Phase 3 is split into 2 parts - 3A and 3B

- My implementation of Phase 3 is different from the Thistlewaite's algorithm, mainly becuase i didn't understand what he meant in his paper 😅.

- In Phase 3A, place all colors either on its corresponding face or its oppossite face, i.e we bring the cube into a state such that all red and orange facelets are either in front or back face, all blue and green facelets are in left or right face, and all yellow and white facelets are in top or bottom. In other words, consider red and orange facelets as red, blue and green facelets as blue, and yellow and white facelets as yellow and then solve the cube.

- In Phase 3B, the cube is brought into a state in which all the corners of the same color can be brought back to the same face with only double moves, i.e there can be only even number of coners of the same color in one face and on super superimposing any face and its oppossite face, corners of the same color can have either 0 or 2 overlaps. You can try this yourself, just take a solved Rubik's Cube and shuffle it with only moves in Group 4. Once this state is acheived, the cube can be solved using just double moves. Some example for invalid states are :

  <image src="assets/1n.png" height="150"/>
  <image src="assets/2n.png" height="150"/>

- In Phase 4, solve the cube by bringing every corners and edges to its actual place by using only 180-degree turns.

- Refer https://www.jaapsch.net/puzzles/thistle.htm for more infomation.

| Phase           | 1     | 2         | 3A      | 3B      | 4           |
| --------------- | ----- | --------- | ------- | ------- | ----------- |
| Max Moves       | 7     | 11        | 11      | 14      | 15          |
| No.of States    | 2,048 | 1,082,565 | 4,900   | 144     | 663,552     |
| Forbidden Moves | \_    | U,D       | U,D,F,B | U,D,F,B | R,L,U,D,F,B |

# How to Run this

- The Lookup table is already generated and can be found under the folder Lookup Table.

- The code used to generate these lookup tables can be found under the folder named Generators.

  ## Python

  - Copy the files Solve.py and RCube.py under the folder Tester and paste it inside the Lookup Table folder.

  - You will need python 3 to run this.

  - To install the required modules, run `pip3 install -r requirements.txt`

  - Now run `python3 Solve.py` and input the shuffle. Thats it!

  ## C++

  - Copy the files Solve.cpp under the folder Tester and paste it inside the Lookup Table folder.

  - compile the code with `g++ Solve.cpp`.

  - Now run `./a.out` and input the shuffle. Thats it!

  <image src="assets/Solve.gif" height="500"/>

branch_name: refs/heads/main


text:
Test Ground Weekly
===

###### tags: `IPFS` `Testing`

:::info
- **Host:** @daviddias
- **Location:** https://protocol.zoom.us/my/daviddias
- **Date:** Oct 29, 2019 5:00 PM (UTC)
- **Participants:**
    - @daviddias
    - @raulk
    - @jimpick
    - @momack2
    - @stebalien
- **Agenda**
  1. Sprint Update `20min`
  2. Identify blockers / Answer Questions `20min`
  3. This week's planning `20min`
- **Reference:**
  - [Last week meeting minute](https://github.com/ipfs/testground/pull/69)
  - [Trello Board](https://trello.com/b/O9z3ljaH/testground-ignition-%F0%9F%9A%80)
  - [Testing Infra Design](https://github.com/ipfs/testground/blob/master/docs/SPEC.md)
  - [Testing Inventory](https://github.com/ipfs/testground/blob/master/docs/test-inventory.md)
  - [Testing Improvement Tracker](https://docs.google.com/spreadsheets/d/1xyqyGUF-oe3x9ln88YonVeOMWWdknik74lVgL_3dBY8/edit#gid=0)

:::

## :mega: Update (Done, Shipped, Made Progress)

- ==@raulk==
    - Preparing Testground Hack Week...
    - Catching up with things across the board after returning from the oriental tour.
    - Finishing up exec:go builder (builds a test plan into a go executable, Dockerless) and local:exec runner (runs an executable). -> https://github.com/ipfs/testground/pull/86
- ==@daviddias==
  - This last week was slow for me as notified in the [previous update (🦷 + ✈)](https://github.com/ipfs/testground/blob/master/_meeting-notes/2019-10-22.md#mega-update-done-shipped-made-progress)
  - My sidequest of getting the go-ipfs as a Library tutorial is now complete
    - https://github.com/ipfs/go-ipfs/tree/master/docs/examples/go-ipfs-as-a-library
    - PR - https://github.com/ipfs/go-ipfs/pull/6695
    - Post - https://ipfs.io/blog/073-go-ipfs-as-a-library/
  - Continue the work on the Plan 1 - Chew Large Datasets https://github.com/ipfs/testground/pull/58
  - Continue the work on creating the Spec for the Test Plans
    - Augmented the plans and moved the existing ones to their own folder https://github.com/ipfs/testground/pull/77
    - Reviewed Steven's review https://github.com/ipfs/testground/pull/81
- ==@jimpick==
  - Discussed with Dirk about bitswap tests + AWS credentials
    - https://github.com/ipfs/testground/pull/82
  - Ansible!
    - https://github.com/ipfs/testground/issues/84
    - (spent the whole weekend learning it)
    - Dynamic inventory for a cluster using EC2 tags
    - Connectivity test
    - Redis
    - Filebeat
    - Networking (GRE tunnels variant)
- ==@stebalien==

## :question: Questions (Blockers, Technical Design needs)
> We only have 30 mins for this section, use your time wisely

- (@dirkmc, 5 min)
  - I have good knowledge of Bitswap codebase but not as much knowledge of Bitswap in the wild
    I'd love to get some feedback on parameters for a realistic, real-world scenario
    - Session Discovery (session queries connected peers and then asks DHT)
    - How often do timeouts actually occur in practice once a peer has connected?
    - Ephemeral nodes
    - Request patterns: Wikipedia vs Large file vs Small files vs ...
  - I think it makes sense for me to start helping out with testground (beyond just writing tests 🐹)
    - Is testground at a point where that makes sense?
      - A: Yes.
    - Is there a good chunk for me to break off and work on?
      - A: No, it would be better if you interfaced with the team as a user and builder of one of the plans. (I'm sure you will find bugs along the way and provide patches)
- (@jimpick, 5min)
  - Looping over test variants ... how to do it?
  - continuation of discussion from last week, but with Raul
  - eg. "seeds/peers" combinations https://github.com/ipfs/testground/pull/82
    - Answer:
      - Test Case is a just template/behaviour
      - The "looping over test variants" sits a layer above the Plans. Examples:
        - In the Github Integration
        - In the Test Ground runner process
      - A Test Case is run with specific parameters on a trigger event. This trigger event can be: CLI call, a Github event, etc
      - We might get concept of recipes (a base config to run the multiple cases in a plan)
- (@daviddias, 5min) Trello doesn't seem to be working, we still love Kanban.
  - People are not visiting Trello often
  - Information in Trello is different from Github. Requires constant sync'ing
  - Proposal: Move to ZenHub
    - Information will all live in Github issues (where developers love it)
    - It will give the Project Manager the view it needs to understand progress
    - Open Source Contributors will always have access to the information about the project
    - Less one spot to maintain information
  - Votes
    - Yes: David, Raul <= Yes won, we now use Zenhub, see #92
    - No:
    - No opinion: Jim
- (@jimpick, 5min)
  - Cluster setup demo (AWS/Ansible)
- (@jimpick, 5min)
  - Simplified cluster runner proposal
  - https://trello.com/c/2MJwZ71P/68-multi-machine-ssh-or-http-api-runner

## :dart: Next

### OKRs for the Quarter

![](https://raw.githubusercontent.com/ipfs/testground/master/docs/img/Q4OKRs.png)

### Top 3 things to get done this week

- "A Test Plan" is complete (end to end, meaning: we spawn nodes, we run the test on AWS infra from our own local box and we see results in Kibana)
- Prepare for Hack Week (folks, free your schedule, it will be a week of HACKIIING)
- (When Test Plan 2 is done) Onboard other folks to contribute specific Test Plans to Test Ground

### Assignments

- ==@raulk==
  - Create an issue to conceptualize the notion of Test Plan Recipes
  - Preparing the logistics and activities for the Hack Week
  - Complete the runner local:go
  - Review the Roadmap PR https://github.com/ipfs/testground/pull/75
- ==@jimpick==
  - Get smlbench2 code-reviewed and merged to master somewhere as an example (it's a subset of test plan 2 / bitswap test)
  - Get ansible automation and packer template merged
  - Prototype super-simple test runner (non-Docker Swarm) so we can experiment as a team next week
  - Help Dirk with bitswap test case
  - Discuss ideas for higher level of automation (auto-provisioning EC2 machines), self-serve platform
- ==@daviddias==
  - (Now that Raul is back) Schedule a Pair Programming session to review Test Plan 2 for the Week of Oct 28 (this week)
  - Deliver Plan 1 - Chew Large Datasets in time for Hack Week
  - Finish reading the golang programming book 😅
  - Clarify on what are the expectations on how to use the team Kanban
  - Move the Kanban to Zenhub
- ==@stebalien==
  - ???
- ==@dirkmc==
  - Materialize the Bitswap Test Plan Spec into code
    - Needs: Traffic Shapping
  - Interview Jim & Steven on Bitswap in the wild + take notes to share with the group

:::info
When the meeting is over, push notes to https://github.com/ipfs/testground/tree/master/_meeting-notes and verify that trello is up to date https://trello.com/b/O9z3ljaH/testground-ignition-%F0%9F%9A%80
:::

gha_license_id: NOASSERTION


text:
InterviewCheatSheet
===================

Cheat sheets made with latex for interview revision.

To build run:

```
make full
```

Output is located at `output/cheetsheet.pdf`

repository: sarahtattersall/InterviewCheatSheet

repo_name: sarahtattersall/InterviewCheatSheet


text:
# Monitoring your Aurora cluster

Before you start running important services in your Aurora cluster, it's important to set up
monitoring and alerting of Aurora itself.  Most of your monitoring can be against the scheduler,
since it will give you a global view of what's going on.

## Reading stats
The scheduler exposes a *lot* of instrumentation data via its HTTP interface. You can get a quick
peek at the first few of these in our vagrant image:

    $ vagrant ssh -c 'curl -s localhost:8081/vars | head'
    async_tasks_completed 1004
    attribute_store_fetch_all_events 15
    attribute_store_fetch_all_events_per_sec 0.0
    attribute_store_fetch_all_nanos_per_event 0.0
    attribute_store_fetch_all_nanos_total 3048285
    attribute_store_fetch_all_nanos_total_per_sec 0.0
    attribute_store_fetch_one_events 3391
    attribute_store_fetch_one_events_per_sec 0.0
    attribute_store_fetch_one_nanos_per_event 0.0
    attribute_store_fetch_one_nanos_total 454690753

These values are served as `Content-Type: text/plain`, with each line containing a space-separated metric
name and value. Values may be integers, doubles, or strings (note: strings are static, others
may be dynamic).

If your monitoring infrastructure prefers JSON, the scheduler exports that as well:

    $ vagrant ssh -c 'curl -s localhost:8081/vars.json | python -mjson.tool | head'
    {
        "async_tasks_completed": 1009,
        "attribute_store_fetch_all_events": 15,
        "attribute_store_fetch_all_events_per_sec": 0.0,
        "attribute_store_fetch_all_nanos_per_event": 0.0,
        "attribute_store_fetch_all_nanos_total": 3048285,
        "attribute_store_fetch_all_nanos_total_per_sec": 0.0,
        "attribute_store_fetch_one_events": 3409,
        "attribute_store_fetch_one_events_per_sec": 0.0,
        "attribute_store_fetch_one_nanos_per_event": 0.0,

This will be the same data as above, served with `Content-Type: application/json`.

## Viewing live stat samples on the scheduler
The scheduler uses the Twitter commons stats library, which keeps an internal time-series database
of exported variables - nearly everything in `/vars` is available for instant graphing.  This is
useful for debugging, but is not a replacement for an external monitoring system.

You can view these graphs on a scheduler at `/graphview`.  It supports some composition and
aggregation of values, which can be invaluable when triaging a problem.  For example, if you have
the scheduler running in vagrant, check out these links:
[simple graph](http://<IP_ADDRESS>:8081/graphview?query=jvm_uptime_secs)
[complex composition](http://<IP_ADDRESS>:8081/graphview?query=rate\(scheduler_log_native_append_nanos_total\)%2Frate\(scheduler_log_native_append_events\)%2F1e6)

### Counters and gauges
Among numeric stats, there are two fundamental types of stats exported: _counters_ and _gauges_.
Counters are guaranteed to be monotonically-increasing for the lifetime of a process, while gauges
may decrease in value.  Aurora uses counters to represent things like the number of times an event
has occurred, and gauges to capture things like the current length of a queue.  Counters are a
natural fit for accurate composition into [rate ratios](http://en.wikipedia.org/wiki/Rate_ratio)
(useful for sample-resistant latency calculation), while gauges are not.

# Alerting

## Quickstart
If you are looking for just bare-minimum alerting to get something in place quickly, set up alerting
on `framework_registered` and `task_store_LOST`. These will give you a decent picture of overall
health.

## A note on thresholds
One of the most difficult things in monitoring is choosing alert thresholds. With many of these
stats, there is no value we can offer as a threshold that will be guaranteed to work for you. It
will depend on the size of your cluster, number of jobs, churn of tasks in the cluster, etc. We
recommend you start with a strict value after viewing a small amount of collected data, and then
adjust thresholds as you see fit. Feel free to ask us if you would like to validate that your alerts
and thresholds make sense.

## Important stats

### `jvm_uptime_secs`
Type: integer counter

The number of seconds the JVM process has been running. Comes from
[RuntimeMXBean#getUptime()](http://docs.oracle.com/javase/7/docs/api/java/lang/management/RuntimeMXBean.html#getUptime\(\))

Detecting resets (decreasing values) on this stat will tell you that the scheduler is failing to
stay alive.

Look at the scheduler logs to identify the reason the scheduler is exiting.

### `system_load_avg`
Type: double gauge

The current load average of the system for the last minute. Comes from
[OperatingSystemMXBean#getSystemLoadAverage()](http://docs.oracle.com/javase/7/docs/api/java/lang/management/OperatingSystemMXBean.html?is-external=true#getSystemLoadAverage\(\)).

A high sustained value suggests that the scheduler machine may be over-utilized.

Use standard unix tools like `top` and `ps` to track down the offending process(es).

### `process_cpu_cores_utilized`
Type: double gauge

The current number of CPU cores in use by the JVM process. This should not exceed the number of
logical CPU cores on the machine. Derived from
[OperatingSystemMXBean#getProcessCpuTime()](http://docs.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/OperatingSystemMXBean.html)

A high sustained value indicates that the scheduler is overworked. Due to current internal design
limitations, if this value is sustained at `1`, there is a good chance the scheduler is under water.

There are two main inputs that tend to drive this figure: task scheduling attempts and status
updates from Mesos.  You may see activity in the scheduler logs to give an indication of where
time is being spent.  Beyond that, it really takes good familiarity with the code to effectively
triage this.  We suggest engaging with an Aurora developer.

### `task_store_LOST`
Type: integer gauge

The number of tasks stored in the scheduler that are in the `LOST` state, and have been rescheduled.

If this value is increasing at a high rate, it is a sign of trouble.

There are many sources of `LOST` tasks in Mesos: the scheduler, master, slave, and executor can all
trigger this.  The first step is to look in the scheduler logs for `LOST` to identify where the
state changes are originating.

### `scheduler_resource_offers`
Type: integer counter

The number of resource offers that the scheduler has received.

For a healthy scheduler, this value must be increasing over time.

Assuming the scheduler is up and otherwise healthy, you will want to check if the master thinks it
is sending offers. You should also look at the master's web interface to see if it has a large
number of outstanding offers that it is waiting to be returned.

### `framework_registered`
Type: binary integer counter

Will be `1` for the leading scheduler that is registered with the Mesos master, `0` for passive
schedulers,

A sustained period without a `1` (or where `sum() != 1`) warrants investigation.

If there is no leading scheduler, look in the scheduler and master logs for why.  If there are
multiple schedulers claiming leadership, this suggests a split brain and warrants filing a critical
bug.

### `rate(scheduler_log_native_append_nanos_total)/rate(scheduler_log_native_append_events)`
Type: rate ratio of integer counters

This composes two counters to compute a windowed figure for the latency of replicated log writes.

A hike in this value suggests disk bandwidth contention.

Look in scheduler logs for any reported oddness with saving to the replicated log. Also use
standard tools like `vmstat` and `iotop` to identify whether the disk has become slow or
over-utilized. We suggest using a dedicated disk for the replicated log to mitigate this.

### `timed_out_tasks`
Type: integer counter

Tracks the number of times the scheduler has given up while waiting
(for `-transient_task_state_timeout`) to hear back about a task that is in a transient state
(e.g. `ASSIGNED`, `KILLING`), and has moved to `LOST` before rescheduling.

This value is currently known to increase occasionally when the scheduler fails over
([AURORA-740](https://issues.apache.org/jira/browse/AURORA-740)). However, any large spike in this
value warrants investigation.

The scheduler will log when it times out a task. You should trace the task ID of the timed out
task into the master, slave, and/or executors to determine where the message was dropped.

### `http_500_responses_events`
Type: integer counter

The total number of HTTP 500 status responses sent by the scheduler. Includes API and asset serving.

An increase warrants investigation.

Look in scheduler logs to identify why the scheduler returned a 500, there should be a stack trace.

repository: PacktPublishing/Mastering-Mesos

gha_language: Java

repo_name: PacktPublishing/Mastering-Mesos


text:
---
layout: default
---

# 1996-02-23 - opps, sorry about that last post

## Header Data

From: Ray Cromwell<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 884db40d9dde9912145bf711171994031c93b3eb29b92809b7cea8b81668cd2d

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-02-23 23:02:45 UTC

Raw Date: Sat, 24 Feb 1996 07:02:45 +0800

## Raw message

```
{% raw  %}From: Ray Cromwell<EMAIL_ADDRESS>Date: Sat, 24 Feb 1996 07:02:45 +0800
To<EMAIL_ADDRESS>Subject: opps, sorry about that last post
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

  I'm not really unsubscribing, I'm moving to a new host. Sorry about
the noise.

-Ray

{% endraw %}
```

## Thread

+ Return to [February 1996](/archive/1996/02)

+ Return to "[Ray Cromwell <rjc@clark.net>](/authors/ray_cromwell_rjc_at_clark_net_)"

+ 1996-02-23 (Sat, 24 Feb 1996 07:02:45 +0800) - opps, sorry about that last post - _Ray Cromwell<EMAIL_ADDRESS>


text:
---
layout: post
date: 2020-03-15
title: Tips for solo travel through Chiang Mai, Thailand
description: "I spent 10 days in Thailand in 3 areas: Bangkok, Phuket & Chiang Mai. I spent most of my time in Chiang Mai and absolutely loved it!"
tags:
    - post
    - travel
---
<!-- TODO: add some photos -->

Last month I spent 10 days in Thailand in 3 areas: Bangkok, Phuket & Chiang Mai. I just happened to spend most of my time (5 days) in Chiang Mai and loved it!

A couple people asked me to put together my recommendations for the second most populated city in Thailand so I've put together this quick list.

## Getting There

Chiang Mai was actually the last stop on my trip, I flew to Taipei (TPE) for a day, then Bangkok (BKK) for 2 days, and Phuket (HKT) for 4 days. Then, I finally flew in from HKT to Chiang Mai (CNX), then out of CNX to TPE where I connected back to Seattle (SEA).

There are also buses and trains to Chiang Mai from Bangkok, which took too long and I didn't think would be very fun while dragging a suitcase around.

From CNX to your hotel you can get a taxi at the airport for a decent fair. The airport is practically walking distance from the Old City, so your ride will be just a few minutes if you're staying in that area as I did.

## Money, money, money

Thailand, like other Asian countries, relies mostly on cash transactions. Credit cards are accepted at some places, but there may be extra fees associated with them. If you don't have one yet, get a bank account and debit card that has no ATM fees (or reimburses them every month). I use the Charles Schwab investor checking account. There are plenty of ATMs around, so if you run out of cash you won't be too far from one. Especially if you're not worried about ATM fees.

## Accommodations

Hotels in Chiang Mai are affordable around $100 USD per night for 3-4 star properties. I recommend staying in the Chiang Mai Old City, which is a large square surrounded by a moat. (Sorry, there are no drawbridges to be found). The old city is centrally located and pretty walkable to the many activities.

## Getting Around

If you've never been in a tuk tuk taxi or auto rickshaw, they're definitely worth the experience. For longer rides though, I recommend using the Grab app which is similar to Uber/Lyft but, you'll pay in cash instead. Grab is definitely the most convenient way to get around and comparable to regular taxi rates.

Honestly though, I just love exploring cities on foot. I was averaging about 8 miles of walking per day in Chiang Mai some days I didn't even realize it.

## Activities

This entire Thailand trip was kind of crazy because I didn't get time to  book a single activity before I left home. I had to rely on the hotel concierge to help with reserving activities, this ended up being a great move because they spoke Thai (for the local companies) and very good English (for me).

That said, here's how I spent my 5 days in Chiang Mai!

* Sunday walking night market, an absolute must! This night market goes on for blocks with lots of back alleys and side streets. Loads of variety of souvenirs and tasty street food. I recommend going earlier rather than later, some of the food stalls were closed by the time I got there. Don't forget to bargain!
    - Bargaining 101: start by asking to cut the prince in half
* Temples
    - Golden Temple, was under construction but still some cool stuff around it
    - Silver Temple, women aren't allowed inside but there's some really cool artwork inside
    - Some other random temples I found by just walking around
* Doi Inthanon National Park - I booked a tour through Journey Smile, they picked me up from my hotel along with other folks from their hotels. Great English speaking tour guide and he took us to a few interesting stops up the mountain. It was great to get away from the heat for the day, check the forecast and at least bring a hoodie because it's cooler at the summit - the tallest point in Thailand!
* A cooking class! I think I booked it the day before through Thai Farm Cooking School. They took us to a local market in the morning, a tour of the farm, then we cooked 5 dishes! Really cheerful instructor and you're able to tailor your individual menu based on your preferences. Thai food is my favorite cuisine so this was a real treat for me.
* Day trip to Chiang Rai, mainly just to see Wat Rung Khun (white temple). For about $20 USD you can get a roundtrip bus from Greenbus from Chiang Mai bus terminal 3 to Chiang Rai bus terminal 1. I ended up booking busses 5 hours apart which was plenty of time to explore on foot, check out the Kok river, see a few temples, and of course eat!
* Kanta Elephant Sanctuary. ELEPHANTS! I was actually super nervous about doing any sort of elephant activity because I'd read so many negative things about elephant tourism in Thailand. It's safe to assume that all elephant riding programs are unethical. Kanta is one of the most well known and ethical elephant sanctuaries, with retired elephants from the tourism industry. This is an absolute must in Chiang Mai if you can make it happen!
* Also get a massage. If you're like me and not really into (Thai style) massages - get a foot or shoulder/neck massage. You'll probably need a foot message if you're exploring the city in foot as much as I was!

## Food

You can eat lunch/dinner at your hotel, but why would you? (I'll admit, I did once but only after a busy day of exploring and I was exhausted by the time I got back.)

The Old City has plenty of restaurants and street vendors during the day. There's also the Chiang Mai Night Bazaar which has plenty of street food and food court style restaurants. Nimman area is west of the Old City and has a more westernized vibe, plenty of great restaurants and coffee shops on that side. I had some amazing, and very spicy, Laab Gai/Kai (minced chicken salad) which was something I'd been craving for weeks and hadn't found elsewhere.

I found a great gluten free & vegan restaurant near the Silver Temple so I was able to enjoy some really tasty gluten free Khao Soi (the signature dish of Chiang Mai and northern Thailand). They also had an epic gluten free passion fruit cake!

## Thanks for reading!

Chiang Mai was one of my favorite cities I've ever visited and highly recommend it to anyone for vacation!

gha_language: Pug


text:
## Antagonism-based community detection

Developed by [Alexis Jacomy](https://github.com/jacomyal) for the [Contropedia](http://contropedia.net/) project.
Plugin released under the [MIT License](https://github.com/jacomyal/FriendshipsPlugin/blob/master/LICENSE.txt).

This Gephi plugins aims to find communities when edges are connecting enemy nodes.

Here is how it works:

 1. The plugin computes a friendship score between each pair of nodes.
   - The more common enemies two nodes have, the higher their score will be.
   - The more connected two nodes are, the lower their score will become.
 2. All original edges are removed.
 3. Each pair of nodes that has a score higher than the threshold will become connected.
 4. The Modularity algorithm is then used to detect communities, on the new graph.
 5. Finally, unless the `Override edges` flag is set to true, the new edges are removed and the original ones are restored again. Be aware that if you set the `Override edges` flag the orginal network will be lost (unless you reload the orginal data).

Finally, you can represent the communities as colors through the `Partition > Nodes` panel (selecting Modularity).

### Details of the algortihm for calculation the friendship score:

#### Parameters of the Algorithm:

 - **pd** = Direct Connection Penalty (should be a value below 0)
 - **ct** = Common neighbours score (transitive node, `A->C->B`)
 - **cg** = Common neighbours score (common traget node, `A->C<-B`)
 - **co** = Common neighbours score (common source node, `A<-C->B`)
 - **c** = Common neighbours score (undirected network, `A-C-B`). In the case of an undirected network the parameters ct, cg and co have to be set all to the same value (which we refer to as c from now on) otherwise the result of the algorithm will be depending on the internal representation of the undirected nodes in Gephi.
 - **t** = treshold for the establishement of a friendship link

#### Example
Network: A, B, C, D nodes; w1, w2, w3, w4, w5 edge weights

````
    D
   / \
 w4   w5
 /      \
A---w1---B
 \      /
 w2   w3
   \ /
    C
````

We calculate the friendship score `s` of A and B with the following formula (we only use an undirected network):
````
s(A, B) = pd * w1 + c * (w2 + w3 + w4 + w5)
````

And for A and C it is:
````
s(A, C) = pd * w2 + c * (w1 + w3)
````

All common neighbours of two nodes are contrasted with the weight multiplied by the penality factor `pd` of the conenctin between these two nodes.

A and B are linked if: `s(A, B) > t`

repository: rmarshasatx/ABCD-Gephi-Plugin

repo_name: rmarshasatx/ABCD-Gephi-Plugin


text:
# RHOCI

[![Build Status](https://travis-ci.org/bregman-arie/rhoci.svg?branch=master)](https://travis-ci.org/bregman-arie/rhoci)

RHOCI (Red Hat OpenStack CI)

A web service that meant to enhance Jenkins user experience for Red Hat OpenStack CI users.
There is an effort to create a more generic project [here](https://github.com/bregman-arie/infuse) that will allow you to use it with any Jenkins server.

Some of the things this project allows you to do:

    * View all jobs in one datatable where you can filter them based on different parameters
    * View all builds in one datatable where you can filter them based on different parameters
    * View all unique tests and how many times they failed or passed
    * Generate job definitions based on given input
    * Analyze build failures

* [Requirements](#requirements)
* [Installation](#installation)
* [Getting Started](#getting-started)
* [Configuration](#configuration)
* [API](#api)

## Requirements

* Python >= 2.7

## Installation

    sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    sudo yum install -y httpd python-pip python-virtualenv gcc
    virtualenv .venv && source .venv/bin/activate
    pip install .

Note that you can instead run the following two scripts

    chmod +x scripts/initial_setup.sh && scripts/initial_setup.sh
    chmod +x scripts/quick_run.sh && scripts/quick_run.sh

## Run RHOCI

    rhoci-server

## Configuration

RHOCI loads configuration in this order:

    Default config.py - built-in. Part of RHOCI code base.
    Environment varliabes - any of the environment vairables specified in the table below that the user export (e.g. `export RHOCI_SERVER_PORT=80`)
    Configurtion file - the default configuration file (/etc/rhoci/server.conf) or the file you mentioned with parser/environment variable.
    Parser - arguments you pass with rhoci command-line invocation.

| Name | Description | Required | Default |
| ---- | ----------- | -------- | ------- |
| `RHOCI_JENKINS_URL` | Jenkins URL | Yes | -
| `RHOCI_JENKINS_USER` | Jenkins username | Yes | -
| `RHOCI_JENKINS_PASSWORD` | Jenkins username | Yes | -
| `RHOCI_CONFIG_FILE` | The configuration file from where to load additional configuration | No | /etc/rhoci/server.conf
| `RHOCI_DEBUG` | Turn on DEBUG | No | False
| `RHOCI_SERVER_PORT` | The port to use when running RHOCI server | No | 5000
| `RHOCI_UPDATE_INTERVAL` | The interval in seconds for to pull update from Jenkins | No | 3600 (Seconds)

A sample can be found in samples/server.conf

## API

API is documented in /doc view and generated automatically

## The technologies behind RHOCI

* Flask
* SQLite
* Patternfly

## Overview

## Screenshots

### Home page

## How to add a new page

* Create the html templates in rhoci/rhoci/templates/<new_page_name>.html
* Add a new entry in rhoci/rhoci/views/__init__.py
* Add a new view in rhoci/rhoci/views/<new_page_name>.html
* Add a new item to 'views' variable in rhoci/rhoci/web.py
* Add it to the navigation bar in rhoci/rhoci/templates/navbar.html

repository: ssbarnea/rhoci

repo_name: ssbarnea/rhoci


text:
_Note:_
This one is special because it provides a unique flow to get someone set up with Monero from start to finish. Please feel free to make changes to the flow I have provided by either addings, taking away, or changing categories. It'd be best if you make a new file called using-yourhandle.md to differentiate it from mine. Hope to see what people have worked up.

# Using Monero

Using Monero is easy, and there are a variety of tools and guides available to help newcomers. This page will guide you through the basics.

# Start Here

Monero is a cryptocurrency that allows anonymous transactions around the world. Monero stands on pillars of security, privacy, and decentralization, and the community and developers are committed to protecting these values. We suggest learning more about how Monero works and reading the Ideals page. The source code for Monero and all our official clients are available for public view and discussion on Github.

- Ideals

- Learn Basics

- Source Code

# Support

Before reading further, it is important to know that there is a large, supportive community that can assist if your run into trouble. If you have questions about anything, no matter how large or small, please see our Hangouts page to find places to ask these questions.

-	Hangouts

-	FAQs

# Getting a Wallet

You need somewhere to store physical cash such as your bank, your wallet, or under your mattress. Although Monero is an entirely digital asset (you cannot touch them!), you still need a place to store them. This is done in a digital wallet. You oversee securing your own funds, and there is no way to restore them if you make a mistake. Thus, take great care in selecting the right wallet for you. Some are safer and others are more convenient than others.

- Compare Wallet Options

- Official Downloads

# Getting Monero

Empty wallets are no fun! Let’s get some Monero in there! You can receive Monero from someone else, or purchase some on an exchange. We do not endorse specific services, but you can view the exchanges that support Monero on the Merchants page. Depending on the exchange, you can buy Monero from several currencies including USD, EUR, and Bitcoin. For price speculation and talk, join the active trading discussion at #monero-markets.

-	Exchanges (goes to portion of the merchants page I think)
-	ATMs (when applicable)
-	#monero-markets

# Transfering Monero

It is typically a poor idea to leave a large amount of money on an exchange.  Learn how to send and receive Monero by viewing our guide, and learn about your risk exposure.

-	Sending and Receiving Monero

# Now What?

You now have Monero and know how to use it! Monero, like cash, can be used for many goods and services. For a list of some groups that accept Monero directly, see our Merchants page. Other services make it easy to pay Bitcoin addresses with the privacy of Monero.

- Merchants

- Easily pay Bitcoin addresses

repository: AltcoinCoop/monero-site-framework

repo_name: AltcoinCoop/monero-site-framework


text:
## RailsDatatables

A simpler, Rails-friendly interface to using the [DataTables](http://datatables.net) jQuery library.

### Prerequisites
Make sure you have jQuery.js and jQuery.dataTables.js in /public/javascripts/ and that they're included in your layout.

### Setup

Give table a class of 'datatable' so that the Javascript knows which table to alter. NOTE: If you want to use multiple tables on a single page, include the :table_dom_id in the options hash to specify the ID table to be altered.

Add thead around the table header (These elements will associate to the columns array created below, allowing sorting).

Add tbody around the table rows (These are the elements that will be sorted and paginated.)

Activate using <%= datatable() %>, passing in the columns, how to filter them (sorting type), and any other settings (ajax source, search?, label for search, processing image)

    <% columns = [{:type => 'html', :class => "first"}, {:type => 'html'}, {:type => 'html'}, {:type => nil, :class => "last"}] %>
    <%= datatable(columns, {:sort_by => "[0, 'desc']", :processing => image_tag("spinner.gif") }) %>

          Name
          Account Level
          Email
          Actions

        <%- @users.each do |user| -%>
          <tr id="<%= dom_id(user) %>">
            <%= user.name %>
            <%= user.account.account_level.name %>
            <%= user.email %>
            <%= link_to "Edit", edit_system_user_path(user) %>

        <%- end -%>

### Options

#### Table Options

    :sort_by - array, default column number (0 - n-1) and sort order. e.g. "[2, 'desc']". Defaults to initial order.
    :search - boolean, display the search field. Defaults to true.
    :search_label - string, the label for the search field. Defaults to "Search".
    :processing - string, the text or image to display while processing data. Defaults to "Processing".
    :persist_state - boolean, remember the sorting and page of the tables for the user. Defaults to true.
    :additional_data - hash, pass along additional data, such as filter values. Default is none.
    :table_dom_id - string, the ID of the table to alter. If nothing is passed, it will look for a class of 'datatable'. Necessary if you want to have multiple DataTables on a single page.
    :jqueryui - enable the JQuery UI element styling (ThemeRoller support). Default is false.
    :per_page - the number of rows to show per page (renamed from display_length)
    :append - functions to all at the end of the dataTable() call. Useful for [Datatables plugins](http://www.datatables.net/plug-ins/api)
    :no_records_message - Message to display if no records are found, whether on load or after searching
    :auto_width - Automatically adjust the width of the columns. Defaults to true.
    :row_callback - a function to run on each row in the table. Inserted in to "'fnRowCallback': function( nRow, aData, iDisplayIndex ) {  }". See [documentation for fnRowCallback](http://www.datatables.net/usage/callbacks) for more information.
    :pagination - boolean, turn pagination on or off.  Defaults to true.

#### Column Options

    :class - string, the class to assign to the table cell. Default is none.
    :type - string, the type of content in the column, for non-Ajax tables. 'html' will strip all HTML and sort on the inner value, as a string. Default is string.
    :sortable - boolean, allow this column to be sorted on. Default is true.
    :searchable - boolean, allow this column to be searched, for non-Ajax tables. Default is true.

#### AJAX Options

  When you're working with large datasets it's not reasonable to load everything on page load. Use an :ajax_source to load just the records that are being displayed, do custom searching (DB, Solr, etc).

    :ajax_source - string, for large datasets, use an ajax source to load each page on its own. For smaller datasets, just load the whole set and let datatable do the sorting

Add a datatable method on your controller to return JSON
* Return the objects to be displayed
* Return the total number of objects
* Add a method to handle sorting - DataTables returns the column that is being sorted (0 - n), so you need to know which column is which and sort on it.

### AJAX Example

#### Datatable view example - datatable.html.erb

    {"sEcho": <%= params[:sEcho] || -1 %>,
     "iTotalRecords": <%= @total_objects %>,
     "iTotalDisplayRecords": <%= @total_object %>,
     "aaData":[
    <% @objects.each do |object| %>
      ['<%= link_to(object.user.name, user) %>',
       '<%= object.description || "-" %>',
       '<%= object.created_at %>'
      ],
    <% end %>
    ]}

####  Controller example - using will_paginate

    def datatable
      @objects = current_objects(params)
      @total_objectss = total_objects(params)
      render :layout => false
    end

    private

    def current_objects(params={})
      current_page = (params[:iDisplayStart].to_i/params[:iDisplayLength].to_i rescue 0)+1
      @current_objects = Object.paginate :page => current_page,
                                         :include => [:user],
                                         :order => "#{datatable_columns(params[:iSortCol_0])} #{params[:sSortDir_0] || "DESC"}",
                                         :conditions => conditions,
                                         :per_page => params[:iDisplayLength]
    end

    def total_objects(params={})
      @total_objects = Object.count :include => [:user], :conditions => conditions
    end

    def datatable_columns(column_id)
      case column_id.to_i
      when 1
        return "objects.description"
      when 2
        return "objects.created_at"
      else
        return "users.name"
      end
    end

    def conditions
      conditions = []
      conditions << "(objects.description ILIKE '%#{params[:sSearch]}%' OR users.name ILIKE '%#{params[:sSearch]}%')" if(params[:sSearch])
      return conditions.join(" AND ")
    end

### Note
There is a more functionality offered by DataTables than this plugin currently provides. We add to it as we find need for other features. If there's a feature of DataTables that you'd like to see, fork this repo and add it so we can all benefit.

### Credits

Copyright (c) 2009 [Phronos](http://phronos.com), released under the MIT license
Copyright (c) 2011 Jon Bringhurst<EMAIL_ADDRESS>released under the MIT license

repository: ehayon/Device-Monitor

repo_name: ehayon/Device-Monitor


text:
A library can provide its configuration options to be managed by the runtime. The configuration usually consists of two parts:

* **.NET container** providing type safe access to option values.
* **Standard PHP options** identified by string name with additional access flags.

### Step 1. Registering .NET container

The first step is to provide a class instance implementing `IPhpConfiguration` containing the default option values. The instance is registered once (e.g. in a static constructor) by calling `Context.RegisterConfiguration<MyConfiguration>(myConfiguration)`. This tells the runtime that there is a `MyConfiguration` container.

The runtime (*Context*) then manages the configuration `MyConfiguration`, clones its instance for every new instance of *Context* to maintain different values in the context of different web requests and provides this instance through *Context.Configuration* service.

### Step 2. Associating configuration with standard PHP options

In order to provide an implementation of the standard PHP functions `ini_get`, `ini_set`, `ini_restore`, `ini_get_all` etc., PHP options by their PHP name should be registered separately. The registration is called once per option (e.g. in a static constructor) by calling `StandardPhpOptions.Register("option.name", IniFlags, GetSetDelegate)`.

This creates the option descriptor providing additional flags and a delegate handling option value setter and getter. The delegate gets an instance of `IPhpConfigurationService` providing instances of the registered configurations from step 1.

repository: peachpiecompiler/peachpie-docs

gha_language: PowerShell

repo_name: peachpiecompiler/peachpie-docs


text:
# Coinalist
High level cryptocurrency exchange-agnostic framework for real time monitoring, trading and analytics. Based on easy to use "streams" and "observables" paradigm, as specified and implemented by [ReactiveX](https://github.com/ReactiveX/rxjs).

Status: alpha

```
const coinalist = require('coinalist');
const { config, exchange: { ExchangeBinance } } = coinalist;
const { BTCUSD, BTCUSDT } = config.market.values;
const { BUY, SELL } = config.side.values;

const exchange = new ExchangeBinance();
exchange.init([BTCUSDT,]);

const marketBook = exchange.markets[0].books[BUY];
marketBook.subscribe(marketBook => {
  console.log('Order book (top etries):\n', marketBook.orders);
});
```

Expected output on the order book updates:

```
...
Order book (top etries):
 [ [ 7628, 4.238912 ],
  [ 7627, 27.943388 ],
  [ 7626.33, 0.07916 ],
  [ 7626.2, 0.655634 ],
  [ 7625.55, 0.001312 ],
  [ 7625.07, 0.011624 ],
  [ 7625.02, 0.0014 ],
  [ 7625, 0.334699 ] ]
Order book (top etries):
 [ [ 7628.34, 1 ],
  [ 7628, 4.238912 ],
  [ 7627, 27.943388 ],
  [ 7626.33, 0.07916 ],
  [ 7626.2, 0.655634 ],
  [ 7625.55, 0.001312 ],
  [ 7625.07, 0.011624 ],
  [ 7625.02, 0.0014 ],
  [ 7625, 0.334699 ],
  [ 7612.41, 1.5 ] ]
...
```

repository: andrenerd/coinalist

gha_language: TypeScript

repo_name: andrenerd/coinalist


text:
# StageBrainz
A musicbrainz-inspired database for performing arts (theatre, dance, etc.)

# Mission
StageBrainz aims to be an open, free, online, crowdsourced overview of the performing arts.

# Data Model
As in Musicbrainz, StageBrainz has a limited number of core entities:
- Organities: persons, organisations, venues, etc. active in performing arts
- Productions: a stage production that will be performed repeatedly over the course of a season
- Shows: the actual performances of a stage production
- Works: conceptual creations, e.g. a theater text, from which stage productions can be derived
- Characters: fictional characters in works, e.g. Hamlet

And a number of auxiliary entities
- Genres: all sorts of genres for performing arts, e.g. dance, theater, theater for a young audience, ...
- Languages: ISO list of languages
- Locations: free street address text fields, with fixed city and country level
- Urls: links to online resources

Every core entity has a disambiguation line. Because of this, entities with duplicate names can have a disambiguation string in representation, e.g. 'Ancienne Belgique (Concert hall in Brussels)'.

Each entity, so both the core as well as the auxiliary entities, has a related X_type, e.g. a person (member of people) can be of type 'Actor' (a person_type).

INSERT UML TO SHOW TYPE RELATION

The core entities can also have an Alias of a certain AliasType. As an example, the Venue 'Ancienne Belgique' is 'abbreviated as' (i.e. the AliasType) 'AB'.

INSERT UML TO SHOW ALIAS + ALIASTYPE RELATION

Furthermore, each entity can be related to all other entities, including itself. It is therefore possible to make every kind of relation:

|              | Organities   | Works        | Characters   | Poductions   | Shows        | Genres       | Languages    | Locations    | Urls |
| ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ---- |
| Organities   | x            |              |              |              |              |              |              |              |      |
| Works        | x            | x            |              |              |              |              |              |              |      |
| Characters   | x            | x            | x            |              |              |              |              |              |      |
| Productions  | x            | x            | x            | x            |              |              |              |              |      |
| Shows        | x            | x            | x            | x            | x            |              |              |              |      |
| Genres       | x            | x            | x            | x            | x            | x            |              |              |      |
| Languages    | x            | x            | x            | x            | x            | x            | x            |              |      |
| Locations    | x            | x            | x            | x            | x            | x            | x            | x            |      |
| Urls         | x            | x            | x            | x            | x            | x            | x            | x            | x    |

Every relation in itself has a Type.

INSERT UML TO SHOW RELATION + RELATIONTYPE

Because of this, it is possible to distinguish between a (semantic) value of a relation, and the way in which the relation is presented. As an example, an Actor who performs a role in a stage production can be credited as 'with'; in this model, it is possible to represent the relation between the Actor and the Production with a RelationActorProduction of the Type 'Actor', while the Relation carries the name 'with'.

repository: ruettet/StageBrainz

repo_name: ruettet/StageBrainz


text:
# Critical Algorithm Studies

Twitter book club on the theme of critical algorithm studies

Twitter @algorithm_club

*Reading list: [http://socialmediacollective.org/reading-lists/critical-algorithm-studies](http://socialmediacollective.org/reading-lists/critical-algorithm-studies)/*

The first thing you should read when joining @algorithm_club is the Code of Conduct

## Schedule
* November 23rd, 2015: The Relevance of Algorithms
* 17.00 GMT/London, 12.00 EST/New York, 09.00 PST/Portland (sorry west coast)
* The Relvance of Algorithms by Tarleton Gillespie

repository: gearmonkey/critical-algorithm-studies

repo_name: gearmonkey/critical-algorithm-studies


text:
# 9/17/2019

### Attendees:

* Cary Phillips
* Christina Tempelaar-Lietz
* Rod Bogart
* Kimball Thurston
* Peter Hillman
* Joseph Goldstone

### Discussion

* Beta v2.4.0-beta.1 is ready for official release.

* Next up:

  * finish off the CII best practices badge.

  * fix sonar bugs

  * request updates to mitre.org CVE entries.

  * Still waiting on Lucasfilm Business Affairs to configure EasyCLA;
    repo move is blocked until that happens.

  * Start port of PyImath to pybind11, which is going to be a lot of work.

  * clang-format (not to be confused with clang-tidy, which is
    different) - Larry has a setup on OIIO that runs clang-format on
    PR, rejects if the formatting is off but also posts a diff, so the
    submitter can get the formatting right even if they don't have
    clang installed.

* CVE's:

  * CVE-2016-4629 and CVE-2016-4629 were fixed by Apple in the OS.

  * CVE-2006-2277 - the link on the mitre.org page is broken, but the
    offending .exr is available on the internet archive wayback
    machine here:
    https://web.archive.org/web/20060520062054/http://w148.de/~cmertes/nachbarhaus1.exr

* Christina gives an overview of SonarCloud set-up. Read the YAML
  documentation here:
  https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema

* Joseph: We should reach out to distro packagers and
  request/encourage/help them to update to the new release.

repository: sreev/openexr

repo_name: sreev/openexr


text:
---
title: "Spectroscopic Confirmation of a Coma Cluster Progenitor at z ∼ 2.2"
collection: publications
permalink: /publications/paper_3
excerpt: ''
date: 2020-01-03
venue: 'Astrophysical Journal (ApJ)'
paperurl: 'https://ui.adsabs.harvard.edu/abs/2020ApJ...892....8D/exportcitation'
citation: 'Darvish et al. 2020'
---

[Download paper here](https://ui.adsabs.harvard.edu/link_gateway/2020ApJ...892....8D/EPRINT_PDF)