text:
# 332 Course Revisions Due to COVID-19

<!-- [You can see the video of my informal discussion of these changes here.](https://rose-hulman.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=cd2f6150-7f33-45dd-9f10-ab8301134a3e). -->

While the overall structure of the course will remain the same, there
are some significant revisions.

## Lectures & In-Class Activities

Lectures will move to recorded video.  They will be posted on the
schedule page - I will endeavor to get them posted about a week in
advance.

The activities associated with lecture are very important for your
understanding.  Since I will no longer be physically there to monitor
the activities, in this version of the course you'll submit the
activities via Moodle.  Each of these activities will be worth 5
points in the Homework category, meaning overall they should be worth
about as much as a major homework assignment (meaning it will
significantly affect your grade if you miss them).  Each activity will
be due the day the lecture is scheduled on the schedule, at 11:55pm.

HOWEVER I will be continuing the practice of including the activity
solutions in the course repo.  So in order to get full credit, you
could just rename the solution file and submit it.  I don't really
reccommend just copying the solution but the point is if you get stuck
you've got a solution right there to peek at.

Let me be explicit: the activities are more important for your
understanding than my lectures.  If you must choose only one, please
do the activity.  I'll also try to highlight which parts of the
lectures are most critical for doing the activity in the lecture
descriptions.

## Discussion & Help

I'm going to encourage folks to keep on the course Piazza.  That is
where I will post when I upload new materials, and if you have a "in
class" question I encourage you to post it as a Piazza question so
discussion can begin.  I will also monitor it carefully for homework
questions and help.

But sometimes there is no substiute for some person to person hints
from me or a friendly TA.  For that, I'm going to use Microsoft Teams.
I'm going to try to be available via Teams whenever I'm working
(unless I'm doing something time critical like recording a lecture).
I'm going to try in particular to be online 2-4 MTThF Eastern - let's
call those my virtual office hours.  If you see me online anytime
though, send me a chat!  If it's a complicated question, you can even
move to video call and share your screen with me.  I can even take
control remotely if you let me.

I'm also arranging some online TA office hours via MS Teams.  Expect
some more details about that to be posted on Piazza.

## BareMetal OS

BMOS has traditionally been a project with assigned teams.  Under the
current circumstances, however, I do not have a solution for
collaboration that I feel confident will work for everybody (in
particular, for folks with spotty internet connections).

I'm going to convert the 3 BMOS Milestones to a Advanced Labs.  What
this means:

1. You have the option to BMOS individually or in a group at your
preference.  In a group, you can choose your partner.

2. BMOS will be worth a lot fewer points than it usually is, so if
folks need to skip it because they are overwhelmed that becomes
possible.

## Exams

Exams will be mostly the same, except I'll arrange for you to take
them anytime you wish on exam day - you will still be time limited to
3 hours.  We will be on the honor system that you do not collaborate
or use unapproved resources on the your exams.  You still need 65% on
the exams to pass the class - there will still be makeup exams as
normal.

# Grading Changes

These course changes require some adjustment to the breakdown in the
syllabus.

| Item                  | Weight |
|:----------------------|:-------|
|                       |        |
| Assignments/Labs      | 40%    |
| ADVANCED  Assignments | 20%    |
| Exams                 | 40%    |

Changes:

- ADVANCED Assignments has gotten slightly larger to accomidate BMOS.
  Now each advanced assignment is worth ~2.2 percent of your final
  grade, down from 2.5

- Assignments/Labs has gotten smaller due to the loss of the 3 BMOS
  assignments.  It also now includes your classwork grade.  The parts
  of this grade are weighted differently but on average each grade is
  5 percent of your final grade.  Don't miss anything!

- Exams are worth slightly more.  This should for the most part help
  folks because you already had to get a 65+ average on exams.

# Contact Me if There Are Problems

Though I hope the policies outlined here will work for almost
everybody, there well may need to be accomidations for specific
people.  The most important thing is that everybody stay as safe and
healthy as they can possibly be, so please treat that as your first
priority.

If you need something different contact me (via email or MS Teams)!


text:
# pix8/ui-calendar

## Work in progress

Rudimentary calendar interface leveraging @pix8/calendar module. Currently exists as a development mule to proof and validate the approach.

The ultimate aim is to produce a highly modular calendar UI that is indifferent to it's treatment to showcase that applied UI engineering in the light of discernable UI design patterns is the way forward and the smarter choice.

Interface is expedited in react.js and vue.js.

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Magician Apprentice

Magician Apprentice is a game console which is remake of the classical game "Zork" with some new amaizing stuff like fights at real time and spells.

## Getting Started

As this project is a console game all you need is to execut the game.

### Prerequisites

It don't need any instalation.

### Playing

Download the zip file which you can find on release guihub tab or in the web https://vandalo.github.io/MagicianApprentice/

### Coding style

Name of functions always in Cap letters and using Upercase during the name of it.

```
void ThisIsMyFunction();
```

If / else/ loops

All the brackts used on the code are always under the loop or condition declaration.

```
If (condition)
{
    ...
}
else
{
    ...
}
```

The identation used is with tabs of 4 white space.

```
if(condition)
{
    for(condition)
    {
        ...
    }
}
```
## Contributing

You are free to improve this source, if it is the case, creat a branch of the master once and create a pull request with a good commit definition (Check commits already done to have an idea).

## Authors

* **Ferran Coma** - *Full game* - [Vandalo](https://github.com/Vandalo)

## License

This project is licensed under the MIT License

## Acknowledgments

* Ric - https://github.com/d0n3val
* Zork game

license: MIT

repository: vandalo/MagicianApprentice

repo_name: vandalo/MagicianApprentice


text:
# Manual

`commander` will automatically search for a `commander.yaml` in the current working directory.

## Commands

## add

The `add` command allows you to automatically create tests. It will automatically create a `comannder.yaml`.

**Example**

```bash
./commander add --no-file --stdout echo hello
tests:
  echo hello:
    exit-code: 0
    stdout: hello
```

**Options**

```
--stdout      Output test file to stdout
--no-file     Don't create a commander.yaml
--file value  Write to another file, default is commander.yaml
```

## test

```yaml
config: # Config for all tests
    dir: /tmp #Set working directory
    env: # Environment variables
        KEY: global
    timeout: 5000 # Timeout in ms
    retries: 2 # Define retries for each test

tests:
    echo hello: # Define command as title
        stdout: hello # Default is to check if it contains the given characters
        exit-code: 0 # Assert exit-code

    it should fail:
        command: invalid
        stderr:
            contains:
                - invalid # Assert only contain work
            not-contains:
                - does not contains # validate that a string does not occur in stdout
            exactly: "/bin/sh: 1: invalid: not found"
            line-count: 1 # Assert amount of lines
            lines: # Assert specific lines
                1: "/bin/sh: 1: invalid: not found"
        exit-code: 127

    it has configs:
        command: echo hello
        stdout:
            contains:
                - hello #See test "it should fail"
            exactly: hello
            line-count: 1
        config:
            dir: /home/user # Overwrite working dir
            env:
                KEY: local # Overwrite env variable
                ANOTHER: yeah # Add another env variable
            timeout: 1000 # Overwrite timeout
            retries: 5
        exit-code: 0
```

repository: svenfinke/commander

repo_name: svenfinke/commander


text:
---
name: Arctos Down
about: Use this template to document communication about outages
title: 'Arctos Down - '
labels: Arctos Down, Priority-Critical (Arctos is broken)
assignees: ''

---

Please complete to the best of your ability.

## Unplanned Outage
 - Date and time outage began:
 - Date and time outage is expected to end:
 - Reason for outage:
 - Expected behavior during and after the outage:

## Planned Outage
 - Date and time outage will begin:
 - Date and time outage is expected to end:
 - Reason for outage:
 - Expected behavior during and after the outage:

## Communication before/during outage
- [ ] Pin this issue
- [ ] Banner updated @jegelewicz
- [ ] Email sent to AWG @ewommack
- [ ] Email sent to Arctos Google Group @ewommack
- [ ] Tweet @lin-fred (@mkoo backup)

## Communication after outage
- [ ] Unpin this issue
- [ ] Banner updated @jegelewicz
- [ ] Email sent to AWG @ewommack
- [ ] Email sent to Arctos Google Group @ewommack
- [ ] Tweet @lin-fred (@mkoo backup)
- [ ] Close this issue when above are complete

repository: kat-sterner/arctos

repo_name: kat-sterner/arctos


text:
---
title: Toxic Comments
permalink: /toxic-comments/
---

Leveraging Google's Perspective API, you can now set a Toxicity Threshold for
Talk (0.8 or 80% is the default), which works like this:

- If a comment exceeds the threshold, the commenter is warned that their comment
  may be toxic, and are given the chance to modify their comment before posting
- If the revised comment is below the Toxicity Threshold, it is posted and
  displayed normally
- If the revised comment still exceeds the Toxicity Threshold, it is not
  displayed on the stream and instead is sent to the Reported queue for
  moderation
- If the moderator accepts the comment, it's displayed on the stream; if it's
  rejected, it will not be displayed
- Moderators see a Toxic Probability Score on toxic comments in the Moderation
  queues

Read more about Coral’s take on toxicity
[on our blog](https://coralproject.net/blog/toxic-avenging/).

## What is the Perspective API?

The likely toxicity of a comment is evaluated using scores generated from
[Perspective API](http://perspectiveapi.com/). This is part of
the [Conversation AI](https://conversationai.github.io/)
research effort run by Jigsaw (a section of Google that works on global problems
around speech and access to information).

Perspective API uses machine learning, based on existing databases of
accepted/rejected comments, to guess the probability that a comment is abusive
and/or toxic. It is currently English only, but the system is designed to work
with multiple languages.

In order to activate our plugin, each news organization applies for an API key
from Jigsaw (click “Request API access” on this site.) Sites can also work with
Jigsaw to create an individualized data set specifically trained on their own
comment history.

Perspective API was released earlier this year, and is currently in alpha
(meaning that it is being continually refined and improved.) Jigsaw should
certainly be praised for devoting serious resources to this issue, and making
their work available for others, including us, to use.

We’ve talked with their team on several occasions, and have been impressed by
their dedication and commitment to this issue. These are smart people who are
trying to improve a broken part of the internet.

## How do I add the Toxic Comments plugin?
To enable this behavior, visit the
[talk-plugin-toxic-comments](/talk/plugin/talk-plugin-toxic-comments)
plugin documentation.

## Request an API Key

You can read more about Google's Perspective API and/or request an API key here: [http://perspectiveapi.com/](http://perspectiveapi.com/).

repository: AramZS/talk

gha_license_id: NOASSERTION

repo_name: AramZS/talk


text:
# Web Assembly

So, and I always like to start my read me's with So.

I know quite a bit about C and C++, I would not stay that I am a master at it, but I can write the basic stuff.

## Why use `C/C++`?

The thing was that I could never find a good reason to use either because I generally always do web development or app development using `Swift, PHP and Javascript`.

## How did I get to know about `WASM`?

Obviously, this was not difficult do to me spending most of my spare time when at home watching either `youtube` or `netflix`.

After watching a couple of videos on youtube about `wasm` I noticed that it would be possible for me to write some code in `C` or `C++` and use it directly in the browser. This makes `wasm` really interesting!

## Creating a Basic (useless) C program

So, lets start by making the most basic `C`program to get it compiled and running.

```c
#include <stdio.h>

int main(int argc , char ** argv) {

    printf("Hello world\n");

}
```

### Compiling our useless C program

Now lets compile it into a executable called `main` using the flag `-o`.

```bash
gcc -o main main.c
```

### Running our useless program

Now we can run our new amazing application.

```bash
./main
Hello world
```

## Installing all Web Assembly's dependencies

Looking at the following documentation for `wasm` it seems pretty straight forward to me to get this working.

[https://webassembly.org/getting-started/developers-guide/](https://webassembly.org/getting-started/developers-guide/)

I am using `Ubuntu` so I followed the simple `Downloading the ToolChain` steps

```bash
$ git clone https://github.com/juj/emsdk.git
$ cd emsdk
$ ./emsdk install latest
$ ./emsdk activate latest
```

And, it was all installed

## Adding `emsdk` to your PATH

At the end of the `activate` command it provides you with a hint to run the following command so as to add some executable paths to your `PATH` environment variable:

```bash
To conveniently access the selected set of tools from the command line, consider adding the following directories to PATH, or call 'source ./emsdk_env.sh' to do this for you.
```

So I ran this command `source ./emsdk_env.sh` and by the power of grayskull it did what it said it would do and outputted the following stuff.

```bash
#Adding directories to PATH:
PATH+=/home/david/emsdk
PATH+=/home/david/emsdk/clang/e1.38.21_64bit
PATH+=/home/david/emsdk/node/8.9.1_64bit/bin
PATH+=/home/david/emsdk/emscripten/1.38.21

#Setting environment variables:
EMSDK=/home/david/emsdk
EM_CONFIG=/home/david/.emscripten
LLVM_ROOT=/home/david/emsdk/clang/e1.38.21_64bit
EMSCRIPTEN_NATIVE_OPTIMIZER=/home/david/emsdk/clang/e1.38.21_64bit/optimizer
BINARYEN_ROOT=/home/david/emsdk/clang/e1.38.21_64bit/binaryen
EMSDK_NODE=/home/david/emsdk/node/8.9.1_64bit/bin/node
EMSCRIPTEN=/home/david/emsdk/emscripten/1.38.21
```

# Emscripten Compiler Frontend (emcc)

So in order to compile any of your code into web assembly you need to use the `emcc` executable.

After opening the man pages for `emcc` I read the following text which then made it clearer to me what it can compile.

```
Command line syntax
===================

   emcc [options] file...

(Note that you will need "./emcc" if you want to run emcc from your
current directory.)

The input file(s) can be either source code files that *Clang* can
handle (C or C++), LLVM bitcode in binary form, or LLVM assembly files
in human-readable form.
```

## Using it blind and trying it out

Rather than spend 10 minutes reading the doc's lets just see if it will compile our C program as is.

```bash
emcc src/main.c
```

### Output

After running the previously command for the very first time I got the fillowing output and also to two files were created `a.out.js` and `a.out.wasm`.

```bash
emscripten:INFO: generating system library: dlmalloc.bc... (this will be cached in "/home/david/.emscripten_cache/asmjs/dlmalloc.bc" for subsequent builds)
emscripten:INFO:  - ok
emscripten:INFO: generating system library: libc.bc... (this will be cached in "/home/david/.emscripten_cache/asmjs/libc.bc" for subsequent builds)
emscripten:INFO:  - ok
emscripten:INFO: generating system library: compiler-rt.a... (this will be cached in "/home/david/.emscripten_cache/asmjs/compiler-rt.a" for subsequent builds)
emscripten:INFO:  - ok
emscripten:INFO: generating system library: wasm-libc.bc... (this will be cached in "/home/david/.emscripten_cache/asmjs/wasm-libc.bc" for subsequent builds)
emscripten:INFO:  - ok
emscripten:INFO: generating system asset: generated_struct_info.json... (this will be cached in "/home/david/.emscripten_cache/asmjs/generated_struct_info.json" for subsequent builds)
emscripten:INFO:  - ok
```

## Reading the documentation for 0.3 seconds

Lets try it how the documentation says we should do it.

```bash
emcc src/main.c -s WASM=1 -o out/hello.html
```

This then creates the `hello.html` page which we requested for.

## Run the code in the Browser

Following the next step in the doc's it mentions that you can serve the compiled files over `HTTP` by using the `emrun` web server.

```bash
emrun --no_browser --port 8080
```
![alt text](./screenshots/hello.html.png)

## What does -s `WASM=1` mean?

I not ready to go on until I am sure about what the `-s` flag means and why `WASM=1`.

After googling just `-s WASM=1` the first result provided me with the answer.

The `WASM=1` means that the `emcc` should output a `wasm`file too, by default it only outputs the `.js` file as previously seen.

> [Creating HTML and JavaScript](https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm#Creating_HTML_and_JavaScript)

```
The options we’ve passed in with the command are as follows:

-s WASM=1 — Specifies that we want wasm output. If we don’t specify this, Emscripten will just output asm.js, as it does by default.

-o hello.html — Specifies that we want Emscripten to generate an HTML page to run our code in (and a filename to use), as well as the wasm module and the JavaScript "glue" code to compile and instantiate the wasm so it can be used in the web environment.
```

repository: davidthorn/wasm

repo_name: davidthorn/wasm


text:
# Data Computation Part 1: Cloud Computing, Containers & Orchestration

* [Back to home](https://supaerodatascience.github.io/OBD/)
* [All slides](./lectures/index.html)

## Syllabus

### [Introduction](lectures/0_intro.html)

Introduction to data computation module

### Cloud Computing (4h)

Intro to cloud computing & google cloud platform

Date | Type | Link | Description |
| --- | --- | --- | --- |
07/10 | Lecture | [Intro to Cloud Computing](lectures/1_cloud_computing.html) | *A lecture about an introduction to "what is the cloud"* |
07/10 | Lecture | [Using Cloud Computing in your daily job](lectures/2_cloud_usage.html) | *What does it mean to "use the cloud" ?* |
07/10 | Lecture | [Intro to Google Cloud Platform](lectures/3_gcp.html) | *A quick intro to GCP* |
07/10   14/10 | Hands-on | [GCP Part 1: The Basics](exercises/1_gcp_setup.md) | *My first steps with GCP, Google Cloud Shell* |
14/10 | Hands-on | [GCP Part 2: My first VMs, Storage, IAAS & PAAS](exercises/2_gcp_handson.md) | *Here I will create a GCE instance, interact with GCS, discover managed products* |
20/10 | Recap | [Important notions about Cloud Computing](lectures/7_conclusion.html#/1) | *A recap of important notions* |

### Containers (2h)

Intro to containers & docker

Date | Type | Link | Description |
| --- | --- | --- | --- |
14/10 | Lecture | [From virtualisation to Containerisation, Docker](lectures/4_containers.html) | *What are containers and why do we need them ? What is Docker ?* |
14/10 | Hands-on | [Docker](exercises/3_docker.md) | *Discover Docker* |
20/10 | Recap | [Important notions about Docker](lectures/7_conclusion.html#/2) | *A recap of important notions* |

### Orchestration & Deployment (1h)

Intro to container orchestra  features

Date | Type | Link | Description |
| --- | --- | --- | --- |
20/10 | Lecture |  [Microservices, Orchestration, Kubernetes](lectures/5_orchestration.html) | *Learn about webservices, microservices, restful apis, docker compose, container orchestration and kubernetes* |
20/10 | Interactive | [A development env on Kubernetes](lectures/6_deployment.html#/1) and [Deploying ML models into production](lectures/6_deployment.html#/2) | *Interactive demos of deployment & scalability with Docker and Kubernetes* |
At Home | Bonus Hands-on | [My first kubernetes cluster for a development environment](exercises/5_bonus.md) | *Where we deploy a development environment on Kubernetes* |
20/10 | Recap | [Important notions about Orchestration](lectures/7_conclusion.html#/3) | *A recap of important notions* |

### Final BE (3h)

A small workshop that puts everything together: Docker, Kubernetes, to deploy an image classifier in a scalable fashion

Date | Type | Link | Description |
| --- | --- | --- | --- |
20/10 | BE |  [Explanations](lectures/7_conclusion.html#/4) <br/> [Walkthrough](exercises/4_be.md) | *A final Bureau d'études to wrap everything together* |

### [Concluding Slides](lectures/7_conclusion.html)

Finally, it's over !

### What's next

Date | Duration | Title |
| --- | --- | --- |
18/11 | 2h | Cluster Compute |
01/12 | 3h | GPU |
02/12 | 3h | GPU |

repository: mgornet/OBD

repo_name: mgornet/OBD


text:
# Welcome to TextMaster React Checkout exercise 👋

This is a simple coding exercise used by TextMaster for technical recruitment purposes. There are no limit of time to perform this task nor any particular restriction, however considering the rather simple nature of the test we will expect a reasonable delivery time.

## Getting Started 🎓

TextMaster's quest for global domination has prompted us to open a supermarket.
We sell only the three following products:

```
+--------------|--------------|---------+
| Product Code |     Name     |  Price  |
+--------------|--------------|---------+
|     FR1      |   Fruit tea  |  $3.11  |
|     AP1      |   Apple      |  $5.00  |
|     CF1      |   Coffee     | $11.23  |
+--------------|--------------|---------+
```

Our beloved CEO is a big fan of `buy-one-get-one-free` kind of offers and of
fruit tea. He wants us to add this rule to our checkout process.

On the other hand, our COO likes low prices and wants people buying apples to get
a price discount for bulk purchases. If you buy 3 or more apples, the price
should drop to `$4.50`.

Products can be scan in any order, and because the CEO and COO change
their minds often, we want to build a flexible system to handle our pricing
rules & discounts.

Since an image is worth a thousands words, here is a wireframe of what such a
checkout system could look like:

  A sample wireframe of what such checkout system could look like

Your task is to build such system using the React framework. You are allowed to
use tools like TailwindCSS as well.

Clicking the product buttons adds items to the basket, the items in the basket are
listed and the total is updated.

You are free to design the system as you see fit, this image above is just an
example of what it could look like. Feel free to express your creativity!

The purpose of this test is to verify your abilities to code and see how you
architect an application and manage its state.

## Instructions

Please follow these instructions:

* Provide a readme to your solution on how to run it
* Provide your solution as a ZIP archive containing your code (without the `node_modules` directory)
* Do not fork this repository
* Do not share your solution publicly

Send your solution to<EMAIL_ADDRESS>with<EMAIL_ADDRESS>in CC.

repository: textmaster/tm-react-checkout

branch_name: refs/heads/main

gha_language: JavaScript

repo_name: textmaster/tm-react-checkout


text:
# "Bulletproofing your Node.js applications with unit testing"

A [reveal.js](http://lab.hakim.se/reveal-js/) presentation given to the [Charlotte Node.js User Group](https://www.meetup.com/Charlotte-NodeJS-User-Group/) based on an introduction to Behavior Driven Development concepts and tools in Node.js.

## License

MIT licensed

Copyright (C) 2016 Sutton Yamanashi, http://suttonsoft.com


text:
---
title: Data
layout: data
---

  Visualizing and sharing CyCIF images

  For a ~10 x 11mm tissue FFPE specimen under 20X objective, each cycle of t-CyCIF generates around 160 individual
  image tiles.
  The assembly process involves stitching sequential image tiles from a single t-CyCIF cycle into one large image
  panel,
  flat-fielding to correct for uneven illumination and registration of images from successive t-CyCIF cycles to each
  other;
  these procedures were performed using
  ImageJ,
  ASHLAR, and
  BaSiC software.

  The stitched images are stored on
  Amazon S3 and the zoomable image viewer implemented using
  OpenSeaDragon.

Melanoma Pre-Cancer Atlas (HTAN)

      Unpublished t-CyCIF images of melanoma and precursor fields from two patients. The specimen from patient 1 illustrates different regions of melanoma progression from relatively normal melanocytes to precursor melanocytic dysplasia to invasive melanoma. In addition, the specimen shows different regions representing immune responses to early melanoma (inflammatory regression) as well as to invasive melanoma in the form of a brisk immune infiltrative immune response (tumor infiltrating lymphocytes “TILs”). The excision specimen from patient 2 illustrates the histologic evolution of melanoma from a precursor field to melanoma in situ, and ultimately to polypoidal invasive melanoma.

Tour of the melanoma dataset

      The unpublished 13-plex t-CyCIF images of tissue specimens from four patients with BRAF-mutant metastatic
      melanoma resected
      before (left) and after (right) treatment with BRAF and MEK inhibitors (dabrafenib/trametinib). Each image is
      composed
      of 150-200 image tiles at a nominal resolution of ~0.9 μm.

Figures in the 2018 eLife Publication

      Tissue-based cyclic immunofluorescent microscopy (t-CyCIF) is a simple method for generating highly multiplexed
      optical images
      from formalin-fixed paraffin-embedded (FFPE) tissue samples routinely used for histopathological diagnosis of
      human
      disease. The method is based on previously described single-cell imaging approaches and readily implemented on
      existing
      instruments (Gerdes et al. 2013, Lin et al. 2015, 2016).

Gaglia et al., 2018 (submitted)

			Access Raw Data

Du, Lin, and Rashid et al., Nature Protocols, 2019

Liu and Lin et al., 2019 (submitted)

Mehta et al., 2020 (submitted)

gha_license_id: MIT


text:
Title: Physiome Model Repository
Slug: pmr

Physiome Model Repository
-----------------------
The Physiome Model Repository is a part of the Physiome Projects effort to increase reusability, reproducibility and replicability in modelling. Here you can store model code and associated files. It is connected to the CellML and OpenCOR software. Models stored here are curated and annotated do simplify combination of different modules.

repository: KarinLundengard/journal-website

gha_language: HTML

repo_name: KarinLundengard/journal-website


text:
---
title: "Toews has long covid"
layout: post
date: 2023-02-19 21:36:21
---
Today we learned that [a 34 year old hockey player](https://en.wikipedia.org/wiki/Jonathan_Toews), a 6x all-star in the NHL's list of 100 greatest players of all time, [stopped playing hockey several weeks ago due to Long Covid](https://www.cbc.ca/sports/hockey/nhl/jonathan-toews-nhl-roundup-feb19-1.6753912).

The covid minimizer that now owns [Twitter](https://en.wikipedia.org/wiki/Twitter) intentionally allows misinformation to spread. [Mask up](https://www.staples.com/3m-aura-n95-particulate-respirator-white-20-pack-9205p-20-dc/product_24503827).

extension: markdown


text:
## Introduction
Helm chart and Docker image to bootstrap a set of Azure DevOps agents in Kubernetes. This repo was put together as the official repositories and documentation is out of date and not actively maintained. No official documentation exists for hosting images in Kubernetes.

## Prerequisites
 - Kubernetes 1.8+ or newer
 - Helm

## Configure Azure DevOps pipelines

Before starting the chart installation, below configuration is required:

1. Create a personal access token with the authorized scope **Agent Pools(read, manage)**  following these [instructions](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops#permissions). You will have to provide later the base64 encoded value of this token to the `azpToken` value of the chart.

2. By default this chart uses the agent pool "Default". Should you require a custom pool you can find more details [here](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/pools-queues?view=azure-devops&tabs=yaml%2Cbrowser).

## Installing the Chart

The chart can be installed with the following command:

```bash
export AZP_TOKEN=$(echo -n '<AZP TOKEN>' | base64)

helm install --namespace <NAMESPACE> --set azpToken=${AZP_TOKEN} --set azpUrl="https://dev.azure.com/replace_with_my_org/" -f values.yaml azp-agent ./chart/azdo-agent
```

## Scale up the number of AZP agents

The number of AZP agents can be easily increased to `10` by using the following command:

```bash
kubectl scale --namespace <NAMESPACE> azp-agent --replicas 10
```

## Chart Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity for azp-agent pods |
| azpAgentName | string | `nil` | Agent name (default value: the container hostname) |
| azpPool | string | `nil` | Agent pool name (default value: Default) |
| azpToken | string | `nil` | Personal Access Token (PAT) granting access to AZP_URL |
| azpUrl | string | `nil` | The URL of the Azure DevOps or Azure DevOps Server instance |
| azpWorkspace | string | `nil` | Work directory (default value: _work) |
| cleanRun | bool | `false` | If `true` run workload on a new agent |
| diskSize | string | `"10Gi"` | Size of peristent volume in the `azpWorkspace` directory |
| extraEnv | object | `{}` | Additional environment variables to be pass to the azp-agent deployment |
| extraLabels | object | `{}` | Additional labels for azp-agent resources |
| fullnameOverride | string | `""` | Override full name |
| image.pullPolicy | string | `"IfNotPresent"` | azp-agent image pull policy  |
| image.repository | string | `"jeffvader/vsts-slim2:latest"` | azp-agent image |
| imagePullSecrets | list | `[]` | Image pull secrets |
| nameOverride | string | `""` | Override name |
| nodeSelector | object | `{}` | Node selection |
| podSecurityContext | object | `{}` | Set security context for pod |
| replicaCount | int | `1` | Amount of agents to start |
| resources | object | `{}` | CPU/memory resource requests/limits |
| securityContext | object | `{}` | Set security context for pod |
| storageClassName | string | `""` | Name of storageclass to use for workspace binding |
| tolerations | list | `[]` | Tolerations |


text:
# The RUM Master
This directory contains the code for the master library of the RUM system.

This code is responsible for capturing user memory accesses/modifications, and communicating with the RUM slaves to enact such memory accesses/modifications.

This code build on the HPC system built by Rick Lan.

## Requirements

* cmake
* C++11
* Boost

## Build

```
./build_lib.sh && ./build_benchmark.sh
```

## Run

```
./build_benchmark/benchmark -P 4096 -M 536870912 -T 4096 -S 920 -C 1 -A 64
```

Will need startup slave nodes FIRST.

Command line options:

```
./build_benchmark/benchmark --help
Allowed options:
  -H [ --help ]            show help message
  -P [ --pagesize ] arg    Page size in bytes
  -M [ --memorysize ] arg  Memory size in bytes
  -T [ --testsize ] arg    Number of random access to test
  -S [ --seed ] arg        Random seed, integer. Optional
  -C [ --threadcount ] arg Number of threads to use. Must be >= 2.
  -A [ --cachesize ] arg   Number of pages to use for cache.
```

repository: Jingzhao-Liu/Rakuten-Unified-Memory

repo_name: Jingzhao-Liu/Rakuten-Unified-Memory


text:
# TFGraphClipper
There are some tools to clip the 'tf.graph' that has become a '.pb' files.

# Run:

`$ jupyter notebook notebooks/Step_by_Step.ipynb`

repository: SunAriesCN/TFGraphClipper

repo_name: SunAriesCN/TFGraphClipper


text:
# SPOTIDOODLE

## A project using the Spotify web API and the Spotify android SDK
The idea was to create an application with the use of the android Spotify SDK or the Web API which allows to sort
your with Spotify created Playlist more specifically. At the moment, right now Spotify provides only a sort
algorithm that allows to sort alphabetically the titles or the interpreter names, after the date a song was added
and the albums. The idea was to provide another sort algorithm that allows you to sort the songs after the BPM,
the danceability, the party suitability and so on. Further the application should keep the functionality simple.
Given that this is “just” an addon for the real Spotify application you can’t search for songs or create new playlists
(things you can do in the Spotify application). The second idea was to provide a possibility to “rate” the songs of a
playlist. The aim is to make a one button click solution for the user to store a song in his before chosen playlist, a
one button click to delete the song of the actual playlist, to skip to the drop of a song or to skip the actual song.

### Developing Vincent Weiss, Oxana Doroshkevich, Marco Himmelstein, Christoph Dörr, Frederick Wurfer

### Tools

1. Sporify Web API
2. Spotify Android SDK

### Prerequisites

You need Android Studio and the android 23.0.1 SDK or higher

### Installing

fork this reposototy to your own account and switch to the forked one
now in your new "own" forked reposotory click on the green "clone or download" button and download the zip file
1. open git bash
2. in git bash: switch to the directory you have chosen for the downloaded and hopefully now unzipped project file
3. in git bash: git init
4. git remote add orinin https://github.com/YOURREPOSOTORYNAMEHERE/Spotidoodle.git
5. git remote add SOMENAMEOFAREPOHERE https://github.com/VincWeiss/Spotidoodle.git
6. check your reposotory status with: git remote -v
this should allow you now to push to your own master and pull from the master master ;)

if you want to commit some changes, follow the following instruction:

1. git status
2. git add . (for all files that were changed) OR git add filename (for specific file)
3. git commit -m "SOME MESSAGE HERE"
4. git push origin master
I would recommend to do the pull requests to merge the local code to the master master branch. so that everything is alwas save from merging error!

Good to know.

## Coding style

``` Spotify android SDK authentication
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
        super.onActivityResult(requestCode, resultCode, intent);
        if (requestCode == REQUEST_CODE) {
            AuthenticationResponse response = AuthenticationClient.getResponse(resultCode, intent);
            switch (response.getType()) {
                case TOKEN:
                    onAuthenticationComplete(response);
                    break;
                case ERROR:
                    Log.d("Auth error: ", response.getError());
                    break;
                default:
                    Log.d("Auth error: ", response.getType().toString());
            }
        }
    }
```

### Built With

http://kaaes.github.io/spotify-web-api-android/javadoc/
https://github.com/kaaes/spotify-web-api-android
http://www.programcreek.com/java-api-examples/index.php?api=kaaes.spotify.webapi.android.models.Playlist
http://www.programcreek.com/java-api-examples/index.php?api=kaaes.spotify.webapi.android.SpotifyService

### Contributing

Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

### Versioning

Version 5.0

## Authors

* **Vincent Weiss** - *Initial work* - [Vincent Weiss](https://github.com/VincWeiss)
* **Oxana Doroshkevich** - *Design work* - [Oxana Doroshkevich](https://github.com/OxanaDoroshkevich)
* **Christoph Doerr** - *Developer* - [Christoph Doerr](https://github.com/ChristophDoerr)
* **Marco Himmelstein** - *Developer* - [Marco Himmelstein](https://github.com/himmelst94)
* **Frederick Wurfer** - *Developer* - [Frederick Wurfer](https://github.com/FreddyWurfer)

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.

### License

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

## Acknowledgments

* avaliable in play store

repository: VincWeiss/Spotidoodle

repo_name: VincWeiss/Spotidoodle


text:
go-kickass
==========
[![GoDoc](http://img.shields.io/badge/api-Godoc-blue.svg?style=flat-square)](https://godoc.org/github.com/noonien/go-kickass)
[![License: MIT](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/noonien/go-kickass/blob/master/LICENSE)

`go-kickass` is a Go library for accessing [Kickass Torrents](https://kickass.to/).

Status
------
The library currently only provides search functionality. More features will
be implemented as soon as I find use for them.

Contributing
------------
Contributing is always welcome and appreciated! Pull requests and issues will
be processed as fast as possible!

License
---------
Copyright (c) 2015 George-Cristian Jiglau

This project is licensed under the MIT license.
See the [LICENSE](https://github.com/noonien/go-kickass/blob/master/LICENSE) file
for more details.

repository: noonien/go-kickass

repo_name: noonien/go-kickass


text:
# servente-teams-google-workspace

The `servente-teams-[name]` pattern is used by providers that enrich Servente,
in this case, `servente-teams-google-workspace` trails Google Workspace's admin
directory API and returns a list of all teams, and is capable of returning a
list of all groups (teams) a member (email) is part of.

## Docker releases

https://hub.docker.com/r/deviavir/servente-teams-google-workspace

Example run:

```
$ docker run -it --rm \
  -v /home/chase/Credentials/credentials.json:/secrets/credentials.json:ro \
  -v /home/chase/Credentials/tls:/secrets/tls:ro \
  deviavir/servente-teams-google-workspace:0.1.0 /servente-teams-google-workspace \
    --credentialsPath=/secrets/credentials.json \
<EMAIL_ADDRESS>\
    --tls-cert-path=/secrets/tls/cert.pem \
    --tls-key-path=/secrets/tls/key.pem
```

## Setup

Find instructions for creating a service account configured for access to Google
Workspaces [here](https://developers.google.com/admin-sdk/directory/v1/guides/delegation).

Use the following Oauth scopes in the Admin console:

```
https://www.googleapis.com/auth/admin.directory.group.readonly
https://www.googleapis.com/auth/admin.directory.group.member.readonly
```

Make sure to enable the Admin SDK API on the project where you created the
service account [here](https://console.developers.google.com/apis/library/admin.googleapis.com?project=blockstream-source).

Once configured, you can start this binary with the following options:

```
$ ./servente-teams-google-workspace \
  --accessKey=my-secret-password \
  --credentialsPath=/some/path/credentials.json \
<EMAIL_ADDRESS>```

The access key is required for all requests to the API this application exposes,
you can fill in this access key in your Servente organization's settings.

## Development

### Generate self-signed cert

```
$ go run /usr/local/go/src/crypto/tls/generate_cert.go \
  --rsa-bits=2048 \
  --host=localhost
2018/10/16 11:50:14 wrote cert.pem
2018/10/16 11:50:14 wrote key.pem
```

### Testing

```
$ go test -short -race -v ./...
```

### Building

```
$ GPG_KEY=... make dist
```

### Deploying

Bump the release version in the `Makefile`.

```
$ make docker
```

## API

```
$ curl --header "Servente-Access-Key: servente-secret-access-key-001\!" -k<EMAIL_ADDRESS>| jq
$ curl --header "Servente-Access-Key: servente-secret-access-key-001\!" -k<EMAIL_ADDRESS>| jq
$ curl -k https://<IP_ADDRESS>:4001/api/v1/teams/list\?servente-access-key\=servente-secret-access-key-001! | jq
$ curl -k https://<IP_ADDRESS>:4001/api\?servente-access-key\=servente-secret-access-key-001! | jq
```


text:
# Planmill Rest client
Planmill rest api client for api version 1.0

````php
<?php
$api = new codaone\Planmill\Api(
    "https://online.planmill.com/[yourcompany]/",
    new codaone\Planmill\Api\Authentication\Basic("userid", "apikey")
);

$projects = $api->getProjects();
$tasks = $api->getTasks($projects[0]->getId());
````

# License

MIT License

# Planmill Rest API Documentation

http://wiki.planmill.com/display/HELPEN/PlanMill+REST+API

repository: Codaone/planmill-rest-client

gha_language: PHP

repo_name: Codaone/planmill-rest-client


text:
..................... dotjs-ubuntu .................

dotjs-ubuntu  is a  Google Chrome  extension  that
executes JavaScript files in `~/.js` based on their
filename.

  This version of dotjs is maintained for
  users under Ubuntu. The original dotjs for Mac OSX
  can be found here: `https://github.com/defunkt/dotjs`

If  you navigate to  `http://www.google.com/`, dotjs
will execute `~/.js/google.com.js`.

This makes it super  easy to spruce up your favorite
pages using JavaScript.

Bonus:  files  in `~/.js`  have jQuery 1.6.2 loaded,
regardless  of  whether  the  site  you're  hacking
uses jQuery.

Double bonus: `~/.js/default.js`  is loaded on every
request,  meaning you  can stick  plugins  or helper
functions in it.

GreaseMonkey user scripts are great, but you need to
publish them  somewhere and re-publish  after making
modifications. With dotjs, just add or edit files in
`~/.js`.

## Example

    $ cat ~/.js/github.com.js
    // swap github logo with trollface
    $('#header .logo img')
      .css('width', '100px')
      .css('margin-top', '-15px')
      .attr('src', '//bit.ly/ghD24e')

![](https://bit.ly/gAHTbC)

## How It Works

Chrome extensions can't access the local filesystem,
so dotjs  runs a tiny  web server on port  3131 that
serves files out of ~/.js.

You don't  have to worry about  starting or stopping
this web server because  we put a pretty great plist
into  ~/Library/LaunchAgents that  handles  all that
for us.

The dotjs Chrome extension then makes ajax requests
to http://localhost:3131/convore.com.js any time you
hit a page on convore.com, for example, and executes
the returned JavaScript.

## Requires

- Ubuntu
- Ruby 1.8
- rake (gem install rake)
- Google Chrome
- `/path/to/home/bin` in your $PATH

## Install

    git clone https://github.com/glenbot/dotjs-ubuntu.git
    cd dotjs-ubuntu
    rake install

After installation add the following line to your crontab

    $ crontab -e
    @reboot /path/to/home/bin/djsd -d

For the impatient run the daemon right away

    djsd -d

For the patient reboot and enjoy!

## Chromium vs Google Chrome

Multiple Chromes installed? Drag builds/dotjs.crx to
whichever is your favorite.

## Uninstall

    rake uninstall

## Credits

- Dotjs (OSX) <https://github.com/defunkt/dotjs>
- Icon: <http://raphaeljs.com/icons/>
- jQuery: <http://jquery.com/>
- Ryan Tomayko for:

> "I almost wish you could just
   stick JavaScript in ~/.js. Do
   you know what I'm saying?"

## Other Browers

- [Firefox Add-on](https://github.com/rlr/dotjs-addon)
- [Safari Extension](https://github.com/wfarr/dotjs.safariextension)
- [Fluid UserScript](https://github.com/sj26/dotjs-fluid)

repository: slikts/dotjs-ubuntu

repo_name: slikts/dotjs-ubuntu


text:
# Timequery
time range query

## Usage
auto extend below methods on ActiveRecord::Base
```
between_range_column column_name, begin_at, end_at
day_range_column column_name, time = Time.current
week_range_column column_name, time = Time.current
month_range_column column_name, time = Time.current
year_range_column column_name, time = Time.current
```

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'timequery'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install timequery
```

## Contributing
Contribution directions go here.

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

repository: rails-gems/timequery

gha_language: Ruby

repo_name: rails-gems/timequery


text:
# jupyterhub-docker

jupyterhub-docker provides a simple deployment of [JupyterHub](https://github.com/jupyter/jupyterhub), a multi-user [Jupyter Notebook](http://jupyter.org/) environment, on a single host using [Docker Compose](https://docs.docker.com/compose/).

## Installation

### Configuration

-   Configure Docker Compose: Create the file `.env` in the base folder with the following content:
    ```
    # name of docker network in which the jupyter containers are run
    DOCKER_NETWORK=jupyterhub-network

    # name of the docker network of traefik
    TRAEFIK_NETWORK=traefik

    # host under which traefik should make jupyter available
    TRAEFIK_HOST=<myhost.mydomain>
    ```

-  Configure `userlist`: Create a `userlist` file in the `jupyter-hub` folder.
   This file contains the list of authorized JupyterHub users specified by their GitHub usernames, and this file should designate at least one `admin` user.
   For example:
   ```
   unrealsoon admin
   kittypuree
   flangefile
   ```

-   Configure GitHub OAuth: You must pass the GitHub OAuth Client ID, Client Secret and OAuth callback url JupyterHub's runtime.
    To do this, add them to an `oauth.env` file in the `secrets` directory of this repository.
    You may need to create both the `secrets` directory and the `oauth.env` file.
    For example, add the following lines in the `oauth.env` file:
    ```
    GITHUB_CLIENT_ID=<github_client_id>
    GITHUB_CLIENT_SECRET=<github_client_secret>
    OAUTH_CALLBACK_URL=https://<myhost.mydomain>/hub/oauth_callback
    ```

### SCIP

The jupyter-notebook requires a local copy of the [SCIP Optimization Suite](http://scip.zib.de).
Follow the installation instructions [here](jupyter-notebook/README.md) to copy the SCIP Optimization Suite files into the `jupyter-nodebook` folder.

### Docker

Run the following command to update the images and start the hub:
```
docker-compose up -d --build
```

repository: Wollac/jupyterhub-docker

repo_name: Wollac/jupyterhub-docker


text:
# Artemis

 ![The deer represents dull, repetitive coding tasks, and Artemis represents Artemis.  As you can see, once Artemis comes along, the future is not bright for dull, repetitive coding tasks.](https://raw.githubusercontent.com/petered/data/master/images/artemis.jpeg)

Artemis is a collection of tools that make it easier to run experiments in Python.  These include:

- An easy-to-use system for making live plots, to monitor variables in a running experiment.
- A browser-based plotter for displaying live plots.
- A framework for defining experiments and logging their results (text output and figures) so that they can be reviewed later and replicated easily.
- A system for downloading/caching files, to a local directory, so the same code can work on different machines.

## Installation
To use artemis from within your project, use the following to install Artemis and its dependencies: (You probably want to do this in a virtualenv with the latest version of pip - run `virtualenv venv; source venv/bin/activate; pip install --upgrade pip;` to make one and enter it).

### Option 1: (Recommended) Install as source (allows you to edit Artemis).

```
pip install -e git+http://github.com/QUVA-Lab/artemis.git#egg=artemis
```
This will install it in `(virtual env or system python root)/src/artemis`.  You can edit the code and submit pull requests to our git repo.  To install with the optional [remote plotting](https://github.com/QUVA-Lab/artemis/blob/master/artemis/remote/README.md) mode enabled, add the `[remote_plotting]` option, as in: `pip install -e git+http://github.com/QUVA-Lab/artemis.git#egg=artemis[remote_plotting]`

### Option 2: Simple install:

```
pip install artemis-ml
```

### Verifying that it works

To verify that the plotting works, run:
```
python -m artemis.plotting.demo_dbplot
```
A bunch of plots should come up and start updating live.

<!--- To verify that the installation worked, go:
```
cd venv/src/artemis
py.test
```
All tests should pass.
(pytest for some reason cant find modules when you do this alone)--->
Note: During installation, the settings file `.artemisrc` is created in your home directory. In it you can specify the plotting backend to use, and other settings.

## Quick Demos

**Live Plotting**: [/artemis/plotting/demo_dbplot.py](/artemis/plotting/demo_dbplot.py)

**Recording Experiment Results**:  [artemis/experiments/demo_experiments.py](/artemis/experiments/demo_experiments.py)

**A demo repo showing how to use Artemis from your code**: [https://github.com/QUVA-Lab/demo_repo](https://github.com/QUVA-Lab/demo_repo)

## Using Browser-plotting
After installing, you should have a file ~/.artemis rc.  To use the web backend, edit the `backend` field to `matplotlib-web`.  To try it you can run [/artemis/plotting/demo_dbplot.py](/artemis/plotting/demo_dbplot.py)

## Plug:
If you like Artemis then you'll love [Plato](https://github.com/petered/plato) - a new API that simplifies the use of Theano.

repository: cpehle/artemis

repo_name: cpehle/artemis


text:
---
layout: default
---

# 1994-04-26 - crypto workbench

## Header Data

From: Ryan R Snyder<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 8eb61db4c78e0f25d85104775ddeeaf33b9c037873756a3916c381bb40e8454e

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-04-26 18:53:50 UTC

Raw Date: Tue, 26 Apr 94 11:53:50 PDT

## Raw message

```
{% raw  %}From: Ryan R Snyder<EMAIL_ADDRESS>Date: Tue, 26 Apr 94 11:53:50 PDT
To<EMAIL_ADDRESS>Subject: crypto workbench
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Can someone please tell me where I might find a copy of the crypto
workbench I've heard so much about? Thanks!

Ryan Snyder, Consultant  | --->Finger me for my PGP public key.<---     ___
University of Montana CIS|                                             |\ /|
<EMAIL_ADDRESS>|     Copyright 1994 by Ryan R. Snyder.       | 0 |
<EMAIL_ADDRESS>  |                                             |/_\|
<EMAIL_ADDRESS>     |

{% endraw %}
```

## Thread

+ Return to [April 1994](/archive/1994/04)

+ Return to "[joshua geller <joshua@cae.retix.com>](/authors/joshua_geller_joshua_at_cae_retix_com_)"
+ Return to "[Ryan R Snyder <cs000rrs@selway.umt.edu>](/authors/ryan_r_snyder_cs000rrs_at_selway_umt_edu_)"

+ 1994-04-26 (Tue, 26 Apr 94 10:06:03 PDT) - [Re: Internet Relay Chat](/archive/1994/04/c775c86a3093baf8aa3366ddaf7e114555c41c401964618e627f7f8ace611163) - _joshua geller<EMAIL_ADDRESS>  + 1994-04-26 (Tue, 26 Apr 94 11:53:50 PDT) - crypto workbench - _Ryan R Snyder<EMAIL_ADDRESS>


text:
# Java Off-Heap Memory Leak Example

This is a little example project that consumes memory in Java in several ways to help demonstrate investigating memory
leaks in Java for a presentation I gave on that topic.

Definitely do not look at this code for good practices. There are intentional leaks throughout.

## Presentation

https://drive.google.com/open?id=1TsjfLCuIKoE_Q3kDFtwoCkuLZ3mr2KpyPO-t-qeYDyU

## Requirements

  - Linux, only tested on CentOS, Fedora, Arch
  - GCC, for building the native library
  - Java, ideally Oracle JDK 1.8
  - Gnuplot, for displaying a plot of memory use
  - Jemalloc, built with profiling enabled
    - Not sure if your Jemalloc has profiling enabled? Run `jemalloc-config --config` and
    look for `--enable-prof` in the output. If it's not there see the [Troubleshooting](#troubleshooting) section of
    this readme

## Running

  - Unzip distribution and go into it's folder
    - `unzip OffHeapLeakExample-1.0-SNAPSHOT.zip`
    - `cd OffHeapLeakExample-1.0-SNAPSHOT`
  - Make sure you're running on Oracle JDK 1.8
    - `export JAVA_HOME=/path/to/oracle/jdk/on/your/machine`
  - Run the application from the root folder
    - `./bin/OffHeapLeakExample`
  - While it's paused for 20 seconds before using memory
    - Create a Native Memory Tracking baseline
    - Start logging memory to a file for plotting
    - `./bin/baseline_NMT_and_log_memory.sh`
  - Wait some time, got to let the application gobble up memory...
  - Look at memory use
    - `./bin/plot_memory.gnuplot`
    - Looking higher than expected?
  - See what the JVM has to say about the heap
    - `jmap -heap <pid>`
  - Investigate the heap and maybe buffers with VisualVM
    - `jvisualvm` or `visualvm`
  - Check out diff between the Native Memory Tracking baseline taken and now:
    - Summary diff (usually good enough): `jcmd <pid> VM.native_memory summary.diff`
    - Detail diff (usually too much detail): `jcmd <pid> VM.native_memory detail.diff`
  - Nothing particularly obvious there to explain endless memory use? Can kill the application now
  - Generate memory allocation diagrams from the Jemalloc profiles that were recorded
    - `./bin/jeprof_diagrams.sh`
  - Hopefully by now you've spotted where the memory is going!

### What do the scripts do?

#### `./bin/OffHeapLeakExample`

This script is generated by Gradle and in general just runs `java` with a classpath including the project jar and
specifying the main class to run.

The gradle script does add some extra bits to this command which you might want to take note of:

  - Setting the heap size (`-Xms` & `-Xmx`): [./build.gradle#L34](./build.gradle#L34) & [./build.gradle#L35](./build.gradle#L35)
  - Enabled Native Memory Tracking: [./build.gradle#L36](./build.gradle#L36)
  - Use jemalloc instead of system default malloc: [./build.gradle#L43](./build.gradle#L43)
  - Set up jemalloc profiling arguments: [./build.gradle#L46](./build.gradle#L46)

#### `./bin/baseline_NMT_and_log_memory.sh`

This script find the pid for a process with the main class in its command string.

With that it takes a Native Memory Tracking baseline using the following command: `jcmd ${PID} VM.native_memory baseline`

It then starts to loop every half-second reading the Resident Set Size value from `/proc/${PID}/status`
and writing it to a file, ./memory.log

#### `./bin/plot_memory.gnuplot`

Not a shell script but an executable file that runs gnuplot (requires gnuplot-wx installed) to plot the resident set use
over time.

#### `./bin/jeprof_diagrams.sh`

Calls the `jeprof` command with input of all the jeprof.*.heap files and just the latest one to generate graphviz files.

The graphviz files are then converted to image (PNG) files for easy viewing.

## Building

Build using `gradle assemble` which should generate an archive containing the distributable code in build/distributions

### Changing QuestionableJniLib

  - Change to the JNI projects Java directory
    - `cd ./QuestionableJniLib/src/main/java`
  - Generate header file
    - `javah -jni -d ./../c uk.co.palmr.offheapleakexample.jni.QuestionableJniLib`

## Troubleshooting

Below are some example error messages you might get when trying to run this project and commands.

[If you use Arch Linux, these instructions should help.](./arch_linux_instructions.md)

[If you use a Redhat based distribution, like Fedora or CentOS, these instructions should help.](./redhat_linux_instructions.md)

### Jemalloc

If you see lines in the stdout from the application like:

 > \<jemalloc>: Invalid conf pair: prof:true

Then the jemalloc on your machine was not compiled with profiling enabled.

### JMAP

If you run `jmap -heap <pid>` and get an error like this:

```
Exception from jmap -heap:
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at sun.tools.jmap.JMap.runTool(JMap.java:197)
	at sun.tools.jmap.JMap.main(JMap.java:128)
Caused by: java.lang.RuntimeException: unknown CollectedHeap type : class sun.jvm.hotspot.gc_interface.CollectedHeap
	at sun.jvm.hotspot.tools.HeapSummary.run(HeapSummary.java:146)
	at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
	at sun.jvm.hotspot.tools.HeapSummary.main(HeapSummary.java:40)
	... 6 more
```

Your JVM is missing debug symbols. You can check this by running `file /usr/lib/jvm/java-8-openjdk/bin/java` (or
whatever the path is to the Java runtime being used) and checking if the output ends in `stripped`.

repository: jartysiewicz/java-off-heap-leak-example

repo_name: jartysiewicz/java-off-heap-leak-example


text:
# Contributing

Thank you for your interest in this project.
If you wish to submit a bug report, propose a feature or contribute a change,
please follow the guidelines described in this document.

## Bug reports and proposals

We use the [Github issue tracker](https://github.com/synthesio/zconfig/issues) for bugs
and feature proposals. Please check both the open and closed lists before posting
a new issue.
Please be as specific as you can: issues should have descriptive titles and relevant labels.

Bug reports must contain:
- the expected behaviour
- why this behaviour is expected
- the actual behaviour
- detailed steps allowing to reproduce the problem
- the used package version

## Making changes

Before you start working on an open issue, add a comment telling that you're going to tackle it.

If it's your first contribution, start by forking the repository.

Do not forget to:
- add new test cases whenever they are needed
- run unit tests before asking for review
- add an entry in the [CHANGELOG](https://github.com/synthesio/zconfig/blob/master/CHANGELOG.md) file

Commit messages should follow these [guidelines](https://chris.beams.io/posts/git-commit/):
1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how

When your changes are ready for review, open a [pull request](https://github.com/synthesio/zconfig/pulls) and reference the corresponding issue.

## Coding conventions

Go source files must be formatted using the [`goimports`](https://godoc.org/golang.org/x/tools/cmd/goimports) tool.

repository: synthesio/zconfig

gha_language: Go

repo_name: synthesio/zconfig


text:
# _Anagrams and Antigrams calculator_

#### _Determines if words are anagrams or antigrams, February 9th, 2018_

#### By _**David Lewis**_

## Description

_This program takes two words from the user and determines whether the letters match regardless of order. If none of the letters match then the program will return that the two words are antigrams. If all the letters match then the program will return that the words are anagrams. The program also checks if the words have vowels. If no vowels are present then the program returns a message that no words were entered._

## Setup/Installation Requirements

* _Go the the github account "https://github.com/dlewiski/anagrams_antigrams"_
* _clone all of the files to your computer_
* _install ruby on your computer if not currently installed_
* _open the anagrams_antigrams.rb file in the console as "$ ruby anagrams_antigrams.rb_

## Known Bugs

_No known bugs_

## Support and contact details

_Please reach out to me via my github account https://github.com/dlewiski with questions, comments, or concerns_

## Technologies Used

_Ruby, rspec, pry, irb_

### License

*MIT License*

Copyright (c) 2018 **_{David Lewis and Epicodus}_**


text:
---
title: v4.3.3
type: patch
---

**Features:**

**Fixes:**
* Persistence issue related to manual server-side pagination that may cause `JDOObjectNotFoundException: No such database row` - [#1059](https://github.com/DependencyTrack/dependency-track/issues/1059)
* Persistence issue that may result in 'unknown' project names for affect projects in the UI - [#1154](https://github.com/DependencyTrack/dependency-track/issues/1154)
* Updated frontend to v4.3.1 which includes minor fixes and dependency updates

**Security:**

**Upgrade Notes:**

###### dependency-track-apiserver.war

| Algorithm | Checksum |
| SHA-1     | e28bc741856904115e54dd5bf2ef09addde011e8 |
| SHA-256   | b748e9b43a25068dc5096f5a68d2e21d5450fca1d3805350042a566c4506d2ba |

###### dependency-track-bundled.war

| Algorithm | Checksum |
| SHA-1     | e884e3e32e18ff608837cc2d33b1d1760a00d0c7 |
| SHA-256   | 05b87a43da078a684126f752d83a8da7488a8c02ef6d9ae9d3f0b347baec1832 |

###### Software Bill of Materials (SBOM) ######

[bom.json](https://github.com/DependencyTrack/dependency-track/releases/download/4.3.3/bom.json)
[bom.xml](https://github.com/DependencyTrack/dependency-track/releases/download/4.3.3/bom.xml)

repository: DependencyTrack/dependency-track

gha_language: Java

repo_name: DependencyTrack/dependency-track


text:
##Interval Tree
区间树是在红黑树基础上进行扩展得到的支持以区间为元素的动态集合的操作，其中每个节点的关键值是区间的__左端点__。通过建立这种特定的结构，可是使区间的元素的查找和插入都可以在 O(lgn) 的时间内完成。

相比于基础的数据结构，增加了一个 max[x]，即以 x 为根的子树中所有区间的端点的最大值。

###Centered Interval Tree
Queries require O(log _n_ + _m_) time, with _n_ being the total number of intervals and _m_ being the number of reported results. Construction requires O(_n_ log _n_) time, and storage requires O(_n_) space.

###Construction
Given a set of _n_ intervals on the number line, we want to construct a data structure so that we can efficiently retrieve all invervals overlapping another interval or point.

We start by taking the entire range of all the intervals and dividing it in half at _x_center_ (in practice, _x_center_ should be picked to keep the tree relatively balanced). This gives three sets of intervals, those completely to the left of _x_center_ which we'll call _S_left_, those completely to the right of _x_center_ which we'll call _S_right_, and those overlapping _x_center_ which we'll call _S_center_.

The intervals in _S_left_ and _S_right_ are recursively divided in the same manner until there are no intervals left.

The intervals in _S_center_ that overlap the center point are stored in a separate data structure linked to the node in the interval tree. This data structure consists of two lists, one containing all the intervals sorted by their beginning points, and another containing all thte intervals sorted by their ending points.

The result is a ternary tree with each node storing:

* A center point
* A pointer to another node containing all intervals completely to the left of the center point
* A pointer to another node containing all intervals completely to the right of the center point
* All intervals overlapping the center point sorted by their beginning point
* All intervals overlapping the center point sorted by their ending point

###Operations

* Left-Rotate
* Right-Rotate
* Insert-Fixup
* Insert
* Delete-Fixup
* Find Tree-Minimum
* Find Successor
* Search
* Delete
* Interval-Search

###Source Code
* [cpp](https://github.com/wuzhiyi/data-structure/blob/master/interval-tree.cpp)

####e.g

![img](https://cloud.githubusercontent.com/assets/9131176/9573425/ed2d9c6e-4fee-11e5-9118-9d29c0001a1b.png)

![img](https://cloud.githubusercontent.com/assets/9131176/8700579/33808868-2b3f-11e5-8277-0dad83c6c5ff.png)

repository: wuzhiyi/data-structure

repo_name: wuzhiyi/data-structure


text:
# Record Configurations for Third\-Party Resources

Record configurations for third\-party resources or custom resource types such as on premise servers, SAAS monitoring tools, and version control systems \(like GitHub\)\. You can publish the configuration data of third\-party resources into AWS Config and view and monitor the resource inventory and configuration history using AWS Config console and APIs\. Now, you can use AWS Config to manage all your resources and evaluate resource configuration for compliance against best practices using AWS Config rules\. You can also create AWS Config rules or conformance packs to evaluate these third\-party resources against best practices, internal policies, and regulatory policies\.

**Note**
If you have configured AWS Config to record all resource types, then third\-party resources that are managed \(created, updated, or deleted\) through AWS CloudFormation are automatically tracked in AWS Config as configuration items\.

**Prerequisite:** The third\-party resources or custom resource type must be registered using AWS CloudFormation\.

**Topics**
+ [Step 1: Setup Your Development Environment](#customresources-setupdevenvironment)
+ [Step 2: Model Your Resource](#customresources-modelresource)
+ [Step 3: Generate Artifacts](#generateartifactsforcfnsubmit)
+ [Step 4: Register Your Resource](#customresources-registerresource)
+ [Step 5: Publish Resource Configuration](#customresources-publishresourceconfiguration)
+ [Record and Delete a Configuration State for Third\-Party Resources Using AWS CLI](customresources-cli.md)
+ [Managing a Configuration State for Third\-Party Resources Type Using APIs](customresources-api.md)
+ [Region Support](#custom-resources-regions)

## Step 1: Setup Your Development Environment

Install and configure AWS CloudFormation AWS CLI\. The AWS CLI allows you to model and register your custom resources\. For more information, see [Custom Resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) and [What Is the CloudFormation Command Line Interface?](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html)\.

## Step 2: Model Your Resource

Create a resource provider schema that conforms to and validates the configuration of the resource type\.

1. Use the `init` command to create your resource provider project and generate the files it requires\.

   ```
   $ cfn init
   Initializing new project
   ```

1. The `init` command launches a wizard that walks you through setting up the project, including specifying the resource name\. For this walkthrough, specify `MyCustomNamespace::Testing::WordPress`\.

   ```
   Enter resource type identifier (Organization::Service::Resource): MyCustomNamespace::Testing::WordPress
   ```

1. Enter a package name for your resource\.

   ```
   Enter a package name (empty for default 'com.custom.testing.wordpress'): com.custom.testing.wordpress
   Initialized a new project in /workplace/user/custom-testing-wordpress
   ```
**Note**
In order to guarantee that any project dependencies are correctly resolved, you can import the generated project into your IDE with Maven support\.
For example, if you are using IntelliJ IDEA, you would need to do the following:
From the **File** menu, choose **New**, then choose **Project From Existing Sources**\.
Navigate to the project directory
In the **Import Project** dialog box, choose **Import project from external model** and then choose **Maven**\.
Choose **Next** and accept any defaults to complete importing the project\.

1. Open the `mycustomnamespace-testing-wordpress.json` file that contains the schema for your resource\. Copy and paste the following schema into `mycustomnamespace-testing-wordpress.json`\.

   ```
   {
     "typeName": "MyCustomNamespace::Testing::WordPress",
     "description": "An example resource that creates a website based on WordPress 5.2.2.",
     "properties": {
       "Name": {
         "description": "A name associated with the website.",
         "type": "string",
         "pattern": "^[a-zA-Z0-9]{1,219}\\Z",
         "minLength": 1, "maxLength": 219
       },
       "SubnetId": {
         "description": "A subnet in which to host the website.",
         "pattern": "^(subnet-[a-f0-9]{13})|(subnet-[a-f0-9]{8})\\Z",
         "type": "string"
       },
       "InstanceId": {
         "description": "The ID of the instance that backs the WordPress site.",
         "type": "string"
       },
       "PublicIp": {
         "description": "The public IP for the WordPress site.",
         "type": "string"
       }
     },
     "required": [ "Name", "SubnetId" ],
     "primaryIdentifier": [ "/properties/PublicIp", "/properties/InstanceId" ],
     "readOnlyProperties": [ "/properties/PublicIp", "/properties/InstanceId" ],
     "additionalProperties": false
   }
   ```

1. Validate the schema\.

   ```
   $ cfn validate
   ```

1. Update the auto\-generated files in the resource provider package to view the resource provider schema updates\. Upon initiation of the resource provider project, the AWS CLI generates supporting files and code for the resource provider\. Regenerate the code to see the updated schema\.

   ```
   $ cfn generate
   ```
**Note**
When using Maven, as part of the build process the `generate` command is automatically run before the code is compiled\. So your changes will never get out of sync with the generated code\.
Be aware the CloudFormation CLI must be in a location Maven/the system can find\. For more information, see [Setting up your environment for developing extensions](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html#resource-type-setup)\.

For more information on the whole process, see [Modeling Resource Providers for Use in AWS CloudFormation](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-model.html)\.

## Step 3: Generate Artifacts

Run the following command to generate artifacts for `cfn submit`\.

```
$ mvn package
```

## Step 4: Register Your Resource

AWS Config does not require resource provider handlers to perform configuration tracking for your resource\. Run the following command to register your resource\.

```
$ cfn submit
```

For more information, see [Registering Resource Providers for Use in AWS CloudFormation Templates](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-register.html)\.

## Step 5: Publish Resource Configuration

Determine the configuration for MyCustomNamespace::Testing::WordPress\.

```
{
  "Name": "MyWordPressSite",
  "SubnetId": "subnet-abcd0123",
  "InstanceId": "i-01234567",
  "PublicIp": "my-wordpress-site.com"
}
```

Determine the schema version id from AWS CloudFormation `DescribeType`\.

In the AWS Config see if this resource configuration is accepted\. To evaluate compliance you can write AWS Config rules using this resource\. For additional information, see [Record and Delete a Configuration State for Third\-Party Resources Using AWS CLI](https://docs.aws.amazon.com/config/latest/developerguide/customresources-cli.html)\.

Optional: To automate recording of configuration, implement a periodic or change\-based configuration collectors\.

## Region Support

This feature is supported in the following regions:

****
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/config/latest/developerguide/customresources.html)

repository: awsdocs/aws-config-developer-guide

repo_name: awsdocs/aws-config-developer-guide


text:
# EFJC model thermodynamics

  * [EFJC model thermodynamics (isometric)](../../../isometric)
  * [EFJC model thermodynamics (isotensional)](../../../isotensional)

```@autodocs
Modules = [Polymers.Physics.SingleChain.Efjc.Thermodynamics]
```

repository: sandialabs/Polymers

gha_language: Rust

repo_name: sandialabs/Polymers


text:
# Tour of Heroes, the Movie Edition - Http Interceptors Demo

The Web apps in this monorepo make HTTP requests and require uniform consistency in how they are executed and handled.

This monorepo demonstrates the same app written with Angular and with Svelte. Each app uses HTTP interceptors. The Angular app uses HttpClient and its interceptors while the Svelte app uses Axios and its interceptors.

by [John Papa](http://twitter.com/john_papa)

## Getting Started

1. Clone this repository

   ```bash
   git clone https://github.com/johnpapa/http-interceptors.git tour
   cd tour
   ```

1. Choose your app

   ```bash
   cd angular-app
   # or
   cd svelte-app
   ```

1. Install the npm packages

   ```bash
   npm install
   ```

1. Run the app

   ```bash
   npm run full-stack
   ```

## Apps in this Repository

There are several apps in this repository.

| Folder                | Description                                                                                |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| angular-http-hard-way | Angular app using HttpClient directly. Adds headers, invokes a busy/progress indicator, and handles authentication errors without interceptors. |
| angular-app           | Angular app using Http Interceptors.                                                                                |
| svelte-app            | Svelte app using Axios Interceptors.                                                                                |

## What's in the App

Here is a list of the features in each app (other than the angular-http-hard-way app)

- [x] Pages for home, list of movies, heroes and villains
- [x] HTTP Interceptors
- [x] API
  - [x] json-server is a backend. No database needed.
  - [x] json-server-auth provides signin/out authentication and authorization routes.
  - [x] App served on one port which can access API on another port proxy or CORS)
  - [x] HTTP - Uses most common client http libraries for each framework
  - [x] API routes are restricted to those who sign in except `movies`
  - [x] API route `movies` is readonly to all (no sign in required)
- [x] Viewing/Editing Pages
  - [x] Home and Movies pages are read-only, and require no authentication
  - [x] Heroes and Villains pages support editing, and require authenticatation
- [x] State/Store - Uses a store for state management
- [x] Styling with Bulma, same css in each app, and Font Awesome

## Interceptors

Sequence is super important with interceptors. They flow in sequence for requests, and then in the opposite order for responses.

The flow for Axios Interceptors and for Angulars Http Interceptors is different.

### Angular Http Interceptor Flow

Angular's interceptors flow in the order you provide them. If you provide interceptors A, then B, then C, then requests will flow in A->B->C and responses will flow out C->B->A.

```typescript
// Requests will flow in A->B->C and responses will flow out C->B->A.
export const httpInterceptorProviders = [
  /**
   *  Log Http:
   *    This logs all HTTP traffic.
   *    Do this first so it can log the Http call happening in and out (last).
   */
  addInterceptor(LogHttpInterceptor),
  /**
   * ReadOnly:
   *    This makes sure that HTTP POST, PUT and DELETE are not allowed if the
   *    user does not have permission. If they do not, then it cancels the request.
   *    Do this early, before we add headers, get busy, or execute the request.
   */
  addInterceptor(ReadOnlyInterceptor),
  /**
   SSL:
   *    Ensure SSL by making calls that use http instead use https.
   */
  addInterceptor(EnsureSSLInterceptor),
  /**
   * Auth:
   *    Add the authentication headers.
   */
  addInterceptor(AuthInterceptor),
  /**
   * CSRF:
   *    Add the CSRF headers.
   */
  addInterceptor(CSRFInterceptor),
  /**
   *  Log headers:
   *    Log all headers.
   *    Must come after the headers are stuffed and before the request is made.
   */
  addInterceptor(LogHeadersInterceptor),
  /**
   *  Busy:
   *    Enable and increment the count of HTTP requests, which can be used to show a busy indicator.
   *    Also decrement the count when responses are received, to eventually turn off the busy indicator.
   *    This must happen once it is certain a request will be made,
   *    and right after the response is received.
   */
  addInterceptor(BusyInterceptor),
  /**
   * Transform Response:
   *    Transform the response, making it easier to consume.
   *    This could happen anywhere in this particular stream,
   *    as it operates on the response.
   */
  addInterceptor(TransformInterceptor),
];

function addInterceptor<T>(interceptor: T) {
  return {
    provide: HTTP_INTERCEPTORS,
    useClass: interceptor,
    multi: true,
  };
}
```

### Axios Interceptor Flow

Axios's interceptors flow in the reverse of the order you provide them. If you provide interceptors A, then B, then C, then requests will flow in C->B->A and responses will flow out A->B->C.

Therefore, it is important to add them in the reverse of the order you want them to execute.

... but ...

This might make the code confusing to read, since we think of the order that we add them as being how they are applied.
So we:

1. add the functions that apply the interceptors to an array in the order we want them to be applied
2. reverse the array, to get them how Axios interceptors wants them
3. execute the functions that apply the interceptors

```typescript
export function applyHttpInterceptors() {
  globalHeaders();

  const interceptors = [
    /**
     *  Log Http:
     *    This logs all HTTP traffic.
     *    Do this first so it can log the Http call happening in and out (last).
     */
    logHttpInterceptor,
    /**
     * ReadOnly:
     *    This makes sure that HTTP POST, PUT and DELETE are not allowed if the
     *    user does not have permission. If they do not, then it cancels the request.
     *    Do this early, before we add headers, get busy, or execute the request.
     */
    readOnlyInterceptor,
    /**
       SSL:
     *    Ensure SSL by making calls that use http instead use https.
     */
    ensureSSLInterceptor,
    /**
     * Auth:
     *    Add the authentication headers.
     */
    authInterceptor,
    /**
     * CSRF:
     *    Add the CSRF headers.
     */
    csrfInterceptor,
    /**
     *  Log headers:
     *    Log all headers.
     *    Must come after the headers are stuffed and before the request is made.
     */
    logHeadersInterceptor,
    /**
     *  Busy:
     *    Enable and increment the count of HTTP requests, which can be used to show a busy indicator.
     *    Also decrement the count when responses are received, to eventually turn off the busy indicator.
     *    This must happen once it is certain a request will be made,
     *    and right after the response is received.
     */
    busyInterceptor,
    /**
     * Transform Response:
     *    Transform the response, making it easier to consume.
     *    This could happen anywhere in this particular stream,
     *    as it operates on the response.
     */
    transformInterceptor,
  ];

  interceptors.reverse().forEach((f) => f());
}
```

## Problems or Suggestions

[Open an issue here](/issues)

## Resources

- [Angular Essentials for VS Code](https://marketplace.visualstudio.com/items?itemName=johnpapa.angular-essentials&WT.mc_id=javascript-0000-jopapa)
- [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode&WT.mc_id=javascript-0000-jopapa)
- [Axios](https://github.com/axios/axios)
- [Axios Interceptors](https://github.com/axios/axios#interceptors)
- [Angular's HttpClient](https://angular.io/guide/http)
- [Angular HttpClient interceptors](https://angular.io/guide/http#intercepting-requests-and-responses)
- [VS Code](https://code.visualstudio.com/?WT.mc_id=javascript-0000-jopapa)
- [Azure Free Trial](https://azure.microsoft.com/free/?WT.mc_id=javascript-0000-jopapa)

repository: alex-migwi/http-interceptors

repo_name: alex-migwi/http-interceptors


text:
# Brightspace rollsheet creator

Christopher L. Phan, Ph.D<EMAIL_ADDRESS>
<https://github.com/christopherphan/brightspace-scripts/>

## Purpose

The Python script ``rollsheet_creator.py`` produces roll sheet (PDF form), given a CSV file created by the WeBWorK grade export feature in D2L Brightspace.

This script is written for Python 3, and requires a working LaTeX installation.

## Usage

For this script to work, you need 2 files.

First is a D2L Brightspace CSV grade export produced with the following
options:

* Key field: "Both"
* User details: All three checked (last name, first name, and email)
* Optionally: A "Section" field, checked to be exported

Second is a LaTeX template file. This file should have the following:

* A ``\rollsheetbox`` macro which takes one argument, the student's name.
* A line consisting only of the comment:

   > ``%%ROLL NAMES HERE``

* **Optional:** A line consisting only of the comment:

   > ``%%SECTION REPLACE``

This file will create a new LaTeX file, in which ``%%ROLL NAMES HERE`` is replaced with a set of lines of the form ``\rollsheetbox{``*student name*``}``. If you don't specify a section, then every student in the CSV file will get a ``\rollsheetbox``; otherwise, only students with the "Section" field matching the section argument on the command line will get a ``\rollsheetbox``. The students will be listed in alphabetical order, by surname and then by given name.

If a section is specified at the command line, then the ``%SECTION REPLACE`` line will be replaced with the section.

After the LaTeX file is produced, ``pdflatex`` is run on the file to produce a PDF version of the rollsheet.

An example LaTeX template is given.

Syntax:
>  ``./rollsheet_creator.py d2l-input-file LaTeX-template-file [section]``

The [section] argument is optional.

## Important license/warranty notice

Copyright (c) 2019 Christopher L. Phan

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

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

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

repository: christopherphan/brightspace-scripts

repo_name: christopherphan/brightspace-scripts


text:
Simple example showing how `easer` can be used in embedded `no_std` contexts.

This example is designed to be run on the [MDBT50Q-RX
dongle](https://www.adafruit.com/product/5199), but should be easily adapted to
other nrf52840-based boards by changing the LED pin number.

# Flashing/running

If your board has an `nrfdfu`-compatible bootloader installed,

```shell
cargo install nrfdfu
cargo run --release
```

If your board has a UF2-compatible bootloader installed (such as the stock
Adafruit bootloader),

```shell
cargo install cargo-binutils uf2conv
cargo objcopy --release -- -O binary flash.bin
uf2conv flash.bin --base 0x26000 --family 0xADA52840
cp flash.bin /Volumes/MDBT50QBOOT/
```

repository: orhanbalci/rust-easing

repo_name: orhanbalci/rust-easing


text:
# API Swagger Documentation
Swagger documentation of some resources can be found here:
https://github.com/DiamondLightSource/SynchWeb/blob/master/api/docs/dist/spec.json

# Creating a shipment
Assuming root api installation is https://synchweb/api

Creating a shipment consists of the following steps:
* Create a `Protein` or find an existing one (samples have to be instances of a protein) [[Jump](#user-content-create-a-protein)]
* Create a `Lab Contact` (name, address, contact details for the sender) [[Jump](#user-content-create-a-lab-contact)]
* Create a `Shipment` and `Dewar`s [[Jump](#user-content-create-a-shipment)]
* Create `Container`s within a dewar [[Jump](#user-content-create-a-container)]
* Create `Sample`s within a container [[Jump](#user-content-create-samples)]

Required fields are indicated by *

## Get an authentication token
In order to access any other resources a token must first be obtained

Request URL: https://synchweb/api/authenticate
Request Method: POST
```json
{
  "login": "username",
  "password": "password"
}
```

Response:
```json
{
  "jwt": "abc.def.ghi"
}
```

The response contains the jwt token that can now be used for any further requests. This must be passed in the request `Authorization` header as follows:
```
Authorization: Bearer abc.def.ghi
```

## Proposals
A list of valid proposals can be retrieved for the logged in user

Request URL: https://synchweb/api/proposal
Request Method: GET
```json
{
  "total": 1,
  "data": [
    {
      "PROPOSAL": "mx10000",
      "TITLE": "Test proposal",
      "VCOUNT": "1",
      "PROPOSALID": "1",
      "STATE": "Open",
      "PROP": "mx10000",
    }
  ]
}
```

A proposal must be passed on all further requests via the `prop` query or body parameter, as all data is related to a specific proposal

## Create a Protein
Request URL: https://synchweb/api/sample/proteins
Request Method: POST

```json
{
  "NAME": "Protein1",*
  "ACRONYM": "prot1",*
  "MOLECULARMASS": "",
  "SEQUENCE": "",
  "ABUNDANCE": "",
  "prop": "mx10000"
}
```

Response:
```json
{"PROTEINID":372253}
```

## Create a Lab Contact
Lab Contacts are used to define who is sending the shipment and where it should be returned to

### List of Countries

Request URL: https://synchweb/api/shipment/countries?prop=mx10000
Request Method: GET
```json
[
  {"TITLE": "United Kingdom"},
  {"TITLE": "France"},
  {"TITLE": "Germany"},
  {"TITLE": "United States Of America"}
]
```

### Create the Contact

Request URL: https://synchweb/api/contact
Request Method: POST

```json
{
  "CARDNAME": "Lab Contact",            *
  "FAMILYNAME": "Last",                 *
  "GIVENNAME": "First",                 *
  "LABNAME": "Lab Name",                *
  "ADDRESS": "Address line",            *
  "CITY": "City",                       *
  "POSTCODE": "12345",                  *
  "COUNTRY": "United States Of America",* (one of above countries)
  "PHONENUMBER": "12345",
  "EMAILADDRESS"<EMAIL_ADDRESS>  "DEFAULTCOURRIERCOMPANY": "",
  "COURIERACCOUNT": "",
  "BILLINGREFERENCE": "",
  "DEWARAVGCUSTOMSVALUE": "",
  "DEWARAVGTRANSPORTVALUE": "",
  "prop": "mx10000"
}
```

Response:
```json
{"LABCONTACTID":5848}
```

## Create a Shipment

### List of Visits

Request URL: https://synchweb/api/proposal/visits?prop=mx10000
Request Method: GET

```json
{
  "total": 1,
  "data": [
    {
      "VISIT": "mx10000-1",
      "SESSIONID": "1",
      "SCHEDULED": "1",
      "STARTDATE": "00:00 01-10-2019",
      "ENDDATE": "00:00 31-10-2019",
      "BEAMLINENAME": "01-BL",
      "BEAMLINEOPERATOR": "Beamline Scientist",
      "PROPOSAL": "mx10000",
    }
  ]
}
```

### Create the shipment
Dewars can be automatically created along with the shipment by passing `DEWARS` = n

Request URL: https://synchweb/api/shipment/shipments
Request Method: POST

```json
{
  "SHIPPINGNAME": "Shipment1",  *
  "SENDINGLABCONTACTID": "5848",*
  "RETURNLABCONTACTID": "5848", *
  "DEWARS": "1",
  "FIRSTEXPERIMENTID": "1",       (SESSIONID from list of visits above)
  "SAFETYLEVEL": "Green",
  "COMMENT": "",
  "DELIVERYAGENT_SHIPPINGDATE": "",
  "PHYSICALLOCATION": "",
  "READYBYTIME": "",
  "CLOSETIME": "",
  "DELIVERYAGENT_DELIVERYDATE": "",
  "DELIVERYAGENT_AGENTNAME": "",
  "DELIVERYAGENT_AGENTCODE": "",
  "prop": "mx10000"
}
```

Response:
```json
{"SHIPPINGID":32578}
```

The new `DEWARID`s can be retrieved via:
Request URL: https://synchweb/api/shipment/dewars/sid/32578?prop=mx10000
Request Method: GET

```json
{
  "total": 1,
  "data": [
    {
      "DEWARID": "37210",
      "CODE": "Dewar1",
      "SHIPPINGID": "32578",
      "SHIPPINGNAME": "Shipment1",
    }
  ]
}
```

## Create a Container
Containers need to be registered against a `DEWARID`

Request URL: https://synchweb/api/shipment/containers
Request Method: POST

```json
{
  "DEWARID": "37210",      *
  "CAPACITY": 16,          *
  "CONTAINERTYPE": "Puck", *
  "NAME": "Puck1",         *
  "CONTAINERREGISTRYID": "",
  "AUTOMATED": null,
  "BARCODE": "",
  "EXPERIMENTTYPE": "",
  "STORAGETEMPERATURE": "",
  "COMMENTS": "",
  "SCHEDULEID": "",
  "SCREENID": "",
  "prop": "mx10000"
}
```

Response:
```
{"CONTAINERID":160882}
```

## Create Samples
Samples need to be registered against a `PROTEINID` and a `CONTAINERID` and must have `LOCATION` between 1 and `DEWAR.CAPACITY`

### List of Proteins
A list of valid proteins can be retrieved from:

Request URL: https://synchweb/api/sample/proteins?prop=mx10000
Request Method: GET

```json
{
  "total": 1,
  "data": [
    {
      "PROTEINID": "372253",
      "PROP": "mx10000",
      "NAME": "Protein1",
      "ACRONYM": "prot1",
      "MOLECULARMASS": null,
    }
  ]
}
```

### Create the Samples

Request URL: https://synchweb/api/sample
Request Method: POST

```json
[
  {
    "prop": "mx10000",    *
    "LOCATION": "1",      *
    "PROTEINID": "372253",*
    "CONTAINERID": 160882,*
    "NAME": "x1",         *
    "CODE": "barcode",
    "COMMENTS": "comment",
    "SPACEGROUP": "",
    "REQUIREDRESOLUTION": "",
    "ANOMALOUSSCATTERER": "",
    "CELL_A": "",
    "CELL_B": "",
    "CELL_C": "",
    "CELL_ALPHA": "",
    "CELL_BETA": "",
    "CELL_GAMMA": "",
    "ABUNDANCE": "",
  },
  {
    "LOCATION": "2",
    "PROTEINID": "372253",
    "NAME": "x2",
    "CODE": "barcode",
    "COMMENTS": "comment",
    "SPACEGROUP": "",
    "REQUIREDRESOLUTION": "",
    "ANOMALOUSSCATTERER": "",
    "CELL_A": "",
    "CELL_B": "",
    "CELL_C": "",
    "CELL_ALPHA": "",
    "CELL_BETA": "",
    "CELL_GAMMA": "",
    "ABUNDANCE": "",
    "CONTAINERID": 160882
  },
  {
    "LOCATION": "3",
    "PROTEINID": "372253",
    "NAME": "x3",
    "CODE": "barcode",
    "COMMENTS": "comment",
    "SPACEGROUP": "",
    "REQUIREDRESOLUTION": "",
    "ANOMALOUSSCATTERER": "",
    "CELL_A": "",
    "CELL_B": "",
    "CELL_C": "",
    "CELL_ALPHA": "",
    "CELL_BETA": "",
    "CELL_GAMMA": "",
    "ABUNDANCE": "",
    "CONTAINERID": 160882
  },
]
```

Response:
```json
[
  {
    "PROTEINID": "372253",
    "CONTAINERID": 160882,
    "LOCATION": "1",
    "CODE": "barcode",
    "NAME": "x1",
    "COMMENTS": "comment",
    "BLSAMPLEID": 2649274
  },
  {
    "PROTEINID": "372253",
    "CONTAINERID": 160882,
    "LOCATION": "2",
    "CODE": "barcode",
    "NAME": "x2",
    "COMMENTS": "comment",
    "BLSAMPLEID": 2649277
  },
  {
    "PROTEINID": "372253",
    "CONTAINERID": 160882,
    "LOCATION": "3",
    "CODE": "barcode",
    "NAME": "x3",
    "COMMENTS": "comment",
    "BLSAMPLEID": 2649280
  },
]
```

# Building the swagger spec

After updating any relevant yaml files the `spec.json` can be rebuilt with:

```bash
node resolve.js
```

repository: DiamondLightSource/SynchWeb

repo_name: DiamondLightSource/SynchWeb


text:
# Mixtapes::Client

Mixtapes client written in Ruby. A Ruby wrapper to connect and authenticate with the Mixtapes API.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'mixtapes-client'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install mixtapes-client

## Usage

    # 1. Create a client:
    client = Mixtapes::Client.new(CLIENT_ID, CLIENT_URL, REDIRECT_URI)

    # 2. Redirect the user to the client authorization page:
    redirect(client.authorize_url)

    # 3. Set the token that's given back after the authorization:
    client.token = params[:code]

    # 4. Make calls to the API via this authorized connection:
    client.connection.get('/profiles/liquid')

## Contributing

1. Fork it ( https://github.com/mixtapes/mixtapes-client-ruby/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

repository: mixtapes/mixtapes-client-ruby

repo_name: mixtapes/mixtapes-client-ruby


text:
**Isn't She Lovely** 是美国黑人歌手，作曲家Stevie Wonder演唱的歌曲。史提夫•汪达（Stevie
Wonder），1950年5月13日出生，汽车城唱片旗下艺人，擅长多种乐器，如电子琴，钢琴等键盘乐器，口琴，鼓，吉他等。是一位唱乐皆精的全能艺人。

另外， _Isn't She Lovely_ 这首歌曲收录在其专辑Songs in the Key of
Life中。此专辑发行于1976年，被许多人认为是他最杰出的作品，他为了筹划这张专辑共用了大约3年的时间。在专辑的录制过程中，他更是时常48小时呆在录音室，不吃也不睡，给他打工的弟兄们只能强打精神轮流伺候。Stevie对此的解释是，只要我的灵感喷出来了，我就得让它冲到顶峰才行，他的执着让人感动。而被他折腾得够呛的那些弟兄也应该感到欣慰，因为他们参与制作的确实是一张伟大的专辑，从编曲、旋律到演唱，都是绝对上乘的。

歌词下方是 _Isn't She Lovely钢琴谱_ ，希望大家喜欢。

### Isn't She Lovely歌词：

Isn't she lovely
Isn't she wonderful
Isn't she precious
Less than one minute old
I never thought through love we'd be
Making one as lovely as she
But isn't she lovely made from love

Isn't she pretty
Truly the angel's best
Boy, I'm so happy
We have been heaven blessed
I can't believe what God has done
Through us he's given life to one
But isn't she lovely made from love

Isn't she lovely
Life and love are the same
Life is Aisha
The meaning of her name
Londie, it could have not been done
Without you who conceived the one
That's so very lovely made from love

path: /流行/Isn't She Lovely-Stevie Wonder/README.md


text:
![](https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/raw/master/docs/js-graphql-logo.png)

# JS GraphQL Language Service

**This repo is no longer maintained. It was made obsolete by the release of js-graphql-intellij-plugin 2.0**

A Node.js powered language service that provides a GraphQL language API on top of [codemirror-graphql](https://github.com/graphql/codemirror-graphql) and [graphql-js](https://github.com/graphql/graphql-js).

It provided various GraphQL language features in [js-graphql-intellij-plugin](https://github.com/jimkyndemeyer/js-graphql-intellij-plugin) 1.x for IntelliJ IDEA and WebStorm, but was replaced with a Java-based native implementaton in 2.0.

Features:

- Schema-aware completion and error highlighting
- Syntax highlighting
- Configurable GraphQL schema retrieval and reloading based on a local file or a url using 'then-request'
- Schema documentation for types and tokens

Inspired by TypeScript's language service, this project makes it possible to leverage Facebook's JavaScript implementation of GraphQL inside IDEs such as IntelliJ IDEA and WebStorm -- without re-implementing GraphQL in Java.

## Running
`npm run-script start` starts the language service at http://<IP_ADDRESS>:3000/js-graphql-language-service

## Using the Language Service API

The API is based on POSTing JSON commands. The following commands are supported:

- `setProjectDir`: Set the project directory from which a `graphql.config.json` can be loaded to determine how the Schema can be retrieved from a file or url
- `getSchema`: Gets the GraphQL schema that has been loaded using the `setProjectDir` command, falling back to a bare-bones default schema
- `getTokens`: Gets the tokens contained in a buffer. Relay.QL and gql templating is supported unless env is passed as `{"env":"graphql"}`
- `getAnnotations`: Gets the errors contained in a buffer, optionally with support for Relay.QL templates using `{"env":"relay"}`
- `getHints`: Gets the schema-aware completions for a buffer at a specified `line` anc `ch`, optionally with support for Relay.QL templates using `{"env":"relay"}`
- `getAST`: Gets the GraphQL AST of a buffer, optionally with support for Relay.QL templates using `{env:"relay"}`
- `getTokenDocumentation`: Gets the schema documentation for a token in a buffer at a specified `line` and `ch`, optionally with support for Relay.QL templates using `{"env":"relay"}`
- `getTypeDocumentation`: Gets schema documentation for a specific GraphQL Type based on the description, fields, implementations, and interfaces specified in the current schema

Supported environments using the `env` parameter:

- `graphql`: For GraphQL file buffers. No templating is processed, and all error annotations are returned.
- `graphql-template`: For use with `graphql` tagged templates that contain placeholders, e.g. for variables. Annotations are filtered to allow placeholder use cases.
- `relay`: For use with `Relay.QL` tagged Relay templates, e.g. as injections in a JavaScript and TypeScript buffer. Annotations are filtered to allow Relay use cases.
- `apollo`: For use with `gql` tagged Apollo Client templates, e.g. as injections in a JavaScript and TypeScript buffer. Annotations are filtered to allow Apollo use cases.
- `lokka`: For use with `gql` tagged Lokka Client templates, e.g. as injections in a JavaScript and TypeScript buffer. Annotations are filtered to allow Lokka use cases.

Please see [src/tests/spec.js](src/tests/spec.js) for examples of how to use the language service, and [src/tests/data](src/tests/data) for the response data.

## Building

Make sure browserify is installed globally with:

```
npm install -g browserify
```

To bundle the bin\server.js file into a single dist/js-graphql-language-service.dist.js file for distribution:

```
npm run-script bundle-to-dist
```

Or, the dist file can be outputted directly into a `js-graphql-intellij-plugin` checkout using:

```
npm run-script bundle-to-intellij-plugin
```

## License
MIT