text:
# Changelog

## 6.0.2 (2023-07-07)
* fix(cli): actually throw error on failures 2ad9e2b63d86d936fd395d7c4d757b8eff3b661d
* fix: properly check CSS length units 127502692f5ecd83b75c485379a78f0340da9053
* perf(utils): only check selector on 'rule' nodes d9c6183c4ab13c19da1f6088bb0286492ca87d5d
* perf(utils): only check atrule on 'atrule' nodes 08b9c2b448f7d41b058be24fcfc30858b3883fc2

## 6.0.1 (2023-07-05)
* fix(DoIUse): support string constructor argument ab7df2f095637fe52d10d65eabe47facd5cd3633
* typescript: reconfigure for ts 5.x and node v16.x 44359cba909e1c6a6fb605b24ba71732ba3dda94
* fix(exports/stream): constructor as default export 959d763da9e465fd2dc73e7a36c093156fa47564

## 6.0.0 (2023-07-03)
* BREAKING: Drop Node v12 and v14 support
* Add caniuse features
* * `css-conic-gradients`
* * `css-container-queries-style`
* * `css-container-query-units`
* * `css-font-palette`
* * `css-grid-animation`
* * `css-matches-pseudo`
* * `css-math-functions`
* * `css-media-range-syntax`
* * `css-motion-paths`
* * `css-print-color-adjust`
* * `mdn-css-unicode-bidi-isolate`
* * `mdn-css-unicode-bidi-isolate-override`
* * `mdn-css-unicode-bidi-plaintext`
* * `mdn-text-decoration-color`
* * `mdn-text-decoration-line`
* * `mdn-text-decoration-shorthand`
* * `mdn-text-decoration-style`
* Update dependencies
* * browserlist
* * caniuse-lite
* * postcss
* * source-map
* * yargs
* Update dev dependencies

## 5.1.1 (2022-03-12)
* Fix flexbox typo

## 5.1.0 (2022-03-12)
* Add legacy support with `main` in package.json
* Use individual files for feature checks
* Add missing css-grid values

## 5.0.4 (2022-03-12)
* Fixed CommonJS support
* Replaced `esbuild` to `rollup` for CommonJS support

## 5.0.3 (2022-03-07)
* Fixed extra errors being emitted
* Add `types/**/*.d.ts`

## 5.0.2 (2022-03-07)
* Fixed CommonJS support

## 5.0.1 (2022-03-07)
* Fixed Node v12 support

## 5.0.0 (2022-03-07)
* Rewrite all files to ES Modules
* Fold `css-rule-stream` into package
* Drop support for Node v10
* Drop `tape` for `tap`
* Drop `through2` for native `Passthrough`
* Remove `babel`
* Add coverage (`c8`)
* Add `eslint` rules

## 4.4.1 (2021-01-26)

