text:
# Raspberry-DHT22

This repo contains everything you need to set up the DHT22 (or DHT11) sensor with the Raspberry PI.

## Basic Usage

    sudo apt-get install build-essential python-dev python-openssl -y
    git clone https://github.com/NicolaGenesin/Raspberry-DHT22.git
    cd Raspberry-DHT22
    sudo python setup.py install
    # 22 (for the DHT22 driver) and 4 (to use gpio 4)
    sudo python examples/basic.py 22 4

The output will be something like

    Temp=22.2*  Humidity=42.9%

## Bonus (InfluxDB & Grafana)

Let's check your os release

    lsb_release -a

If you are using jessie or Debian 8.0

    sudo apt-get update && sudo apt install apt-transport-https curl
    curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
    echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
    sudo apt-get update && sudo apt-get install influxdb

If you are using wheezy or Debian 7.0

    sudo apt-get update && sudo apt install apt-transport-https curl
    curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
    echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
    sudo apt-get update && sudo apt-get install influxdb

Finally start the service and create an empty database

    sudo service influxdb start
    influx
    create database "sensor_data"

From another terminal tab, let's install Grafana

    sudo apt-get install apt-transport-https curl
    curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
    echo "deb https://dl.bintray.com/fg2it/deb jessie main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
    sudo apt-get update
    sudo apt-get install grafana
    sudo service grafana-server start
    # The default HTTP port is 3000 and default user/password is admin.
    # (Optional) To configure the Grafana server to start at boot time:
    sudo update-rc.d grafana-server defaults

Let's run the bonus.py script!

    pip install influxdb
    # bonus.py is very similar to bonus.py with the difference that it writes to the influx database to create date for Grafana
    sudo python examples/bonus.py 22 4

The output will be something like this, every 5 seconds

    Temp=22.2*  Humidity=42.9%
    .
    .

Back to the database tab, if you query it

    select * from "rpi"

The output will be something like this

    # time, humidity (%), location, temperature (C)
<PHONE_NUMBER>000000000 42.400001525878906 living room 22.100000381469727

Now all you need to do is to open Grafana at localhost:3000 and configure your dashboard :)


text:
---
title: "Step 3: Use data binding and properties"
subtitle: "Build your first Polymer element"
---

Polymer allows you to create an API for your element, providing a way to configure it from markup or from JavaScript.

## Step 3: Use data binding and properties

In this step, you'll:

