text:
## LongSumm Training and Inference

Huaipeng Zhao's Implementation of SummaRuNNer is available [here](https://github.com/hpzhao/SummaRuNNer).

Pretrained Glove embeddings can be found [here](https://drive.google.com/file/d/10cizSzQq9-jsyS88KgtuTu3volGc0DKN/view?usp=sharing).

- Training
    - Training from scratch
        ```bash
        python main.py -device 0 -batch_size 32 -model CNN_RNN -seed 1 -save_dir checkpoints/model.pt
        ```
    - Retraining an existing checkpoint
        ```bash
        python main.py -device 0 -batch_size 32 -seed 1 -save_dir checkpoints/model_updated.pt -load_dir checkpoints/model.pt
        ```

- Inference
    ```bash
    python main.py -batch_size 1 -device 0 -predict -load_dir checkpoints/model.pt -foldername PATH_TO_GENERATED_SUMMARIES_FOLDER
    ```
	Structure of the Directory with Generated Summaries should of the form:

	```
	├── Directory with Generated Summaries
	│   ├── Document1
	│   │   ├── Section1.txt
	│   │   ├── Section2.txt
	│   │   ├── Section3.txt
	│   │   ├── Section4.txt
	│   ├── Document2
	│   │   ├── Section1.txt
	│   │   ├── Section2.txt
	│   │   ├── Section3.txt
	│   │   ├── Section4.txt
	...
	```

	---

repository: sayarghoshroy/Summaformers

repo_name: sayarghoshroy/Summaformers


text:
IMPORTANT UPDATE
=========

I've done a major refactoring which will make Amino easier to maintain and, eventually, better performance and portability.
Part of this work involved moving the platform specific parts to their own node modules. You should no longer install `aminogfx`
directly. Instead, install the appropriate platform specific module. Currently there is one for GL and one for Canvas.

Canvas Version
=====
To install the canvas version do:

```
   npm install aminogfx-canvas
```

Then require `aminogfx-canvas` in your own node code like this:

contents of `startcanvas.js`:

```
var amino = require('aminogfx-canvas');
amino.setCanvas(document.getElementById("mycanvas"));
amino.start(function(core,stage) {
  var rect = new amino.Rect()
             .w(100).h(100)
             .fill("#00ff00");
  stage.setRoot(rect);
});
```

and use browserify to bundle it up for the browser.

```
browserify startcanvas.js > bundle.js
```

then include it in an HTML page like this:

contents of `start.html`

```
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<canvas id="mycanvas" width="400" height="200"></canvas>
<script src="bundle.js"></script>
</body>
</html>
```

OpenGL Version
=====

To install the OpenGl version for desktop Mac and RaspberryPi, do:

```
   npm install aminogfx-gl
```

That should compile the native bits and install the aminogfx dependencies automatically. Then require in your
node code like this:

```
var amino = require('aminogfx-gl');
amino.start(function(core,stage) {
  var rect = new amino.Rect()
             .w(100).h(100)
             .fill("#00ff00");
  stage.setRoot(rect);
});
```

You can set the background of the window with `stage.fill("#0000ff")`. You can also set the opacity with
`stage.opacity(0.0)`.  This will have no effect on Mac, but on the RaspberryPi it will allow other hardware
layers to show through. You could use this to overlay text on top of a video stream, for example.

Amino Graphics library for NodeJS on Raspberry Pi
========

Amino is a simple but fast api for doing animated graphics on the RaspberryPi from JavaScript (NodeJS). You create groups of shapes, text, and images as a tree of JavaScript objects, similar to the DOM in a web browser, but these objects are backed by blazing fast OpenGL on your Raspberry Pi.

Amino runs in console mode, so there is no XWindows to get in the way and slow things down. Since Amino is a NodeJS module, you can combine it with other great NodeJS modules out there to parse RSS feeds, connect to Twitter, or control a robot.

Amino on the RaspberryPi can be used to make data dashboards, RSS viewers, rotating 3D geometry, spinning globes, and pretty much anything else you can imagine.

Amino also runs on Mac, Linux, and rooted Android devices, but it’s biggest advantage over other toolkits is good Raspberry Pi support.

Amino use simple shapes control with property chains. To create an animated red rectangle do:
```
     var rect = new amino.Rect().w(100).h(100).fill(“#ff0000”);
     rect.x.anim().to(100).start();

```

The full version, with Amino setup, is

```
var amino = require(‘amino');
amino.start(function(core,stage) {
     var root = new amino.Group();
     stage.setRoot(group);

     var rect = new amino.Rect().w(100).h(100).fill(“#ff0000”);
     group.add(rect);

     rect.x.anim().to(100).start();
});
```

## Shape Primitives

Amino uses only a few primitive objects: Group, Rect, Polygon, Text, and ImageView.  Everything else is created by combining these objects.  Every object has properties which are used to set various attributes of that object. The properties are accessed by a property function, similar to JQuery.

To _set_ the value of width of a rectangle:

```
rect.w(100);

```
to _get_ the width of a rectangle:

```
console.log(rect.w());
```

## Property Animation

Using the property _without_ the parenthesis (meaning not using it as a function) lets you do other things with the property.  To animate the x property of a rectangle, do:

```
//make x go from -100 to 100 over 5 seconds, 3 times
rect.x.anim().from(-100).to(100).dur(5000).loop(3).start();
```

The `from`, `dir`, and `loop` parts are optional. You only need to provide the `to` value.

To call a function when the animation is done:

```
rect.x.anim().to(100).then(function() {
     console.log(“the animation is done”);
});
```

## Property Binding
To watch a property for changes, use the watch function:

```
rect.x.watch(function(val, prop, obj) {
     console.log(“the new value is “,val);
});
```

You can also bind properties so that one will always have the value of the other:

```
circle.radius.bindto(rect.x);
```

The next time rect.x changes the circle.radius property will be updated as well.

You can optionally pass in a modifier function to set the value based on an equation. If you want the circle radius to always be 10 more than the rect.x, do:

```
circle.radius.bindto(rect.x, function(val) {
     return val + 10;
});
```

You can also use modifier functions to convert types or format strings. For example, to make a label which shows the value of rect.x:

```
label.text.bindto(rect.x, function(val) {
     return “Rect.x is currently “ + val;
});
```

The combination of simple objects with bindable properties is very powerful.  To make a large text label that spins in 3D, do this:

var text = new Text().text(‘Welcome To Your Doom!’).fill(“#ffffff”);

## Styling

Other notes:
All color properties accept CSS style hex colors
set color to green:

```
rect.fill(“#00ff00”);
```

You can control multiple nodes at once with CSS style selectors:

```
// set the width of all Rects to 50.
group.find(‘Rect’).w(50);
```

All nodes have optional IDs.

```
set the width of the cat rectangle to 50.
var rect = new Rect().id(‘cat’);
group.add(rect);
group.find(‘#cat’).w(50);
```

Nodes have optional classes.

```
//style all pet nodes
group.add(new Rect().addClass(‘pet’));
group.add(new Rect().addClass(‘pet’));
group.find(‘.pet’).w(50).h(50).fill(‘#0000ff’);
```

## Setup

To run Amino, check out the source, build for your platform, then run one of the demos.

First, you'll need to have libpng and libjpeg installed for your platform. On Raspberry Pi do this:

```
sudo apt-get install libjpeg8-dev
sudo apt-get install libpng-dev
```

Eventually we'll get rid of these dependencies.

```
git clone git@github.com:joshmarinacci/aminogfx.git
cd aminogfx
npm install
```

Now it should work. Try this

```
node demos/circle.js
```

## Using 3D

Since Amino uses a full OpenGL ES scene you can rotate anything in 3D by putting it inside a Group and setting the rx, ry, or rz properties.

Text is currently limited to certain fixed sizes: [values].

You can create 2d geometry with a polygon.

spiral

you can create 3d geometry with a polygon, setting dimension to 3.

trig blob

## Utility Classes

You can create a see through 3D globe using the Globe utility class. It has outlines for all of the countries of the world.

```
var globe = new Globe()
     .sx(5).sy(5) //set the scale to 5
     .x(stage.getW()/2) //center x
     .y(stage.getH()/2) //center y

//spin completely every 10 seconds
globe.rz.anim().from(0).to(360).dur(10*1000);
```

You can create a Particle sim using the Particle utility class.  The math is done entirely on the GPU, so your equations need to use only constants or the time variable.

You can use custom OpenGL ES 2.0 code with the GLNode utility class. This is how the Particle class is built.

## Fonts and Text

Amino is bundled with Source Sans Pro and Font Awesome. Source Sans Pro is the default font. You can set the font name on a Text node with:

```
text.fontname(‘source’).text(“My Name is Foo”);
text.fontname(‘awesome’).text(\u1268); //the symbol for ??
```

new repo will be aminogfx

AminoGFX  amino.graphics?

build
src
resources
build.js
demos
     slideshow
     rssheadlines
     globe
     3dgeometry
     particles
tests
     everything/

repository: marcelonovaes/aminogfx

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: marcelonovaes/aminogfx


text:
---
layout: default
---

# 1997-08-19 - Re: Anonymous Remailers

## Header Data

From: "Robert A. Costner"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 16b88399e0ee33b4b928eda65a9718aa6e12a4834b6f858f418024f25205ac15

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-08-19 13:03:44 UTC

Raw Date: Tue, 19 Aug 1997 21:03:44 +0800

## Raw message

```
{% raw  %}From: "Robert A. Costner"<EMAIL_ADDRESS>Date: Tue, 19 Aug 1997 21:03:44 +0800
To<EMAIL_ADDRESS>Subject: Re: Anonymous Remailers
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Once again Tim's ability to convey information befuddles my ability to respond.

While I would support Tim's suggestion that the KKK has as much right to use an anonymous remailer as much as anyone, Tim doesn't provide much help here.  When  looking into which court to sue Georgia in over anonymity, we had a choice between Federal Court and State court.  While the Georgia's 11th district Federal court has been pro free speech and we thought would favor anonymity, the state court has not been so respectful of the constitution.  The Georgia State court's last ruling on anonymity was to declare that anonymity was illegal.  The case in point is that a KKK member wanted to wear his mask in public.  As is the case in several states, Georgia passed a law declaring the use of a mask to be illegal.  This was upheld by the state supreme court.

The real problem here was not anonymity, but the use of the KKK as a representation of why anonymity should be allowed.  Had this been a 10 year old in a Halloween mask on the last day of October, the case would surely have gone differently.  So much for the conceptual reasons why Tim's comment does not help.  On a more "where the rubber hits the road" view, Tim's comment fails on the grounds that he apparently has nothing to do with the Georgia KKK.

In Georgia, while we have won a temporary injunction and assume we will see the law fully struck down, EFGA is still involved in lawsuit against the state over internet anonymity.  I actually don't contemplate another affidavit in this case, but it may happen.  If I need to write another affidavit in support of the remailer, I will only have about two weeks to get it done.  We hope the Georgia lawsuit will resolve itself in another 30 days or so.

I'm actually more concerned about action against the remailer itself.  I wouldn't be surprised to be approached concerning criminal charges against myself concerning the remailer's operation.  We began discussing this with attorneys and others more than a year ago.

I have no idea what the court would make of my submission of material I received anonymously.  While I could submit "I have been told....", "I have received comments that tell me...", I can't personally testify under oath to Tim's example of removing the ZOG gov't.  I can state that I've been told the remailer has been used for purposes that I wouldn't personally approve of and express my apologies to parents of a particular little girl.  The fact remains that unsolicited feedback on the system has not been good comments.  We could use a good story or two.

Another issue is internal in the operation of the remailer itself.  While I'm not the only one involved in the operation of the remailer, I get called on to defend it's existence.  The question of why to have a remailer, and the question of why to set up and run a remailer are two different things.  The remailer sounds good in theory.  Actual operation of the system is a different thing entirely.  The remailer is more than just a pain.  It is a time-bomb waiting to go off.

If anyone has any comments on how they have used the Georgia Cracker remailer, I'd appreciate the comments being emailed to me.  Anonymously or not.

  -- Robert<EMAIL_ADDRESS>
At 10:06 PM 8/18/97 -0700, Tim May wrote:
>You made a lot of hay about setting it up, if I recall correctly. If you
>didn't know what remailers are, and what they protect, why did you set it
>up?
>
>More to the point, do you think anybody is now going to "break anonymity"
>to tell you that anon.efga.org allowed them to notify the authorities that
>their father was raping their baby sister? Or that it allowed Hamas
>supporters to funnel technical information to drive the ZOG government out
>of Jerusalem? Or whatever.
>
>And if someone used a remailer to send you accounts of what anon.efga.org
>was used for, would you trust these accounts?
...
>An affidavit sounds like a legal statement. If you "need to write an
>affidavit explaining why the remailer should not be shut down, " just who
>is threatening to shut it down?
>
>Tell them the anon.efga.org remailer is an important conduit for protecting
>the secure communications of the Grand Wizards of the Ku Klux Klan, a
>Georgia organization. If they balk, ask if the Klan does not have a right
>of free speech and security in their papers and homes.

{% endraw %}
```

## Thread

+ Return to [August 1997](/archive/1997/08)

+ Return to "[Greg Broiles <gbroiles@netbox.com>](/authors/greg_broiles_gbroiles_at_netbox_com_)"
+ Return to "[Jonathan Wienke <JonWienk@ix.netcom.com>](/authors/jonathan_wienke_jonwienk_at_ix_netcom_com_)"
+ Return to "[Patrick Oonk <patrick@atro.pine.nl>](/authors/patrick_oonk_patrick_at_atro_pine_nl_)"
+ Return to "[Ray Arachelian <sunder@brainlink.com>](/authors/ray_arachelian_sunder_at_brainlink_com_)"
+ Return to "["Robert A. Costner" <pooh@efga.org>](/authors/robert_a_costner_pooh_at_efga_org_)"
+ Return to "[stewarts@ix.netcom.com](/authors/stewarts_at_ix_netcom_com)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"
+ Return to "[Toto <toto@sk.sympatico.ca>](/authors/toto_toto_at_sk_sympatico_ca_)"
+ Return to "["William H. Geiger III" <whgiii@amaranth.com>](/authors/william_h_geiger_iii_whgiii_at_amaranth_com_)"

+ 1997-08-19 (Tue, 19 Aug 1997 10:37:52 +0800) - [Jim Bell web pages](/archive/1997/08/098ac586cd2cdafba59362a335cb2303486aef1a278562147a56d578c4396651) - _Greg Broiles<EMAIL_ADDRESS>  + 1997-08-19 (Tue, 19 Aug 1997 11:55:40 +0800) - [Anonymous Remailers](/archive/1997/08/1129f34a72d033d87b8777c4e6e23e9458bf7ddd00ae9bc4c0ba6af36428e52b) - _"Robert A. Costner"<EMAIL_ADDRESS>    + 1997-08-19 (Tue, 19 Aug 1997 21:03:44 +0800) - Re: Anonymous Remailers - _"Robert A. Costner"<EMAIL_ADDRESS>    + 1997-08-19 (Wed, 20 Aug 1997 00:47:37 +0800) - [Re: Anonymous Remailers](/archive/1997/08/7f0d281fa8b027f5d8289eea735879f41905355b4b806ed7544c732d0061c975) -<EMAIL_ADDRESS>      + 1997-08-19 (Wed, 20 Aug 1997 02:50:55 +0800) - [Re: Anonymous Remailers](/archive/1997/08/4ffc86aef7456ec1b48e2aa82f669a3fda43b364585eb69259e343ed982a7e1a) - _Ray Arachelian<EMAIL_ADDRESS>    + 1997-08-20 (Wed, 20 Aug 1997 12:41:07 +0800) - [Re: Anonymous Remailers](/archive/1997/08/23a3514990a14b4a795b8ac95f98b41b9dc2f29c465386e4689536d70a993987) - _Toto<EMAIL_ADDRESS>      + 1997-08-20 (Wed, 20 Aug 1997 13:25:06 +0800) - [Re: Anonymous Remailers](/archive/1997/08/0fc4d61c5963ca209d1d273fdc4cebb2a4c4241922a6ec01a7e327e6a7266ee6) - _"William H. Geiger III"<EMAIL_ADDRESS>  + 1997-08-19 (Tue, 19 Aug 1997 13:10:42 +0800) - [Re: Anonymous Remailers](/archive/1997/08/f1b5761be47cb7f22478b1f72f709ced93d522f570da90df550ac753eb8f1214) - _Tim May<EMAIL_ADDRESS>  + 1997-08-19 (Tue, 19 Aug 1997 22:40:21 +0800) - [Re: Anonymous Remailers](/archive/1997/08/920485dc2bc1c44b9a2a331c1e24fd3667e10ff1b0d8968e22117de0f8249c20) - _Jonathan Wienke<EMAIL_ADDRESS>    + 1997-08-19 (Tue, 19 Aug 1997 23:11:22 +0800) - [Re: Anonymous Remailers](/archive/1997/08/cb38fe64cbc49ac9a579772e5b414d60098aa3fc0e3b96b1142f7fb74f0995ef) - _Patrick Oonk<EMAIL_ADDRESS>

license: MIT

gha_license_id: MIT


text:
# Europe in a Bottle
> Tell your Story and connect with Europeans all over the World

![build status](https://drone.euinabottle.eu/api/badges/roikiermedia/europeinabottle/status.svg)

## Build Setup

``` bash
# install dependencies
$ npm install # Or yarn install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm build
$ npm start
```

For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).

## Backpack

We use [backpack](https://github.com/palmerhq/backpack) to watch and build the application, so you can use the latest ES6 features (module syntax, async/await, etc.).

---

Made with ♡ at [#EUhack](https://twitter.com/search?q=%23EUhack) | [CI & CD](https://drone.euinabottle.eu/roikiermedia/europeinabottle) | [License](./License)

repository: roikiermedia/europeinabottle

gha_language: Vue

repo_name: roikiermedia/europeinabottle


text:
---
layout: post
title:  "News Scraper"
date:   2017-09-04 00:41:44 -0400
categories: Blog Post
---

# Local News Crime Headline Scraper

I got tired of going to a local news website and scrolling through the pages, so I decided I'd write some simple python to get the stories for me. The site also has a paywall after 'X' amount of articles have been read. I'm not 100% sure that using this method circumvents that, but it seems to be the case. I use probably one of my favorite and in my opinion best python libraries, Requests, to do so.

I started off with finding the main link of the site that I would want to extract the stories from. This website has various other sections including an E-newspaper, Crime, Things to do, Delaware Data, etc. I think having crime information a simple command line program away would make my life better.

The URL that I wanted as my base was `http://www.delawareonline.com/news/crime/`. After inspecting the story headline, it was clear that I wanted to use requests in combination with BeautifulSoup to build the URLs for the different news stories to get the headlines.

The format of each story URL looked to follow a common format: `http://www.delawareonline.com/story/news/crime/YYYY/MM/DD/storyheadline/POST-ID-NUMBER`

Thankfully after looking through the inspection of the page some more I was able to find an `itemprop=url` that had a tag `href` that was the exact part of the URL that I needed to generate to get to each story.

I wrote a quick function to grab all of the available `itemprop=url` URLs and store them in a list, and then use that list to append those URLs to the base URL, giving me the correct links for all of the news stories.

Now that I have the correct links to all of the news stories, I was able also scrape those stories and get all of the headlines, which I also stored into a list. I used `zip` to merge the to lists into a dictionary that had the story headline and the story URL to make for easy printing:

```
Wilmington resident indicted for insurance fraud
http://www.delawareonline.com/story/news/crime/2017/08/29/wilmington-resident-indicted-insurance-fraud/613384001/
New Castle man arrested for robbing Dunkin Donuts
http://www.delawareonline.com/story/news/crime/2017/08/29/shooting-e-23rd-st-critically-injures-man/611351001/
...
```

Perfect this is just what I wanted and I continue to use it on a regular basis.

extension: markdown


text:
# Starfield Live Wallpaper

Source code for android live wallpaper.You can download app from Google Play Store:
[Stafield Live Wallpaper](https://play.google.com/store/apps/details?id=drwdrd.ktdev.starfield)

repository: drdwrd/StarfieldLiveWallpaper

branch_name: refs/heads/main

gha_language: Kotlin

repo_name: drdwrd/StarfieldLiveWallpaper


text:
# useSubject

A wrapper around
[`rxjs.Subject`](https://www.learnrxjs.io/learn-rxjs/subjects/subject).

## Installation

```bash
yarn add rxjs
```

## Definition

```typescript
type UseSubject = <T>(subject$: Subject<T>, fn: SubjectFn<T>) => void
type SubjectFn<T> = (val: T) => void
```

## Usage

```typescript
import {Subject} from "rxjs"
import {useSubject} from "react-captain"

const subject$ = new Subject<number>()

const Component: FC = () => {
  const [counter, setCounter] = useState(0)
  useSubject(subject$, counter => {
    console.log("New counter received:", counter)
    setCounter(counter)
  })

  return <button onClick={() => subject$(counter + 1)}>{counter}</button>
}
```

repository: soywod/react-captain

gha_language: TypeScript

repo_name: soywod/react-captain


text:
### Known issues about using fabric8

#### Why does the welcome screen print two times?

When starting fabric8 using `bin\fabric8` the welcome screen may be printed two times. This will be resolved in a future release of fabric8, by upgrading to Apache Karaf 2.4.0 when it becomes available.

### Using captial letters in Karaf container name

Fabric8 does not support using captial letters in the `karaf.name` property in the `etc\system.properties`. If you change the value, then only use lower case letters.


text:
---
title: A causeway across the bay
tags:
  - Jun 1915
---

A causeway across the bay is planned using the dredged material when the channel is dug.

Newspapers: **Daily Miami Metropolis, The Miami Metropolis (daily), The Daily Metropolis or Miami Daily Metropolis**

Page: **1**, Section: **N/A**


text:
# Intro to views and controllers

By Ali El-Ashram

## Description

This was an exercise I performed to test my knowledge of views and controllers.

## License

MIT: http://aliel.mit-license.org/

repository: alielashram/intro

repo_name: alielashram/intro


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

### Description

In Cacti through 1.2.6, authenticated users may bypass authorization checks (for viewing a graph) via a direct graph_json.php request with a modified local_graph_id parameter.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# snake-game
snake game by console.

# Version 1

- Renew the whole screen for every frame
  - serious flickering phenomenon

![snake_v1](README/snake_v1.gif)

# Version 2

- Renew the pixels one by one (incremental updates)
- Hide cursor

![snakegame-v2](README/snakegame-v2.gif)

# References

[C++：159行完整贪吃蛇源码](https://zhuanlan.zhihu.com/p/102350071)

[https://github.com/DyegoCosta/snake-game](https://github.com/DyegoCosta/snake-game)

[https://github.com/chuyangliu/snake](https://github.com/chuyangliu/snake)

repository: stellarkey/snake-game

repo_name: stellarkey/snake-game


text:
# Drawing examples

[This folder](.) contains drawing examples.

* [drawing_image](form/README.md) shows how to drawing an image in paint event.

repository: bigplayszn/xtd

repo_name: bigplayszn/xtd


text:
OpenWrt in Docker
==================

Image based off of [nmaas87/docker-openwrt:15.05.1_x64](https://github.com/nmaas87/docker-openwrt)

This just adds some config tweaks and a docker-compose file to help you get
started.

My Findings
-------------
Basically it's broken. I was able to set up a solid framework for using it in Docker, and
while a lot of the higher level apps like the web ui (luci) "work", it's still
very broken. What I didn't fully realize upon starting in on this is that
OpenWrt leans heavily on the features embedded in the kernel it's shipped with.
These are features that desktop distros don't bother embedding into their
kernels because there are userspace apps that do a much better job. So unless
somebody comes along and rewrites all of the apps in OpenWrt to also work
with a generic desktop/server kernel, it won't ever work in Docker.

repository: dylanPowers/docker-openwrt

repo_name: dylanPowers/docker-openwrt


text:
# Request

`Request` is a plain JavaScript object to describe requests sent to an `Application`.

It's defined by [JSON schema](../../schema/request.schema.json) or interface [`Request`](../../lib/request.ts):

```ts
/// <summary> Interface for control flags. </summary>
export type ControlFlags = {
    /// <summary> Enable debugging or not. Set to false by default. </summary>
    debug?: boolean;

    /// <summary> Return performance numbers or not. Set to false by default. </summary>
    perf?: boolean;
}

/// <summary> Interface for winery request. </summary>
export interface Request {
    /// <summary> Registered application instance name. Required unless "base" is present. </summary>
    application?: string;

    /// <summary> Uri for request template to apply. Optional. </summary>
    base?: string

    /// <summary> Entry point name </summary>
    entryPoint: string;

    /// <summary> Trace ID </summary>
    traceId?: string;

    /// <summary> User input as the 1st argument passing to entry point function </summary>
    input?: any;

    /// <summary> Control flags </summary>
    controlFlags?: ControlFlags;

    /// <summary> Overridden types </summary>
    overrideTypes?: TypeDef[];

    /// <summary> Overridden named objects </summary>
    overrideObjects?: NamedObjectDef[];

    /// <summary> Overridden providers </summary>
    overrideProviders?: ProviderDef[];
}
```
There are two groups of fields in `Request`:
- Basic fields that describes request destination and input of service method
- Fields that define request level ObjectContext to override request template level or application level ObjectContext.

![Request Object Layout](../images/request-layout.png)
## Basic Fields
| Property name |  Required                    | Description                                                                                |
|---------------|------------------------------|---------------------------------------------------------------------------------------------------------|
| application   | Y unless `base` is specified | Application instance name (or alias) to request for service, it's required unless `base` is specified.  |
| base          | N                            | Path of base template that applies to this request. Mutual-exclusive with `application`                 |
| entrypoint    | Y                            | Name of the entrypoint object to request for service                                                    |
| input         | N                            | User object as input that will be passed to entrypoint function, whose schema is entrypoint specific    |
| controlFlags  | N                            | Flags for enabling debugging and instrumentation                                                        |

## Override Fields
Further, object creation and object retrieval behaviors can be overriden from request with properties with prefix *"override"*.

| Property name     | Required | Description                                                                                |
|-------------------|----------|--------------------------------------------------------------------------------------------------------------------------|
| overrideTypes     | N        | override constructor of objects created [from plain JavaScript object](./object-context.md#from-plain-javascript-object) |
| overrideProviders | N        | override provider of objects created [from URI](./object-context.md#from-uri)                                            |
| overrideObjects   | N        | override [named objects](./object-context.md#named-object)                                                               |

## Examples

Example 1: a simple request with only application / entryPoint:
```ts
{
    application: "example",
    entryPoint: "keepAlive"
}
```

Example 2: a request using template, which inherits objects context from the template:
```ts
{
    base: "example/plan1.json",
    entryPoint: "doSomething"
}
```

Example 3: a request for summing a list of numbers:
```ts
{
    application: "math",
    entryPoint: "sum",
    input: [1, 2]
}
```

Example 4: a request that override an entry point:
```ts
{
    application: "example",
    entryPoint: "echo",
    input: "hello",
    overrideObjects: [
        {
            "name": "echo",
            "value": {
                "_type": "EntryPoint",
                "function": "function(input) { return input + ', winery'; }"
            }
        }
    ]
}
```

Example 5: a request that override an object type:
```ts
{
    application: "example",
    entryPoint: "echo",
    input: "hello",
    overrideTypes: [
        {
            "typeName": "Document",
            "moduleName": "some-doc",
            "functionName": "create"
        }
    ]
}
```

Example 6: a request that override an object provider:
```ts
{
    application: "example",
    entryPoint: "echo",
    input: "hello",
    overrideProviders: [
        {
            "protocol": "ftp",
            "moduleName": "ftp-client",
            "functionName": "get"
        }
    ]
}
```

Example 7: a request using a template overrides a few types, provider and objects for only this request:
```ts
{
    base: "example/plan2.json",
    entryPoint: "print",
    input: {
        "document": {
            "_type": "Document",
            "value": {
                "source": "ftp://wineryjs.org/a.txt"
            }
        }
    },
    overrideTypes: [
        {
            "typeName": "Document",
            "moduleName": "some-doc",
            "functionName": "create"
        }
    ],
    overrideProviders: [
        {
            "protocol": "ftp",
            "moduleName": "ftp-client",
            "functionName": "get"
        }
    ],
    overrideObjects: [
        {
            "name": "printer",
            "value": "printer://printer-at-a-different-address"
        }
    ]
}
```

Example 8: a request asking for debug information and performance information.
```ts
{
    application: "example",
    entryPoint: "doSomething",
    controlFlags: {
        debug: true,
        perf: true
    }
}
```

repository: fs-eire/wineryjs

repo_name: fs-eire/wineryjs


text:
Dax based Sandcastles that I am keeping around for historical reasons

## ConceptualExecutive  ##
An attempt to create a delayed execution pipeline that could be used
by Dax/VTK-m.

## GenericVariadicParser ##
An in progress attempt at being able to strip and pack function arguments
into a storage mechanism so that we can extract them latter. The main feature
is that subclasses can state how many arguments they want not packed in the
opaque container.

So basically you have parser that takes 10 paramenters. Than
derived parser can state it wants only the first two. It than has
the ability to add parameters or remove the ones it explicitly asked for.

Example:
```
void operator(Functor f, T param1, O param2, RestOfParameters rp)
{
params::invoke(f,param1,myInsertedParam,param2,rp);
}
```

## LHMC ##
An example of looking at using Low High tables to speed up operations such
as Marching Cubes

## Low Level Dax ##
An example of writing vis algorithms using everything but the Dax Scheduler
infrastructure.

## PortConcept ##
More brainstorming about filters and worklets in DAX.

## SlidingContour ##
Slides through chunks of a volume along the Z axis performing Marching
Cubes.

repository: robertmaynard/Sandbox

repo_name: robertmaynard/Sandbox


text:
---
ID: 3553
post_title: 'Why It’s HARD To Land on Mars'
author: abbie04m553726
post_excerpt: ""
layout: post
permalink: >
  https://universalflowuniversity.com/uncategorized/why-its-hard-to-land-on-mars/
published: true
post_date: 2017-07-14 14:00:09
---
[embed]https://www.youtube.com/watch?v=h2nqgKL2JQU[/embed]

Support MinutePhysics on Patreon!

This video is about why it's harder to successfully land spacecraft and landers and rovers on Mars than on Earth, or Venus, or the Moon, or Titan, or asteroids. It all comes down to atmospheric density! When there's no atmosphere, you can do a powered descent in a flimsy tinfoil spacecraft like the Lunar Module, and when there's plenty of atmosphere you can do an unpowered descent via heat shield and parachutes like the space shuttle, Apollo command module, Soyuz, Huygens, etc. But on Mars with its thin air, you have to do both powered & unpowered descent, getting the worst of both worlds.

Thanks to Hoppy Price from JPL for fact-checking this video!

Link to Patreon Supporters:

REFERENCES
Spreadsheet to calculate landing success rates: _wsyW3GD-qd9TAsaW1RPAiZ-1BCUaE/edit?usp=sharing

NASA Low Density Supersonic Decelerator Fact Sheets: _Final_LDSD_Fact_Sheet_3-26-13.pdf
_kits/ldsd.pdf

LDSD Test Footage: _pages/tdm/ldsd/videos.html

More LDSD Test Footage:

List of Missions to Mars: _of_missions_to_Mars

List of Missions to the Moon: _of_missions_to_the_Moon

List of Missions to Saturn: _of_Saturn

List of Missions to Venus: _of_missions_to_Venus

Curiosity Rover Landing Overview:
MinutePhysics is on twitter - @minutephysics
And facebook -
And Google+ (does anyone use this any more?) -

Minute Physics provides an energetic and entertaining view of old and new problems in physics -- all in a minute!

Created by Henry Reich

876380

2:2

27430

repository: UniversalAdministrator/ufu

repo_name: UniversalAdministrator/ufu


text:
---
title: IO
---

# IO

[TOC]

## `loadtxt` - load a 2D array from a text file

### Status

Experimental

### Description
Loads a rank-2 `array` from a text file.

### Syntax

`call [[stdlib_io(module):loadtxt(interface)]](filename, array)`

### Arguments

`filename`: Shall be  a character expression containing the file name from which to load the rank-2 `array`.

`array`: Shall be an allocatable rank-2 array of type `real`, `complex` or `integer`.

### Return value

Returns an allocated rank-2 `array` with the content of `filename`.

### Example

```fortran
program demo_loadtxt
    use stdlib_io, only: loadtxt
    implicit none
    real, allocatable :: x(:,:)
    call loadtxt('example.dat', x)
end program demo_loadtxt
```

## `open` - open a file

### Status

Experimental

### Description

Returns the unit number of a file opened to read, to write, or to read and write. The file might be a text file or a binary file. All files are opened using a streamed access.

### Syntax

`u = [[stdlib_io(module):open(function)]](filename [, mode] [, iostat])`

### Arguments

`filename`: Shall be a character expression containing the name of the file to open.

`mode` (optional): Shall be a character expression containing characters describing the way in which the file will be used. The available modes are:

| Character | Meaning |
| --------- | ------- |
| `'r'` | open for reading (default) |
| `'w'` | open for writing, truncating the file first |
| `'x'` | open for exclusive creation, failing if the file already exists |
| `'a'` | open for writing, appending to the end of the file if it exists |
| `'+'` | open for updating (reading and writing) |
| `'b'` | binary mode |
| `'t'` | text mode (default) |

The default `mode` is `'rt'` (i.e. open for reading a text file). The `mode` may include one of the four different methods for opening a file (i.e., `'r'`, `'w'`, `'x'`, and `'a'`). These four methods can be associated with the character `'+'` to open the file for updating. In addition, it can be specified if the file should be handled as a binary file (`'b'`) or a text file (`'t'`).

`iostat` (optional): Shall be a scalar of type `integer` that receives the error status of `open`, if provided. If no error exists, `iostat` is zero.

`u`: Shall be a scalar of type `integer` that specifies the unit number associated with the file `filename`.

### Return value

The result is a scalar of type `integer`.

### Example

```fortran
program demo_open
    use stdlib_io, only: open
    implicit none
    integer :: u
    u = open('example.dat', 'wt')
    write(u,'(a)')'This is an example for open'
    close(u)
end program demo_open
```

## `savetxt` - save a 2D array into a text file

### Status

Experimental

### Description
Saves a rank-2 `array` into a text file.

### Syntax

`call [[stdlib_io(module):savetxt(interface)]](filename, array)`

### Arguments

`filename`: Shall be  a character expression containing the name of the file that will contain the 2D `array`.

`array`: Shall be a rank-2 array of type `real`, `complex` or `integer`.

### Output

Provides a text file called `filename` that contains the rank-2 `array`.

### Example

```fortran
program demo_savetxt
    use stdlib_io, only: savetxt
    implicit none
    real :: x(3,2) = 1
    call savetxt('example.dat', x)
end program demo_savetxt
```

repository: scivision/stdlib

repo_name: scivision/stdlib


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

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

## [Unreleased]

## [2.0.2] - 2020-01-08
### Added
- Update Kotlin to 1.3.61
- Update Kotlin Coroutines to 1.3.3

### Removed
- Samples moved to https://github.com/oolong-kt/oolong-samples

## [2.0.1] - 2019-06-20
### Added
- Update Kotlin to 1.3.40

### Changed
- Remove default arguments for Runtime constructor

## [2.0.0] - 2019-05-31
### Added
- Add samples

### Changed
- Move to oolong-kt org and update packages
- Change core types from classes to functions

## [1.0.0] - 2018-08-01

Initial release

[Unreleased]: https://github.com/oolong-kt/oolong/compare/v2.0.1...HEAD
[2.0.2]: https://github.com/oolong-kt/oolong/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/oolong-kt/oolong/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/oolong-kt/oolong/compare/v1.0.0...v2.0.0
[1.0.0]: https://github.com/oolong-kt/oolong/releases/tag/v1.0.0

repository: hhariri/oolong

repo_name: hhariri/oolong


text:
# Binomial-Tree
This is a priority queue implemented with a binomial-Heap.

It implements support for
* inserting an Entry with an associated Priority
* removing a specific Entry
* finding and removing the Entry with a minimal Priority
* changing the Priority of a specific Entry

repository: LukasPietzschmann/Binomial-Tree

repo_name: LukasPietzschmann/Binomial-Tree


text:
# fullstack-express-react

[![Build Status](https://travis-ci.org/basribasren/fullstack-express-react.svg?branch=master)](https://travis-ci.org/basribasren/fullstack-express-react) [![Build status](https://ci.appveyor.com/api/projects/status/weuboxr8dwbpp0q2?svg=true)](https://ci.appveyor.com/project/basribasren/fullstack-express-react) [![dependencies Status](https://david-dm.org/basribasren/fullstack-express-react/status.svg)](https://david-dm.org/basribasren/fullstack-express-react) ![GitHub All Releases](https://img.shields.io/github/downloads/basribasren/fullstack-express-react/total.svg) [![GitHub license](https://img.shields.io/github/license/basribasren/fullstack-express-react.svg)](https://github.com/basribasren/fullstack-express-react/blob/master/LICENSE) [![GitHub last commit](https://img.shields.io/github/last-commit/basribasren/fullstack-express-react.svg)](https://github.com/basribasren/fullstack-express-react/commits/master)

Boilerplate for Full stack web development with Swagger-ui for API Documentation, ExpressJs for Server and ReactJs for Client
Tools : Swagger-ui, Swagger-jsdocs, Babel, Eslint, Prettier, Express, Mongoose, React, Redux, Webpack, Workbox, Material-UI.

## Ecosystem Global

| Project | Status | Description |
|---------|--------|-------------|
| [babel]          | [![babel-status]][babel-package] | Babel is a compiler for writing next generation JavaScript. |
| [prettier]          | [![prettier-status]][prettier-package] | Prettier is an opinionated code formatter. |
| [eslint]          | [![eslint-status]][eslint-package] | A fully pluggable tool for identifying and reporting on patterns in JavaScript. |
| [migrate-mongo]          | [![migrate-mongo-status]][migrate-mongo-package] | A database migration tool for MongoDB in Node. |

[babel]: https://github.com/babel/babel
[babel-status]: https://img.shields.io/npm/v/babel.svg
[babel-package]: https://npmjs.com/package/babel
[prettier]: https://github.com/prettier/prettier
[prettier-status]: https://img.shields.io/npm/v/prettier.svg
[prettier-package]: https://npmjs.com/package/prettier
[eslint]: https://github.com/eslint/eslint
[eslint-status]: https://img.shields.io/npm/v/eslint.svg
[eslint-package]: https://npmjs.com/package/eslint
[migrate-mongo]: https://github.com/seppevs/migrate-mongo
[migrate-mongo-status]: https://img.shields.io/npm/v/migrate-mongo.svg
[migrate-mongo-package]: https://npmjs.com/package/migrate-mongo

## Ecosystem Server

| Project | Status | Description |
|---------|--------|-------------|
| [express]          | [![express-status]][express-package] | Fast, unopinionated, minimalist web framework for node. |
| [mongoose]          | [![mongoose-status]][mongoose-package] | Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. |
| [redis]          | [![redis-status]][redis-package] | This is a complete and feature rich Redis client for node.js. It supports all Redis commands and focuses on high performance. |
| [swagger-ui]          | [![swagger-ui-status]][swagger-ui-package] | A fully pluggable tool for identifying and reporting on patterns in JavaScript. |
| [jsonwebtoken]          | [![jsonwebtoken-status]][jsonwebtoken-package] | An implementation of JSON Web Tokens. |
| [nodemailer]          | [![nodemailer-status]][nodemailer-package] | Send e-mails from Node.js – easy as cake! 🍰✉. |

[express]: https://github.com/expressjs/express
[express-status]: https://img.shields.io/npm/v/express.svg
[express-package]: https://npmjs.com/package/express
[mongoose]: https://github.com/Automattic/mongoose
[mongoose-status]: https://img.shields.io/npm/v/mongoose.svg
[mongoose-package]: https://npmjs.com/package/mongoose
[redis]: https://github.com/NodeRedis/node_redis
[redis-status]: https://img.shields.io/npm/v/redis.svg
[redis-package]: https://npmjs.com/package/redis
[swagger-ui]: https://github.com/swagger-api/swagger-ui
[swagger-ui-status]: https://img.shields.io/npm/v/swagger-ui.svg
[swagger-ui-package]: https://npmjs.com/package/swagger-ui
[jsonwebtoken]: https://github.com/auth0/node-jsonwebtoken
[jsonwebtoken-status]: https://img.shields.io/npm/v/jsonwebtoken.svg
[jsonwebtoken-package]: https://npmjs.com/package/jsonwebtoken
[nodemailer]: https://github.com/nodemailer/nodemailer
[nodemailer-status]: https://img.shields.io/npm/v/nodemailer.svg
[nodemailer-package]: https://npmjs.com/package/nodemailer

## Ecosystem Client

| Project | Status | Description |
|---------|--------|-------------|
| [react]          | [![react-status]][react-package] | A declarative, efficient, and flexible JavaScript library for building user interfaces. |
| [redux]          | [![redux-status]][redux-package] | Predictable state container for JavaScript apps. |
| [materialui]          | [![materialui-status]][materialui-package] | React components that implement Google's Material Design. |
| [webpack]          | [![webpack-status]][webpack-package] | A bundler for javascript and friends. |
| [workbox]          | [![workbox-status]][workbox-package] | JavaScript libraries for Progressive Web Apps. |

[react]: https://github.com/facebook/react
[react-status]: https://img.shields.io/npm/v/react.svg
[react-package]: https://npmjs.com/package/react
[redux]: https://github.com/reduxjs/redux
[redux-status]: https://img.shields.io/npm/v/redux.svg
[redux-package]: https://npmjs.com/package/redux
[materialui]: https://github.com/mui-org/material-ui
[materialui-status]: https://img.shields.io/npm/v/material-ui.svg
[materialui-package]: https://npmjs.com/package/material-ui
[webpack]: https://github.com/webpack/webpack
[webpack-status]: https://img.shields.io/npm/v/webpack.svg
[webpack-package]: https://npmjs.com/package/webpack
[workbox]: https://github.com/googlechrome/workbox
[workbox-status]: https://img.shields.io/npm/v/workbox.svg
[workbox-package]: https://npmjs.com/package/workbox

## Folder Structure

After creation, your project should look like this:

```
fullstack-express-react/
├── node_modules/
├── bin/
├── client/
│   └── dist/		will contain client in production mode
│   └── public/
│   └── setting/	will contain configuration for webpack, dll
│   └── src/		will contain client in development mode
│   └── .babelrc.js
│   └── .package.json
│   └── .README.md
├── server/
│   └── config/		will contain configuration for server
│   └── database/ 	will contain migration and seed
│   └── docs/	 	will contain swagge-ui and api docs
│   └── dist/		will contain server in production mode
│   └── helpers/
│   └── log/		will contain log
│   └── modules/	will contain model, service, controller, route with hierarchy Structure
├── .babelrc
├── .editorconfig
├── .env
├── .env.example
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .prettierignore
├── .prettierrc
├── .travis.yml
├── .appveyor.yml
├── server-dev.js
├── server-prod.js
├── LICENSE
├── README.md
├── package.json

```

## Available Scripts

In the project directory, you can run:

    "client-build": "cd client && npm run build",
    "client-dev": "npm run serve --prefix client",

    "server-build": "babel serber-dev.js --out-file server-prod.js",
    "server-dev": "nodemon .",

    "development": "concurrently \"npm run server-dev\" \"npm run client-dev\"",

    "start": "node server-prod.js",

    "test": "echo \"Error: no test specified\" && exit 1",

    "heroku-prebuild": "npm install npm@latest -g && cd client && npm install --production=false",
    "heroku-postbuild": "concurrently \"npm run server-build\" \"npm run client-build\""

## Maintainers

Basri Basren

## Something Missing?

If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/basribasren/fullstack-express-react/issues)

repository: basribasren/fullstack-express-react

gha_language: JavaScript

repo_name: basribasren/fullstack-express-react


text:
# Lab 8-401 course auth-api

## links:

- [heroku link](https://api-auth-faten.herokuapp.com/)

- [Tests link](https://github.com/Fatensamman/auth-api/actions)

- [pull request link](https://github.com/Fatensamman/auth-api/pull/2)

## End Points
#### sign up on POST
-  https://api-auth-faten.herokuapp.com/signup/

#### sign in on POST basic auth
- https://api-auth-faten.herokuapp.com/signin/

## setup  environment

### Install
- initialization using  `npm inint -y`
- install libraries like express dotenv cors morgan bcrypt base64 mongo  jsonweptoken
- install devDependencies like jest supertest eslint @code-fellows/supergoose
- create files tree

collaborated with raghad mustafa , and haneen alkhasawneh

 ## Documentation:

 basic auth
 ![uml](3.PNG)

 bearer auth
 ![UML](4.PNG)

repository: Fatensamman/auth-api

repo_name: Fatensamman/auth-api


text:
Tried many times for browsing an-cheon.com after upload a new .md file,but the website didn't change at all.<!-- more -->
Solve : When I saw setting of GitHub Pages,I found this:

Your site is having problems building: The variable 2{2,3,0} on line 17 in _posts/2019-10-7-8 puzzle 4 ways to solve with java.md was not properly closed with }}. For more information, see https://help.github.com/en/articles/troubleshooting-jekyll-build-errors-for-github-pages-sites#tag-not-properly-terminated.      (2{means {and{,but I can't write down this syntax error at here.......)

It means I failed in built my changed website.After solved these problems,it worked.
It teach me that after pushed new change,I should ckek that the website is built or not.

url: https://raw.githubusercontent.com/An-Cheon/An-Cheon.github.io/b87db2d598352cde19ecbbf0b0d240f0cf939019/_posts/2019-10-7-Your site is having problems building.md


text:
---
layout: location_detail
partner_site: duke
---

# Participant-led group projects

An important element of the Summer Institute is the participant-led group projects that begin in the second week and often continue long after the Summer Institute ends.  Some of the results from these projects will be posted here when they are complete.

Bello-Pardo, E., Law, T., Gallagher, N., Fesler, L., & Pozzana, I. (April 2019) "Medium is the Message? Understanding the effects of different communication mediums on political behavior and public opinion in the digital age." Midwestern Political Science Association Conference, Chicago IL.

repository: robincrlee/summer-institute

repo_name: robincrlee/summer-institute


text:
---
title: "WFOE in China and Their Role in a Commercial Lease"
author<EMAIL_ADDRESS>tags: ["Commercial Lease","Parties","Commercial Activities","Rajah"]
date: 2016-02-02 14:43:00
description: "Depending on the circumstances of the parties involved in a commercial lease agreement, the name of the tenant on the lease can vary where a wholly foreign owned enterprise is leasing the property."
---

Depending on the circumstances of the parties involved in a commercial lease agreement, the name of the tenant on the lease can vary where a **wholly foreign owned enterprise** is leasing the property.

Choosing who to name as the tenant is a significant issue and — as is typical for so much else in China — different cities require different procedures. The following two (2) approaches are typically followed in China for the tenant of a wholly foreign owned enterprise ("WFOE") to be: Specify the U.S. (or other foreign country) parent company as the tenant on the lease, or specify the WFOE as the tenant.

Determining how to proceed regarding the named tenant requires input from the local government authorities who will approve the WFOE. If your lease does not handle the lessee issue properly, the government generally will not approve your WFOE and/or you will end up having to incur all sorts of additional landlord and contracting costs.

[Read the article here.](https://www.chinalawblog.com/2011/07/china-wfoe-leasing-requirements.html)

### Takeaway:
- Check with local government authorities before naming the parties to a commercial lease agreement in China.

repository: clausehound/clausehound-blog

repo_name: clausehound/clausehound-blog


text:
# GINQ-docs

The project provides the PDF version of [GINQ user guide](https://github.com/apache/groovy/blob/master/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc), which could not show the code snippets online properly.

As the latest html version of [GINQ user guide](http://docs.groovy-lang.org/docs/next/html/documentation/#_querying_collections_in_sql_like_style) could be found in the official site of Apache Groovy, so the project will be archived.

repository: daniellansun/GINQ-docs

repo_name: daniellansun/GINQ-docs


text:
# You Gotta Be Kitten Me

A game by [Engima Dragons](https://enigmadragons.itch.io/) for [Ludum Dare 45](https://ldjam.com/events/ludum-dare/45/$163569)

## About

You Gotta Be Kitten Me is a 3D Platformer built in Unity 2019. You play as a mutant cat attempting to escape from the A.C.F (Animal Cruelty Factory). As you progress through the laboratory the cat unlocks new abilities allowing the player to get closer to escaping.

## Controls

|Key|Action
|---|---
|WASD|Movement
|LMB|Slash
|RMB|Rend
|Shift|Dash
|Space|Laser Eyes

### Source Code:

[https://github.com/EnigmaDragons/LDJAM45](https://github.com/EnigmaDragons/LDJAM45)


text:
# phly-expressive-oauth2clientauthentication

This library provides a [league/oauth2-client](http://oauth2-client.thephpleague.com)
adapter for use with [zend-expressive-authentication](https://docs.zendframework.com/zend-expressive-authentication).
It supports all OAuth2 Clients that inherit from `League\OAuth2\Client\Provider\AbstractProvider`.

## Installation

Install via Composer:

```bash
$ composer require phly/phly-expressive-oauth2clientauthentication
```

If you are using the [zend-component-installer Composer
plugin](https://docs.zendframework.com/zend-component-installer/),
this will automatically register the shipped `ConfigProvider` with your
application, as well as those of its dependencies (including
zend-expressive-authentication and zend-expressive-session). If you are not, you
will need to use the shipped
`Phly\Expressive\OAuth2ClientAuthentication\ConfigProvider` to add configuration
to your application:

```php
use Phly\Expressive\OAuth2ClientAuthentication\ConfigProvider;

return (new ConfigProvider())();
```

You will also need to install one or more of the OAuth2 providers you wish to
use. As an example:

```bash
$ composer require league/oauth2-instagram league/oauth2-google league/oauth2-facebook
```

gha_language: PHP


text:
layout: post
title: Activiti 5 with Spring Integration 2.0 Mail Adapter
tags: [enterprise-integration, activiti, bpm]
---

[Activiti](http://www.activiti.org/index.html) is an open source BPM and workflow system. The first GA release is expected to be out next month i.e. Dec 2010. The roadmap of activiti looks very promising and also involvement of companies like SpringSource and MuleSoft can make it even more interesting. There are couple of good http://docs.codehaus.org/display/ACT/Presentations+and+Articles[articles] and tutorials available on the wiki to help you get started with activiti. To get a feel of the framework, instead of developing a simple hello world app, I thought of integrating activiti with Spring Integration. SpringSource team is working on this integration module and once that is in place some of the boilerplate code from my prototype would be cleaned up. The following blog post demonstrates the use of spring integration mail module with activiti.

## Business Process

For the sake of prototype, I created a defect tracking application. Users can send their complaints to a specific email address e.g<EMAIL_ADDRESS>The application polls on helpdesk’s mailbox using spring integration mail module. Once email is received, a defect is created and workflow is initiated to handle this defect.

![](/img/activiti-demo.png)

## Running the Demo

The source code for the prototype is available at google code and github. Checkout the sources. Modify the database and mail configurations in activiti.properties. Run the app using embedded jetty server with mvn jetty:run. Run data.sql to create test users. Send a mail to the address configured in activiti.properties {gmail.username}. All defects are assigned by default to manager user. Login to the app using manager/password. You would see the defect in your task list for review. You can click on the review link, see the details of the defect and assign it to a different user (e.g. developer). Once you assign the defect to a different user, your task list would be empty :-). Now login as developer/password to resolve the defect.

![](/img/reviewdefect.png)

## Understanding the Code

### Maven Dependencies

```xml
<!-- ACTIVITI DEPENDENCIES -->
<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-engine</artifactId>
    <version>${activiti.version}</version>
</dependency>
<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-spring</artifactId>
    <version>${activiti.version}</version>
</dependency>
```

### Wiring it up with Spring

```xml
<!-- Activiti Beans -->
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"
    p:databaseType="${database}" p:dataSource-ref="dataSource"
    p:transactionManager-ref="transactionManager" p:dbSchemaStrategy="${db.schema.strategy}"
    p:jpaEntityManagerFactory-ref="entityManagerFactory"
    p:jpaCloseEntityManager="true" p:jpaHandleTransaction="true" />

<bean id="repositoryService" factory-bean="processEngine"
    factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine"
    factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine"
    factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine"
    factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine"
    factory-method="getManagementService" />
```

If you take a look at my previous [blog post](http://aparnachaudhary.me/2010/08/19/jBPM44-with-Spring3.html) about jBPM, you would clearly see the simplicity in configurations with activiti.

## Spring Integration Configurations

```xml

<!-- ========================================================= -->
<!-- ===== Spring Integration Setup for Receiving Email Messages ===== -->
<!-- ========================================================= -->

<util:properties id="javaMailProperties">
    <prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
    <prop key="mail.imap.socketFactory.fallback">false</prop>
    <prop key="mail.store.protocol">imaps</prop>
    <prop key="mail.debug">false</prop>
</util:properties>

<int-mail:imap-idle-channel-adapter
    id="gmailAdapter"
    store-uri="imaps://${gmail.username}:${gmail.password}@imap.gmail.com:993/inbox"
    channel="gmailChannel" auto-startup="true" should-delete-messages="false"
    java-mail-properties="javaMailProperties" />

<int:channel id="gmailChannel" />

<int:service-activator id="messageActivator"
    input-channel="gmailChannel" ref="gmailMessageActivator" method="process">
</int:service-activator>
```

## Understanding Service Activator and DefectService

The GmailMessageActivator bean receives the mime message. It extracts the information from the message and calls the DefectService to create the defect. In the current prototype, the process kick off is done in the DefectService. DefectService uses the activiti query API for dealing with tasks and process instances.

```xml

@Component("gmailMessageActivator")
public class GmailMessageActivator {

    @Autowired
    DefectService defectService;

    @Transactional(readOnly = false)
    public void process(MimeMessage mimeMessage) throws Exception {
        try {
            String[] fromHeaders = mimeMessage.getHeader("From");
            String from = "";
            if (fromHeaders != null && fromHeaders.length > 0) {
                from = fromHeaders[0];
            }
            Defect defect = new Defect();
            defect.setDescription(mimeMessage.getSubject());
            defect.setCreatedBy(from);
            defect.setAssignedTo("manager");
            defectService.createDefect(defect);
        }
        catch (MessagingException e) {
            throw new Exception("Exception occurred during message receiption ", e);
        }
    }
}
```

```java

//Note: checkout project for entire source

 @Autowired
 private DefectRepository defectRepository;
 @Autowired
 private RuntimeService runtimeService;
 @Autowired
 private RepositoryService repositoryService;
 @Autowired
 private TaskService taskService;

 @PostConstruct
 public void setupProcessDefinitions() {
     try {
         for (String processDefinition : processDefinitions) {
             repositoryService.createDeployment()
                     .addInputStream(processDefinition, new ClassPathResource(processDefinition).getInputStream())
                     .deploy();
         }
     }
     catch (Exception e) {
         throw new RuntimeException("An error occured while trying to deploy a process definition", e);
     }
 }

 @Override
 @Transactional(readOnly = false)
 public Defect createDefect(Defect defect) {
     defect.setCreatedDate(new LocalDate());
     defect.setStatus(DefectStatus.NEW);
     Defect newDefect = defectRepository.save(defect);

     Map<String, Object> vars = new HashMap<String, Object>();
     vars.put("defectId", newDefect.getId());
     vars.put("assignee", defect.getAssignedTo());
     runtimeService.startProcessInstanceByKey(DEFECT_TRACKING_PROCESS_KEY, newDefect.getId().toString(), vars);
     return defect;
 }
```

## Understanding BPMN2.0 constructs

A user task is used to model work that is to be done by human. When process execution arrives at this point in the flow, a new task is created in the user’s task list.

```xml

<userTask name="reviewDefect" id="reviewDefect">
    <documentation>
        The assignee will review the defect.
    </documentation>
    <humanPerformer>
        <resourceAssignmentExpression>
            <formalExpression>#{assignee}</formalExpression>
        </resourceAssignmentExpression>
    </humanPerformer>
</userTask>
```

A service task is used to execute some business logic when process execution arrives at a particular point.

```xml

<serviceTask id="findAssignee"
    activiti:class="net.arunoday.activiti.demo.handler.CheckAssignee" />
```

## Conclusion

In the above blog post, I demonstrated how to setup activiti and use it along with spring integration mail module. The configurations required to setup activiti are pretty simple. To get better understanding of the framework, its wise to quickly read the sources from activiti-engine module. Also, while you run the demo app, check the data in the activiti configuration tables and see how data flows from current tables to history tables after successful execution of the process. This data can be used to generate reports.

It would be interesting to see activiti getting feature rich and then answers to questions like “whether existing jBPM apps should continue with it or consider migrating to activiti?”, “whether new developments should be done with activiti or jBPM?” would come with ease :-)!!


text:
# Conventions

boxr uses the following naming conventions:

* `snake_case` names are used for exported functions.
* `snake_case` names are also used for *internal* functions, which an
     advanced user might stumble across and want to use. They are not exported
     because they're probably not terribly useful to most people.
* `camelCase` names are used for internal functions which probably won't play
    well out of thier intended environments, or may have output which is
    difficult to interpret. :dragon_face: Here be Dragons :fire:

repository: alexbrodersen/boxr

gha_license_id: NOASSERTION

repo_name: alexbrodersen/boxr


text:
---
title: "Supervaluation-Style Truth Without Supervaluations"
authors: [
  "Johannes Stern",
]
date: 2018-01-01
doi: "10.1007/s10992-017-9451-0"

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

# Publication name and optional abbreviated publication name.
publication: "Journal of Philosophical Logic"

abstract: "
  Kripke’s theory of truth is arguably the most influential approach to self-
  referential truth and the semantic paradoxes. The use of a partial evaluation scheme
  is crucial to the theory and the most prominent schemes that are adopted are the
  strong Kleene and the supervaluation scheme.

  The strong Kleene scheme is attractive
  because it ensures the compositionality of the notion of truth. But under the strong
  Kleene scheme classical tautologies do not, in general, turn out to be true and, as
  a consequence, classical reasoning is no longer admissible once the notion of truth
  is involved.

  The supervaluation scheme adheres to classical reasoning but violates
  compositionality. Moreover, it turns Kripke’s theory into a rather complicated affair:
  to check whether a sentence is true we have to look at all admissible precisification
  of the interpretation of the truth predicate we are presented with. One consequence of
  this complicated evaluation condition is that under the supervaluation scheme a more
  proof-theoretic characterization of Kripke’s theory becomes inherently difficult, if
  not impossible.

  In this paper we explore the middle ground between the strong Kleene
  and the supervaluation scheme and provide an evaluation scheme that adheres to
  classical reasoning but retains many of the attractive features of the strong Kleene
  scheme.  We supplement our semantic investigation with a novel axiomatic theory of
  truth that matches the semantic theory we have put forth.
"

# Summary. A shortened abstract for the summary pages.
summary: "We explore the middle ground between the strong Kleene
and the supervaluation scheme as used in Kripke's theory of truth."

# Tags. Optional for organization.
tags:
-

featured: false

url_preprint: sv.pdf

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

---

repository: catrincm/johannes-website

repo_name: catrincm/johannes-website


text:
# Microservice-Catalog-Frontend

[![Build Status](https://travis-ci.org/p632-sp-2017/microservice-catalog-frontend.svg?branch=master)](https://travis-ci.org/p632-sp-2017/microservice-catalog-frontend)[![Code Climate](https://codeclimate.com/github/p632-sp-2017/microservice-catalog-frontend/badges/gpa.svg)](https://codeclimate.com/github/p632-sp-2017/microservice-catalog-frontend)[![Test Coverage](https://codeclimate.com/github/p632-sp-2017/microservice-catalog-frontend/badges/coverage.svg)](https://codeclimate.com/github/p632-sp-2017/microservice-catalog-frontend/coverage)[![Issue Count](https://codeclimate.com/github/p632-sp-2017/microservice-catalog-frontend/badges/issue_count.svg)](https://codeclimate.com/github/p632-sp-2017/microservice-catalog-frontend)
[![Document Coverage](https://doc.esdoc.org/github.com/p632-sp-2017/microservice-catalog-frontend/badge.svg)](https://doc.esdoc.org/github.com/p632-sp-2017/microservice-catalog-frontend)

This is the Microservice Catalog project made under UITS for the P632 course.

Steps to install Yarn:

For macOS Users:
```
brew update
brew install yarn
```

For Windows Users
```
npm install -g yarn
```

Steps to Run:
1) Install Dependencies
```
cd src/main/app
yarn install
```
Reference for installing Yarn : https://yarnpkg.com/en/docs/install
Documentation for Yarn : https://yarnpkg.com/en/docs

2) Run Application
```
cd ../../..
mvn spring-boot:run
```
3) Stop Application
```
mvn spring-boot:stop
```

Steps to generate documentation using esdoc hosting service:

Go to: https://doc.esdoc.org/-/generate.html

Input: "git@github.com:p632-sp-2017/microservice-catalog-frontend.git"

Click the "Generate" button

View documentation on: https://doc.esdoc.org/github.com/p632-sp-2017/microservice-catalog-frontend/

# Wiki Documentation

To view a complete detailed documentation about the project : https://github.com/p632-sp-2017/microservice-catalog-frontend/wiki


text:
# OS homework for week 8

PB 18000227 艾语晨

### Problem 1

> **Q :**
>
> Consider the deadlock situation that can occur in the dining-philosophers problem when the philosophers obtain the chopsticks one at a time. Discuss how the four necessary conditions for deadlock hold in this setting. Describe a deadlock-free solution, and discuss which necessary conditions are eliminated in your solution

> **A :**

The Original Dining Code

```c
void philosopher(int i)
{
    while(true)
    {
		think();
		take(i); // We suppose this is the one on the left
		take((i + 1) % N); // The one on the right

        eat(); // Critical Section

        put(i); // Also left first
		put((i + 1) % N); // The right one
    }
}
void take(int i)
{
	down(&i); // To make sure of a Mutual Exclusion
}
```

- The four necessary conditions for deadlock are :
  - Mutual Exclusion :
    - When one philosopher is using one chopstick, another one cannot rob the chopstick from him
  - Hold and Wait :
    - Every philosopher is holding a chopstick, while waiting for the other chopstick held by another philosopher
  - No Preemption :
    - Only when a philosopher has finished eating, can he put down both his chopsticks. No one is able to rob other's chopstick.
  - Circular Wait :
    - A philosopher only can use the chopsticks on his side. Every philosopher is holding one chopstick, while waiting the other one, which is exactly held by his neighbour, so every philosopher is holding one chopstick, hungry but not eating. Thus forms a *Circular Waiting*.

Deadlock-free Solution Code

```c
void philosophor()
{
    while (true)
    {
		think();
		take(i); // This function includes both sides...
        eat();
        up(&chop[i]);
        up(&(chop[(i + 1) % N]));
    }
}
void take(int i)
{
    while (true)
    {
		down(&chop[i]);
		if (isUsed[(i + 1) % N])
        {
            up(&chop[i]); // If the one on the right refuses to be taken, then put down the left one
			sleep();
        }
		else
        {
			down(&(chop[(i + 1) % N]));
            break;
		}
    }
}
```

- Descripition of a deadlock-free solution :
  - When a philosopher starts eating :
    - He should first be hungry :
      - If a philosopher beside him is hungry (but not eating), he is forbidden to be hungry (the former hunger philosopher has turned down 'mutex', so the latter one is blocked).
    - When he *is* hungry :
      - He should ask both sides : **Are you eating ?**
      - If both neighbours are not eating, he can eat
      - If either (or both) neighbours is/are eating, he would be sent to sleep (blocked) by the eater's down(&s[eater])
  - When a philosopher finishes eating :
    - He calls down 'mutex', in order to lock hungry-or-not condition changing
    - He asks his neighbour : **Are you hungry ?**
    - If one neighbour *is* hungry, he should be asleep (blocked) now (due to the eater's `down`), so the eater wakes his neighbour up by calling `up(&s[eater])` (remove blocking state)
- The necessary condition eliminated in the solution is :
  - **Hold and Wait**
  - When a philosopher finds that one chopstick on his side is being used (neighbour eating) or will be (neighbour hungry), he gives up the chance to take chopstick, so he waits without holding resource

### Problem 2

> **Q :**
>
> Consider the exponential average formula used to predict the length of the next CPU burst. What are the implications of assigning the following values to the parameters used by the algorithm?
>
> a. $\alpha= 0$ and  $\tau_0= 100\ milliseconds$
>
> b. $\alpha= 0.99$ and  $\tau_0= 10\ milliseconds$

> **A :**

The original formula is on page 60 of Ch6.pdf

$$\tau_{n+1}=\alpha t_n + (1 - \alpha) \tau_n$$

> $t_n$ represents *Most Recent Information*, while $\tau_k$ refers to *Last Prediction* ($\tau_0$ means the *Predicted Time* at the beginning).

> **a :**

The formula now becomes $\tau_{n+1} = \tau_n, \tau_0 = 100ms$ .

- $\alpha = 0$ means that the prediction fully comes from the former predicted value, ignoring *most recent information*.

- $\tau_0 = 100ms$ means that the perdiction begins at 100ms.

> **b :**

The formula now becomes $\tau_{n+1} = 0.99t_n + 0.01\tau_n, \tau_0 = 10ms$ .

- This formula makes prediction *mainly* depending on *most recent information*, as the $\alpha$ value shows.
- $\tau_0 = 10ms$ means that the perdiction begins at 10ms.

### Problem 3

> **Q :**
>
> Consider the following set of processes, with the length of the CPU burst time given in milliseconds:
>
> | Process | Burst Time | Priority |
> | :-----: | :--------: | :------: |
> |  P~1~   |     10     |    3     |
> |  P~2~   |     1      |    1     |
> |  P~3~   |     2      |    3     |
> |  P~4~   |     1      |    4     |
> |  P~5~   |     5      |    2     |
>
> The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.

> a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF (nonpreemptive), nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1).
>
> b. What is the turnaround time of each process for each of the scheduling algorithms in part a?
>
> c. What is the waiting time of each process for each of these scheduling algorithms?
>
> d. Which of the algorithms results in the minimum average waiting time (over all processes)?

> **A :**

> > **a :**

**I would use date to show the time, each day represents 1ms, **

FCFS

```mermaid
gantt
	title GANTT for FCFS
	P1	: des1, 2000-01-01, 10d
	P2	: des2, 2000-01-11, 1d
	P3	: des3, 2000-01-12, 2d
	P4	: des4, 2000-01-14, 1d
	P5	: des5, 2000-01-15, 5d
```

SJF (nonpreemptive)

```mermaid
gantt
	title GANTT for SJF (nonpreemptive)
	P1	: des1, after des5, 10d
	P2	: des2, 2000-01-01, 1d
	P3	: des3, 2000-01-03, 2d
	P4	: des4, 2000-01-02, 1d
	P5	: des5, after des3, 5d
```

nonpreemptive priority

```mermaid
gantt
	title GANTT for nonpreemptive priority
	P1	: des1, after des5, 10d
	P2	: des2, 2000-01-01, 1d
	P3	: des3, after des1, 2d
	P4	: des4, after des3, 1d
	P5	: des5, after des2, 5d
```

RR （~~这个实在画不出来了，~~我把这4个重新在 Numbers 里面画了一遍。。。每一格是 1ms，后面的甘特图同理）![Screenshot 2020-04-20 at 7.25.53 PM](/Users/lapland/Library/Application Support/typora-user-images/Screenshot 2020-04-20 at 7.25.53 PM.png)

> > **b :** in P1~P5 order

| algorithm |  turnaround time   |
| :-------: | :----------------: |
|   FCFS    | 10, 11, 13, 14, 19 |
|    SJF    |   19, 1, 4, 2, 9   |
| priority  |  16, 1, 18, 19, 6  |
|    RR     |  19, 2, 7, 4, 14   |

> > **c :**

| algorithm |   Waiting time    | Average Waiting Time |
| :-------: | :---------------: | :------------------: |
|   FCFS    | 0, 10, 11, 13, 14 |         9.6          |
|    SJF    |   9, 0, 2, 1, 4   |         3.2          |
| priority  |  6, 0, 16, 18, 1  |          8           |
|    RR     |   9, 1, 5, 3, 9   |         5.4          |

> > **d :**

SJF minimum average waiting time 最小

### Problem 4

> **Q :**
>
> Which of the following scheduling algorithms could result in starvation?
>
> a. First-come, first-served
>
> b. Shortest job first
>
> c. Round robin
>
> d. Priority

> **A :**
>
> $\bf{a\,b\,d}$

### Problem 5

> **Q :**
>
> Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing and that each I/O operation takes 10 milliseconds to complete. Also assume that the context-switching overhead is 0.1millisecond and that all processes are long-running tasks. Describe is the CPU utilization for a round-robin scheduler when:
>
> a. The time quantum is 1 millisecond
>
> b. The time quantum is 10 milliseconds

> **A :** We assume that only when all I/O task are in *waiting* condition, can CPU task get into CPU.

> **a:**
>
> A task would face context switching after it has been running for 1ms, whether it's an I/O task or CPU task, so the CPU utilisation is $\frac{1}{1+0.1}=0.909$
>
> **b:**
>
> When CPU resource is allocated to an I/O task, every I/O task would take 1ms, then go to do I/O operations, so the CPU would do context switch. The Gantt chart is like below (draw in Numbers):
>
> ![Screenshot 2020-04-13 at 2.21.40 PM](/Users/lapland/Library/Application Support/typora-user-images/Screenshot 2020-04-13 at 2.21.40 PM.png)
>
> Therefore the CPU utilisation is $\frac{10+10}{11\cdot 0.1+20}=0.948$.

### Problem 6

> **Q :**
>
> Give an example to illustrate under what circumstances rate-monotonic scheduling is inferior to earliest-deadline-first scheduling in meeting the deadlines associated with processes?

> **A :**
>
> > Example : There are total *two* processes, named P1 & P2. Their arrival gap & tasking time are shown as below (we assume that both P1 & P2 arrived at 0ms, in the order of 1,2:
> >
> > P1 : $d_1(gap) = 50ms, t_1(task) = 25ms$
> >
> > P2 : $d_2(gap)=80ms,t_2(task)=35ms$
>
>
>
> > Rate-monotonic scheduling :
> >
> > The Gantt chart is like this (drawn in OneNote) :
> >
> > ![Screenshot 2020-04-13 at 6.05.26 PM](/Users/lapland/Library/Application Support/typora-user-images/Screenshot 2020-04-13 at 6.05.26 PM.png)
> >
> > So when the deadline of P2 comes, the actual task time of P2 is $25+5=30<35$ , thus P2's task is not completed before its DDL.
>
>
>
> > However, the *earlist-deadline-first* scheduling can make sure that both processes can finish their task before ddl.
>
>
>
> > Earlist-deadline-first scheduling :
> >
> > The Gantt chart is like this (drawn in OneNote) :
> >
> > ![Screenshot 2020-04-13 at 7.19.19 PM](/Users/lapland/Library/Application Support/typora-user-images/Screenshot 2020-04-13 at 7.19.19 PM.png)
> >
> > (*When time reaches 50ms, the ddl of P1 is at 100ms, while that of P2 is at 80ms, therefore P2 is to be done*)
> >
> > So P1 & P2 can both done their tasks.
>
>
>
> > So we say that under this circumstance rate-monotonic scheduling is inferior to earliest-deadline-first scheduling in meeting the deadlines associated with processes.

repository: yaoReadingCode/Operating-System

path: /Theory HW/homework 4/Apr 8.md

filename: Apr 8.md

repo_name: yaoReadingCode/Operating-System


text:
# 20-questions-game-backend

## Tools used

* [expressJS](https://expressjs.com) - to build the app
* [Postman](https://www.postman.com) - for testing the API
* [Heroku](https://www.heroku.com) - for hosting the app
* [Git and GitHub](https://git-scm.com) - for tracking, storage and version control

## How to setup the app

### Option 1

* The app has been setup and deployed on [Heroku](https://www.heroku.com)

### Option 2

Alternatively, you can do the following to setup the app locally. Run the commands below in your terminal or CMD:

1 Clone the repo using this command
```
git clone https://github.com/Dewalade1/20-questions-game-backend.git
```

2. Change directory to the repo folder
```
cd <path-to-repository>/20-questions-game-backend
```

3. Install the dependencies using npm
```
npm i
```

4. See `Option 2` in the `How to start the app` section below to start the app

## How to start the app

### Option 1

* The easiest way to start up the backend app is to [click here](https://twentyquestions20.herokuapp.com/)

### Option 2

You can start the app locally or run it on a development environment using the following commands:

* **Start app locally**
```
npm start
```

* **Run on a local dev environment**
```
npm run dev
```

## Available Scripts

* **Start app**
```
npm start
```
Open [http://localhost:8080](http://localhost:8080) in your browser to view it.
The page will refresh if you make edits to the code.
You will also see any compile and lint errors in the console.

* **Run on a dev environment**
```
npm run dev
```
Open [http://localhost:8080](http://localhost:8080) in your browser to view it.
The page will refresh if you make edits to the code.
You will also see any compile and lint errors in the console.


text:
WHENet: Real-time Fine-Grained Estimation for Wide Range Head Pose
===
**Yijun Zhou and James Gregson - BMVC2020**

**Abstract:** We present an end-to-end head-pose estimation network designed to predict Euler
angles through the full range head yaws from a single RGB image. Existing methods
perform well for frontal views but few target head pose from all viewpoints. This has
applications in autonomous driving and retail. Our network builds on multi-loss approaches
with changes to loss functions and training strategies adapted to wide range
estimation. Additionally, we extract ground truth labelings of anterior views from a
current panoptic dataset for the first time. The resulting Wide Headpose Estimation Network
(WHENet) is the first fine-grained modern method applicable to the full-range of
head yaws (hence wide) yet also meets or beats state-of-the-art methods for frontal head
pose estimation. Our network is compact and efficient for mobile devices and applications. [**ArXiv**](https://arxiv.org/abs/2005.10353)

## Demo
We provided two use case of the WHENet, image input and video input in this repo. Please make sure you installed all the requirments before running the demo code by `pip install -r requirements.txt`. Additionally, please download the [YOLOv3](https://drive.google.com/file/d/1wGrwu_5etcpuu_sLIXl9Nu0dwNc8YXIH/view?usp=sharing) model for head detection and put it under `yolo_v3/data`.

## Image demo
To run WHENet with image input, please put images and bbox.txt under one folder (E.g. Sample/) and just run `pthon demo.py`.

Format of bbox.txt are showed below:
```
image_name,x_min y_min x_max y_max
mov_001_007585.jpeg,240 0 304 83
```

## Video/Webcam demo
We used [YOLO_v3](https://github.com/qqwweee/keras-yolo3) in the video demo to get the cropped head image.
In order to customize some of the functions we have put the yolo implementation and the pre-trained model in the repo.
[Hollywood head](https://www.di.ens.fr/willow/research/headdetection/) and [Crowdhuman](https://www.crowdhuman.org/) are used to train the head detection YOLO model.
````
demo_video.py [--video INPUT_VIDEO_PATH] [--snapshot WHENET_MODEL] [--display DISPLAY_OPTION]
              [--score YOLO_CONFIDENCE_THRESHOLD] [--iou IOU_THRESHOLD] [--gpu GPU#] [--output OUTPUT_VIDEO_PATH]
````
Please set `--video ''` for webcam input.

## Dependncies
* EfficientNet https://github.com/qubvel/efficientnet
* Yolo_v3 https://github.com/qqwweee/keras-yolo3


text:
[@bigcommerce/checkout-sdk](../README.md) / ApplePayButtonInitializeOptions

# Interface: ApplePayButtonInitializeOptions

A set of options that are required to initialize ApplePay in cart.

When ApplePay is initialized, an ApplePay button will be inserted into the
DOM. When a customer clicks on it, it will trigger Apple sheet.

## Table of contents

### Properties

- [buttonClassName](ApplePayButtonInitializeOptions.md#buttonclassname)
- [buyNowInitializeOptions](ApplePayButtonInitializeOptions.md#buynowinitializeoptions)
- [requiresShipping](ApplePayButtonInitializeOptions.md#requiresshipping)

### Methods

- [onPaymentAuthorize](ApplePayButtonInitializeOptions.md#onpaymentauthorize)

## Properties

### buttonClassName

• `Optional` **buttonClassName**: `string`

The class name of the ApplePay button style.

___

### buyNowInitializeOptions

• `Optional` **buyNowInitializeOptions**: `Object`

The options that are required to initialize Buy Now functionality.

#### Type declaration

| Name | Type |
| :------ | :------ |
| `getBuyNowCartRequestBody?` | () => `void` \| `default` |

___

### requiresShipping

• `Optional` **requiresShipping**: `boolean`

This option indicates if product requires shipping

## Methods

### onPaymentAuthorize

▸ **onPaymentAuthorize**(): `void`

A callback that gets called when a payment is successfully completed.

#### Returns

`void`

repository: bigcommerce/checkout-sdk-js

repo_name: bigcommerce/checkout-sdk-js


text:
# LinkFree
A free and open source alternative to LinkTree!

[Website](https://michaelbarney.github.io/LinkFree)

<img src="https://i.imgur.com/B4LX0kY.png" alt="alt text" width="250px">

## What is LinkFree?
Ever wanted to add more links to your Instagram bio? LinkFree does just that! It gathers all of your links into one page that is easy to navigate.

## What are the benefits?
Compared to other solutions, LinkFree is fully customizable and open source!
- No more pesky third party logos
- Add your custom colors, images and fonts
- Use full custom analytics and metrics platforms
- Create your own template or use one made by the community!

## How to use?
To startoff, you can choose a template for your LinkFree in the "Templates" directory. Then you can clone or fork this repository to adapt it with your information.

After this, there are some options to use LinkTree to match the way you want to use.

### 1 - Pull Request
You can make a Pull Request that adds your LinkFree into this project's Users folder. This way, you can easily access it through your link found on [this link](https://michaelbarney.github.io/LinkFree/Users).

The link is quite big, so you can use an url shortner like [this one](https://bitly.com/) to make it smaller/

The downside is that updates to the website will need to be made through accepted pull requests, making it slower.

### 2 - Fork and Configure
Another option is to fork this repository to your own account and there configure your personal page using github pages. This will let you make edits much faster.

If you want to still share your LinkFree with the community, you can add its shortened url into the Users readme file.

## How to see statistics?
You can use any statiscs platform of your choosing that is based on client javascript. We recommend the following:
- [Amplitude](https://amplitude.com/homepage)
- [Hotjar](https://www.hotjar.com/)

You can use any of the functions for load and click defined on the javascript file of the LinkFree template or add code snippets to the Head or Body of the HTML file.

## How to contribute?
There are a three ways you can contribute. You can make changes to the core LinkFree project, create new LinkFree templates or just share your LinkFree.

Only contributors that work on the LinkFree core project or that create a new template will be featured on this page's contributor list.

### Creating Templates
A new template is a general LinkFree that has a distinctive structure or style when compared to previous templates.

To submit one, you just have to make a pull request with your addition in the "Templates" directory.

repository: FreDiabetics/LinkFrediabetics

repo_name: FreDiabetics/LinkFrediabetics


text:
## Elasticsearch Backup and Restore

- [Shell Script](https://github.com/shams-sam/logic-lab/blob/master/ElasticsearchBackupAndRestore/elastic_command)
- [Environment Variable Config](https://github.com/shams-sam/logic-lab/blob/master/ElasticsearchBackupAndRestore/config.sh)

## Setup
````
for ES version < 2.x:
  sudo /usr/share/elasticsearch/bin/plugin install elasticsearch/elasticsearch-cloud-aws/2.7.1
else:
  sudo /usr/share/elasticsearch/bin/plugin install elasticsearch/elasticsearch-cloud-aws
````
````
1. ls /usr/share/elasticsearch/plugin should show cloud-aws
2. restart the elasticsearch server
3. curl localhost:9200/_nodes/plugin should show cloud-aws
````

## One click backup and restore
````
source config.sh
. elastic_commnd &&  es_backup
. elastic_commnd &&  es_restore
````

## Functions
### General Purpose
````
1. get_arg $1 $2               returns $2 if not empty else $1
2. get_timestamp               gets current time stamp
3. get_memory_usage            gets current memory usage
4. get_disc_usage              gets current disc space usage
````
### Elasticseach Index
````
1. close_index $1              close the index before restore
2. open_index $1               open the index
3. check_index_status $1       checks index status
````
### AWS Cloud Backup Repository
````
1. _repo_exists $1             checks if repo exists
2. get_repo $1                 gets a repo and creates one if not present
3. verify_repo $1              verify the repo is created successfully
4. delete_repo $1              delete the repo if present
````
### AWS Cloud Backup Snapshot
````
1. get_snapshot $1 $2          get all snapshots in the repo
2. get_snapshot_status $1 $2   get snapshot status while backup
3. create_snapshot $1          create snapshot with given name
4. delete_snapshot $1          delete snapshot with given name
````
### AWS Cloud Backup Restore
````
1. restore_snapshot $1         restore snapshot with given name
2. get_recovery_status $1      check recovery status while restore
````
## [Reference](https://cuongba.com/backup-and-restore-elasticsearch-with-amazon-s3/)

repository: shams-sam/logic-lab

repo_name: shams-sam/logic-lab


text:
---
title: Configuration
---

## Global Settings

The Settings object (exported to `party.settings`) holds various values determining the global behaviour of the library. These are not read-only, so you can mess around with them to your heart's content.

| Name    | Default | Description                                                                                |
| :------ | :------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| debug   | `false` | Whether the debugging mode should be enabled.                                                                                |
| gravity | 800     | The amount of gravity to apply to particles in the scene, in pixels. Note that this value is positive by default, since the y-axis increases downwards in a DOM. |
| zIndex  | 99999   | The z-index to place the DOM containers at.                                                                                |

repository: mqentar/party-js

repo_name: mqentar/party-js


text:
## Available scripts

Run using `npm run <script>` comand.

+ `clean` - remove coverage data, Jest cache and transpiled files,
+ `lint` - lint source files and tests,
+ `typecheck` - check type annotations,
+ `test` - lint, typecheck and run tests with coverage,
+ `test-only` - run tests with coverage,
+ `test:watch` - interactive watch mode to automatically re-run tests,
+ `build` - compile source files,
+ `build:watch` - interactive watch mode, compile sources on change.

## License
Released under MIT license.


text:
# react-tenor

[![Package Version](https://img.shields.io/npm/v/react-tenor.svg)](https://www.npmjs.com/package/react-tenor)

A React component for selected GIFs from [Tenor](https://tenor.com/gifapi).

## Getting started

First, add `react-tenor` to your `package.json` `dependencies`, then install using either `npm install` or `yarn install`. Then, get your API key from tenor. Finally, you can add the selector component by adding:

```jsx
<Tenor token="your-token-here" onSelect={result => console.log(result)} />
```

To get the styles, be sure it import `react-tenor/dist/styles.css` into your application. You can style it appropriately for your app by overriding the CSS classes used internally. They are listed in [`styles.css`](src/styles.css).

### `base`

If you need to change the API endpoint that this component hits, you can set the `base` prop on the component to a valid URL.

### `contentRef`

If you need access to the actual `div` that `Tenor` renders, you can pass any valid `React` ref to the `contentRef` prop.

### `focus()`

The `Tenor` component has a `focus()` member function that can be called to request focus be placed on the search input.

## Running with node

This package uses the `isomorphic-fetch` package to allow `fetch` to be used when running in the `node` environment, but only in development. In production, it assumes `global.fetch` is already in place from either the browser or a polyfill of your choice.

## Testing locally

You can run the tests by running `yarn test` and lint by running `yarn lint`. You can run the local server by running `yarn start` which will start the docs server on `http://localhost:8080`.

repository: TrendingTechnology/react-tenor

repo_name: TrendingTechnology/react-tenor


text:
## Installation

### Quickstart

[Scala 2.9](http://www.scala-lang.org/downloads) (JDK6 or JDK7) is required.

Install with `git clone https://github.com/twitter/zipkin.git && cd zipkin` or
[download](https://github.com/twitter/zipkin/archive/master.zip) Zipkin to your
preferred directory and unzip.

Run (in separate bash windows):

    bin/collector
    bin/query
    bin/web

Now you can access the Zipkin UI at http://localhost:8080/

### Advanced Setup

By default, Zipkin runs on SQLite because it doesn't require additional setup.
However, Zipkin is typically used with other databases (most often Cassandra)
in production. For a quickstart with Cassandra, see the
[Ubuntu Quickstart](https://github.com/twitter/zipkin/blob/master/doc/ubuntu-quickstart.txt) and
[Mac Quickstart](https://github.com/twitter/zipkin/blob/master/doc/mac-quickstart.md) guides.
These will help you get a somewhat more advanced Zipkin installation running on
a single machine so that you can experiment with it.

For larger deployments, Zipkin works with several other services, and you may
want to apply additional configuration. Some of those services and
configurations are described below.

### Feeding trace data to Zipkin

The next step after installation is to collect trace data to view in Zipkin. To
do this, you must interface with the collector daemon to record trace data.
There are several libraries to make this easier to do in different
environments. Twitter uses
[Finagle](https://github.com/twitter/finagle/tree/master/finagle-zipkin);
external libraries (currently for Python, REST, node, and Java) are listed in the
[wiki](https://github.com/twitter/zipkin/wiki#external-projects-that-use-zipkin);
and there is also a [Ruby gem](https://rubygems.org/gems/finagle-thrift) and
[Ruby Thrift client](https://github.com/twitter/thrift_client).

### Running the Daemons with Other Databases

The default Zipkin collector configuration is
`zipkin-collector-service/config/collector-dev.scala` and the default Zipkin
query configuration is `zipkin-query-service/config/query-dev.scala`. These
are set up to work with SQLite by default. To use Zipkin with a different SQL
database, we recommend changing those configurations as described in the
[SQL guide](https://github.com/twitter/zipkin/blob/master/doc/sql-databases.md).

For NoSQL databases, you can pass the name of your preferred database to the
collector and query daemons. For example, with Cassandra:

    bin/collector cassandra
    bin/query cassandra
    bin/web

### Storage: Cassandra

Zipkin runs on SQLite by default to make it easier to test out of the box.
Running Zipkin on SQLite requires no additional setup. However, in production,
Zipkin is most commonly used with [Cassandra](http://cassandra.apache.org/) for
the collector's storage. There are also plugins for
[Redis](https://github.com/twitter/zipkin/blob/master/doc/redis.md), HBase, and
[other SQL databases](https://github.com/twitter/zipkin/blob/master/doc/sql-databases.md).

1. See Cassandra's site for instructions on how to start a cluster.
2. Use the Zipkin Cassandra schema attached to this project. You can create the schema with the following command:
`cassandra-cli -host localhost -port 9160 -f zipkin-cassandra/src/schema/cassandra-schema.txt`

### Coordination: ZooKeeper

Zipkin can use ZooKeeper for coordination. That's where we store the server side sample rate and register the servers.

1. See ZooKeeper's site for instructions on how to install it.

### Collecting Data: Scribe

Scribe is the logging
framework we use at Twitter to transport the trace data. There are several other
ways to tell Zipkin what trace data to collect; in particular, if you are just
trying out Zipkin you can skip this step entirely and point the ZipkinTracer
directly at the collector.

To use Scribe with Zipkin, you need to set up a network store that points to
the Zipkin collector daemon. A Scribe store for Zipkin might look something
like this:

    <store>
      category=zipkin
      type=network
      remote_host=<IP_ADDRESS>
      remote_port=9410
      use_conn_pool=yes
      default_max_msg_before_reconnect=50000
      allowable_delta_before_reconnect=12500
      must_succeed=no
    </store>

If you don't want to hardcode the IP address of your collector there are a few
options. One is to use an internal DNS entry for the collectors so that you only
have one place to change the addresses when you add or remove collectors.
Alternatively, if you want to get all fancy you can use a
[modified version of Scribe](https://github.com/traviscrawford/scribe) that
picks up the collectors via ZooKeeper. When each collector starts up it adds
itself to ZooKeeper and when a collector shuts down it is automatically
removed. The modified Scribe gets notified when the set of collectors change.
To use this mode you change `remote_host` in the configuration to
`zk://zookeeper-hostname:2181/scribe/zipkin` or something similar.

We're hoping that others might add non-Scribe transports for the tracing data;
there is no reason why Scribe has to be the only one.

### Zipkin UI

To develop on the ui start it with
```
bin/web.sh
```

To run zipkin ui on a server do
```
  sbt zipkin-web/package-dist
  cd zipkin-web/dist/zipkin-web
  java -cp libs/ -jar zipkin-web-1.2.0-SNAPSHOT.jar -zipkin.web.resourcesRoot=resources/
```

For a list of available options do
```
java -cp libs/ -jar zipkin-web-1.2.0-SNAPSHOT.jar -h
```

#### zipkin-tracer gem
The `zipkin-tracer` gem adds tracing to a Rails application through the use of a Rack Handler.
In `config.ru`:

```ruby
  use ZipkinTracer::RackHandler
  run <YOUR_APPLICATION>
```

If the application's static assets are served through Rails, those requests will be traced.

repository: russellremple/zipkin

repo_name: russellremple/zipkin