* Intrinsic width feature update with "stretch" value [\#132](https://github.com/anandthakker/doiuse/pull/132)
* Drop unused jsonfilter dependency [\#133](https://github.com/anandthakker/doiuse/pull/133)
* Upgrade browserslist (4.16.1), caniuse-lite (1.0.30001157), postcess (8.1.6), yargs (16.2.0) [\#134](https://github.com/anandthakker/doiuse/pull/134)

## 4.4.0 (2020-11-10)

* Fix possible regular expression catastrophic backtracking [\#105](https://github.com/anandthakker/doiuse/pull/105)
* Upgrade browserslist (4.14.7), caniuse-lite (1.0.30001179), postcess (8.2.4) [\#106](https://github.com/anandthakker/doiuse/pull/106)

## 4.3.1 (2020-10-30)

* Optimize package size by ignoring .idea and .github folders

## 4.3.0 (2020-10-30)

**IMPORTANT**: This release drops support for Node older than 10.x

* Upgrade dependencies and remove security warnings [\#123](https://github.com/anandthakker/doiuse/pull/123)
* Extend list of tested Node.js versions [\#122](https://github.com/anandthakker/doiuse/pull/122)
* Migrate CI to GitHub Actions [\#122](https://github.com/anandthakker/doiuse/pull/122)

## 4.2.0 (2018-09-27)

* Detect use of 'initial', 'unset', and 'revert' keywords [\#93](https://github.com/anandthakker/doiuse/pull/93)
* Improve css-sel2 detection performance [\#88](https://github.com/anandthakker/doiuse/pull/88)
* Remove lodash dependency [\#94](https://github.com/anandthakker/doiuse/pull/94)
* Upgrade browserslist (4.1.1), caniuse-lite (1.0.30000887)

## 4.1.0 (2018-03-23)

* Upgrade browserslist (3.1.1) and caniuse-lite (1.0.30000810) [\#85](https://github.com/anandthakker/doiuse/pull/85)
* Update font-unicode-range [\#80](https://github.com/anandthakker/doiuse/pull/80)
* Conform to browserslist API [\#81](https://github.com/anandthakker/doiuse/pull/81)
* Upgrade browserslist (3.2.1) and caniuse-lite (1.0.30000819)
* Drop node 4 support

## 4.0.0 (2017-10-09)

* **Breaking:** No longer throws an error for unrecognised node types [\#75](https://github.com/anandthakker/doiuse/pull/75)

## 3.0.1 (2017-08-24)

* Fix config not found due to missing parameter

## 3.0.0 (2017-05-15)

* Remove Node.js 0.12 support
* Use PostCSS 6
* Use Browserslist 2
* Use caniuse-lite instead of caniuse-db
* Fix loading Browserslist config
* Clean npm package from development files

## 2.0.2 (2015-10-16)

* Use PostCSS 'warn' API, add feature id in reported results

## 2.0.1 (2015-10-13)

* **Breaking:** Add option to ignore rules
* clean up README, add Gulp example
* update node versions on travis

## 1.0.4 (2015-10-07)
* update PostCSS to 5.x

## 1.0.3 (2015-07-28)
* update browserlist dep

## 1.0.2 (2015-07-21)
* strip URLs out of values before testing them
* add standard code style, fix lint errors
* fix lint errors
* add failing test for [\#17](https://github.com/anandthakker/doiuse/pull/17)
* link to openopensource.org

## 1.0.1 (2015-06-01)
* update caniuse-db
* update / fix README examples.

## 0.3.3 (2015-05-03)
* update postcss version
* fix test

## 0.3.2 (2015-02-11)
* add missing through2 dependency [\#6](https://github.com/anandthakker/doiuse/issues/6)

## 0.3.1 (2014-12-24)
* fix regression: correct source location in output
* add test for streaming mode, mostly to see wtf is happening on travis
* fix some cli tests

## 0.2.6 (2014-12-22)
* fix missing next()
* fix tests

## 0.2.4 (2014-12-21)
* don't instance postcss each chunk

## 0.2.3 (2014-12-21)
* cut the input CSS into a stream of (parseable) fragments.
* logging for travis
* drop nyan reporter

## 0.2.2 (2014-12-17)
* handle errors

## 0.2.1 (2014-12-17)
* fix: cli bugz
* change stream api to just do objects
* fix: flush stream

## 0.1.6 (2014-12-17)
* add transform stream option

## 0.1.5 (2014-12-17)
* use browserslist module
* add JSON output option in CLI

## 0.1.4 (2014-12-09)
* add several features (still pending tests)
* travis badge
* gulp-util dependency

## 0.1.3 (2014-12-08)
* feature: css3 cursors
* feature: outline
* feature: viewport units
* feature: word-break
* feature: css-repeating-gradients
* feature: css-resize
* features: rem units, pointer-events, counters
* add travis

## 0.1.2 (2014-12-08)
* switch to GNU message format.

## 0.1.1 (2014-11-23)
* feature: object-fit
* feature: overflow-wrap
* feature: text-overflow
* feature: opacity
* features: media queries and feature queries
* feature: css-canvas
* add feature: multibackgrounds

## 0.0.6 (2014-11-17)
* add bin to package.json
* include title directly in result for convenience
* bugfix: was failing to filter only unsupported features
* bugfix: cli was ignoring parameter
* add failing test for bug
* add informational output to cli
* CLI
* add info() method.
* build: clean task

## 0.0.5 (2014-11-17)
* add readable message to callback parameter

## 0.0.4 (2014-11-17)
* tweak regexp; add background-img-opts test
* convenience 'only' flag in test cases
* generalize feature detection testing
* detect-feature-use: smarter regexes
* feature: css-sel2 and css-sel3
* add some detection data
* stubs for features needing detection data

## 0.0.3 (2014-11-14)
* more documentation
* documentation
* fix missing-support test; reformat features data
* udpate readme

## 0.0.1 (2014-11-14)
* basic postcss plugin working.
* tweak build
* detect features being used in css file
* convert/filter caniuse data based on browser selection
* move output
* fix typo
* update build
* add data; gulpfile
* initial commit

repository: anandthakker/doiuse

repo_name: anandthakker/doiuse


text:
# Spunky
Spunky is a modern 2D/3D game development framework/engine written in C++.

## Plans
* Entity Component System
* Widget System for Responsive UI
* 3D Audio supporting many audio formats
* Networking supporting NAT Traversal

# Libraries
* [SDL](https://github.com/libsdl-org/SDL)
* [BGFX](https://github.com/bkaradzic/bgfx)
* [MojoAL](https://github.com/icculus/mojoAL/)
* [GameNetworkingSockets](https://github.com/ValveSoftware/GameNetworkingSockets)

# License
This project is MIT Licensed.

license: MIT

repository: SpunkyGame/Spunky

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: SpunkyGame/Spunky


text:
# Celo Wallet

The Celo Wallet is the easiest way to send, receive, and save Celo Assets. This section describes what is going on under the hood during various aspects of the wallet experience.

![Celo Wallet Verification](https://storage.googleapis.com/celo-website/docs/celo-onboarding.gif)


text:
# password_manager

Cli to handle encryption of a json file data which contains web site passwords.
It encrypt the file in AES-256-CBC with the given password then format it in base64.
There are no way to recover the file data if the password is lose so be careful.

### Requirement
- Ruby 2.4
- Bundler 1.16.0

### Installation

As the gem is only present in Github you must clone it in order to install.

```sh
  git clone https://github.com/Rainiugnas/password_manager
  cd password_manager

  bundle install
  bin/install
```

```ruby
gem 'PasswordManager'
```

### Usage

Once the cli installed, you can start to use it.
First build an empty json file (let's say password.json):

```json
  {}
```

Then encrypt it by running: `password_manager -f password.json --encrypt`.

Now that the file is build and encrypted you can use the following command on it.

- `decrypt` to convert the file in json format (you must re encrypt it in order to use the commands)
- `list` to get all the site name present in the file
- `show` to display a specific site the data
- `add` to add a new site in the file (it will ask you the site data)
- `tmp` to decrypt the file and press enter to encrypt it, useful to manually edit the file (if any error is made in the file the encryption will fail).

All this commands require an encrypted file and leave the file encrypted (except for decrypt).

#### Site format

Site fixe attributes:

- `name` must be unique per file
- `username` user name
- `password` can be blank

A site can also have any other attribute that you want.
Note that a site must have a name and at least an username or an email

Example of valid json file.
```json
  "site.com": {
    "username": "foo",
    "password": "bar"
  },
  "another-site.com": {
    "username": "foo",
    "password": "bar",
    "notes": ["lorem", "ipsum"],
    "email"<EMAIL_ADDRESS>  }
```

Be sure to alway have valid json file and site else it will fail to parse.

#### File crypter

`file_crypter` is another executable provided by PasswordManager.
Use to encrypt / decryt any format of file in aes / base 64.

Only the option encrypt (-e --encrypt) / decript (-d --decrypt) are available.
Like password_manager a file must be provided trough file option (-f --file).

Example:

```sh
  echo 'foo bar' > toto.txt
  file_crypter -f toto.txt -e # toto.txt is now encrypted

  file_crypter -f toto.txt -d # toto.txt is decrypted and contains the previous data "foo bar"
```

## License

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


text:
# @remirror/extension-react-tables

[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@remirror/extension-react-tables.svg?)](https://bundlephobia.com/result?p=@remirror/extension-react-tables) [![npm](https://img.shields.io/npm/dm/@remirror/extension-react-tables.svg?&logo=npm)](https://www.npmjs.com/package/@remirror/extension-react-tables)

This package includes two main features: table controllers and table cell menu.

Table controllers are some cells at the top and left side of the table. Table controllers can only be seen when the table is forced. With table controllers, a user can easily achieve the following functions:

1. select a row, a column or the whole table
2. delete a row or a column
3. insert a row or a column

![table controllers](https://user-images.githubusercontent.com/24715727/113511783-3877b600-9594-11eb-86a0-ea6365f953ce.gif)

Table cell menu is a menu component that can be opened by clicking the top-right corner of a table cell. A table menu provides a method for user to trigger some ProseMirror commands:

- insert a column
- delete a column
- insert a row
- delete a column
- delete the table
- change the background color of one or multiple cells

Table cell menu can be triggered when users select multiple cell, in which case the menu button will be placed in the cell where the mouse in.

![table cell menu](https://user-images.githubusercontent.com/24715727/113511776-344b9880-9594-11eb-8539-e5d68eabc28a.gif)

You can customize the looking and the behaviour of the menu button and menu popup by passing related paramters to `TableComponents`.

## Installation

```bash
yarn add @remirror/extension-react-tables # yarn
pnpm add @remirror/extension-react-tables # pnpm
npm install @remirror/extension-react-tables # npm
```

```tsx
import { ReactComponentExtension } from '@remirror/extension-react-component';
import { TableComponents, TableExtension } from '@remirror/extension-react-tables';
import { EditorComponent, Remirror, ThemeProvider, useRemirror } from '@remirror/react';
import { AllStyledComponent } from '@remirror/styles/emotion';

const extensions = () => [new ReactComponentExtension(), new TableExtension()];

export const EditorWithTable = () => {
  const { manager, state } = useRemirror({ extensions });

  return (
    <AllStyledComponent>
      <ThemeProvider>
        <Remirror manager={manager} initialContent={state}>
          <EditorComponent />
          <TableComponents />
        </Remirror>
      </ThemeProvider>
    </AllStyledComponent>
  );
};
```

repository: remirror/remirror

branch_name: refs/heads/main

gha_language: TypeScript

gha_license_id: MIT

repo_name: remirror/remirror


text:
### [CVE-2012-4194](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4194)
![](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

Mozilla Firefox before 16.0.2, Firefox ESR 10.x before 10.0.10, Thunderbird before 16.0.2, Thunderbird ESR 10.x before 10.0.10, and SeaMonkey before 2.13.2 do not prevent use of the valueOf method to shadow the location object (aka window.location), which makes it easier for remote attackers to conduct cross-site scripting (XSS) attacks via vectors involving a plugin.

### POC

#### Reference
- https://bugzilla.mozilla.org/show_bug.cgi?id=800666

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
OFS - NodeJS - Express - Server

The Independent Node JS Express Server hosted on Heroku.

## Setup

### Install Prerequisites

[![Verify Steps with Client & Server Setup Video](https://raw.githubusercontent.com/Organic-Food-Store/ofs-client/master/dev/Capture.PNG)](https://www.useloom.com/share/0130bb002fcf408a908689f09be91490 "Verify Steps with Client & Server Setup Video")
##### Verify below step results with Client & Server Setup Video above - We recommend playing the video at 1.25x speed.

1. Install [Git](https://git-scm.com/downloads).

2. Install [Node.js](https://nodejs.org/en/download/current), preferably (7.x).

3. Update npm.
```sh
    $ npm install npm@latest -g
```

## Running Locally

3. Clone the server, install the

```sh
    $ git clone https://github.com/Organic-Food-Store/ofs-nodejs-express-server
    $ cd ofs-nodejs-express-server
    $ npm install
    $ npm start
```

Your server should now be running on [localhost:5000](http://localhost:5000/).

Or use the same hosted server at [https://organic-food-store.herokuapp.com/api](https://organic-food-store.herokuapp.com/api).

***Note: Whether local or hosted, the [app](https://github.com/Organic-Food-Store/ofs-client) will only use the [organic-food-store.herokuapp.com/api](https://organic-food-store.herokuapp.com/api) for all serverside calls.***

## API Paths Documentation

***All documentation will assume either path:***
- [http://localhost:5000/api](http://localhost:5000/api)
- [https://organic-food-store.herokuapp.com/api](https://organic-food-store.herokuapp.com/api)

### Zips to Co-ordinates - `latitude` & `longitude` Return

### `/api/zipToCords/:zipcode`

Simply replace `:zipcode` with any zipcode to get the latitude and longitude of the zipcode, if valid.

Ex: [/api/zipToCords/95111](http://localhost:5000/api/zipToCords/95111)

Invalid zipcode inputs return `null`.

### User Existing Check - `true` or `false` Return

### `/api/userExists/:useruid`

Simply replace `:useruid` with any User ID, obtainable at the [App Dashboard](https://organic-food-store.firebaseapp.com/dashboard) to see if the user exists.

Ex: [/api/userExists/oYn79tnDmzOQbQAmNPpNEEbG1CC2](http://localhost:5000/api/userExists/oYn79tnDmzOQbQAmNPpNEEbG1CC2)

Nonexisting User ID inputs return `false`.

### Determine Closest Store to Zipcode - `95125` or `94401` Return

### `/api/closestStore/:zipcode`

Simply replace `:zipcode` with any zipcode to get the store ID of the closest store to the input zipcode.

Ex: [/api/closestStore/95111](http://localhost:5000/api/closestStore/95111)

Invalid zipcode inputs returns the store ID of the San Jose Willow Glen Branch.

### Execute Checkout of User - `trackingId` Return

### `/api/checkout/:useruid`

Simply replace `:useruid` with any User ID, obtainable at the [App Dashboard](https://organic-food-store.firebaseapp.com/dashboard) to  perform the checkout method if the user with ID `:userid` has items in the cart.

The tracking ID number of the order is then returned, which can be put into the [App Tracking](https://organic-food-store.firebaseapp.com/tracking) input to then track the movement of the order.

You can track an id, i.e. `732331788976195636611` using a hashtag after the tracking URL: [https://organic-food-store.firebaseapp.com/tracking#732331788976195636611](https://organic-food-store.firebaseapp.com/tracking#732331788976195636611)

Ex: [/api/checkout/oYn79tnDmzOQbQAmNPpNEEbG1CC2](http://localhost:5000/api/checkout/oYn79tnDmzOQbQAmNPpNEEbG1CC2)

Invalid user ID inputs or users with empty carts returns `null`.


text:
## Description
<!-- Put the description change and the rationale for it here -->

## Pull request checklist
<!-- PLEASE CHECK ALL THE BOXES BEFORE SUBMITTING YOUR PULL REQUEST -->

- [ ] `package.version` fields in `Cargo.toml` files are unchanged.
- [ ] `CHANGELOG.md` is updated.
- [ ] `cargo-fmt` done.
- [ ] `cargo-clippy` done.
- [ ] `cargp-test` done.
- [ ] The new changes are sufficiently tested.

repository: eugene-babichenko/rust-fsm

gha_language: Rust

repo_name: eugene-babichenko/rust-fsm


text:
# Overview

This is my personal website and blog. It uses the jekyll framework to
generate static content.

## Environment

The is a list of ruby and python dependencies assumed to be installed
and configured for your environment.

### Ruby Dependencies
- ruby ~1.9.3
- rbenv ~0.4

### Python Dependencies
- python ~2.7
- pip ~1.1
- virtualenv ~1.7

## Development

Get started with:

    make

Install dependencies with:

    make install

Build the site with:

    make build

Run the development site with:

    make run

# License
The following directories and their contents are Copyright Collin Watson. You may not reuse anything therein without my permission:

- \_posts/
- images/

All other directories and files are MIT Licensed.

Feel free to use the HTML and CSS as you please. A link back to [collinwat.com](http://collinwat.com) would be appreciated, but is not required.


text:
# Results
**BSON takes about 1ms more** to process the same amount of data. The same advantage is in payload size where **BSON is about 15% smaller than JSON**.

##Big JSON - 921 KB
Starting Test: Big JSON

Time to 1000 iterations: 00:00:13.7154600

Time to 1 iteration: **13ms**

##Small JSON - 9.96 KB
Starting Test: Small JSON

Time to 1000 iterations: **00:00:00.1385779**

Time to 1 iteration: 0ms

##Big BSON - **769 KB**
Starting Test: Big BSON

Time to 1000 iterations: 00:00:14.5932759

Time to 1 iteration: 14ms

##Small BSON - **8.41 KB**
Starting Test: Small BSON

Time to 1000 iterations: 00:00:00.1460935

Time to 1 iteration: 0ms

repository: cdemi/bson-json-benchmark

repo_name: cdemi/bson-json-benchmark


text:
Table of Contents
=================
  * [Pipeline: GitHub](#pipeline-github)
  * [License](#license)
  * [Prerequisites](#prerequisites)
  * [Credentials](#credentials)
  * [Triggers](#triggers)
    * [issueCommentTrigger](#issuecommenttrigger)
  * [Global Variables](#global-variables)
    * [pullRequest](#pullrequest)
  * [Auxiliary Classes](#auxiliary-classes)
    * [CommitStatus](#commitstatus)
    * [Commit](#commit)
    * [CommitFile](#commitfile)
    * [IssueComment](#issuecommet)
    * [ReviewComment](#reviewcomment)
  * [Examples](#examples)

# Pipeline: GitHub
The entry points for this plugin’s functionality are additional global variables, available to pipeline scripts when the plugin is enabled and the prerequisites are met.

# License
MIT

# Prerequisites

- Jenkins running Java 8 or higher.

- Projects/jobs must be automatically created by the GitHub Organization folder/project type.

See: [GitHub Branch Source Plugin](https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#github-branch-source)

# Credentials

Currently all operations against GitHub will be performed using the builds `Checkout Credentials`, if no `Checkout Credentials` are configured then the `Scan Credentials` will be used instead.

However you can override this in a pipeline script by calling `setCredentials(String userName, String password)` before any properties or methods are accessed/invoked on the `pullRequest` global variable.

```groovy
pullRequest.setCredentials('John.Smith', 'qwerty4321')
```

If you plan to use this plugin to add/modify/remove comments, labels, commit statuses etc. Please ensure that the required permissions are assigned to the token supplied in the credentials (`Checkout`/`Scan`/`Manually`).

# Triggers

This plugin adds the following pipeline triggers

## issueCommentTrigger

### Requirements

- This trigger only works on Pull Requests, created by the GitHub Branch Source Plugin.
- Currently this trigger will only allow collaborators of the repository in question to trigger builds.

### Limitations

The Pull Request's job/build must have run at least once for the trigger to be registered. If an initial run never takes place then the trigger won't be registered and cannot pickup on any comments made.

This should not be an issue in practice, because a requirement of using this plugin is that your jobs are setup automatically by the GitHub Branch Source Plugin, which will trigger an initial build when it is notified of a new Pull Request.

### Considerations

This trigger would be of limited usefulness for people wishing to build public GitHub/Jenkins bots, using pipeline scripts. As there is no way to ensure that a Pull Request's `Jenkinsfile` contains any triggers. Not to mention you would not want to trust just any `Jenkinsfile` from a random Pull Request/non-collaborator.

This trigger is intended to be used inside enterprise organizations:
1. Where all branches and forks just contain a token `Jenkinsfile` that delegates to the real pipeline script, using [shared libraries](https://jenkins.io/doc/book/pipeline/shared-libraries/).
2. Trust all their Pull Request authors.

### Parameters

- `commentPattern` (__Required__) - A Java style regular expression

### Usage
```groovy
properties([
  pipelineTriggers([
    issueCommentTrigger('.*test this please.*')
  ])
])
```

# Global Variables

## `repository`
Coming soon!

## `pullRequest`

### Properties

Name | Type | Writable | Description
-----|------|----------|------------
id | `Integer` | false |
state | `String` | **true** | Valid values `open` or `closed`
number | `Integer` | false
url | `String` | false
patch_url | `String` | false
diff_url | `String` | false
issue_url | `String` | false
title | `String` | **true**
body | `String` | **true**
locked | `Boolean` | **true** | Accepts `true`, `false` or `'true'`, `'false'`
milestone | `Integer` | **true**
head | `String` | false
base | `String` | **true** | Name of the base branch in the current repository this pull request targets
files | `Iterable<CommitFile>` | false
assignees | `List<String>` | **true** | Accepts a `List<String>`
commits | `Iterable<Commit>` | false
comments | `Iterable<IssueComment>` | false
review_comments | `Iterable<ReviewComment>` | false
labels | `Iterable<String>` | **true** | Accepts a `List<String>`
statuses | `List<CommitStatus>` | false
requested_reviewers | `Iterable<String>` | false
updated_at | `Date` | false
created_at | `Date` | false
created_by | `String` | false
closed_at | `Date` | false
closed_by | `String` | false
merged_at | `Date` | false
merged_by | `String` | false
commit_count | `Integer` | false
comment_count | `Integer` | false
additions | `Integer` | false
deletions | `Integer` | false
changed_files | `Integer` | false
merged | `Boolean` | false
mergeable | `Boolean` | false
merge_commit_sha | `String` | false
maintainer_can_modify | `Boolean` | **true** | Accepts `true`, `false` or `'true'`, `'false'`

### Methods

#### Merge

> String merge(__[String commitTitle, String commitMessage, String sha, String mergeMethod]__)

Returns the merge's SHA/commit id.

#### Commit Status

> CommitStatus createStatus(String status __[, String context, String description, String targetUrl]__)

#### Labels
> void addLabels(String...labels)

> void removeLabel(String label)

#### Assignees
> void addAssignees(String...assignees)

> void removeAssignees(String...assignees)

#### Review Comments
> ReviewComment reviewComment(String commitId, String path, int position, String body)

> ReviewComment editReviewComment(long commentId, String body)

> ReviewComment replyToReviewComment(long commentId, String body)

> void deleteReviewComment(long commentId)

#### Pull Request Comments (Issue Comments)
> IssueComment comment(String body)

> IssueComment editComment(long commentId, String body)

> void deleteComment(long commentId)

### Requested Reviewers
> void createReviewRequests(String...reviewers)

> void deleteReviewRequests(String...reviewers)

#### Misc
> void setCredentials(String userName, String password)

# Auxiliary Classes

## CommitStatus
### Properties
Name | Type | Writable | Description
-----|------|----------|------------
id | `String` | false |
url | `String` | false
status | `String` | false | One of `pending`, `success`, `failure` or `error`
context | `String` | false
description | `String` | false
target_url | `String` | false
created_at | `Date` | false
updated_at | `Date` | false
creator | `String` | false

### Methods
None.

## Commit
### Properties
Name | Type | Writable | Description
-----|------|----------|------------
sha | `String` | false
url | `String` | false
author | `String` | false
committer | `String` | false
parents | `List<String>` | false | List of parent commit SHA's
message | `String` | false |
comment_count | `Integer` | false
comments | `Iterable<ReviewComment>` | false
additions | `Integer` | false
deletions | `Integer` | false
total_changes | `Integer` | false
files | `List<CommitFile>` | false | List of files added, removed and or modified in this commit
statuses | `List<CommitStatus>` | false | List of statuses associated with this commit

### Methods
#### Commit Status
> CommitStatus createStatus(String status __[, String context, String description, String targetUrl]__)

#### Review Comment
> ReviewComment comment(String body __[, String path, Integer position]__)

## CommitFile
### Properties
Name | Type | Writable | Description
-----|------|----------|------------
sha | `String` | false
filename | `String` | false
status | `String` | false | One of
patch | `String` | false
additions | `Integer` | false
deletions | `Integer` | false
changes | `Integer` | false
raw_url | `String` | false
blob_url | `String` | false

### Methods
None.

## IssueComment
### Properties
Name | Type | Writable | Description
-----|------|----------|------------
id | `Integer` | false
url | `String` | false
user | `String` | false
body | `String` | **true**
created_at | `Date` | false
updated_at | `Date` | false

### Methods
> void delete()

## ReviewComment
### Properties
Name | Type | Writable | Description
-----|------|----------|------------
id | `Integer` | false
url | `String` | false
user | `String` | false
created_at | `Date` | false
updated_at | `Date` | false
commit_id | `String` | false
original_commit_id | `Integer` | false
body | `String` | **true**
path | `String` | false
line | `Integer` | false
position | `Integer` | false
original_position | `Integer` | false
diff_hunk | `String` | false

### Methods
> void delete()

# Examples

## Pull Requests

### Updating a Pull Request's title and body
```groovy
pullRequest['title'] = 'Updated title'
pullRequest['body'] = pullRequest['body'] + '\nEdited by Pipeline'
```

### Closing a Pull Request
```groovy
pullRequest['status'] = 'closed'
```

### Creating a Commit Status against the head of the Pull Request
```groovy
pullRequest.createStatus(status: 'success',
                         context: 'continuous-integration/jenkins/pr-merge/tests',
                         description: 'All tests are passing',
                         targetUrl: "${JOB_URL}/testResults")
```

### Locking and unlocking a Pull Request's conversation
```groovy
if (pullRequest['locked']) {
    pullRequest['locked'] = false
}
```

### Merging a Pull Request
```groovy
if (pullRequest['mergeable']) {
    pullRequest.merge('merge commit message here')
}
// or
if (pullRequest['mergeable']) {
    pullRequest.merge(commitTile: 'Make it so..', commitMessage: 'TO BOLDLY GO WHERE NO MAN HAS GONE BEFORE...', mergeMethod: 'squash')
}
```

### Adding a label
```groovy
pullRequest.addLabels(["Build Failed"] as String [])
```

### Removing a label
```groovy
pullRequest.removeLabel('Build Passing')
```

### Replacing all labels
```groovy
pullRequest['labels'] = ['Bug', 'Feature']
```

### Adding an assignee
```groovy
pullRequest.addAssginee('Spock')
```

### Removing an assignee
```groovy
pullRequest.removeAssginee('McCoy')
```

### Replacing all assignees
```groovy
pullRequest['assignees'] = ['Data', 'Scotty']
```

### Listing all added/modified/removed files
```groovy
for (commitFile in pullRequest['files']) {
    echo "SHA: ${commitFile['sha']} File Name: ${commitFile['filename']} Status: ${commitFile['status']}"
}
```

### Adding a comment
```groovy
def comment = pullRequest.comment('This PR is highly illogical..')
```

### Editing a comment
```groovy
pullRequest.editComment(comment['id'], 'Live long and prosper.')
// or
comment['body'] = 'Live long and prosper.'
```

### Deleting a comment
```groovy
pullRequest.deleteComment(commentId)
// or
comment.delete()
```

### Adding a review comment
```groovy
def commitId = 'SHA of the commit containing the change/file you wish to review';
def path = 'src/main/java/Main.java'
def lineNumber = 5
def body = 'The review comment'
def comment = pullRequest.reviewComment(commitId, path, lineNumber, body)
```

### Editing a review comment
```groovy
pullRequest.editReviewComment(comment['id'], 'Live long and prosper.')
// or
comment['body'] = 'Live long and prosper.'
```

### Deleting a review comment
```groovy
pullRequest.deleteReviewComment(comment['id'])
// or
comment.delete()
```

### Replying to a review comment
```groovy
pullRequest.replyToReviewComment(comment['id'], 'Khaaannnn!')
// or
comment.createReply('Khaaannnn!')
```

### Listing a Pull Request's commits
```groovy
for (commit in pullRequest['commits']) {
   echo "SHA: ${commit['sha']}, Committer: ${commit['commiter']}, Commit Message: ${commit['message']}"
}
```

### Listing a Pull Request's comments
```groovy
for (comment in pullRequest['comments']) {
  echo "Author: ${comment['user']}, Comment: ${comment['body']}"
}
```

### Listing a Pull Request's review comments
```groovy
for (reviewComment in pullRequest['review_comments']) {
  echo "File: ${reviewComment['path']}, Line: ${reviewComment['line']}, Author: ${reviewComment['user']}, Comment: ${reviewComment['body']}"
}
```

### Listing a commit's statuses
```groovy
for (commit in pullRequest['commits']) {
  for (status  in commit['statuses']) {
     echo "Commit: ${commit['sha']}, Status: ${status['status']}, Context: ${status['context']}, URL: ${status['target_url']}"
  }
}
```

### Creating a Commit Status against arbitrary commits
```groovy
for (commit in pullRequest['commits']) {
  commit.createStatus(status: 'pending')
}
```

### Listing a Pull Request's current statuses
```groovy
for (status in pullRequest['statuses']) {
  echo "Commit: ${pullRequest['head']}, Status: ${status['status']}, Context: ${status['context']}, URL: ${status['target_url']}"
}
```

### Listing a Pull Request's requested reviewers
```groovy
for (requestedReviewer in pullRequest['requested_reviewers']) {
  echo "${requestedReviewer} was requested to review this Pull Request"
}
```

### Requesting reviewers
```groovy
pullRequest.createReviewRequests('Spock', 'McCoy')
```

### Deleting requested reviewers
```groovy
pullRequest.deleteReviewRequests('McCoy')
```

repository: Ramon-Balaguer/pipeline-github-plugin

repo_name: Ramon-Balaguer/pipeline-github-plugin


text:
+++
author = "Peter Souter"
categories = ["vDM30in30", "Puppet", "Tech"]
date = 2016-11-25T20:29:00Z
description = ""
draft = false
coverImage = "/images/2016/11/61864434_df8782cdb2_o.jpg"
slug = "the-puppet-resource-abstraction-layer-ral-explained-part-4"
tags = ["vDM30in30", "Puppet", "Tech"]
title = "The Puppet Resource Abstraction Layer (RAL) Explained: Part 4"

+++

#### Day 25 in the #vDM30in30

> Image from https://flic.kr/p/6t59b

So, we've talked about the RAL, getters, setters and the `resource` command.

Now let's talk about implementing a RAL interface of our own.

## swap_file type and provider

I ended up implementing a RAL layer in my [swap_file](https://github.com/petems/petems-swap_file) module, mainly as an exercise in figuring out how types and providers work.

It looks like this:

```ruby
Puppet::Type.type(:swap_file).provide(:linux) do

  desc "Swap file management via `swapon`, `swapoff` and `mkswap`"

  confine  :kernel   => :linux
  commands :swapon   => 'swapon'
  commands :swapoff  => 'swapoff'
  commands :mkswap   => 'mkswap'

  mk_resource_methods

  def initialize(value={})
    super(value)
    @property_flush = {}
  end

  def self.get_swap_files
    swapfiles = swapon(['-s']).split("\n")
    swapfiles.shift
    swapfiles.sort
  end

  def self.prefetch(resources)
    instances.each do |prov|
      if resource = resources[prov.name]
        resource.provider = prov
      end
    end
  end

  def self.instances
    get_swap_files.collect do |swapfile_line|
      new(get_swapfile_properties(swapfile_line))
    end
  end

  def self.get_swapfile_properties(swapfile_line)
    swapfile_properties = {}

    # swapon -s output formats thus:
    # Filename        Type    Size  Used  Priority

    # Split on spaces
    output_array = swapfile_line.strip.split(/\s+/)

    # Assign properties based on headers
    swapfile_properties = {
      :ensure => :present,
      :name => output_array[0],
      :file => output_array[0],
      :type => output_array[1],
      :size => output_array[2],
      :used => output_array[3],
      :priority => output_array[4]
    }

    swapfile_properties[:provider] = :swap_file
    Puppet.debug "Swapfile: #{swapfile_properties.inspect}"
    swapfile_properties
  end

  def exists?
    @property_hash[:ensure] == :present
  end

  def create
    @property_flush[:ensure] = :present
  end

  def destroy
    @property_flush[:ensure] = :absent
  end

  def create_swap_file(file_path)
    mk_swap(file_path)
    swap_on(file_path)
  end

  def mk_swap(file_path)
    Puppet.debug "Running `mkswap #{file_path}`"
    output = mkswap([file_path])
    Puppet.debug "Returned value: #{output}`"
  end

  def swap_on(file_path)
    Puppet.debug "Running `swapon #{file_path}`"
    output = swapon([file_path])
    Puppet.debug "Returned value: #{output}"
  end

  def swap_off(file_path)
    Puppet.debug "Running `swapoff #{file_path}`"
    output = swapoff([file_path])
    Puppet.debug "Returned value: #{output}"
  end

  def set_swapfile
    if @property_flush[:ensure] == :absent
      swap_off(resource[:name])
      return
    end

    create_swap_file(resource[:name]) unless exists?
  end

  def flush
    set_swapfile
    # Collect the resources again once they've been changed (that way `puppet
    # resource` will show the correct values after changes have been made).
    @property_hash = self.class.get_swapfile_properties(resource[:name])
  end

end

```

Now, there's a bunch of weird stuff in there, that to be honest even know I only vaguely understand...

I'd recommend reading [Gary's blog on the subject](http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/). He explains a lot of the idea behind things like the `initialize` and `prefetch` stuff.

Basically, don't worry about it for now, lets stick to the bit we've talked about, the "setter": `self.instances`

## `self.instances`

So, just like the `rpm` provider, we need to implement a `self.instances` method.

So here we are:

```ruby
def self.instances
  get_swap_files.collect do |swapfile_line|
    new(get_swapfile_properties(swapfile_line))
  end
end
```

To make the code easier to read, I'm breaking down the process into easier to manage methods:

* Get current swap files as an output on the command line
* Take those lines and turn them into a hash

## `get_swap_files`

Getting those current swapfiles on a Linux machine is fairly simple: `swapon -s`.

```ruby
def self.get_swap_files
  swapfiles = swapon(['-s']).split("\n")
  swapfiles.shift
  swapfiles.sort
end
```

We `.shift` the first result, which removes the element of the lines, which is the column lines.

```
swapon -s
Filename				Type		Size	Used	Priority
/swapfile                               file		262140	0	-1
```

So we're left with just
```
/swapfile                               file		262140	0	-1
```

## `get_swapfile_properties`

We then take those lines and break up the chunks and turn them into a valid swapfile resource (as we've defined the valid parameters in our type)

```ruby
def self.get_swapfile_properties(swapfile_line)
    swapfile_properties = {}

    # swapon -s output formats thus:
    # Filename        Type    Size  Used  Priority

    # Split on spaces
    output_array = swapfile_line.strip.split(/\s+/)

    # Assign properties based on headers
    swapfile_properties = {
      :ensure => :present,
      :name => output_array[0],
      :file => output_array[0],
      :type => output_array[1],
      :size => output_array[2],
      :used => output_array[3],
      :priority => output_array[4]
    }

    swapfile_properties[:provider] = :swap_file
    Puppet.debug "Swapfile: #{swapfile_properties.inspect}"
    swapfile_properties
  end
```

So, let's test that out.

Here's the `swapon -s` command:

```
Filename				Type		Size	Used	Priority
/mnt/swap.1             file	     500732	   0	-1
```

And here's our RAL command:

```
[root@homebox ~]# puppet resource swap_file
swap_file { '/mnt/swap.1':
  ensure   => 'present',
  priority => '-1',
  size     => '500732',
  type     => 'file',
  used     => '0',
}
```

And we can even test that with an rspec test:

```ruby
require 'spec_helper'

describe Puppet::Type.type(:swap_file).provider(:linux) do

  let(:resource) { Puppet::Type.type(:swap_file).new(
    {
    :name     => '/tmp/swap',
    :size     => '1024',
    :provider => described_class.name
    }
  )}

  let(:provider) { resource.provider }

  let(:instance) { provider.class.instances.first }

  swapon_s_output = <<-EOS
Filename                        Type            Size    Used    Priority
/dev/sda2                       partition       4192956 0       -1
/dev/sda1                       partition       4454542 0       -2
  EOS

  swapon_line = <<-EOS
/dev/sda2                       partition       4192956 0       -1
  EOS

  mkswap_return = <<-EOS
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=0e5e7c60-bbba-4089-a76c-2bb29c0f0839
  EOS

  swapon_line_to_hash = {
    :ensure => :present,
    :file => "/dev/sda2",
    :name => "/dev/sda2",
    :priority => "-1",
    :provider => :swap_file,
    :size => "4192956",
    :type => "partition",
    :used => "0",
  }

  before :each do
    Facter.stubs(:value).with(:kernel).returns('Linux')
    provider.class.stubs(:swapon).with(['-s']).returns(swapon_s_output)
  end

  describe 'self.instances' do
    it 'returns an array of swapfiles' do
      swapfiles      = provider.class.instances.collect {|x| x.name }
      swapfile_sizes = provider.class.instances.collect {|x| x.size }

      expect(swapfiles).to      include('/dev/sda1','/dev/sda2')
      expect(swapfile_sizes).to include('4192956','4454542')
    end
  end
```

So I'm mocking out the results of the various commands, and then I'm making sure that if I feed my provider that input, I get a collection of instances (`provider.class.instances`), which I then do some basic tests to see if it matches my mock.

## Further reading

Ok, so that's 4 blog posts about the RAL, hopefully you've got a better understanding of how all this stuff works.

It's quite a deep concept in the Puppet world, and hopefully it gives you a bit of insight into how Puppet works under the hood.

### The Docs
* https://docs.puppet.com/puppet/latest/reference/man/resource.html
* https://docs.puppet.com/puppet/latest/reference/lang_resources.html

### Developing types and providers

* [The Type and Providers Book](http://shop.oreilly.com/product/0636920026860.do)
* http://garylarizza.com/blog/2013/11/25/fun-with-providers/
* http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/

### Further reading on the RAL
* http://somethingsinistral.net/blog/puppet-ral-an-introduction/
* https://docs.oracle.com/cd/E53394_01/html/E77676/gqqnd.html

## The other posts in this series
* https://petersouter.co.uk/the-puppet-resource-abstraction-layer-ral-explained-part-1/
* https://petersouter.co.uk/the-puppet-resource-abstraction-layer-ral-explained-part-2/
* https://petersouter.co.uk/the-puppet-resource-abstraction-layer-ral-explained-part-3/

gha_language: SCSS


text:
---
layout: page
title: About
---

Hey there! I'm Luke, a Los Angeles based Full Stack developer specializing with the .NET stack. I maintain an active [GitHub](https://github.com/lbearl) which has a number of code samples (including everything on this site).

If you want to know more about my professional experience, either go to my [LinkedIn](https://www.linkedin.com/in/lbearl) or [download my resume](https://dl.dropboxusercontent.com/u/1264289/lukebearl-resume.docx).


text:
| 作者 | 頁數 | 出版時間 |
| --- | --- | --- |
| Elmasri Navathe | 1080 | *2011* |

---------

- This book stresses the fundamentals of
    - *databas modeling and design*
    - *the langs and models provided by the DBMS*
    - *database system implementation techniques*

----------

### Guidelines for using this book

- It can be divided into two-semester course sequence

    |  |  |
    | --- | --- |
    | Chapter 01 \~ 15 | Dtabase Design and Database Systems |
    | Chapter 16 \~ 29 | Database Models and Implementation Techniques |

### Contents of the Sixth Edition

- Part 01 --- cp 01, 02
    - basic concepts for a good understanding of db modules, systems, and languages.
    - introduce databases, typical users, DBMS concepts, terms, architecture.

- Part 02 --- cp 03, 04, 05
    - describes the relational data model, SQL standard, the formal relational languages.
    - data definition, data modification, and simple SQL queries.
    - more complex SQL concepts of *triggers*, *assertions*, *views*, and schema modification.
    - the operations of the relational algebra and the relational calculus.
- Part 03 --- cp 07, 08, 09, 10
    - the concepts of Entity-Relationship (ER) model and ER diagrams
        - and used to illustrate conceptual database design
    - data abstraction and semantic data modeling concepts
        - and shows how the ER model can be extended to incorporate these ideas
        - leading to the enhanced-ER (EER) data model and EER diagrams
    - concepts like: subclasses, specialization, generalization, and union types(categories).
    - the class diagrams of UML
    - relational db design using ER- and EER-to-relational mapping
    - an overview of the different phases of db design process in enterprises

- Part 04 --- cp 11, 12
    - the object-oriented, object-relational, and XML data models and their langs and standards
    - the concepts for object databases,
        - shows how they’ve been incorporated into the SQL standard
in order to add object capabilities to relational db systems
    - and then covers the ODMG object model standard, and its object definition and query langs
    - XML model and langs.
        - Discussing how XML is related to db systems
        - and compares the XML model to traditional db models
    - also show how data can be converted between the XML and relational representations

- Part 05 --- cp 13, 14
    - covers SQL programming topics
        - e.g. mbedded SQL, dynamic SQL, ODBC, SQLJ, JDBC, and SQL/CLI.
    - then introduces Web database programming (example by PHP lang)

- Part 06 --- cp 15, 16
    - the formalisms, theories, algorithms developed for relational db design by normalization
    - functional and other types of dependencies and normal forms of relations
    - and there’s step-by-step normalization also defines multivalued and join dependencies
    - relational design algorithms based on normalization,
        - along with the theoretical materials that the algorithms are based on

- Part 07 --- cp 17, 18
    - the physical file structures and access methods used in db systems
        - describes primary methods of organizing files of records on disk
        - including static/dynamic hashing
    - indexing techniques for files, including B-tree and B+-tree data structures and grid files

- Part 08 --- cp 19, 20
    - the basics of query processing and optimization
    - physical database design and tuning

- Part 09 --- cp 21, 22, 23
    - the techniques needed for transaction processing systems
        - and defines the concepts of recoverability and serializability of schedules
        - an overview of the various types of concurrency control protocols, with a focus on-phase locking
    - also discusses timestamp ordering and optimistic concurrency control techniques
        - as well as the multiple-granularity locking
    - database recovery protocols,
        - and gives an overview of the concepts and techniques that are used in recovery

- Part 10 --- cp 24, 25, 26, 27, 28, 29
    - database security
        - including the access control with SQL commands to GRANT and REVOKE privileges
        - the mandatory access control model with user categories and polyinstantiation
        - a discussion of data privacy and its relationship to security
        - and an overview of SQL injection attacks
    - introduction to distributed databases and discuss the three-tier client/server architecture
    - several enhanced database models for advanced applications
        - include active databases and triggers,
        - as well as temporal, spatial, multimedia, and deductive databases
    - information retrieval techniques,
        - and how they’re related to db systems and to Web search methods
    - overview of the process of data mining and knowledge discovery
        - discusses algorithms for association rule mining, classification, and clustering
        - and briefly covers other approaches and commercial tools
    - data warehousing and OLAP concepts

- Appendix A
    - a number of alternative diagrammatic notations for displaying a conceptual ER or ERR schema

- Appendix B
    - some important physical parameters of disks

- Appendix C
    - an overview of the QBE graphical query language

- Appendix D, E
    - cover legacy database systems, based on the hierarchical and network database models
    > They’ve been used for more than thirty years as a basis
for many commercial db applications and transaction processing systems

    We consider it important to
    >> expose db management students to these legacy approaches,

    >> so they can gain a better insight of how db tech has progressed.

license: Unlicense

path: /Fundamentals of Database Systems/README.md


text:
# Surgeon

## Table of Contents

- [Introduction](#introduction)
- [Subtools](#subtools)
- [Usage](#usage)
- [Examples](#examples)

## Introduction

The `surgeon` tool uses [ONNX-GraphSurgeon](https://github.com/NVIDIA/TensorRT/tree/main/tools/onnx-graphsurgeon)
to modify an ONNX model.

## Subtools

`surgeon` provides subtools to perform different functions:

- `extract` can extract subgraphs from models. It can also be used for changing the shapes/datatypes of the
    model inputs/outputs by specifying the existing inputs/outputs, but with different shapes/datatypes. This
    can be useful to make an input dimension dynamic, for example.

- `sanitize` can simplify and sanitize an ONNX model by removing unused nodes and folding constants.

- [EXPERIMENTAL] `insert` can insert a node into a model, optionally replacing existing subgraphs.

## Usage

See `polygraphy surgeon -h` for usage information.

## Examples

For examples, see [this directory](../../../examples/cli/surgeon)

repository: NVIDIA/TensorRT

repo_name: NVIDIA/TensorRT


text:
# Deep Hexagon

This is a deep learning repository containing state-of-the-art algorithms that run out of the box on Keras.

It is compatible with OpenAI Gym, as well as a custom environment 'Open Hexagon' played with screen pixel information, which is included with the repo.

It can also be generalized to any program, given a proper emulator. (WIP)

- [Videos] (https://www.youtube.com/channel/UCvC0mlbgqEURZF7IkQKfbYg)
- License: MIT

## Requirements

- Runs on Windows and Linux (Linux Open Hexagon Environment WIP).
- Python 3.5
- [Tensorflow v1.0.1 (GPU)](https://github.com/tensorflow/tensorflow)
- [Keras v2.0.2](https://github.com/fchollet/keras)

### Optional Requirements

- OpenAI Gym

### Optional Visualization Requirements (For running visualization.py)

- cv2
- vis
- imageio

## Algorithms

- DDQN | dex_ddqn.py
- ACER | dex_a3c.py

## Setup Open Hexagon Environment

- Extract OpenHexagonV1.92.7z and launch the game to the level you wish to learn.
- Run the script of the desired algorithm and it will detect and begin playing the game.

## Run

- Run dex_ddqn.py for DDQN
- Run dex_a3c.py for ACER

Currently, you will need to edit the code in these files to run the specific parameters you want. (WIP)

Note: ACER here is not identical to the paper, and is my own implementation.

Visualization is based on saliency.


text:
---
layout: post
title: "Funds available for young climate change activists"
permalink: /archives/2021/03/lbrut-funds-available-for-young-climate-change-activists.html
commentfile: 2021-03-29-lbrut-funds-available-for-young-climate-change-activists
category: around_town
date: 2021-03-29 10:00:00
image: "/assets/images/2021/lbrut-climate-change-fund.jpg"
excerpt: |
    The Richmond and Kingston Youth Council's Richmond Climate Change Youth Fund is available to those aged 11-19 who want to develop new and exciting project ideas to help tackle climate change!
---

The Richmond and Kingston Youth Council's Richmond Climate Change Youth Fund is available to those aged 11-19 who want to develop new and exciting project ideas to help tackle climate change!

Projects should aim to improve young people's awareness and knowledge on climate change. They should focus on one or more of the below areas:

- Energy efficiency and water saving
- Air quality (travel)
- Waste and recycling
- Re-using / repurposing / fast fashion

Applicants can be awarded up to £1,500 and can apply between 1 April and 31 May 2021. Applicants must live or go to school in Richmond upon Thames and have an adult sponsor who will be supporting the climate change project - for example a teacher, parent or youth worker.

[For more information and to apply](https://kr.afcinfo.org.uk/pages/young-people/information-and-advice/kingston-and-richmond-youth-council/richmond-climate-change-youth-fund)

The Fund is managed by the Kingston and Richmond Youth Council and supported by Richmond Council and Achieving for Children.

Lydia Roebuck, Chair of the Kingston and Richmond Youth Council, said:

> "Young people are passionate about climate change and we at the Kingston and Richmond Youth Council want to empower them to develop their ideas to tackle this important issue.

> "Thanks to Richmond Council, our Climate Change Commissioning fund is about enabling young people in Richmond to develop their own projects to generate more awareness of climate change and really make a difference."

Colin Cooper, CEO of Habitats & Heritage, a local charity that is dedicated to looking after the natural and historic environment in the borough, said:

> "It's great to see the Youth Council encouraging young people to come up with innovative projects to tackle climate change. As we have seen with the impact Greta Thunberg has achieved, young people can have real influence.

> "One of Habitats & Heritage's key aims is to get young people learning about the issues confronting our planet and to become proactive problem solvers for the natural environment on their doorsteps. I wish all applicants the best of luck!"

-- from a Richmond Council press release - 29 March 2021

repository: pmahnke/stmgrts

repo_name: pmahnke/stmgrts


text:
# Real Estate Interested Party Workflow

## Premise

Potential home buyer is standing in front of a home for sale. They see the sign
and it says to text 78787 to 43333. The text is an information rich request that
includes your phone number, location, and what sort of home you might be
interested in purchasing. You are entered as a lead into a system and the
realtors want to make sure they sell you a home.

The challenge here: some of the intake has already been completed as a result
of the initial text message.

## Questions

Italicized questions have answers from the text message that may need
validation.

1. _What’s your phone number?_
2. _In what city are you looking to purchase a house?_
3. _Approximately what type of home are you looking to purchase?_
4. Are you already working with a realtor?
5. What is your name?
6. How soon are you looking to purchase?
7. Have you been pre-approved for a home loan?
8. Has anyone already been in touch?
9. Has anyone spoken to you in the last week?

## Workflow

1. Lead comes in via text message
2. Agent reaches out to person who called via phone and asks questions
3. Agent entered information into system
4. That agent or a more appropriate agent for this buyer begins to work with buyer
5. …
6. Profit!

## Actions

- Create a new case
- Track communications with the buyer
- What have they said they are looking for?
- How serious are they?
- Check the status of a case
- Has anyone already been in touch?
- Has anyone spoken to them in the last week?
- Have they been an active buyer?
- Update a case
- Cannot qualify for a loan
- House they wanted was sold
- Is the buyer still on the market or have they purchased?

repository: juliancheal/kasey

repo_name: juliancheal/kasey


text:
# 2.2.0

* Add option to pass className to ExtraButton component

# 2.1.0

* Add option to pass custom style to ExtraButton component

# 2.0.1

* Fix problem when the last tab was removed. ([#130](https://github.com/ctxhou/react-tabtab/issues/130), [#114](https://github.com/ctxhou/react-tabtab/issues/114))

# 1.5.0

* Support `AsyncPanel`: can lazy loading panel content

# 1.0.0

### Breaking change

Version 1 redesign the api and add more features.

* **Mobile supported** — Touch support. Easy to use on mobile device
* **Draggable tab** — Support drag and drop tab
* **Add & Delete** — Tab can be added and deleted
* **Customizable style** — Based on `styled-components`, super easy to customize tab style
* **API based** — All actions are controllable

# 0.6.2

* update readme
* move react-dnd to top component

# 0.5.0

* add drag and drop
* use es6


text:
[[src]](https://github.com/ghc/ghc/tree/master/compiler/rename/RnPat.hs)

(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

# Renaming of patterns

Basically dependency analysis.

Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes.  In
general, all of these functions return a renamed thing, and a set of
free variables.

# The CpsRn Monad

### Note: CpsRn monad

The CpsRn monad uses continuation-passing style to support this
style of programming:

        do { ...
           ; ns <- bindNames rs
           ; ...blah... }

   where rs::[RdrName], ns::[Name]

The idea is that '...blah...'
  a) sees the bindings of ns
  b) returns the free variables it mentions
     so that bindNames can report unused ones

In particular,
    mapM rnPatAndThen [p1, p2, p3]
has a *left-to-right* scoping: it makes the binders in
p1 scope over p2,p3.

### Note: Patterns are uses

Consider
  module Foo( f, g ) where
  data T = T1 | T2

  f T1 = True
  f T2 = False

  g _ = T1

Arguably we should report T2 as unused, even though it appears in a
pattern, because it never occurs in a constructed position.  See
Trac #7336.
However, implementing this in the face of pattern synonyms would be
less straightforward, since given two pattern synonyms

  pattern P1 <- P2
  pattern P2 <- ()

we need to observe the dependency between P1 and P2 so that type
checking can be done in the correct order (just like for value
bindings). Dependencies between bindings is analyzed in the renamer,
where we don't know yet whether P2 is a constructor or a pattern
synonym. So for now, we do report conid occurrences in patterns as
uses.

# Name makers

Externally abstract type of name makers,
which is how you go from a RdrName to a Name

### Note: View pattern usage

Consider
  let (r, (r -> x)) = x in ...
Here the pattern binds 'r', and then uses it *only* in the view pattern.
We want to "see" this use, and in let-bindings we collect all uses and
report unused variables at the binding level. So we must use bindLocalNames
here, *not* bindLocalNameFV.  Trac #3943.

### Note: Don't report shadowing for pattern synonyms

There is one special context where a pattern doesn't introduce any new binders -
pattern synonym declarations. Therefore we don't check to see if pattern
variables shadow existing identifiers as they are never bound to anything
and have no scope.

Without this check, there would be quite a cryptic warning that the `x`
in the RHS of the pattern synonym declaration shadowed the top level `x`.

```
x :: ()
x = ()

pattern P x = Just x
```

See #12615 for some more examples.

# External entry points

There are various entry points to renaming patterns, depending on
 (1) whether the names created should be top-level names or local names
 (2) whether the scope of the names is entirely given in a continuation
     (e.g., in a case or lambda, but not in a let or at the top-level,
      because of the way mutually recursive bindings are handled)
 (3) whether the a type signature in the pattern can bind
        lexically-scoped type variables (for unpacking existential
        type vars in data constructors)
 (4) whether we do duplicate and unused variable checking
 (5) whether there are fixity declarations associated with the names
     bound by the patterns that need to be brought into scope with them.

 Rather than burdening the clients of this module with all of these choices,
 we export the three points in this design space that we actually need:

# The main event

# Record fields

 update

 DataCon

 TyCon

### Note: Disambiguation and Template Haskell

Consider (Trac #12130)
   module Foo where
     import M
     b = $(funny)

   module M(funny) where
     data T = MkT { x :: Int }
     funny :: Q Exp
     funny = [| MkT { x = 3 } |]

When we splice, neither T nor MkT are lexically in scope, so find_tycon will
fail.  But there is no need for disambiguation anyway, so we just return Nothing

# \subsubsection{Literals}

When literals occur we have to make sure
that the types and classes they involve
are made available.

### Note: Negative zero

There were problems with negative zero in conjunction with Negative Literals
extension. Numeric literal value is contained in Integer and Rational types
inside IntegralLit and FractionalLit. These types cannot represent negative
zero value. So we had to add explicit field 'neg' which would hold information
about literal sign. Here in rnOverLit we use it to detect negative zeroes and
in this case return not only literal itself but also negateName so that users
can apply it explicitly. In this case it stays negative zero.  Trac #13211

# \subsubsection{Errors}

repository: gitter-badger/ghc-compiler-notes

repo_name: gitter-badger/ghc-compiler-notes


text:
## Version 1.4.3

- Update donation info. Give me a cup of 🍺

## Version 1.4.2

- Fix `terminal` colors
- Added donation button

## Version 1.4.1

- Fix `php` functions and core functions colors

## Version 1.4

- Added colors of PHP `null` value
- Corrected terminal `black` color

## Version 1.3.3

- Update contacts and repository

## Version 1.3.2

- Fix bugs

## Version 1.3.1

- Different colors were added for PHP core and own functions.
- Added bright colors for terminal theme

## Version 1.3

- Added theme for XML files
- Corrected colors of braces into html attribute value
- Corrected colors of variable html attributes
- Corrected colors of html attributes

## Version 1.2

- Different colors were added for JavaScript core and own functions.
- Corrected the colors of JavaScript `null`
- Corrected colors of css/scss variables

## Version 1.1

- Added Terminal theme
- Corrected the colors of CDATA
- Corrected the colors of gutters
- Corrected the colors of wrap guide

## Version 1.0

- Initial release

repository: minrk/nova-perfectdark-theme

repo_name: minrk/nova-perfectdark-theme


text:
# README #
## Source structure

```
├── app
│   ├── handlers
│   │   └── fileanissue.js
│   └── models
│       ├── columne.model.js
│       ├── label.model.js
│       ├── milestone.model.js
│       └── project.model.js
├── assets
│   ├── json
│   │   └── github_organization.json
│   └── it-helpdesk-structure.xlsx
├── config
│   ├── .env
│   ├── constants.js
│   ├── index.js
│   └── mongodb.js
├── package.json
├── README.md
```
## Setup

- Start MongoDB
```
$ sudo service mongod start
```
- Run node server to create github structure from json
```
$ node createGitHubStructure.js
```
- After structure already has created, stop node server

- Run node server
```
$ node index.js
```
## Service Desk Bot Flow

### 1. Create issue on Workplace

- Pattern to create a issue on workplace

```
@Bot_name Title_of_Issue#Assignee#Priority#Type_of_Issue
```
- Priority such as: High, Low, Medium
- Type of issue such as: Access/Login, Desktop/Laptop/Hardware, Internet/Intranet ...

Example: @ServiceDeskBot Can't Login Desktop#smartbiz#High#Access/Login

![](/assets/images/create-issue-workplace.png)

- Workplace will post a message if create a issue is success

![](/assets/images/create-issue-success.png)

### 2. Handle issue on github
- Click on issue's link on workplace to see detail on github as below

![](/assets/images/issue-github.png)

- Issues are organized as dashboard below

![](/assets/images/dashboard-github.png)

- After close a issue, this issue will auto move to Close column on dashboard

![](/assets/images/close-issue.png)
![](/assets/images/dashboard-move.png)

### 3. Workplace notify the issue is close
- Workplace will notify as below

![](/assets/images/workplace-notify.png)

repository: smartbiz/ServiceDeskBot

repo_name: smartbiz/ServiceDeskBot


text:
![Logo](websocket-sharp_logo.png)

## Welcome to websocket-sharp! ##

websocket-sharp supports:

- [RFC 6455](#supported-websocket-specifications)
- [WebSocket Client](#websocket-client) and [Server](#websocket-server)
- [Per-message Compression](#per-message-compression) extension
- [Secure Connection](#secure-connection)
- [HTTP Authentication](#http-authentication)
- [Query string, Origin header, and Cookies](#query-string-origin-header-and-cookies)
- [Connecting through the HTTP proxy server](#connecting-through-the-http-proxy-server)
- .NET Framework **3.5** or later versions of .NET Framework (includes compatible environment such as [Mono])

## Branches ##

- [master] for production releases.
- [hybi-00] for older [draft-ietf-hybi-thewebsocketprotocol-00]. No longer maintained.
- [draft75] for even more old [draft-hixie-thewebsocketprotocol-75]. No longer maintained.

## Build ##

websocket-sharp is built as a single assembly, **websocket-sharp.dll**.

websocket-sharp is developed with [MonoDevelop]. So a simple way to build is to open **websocket-sharp.sln** and run build for **websocket-sharp project** with any of the build configurations (e.g. `Debug`) in MonoDevelop.

## Install ##

### Self Build ###

You should add your websocket-sharp.dll (e.g. `/path/to/websocket-sharp/bin/Debug/websocket-sharp.dll`) to the library references of your project.

If you would like to use that dll in your [Unity] project, you should add it to any folder of your project (e.g. `Assets/Plugins`) in the **Unity Editor**.

### NuGet Gallery ###

websocket-sharp is available on the [NuGet Gallery], as still a **prerelease** version.

- [NuGet Gallery: websocket-sharp]

You can add websocket-sharp to your project with the NuGet Package Manager, by using the following command in the Package Manager Console.

    PM> Install-Package WebSocketSharp -Pre

## Usage ##

### WebSocket Client ###

```csharp
using System;
using WebSocketSharp;

namespace Example
{
  public class Program
  {
    public static void Main (string[] args)
    {
      using (var ws = new WebSocket ("ws://dragonsnest.far/Laputa")) {
        ws.OnMessage += (sender, e) =>
                          Console.WriteLine ("Laputa says: " + e.Data);

        ws.Connect ();
        ws.Send ("BALUS");
        Console.ReadKey (true);
      }
    }
  }
}
```

#### Step 1 ####

Required namespace.

```csharp
using WebSocketSharp;
```

The `WebSocket` class exists in the `WebSocketSharp` namespace.

#### Step 2 ####

Creating a new instance of the `WebSocket` class with the WebSocket URL to connect.

```csharp
var ws = new WebSocket ("ws://example.com");
```

The `WebSocket` class inherits the `System.IDisposable` interface, so you can create it with the `using` statement.

```csharp
using (var ws = new WebSocket ("ws://example.com")) {
  ...
}
```

This will **close** the WebSocket connection with status code `1001` (going away) when the control leaves the `using` block.

#### Step 3 ####

Setting the `WebSocket` events.

##### WebSocket.OnOpen Event #####

This event occurs when the WebSocket connection has been established.

```csharp
ws.OnOpen += (sender, e) => {
               ...
             };
```

`System.EventArgs.Empty` is passed as `e`, so you do not need to use it.

##### WebSocket.OnMessage Event #####

This event occurs when the `WebSocket` instance receives a message.

```csharp
ws.OnMessage += (sender, e) => {
                  ...
                };
```

A `WebSocketSharp.MessageEventArgs` instance is passed as `e`.

If you would like to get the message data, you should access `e.Data` or `e.RawData` property.

`e.Data` property returns a `string`, so it is mainly used to get the **text** message data.

`e.RawData` property returns a `byte[]`, so it is mainly used to get the **binary** message data.

```csharp
if (e.IsText) {
  // Do something with e.Data.
  ...

  return;
}

if (e.IsBinary) {
  // Do something with e.RawData.
  ...

  return;
}
```

And if you would like to notify that a **ping** has been received, via this event, you should set the `WebSocket.EmitOnPing` property to `true`.

```csharp
ws.EmitOnPing = true;
ws.OnMessage += (sender, e) => {
                  if (e.IsPing) {
                    // Do something to notify that a ping has been received.
                    ...

                    return;
                  }
                };
```

##### WebSocket.OnError Event #####

This event occurs when the `WebSocket` instance gets an error.

```csharp
ws.OnError += (sender, e) => {
                ...
              };
```

A `WebSocketSharp.ErrorEventArgs` instance is passed as `e`.

If you would like to get the error message, you should access `e.Message` property.

`e.Message` property returns a `string` that represents the error message.

And `e.Exception` property returns a `System.Exception` instance that represents the cause of the error if it is due to an exception.

##### WebSocket.OnClose Event #####

This event occurs when the WebSocket connection has been closed.

```csharp
ws.OnClose += (sender, e) => {
                ...
              };
```

A `WebSocketSharp.CloseEventArgs` instance is passed as `e`.

If you would like to get the reason for the close, you should access `e.Code` or `e.Reason` property.

`e.Code` property returns a `ushort` that represents the status code for the close.

`e.Reason` property returns a `string` that represents the reason for the close.

#### Step 4 ####

Connecting to the WebSocket server.

```csharp
ws.Connect ();
```

If you would like to connect to the server asynchronously, you should use the `WebSocket.ConnectAsync ()` method.

#### Step 5 ####

Sending data to the WebSocket server.

```csharp
ws.Send (data);
```

The `WebSocket.Send` method is overloaded.

You can use the `WebSocket.Send (string)`, `WebSocket.Send (byte[])`, `WebSocket.Send (System.IO.FileInfo)`, or `WebSocket.Send (System.IO.Stream, int)` method to send the data.

If you would like to send the data asynchronously, you should use the `WebSocket.SendAsync` method.

```csharp
ws.SendAsync (data, completed);
```

And also if you would like to do something when the send is complete, you should set `completed` to any `Action<bool>` delegate.

#### Step 6 ####

Closing the WebSocket connection.

```csharp
ws.Close (code, reason);
```

If you would like to close the connection explicitly, you should use the `WebSocket.Close` method.

The `WebSocket.Close` method is overloaded.

You can use the `WebSocket.Close ()`, `WebSocket.Close (ushort)`, `WebSocket.Close (WebSocketSharp.CloseStatusCode)`, `WebSocket.Close (ushort, string)`, or `WebSocket.Close (WebSocketSharp.CloseStatusCode, string)` method to close the connection.

If you would like to close the connection asynchronously, you should use the `WebSocket.CloseAsync` method.

### WebSocket Server ###

```csharp
using System;
using WebSocketSharp;
using WebSocketSharp.Server;

namespace Example
{
  public class Laputa : WebSocketBehavior
  {
    protected override void OnMessage (MessageEventArgs e)
    {
      var msg = e.Data == "BALUS"
                ? "Are you kidding?"
                : "I'm not available now.";

      Send (msg);
    }
  }

  public class Program
  {
    public static void Main (string[] args)
    {
      var wssv = new WebSocketServer ("ws://dragonsnest.far");

      wssv.AddWebSocketService<Laputa> ("/Laputa");
      wssv.Start ();
      Console.ReadKey (true);
      wssv.Stop ();
    }
  }
}
```

#### Step 1 ####

Required namespace.

```csharp
using WebSocketSharp.Server;
```

The `WebSocketBehavior` and `WebSocketServer` classes exist in the `WebSocketSharp.Server` namespace.

#### Step 2 ####

Creating the class that inherits the `WebSocketBehavior` class.

For example, if you would like to provide an echo service,

```csharp
using System;
using WebSocketSharp;
using WebSocketSharp.Server;

public class Echo : WebSocketBehavior
{
  protected override void OnMessage (MessageEventArgs e)
  {
    Send (e.Data);
  }
}
```

And if you would like to provide a chat service,

```csharp
using System;
using WebSocketSharp;
using WebSocketSharp.Server;

public class Chat : WebSocketBehavior
{
  private string _suffix;

  public Chat ()
  {
    _suffix = String.Empty;
  }

  public string Suffix {
    get {
      return _suffix;
    }

    set {
      _suffix = value ?? String.Empty;
    }
  }

  protected override void OnMessage (MessageEventArgs e)
  {
    Sessions.Broadcast (e.Data + _suffix);
  }
}
```

You can define the behavior of any WebSocket service by creating the class that inherits the `WebSocketBehavior` class.

If you override the `WebSocketBehavior.OnMessage (MessageEventArgs)` method, it will be called when the `WebSocket` used in a session in the service receives a message.

And if you override the `WebSocketBehavior.OnOpen ()`, `WebSocketBehavior.OnError (ErrorEventArgs)`, and `WebSocketBehavior.OnClose (CloseEventArgs)` methods, each of them will be called when each of the `WebSocket` events (`OnOpen`, `OnError`, and `OnClose`) occurs.

The `WebSocketBehavior.Send` method can send data to the client on a session in the service.

If you would like to get the sessions in the service, you should access the `WebSocketBehavior.Sessions` property (returns a `WebSocketSharp.Server.WebSocketSessionManager`).

The `WebSocketBehavior.Sessions.Broadcast` method can send data to every client in the service.

#### Step 3 ####

Creating a new instance of the `WebSocketServer` class.

```csharp
var wssv = new WebSocketServer (4649);

wssv.AddWebSocketService<Echo> ("/Echo");
wssv.AddWebSocketService<Chat> ("/Chat");
wssv.AddWebSocketService<Chat> ("/ChatWithNyan", s => s.Suffix = " Nyan!");
```

You can add any WebSocket service to your `WebSocketServer` with the specified behavior and absolute path to the service, by using the `WebSocketServer.AddWebSocketService<TBehavior> (string)` or `WebSocketServer.AddWebSocketService<TBehavior> (string, Action<TBehavior>)` method.

The type of `TBehavior` must inherit the `WebSocketBehavior` class, and must have a public parameterless constructor.

So you can use a class in the above Step 2 to add the service.

If you create a new instance of the `WebSocketServer` class without a port number, it sets the port number to **80**. So it is necessary to run with root permission.

    $ sudo mono example2.exe

#### Step 4 ####

Starting the WebSocket server.

```csharp
wssv.Start ();
```

#### Step 5 ####

Stopping the WebSocket server.

```csharp
wssv.Stop ();
```

### HTTP Server with the WebSocket ###

I have modified the `System.Net.HttpListener`, `System.Net.HttpListenerContext`, and some other classes from **[Mono]** to create an HTTP server that allows to accept the WebSocket handshake requests.

So websocket-sharp provides the `WebSocketSharp.Server.HttpServer` class.

You can add any WebSocket service to your `HttpServer` with the specified behavior and path to the service, by using the `HttpServer.AddWebSocketService<TBehavior> (string)` or `HttpServer.AddWebSocketService<TBehavior> (string, Action<TBehavior>)` method.

```csharp
var httpsv = new HttpServer (4649);

httpsv.AddWebSocketService<Echo> ("/Echo");
httpsv.AddWebSocketService<Chat> ("/Chat");
httpsv.AddWebSocketService<Chat> ("/ChatWithNyan", s => s.Suffix = " Nyan!");
```

For more information, would you see **[Example3]**?

### WebSocket Extensions ###

#### Per-message Compression ####

websocket-sharp supports the [Per-message Compression][rfc7692] extension (but does not support it with the [context take over]).

As a WebSocket client, if you would like to enable this extension, you should set the `WebSocket.Compression` property to a compression method before calling the connect method.

```csharp
ws.Compression = CompressionMethod.Deflate;
```

And then the client will send the following header in the handshake request to the server.

    Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; client_no_context_takeover

If the server supports this extension, it will return the same header which has the corresponding value.

So eventually this extension will be available when the client receives the header in the handshake response.

#### Ignoring the extensions ####

As a WebSocket server, if you would like to ignore the extensions requested from a client, you should set the `WebSocketBehavior.IgnoreExtensions` property to `true` in your `WebSocketBehavior` constructor or initializing it, such as the following.

```csharp
wssv.AddWebSocketService<Chat> (
  "/Chat",
  s => s.IgnoreExtensions = true // To ignore the extensions requested from a client.
);
```

If it is set to `true`, the service will not return the Sec-WebSocket-Extensions header in its handshake response.

I think this is useful when you get something error in connecting the server and exclude the extensions as a cause of the error.

### Secure Connection ###

websocket-sharp supports the secure connection with **SSL/TLS**.

As a WebSocket client, you should create a new instance of the `WebSocket` class with a **wss** scheme WebSocket URL.

```csharp
var ws = new WebSocket ("wss://example.com");
```

If you would like to set a custom validation for the server certificate, you should set the `WebSocket.SslConfiguration.ServerCertificateValidationCallback` property to a callback for it.

```csharp
ws.SslConfiguration.ServerCertificateValidationCallback =
  (sender, certificate, chain, sslPolicyErrors) => {
    // Do something to validate the server certificate.
    ...

    return true; // If the server certificate is valid.
  };
```

The default callback always returns `true`.

As a WebSocket server, you should create a new instance of the `WebSocketServer` or `HttpServer` class with some settings for the secure connection, such as the following.

```csharp
var wssv = new WebSocketServer (5963, true);
wssv.SslConfiguration.ServerCertificate = new X509Certificate2 (
                                            "/path/to/cert.pfx", "password for cert.pfx"
                                          );
```

### HTTP Authentication ###

websocket-sharp supports the [HTTP Authentication (Basic/Digest)][rfc2617].

As a WebSocket client, you should set a pair of user name and password for the HTTP authentication, by using the `WebSocket.SetCredentials (string, string, bool)` method before calling the connect method.

```csharp
ws.SetCredentials ("nobita", "password", preAuth);
```

If `preAuth` is `true`, the client will send the credentials for the Basic authentication in the first handshake request to the server.

Otherwise, it will send the credentials for either the Basic or Digest (determined by the unauthorized response to the first handshake request) authentication in the second handshake request to the server.

As a WebSocket server, you should set an HTTP authentication scheme, a realm, and any function to find the user credentials before calling the start method, such as the following.

```csharp
wssv.AuthenticationSchemes = AuthenticationSchemes.Basic;
wssv.Realm = "WebSocket Test";
wssv.UserCredentialsFinder = id => {
    var name = id.Name;

    // Return user name, password, and roles.
    return name == "nobita"
           ? new NetworkCredential (name, "password", "gunfighter")
           : null; // If the user credentials are not found.
  };
```

If you would like to provide the Digest authentication, you should set such as the following.

```csharp
wssv.AuthenticationSchemes = AuthenticationSchemes.Digest;
```

### Query string, Origin header, and Cookies ###

As a WebSocket client, if you would like to send the query string in the handshake request, you should create a new instance of the `WebSocket` class with a WebSocket URL that includes the [Query] string parameters.

```csharp
var ws = new WebSocket ("ws://example.com/?name=nobita");
```

And if you would like to send the Origin header in the handshake request, you should set the `WebSocket.Origin` property to an allowable value as the [Origin] header before calling the connect method.

```csharp
ws.Origin = "http://example.com";
```

And also if you would like to send the cookies in the handshake request, you should set any cookie by using the `WebSocket.SetCookie (WebSocketSharp.Net.Cookie)` method before calling the connect method.

```csharp
ws.SetCookie (new Cookie ("name", "nobita"));
```

As a WebSocket server, if you would like to get the query string included in a handshake request, you should access the `WebSocketBehavior.QueryString` property, such as the following.

```csharp
public class Chat : WebSocketBehavior
{
  private string _name;
  ...

  protected override void OnOpen ()
  {
    _name = QueryString["name"];
  }

  ...
}
```

And if you would like to validate the Origin header, cookies, or both, you should set each validation for it with your `WebSocketBehavior`, for example, by using the `WebSocketServer.AddWebSocketService<TBehavior> (string, Action<TBehavior>)` method with initializing, such as the following.

```csharp
wssv.AddWebSocketService<Chat> (
  "/Chat",
  s => {
    s.OriginValidator =
      val => {
        // Check the value of the Origin header, and return true if valid.

        Uri origin;

        return !val.IsNullOrEmpty ()
               && Uri.TryCreate (val, UriKind.Absolute, out origin)
               && origin.Host == "example.com";
      };

    s.CookiesValidator =
      (req, res) => {
        // Check the cookies in "req", and set the cookies to send to
        // the client with "res" if necessary.

        foreach (var cookie in req) {
          cookie.Expired = true;

          res.Add (cookie);
        }

        return true; // If valid.
      };
  }
);
```

### Connecting through the HTTP proxy server ###

websocket-sharp supports to connect through the HTTP proxy server.

If you would like to connect to a WebSocket server through the HTTP proxy server, you should set the proxy server URL, and if necessary, a pair of user name and password for the proxy server authentication (Basic/Digest), by using the `WebSocket.SetProxy (string, string, string)` method before calling the connect method.

```csharp
var ws = new WebSocket ("ws://example.com");
ws.SetProxy ("http://localhost:3128", "nobita", "password");
```

I have tested this with **[Squid]**. It is necessary to disable the following option in **squid.conf** (e.g. `/etc/squid/squid.conf`).

```
# Deny CONNECT to other than SSL ports
#http_access deny CONNECT !SSL_ports
```

### Logging ###

The `WebSocket` class has the own logging function.

You can use it with the `WebSocket.Log` property (returns a `WebSocketSharp.Logger`).

So if you would like to change the current logging level (`WebSocketSharp.LogLevel.Error` as the default), you should set the `WebSocket.Log.Level` property to any of the `LogLevel` enum values.

```csharp
ws.Log.Level = LogLevel.Debug;
```

The above means a log with lower than `LogLevel.Debug` cannot be outputted.

And if you would like to output a log, you should use any of the output methods. The following outputs a log with `LogLevel.Debug`.

```csharp
ws.Log.Debug ("This is a debug message.");
```

The `WebSocketServer` and `HttpServer` classes have the same logging function.

## Examples ##

Examples using websocket-sharp.

### Example ###

[Example] connects to the server executed by [Example2] or [Example3].

### Example2 ###

[Example2] starts a WebSocket server.

### Example3 ###

[Example3] starts an HTTP server that allows to accept the WebSocket handshake requests.

Would you access to [http://localhost:4649](http://localhost:4649) to do **WebSocket Echo Test** with your web browser while Example3 is running?

## Supported WebSocket Specifications ##

websocket-sharp supports **RFC 6455**, and it is based on the following references:

- [The WebSocket Protocol][rfc6455]
- [The WebSocket API][api]
- [Compression Extensions for WebSocket][rfc7692]

Thanks for translating to japanese.

- [The WebSocket Protocol 日本語訳][rfc6455_ja]
- [The WebSocket API 日本語訳][api_ja]

## License ##

websocket-sharp is provided under [The MIT License].

[Example]: https://github.com/sta/websocket-sharp/tree/master/Example
[Example2]: https://github.com/sta/websocket-sharp/tree/master/Example2
[Example3]: https://github.com/sta/websocket-sharp/tree/master/Example3
[Mono]: http://www.mono-project.com
[MonoDevelop]: http://monodevelop.com
[NuGet Gallery]: http://www.nuget.org
[NuGet Gallery: websocket-sharp]: http://www.nuget.org/packages/WebSocketSharp
[Origin]: http://tools.ietf.org/html/rfc6454#section-7
[Query]: http://tools.ietf.org/html/rfc3986#section-3.4
[Squid]: http://www.squid-cache.org
[The MIT License]: https://raw.github.com/sta/websocket-sharp/master/LICENSE.txt
[Unity]: http://unity3d.com
[api]: http://www.w3.org/TR/websockets
[api_ja]: http://www.hcn.zaq.ne.jp/___/WEB/WebSocket-ja.html
[context take over]: https://datatracker.ietf.org/doc/html/rfc7692#section-7.1.1
[draft-hixie-thewebsocketprotocol-75]: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75
[draft-ietf-hybi-thewebsocketprotocol-00]: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00
[draft75]: https://github.com/sta/websocket-sharp/tree/draft75
[hybi-00]: https://github.com/sta/websocket-sharp/tree/hybi-00
[master]: https://github.com/sta/websocket-sharp/tree/master
[rfc2617]: http://tools.ietf.org/html/rfc2617
[rfc6455]: http://tools.ietf.org/html/rfc6455
[rfc6455_ja]: http://www.hcn.zaq.ne.jp/___/WEB/RFC6455-ja.html
[rfc7692]: https://datatracker.ietf.org/doc/html/rfc7692

repository: sta/websocket-sharp

gha_language: C#

repo_name: sta/websocket-sharp


text:
---
layout: default
---

# 1998-03-21 - New Champion! / Re: Complaints about spam are TRUE theft of services

## Header Data

From: Spammer<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 69a06624229f0c59f4e41d4b9612d127fea6ea13fe5406eb46c13f7c1b606cd1

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1998-03-21 02:10:17 UTC

Raw Date: Fri, 20 Mar 1998 18:10:17 -0800 (PST)

## Raw message

```
{% raw  %}From: Spammer<EMAIL_ADDRESS>Date: Fri, 20 Mar 1998 18:10:17 -0800 (PST)
To<EMAIL_ADDRESS>Subject: New Champion! / Re: Complaints about spam are TRUE theft of services
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Paul H. Merrill wrote:
>
> While I do not completely agree with the tone of the comments, nor do I
> buy the specific numbers involved, I have found that the mouthing off
> about the terror of Spam to take more bandwidth than the (EMail) spam
> itself does.  I also fear legislative involvement much more than the
> spam itself.

While TruthMonger's initial post, "Does Spamming Really Exist," was
obviously an attempt to lure Ross Wright out of the lair from which
he lurks, furtively monitoring the CypherPunks list, his secondary
goal was undoubtedly to laugh up his sleeve at the posters who would
inundate the list with a quantity of yea-nay's which would vastly
exceed the amount of spam which is passed on to subscribers of the
unfiltered toad.com CypherPunks list.

A communique from TruthMonger, shortly before he transmorgatized into
his 'Spammer' persona, informed me that he felt Paul Merrill had
earned the title of Chief Spammer SpokesPerson/Champion, despite the
heartfelt compliment that Ross Wright gave TM in one of his missives.

The concept of the spam-complainer being the true spammer on any
given mailing list, by virtue of setting off a mountain of posts
which are in all likelyhood off-topic and meant to appeal only
to the knee-jerk reactions of jerks with knees, is completely in
line with the theory that the only posts which are truly off-topic
on the CypherPunks lists are those which complain about off-topic
posts.

There is a case currently before the Supreme Court of Canada which
is continuing, despite the original plaintiffs having settled out
of court, without government intervention, which will decide
whether gay couples will be allowed to get butt-fucked under the
same vague, arbitrary and capricious laws as those which are
used to ruin the lives of the heterosexual citizens.

Even radical femnists have had the common sense not to petition
the government to ensure women equal representation in the gas
chambers of America.
Radical anti-spammers should take note...

Spammer

{% endraw %}
```

## Thread

+ Return to [March 1998](/archive/1998/03)

+ Return to "["Paul H. Merrill" <paulmerrill@acm.org>](/authors/paul_h_merrill_paulmerrill_at_acm_org_)"
+ Return to "["Ross Wright" <rwright@adnetsol.com>](/authors/ross_wright_rwright_at_adnetsol_com_)"
+ Return to "[Spammer <spam@dev.null>](/authors/spammer_spam_at_dev_null_)"

+ 1998-03-20 (Fri, 20 Mar 1998 15:43:20 -0800 (PST)) - [Re: Complaints about spam are TRUE theft of services](/archive/1998/03/61b11cf0fc43eba3b417e182c7c8a613a4101e823ccae14e440fdaee9b15d793) - _"Ross Wright"<EMAIL_ADDRESS>  + 1998-03-21 (Fri, 20 Mar 1998 16:06:21 -0800 (PST)) - [Re: Complaints about spam are TRUE theft of services](/archive/1998/03/a90571530698320569414a6c8b8b27934d5730419be127a60eca77fb1f8fe4f3) - _"Paul H. Merrill"<EMAIL_ADDRESS>  + 1998-03-21 (Fri, 20 Mar 1998 18:10:17 -0800 (PST)) - New Champion! / Re: Complaints about spam are TRUE theft of services - _Spammer<EMAIL_ADDRESS>  + 1998-03-21 (Fri, 20 Mar 1998 19:08:55 -0800 (PST)) - [Re: New Champion! / Re: Complaints about spam are TRUE theft ofservices](/archive/1998/03/18192826c0956ee90ff66c34b0f407d2656fbf666a02db34efb490107b0c871e) - _"Paul H. Merrill"<EMAIL_ADDRESS>


text:
[#]: subject: (GitLab’s New Open Source Tool Will Detect Malicious Code)
[#]: via: (https://news.itsfoss.com/gitlab-open-source-tool-malicious-code/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

GitLab’s New Open Source Tool Will Detect Malicious Code
======

There are several open-source tools available for security researchers. Now, GitLab has introduced a new one to the arsenal that lets you detect malicious code in dependencies.

The tool is also known as “Package Hunter” and is an important addition that could help secure every type of software.

### What is Package Hunter?

Every software includes some form of dependencies, which makes it possible for a developer to quickly build an app.

While this facilitates the reuse of code to achieve the task, they often just “trust” the dependencies used without separate review.

Package Hunter comes to the rescue here and lets you easily detect malicious code in a dependency package.

### Enhanching Software Supply Chain Security

Many supply chain attacks involve a compromised dependency package.

Normally, the attacker injects malicious code in the dependency code available to the public or creates a separate private repository to distribute the malicious dependency that looks safe.

Even if you are using a package manager to get trusted packages, it can be tricked to download packages from a private repository. And, you will have no idea about it.

Hence, with an additional check to the supply chain which is as convenient as Package Hunter, the software supply chain security should improve.

And, especially, if the open-source supply chain security improves, [open source software security][1] will gradually get a boost as well.

### How Does it Work? How Can You Get it?

Package Hunter scans for malicious code and keeps an eye on unexpected behavior of the dependencies.

It installs the dependencies in a sandbox environment to monitor and detect any anomalies.

As of now, it supports testing NodeJS modules and Ruby Jems.

GitLab has been using the tool internally for a while. And, now, it seamlessly integrates with GitLab.

You can learn more about setting it up by referring to the [official documentation][2] and the [Package Hunter CLI instructions][3].

It is available as a free and open-source project on [GitLab][4].

_What do you think about GitLab’s open-source tool to help detect malicious code? Feel free to share your thoughts in the comments below._

If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.

I'm not interested

--------------------------------------------------------------------------------

via: https://news.itsfoss.com/gitlab-open-source-tool-malicious-code/

作者：[Ankush Das][a]
选题：[lujun9972][b]
译者：[译者ID](https://github.com/译者ID)
校对：[校对者ID](https://github.com/校对者ID)

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出

[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/open-source-software-security/
[2]: https://gitlab.com/gitlab-org/security-products/package-hunter/-/blob/main/README.md
[3]: https://gitlab.com/gitlab-org/security-products/package-hunter-cli/-/blob/main/README.md#gitlab-ci
[4]: https://gitlab.com/gitlab-org/security-products/package-hunter/activity

url: https://raw.githubusercontent.com/zionfuo/TranslateProject/84c7135f0a6d8b405f6a6a474494b2a58a6e0607/sources/news/20210727 GitLab-s New Open Source Tool Will Detect Malicious Code.md

repository: zionfuo/TranslateProject

gha_language: Shell

repo_name: zionfuo/TranslateProject


text:
---
title: "Notification Center on iTunes"
date: 2014-02-04 00:00
---

<import>
My new podcast, Notification Center, has been added to the iTunes podcast directory here. As part of the iTunes catalogue, you should be able to find it and subscribe to it in your favourite third-party podcatcher. (At the moment, mine is Network).

Go check it out, subscribe, and leave a review. We'll be recording and releasing a new episode this weekend.
</import>

repository: orta/blog

extension: markdown

repo_name: orta/blog