* [Create a properties getter and declare a simple String property](#create).
* [Use the simple String property in a data binding](#bind).
* [Sync a property with its corresponding HTML attribute](#sync).

### Create a properties getter and declare a simple String property {#create}

Create a static `properties` getter function in `icon-toggle.js`. Inside the `IconToggle` class definition, after the `template` function, add the following code:

```js
static get properties() {
  return {
    toggleIcon: {
      type: String
    }
  };
}
```

Before { .caption }

```js
class IconToggle extends PolymerElement {
  static get template() {
    ...
  }
  constructor() {
    ...
  }
}
```

After { .caption }

```js
class IconToggle extends PolymerElement {
  static get template() {
    ...
  }
  static get properties () {
    return {
      toggleIcon: {
        type: String
      }
    };
  }
  constructor() {
    ...
  }
}
```

Key information:

  * Declare properties for your elements inside a `properties` getter function.

  * You must declare a property in order to use it in HTML.

  * A simple property declaration like this one just includes the type (in this
    case, `String`).

**Learn more: deserializing attributes.** The declared property type affects how Polymer converts, or deserializes the attribute value (always a string value) into a JavaScript property value. The default is `String`, so the declaration of `toggleIcon` is a formality here. To learn more, see [attribute deserialization](/{{{polymer_version_dir}}}/docs/devguide/properties#attribute-deserialization) in the Polymer docs. { .alert .alert-info }

### Use the simple String property in a data binding {#bind}

In `icon-toggle.js`, find the `<iron-icon>` element and change the value of its `icon` attribute from `"polymer"` to  `"[[toggleIcon]]"`.

Before { .caption }

```html
<!-- local DOM goes here -->
<iron-icon icon="polymer"></iron-icon>
```

After { .caption}

```html
<!-- local DOM goes here -->
<iron-icon icon="[[toggleIcon]]"></iron-icon>
```

Key information:

  * The `icon="[[toggleIcon]]"` assignment is a data binding. It links your `<icon-toggle>` element's `toggleIcon` property with the `<iron-icon>`'s `icon` property.

You can now use your element and set the `toggleIcon` property in markup or using JavaScript. We've set up an example for you in the demo. Ensure that the Polymer CLI development server is running, and refresh the browser window to see the changes.

If you're curious about where the new icons come from, take a look at `demo-element.js` in the `demo` folder. You'll see the following code:

demo/demo-element.js { .caption }

```html
<icon-toggle toggle-icon="star" pressed></icon-toggle>
```

If you'd like to experiment, try adding a new `<icon-toggle>` element to `demo/demo-element.js`. Some icon names you can try are `add`, `menu`, and `settings`.

**Learn more: attribute and property names.** You'll note that the markup above uses `toggle-icon`, not `toggleIcon`. Polymer represents camelCase property names using dash-case attribute names. To learn more, see Property name to attribute name mapping in the Polymer library docs. { .alert .alert-info }

### Sync a property with its corresponding HTML attribute {#sync}

In this section, you'll create a property (`pressed`) that **notifies** its host element when it changes, and is synchronized with a corresponding HTML attribute.

In `icon-toggle.js`, in the `properties` function, add the `pressed` property:

```js
pressed: {
  type: Boolean,
  value: false,
  notify: true,
  reflectToAttribute: true
},
```

Before { .caption }

```js
class IconToggle extends PolymerElement {
  static get template() {
    ...
  }
  static get properties () {
    return {
      toggleIcon: {
        type: String
      }
    };
  }
  constructor() {
    ...
  }
}
```

After { .caption }

```js
class IconToggle extends PolymerElement {
  static get template() {
    ...
  }
  static get properties () {
    return {
      toggleIcon: {
        type: String
      },
      pressed: {
        type: Boolean,
        value: false,
        notify: true,
        reflectToAttribute: true
      }
    };
  }
  constructor() {
    ...
  }
}
```

Key information:

*   For this more complicated property, you supply a configuration object with several additional fields:

    * `value` specifies the property's [default value](/{{{polymer_version_dir}}}/docs/devguide/properties#configure-values).

    * `notify` tells Polymer to dispatch property change events when the property's `value` changes. This lets the change be observed by other nodes.

    * The `reflectToAttribute` property tells Polymer to [update the corresponding attribute when the property changes](/{{{polymer_version_dir}}}/docs/devguide/properties#attribute-reflection). This lets you style the element using an attribute selector, like `icon-toggle[pressed]`.

**Learn more: `notify` and `reflectToAttribute`.** The `notify` and `reflectToAttribute` properties may _sound_ similar: they both make the element's state visible to the outside world. `reflectToAttribute` makes the state visible **in the DOM tree**, so that it's visible to CSS and the `querySelector` methods. `notify` **makes state changes observable outside the element**, either using JavaScript event handlers or Polymer two-way data binding. { .alert .alert-info }

Now your element has `pressed` and `toggleIcon` properties working.

Reload the demo, and you should see star and heart icons:

Next, we'll make the icons react to being clicked. On to [step 4](step-4)!

Previous step: Add local DOM
Next step: React to input

repository: Polymer-Japan/docs

branch_name: refs/heads/master

extension: md

gha_language: HTML

license_type: permissive

repo_name: Polymer-Japan/docs


text:
## PROBLEM STATEMENT
Write a program to find the remainder when an integer A is divided by an integer B.

## Input
The first line contains an integer T, the total number of test cases. Then T lines follow, each line contains two Integers A and B.

## Output
For each test case, find the remainder when A is divided by B, and display it in a new line.

## Constraints
1 ≤ T ≤ 1000

1 ≤ A,B ≤ 10000

## Example

## Input
3
1 2
100 200
40 15

## Output
1
100
10

license: MIT

branch_name: refs/heads/main

gha_license_id: MIT


text:
rust-static
===========

[![GitLab](https://img.shields.io/badge/repository-GitLab-orange.svg?logo=gitlab)](https://gitlab.com/Seirdy/rust-static)
[![GitHub
mirror](https://img.shields.io/badge/mirror-GitHub-black.svg?logo=github)](https://github.com/Seirdy/rust-static)
[![Container Repository on
Quay](https://quay.io/repository/seirdy/rust-static/status "Docker Repository on Quay")](https://quay.io/repository/seirdy/rust-static)

`rust-static` is yet another musl-based OCI image to compile statically-linked Rust
programs.

Unlike some similar projects, this container is Alpine-based; however, it's not as
tiny as you might think. Several packages have been pre-installed to allow building
some popular rust programs.

The following packages can be built in this container:

- [lsd](github.com/Peltoche/lsd)
- [fd](github.com/sharkdp/fd)
- [diskus](github.com/sharkdp/diskus)
- [eva](github.com/NerdyPepper/eva)
- [roflcat](github.com/jameslzhu/roflcat)

Example usage
-------------

Sourcing this shell script will provide the `cargo_static` function, which behaves
like the `cargo` command but runs everything inside the `rust-static` container.
Executables built using `cargo_static` will be statically-linked with link-time
optimization (fat objects).

repository: Seirdy/rust-static

repo_name: Seirdy/rust-static


text:
---
title: 'A very interesting piece of ...'
author: admin
date: 2018-10-13
output: pdf_document
categories: []
tags:
- facebook
- german
subtitle: ''
summary: ''
authors: []
lastmod: 2018-10-13T19:51:30+02:00
featured: no
image:
  caption: ''
  focal_point: ''
  preview_only: no
projects: []
slug: []
---
A very interesting piece of history you probably never heard of before.
> [![](https://spectrum.ieee.org/media-library/illustration-chris-malbon.jpg?id=25586635&width=1200&coordinates=0%2C106%2C0%2C107&height=600)](https://spectrum.ieee.org/tech-history/silicon-revolution/how-programmable-calculators-and-a-scifi-story-brought-soviet-teens-into-the-digital-age)
> spectrum.ieee.org
> ## [How Programmable Calculators and a Sci-Fi Story Brought Soviet Teens Into the Digital Age](https://spectrum.ieee.org/tech-history/silicon-revolution/how-programmable-calculators-and-a-scifi-story-brought-soviet-teens-into-the-digital-age)
>
>In the 1980s, the USSR’s unlikely computer-literacy campaign nurtured a generation of techies

repository: asmaier/homepage

repo_name: asmaier/homepage


text:
Pseudocode for the Lock Server Protocol
=======================================

Nodes
-----

```ocaml
Name := Server | Agent(int)
```

API
---

```ocaml
Input := Lock | Unlock
Out := Granted
```

Internal Messages
----------------

```ocaml
Msg := LockMsg | UnlockMsg | GrantedMsg
```

State
-----

```ocaml
State Server := list Name (* head agent holds lock, tail agents wait *)
State (Agent _) := bool (* true iff client holds lock *)

InitState Server := []
InitState (Agent _) := false
```

API Handlers
------------

```ocaml
HandleInp (n: Name) (s: State n) (inp: Inp) :=
match n with
| Server => nop (* server performs no external IO *)
| Agent _ =>
  match inp with
  | Lock =>
    send (Server, LockMsg)
  | Unlock =>
    if s == true then s := false ; send (Server, UnlockMsg)
```

Internal Message Handlers
-------------------------

```ocaml
HandleMsg (n: Name) (s: State n) (src: Name) (msg: Msg) :=
match n with
| Server =>
  match msg with
  | LockMsg =>
    (* if lock not held, immediately grant *)
    if s == [] then send (src, GrantedMsg) ;
    (* add requestor to end of queue *)
    s := s ++ [src]
  | UnlockMsg =>
    (* head of queue no longer holds lock *)
    s := tail s ;
    (* grant lock to next waiting agent, if any *)
    if s != [] then send (head s, GrantedMsg)
  | _ => nop (* never happens *)
| Agent _ =>
  match msg with
  | GrantedMsg =>
    s := true ;
    output Granted
  | _ => nop (* never happens *)
```

repository: DistributedComponents/verdi-lockserv

gha_language: Coq

repo_name: DistributedComponents/verdi-lockserv


text:
# How to contribute to Atomic Red Team
*NOTE: We have sweet stickers for people who contribute; if you’re interested send a message to
<EMAIL_ADDRESS>with your mailing address*

- [Atomic Philosophy](#atomic-philosophy)
- [How to contribute](#how-to-contribute)
- [Atomic Test structure](#atomic-test-structure)
- [Generating Atomic docs yourself (optional)](#generating-atomic-docs-yourself--optional-)

## Atomic Philosophy
Atomic Red Team welcomes all types of contributions as long as it is mapped to [MITRE ATT&CK](https://attack.mitre.org/wiki/Main_Page). A few guidelines:

- Tests are made to be "easy". If your Atomic Test is complicated and requires multiple external utilities/packages/Kali, we may ask that you simplify it.

- TEST YOUR ATOMIC TEST! Be sure to run it from a few OSes/platforms before submitting a pull request to ensure everything is working correctly.

- If sourcing from another tool/product (ex. generated command), be sure to cite it in the test's description.

## How to contribute
Fork the atomic-red-team repository in Github, then checkout the repository and make a branch for your new test:
```
Fork on Github

git clone<EMAIL_ADDRESS>cd atomic-red-team

git checkout -b t1234-something-describing-your-test
```

Pick the technique you want to add a test for (ie, T1234) and run the generator. This makes
a new test for the technique with a bunch of TODOs you'll fill in and opens up your editor
so you can get to work.

```
bin/new-atomic.rb T1234
```

> Don't have Ruby? Use the Atomic Test template [here](./atomic_red_team/atomic_test_template.yaml) as a starting point for your new test.

Fill in the TODOs with the information for your test. See the [Atomic Test structure](#atomic-test-structure) section below.

Validate that your Atomic Test is up to spec!

```
bin/validate-atomics.rb
```

> Don't have Ruby? The automated build system will validate the techniques on your branch as soon as you commit to your branch and push to your fork.

Submit a Pull Request once your test is complete and everything validates.
```
git add atomics/t1234
git commit -m "Add test for T1234 that does XYZ"
git push -u origin $(git branch |grep '*'|cut -f2 -d' ')

Go to github.com/YOUR_GITHUB_ACCOUNT/atomic-red-team and follow the instructions to create a new Pull Request.
```

## Atomic Test structure
This spec describes the format of Atomic Red Team atomic tests that are defined in YAML format.

The Atomic YAML schema is specified in the [Atomic Red Team YAML Spec](atomic_red_team/spec.yaml). See that
file for complete details about what each field means and a list of possible values.

The source of truth for a test is the YAML file - the associated human readable Markdown file is automatically
generated via `bin/generate-atomic-docs.rb` and `atomic_red_team/atomic_doc_template.md.erb`.

The directory structure is:
- Tests reside in the `atomics` directory
- One directory per ATT&CK technique, named as `t1234`
- All the atomic tests for a technique in a file named `t1234.yaml` inside that directory
- Any payloads, supporting materials, etc for the atomic tests also live in that directory

For example:

```
atomic_red_team/
atomic_red_team/atomics
atomic_red_team/atomics/t1234
atomic_red_team/atomics/t1234/t1234.yaml      <-- this is where all the atomic tests for a technique live
atomic_red_team/atomics/t1234/payload1.sct    <-- a payload file needed by one of the T1234 atomics
atomic_red_team/atomics/t1234/payload2.dll    <-- another payload file needed by one of the T1234 atomics
```

In general, a set of atomic tests for a technique should never depend on payloads
or supporting files from other atomic directories. We want to keep things nice and close.
Use git symlinks if you really need to share files between techniques.

## Generating Atomic docs yourself (optional)
If you want to see what the pretty Markdown version of your Atomic Test is going to look like,
you can generate the Atomic Docs yourself:

```
bin/generate-atomic-docs.rb
```

The CircleCI build will automatically generate docs for your and commit them to your
pull request to ensure they are updated before being merged into master.

repository: watchlearn/atomic-red-team

repo_name: watchlearn/atomic-red-team


text:
Meta Section
============

Meta Section is an extension that allows embedding a static section in the publish index page of another section.

- Version: 0.2
- Author: Rainer Borene
- Build Date: 2010-11-23
- Requirements: Symphony 2.1.2 (Very likely compatible with earlier versions, only tested in 2.1.2)

Installation
------------

In order to use this extension you must install Static Section extension. You can download it right [here](https://github.com/knupska/static_section).

If you have any doubts please read more about how [extensions](http://symphony-cms.com/learn/concepts/view/extensions/) works.

License
-------

Licensed under the MIT License.

extension: markdown


text:
# Gotenberg JS/TS client

[![Build Status](https://github.com/yumauri/gotenberg-js-client/workflows/build/badge.svg)](https://github.com/yumauri/gotenberg-js-client/actions?workflow=build)
[![Coverage Status](https://coveralls.io/repos/github/yumauri/gotenberg-js-client/badge.svg?branch=master)](https://coveralls.io/github/yumauri/gotenberg-js-client?branch=master)
[![License](https://img.shields.io/github/license/yumauri/gotenberg-js-client.svg?color=yellow)](./LICENSE)
[![NPM](https://img.shields.io/npm/v/gotenberg-js-client)](https://www.npmjs.com/package/gotenberg-js-client)
![Made with Love](https://img.shields.io/badge/made%20with-❤-red.svg)

A simple JS/TS client for interacting with a [Gotenberg](https://thecodingmachine.github.io/gotenberg/) API.

[Gotenberg](https://thecodingmachine.github.io/gotenberg/) is a Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF.

- HTML and Markdown conversions using Google Chrome headless
- Office conversions (.txt, .rtf, .docx, .doc, .odt, .pptx, .ppt, .odp and so on) using [unoconv](https://github.com/dagwieers/unoconv)
- Assets: send your header, footer, images, fonts, stylesheets and so on for converting your HTML and Markdown to beautiful PDFs!
- Easily interact with the API using [Go](https://github.com/thecodingmachine/gotenberg-go-client) and [PHP](https://github.com/thecodingmachine/gotenberg-php-client) libraries (and now - JavaScript too ;)

## Install

```bash
$ yarn add gotenberg-js-client
```

Or using `npm`

```bash
$ npm install --save gotenberg-js-client
```

## NB ⚠

This library is not yet fully compatible with Gotenberg 7.

You can find more info in [this comment](https://github.com/yumauri/gotenberg-js-client/issues/32#issuecomment-981140727).

There are three main issues:

- Gotenberg 7 has introduced new concept of conversion modules, thus, changing conversion URLs, so now they are different, than ones, this library creates. This can be sidestepped using custom connection string or adjusting URL manually (see [this comment](https://github.com/yumauri/gotenberg-js-client/issues/32#issuecomment-981140727)).
- New modules has some new possibilities/parameters, which are impossible to pass, using this library. This can be sidestepped using `adjust`, and casting to `any`, if you use TypeScript (see [this issue](https://github.com/yumauri/gotenberg-js-client/issues/33) for reference).
- Gotenberg 7 can potentially has many many different custom conversion modules, you can even write your own one. You can combine p.1 and p.2 to use any module with any path with any parameters, but I guess it will look not good. But it should work nonetheless.

So, nothing you can live without, but there are some inconveniences. For a while ;)

## Usage

```typescript
import { pipe, gotenberg, convert, html, please } from 'gotenberg-js-client'

const toPDF = pipe(
  gotenberg('http://localhost:3000'),
  convert,
  html,
  please
)

// --- 8< ---

// convert file from disk
const pdf = await toPDF('file://index.html')

// or convert stream
const pdf = await toPDF(fs.createReadStream('index.html'))

// or convert string!
const pdf = await toPDF('<html>...</html>')

// library returns NodeJS.ReadableStream,
// so you can save it to file, if you want, for example
pdf.pipe(fs.createWriteStream('index.pdf'))

// or you can send it as response in Express application
app.get('/pdf', function (req, res) {
  //...
  pdf.pipe(res)
})
```

You can define any source like `string`, `Buffer`, [file link](https://en.wikipedia.org/wiki/File_URI_scheme), `stream.Readable`, or `URL` (for url conversions).

Detailed sources format you can find [here](https://github.com/yumauri/gotenberg-js-client/wiki/Source).

## Header, footer and assets

You can define sources as array or object, for example:

```typescript
// `toPDF` function is defined above ↑↑↑

// as object
const pdf = await toPDF({
  'index.html': 'file://index.html',
  'header.html': 'file://header.html',
  'footer.html': 'file://footer.html',
  'style.css': 'file://style.css',
  'img.png': 'file://img.png',
  'font.wof': 'file://font.wof',
})

// as array of tuples
const pdf = await toPDF([
  ['index.html', 'file://index.html'],
  ['header.html', 'file://header.html'],
  ['footer.html', 'file://footer.html'],
])

// as even 1-dimensional array of files
// in that case filenames will be retrieved from file path
const pdf = await toPDF([
  'file://index.html',
  'file://header.html',
  'file://footer.html',
])
```

Instead of array you can use any [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), like `Map`, `Set`, `arguments`, iterator from generator function, or any object with `[Symbol.iterator]` defined.

Detailed sources format you can find [here](https://github.com/yumauri/gotenberg-js-client/wiki/Source).

## Paper size, margins, orientation

When converting HTML or Markdown, you can use `to` helper, to set paper size, margins and orientation:

```typescript
import {
  pipe,
  gotenberg,
  convert,
  html,
  please,
  to,
  a4,
  landscape,
} from 'gotenberg-js-client'

const toPDF = pipe(
  gotenberg('http://localhost:3000'),
  convert,
  html,
  to(a4, landscape),
  please
)
```

You can use simple object(s) for `to` argument(s) as well:

```typescript
//...
to({
  paperWidth: 8.27,
  paperHeight: 11.69,
  marginTop: 0,
  marginBottom: 0,
  marginLeft: 0,
  marginRight: 0,
  landscape: true,
})
//...

// or
to([8.27, 11.69], [0, 0, 0, 0], { landscape: true })
//...

// or
to({ paper: [8.27, 11.69], margins: [0, 0, 0, 0], landscape: true })
//...

// or
to({ width: 8.27, height: 11.69 }, { landscape: true })
//...

// or
to({ top: 0, bottom: 0 })
//...

// or any other combination
```

When using array for paper size, order should be `[width, height]`

When using array for margins, order should be `[top, right, bottom, left]` (just like in CSS)

## Common options

You can set common options, like [resultFilename](https://thecodingmachine.github.io/gotenberg/#result_filename), or [waitTimeout](https://thecodingmachine.github.io/gotenberg/#timeout), or, actually, you can override _any_ option, using `set` helper:

```typescript
//...
set({
  resultFilename: 'foo.pdf',
  waitTimeout: 2.5,
})
//...
```

There are some _modifiers_ functions as well, like `filename`, `timeout`, `delay`, `webhook` and `googleChromeRpccBufferSize`:

```typescript
//...
set(filename('foo.pdf'), timeout(2.5))
//...
```

Also you can specify page ranges using `set(range)` (will not work with `merge`):

```typescript
//...
set(range('1-1'))
//...
```

or scale, using `set(scale)` (works with HTML, Markdown and URL conversions):

```typescript
//...
set(scale(0.75))
//...
```

## Markdown // [Gotenberg documentation](https://thecodingmachine.github.io/gotenberg/#markdown)

```typescript
import { pipe, gotenberg, convert, markdown, please } from 'gotenberg-js-client'

const toPDF = pipe(
  gotenberg('http://localhost:3000'),
  convert,
  markdown,
  please
)

// --- 8< ---

const pdf = await toPDF({
  'index.html': `
    <!doctype html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <title>My PDF</title>
      </head>
      <body>
        {{ toHTML .DirPath "content.md" }}
      </body>
    </html>`,

  'content.md': `
    # My awesome markdown
    ...
  `,
})
```

Note: I use strings here as an example, remind that you can use other supported [source](https://github.com/yumauri/gotenberg-js-client/wiki/Source) type.

## Office // [Gotenberg documentation](https://thecodingmachine.github.io/gotenberg/#office)

```typescript
import {
  pipe,
  gotenberg,
  convert,
  office,
  to,
  landscape,
  set,
  filename,
  please,
} from 'gotenberg-js-client'

const toPDF = pipe(
  gotenberg('http://localhost:3000'),
  convert,
  office,
  to(landscape),
  set(filename('result.pdf')),
  please
)

// --- 8< ---

const pdf = await toPDF('file://document.docx')
```

Note: I use [file link](https://en.wikipedia.org/wiki/File_URI_scheme) here as an example, remind that you can use other supported [source](https://github.com/yumauri/gotenberg-js-client/wiki/Source) type, say, `Buffer`, or `stream.Readable`:

```typescript
https.get(
  'https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.docx',
  async (document) => {
    const pdf = await toPDF({ 'document.docx': document })
    // ...
  }
)
```

## Url // [Gotenberg documentation](https://thecodingmachine.github.io/gotenberg/#url)

```typescript
import { pipe, gotenberg, convert, url, please } from 'gotenberg-js-client'

const toPDF = pipe(
  gotenberg('http://localhost:3000'),
  convert,
  url,
  please
)

// --- 8< ---

// you can use link as string
const pdf = await toPDF('https://google.com')

// or URL object
const pdf = await toPDF(new URL('https://google.com'))
```

Note: The only supported source for Url conversion is text url or instance of `URL` class.

You can set remote url header (for example, for [authentication](https://github.com/thecodingmachine/gotenberg/issues/81) or [host specifying](https://github.com/thecodingmachine/gotenberg/issues/116)) with helper `add(header)` (or `add(headers)`, or both):

```typescript
const toPDF = pipe(
  gotenberg('http://localhost:3000'),
  convert,
  url,
  add(
    header('Foo-Header', 'Foo'),
    header('Bar-Header', 'Bar'),
    headers({ 'Baz1-Header': 'Baz1', 'Baz2-Header': 'Baz2' })
  ),
  please
)
```

(This also applies for Webhook headers, just use `webhookHeader` instead of `header` and `webhookHeaders` instead of `headers`).

## Merge // [Gotenberg documentation](https://thecodingmachine.github.io/gotenberg/#merge)

Like you would think:

```typescript
import { pipe, gotenberg, merge, please } from 'gotenberg-js-client'

const toMergedPDF = pipe(
  gotenberg('http://localhost:3000'),
  merge,
  please
)
```

## Advanced fine adjustment

There is special function `adjust`, which you can use to modify _any_ field in prepared internal `Request` object. You can check internal `Request` object structure in types. Any object, passed to `adjust`, will be merged with prepared `Request`.

For example, you can modify `url`, if your Gotenberg instance is working behind reverse proxy with some weird url replacement rules:

```typescript
import { pipe, gotenberg, convert, html, adjust, please } from 'gotenberg-js-client'

// Original Gotenberg HTML conversion endpoint is
//   -> /convert/html
// But your reverse proxy uses location
//   -> /hidden/html/conversion
const toPDF = pipe(
  gotenberg('http://localhost:3000'),
  convert,
  html,
  adjust({ url: '/hidden/html/conversion' }),
  please
)
```

But, using that function, remember about Peter Parker principle:
> "With great power comes great responsibility"

## Bonus

If you happen to use this package from JavaScript, you will, obviously, lost type safety, but in return, you can use [proposed pipe operator](https://github.com/tc39/proposal-pipeline-operator) (with [Babel plugin](https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator)), to get beauty like this:

```javascript
const toPDF = source =>
  source
    |> gotenberg('http://localhost:3000')
    |> convert
    |> html
    |> to(a4, noMargins)
    |> set(filename('out.pdf'))
    |> please
```

## Names clashes

If you don't like to have simple imported names in your namespace, you can use `import *` syntax:

```typescript
import * as got from 'gotenberg-js-client'

const toPDF = got.pipe(
  got.gotenberg('http://localhost:3000'),
  got.convert,
  got.html,
  got.please
)
```

## Sponsored

[](https://setplex.com/en/)

[Setplex OTT Platform](https://setplex.com/en/)

repository: yumauri/gotenberg-js-client

gha_language: TypeScript

repo_name: yumauri/gotenberg-js-client


text:
# gargoyle-postgresql-nix

This is a companion package for gargoyle-postgresql that uses nix to find the locations of PostgreSQL executables.

Please see the [gargoyle-postgresql](https://hackage.haskell.org/package/gargoyle-postgresql) documentation for more information.

repository: obsidiansystems/gargoyle

branch_name: refs/heads/develop

gha_language: Haskell

repo_name: obsidiansystems/gargoyle


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

# ngast

This library provides user friendly API for parsing Angular projects.

# Getting started
```
$ npm i @angular/core @angular/compiler @angular/compiler-cli ngast --save
```

> `ngast` is built on top of Ivy (`ngtsc`), make sure to compile your project with `ngcc` (run `ng serve`, `ng build` or `npx ngcc`).

## Workspace
First you need connect the `WorkspaceSymbols` to the `tsconfig.json` root :
```typescript
import { join } from 'path';
import { WorkspaceSymbols } from 'ngast';

const config = join(process.cwd(), 'tsconfig.json');
const workspace = new WorkspaceSymbols(config);
```

From there you can find all the decorated classes in your project :
```typescript
const modules = workspace.getAllModules();
const components = workspace.getAllComponents();
const directives = workspace.getAllDirectives();
const injectables = workspace.getAllInjectable();
const pipes = workspace.getAllPipes();
```

The **first time** one of the method above is called, `ngast` will run the analysis of the workspace.

The analysis is currently quite long: **>10sec for a small project** can go **beyond 2min for a very large project**.

# Working without Ivy
Version 0.4.0 is built on top of the ViewEngine, you can take a look at the [documentation here](https://ng-ast.github.io/ngast/).

# Example

Projects using ngast:

- [ngrev](https://github.com/mgechev/ngrev) - Tool for reverse engineering of Angular applications.
- [codelyzer](https://github.com/mgechev/codelyzer) - Static code analysis for Angular projects.
- [ngworld](https://github.com/mgechev/ngworld) - Visualization of Angular projects.
- [ng-app-counter](https://github.com/irustm/ng-app-counter) - Counter for Angular applications.
- [ng-pathfinder](https://github.com/vakrilov/ng-pathfinder) - Show a list of all routes in an angular application.
- [ngx-translate-all](https://github.com/irustm/ngx-translate-all) - Tool for automate i18n Angular projects.
- [ngx-translate-migrate](https://github.com/irustm/ngx-translate-migrate) - Tool for migrate from ngx-translate to Angular i18n.

# License

MIT

repository: andreascorti/ngast

repo_name: andreascorti/ngast


text:
# FizzBuzz
Fizz buzz is a group word game for children to teach them about division. Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz"

## Fizz buzz Implementation

Simple python program which iterates the integers from 1 to 50. For multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz"

## Usage

Download it by clicking the green download button here on Github. You only need to parse argument of range you the divisible by 3, 5 and both.
```bash
python main.py --range 50

or

python main.py -r 50
```

## Output

![capture](https://user-images.githubusercontent.com/47944792/53887007-584fef00-4047-11e9-840e-cddb2e081210.PNG)

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# Obverse

## Overview

Obverse is a library and style guide which makes developing good protractor tests easier.  This is accomplished by rigid enforcement of test rig quality, and logging quality.  There are 2 major components to accomplishing these goals, A chrome plugin which enforces test rig quality, and a testing library which enforces logging quality.

## Separation of Concerns

The goal of testing in Obverse is to separate automated tests into 3 categories basted on how robust or fragile they are:

* Test Rig (brittle, low development time)
* Test Scripts (somewhat robust, medium development time)
* Test Data (robust, long development time)

The goal of the software is to provide tools and style conventions that leverage this separation to make maintaining tests easier.  A style guide is included for how to build test-data that is completely isolated from changes to the test, allowing them to be extremely robust.  A logging library for test scripts allows tests simplifies the debugging process, allowing for a quick updating process and flexible tests.  A test rig is build automatically from data collected by a chrome extension, reducing the time required to build and update test rigs which alleviates problems with their fragility.

## API guide

An API guide is provided for using the testing library.  It is recommended to also read the style guide, which will go into details about why the API is built the way that it is.

## Style guide

The style guide provides examples and explanations for Obverse testing.  These examples will outline the benefits of writing tests with the separation of concerns mentioned above, as well as examples of how to achieve separation in a variety of scenarios.

repository: Isaak-Malers/obverse

repo_name: Isaak-Malers/obverse


text:
# satosw
SailArena To SailWave converter.

You can run the scrip through htmlpreview.github.io using the link:

https://htmlpreview.github.io/?https://github.com/herrspade/satosw/blob/main/index.html

... or you can donwload the the index.html to your filesystem and run it in you browser with file->Open

repository: herrspade/satosw

repo_name: herrspade/satosw


text:
%{
 type: "multi-choice"
}

---
## Natural Disasters Impact Supply Chain
Hurricane Maria devastated Puerto Rico in September, 2017
which had a large impact on the island's
largest export - pharmaceuticals and medical devices.

The hurricane resulted in Lack of electricity and physical damage to a major supplier
of saline bags; which in turn resulted in a nationwide shortage
lasting more than a year.

Reference: https://conservancy.umn.edu/bitstream/handle/11299/216534/Lessons%20from%20a%20Hurricane-%20Supply%20Chain%20Resilience%20in%20a%20Disaster.pdf?sequence=1&isAllowed=y

# Question:
Which of these was a supply chain impact of Hurricane Maria?

## Answers
- surplus of medical devices
* shortage of saline bags in hospitals all over the US for almost a year
- shortage of cybersecurity experts
- surplus of cybersecurity experts

## Score
- Right:25
- Wrong:5

## Powerup
fixvuln

repository: diangamichael/quizquadaminos

repo_name: diangamichael/quizquadaminos


text:
[![API](https://img.shields.io/badge/API-7%2B-brightgreen.svg)](https://android-arsenal.com/api?level=7)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)

### [中文文档](https://github.com/CodeXiaoMai/EnvironmentSwitcher/blob/master/README_CN.md)

# Environment Switcher

Environment Switcher is a tool for switching environments in one-click process using the principles of Java annotation, APT, Reflection, and Proguard during the development and testing of Android.

### Feature

- Easy to configure
- Safe, does not leak test environment url
- Switch environments with one click without repackaging
- Support configuration and switching environment by module
- Support for callbacks when the environment switches
- Automatically generate `toggle` `save` `get` logic for the environment
- Decoupling from the project
- ......

### Environment Switcher VS Gradle

Now you might think: "These functions I can do with Gradle, why use Environment Switcher?" Let's compare Environment Switcher and Gradle.

|Compare content|Environment Switcher|Gradle with different Application Id| Gradle with same Application Id|
|:-:|:--:|:--:|:--:|
|Switch environment at runtime|✔|✖|✖|
|Callback when switching environment|✔|✖|✖|
|Switching environment logic|Automatic generated|Need to implement by yourself|Need to implement by yourself|
|Number of n environment packages| 1 | n | n|
|Install multiple sets of environments at the same time|✔|✔|✖|
|Payment and other SDK package name verification|✔|✖|✔|
|Multi-module environment configuration|✔|✔|✔|
|Do not leak test environment url|✔|✔|✔|
|……|——|——|——|

### Instruction manual

1. Configuring the project's build.gradle

 Lastest Version：

 module|environmentswitcher|environmentswitcher-compiler|environmentswitcher-compiler-release
:---:|:---:|:---:|:---:
version|[ ![Download](https://api.bintray.com/packages/xiaomai/maven/environmentswitcher/images/download.svg) ](https://bintray.com/xiaomai/maven/environmentswitcher/_latestVersion) | [ ![Download](https://api.bintray.com/packages/xiaomai/maven/environmentswitcher-compiler/images/download.svg) ](https://bintray.com/xiaomai/maven/environmentswitcher-compiler/_latestVersion) | [ ![Download](https://api.bintray.com/packages/xiaomai/maven/environmentswitcher-compiler-release/images/download.svg) ](https://bintray.com/xiaomai/maven/environmentswitcher-compiler-release/_latestVersion)

 - java project

 ```
 dependencies {
         ...
         implementation "com.xiaomai.environmentswitcher:environmentswitcher:$version"
         debugAnnotationProcessor "com.xiaomai.environmentswitcher:environmentswitcher-compiler:$version"
         releaseAnnotationProcessor "com.xiaomai.environmentswitcher:environmentswitcher-compiler-release:$version"
 }
 ```

 - kotlin project

 ```
 apply plugin: 'kotlin-kapt'
 ...
 dependencies {
	     ...
	     implementation "com.xiaomai.environmentswitcher:environmentswitcher:$version"
	     kaptDebug "com.xiaomai.environmentswitcher:environmentswitcher-compiler:$version"
	     kaptRelease "com.xiaomai.environmentswitcher:environmentswitcher-compiler-release:$version"
 }
 ```

2. Write the EnvironmentConfig file

    **This class is the core code that the Environment Switcher relies on. All the logic that gets and modifies the environment will be automatically generated based on the classes and properties of the class marked with the `@Module` and `@Environment` annotations.**

    > Note: If you are using Kotlin in your project, write EnvironmentConfig in the Java language, just as you must write the Entity class in the Java language in GreenDao.

    ```
    /**
     * Environment configuration class</br>
     *
     * ⚠ It is not recommended to reference any subclasses and member variables in the class.
     * Once the properties of the informal environment are referenced,
     * the Proguard tool will not remove the class when it is packaged,
     * causing the test url to leak.</br>
     *
     * Environment Switcher will automatically hide the test environment url when compiling the Release version.</br></br>
     *
     * It is recommended that all classes or member variables in this class that are decorated with {@link Module} and {@link Environment} be privately decorated.</br>
     * The Environment Switcher automatically generates the corresponding Module_XX and Environment_XX static constants during compilation.</br>
     * For example: EnvironmentSwitcher.MODULE_APP can get all the corresponding environments under the App module.</br>
     */
    public class EnvironmentConfig {

        /**
         * The entire app environment
         */
        @Module
        private class App {
            @Environment(url = "https://gank.io/api/", isRelease = true)
            private String online;
        }

        /**
         * Special module Music environment
         */
        @Module
        private class Music {
            @Environment(url = "https://www.codexiaomai.top/api/", isRelease = true)
            private String online;

            @Environment(url = "http://test.codexiaomai.top/api/")
            private String test;
        }

        /**
         * Special module News environment
         */
        @Module
        private class News {
            @Environment(url = "http://news/release/", isRelease = true)
            private String release;

            @Environment(url = "http://news/test/")
            private String test;

            @Environment(url = "http://news/test1/")
            private String test1;

            @Environment(url = "http://news/sandbox/")
            private String sandbox;
        }
    }
    ```

    - @Module

		A class or interface decorated with {@link Module} represents a module that automatically generates the getXXEnvironment() and setXXEnvironment() methods of the corresponding module at compile time. A class or interface decorated with {@link Module} can have n (n>0) attributes modified by {@link Environment}, indicating that there are n environments in the module.

      For example, in the above code, there are three classes modified by `@Module`, which means there are three modules, of which only one attribute in the App module is decorated with `@Environment`, indicating that the module has only one environment; and Music and News There are 2 and 4 environments in the module.

      In addition, `@Module` also has an optional attribute `alias` that specifies the alias of the module. This value defaults to an empty string. The main purpose of this property is to display the Chinese name on the Switch Environment UI page. For example, the Music and News modules will display “音乐” and “新闻” respectively in the Switch Environment page.

      > Note: If all the modules in your project share the same Host url, you only need to configure one Module.

    - @Environment

		An attribute marked by {@link Environment} represents an environment，Specific address of the current environment, you must specify a specific value. There are also two optional attributes: `isRelease` and `alias`.

       - isRelease

         By default, false is returned. When true is returned, the current {@link Environment} is the default environment for the {@link Module} and the environment when the app was officially released. **There must be one and only one {@link Environment} of isRelease in a {@link Module} with a value of true,
otherwise the compilation will fail.**

         For example, there are two environments in the Music module: online (formal) and test (test), because online isRelease = true, so it is the default environment and the environment when the app is officially released.

       - alias

         Similar to alias in `@Module`, it is used to display the name of the environment in the UI page of the switching environment. The value defaults to an empty string. If a non-empty string is specified for it, the name of the environment is specified as the value of alias.

     > **Re-emphasize**: There must be one and only one Environment's isRelease value in a Module, otherwise the compilation will fail.

3. Click "Build" -> "Rebuild Project" in the menu bar and wait for the compilation to complete.

    Now that the configuration is complete, you can enjoy it！

### Add the entry for EnvrionmentSwtichActivity

The manual switching environment must have an interactive page. The Environment Switcher has been automatically integrated. You only need to add an entry (this entry is recommended only for internal versions such as Debug tests).

For example: on the "My" page.

```
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
	...
	if (!BuildConfig.DEBUG) {
		// only show in debug
		findViewById(R.id.bt_switch_environment).setVisibility(View.GONE);
		return;
	}

	findViewById(R.id.bt_switch_environment).setOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View view) {
			// entrance of switch environment
			EnvironmentSwitchActivity.launch(getContext());
		}
	});
}
```

You can use the `EnvironmentSwitchActivity.launch(getContext())` method already provided by Environment Switcher to start it; of course you can also start it with `startActivity(newContext(getContext(), EnvironmentSwitchActivity.class))`.It depends on you.

### Get the environment url of the corresponding module：

```
String appEnvironment = EnvironmentSwitcher.getAppEnvironment(this, BuildConfig.DEBUG);
String musicEnvironment = EnvironmentSwitcher.getMusicEnvironment(this, BuildConfig.DEBUG);
String newsEnvironment = EnvironmentSwitcher.getNewsEnvironment(this, BuildConfig.DEBUG);
```

### Get the environment entity class of the corresponding module(since 1.4)：

```
EnvironmentBean appEnvironmentBean = EnvironmentSwitcher.getAppEnvironmentBean(this, BuildConfig.DEBUG);
EnvironmentBean musicEnvironmentBean = EnvironmentSwitcher.getMusicEnvironmentBean(this, BuildConfig.DEBUG);
EnvironmentBean newsEnvironmentBean = EnvironmentSwitcher.getNewsEnvironmentBean(this, BuildConfig.DEBUG);
```

It should be noted here that the environment of the corresponding module requires two parameters. The first one is just a `Context`. There is no need to explain more, because Environment Switcher uses SharedPreferences to store data. The second parameter is a boolean value. If it is true, it is currently the internal version used for Debug or test. The url obtained at this time is the url saved after we manually switch the environment. If it is false, it is currently released. The version used for the user. The url obtained at this time is the address we specified `isRelease = true` in `@Environment`, and the environment url manually switched is no longer valid.

### AddOnEnvironmentChangeListener

Environment Switcher supports switching environment callbacks. You can add them by the following methods. **Note that you should not forget to remove the listener event when you don't need to listen for environment switching events**.

```
public class MainActivity extends AppCompatActivity implements OnEnvironmentChangeListener{

    private static final String TAG = "MainActivity";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        EnvironmentSwitcher.addOnEnvironmentChangeListener(this);
    }

    @Override
    public void onEnvironmentChanged(ModuleBean module, EnvironmentBean oldEnvironment, EnvironmentBean newEnvironment) {
        Log.e(TAG, module.getName() + "oleEnvironment=" + oldEnvironment.getName() + "，oldUrl=" + oldEnvironment.getUrl()
         + ",newNevironment=" + newEnvironment.getName() + "，newUrl=" + newEnvironment.getUrl());
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        EnvironmentSwitcher.removeOnEnvironmentChangeListener(this);
    }
}
```

### Switch the SDK Environment

We generally rely on SDKs provided by third parties in the project, and these SDKs also provide a test environment. If you want to switch environments in the app, you can't use the above method. What should I do?

For example, our "live" module is a referenced SDK, we can do like this:

1. First configure the "live" module in EnvironmentConfig.java

   ```
   public class EnvironmentConfig {
        private class Live {
            @Environment(url = "online", isRelease = true)
            private String online;

            @Environment(url = "test")
            private String test;
        }
   }
   ```
   > The url is only used to distinguish the environment here, not the real url, but to ensure that the url of each environment in the same module is different.

2. Add a listener to the Application

   ```
   EnvironmentSwitcher.addOnEnvironmentChangeListener(new OnEnvironmentChangeListener() {
        @Override
        public void onEnvironmentChanged(ModuleBean module, EnvironmentBean oldEnvironment, EnvironmentBean newEnvironment) {
           if (module.equals(EnvironmentSwitcher.MODULE_LIVE)) {
               if (newEnvironment.equals(EnvironmentSwitcher.LIVE_ONLINE_ENVIRONMENT)) {
                 // Call the SDK to switch the environment, the formal environment
               } else if (newEnvironment.equals(EnvironmentSwitcher.LIVE_TEST_ENVIRONMENT)) {
                 // Call the SDK to switch the environment, the test environment
               }
           }
        }
   });
   ```

	> Switch the SDK environment with Environment Switcher's environment switch callback.

## Additional

In addition to being used as an environment switching tool, Environment Switcher can also be used to make other configurable switches, such as the switch to print logs. (ps: This is not the target function of the Environment Switcher design, it is a small egg!)

```
@Module
private class Log {
    @Environment(url = "false", isRelease = true)
    private String closeLog;
    @Environment(url = "true")
    private String openLog;
}

public void loge(Context context, String tag, String msg) {
    if (EnvironmentSwitcher.getLogEnvironmentBean(context, BuildConfig.DEBUG)
            .equals(EnvironmentSwitcher.LOG_OPENLOG_ENVIRONMENT)) {
        android.util.Log.e(tag, msg);
    }
}
```

Of course, just to give a simple example, the Environment Switcher can do much more than that. More features are welcome to try.

For more information, please refer to the Sample Project, three has a detailed implementation of Environment Switcher combined with Retrofit.

## Update log

### 2018.12.12 release v1.5.3

- [bugfix] [#12 将 SharedPreferences 的写入方法由 apply 替换为 commit](https://github.com/CodeXiaoMai/EnvironmentSwitcher/issues/12)

### 2018.11.9 release v1.5.2

- [bugfix] [#8](https://github.com/CodeXiaoMai/EnvironmentSwitcher/issues/8)

### 2018.11.9 release v1.5.1

- [bugfix] [#7](https://github.com/CodeXiaoMai/EnvironmentSwitcher/issues/7)

### 2018.9.6 release v1.5

- [bugfix] [#3 fix bug Can't get the right environment in the callback](https://github.com/CodeXiaoMai/EnvironmentSwitcher/issues/3)
- [update] The "onEnvironmentChange" method name is changed to "onEnvironmentChange`d`
"

### 2018.9.2 release v1.4

- [new] Add ModuleBean and EnvironmentBean static constants in EnvironmentSwitcher
- [update] Callback method in the OnEnvironmentChangeListener interface
	- before 1.3：

		```
		EnvironmentSwitcher.addOnEnvironmentChangeListener(new OnEnvironmentChangeListener() {
			@Override
			public void onEnvironmentChange(String module, String oldUrl, String newUrl) {
				Log.e(TAG, module + "oldUrl=" + oldUrl + ",newUrl=" + newUrl);
			}
		});
		```

	- 1.4 changed：

		```
		EnvironmentSwitcher.addOnEnvironmentChangeListener(new OnEnvironmentChangeListener() {
			@Override
			public void onEnvironmentChange(ModuleBean module, EnvironmentBean oldEnvironment, EnvironmentBean newEnvironment) {
				Log.e(TAG, module.getName() + "oldEnvironment=" + oldEnvironment.getName() + "，oldUrl=" + oldEnvironment.getUrl() + ",newNevironment=" + newEnvironment.getName() + "，newUrl=" + newEnvironment.getUrl());
			}
		});
		```

# Principle analysis

[Click to view Environment Switcher principle analysis](https://www.jianshu.com/p/190710a846b9)

# LICENSE

> Copyright (c) 2018 XiaoMai
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: CodeXiaoMai/EnvironmentSwitcher

gha_language: Java

repo_name: CodeXiaoMai/EnvironmentSwitcher


text:
# Example of using hocForm

First, install this demo by running `yarn` or `npm install`. Then, run the project through `yarn start` if you’re using **yarn** or `npm run start` if you prefer **npm**.

Running those lines will open a tab in your web browser! 🚀

repository: ankit-github/hoc-form

repo_name: ankit-github/hoc-form


text:
{{#template name="blaze-step03"}}

# Storing tasks in a collection

Collections are Meteor's way of storing persistent data. The special thing about collections in Meteor is that they can be accessed from both the server and the client, making it easy to write view logic without having to write a lot of server code. They also update themselves automatically, so a template backed by a collection will automatically display the most up-to-date data.

Creating a new collection is as easy as calling `MyCollection = new Mongo.Collection("my-collection");` in your JavaScript. On the server, this sets up a MongoDB collection called `my-collection`; on the client, this creates a cache connected to the server collection. We'll learn more about the client/server divide in step 12, but for now we can write our code with the assumption that the entire database is present on the client.

Let's update our JavaScript code to get our tasks from a collection instead of a static array:

```js
// simple-todos.js
Tasks = new Mongo.Collection("tasks");

if (Meteor.isClient) {
  // This code only runs on the client
  Template.body.helpers({
    tasks: function () {
      return Tasks.find({});
    }
  });
}
```

When you make these changes to the code, you'll notice that the tasks that used to be in the todo list have disappeared. That's because our database is currently empty — we need to insert some tasks!

### Inserting tasks from the console

Items inside collections are called _documents_. Let's use the server database console to insert some documents into our collection. In a new terminal tab, go to your app directory and type:

```bash
meteor mongo
```

This opens a console into your app's local development database. Into the prompt, type:

```js
db.tasks.insert({ text: "Hello world!", createdAt: new Date() });
```

In your web browser, you will see the UI of your app immediately update to show the new task. You can see that we didn't have to write any code to connect the server-side database to our front-end code — it just happened automatically.

Insert a few more tasks from the database console with different text. In the next step, we'll see how to add functionality to our app's UI so that we can add tasks without using the database console.

{{/template}}

repository: jbaxleyiii/tutorials

repo_name: jbaxleyiii/tutorials


text:
# Password Locker
An application to store and generate passwords
# By Cliff Nyendwe Esisari

# Description
Password Locker is an application that allows one to generate and store passwords for various accounts.

Download program files at:https://github.com/cliffnyendwe/Password-Locker.git

# Setup/Installation Requirements

* Open the webpage (https://github.com/cliffnyendwe/Password-Locker.git) and download the project.
*  Open it on your terminal.
*  Once you run the account.py file you'll be greeted with the option to add an account.
*  Add your password locker account and secure it with a strong password.
*  You can now log in to the account you just created and start using the password locker to create and     generate password for your various accounts.

# Specifications

* To create a password locker account with details - just fill in the details.
* Store existing login credentials. For example, email account credentials.
* Generate a password for a new credential/account. For example, let's assume that you have not yet signed up for an email account, you can generate a password that you will use when you sign up for an Instagram account.
* Copy credentials to the clipboard.
* Dictate the length of the password to generate.

# Technologies
* Python - To create program

# Github-link
https://github.com/cliffnyendwe/Password-Locker.git

# Motivation
To make it easy for people to generate their accounts and passwords

# Prerequisites
You will need the following things properly installed on your computer.
* vs code
* git
* github

# Contacts
To find me, use<EMAIL_ADDRESS>0710755176

# License
The project is under license by MIT

repository: cliffnyendwe/Password-Locker

repo_name: cliffnyendwe/Password-Locker


text:
# Keel - automated Kubernetes deployments for the rest of us - DEPRECATED

 **This chart is deprecated! You can find the new chart in:**
 - **Source:** https://github.com/keel-hq/keel/tree/master/chart/keel
 - **Charts repository:** https://charts.keel.sh

* Website [https://keel.sh](https://keel.sh)
* User Guide [https://keel.sh/user-guide/](https://keel.sh/user-guide/)

Keel is a tool for automating [Kubernetes](https://kubernetes.io/) deployment updates. Keel is stateless, robust and lightweight.

Keel provides several key features:

* __[Kubernetes](https://kubernetes.io/) and [Helm](https://helm.sh) providers__ - Keel has direct integrations with Kubernetes and Helm.

* __No CLI/API__ - tired of `***ctl` for everything? Keel doesn't have one. Gets job done through labels, annotations, charts.

* __Semver policies__ - specify update policy for each deployment/Helm release individually.

* __Automatic [Google Container Registry](https://cloud.google.com/container-registry/) configuration__ - Keel automatically sets up topic and subscriptions for your deployment images by periodically scanning your environment.

* __[Native, DockerHub and Quay webhooks](https://keel.sh/user-guide/triggers/#webhooks) support__ -  once webhook is received impacted deployments will be identified and updated.

*  __[Polling](https://keel.sh/user-guide/#polling-deployment-example)__ - when webhooks and pubsub aren't available - Keel can still be useful by checking Docker Registry for new tags (if current tag is semver) or same tag SHA digest change (ie: `latest`).

* __Notifications__ - out of the box Keel has Slack and standard webhook notifications, more info [here](https://keel.sh/user-guide/#notifications)

**Note**: For now Keel gets installed into `kube-system` _namespace_ by default as where Helm's `Tiller` is installed.

## Installing the Chart with Kubernetes provider support

Docker image _polling_ and _Kubernetes_ provider are set by default, then Kubernetes _deployments_ can be upgraded when new Docker image is available:

```console
helm upgrade --install keel stable/keel"
```

## Installing the Chart with Helm provider support

Docker image _polling_ is set by default, but we need to enable _Helm provider_ support, then Helm _releases_ can be upgraded when new Docker image is available:

```console
helm upgrade --install keel stable/keel --set helmProvider.enabled="true"
```

### Setting up Helm release to be automatically updated by Keel

Add the following to your app's `values.yaml` file and do `helm upgrade ...`:

```
keel:
  # keel policy (all/major/minor/patch/force)
  policy: all
  # trigger type, defaults to events such as pubsub, webhooks
  trigger: poll
  # polling schedule
  pollSchedule: "@every 3m"
  # images to track and update
  images:
    - repository: image.repository # it must be the same names as your app's values
      tag: image.tag # it must be the same names as your app's values
```

The same can be applied with `--set` flag without using `values.yaml` file:

```
helm upgrade --install whd webhookdemo --reuse-values \
  --set keel.policy="all",keel.trigger="poll",keel.pollSchedule="@every 3m" \
  --set keel.images[0].repository="image.repository" \
  --set keel.images[0].tag="image.tag"
```

You can read in more details about supported policies, triggers and etc in the [User Guide](https://keel.sh/user-guide/).

Also you should check the [Webhooh demo app](https://github.com/webhookrelay/webhook-demo) and it's chart to have more clear
idea how to set automatic updates.

## Uninstalling the Chart

To uninstall/delete the `keel` deployment:

```console
$ helm delete keel
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists has the main configurable parameters (polling, triggers, notifications, service) of the _Keel_ chart and they apply to both Kubernetes and Helm providers:

| Parameter                         | Description                            | Default                                                   |
| --------------------------------- | -------------------------------------- | --------------------------------------------------------- |
| `polling.enabled`                 | Docker registries polling              | `true`                                                    |
| `helmProvider.enabled`            | Enable/disable Helm provider           | `false`                                                   |
| `gcr.enabled`                     | Enable/disable GCR Registry            | `false`                                                   |
| `gcr.projectID`                   | GCP Project ID GCR belongs to          |                                                           |
| `gcr.pubsub.enabled`              | Enable/disable GCP Pub/Sub trigger     | `false`                                                   |
| `webhook.enabled`                 | Enable/disable Webhook Notification    | `false`                                                   |
| `webhook.endpoint`                | Remote webhook endpoint                |                                                           |
| `slack.enabled`                   | Enable/disable Slack Notification      | `false`                                                   |
| `slack.token`                     | Slack token                            |                                                           |
| `slack.channel`                   | Slack channel                          |                                                           |
| `slack.approvalChannel`           | Slack approval channel                 |                                                           |
| `slack.botName`                   | Slack Bot name                         |                                                           |
| `service.enable`                  | Enable/disable Keel service            | `false`                                                   |
| `service.type`                    | Keel service type                      | `LoadBalancer`                                            |
| `service.externalPort`            | Keel service port                      | `9300`                                                    |
| `webhookRelay.enabled`            | Enable/disable WebhookRelay integration| `false`                                                   |
| `webhookRelay.key`                | WebhookRelay key                       |                                                           |
| `webhookRelay.secret`             | WebhookRelay secret                    |                                                           |
| `webhookRelay.bucket`             | WebhookRelay bucket                    |                                                           |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

```console
$ helm install --name keel -f values.yaml stable/keel
```
> **Tip**: You can use the default [values.yaml](values.yaml)

repository: cloudnativeapp/charts

gha_language: Mustache

repo_name: cloudnativeapp/charts


text:
### Development

- `yarn start:watch` runs the dev server to run/develop examples. You can then visit [http://localhost:8080](http://localhost:8080) in a browser. When you make changes to the source code in the `packages/ui-core/src` directory you should see the page auto-reload.
- `yarn test` will run the tests.
- `yarn test:watch --scope @instructure/ui-core` will run the tests and watch for changes to the source code. Run this if you'd like to debug tests in the browser (Chrome).
- `yarn start` will build the production version of the documentation. You can view it at [http://localhost:8001](http://localhost:8001).

Run `yarn run` to list the available commands.

### Adding components

1. Run `yarn generate` and choose a name for your component (use Pascal case, e.g. 'MyComponent').
2. Import/export your component in `packages/ui-core/src/components/index.js`.
3. Kill the server (if you had it running), and run `yarn start:watch` to pick up the new component.
4. Visit [http://<IP_ADDRESS>:8080](http://<IP_ADDRESS>:8080) in a browser. You should see your component listed in the docs.
5. Start making changes to your component (following the [guidelines](#component-guidelines)) and watch it update in the browser automatically.

### Testing

See the [testing documenation](#testing-components) for details.

### Debugging

1. Run `yarn test:watch --scope @instructure/ui-core`. This command should automatically open up the Chrome browser.
2. In Chrome click the 'Debug' button at the top of the page (you may have to scroll up).
3. Open the [Developer tools](https://developers.google.com/web/tools/chrome-devtools/debug/?hl=en) (`Command + Shift + C`).
3. Now you can add breakpoints in the test code or the component code to debug issues. (`Command + P` in the 'Sources' tab)

If you'd like to run the tests in a different browser (e.g. Firefox or Safari), you can run
`NODE_ENV=test karma start --browsers=Firefox`.

### Documentation

Please update the documentation with any changes, the code and docs should
always be in sync.

repository: AlexxNica/instructure-ui

repo_name: AlexxNica/instructure-ui


text:
CRIF Prefill Chrome Extension
==========

The unofficial [CRIF Report Generation Form Prefill](https://hub.crifhighmark.com/Inquiry/Inquiry/WebPortal.action) chrome extension. Makes your life easy by semi automating the CRIF Report generation work.

Installing
-----

Download or Clone this Git Repositiry and load as an unpacked extension.

Source Code: [https://github.com/nimeshkverma/CRIF-Chrome-Extension](https://github.com/nimeshkverma/CRIF-Chrome-Extension)

Unpacked Extension
-----

- If you downloaded the code, unzip the file.
- Open (chrome://extensions/) or select the menu `Window > Extensions`.
- Enable the developer mode at top right.
- Click `Load unpacked extension...` and select the source code folder.
- Enjoy!

Features / Description
-----

- An Empty form to be filled in order to generate a CRIF Report looks like this:

- If you have to generate the report for a significant number of times, it is real pain to input each value in each of the field. This pluggin comes handy for this particular use case.
- Using this pluggin you can Upload the data for the each of CRIF Report you have to create in the form of a [CSV in the given format](https://github.com/nimeshkverma/CRIF-Chrome-Extension/blob/master/CRIF-Input-Sample-Data.csv) and Pre Fill the data by just clicking on the next button.

Usage Instructions
-----
- After adding the Pluggin in you chrome, click on the CRIF Asst. Icon on near the top right corner of the chrome window
- Following Popup will be seen:

- Click on the 'Choose File' button and select the a CSV file with the data you want to Prefill in the format similar to [this file](https://github.com/nimeshkverma/CRIF-Chrome-Extension/blob/master/CRIF-Input-Sample-Data.csv)
- Click on the 'Submit' button to Store the CSV data into the Chromes' LocalStorage
- Click on the 'Next' button to Prefill the Data and get the following:

Issues
-----
- Code Quality needs to be improved
- Edge cases are prone to cause bugs and needs to be handled
- Code Structure needs improvement in the domain of Modularity and Decoupling
- Bundling of the complete package
- The UI of the pluggin is not impressive.

Contributing
-----

Fork at it.

repository: nimeshkverma/CRIF-Chrome-Extension

repo_name: nimeshkverma/CRIF-Chrome-Extension


text:
to write a browser plug-in that shows your personal/computer data/info via the mouse (in a browser page)
<!-- *name smartly & organize them -->
1.learn how to edit the add-on and make it work in the browser
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Your_first_WebExtension

2.write the program that makes the mouse move with info
EventListener, functions etc.
https://jsfiddle.net/jrq61r98/2/
http://netart.rocks/notes/csslayout

3.add layers (click/shake/drag/mouse stop/move...)for more info
class notes on canvas and bounce
http://netart.rocks/notes/dom

4.what kind of info (navigator,browserfingerprinting...)
https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

using a library *platform.js* to get browser's name

 * Platform.js <https://mths.be/platform>
 * Copyright 2014-2016 Benjamin Tan <https://demoneaux.github.io/>
 * Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
 * Available under MIT license <https://mths.be/mit>

repository: shuhengfu/mouse

repo_name: shuhengfu/mouse


text:
# **Selective-HCN: Selective Hypergraph Convolutional Networks for Skeleton-based Action Recognition**
This repository is the  Pytorch implementation of the Selective-HCN method.

## Main Idea

In this work, we proposed a novel **Selective Hypergraph Convolution Network**, dubbed **Selective-HCN**, which stacks two key modules: Selective-scale Hypergraph Convolution (SHC) and Selective-frame Temporal Convolution (STC). The SHC module represents the human skeleton as the graphs and hypergraphs to fully extract multi-scale information, and selectively fuse features at various scales. Instead of traditional strided temporal convolution, the STC module can adaptively select the keyframes and filter redundant frames according to the importance of the frames.

### Insight of our Selective-HCN model

1. For one thing, we propose to represent the human body as a hypergraph in order to model higher-order correlation in the skeleton without destroying the inherent spatial position properties of the joints.
2. Furthermore, in order to aggregate skeleton features on such topologies, we introduce an advanced Selective-scale Hypergraph Convolution (SHC) to fully extract multi-scale information and selectively fuse features at various scales.
3. For another, we design a Selective-frame Temporal Convolution (STC) to replace traditional strided temporal convolution. In addition to aggregating temporal features, the key of STC is that it can adaptively select the keyframes and filter redundant frames according to the importance of the frames.

### The State-of-the-art Performance

Table 1 and Table 2 show the experiment results on the NTU-RGB+D and Skeleton-Kinetics datasets. We can observe that the proposed Selective-HCN method outperforms the previous methods.

### Visualization

In order to intuitively explore multi-scale information on each joint, we visualize the feature map of the last layer of our model. The joints in the largest 30% of response magnitudes are retained. The bigger the blue circle, the more important the joint. It is clear that our proposed Selective-HCN model focuses more on the action-related joints and selectively extracts higher-order information from multiple scales.

## Installation and Requirements

### Installation

- Python 3.7
- PyTorch 1.4.0
- PyYAML
- tqdm
- TensorboardX

### Data Preparation

 - Download the raw data from [NTU-RGB+D](https://github.com/shahroudy/NTURGB-D) and [Skeleton-Kinetics](https://github.com/yysijie/st-gcn).

### Training & Testing
*[Note]: Change the configuration file as appropriate to your specific needs.*

 - >Training
   - spatial joint-bone stream

      `python main.py --config ./config/ntu-cross-view/train_joint.yaml`

      `python main.py --config ./config/ntu-cross-view/train_bone.yaml`
    - motion joint-bone stream

      `python main.py --config ./config/ntu-cross-view/train_joint_motion.yaml`

      `python main.py --config ./config/ntu-cross-view/train_bone_motion.yaml`
 - >Testing
   - spatial joint-bone stream

      `python main.py --config ./config/ntu-cross-view/test_joint.yaml`

      `python main.py --config ./config/ntu-cross-view/test_bone.yaml`
    - motion joint-bone stream

      `python main.py --config ./config/ntu-cross-view/test_joint_motion.yaml`

      `python main.py --config ./config/ntu-cross-view/test_bone_motion.yaml`

 - >Combining the generated scores with:

    - Combining 4 streams

      `python ensemble.py`


text:
# Resin-bundle-resolve

**DEPRECATED -- This module has been deprecated; please use [balena-compose](https://github.com/balena-io-modules/balena-compose) instead.**

Resolve resin bundles into a format recognised by the docker daemon.
`resin-bundle-resolve` is written in typescript.

## What is a resin bundle?
A resin bundle is a tar archive which contains a type of
Dockerfile and metadata used to create a Dockerfile proper,
which docker can understand.

## Which bundles are supported

Currently default resolvers included are;
* Dockerfile.template
   * Resolve template variables with metadata, currently supported:
       * `%%RESIN_MACHINE_NAME%%`
       * `%%RESIN_ARCH%%`
       * `%%BALENA_MACHINE_NAME%%`
       * `%%BALENA_ARCH%%`
* Architecture Specific Dockerfiles
   * Choose the correct Dockerfile for a given build architecture or device type
* Standard Dockerfile projects

## How do I add a resolver?
`resin-bundle-resolver` supports the adding of generic resolvers, by
implementing the `resolver.d.ts` interface in `./src`. Examples of this
can be found in the `src/resolvers/` directory.

Your resolvers can then be passed to the `resolveBundle` function.

## What is the input and output?
`resin-bundle-resolver` takes a tar stream and outputs a tar stream,
which can be passed to the docker daemon or further processed.

repository: balena-io-modules/resin-bundle-resolve

repo_name: balena-io-modules/resin-bundle-resolve


text:
---
name: Add or update team membership for a user
example: octokit.rest.teams.addOrUpdateMembershipForUserInOrg({ org, team_slug, username })
route: PUT /orgs/{org}/teams/{team_slug}/memberships/{username}
scope: teams
type: API method
---

# Add or update team membership for a user

Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.

 For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."

An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.

If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.

**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`.

```js
octokit.rest.teams.addOrUpdateMembershipForUserInOrg({
  org,
  team_slug,
  username,
});
```

## Parameters

      name
      required
      description

org	yes

The organization name. The name is not case sensitive.

team_slug	yes

The slug of the team name.

username	yes

The handle for the GitHub user account.

role	no

The role that this user should have in the team.

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user).


text:
[![ChilPass](https://drive.google.com/uc?export=view&id=10R4nb1ZLLNRXWLcEufRF-FLm8Tk6KLS7)](https://github.com/HansWilter/ChilPass/releases/latest)

[Download Windows Application](https://github.com/HansWilter/ChilPass/releases/latest)

ChilPass is a password management application that utilizes offline database systems, PBKDF2 key derivation, SHA-256 hashing, and AES encryption.

Developed by: Jonathan Cho and Hans Wilter

## Key Features
- SQLite offline Server-less Database Files for password storage
- Utilizes PBKDF2 for encryption key derivation
- PBKDF2 and SHA-256 for master password hash
- AES encryption for storing password entries
- Random password generation

## Contact Us
Jonathan Cho
<EMAIL_ADDRESS>
Hans Wilter
<EMAIL_ADDRESS>
## Disclaimer
The ChilPass application is only intended to be used for educational purposes, do not use ChilPass to store private or sensitive information. ChilPass has not gone through the extensive testing of industry security applications, therefore, do not use the ChilPass application in place of an established password management application.

repository: HansWilter/ChilPass

repo_name: HansWilter/ChilPass


text:
---
title: "第七景：蝌學泳池"
date: 2021-04-04T14:46:10+06:00
description: "平等國小是一座小型的山區學校，但麻雀雖小五臟俱全，擁有一座三個水道的露天游泳池，是學生學習游泳的好地方。"
type: "featured"
image: "images/uploads/Sight/Sight07.jpg"
---

臺北市士林區平等國民小學校園美景系列

平等十景之第七景

第七景游泳池-蝌學泳池

平等國小是一座小型的山區學校，但麻雀雖小五臟俱全，擁有一座三個水道的露天游泳池，是學生學習游泳的好地方。

平等的游泳池相當特別，首先是採用山區的簡易自來水，也就是山泉水，因此水質相當純淨。其次是與環境的友善，因為是露天的游泳池，所以每年在秋冬季低溫時，會暫停使用六個月。而這段人不使用的期間，平等的游泳池就相當大方的給動物們使用，而使用最多的就是在地的物種-蝌蚪。在這六個月中滿池的蝌蚪，帶給平等無限生機，而蝌蚪成長後成為地青蛙，更成為校園中的生力軍，每天鳴叫為學校加油。

平等游泳池在多年後的整修，我們將友善環境的元素-蝌蚪，與教育學習的本質-學生，做一個緊密的結合，因此命名為成為「蝌學泳池」。另外，在泳池外的壁面，巧妙地融入校本課程的鵝尾山步道，和學生學習游泳的方式，與校園常見的蛙類QRCode等，希望學生能更加快樂的在「蝌學泳池」中學習。「蝌學泳池」是個很特別的地方，歡迎有大家有空來看看，平等的「蝌學泳池」歡迎大家喲。

![](../images/post-img.jpg)

Taipei Municipal Pingdeng Elementary School Beautiful Campus Landscape Series

The Seventh Pingdeng Sight of the Ten

Seven:  Swimming Pool – Tadpole Study Pool

Even though Pingdeng Elementary School is small and resides in the mountain, it has a variety of facilities. For example, it is equipped with an open-air swimming pool with three waterways, which is a good place for students to learn to swim.

The swimming pool in Pingdeng is quite special. Firstly, it simply uses tap water from the mountains, which is the spring water, so the water quality is quite pure. Secondly, it is environmentally friendly. Because it is an outdoor open swimming pool, it will be closed for six months every year when the weather is cold in the autumn and winter. During this period of non-use, the Pingdeng swimming pool is generously shared with the animals, and the most frequent species user of the area is the tadpole. In the past six months, the hustle and bustle of the pool has brought Pingdeng an infinite vitality, and when the tadpole grows up, it becomes a land frog, and they become a new force on the campus. Every day, the frogs are called to cheer for the school.

After the renovation of the Pingdeng swimming pool for many years, we have made a synergistic combination of the elements of a friendly environment and the essence of education and learning, so we named it a “Tadpole Study Pool”. In addition, on the wall outside the pool, the Goose's Hill Trail— which is a clever integration of the school-based curriculum, the way students learn to swim, and the common frog QRCode on campus— embodies the hope that students can learn more in the “learning pool”. The "Tadpole Study Pool" is a very special place. The Pingdeng "Tadpole Study Pool" welcomes you to have a look at it.


text:
## Description

*What does this PR fix or add?*

## Steps to reproduce

*If this PR solves a bug, include a short summary of the bug and the steps to reproduce it.*

---

Closes #X (*Associated GitHub issue, if any*)

[#taskid X](https://wiris.kanbanize.com/ctrl_board/2/cards/X/details/) (*Associated Kanbanize card, if any*)

repository: wiris/html-integrations

branch_name: refs/heads/stable

gha_language: JavaScript

repo_name: wiris/html-integrations


text:
---
layout: post
title:  "Dueling Shadows"
date:   2017-01-01
source: Dark Arts Player's Companion
tags: [bard, warlock, wizard, cantrip, transmutation, hb, fan]
---

**Transmutation cantrip**

**Casting Time**: 1 action

**Range**: 60 feet

**Components**: V, S

**Duration**: Instantaneous

Choose two creatures within range that are within 5 feet of each other. Each target must succeed on a Dexterity saving throw or take 1d4 necrotic damage as their shadows lash out at each other. If one of the creatures moves before the start of your next turn, both targets must repeat the saving throw as the shadows lash out again, dealing another 1d4 necrotic damage.

The spell's damage increases by 1d4 when you reach 5th level (2d4), 11th level (3d4), and 17th level (4d4).

repository: Teamdael/spellbook

repo_name: Teamdael/spellbook


text:
<!-- Source: https://github.com/kiloforce/markdowntest/README.md -->

# This is an h1 level tag
## This is an h2 level tag
###### This is an h6 level tag

<!-- This is a
comment, has to be on a new line! -->

<!-- line breaks are merged -->
Roses are Red
Violets are Blue

Text Styles:

*This text will be italic*

_This will also be italic_

**This text will be bold**

__This will also be bold__

___This will be combined bold and italic___

***This will also be combined bold and italic***

Unordered Lists:

* Item 1
* Item 2
  * Item 2a
  * Item 2b

Ordered Lists:
<!-- make sure to have a line seperation -->

1. Item 1
2. Item 2
3. Item 3
   * Item 3a
   * Item 3b

Images:
![GitHub Logo](http://icons.iconarchive.com/icons/icons-land/vista-hardware-devices/256/Hardware-Chip-icon.png)
Format: ![Alt Text](http://icons.iconarchive.com/icons/icons-land/vista-hardware-devices/256/Hardware-Chip-icon.png)

Links:
http://github.com - automatic!
[GitHub](http://github.com)

Blockquotes:
As Kanye West said:

> We're living the future so
> the present is our past.

Syntax highlighting:
```javascript
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}
```

```
This is how you do
preformatted text
   XX
 XX  XX
```

Here is a Python code example
without syntax highlighting:

<!-- Make sure to have 4 spaces in front -->
    def foo:
      if not bar:
        return true

`
I am in a box, but I am not preformatted
  XX
XX  XX
`

Task Lists:
- [ ] a task list item
- [ ] list syntax required
- [ ] normal **formatting**,
      @mentions, #1234 refs
- [ ] incomplete
- [x] completed

I think you should use an
`<addr>` element here instead.

repository: kiloforce/markdowntest

repo_name: kiloforce/markdowntest


text:
---
title: taterzens command
---

# `taterzens` command

---

## What does it do?

This command is intended for admins-only.

It allows to reload / edit the [config file](../../installation/config.md).

repository: samolego/Taterzens

repo_name: samolego/Taterzens


text:
# `caches`

`caches` is a Ruby gem, providing a small collection of caches with good performance and hash-like access patterns. Each is named for its cache expiration strategy - when it will drop a key.

[![Build Status](https://travis-ci.org/nathanl/caches.svg?branch=master)](https://travis-ci.org/nathanl/caches)
[![Code Climate](https://codeclimate.com/github/nathanl/caches/badges/gpa.svg)](https://codeclimate.com/github/nathanl/caches)

## Usage

`caches` provides the following classes.

### Caches::TTL

TTL (Time To Live) remembers values for as many seconds as you tell it. The default is 3600 seconds (1 hour). Sub-seconds are supported; the tests will fail if the value is too low for your machine.

```ruby
require 'caches/ttl'

h = Caches::TTL.new(ttl: 0.01)
h[:a] = 'aardvark'
h[:a] #=> 'aardvark'
sleep(0.02)
h[:a] #=> nil
```

#### Initialization Options

- With `refresh: true`, reading a value will reset its timer; otherwise, only writing will.
- With `max_keys: 5`, on insertion, it will evict the oldest item if necessary to keep from exceeding 5 keys.

#### Methods

`keys` and `values` work the same as for a hash. They **do not** check whether each key is current.

`memoize` method fetches a key if it exists and isn't expired; otherwise, it calculates the value using the block and saves it.

```ruby
h = Caches::TTL.new(ttl: 5)

# Runs the block
h.memoize(:a) { |k| calculation_for(k) }

# Returns the previously-calculated value
h.memoize(:a) { |k| calculation_for(k) }

sleep(6)

# Runs the block
h.memoize(:a) { |k| calculation_for(k) }
```

### Caches::LRU

LRU (Least Recently Used) remembers as many keys as you tell it to, dropping the least recently used key on each insert after its limit is reached. (Inserts and reads count as a usage; updates do not.)

```ruby
require 'caches/lru'
h = Caches::LRU.new(max_keys: 3)
h[:a] = "aardvark"
h[:b] = "boron"
h[:c] = "cattail"
h[:d] = "dingo"
puts h[:a] # => nil
```

## Methods Common to All Caches

- `#fetch` works like `Hash#fetch`
- `#memoize` returns the key's value, if any; if not, it gets its return value from the block, and sets the key before it returns
- `#stats` tells how many cache hits and misses have occurred
- `#clear` resets all data and stats

## Installation

Add this line to your application's Gemfile:

    gem 'caches'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install caches

## Contributing

See CONTRIBUTING.md

# Thanks

- Thanks to [FromAToB.com](http://www.fromatob.com) for giving me time to make this
- Thanks to [satyap](https://github.com/satyap); the original specs for `caches` were adapted from [volatile_hash](https://github.com/satyap/volatile_hash).

repository: nathanl/caches

repo_name: nathanl/caches


text:
Hello world.

Prerequisites:

- iOS device with iOS 11 beta or released version
- Xcode 9.0 beta or released version
- high sierra is not required

This uses the AVFoundation to grab the video feed from the camera, pick the Luma plane (black and white), cropped and resized to 224x224x8 using Accelerate/vImage (required by Resnet50 mlmodel) and finally processed in another thread using dispatch_async

All the codes are kept in the main viewcontroller ViewController.m

Results:

Screenshots

repository: shawhu/coremldemo

repo_name: shawhu/coremldemo


text:
---
layout: post
title:      "Clean Code"
date:       2019-04-03 22:51:56 +0000
permalink:  clean_code
---

Fundamentals of clean code are boring textbook knowledge albeit inevitable. Let me restate what is already or should be known:

1) Make a top-down design! Write up all classes, methods, variables and tests.
2) Pick a design pattern if you need to. This is more for Java projects.
3) Pick a methodology. Generally, it is spiral or waterfall.
4) Write test cases before implementation of methods. Yes, it is redundant and dull sometimes.
5) Limit every method to 3 lines at most. You heard me. Break larger methods into smaller ones.
6) Comments up! Comment every method you write. Don't be brief. Write up a whole paragraph. When you leave, someone else should be able to pick up where you left. That individual could be you after a couple of years. Mark my words.
7) Check scalability. They should be all linear or logarithmic. If not, why not? Can there be a better way? Can you use some heuristics? Make an effort.
8) Make sure all tests pass.
9) Version your project. Better the code at each version.

These are some guidelines for the curious. You may add more items obviously.

Life is short, let's code.


text:
# IoT data logger with Thingspeak Channel

Currently used to measure and log a solar panel's input voltage, current and power and a battery's input voltage, current and power.

Uses a LILYGO ESP32 OLED (SSD1306 at I2C pins SCK=4 and SDA=5) and two ADS1115 ADC converters at I2C pins SCK=25 and SDA=26.

TODO:
* extract config (pins, ...)
* doc


text:
---
title: Shrine 2.19.0
---

## New features

* A new `instrumentation` plugin has been added. It sends and logs events for
  various Shrine operations, and provides an API for other plugins to send and
  log their own events.

  ```rb
  Shrine.plugin :instrumentation

  uploaded_file = Shrine.upload(io, :store)
  uploaded_file.exists?
  uploaded_file.download
  uploaded_file.delete
  ```
  ```
  Metadata (32ms) – {:storage=>:store, :io=>StringIO, :uploader=>Shrine}
  Upload (1523ms) – {:storage=>:store, :location=>"ed0e30ddec8b97813f2c1f4cfd1700b4", :io=>StringIO, :upload_options=>{}, :uploader=>Shrine}
  Exists (755ms) – {:storage=>:store, :location=>"ed0e30ddec8b97813f2c1f4cfd1700b4", :uploader=>Shrine}
  Download (1002ms) – {:storage=>:store, :location=>"ed0e30ddec8b97813f2c1f4cfd1700b4", :download_options=>{}, :uploader=>Shrine}
  Delete (700ms) – {:storage=>:store, :location=>"ed0e30ddec8b97813f2c1f4cfd1700b4", :uploader=>Shrine}
  ```

  It supports [ActiveSupport::Notifications] (default) and [dry-monitor]
  notification backends out of the box.

  ```rb
  require "dry-monitor"

  Shrine.plugin :instrumentation, notifications: Dry::Monitor::Notifications.new(:test)
  ```

* Metadata extraction can now be skipped during the upload by passing
  `metadata: false` to the uploader. This is useful in tests, where you might
  want to skip any potentially expensive metadata extraction while creating
  test data.

  ```rb
  uploaded_file = uploader.upload(io, metadata: false) # skips metadata extraction
  uploaded_file.metadata #=> {}
  ```

* Metadata extraction can now be forced during the upload of a
  `Shrine::UploadedFile` object by passing `metadata: true` to the uploader.

  ```rb
  uploaded_file = uploader.upload(another_uploaded_file, metadata: true) # forces metadata extraction
  uploaded_file.metadata #=> re-extracted metadata
  ```

* The `pretty_location` plugin now supports specifying a different identifier.

  ```rb
  plugin :pretty_location, identifier: "uuid"
  # "user/aa357797-5845-451b-8662-08eecdc9f762/profile_picture/493g82jf23.jpg"

  plugin :pretty_location, identifier: :email
  #<EMAIL_ADDRESS>  ```

* The `store_dimensions` plugin has gained an `:on_error` option for specifying
  how to react when an error occurrs while extracting dimensions.

  ```rb
  plugin :store_dimensions, on_error: :warn        # prints a warning message (default)
  plugin :store_dimensions, on_error: :fail        # raises the exception
  plugin :store_dimensions, on_error: :ignore      # ignores the exception
  plugin :store_dimensions, on_error: -> (error) { # custom handler
    # report the exception to your exception handler
  }
  ```

* The `FileSystem#upload` method now accepts a `:move` option for moving the
  file instead of copying it. This is now preferred over the `moving` plugin.

  ```rb
  uploader.upload(file, move: true)
  File.exist?(file.path) #=> false
  ```

* The `FileSystem#clear!` method can now take a block for more control over
  which files should be deleted.

  ```rb
  file_system.clear! { |path| path.mtime < Time.now - 7*24*60*60 } # delete files older than 1 week
  ```

## Other improvements

* Registering storage objects under string keys now works again (this got
  broken in version 2.18.0).

* Several plugins now add their own instrumentation when the `instrumentation`
  plugin has been loaded:

  | Plugin                | Instrumentation                         |
  | :-----                | :--------------                         |
  | `derivation_endpoint` | instruments file processing             |
  | `determine_mime_type` | instruments analyzing MIME type         |
  | `store_dimensions`    | instruments extracting image dimensions |
  | `signature`           | instruments calculating signature       |
  | `infer_extension`     | instruments inferring extension         |
  | `remote_url`          | instruments remote URL downloading      |
  | `data_uri`            | instruments data URI parsing            |

* `Shrine.logger` has been added, and any warnings or other messages (such as
  from the `instrumentation` plugin) now go through it. This way you can change
  the logging destination:

  ```rb
  # log messages into the Rails logger
  Shrine.logger = Rails.logger
  ```

* The `store_dimensions` plugin now prints warnings by default when extracting
  dimensions failed.

* The `pretty_location` plugin now comes with a `#pretty_location` method which
  you can call for customization.

  ```rb
  def generate_location(io, record: nil, **context)
    identifier = record.email if record.is_a?(User)
    pretty_location(io, record: record, identifier: identifier, **context)
  end
  ```

* The `Shrine::UploadedFile#[]` operator has been added for easier metadata
  retrieving.

  ```rb
  uploaded_file.metadata["duration"]
  # can now be just
  uploaded_file["duration"]
  ```

* The `Shrine.mime_type`, `Shrine.dimensions`, and `Shrine.signature` aliases
  have been added to `determine_mime_type`, `store_dimensions`, and `signature`
  plugins.

  ```rb
  Shrine.determine_mime_type(io)
  # can now be just
  Shrine.mime_type(io)
  ```
  ```rb
  Shrine.extract_dimensions(io)
  # can now be just
  Shrine.dimensions(io)
  ```
  ```rb
  Shrine.calculate_signature(io)
  # can now be just
  Shrine.signature(io)
  ```

* The `#validate_{max,min}_dimensions` validators have been added to the
  `validation_helpers` plugin.

  ```rb
  validate_min_width  10
  validate_min_height 10
  validate_max_width  5000
  validate_max_height 5000

  # can now be written as

  validate_min_dimensions [10, 10]
  validate_max_dimensions [5000, 5000]

  # which can be additionally shortened to

  validate_dimensions [10..5000, 10..5000]
  ```

* The `#validate_size`, `#validate_width`, and `#validate_height` shorthands
  have been added to the `validation_helpers` plugin.

  ```rb
  validate_min_size 1024
  validate_max_size 10*1024*1024

  # can now be shortned to

  validate_size 1024..10*1024*1024
  ```
  ```rb
  validate_min_width 10
  validate_max_width 5000

  # can now be shortened to

  validate_width 10..5000
  ```
  ```rb
  validate_min_height 10
  validate_max_height 5000

  # can now be shortened to

  validate_height 10..5000
  ```

* The `#validate_mime_type` and `#validate_extension` shorthands have been
  added to the `validation_helpers` plugin.

  ```rb
  validate_mime_type_inclusion %w[image/jpeg image/png image/webp]
  # can now be just
  validate_mime_type %w[image/jpeg image/png image/webp]
  ```
  ```rb
  validate_extension_inclusion %w[jpeg png webp]
  # can now be just
  validate_extension %w[jpeg png webp]
  ```

* Default error messages in `validation_helpers` plugin have been simplified.

* You can now call `super` when overriding `Shrine::UploadedFile` methods
  defined by the `add_metadata` plugin.

## Backwards compatibility

* The `logging` plugin has been deprecated in favour of the `instrumentation`
  plugin.

* The `moving` pluing has been deprecated in favour of the `:move` option to
  `FileSystem#upload`. This means that the `#move` && `#movable?` methods are
  not part of the storage abstraction anymore.

* The `backup` plugin has been deprecated (a new `mirroring` plugin will get
  added in 3.0).

* The `copy` plugin has been deprecated.

* The `Shrine::Plugins::DataUri::DataFile` constant from the `data_uri` plugin
  has been renamed to `Shrine::DataFile`.

* The `Shrine::Plugins::RackFile::UploadedFile` constant from the `data_uri` plugin
  has been renamed to `Shrine::RackFile`.

* The `:older_than` option for `FileSystem#clear!` has been deprecated in
  favour of passing a block.

  ```rb
  file_system.clear!(older_than: Time.now - 7*24*60*60)
  # should now be replaced with
  file_system.clear! { |path| path.mtime < Time.now - 7*24*60*60 }
  ```

* The `FileSystem#upload` method deprecates ignoring unrecognized upload
  options.

* The `FileSystem#upload` method doesn't backfill `size` metadata anymore if an
  IO with unknown size is being uploaded via `Shrine#upload`.

* Several plugins have changed how they store configuration options internally.
  If you were accessing these options directly, you will need to update your
  code.

[ActiveSupport::Notifications]: https://api.rubyonrails.org/classes/ActiveSupport/Notifications.html
[dry-monitor]: https://github.com/dry-rb/dry-monitor

repository: shrinerb/shrine

gha_language: Ruby

repo_name: shrinerb/shrine