text:
# Punggol-Map-Development

This map uses an A* algorithm to reduce the time complexity for calculating each route. A* algorithms are build from dijkstra with enhancement using priority queue and heuristics. In order to further improve the time complexity of accessing each nodes and edges, a DOUBLE HASH table is used to achieve an O(1) complexity.
- [x] Drive
- [x] Bus
- [x] Walk
- [x] LRT

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

* Using [pip](https://pip.pypa.io/en/stable/) install:
* **These are the main dependencies, there could be other smaller dependencies such as math modules, time modules**
```
pip install django
```
```
pip install django-Leaflet
```
* Nodes and edges Files can be found in [Django\map\webmap\data](https://github.com/lusterless/Singapore-Bus-Map-Development/tree/master/Django/map/webmap/data)
```
pip install json
```
```
pip install geopy
```
* OSMnx is built on top of geopandas, networkx, and matplotlib. Please ensure that you have these dependencies installed before attempting to install OSMnx.
```
pip install osmnx
```
* If you have any trouble installing OSMnx, pip install all files [here](https://github.com/lusterless/Singapore-Bus-Map-Development/tree/master/whl) and
```
pip install geopandas
```
```
pip install networkx
```
```
pip install matplotlib
```
* Alternatively, you may read OSMnx docs [here](https://osmnx.readthedocs.io/en/stable/)

## Running the tests

Using cmd, cd "Django\map"
```
cd "Django\map"
```
Run Django-Webserver
```
python manage.py runserver
```
![capture1](https://user-images.githubusercontent.com/57383960/77459367-97abd200-6e3a-11ea-93c9-af2791d3b68f.JPG)

## Deployment

Go to your browser and enter [URL](<IP_ADDRESS>:8000/map)
```
<IP_ADDRESS>:8000/map
```

## Built With

* [Python3](https://www.python.org/downloads/) - Language used
* [Django](https://www.djangoproject.com/download/) - The web framework used
* [Django-Leaflet](https://pypi.org/project/django-leaflet/) - Web framework design
* [OSMnx](https://osmnx.readthedocs.io/en/stable/) - Used to generate graphs
* [Geopy](https://pypi.org/project/geopy/) - Reverse geocode

## Contributing

Please read [CONTRIBUTING.md](https://github.com/lusterless/Singapore-Bus-Map-Development/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

## Authors

* **Koh Kai Quan** - *Initial work* - [Lusterless](https://github.com/lusterless)
* **Sim Jacky**
* **Linus Lee Jun Wei**
* **Joel Cheong Chen Yu**
* **Yvette Ancheta Sampang**

See also the list of [contributors](CONTRIBUTING.md) who participated in this project.

## License

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


text:
# TouchKB

A Winform touch keyboard that automatically supports multiple international layouts

## Getting Started

It is a component for Windows written in C # that allows you to edit a text field using the mouse, a touch panel or the keyboard. This touch keyboard automatically changes the layout following the one set in the operating system. In the images below it is possible to view some keyboard layouts.

Italian

French

German

Spanish

Obviously almost all layouts managed by Windows are supported.

Since not all touch screens support multiple touch points, this component is capable of handling keystrokes to obtain code-points such as capital letters, numbers or punctuation symbols. For example pressing the [Shift] key the keyboard layout changes like this:

Also the [Alt-Gr] key alters keyboard layout:

Control key combinations such as [Alt-Gr] + [Shift] are also managed:

### Prerequisites

Visual Studio is required: it should also work with older versions than VS2013.

### Installation, Deployment and Usage

Just open the project in visual studio. Compile it and run to test the component. Next you can use the generated assembly or directly the component in your code.

The resulting text is in the component's Text property.

## License

This project is licensed under the "The Unlicense".

license: Unlicense

repository: gcardi/TouchKB

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: gcardi/TouchKB


text:
## Installation

Get yarn if you don’t have it already:

`npm install -g yarn`

Install dependencies:

`yarn`

### Running the dev server

`yarn dev`

### Building

`yarn export`

This will put a static version of the site in `out/`.

## Future work

* Load initial data from a file, to improve flexibility.
* Add restricted job title selection and validation.

# Palantir revisions

## Code layout

For the revised layout, we want the following:

```
---------------------------------------------
|                   Information             |
---------------------------------------------
|   Grading / Rating    |   Milestones      |
|                       |                   |
|                       |                   |
|                       |                   |
---------------------------------------------
|              Career Development           |
---------------------------------------------

```

```
-----------------------------------------------------------
| SnowflakeApp.js • CohortSelector.js • LevelSelector.js  |
-----------------------------------------------------------
|   CurrentLevel.js         |   Track.js                  |
|                           |                             |
|   TrackSelector.js        |                             |
|                           |                             |
|                           |                             |
-----------------------------------------------------------
|                   PointSummaries.js                     |
-----------------------------------------------------------
```
## Releasing

Releases should be coordinated with the Chief of Staff. PRs can be reviewed and
merged, but a release should not be made unless the changes have been reviewed
by the Chief of Staff and the release is cut in coordination with them.

There is documentation in Confluence and Google Docs that needs to be updated
anytime there is a new release.

repository: palantirnet/snowflake

branch_name: refs/heads/develop

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: palantirnet/snowflake


text:
# ADR 025: IBC Passive Channels

## Changelog

- 2020-05-23: Provide sample Go code and more details
- 2020-05-18: Initial Draft

## Status

Proposed

## Context

The current "naive" IBC Relayer strategy currently establishes a single predetermined IBC channel atop a single connection between two clients (each potentially of a different chain).  This strategy then detects packets to be relayed by watching for `send_packet` and `recv_packet` events matching that channel, and sends the necessary transactions to relay those packets.

We wish to expand this "naive" strategy to a "passive" one which detects and relays both channel handshake messages and packets on a given connection, without the need to know each channel in advance of relaying it.

In order to accomplish this, we propose adding more comprehensive events to expose channel metadata for each transaction sent from the `x/ibc/04-channel/keeper/handshake.go` and `x/ibc/04-channel/keeper/packet.go` modules.

Here is an example of what would be in `ChanOpenInit`:

```go
const (
  EventTypeChannelMeta = "channel_meta"
  AttributeKeyAction = "action"
  AttributeKeyHops = "hops"
  AttributeKeyOrder = "order"
  AttributeKeySrcPort = "src_port"
  AttributeKeySrcChannel = "src_channel"
  AttributeKeySrcVersion = "src_version"
  AttributeKeyDstPort = "dst_port"
  AttributeKeyDstChannel = "dst_channel"
  AttributeKeyDstVersion = "dst_version"
)
// ...
  // Emit Event with Channel metadata for the relayer to pick up and
  // relay to the other chain
  // This appears immediately before the successful return statement.
  ctx.EventManager().EmitEvents(sdk.Events{
    sdk.NewEvent(
      types.EventTypeChannelMeta,
      sdk.NewAttribute(types.AttributeKeyAction, "open_init"),
      sdk.NewAttribute(types.AttributeKeySrcConnection, connectionHops[0]),
      sdk.NewAttribute(types.AttributeKeyHops, strings.Join(connectionHops, ",")),
      sdk.NewAttribute(types.AttributeKeyOrder, order.String()),
      sdk.NewAttribute(types.AttributeKeySrcPort, portID),
      sdk.NewAttribute(types.AttributeKeySrcChannel, chanenlID),
      sdk.NewAttribute(types.AttributeKeySrcVersion, version),
      sdk.NewAttribute(types.AttributeKeyDstPort, counterparty.GetPortID()),
      sdk.NewAttribute(types.AttributeKeyDstChannel, counterparty.GetChannelID()),
      // The destination version is not yet known, but a value is necessary to pad
      // the event attribute offsets
      sdk.NewAttribute(types.AttributeKeyDstVersion, ""),
    ),
  })
```

These metadata events capture all the "header" information needed to route IBC channel handshake transactions without requiring the client to query any data except that of the connection ID that it is willing to relay.  It is intended that `channel_meta.src_connection` is the only event key that needs to be indexed for a passive relayer to function.

### Handling Channel Open Attempts

In the case of the passive relayer, when one chain sends a `ChanOpenInit`, the relayer should inform the other chain of this open attempt and allow that chain to decide how (and if) it continues the handshake.  Once both chains have actively approved the channel opening, then the rest of the handshake can happen as it does with the current "naive" relayer.

To implement this behavior, we propose replacing the `cbs.OnChanOpenTry` callback with a new `cbs.OnAttemptChanOpenTry` callback which explicitly handles the `MsgChannelOpenTry`, usually by resulting in a call to `keeper.ChanOpenTry`.  The typical implementation, in `x/ibc-transfer/module.go` would be compatible with the current "naive" relayer, as follows:

```go
func (am AppModule) OnAttemptChanOpenTry(
  ctx sdk.Context,
  chanKeeper channel.Keeper,
  portCap *capability.Capability,
  msg channel.MsgChannelOpenTry,
) (*sdk.Result, error) {
  // Require portID is the portID transfer module is bound to
  boundPort := am.keeper.GetPort(ctx)
  if boundPort != msg.PortID {
    return nil, sdkerrors.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", msg.PortID, boundPort)
  }

  // BEGIN NEW CODE
  // Assert our protocol version, overriding the relayer's suggestion.
  msg.Version = types.Version
  // Continue the ChanOpenTry.
  res, chanCap, err := channel.HandleMsgChannelOpenTry(ctx, chanKeeper, portCap, msg)
  if err != nil {
    return nil, err
  }
  // END OF NEW CODE

  // ... the rest of the callback is similar to the existing OnChanOpenTry
  // but uses msg.* directly.
```

Here is how this callback would be used, in the implementation of `x/ibc/handler.go`:

```go
// ...
    case channel.MsgChannelOpenTry:
      // Lookup module by port capability
      module, portCap, err := k.PortKeeper.LookupModuleByPort(ctx, msg.PortID)
      if err != nil {
        return nil, sdkerrors.Wrap(err, "could not retrieve module from port-id")
      }
      // Retrieve callbacks from router
      cbs, ok := k.Router.GetRoute(module)
      if !ok {
        return nil, sdkerrors.Wrapf(port.ErrInvalidRoute, "route not found to module: %s", module)
      }
      // Delegate to the module's OnAttemptChanOpenTry.
      return cbs.OnAttemptChanOpenTry(ctx, k.ChannelKeeper, portCap, msg)
```

The reason we do not have a more structured interaction between `x/ibc/handler.go` and the port's module (to explicitly negotiate versions, etc) is that we do not wish to constrain the app module to have to finish handling the `MsgChannelOpenTry` during this transaction or even this block.

## Decision

- Expose events to allow "passive" connection relayers.
- Enable application-initiated channels via such passive relayers.
- Allow port modules to control how to handle open-try messages.

## Consequences

### Positive

Makes channels into a complete application-level abstraction.

Applications have full control over initiating and accepting channels, rather than expecting a relayer to tell them when to do so.

A passive relayer does not have to know what kind of channel (version string, ordering constraints, firewalling logic) the application supports.  These are negotiated directly between applications.

### Negative

Increased event size for IBC messages.

### Neutral

More IBC events are exposed.

## References

- The Agoric VM's IBC handler currently [accomodates `attemptChanOpenTry`](https://github.com/Agoric/agoric-sdk/blob/904b3a0423222a1b32893453e44bbde598473960/packages/cosmic-swingset/lib/ag-solo/vats/ibc.js#L546)

repository: irisnet/cosmos-sdk

gha_language: Go

repo_name: irisnet/cosmos-sdk


text:
With the new health check in place, Envoy will check the health of each node defined within the cluster.

## Task

Start Envoy with the command:

`docker run -d --name proxy1 -p 80:8080 -v /root/:/etc/envoy envoyproxy/envoy`{{execute T1}}

Start two nodes, both start in a healthy state.

`docker run -d katacoda/docker-http-server:healthy; docker run -d katacoda/docker-http-server:healthy;`{{execute T1}}

## Testing

When sending requests to Envoy, healthy requests should be returned from the HTTP servers.

`curl localhost -i`{{execute T1}}

repository: gsoria/katacoda-scenarios

repo_name: gsoria/katacoda-scenarios


text:
# Dasyscyphus richonii (Boud.) Massee, 1901 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Urceolella richonis Boud., 1888

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Leotiomycetes/Helotiales/Hyaloscyphaceae/Dematioscypha/Dematioscypha richonis/ Syn. Dasyscyphus richonii/README.md

repo_name: mdoering/backbone


text:
# Bookr
Find your latest read - the easy way

## Getting Started
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `yarn start` - but first =>

## Prerequisites
You will need the following dependencies:

    "axios": "^0.18.0",
    "bootstrap": "^4.2.1",
    "prop-types": "^15.6.2",
    "react": "^16.7.0",
    "react-bootstrap": "^1.0.0-beta.5",
    "react-dom": "^16.7.0",
    "react-router-dom": "^4.3.1",
    "react-scripts": "2.1.3",
    "reactstrap": "^7.1.0",
    "styled-components": "^4.1.3"

## Installing
After forking, clone a copy on your machine with the git clone <repo name> CLI

Runs the app in the development mode.

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.

You will also see any lint errors in the console.

`yarn start to start the local server on port 3000 (you can change the port if necessary)`

You will be taken to the login page upon initialization

We have 3 user names for demo purposes. They are:

* nomadic
* expat
* mutiny

The password for all 3 is set to 'pass'

You may adjust these names and/or add more by manipulating the backend portion of this same repo group

After logging in, you will be taken to the main page wih a list of the books we are currently featuring. You will be shown a bried overview of the book. Simply click any book for more information including reviews. You will also be able to leave a review of your own.

If you absolutely never want to see a book again on the list, use the delete function. It will be gone forever.

## Deployment

You can see our deployment here:

https://bookrmarketing1.netlify.com/

## Built With
* HTML
* CSS
* Styled Components
* Bootstrap, with Reactstrap and react-bootstrap
* React

## Authors

* Jeremy Boggs - Scrum Master
* Dennis Orbison - Back End Developer
* Kelli Rae Hanson - Front End Developer
* Jamie Hall - Front End Developer
* Joshua Keslar - UI Developer
* Lukasz Siatka - UI Developer
* Maksim Vakarchuk - UI Developer

## License
This project is licensed under the MIT License - see the LICENSE.md file for details

## Acknowledgements

A tip of the hat to Maksim Vakarchuk who, in addition to his duties as UI developer served as the de facto UX designer for this front end build

license: MIT

repository: bw-bookr/FrontEnd

gha_license_id: MIT

repo_name: bw-bookr/FrontEnd


text:
# IBM Application Security on Cloud Bamboo Plug-in

Easily integrate security scanning with the [IBM Application Security on Cloud](https://appscan.ibmcloud.com) service into your builds running on Atlassian Bamboo.

# Prerequisites

- An account on the [IBM Application Security on Cloud](https://appscan.ibmcloud.com) service. You'll also need to [create an application](http://www.ibm.com/support/knowledgecenter/SSYJJF_1.0.0/ApplicationSecurityonCloud/ent_create_application.html) on the service and copy down its numeric ID in the browser URL. This ID will be required later on when configuring the SAST scan task.
- The plug-in has been tested to run on Bamboo server version 5.13.2 or later.
- To build the plug-in, you will need to install the [Atlassian plug-in SDK](https://developer.atlassian.com/docs/getting-started).
- You will need to setup the Static Analyzer Client Utility on your Bamboo server (to initiate scans on local agents), or on remote agent machines. For more information on obtaining the client utility, see the docs [here](http://www.ibm.com/support/knowledgecenter/SSYJJF_1.0.0/ApplicationSecurityonCloud/src_scanning.html).

# Building the Plug-in

- Navigate to the plug-in's root folder and issue the `atlas-package` command. The built plug-in JAR will be in the target folder.

# Installation and Configuration

1. Install the plug-in via the Bamboo's administration dashboard. After installing the plug-in, it will appear in the list of user installed add-ons.

   ![](https://github.com/AppSecDev/asoc-bamboo-plugin/blob/master/images/install1.png)

2. Via Bamboo's administration dashboard, add the SA Client capability to your server (for local agents), or to your remote agents. Specify the path to the Static Analyzer Client Utility.

   ![](https://github.com/AppSecDev/asoc-bamboo-plugin/blob/master/images/install2.png)

3. Enter your IBM Application Security on Cloud account username and password in Bamboo's shared credentials page.

# Adding the SAST Scan Task to your Build Plan

1. Add the SAST scan task to your build plan after your artifacts have been built. The SAST scan task will generate an intermediate representation of your artifacts and submit it to the cloud service for scanning.

   ![](https://github.com/AppSecDev/asoc-bamboo-plugin/blob/master/images/task1.png)

2. Enter information for the SAST scan task:

   ![](https://github.com/AppSecDev/asoc-bamboo-plugin/blob/master/images/task2.png)

   - Select the client utility to use from the dropdown

   - Select the credentials to use to login to the cloud service

   - Enter the ID of the application to associate your scan with

   - Optionally, specify the criteria for whether or not to fail the build when security findings are found

# Scan Results after a Build

1. The SAST scan task publishes two artifacts:

   ![](https://github.com/AppSecDev/asoc-bamboo-plugin/blob/master/images/result1.png)

   - IRX - this is the intermediate representation of your artifacts that is uploaded to the cloud service for scanning.

   - Scan Results - HTML report of the security findings that are found.

2. Messages about the outcome of the scan will also be emitted to the build log:

   ![](https://github.com/AppSecDev/asoc-bamboo-plugin/blob/master/images/result2.png)

# License

All files found in this project are licensed under the [Apache License 2.0](LICENSE).

repository: jmcalder/asoc-bamboo-plugin

repo_name: jmcalder/asoc-bamboo-plugin


text:
# Themes of Social Awareness in Lyrics, 1965-1975

Lyrics in popular music during the early 60s were largely inert, with plenty of songs about idealized love, dance fads of the day, or outright nonsense (think "Wooly Bully"). 1965 saw the assassination of Malcolm X. During the same year, regular deployment of troops began in Vietnam, known as the "start" of the war for the general population. Race riots plagued inner cities throughout the latter half of the decade. In April 1968, MLK was assasinated, and then Bobby Kennedy, one month later. The forward momentum of the Civil Rights Movement slowed to a crawl, and a general haze of disillusionment overtook any sense of hope that the world was becoming a better place. In soul music, lyrics wholly reflected this turn, with themes of isolation and entrenchment, of distrust, of taking care of your own because nobody else will.

Using [a dataset of the Billboard Year-End Hot 100 songs from 1965-1975](https://github.com/walkerkq/musiclyrics), I applied NLP, topic modeling, and clustering to see if I could tease out these emergent themes. I also used a basic recommender system to see what songs it would suggest as similar to songs known to exemplify these themes. Lyrics and assorted song info were stored in MongoDB for access via PyMongo throughout.

## Folder Contents

### Code

* **10-mongo-basic-training.ipynb**: PyMongo training steps and creation of lyrics collection
* **11-DB-formatting.ipynb**: cleaning and formatting of lyrics collection
* **20-pipeline-dev.ipynb**: first draft of entire pipeline, from cleaning of lyrics through clustering in topic space
* **21-preprocessing.ipynb**: preprocessing of lyrics, everything prior to vectorization, using functions of project module
* **22-vec-and-beyond.ipynb**: streamlined process for choosing vectorizer and topic modeling method, looking at similar songs by cosine similarity, and testing clustering algorithms
* **fletchmod.py**: module containing all necessary functions and classes for use throughout the project

### Img

Images generated for use in presentation. (At this point, there is only a sample dendrogram generated from the final topic-space vector array.)

### Pres

PDF of final presentation.

repository: davidluther/Metis-Projects

repo_name: davidluther/Metis-Projects


text:
# 4. Dual support for Terraform versions 0.11 and 0.12

Date: 2020-01-21

## Status

Accepted

## Context

Terraform version 0.12 release was a major change with the API. Given the worked required to upgrade, it is envisaged that Terraform 0.11 will remain for quite some time.

## Decision

This module will support both version 0.11 and 0.12 of Terraform. Version 0.11 support will be managed from the 0.11 branch and tagged with a version pattern 0.minor.patch. Version 0.12 support will be managed from the master branch and tagged with a version pattern 1.minor.patch.

## Consequences

We predict that Terraform 0.11 usage will eventually decline and at some time a decision will be made as when to end support of Terraform 0.11. Supporting two versions of Terraform may introduce additional complexity with future implementations, and as such may accelerate any decision to end Terraform 0.11 support.

gha_language: HCL


text:
# unit-4-game

This is an interactive game created with jQuery and styled using bootstrap.

## Getting Started

https://hamidyou.github.io/unit-4-game/

Click on the link above to begin the game.

1. Select a Fighter
2. Select your first enemy.
3. Click attack until you have defeated your enemy.
4. Defeat all enemies to Win!

## Built With

* [jQuery] https://jquery.com/
* [Bootstrap] http://getbootstrap.com/

## License

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

## Acknowledgments

* Built as part of the Case Western Reserve University Coding Bootcamp - July 2018 cohort


text:
FLightModel - Light Yii2 style active record for Yii
====================================================

  Active record gives very convenient way of DB communication. However, active
  record is not as fast as query builder. Due to some benchmarks query builder
  3x faster than active record.

  `FLightModel` extends `CDbCommand` class and adds active record style methods.
  Those methods are highly inspired by Yii2's active record. Note that `FLightModel`
  is mainly intended for data retrieving, it does not have `save()` method.

  `FLightModel` provides the following methods to retrieve the query results:

  - `one($condition)`: returns a single record populated with the first row of data.
  - `all($condition)`: returns all records based on the query results.
  - `count($condition)`: returns the number of records.
  - `exists($condition)`: returns a value indicating whether the query result has
     data or not.
  - `with($methods)`: list of relations that this query should be performed with.
  - `indexBy($column)`: the name of the column by which the query result should
     be indexed.
  - `asArray()`: whether to return each record as an array.

  Usage: Let's say we have table `posts`

  ```php
  class Post extends FLightModel
  {
       public static function tableName()
       {
           return 'posts';
       }

       // if primary key is different than id, we should override this method
       public static function primaryKey()
       {
           return 'code';
       }
  }
  ```

  `FLightModel` instances are usually created by `FLightModel::find()` or
  `FLightModel::findAll()` or `FLightModel::findOne()`.

  ```php
  // fetch all rows as array of stdClass objects
  Post::findAll();

  // equivalent to above
  Post::find()->all()

  // fetch all active posts
  Post::findAll('active' => 1);

  // equivalent to above
  Post::find()->all('active' => 1);

  // equivalent to above
  Post::find()->where('active=:value', array(':value'=>1))->all();

  // fetch all active posts with comments
  Post::find()->with('comments')->all('active' => 1);
  ```

  Class `Post` must have relation method comments

  ```php
  public function comments()
  {
       $this->comments = Comment::findAll(['post_id' => $this->pk]);
  }
  ```

  Relation method may have params

  ```php
  Post::find()->with(['comments' => [$a, $b]])->all('active' => 1);

  // also loads users
  Post::find()->with(['comments' => [$a, $b], 'users'])->all('active' => 1);

  // fetch result as array
  Post::find()->with('comments')->asArray()->all('active' => 1);
  ```

  By default, light model returns results as stdClass object or array of stdClass
  objects. Calling `asArray()` makes the result an array, but this does not apply
  to result of relation methods. In order to correct this, one must:

  ```php
  public function comments()
  {
       $this->comments = Comment::find()->
           setFetchMode($this->getFetchMode())->
           all(['post_id' => $this->pk]);
  }
  ```

  There is `afterFind()` method which enables us to call custom methods after
  finding the result. Its calling syntax is same as `with()`. Let's say our post
  table is multilingual and has `name_en`, `name_uz` fields. We want to have virtual
  field `name` indicating current language version of `name`.

  ```php
  Post::find()->with('comments')->with('user')->afterFind('langs')->all();
  ...
  public function langs()
  {
       $this->name = $this->{'name_' . Yii::app()->language};
  }
  ```

  Some more examples:

  ```php
  // fetch one row whose id is 8
  Post::findOne(8);

  // same as above
  Post::find()->one(8);

  Post::findOne(['active' => 1, 'code' => 8]);

  Post::exists(['user_id' => Yii::app()->user->id]);

  // fetch post whose id in 7 or 8 or 9
  Post::findAll(['code' => [7,8,9]]);

  // number of all posts
  Post::count();

  // number of all inactive posts
  Post::count('active' => 0);
  ```

repository: fazliddin/FLightModel

repo_name: fazliddin/FLightModel


text:
---
layout: default
---

# 1998-08-10 - Marie Phillips

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: c22d78b62080e3beecf5b5b323cac704f7b66f7a4d193626d768924e72b749ae

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-08-10 07:40:30 UTC

Raw Date: Mon, 10 Aug 1998 00:40:30 -0700 (PDT)

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Mon, 10 Aug 1998 00:40:30 -0700 (PDT)
To<EMAIL_ADDRESS>Subject: Marie Phillips
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

When not now, when? My whole life I was OVERWEIGHT and started dieting with 13 years. Since then I hungered, suffered and punished myself.
But I never lost more than a few pounds. After I started eating regularly I gained the pounds back or even more.  If you are not overweight (but 57% of the Americans are) delete this message.

Eight months ago I started my new life, a healthy life.  In fact, in 3 month I slashed my bodyfat more than in half and I am now down
to 12% (for women 10-13% is ideal)

STOP DREAMING!!! They will never invent a miracle drug, which makes you loose all your fat.  You have to feed your body to lose fat. If you do not feed your body it will fight back and store the fat and you gain more. You don't believe me? You know it is true, it happened to you too.

I created a program with help from scientists and doctors to help all of YOU lose the fat for once and for all. You will eat more than ever but you have to use the plan! It is not
the meat and shrimp and fish what's bad for you but the carbohydrates. You can still eat your favorite food like steaks, fish, and chicken, vegetable etc.etc. You don't have to count
calories, that's not important.

This program also lowers your bloodsugar, cholesterol level and bloodpressure in just 30 days. Again, you will lose fat guaranteed. If you are not seeing a change in and on your body and your friends don't
react, and your spouse doesn't think you look terrific within 90 days, I will refund your money less S&H.

The program includes also email address and my phonenumber, if you ever need help or have questions.

I have to charge you for the program otherwise you'll order it and put it away and forget about it. The booklet will be in stores late this year for 69.95. I give it to you for
ONLY 29.95. You have to order now, because there is only a limited quantity on hand. Send check to the following address. OR, print out this email, attach the check on the printout and fax it to 1<PHONE_NUMBER>.

Name:___________________________________

Street:___________________________________

City:_____________________________________

Zip:_____________________________________

Phone:__________________________________ (optional)

Print this email out, attach your personal or business check and fax it to: 1<PHONE_NUMBER>

Or send it to: Marie Crystal
6901 W. Okeechobee Blvd
Suite D5, # 115
West Palm Beach, FL 33411

legal statement:

This message complies with the proposed United States Federal requirements for commercial email as well as the Washington State Commercial email bill Section 301, Paragraph (a) (2) (C) of s. 1618. To delete this message press the delete bottom on your browser. This is a one-time message.

sender: (above address, phone<PHONE_NUMBER>)

{% endraw %}
```

## Thread

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

+ Return to "[MariePhillips@counternet.com.centralnet.ch](/authors/mariephillips_at_counternet_com_centralnet_ch)"

+ 1998-08-10 (Mon, 10 Aug 1998 00:40:30 -0700 (PDT)) - Marie Phillips -<EMAIL_ADDRESS>


text:
# Zigbee Introduction: Networking Concepts - Binding

## ZDO - Binding

The binding command is part of a base class of functionality known as the Zigbee Device Object. The ZDO provides an interface between the application objects, the device profile, and the APS.

A binding creates a one-way link from one node to another node or from one node to a group of nodes that have a matching cluster. This is connected through the source and destination endpoints.

Once devices are on a network, devices can create bindings to establish applicaiton layer links.

For example a switch could have a binding for a light that it will always control. However, bindings are not required for zigbee communication, but are useful for frequently used, persistent communication paths.

## Binding Table

The Binding Table maps control messages to their intended destinations. It stores the following information listed.

1. The binding index is the location of the entry in the binding table

2. The binding type is either a binding for a unicast message to one node or a group binding to several nodes in a group

3. The network index the binding belongs in. This is for devices that are in more than one network.

4. The Source Endpoint is the available local endpoint where the binding entry is available

5. The Destination Endpoint is the available endpoint on the remote device that the entry is pointing to.

6. The Cluster ID indicates the endpoint’s functionality bound to this particular remote node

7. The Destination Node ID is the remote node’s short address

8. The Destination EUI64 will either store the remote node’s long address if it is a unicast binding or a 16-bit multicast group address if the binding type is set as “group”

The addition or deletion of entries is managed completely by the application and is stored in non-volatile memory. The stack will not perform these actions automatically for any reason. The only action taken by the stack about the binding table is to update the information about the node ID in correspondence with the EUI64 destination for a binding table entry.

APIs to manipulate the binding table can be found in _stack/include/binding-table.h_.

## Bind Request CLI Command

Let’s take a look at a CLI command to understand the requirements for a Bind Request. The following CLI command ZDO Bind can be sent from any node. This is an over-the-air command.

ZDO Bind has the following arguments:

- The “__destination Node ID__” is set to the node that will be receiving this ZDO command. This is where the binding will be created.

- The “__Remote device’s source endpoint__” is the endpoint on the node that will create the binding and send messages through this binding.

- The “__Remote endpoint to bind__” is the endpoint on the node that will be receiving messages through the binding.

- The "__cluster__" that the binding is to be used for.

- The “__Remote node EUI64__” is the device’s EUI64 that is receiving messages through the binding.

- The “__Binding’s destination EUI64__” is the node where the binding is created.

Please note, since the binding is unidirectional, both sides do not need to be aware of the binding. Just the node that will be sending messages through the binding. Also, it is possible to create the bindings locally by adding an entry to the binding table. For creating a binding locally, you can use “__option binding-table set__”.

We also have a related KBA found here: https://www.silabs.com/community/wireless/zigbee-and-thread/knowledge-base.entry.html/2017/12/28/creating_bindingsan-egzv

## Binding examples

### Light requesting the creation of a binding on the switch for the light

In this example we set up a binding for the On/Off cluster between a light and switch. The command is sent from 0x0000, which in this case is the coordinator and the light, to 0x6D92 the Switch.

__Node ID of the switch: 0x6D92__

__Coordinator ID: 0x0000__

__On / Off Cluster: 0x0006__

__Switch EUI64: 000B57FFFE492BC7__

__Light EUI64: 000B57FFFE25F9F4__

![Figure 02](./resources/binding-02.png)

The Event Detail shows the request and the arguments are found under the Zigbee Device Profile section.

![Figure 03](./resources/binding-03.png)

Also, a good way to check this is a ZDO command is to verify the Destination and Source Endpoints are set to 0x00 under the Zigbee Application Support section.

### Coordinator requesting the creation of a binding on the switch for another light

In this example we set up a binding for the On/Off cluster between a different light and the same switch.

__Node ID of the switch: 0x6D92__

__Coordinator ID: 0x0000__

__On / Off Cluster: 0x0006__

__Switch EUI64: 000B57FFFE492BC7__

__Light EUI64: 000B57FFFE25FAFC__

![Figure 04](./resources/binding-04.png)

The command is still sent from the coordinator to the switch 0x6D92, but the binding is for another Light. Notice the different destination IEEE addresses between the examples.

![Figure 05](./resources/binding-05.png)

## Binding Table Request CLI Command

EmberZNet also has a CLI command available for querying our switch about what is in its binding table.

```
zdo mgmt -bind <int16u> <int8u>
```
- The first argument here is the __node ID__ of the device that has the binding table

- The second argument is the __first entry__ you want to see plus all entries after it.

For example the following binding request starts the query from 0x00 and iterates down the table.

![Figure 06](./resources/binding-06.png)

The Binding Table Response is shown in the Event Detail.

![Figure 07](./resources/binding-07.png)

Notice the number of entries in the table and the two bindings that were created in the previous examples.

license: Zlib

path: /zigbee_concepts/Zigbee-Networking-Concepts/Networking Concepts - Binding.md

filename: Networking Concepts - Binding.md

gha_language: C


text:
# The limited principle of omniscience

```agda
module foundation.limited-principle-of-omniscience where
```

<details><summary>Imports</summary>

```agda
open import elementary-number-theory.natural-numbers

open import foundation.disjunction
open import foundation.existential-quantification
open import foundation.universe-levels

open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.sets

open import univalent-combinatorics.standard-finite-types
```

</details>

## Statement

The **limited principle of omniscience** (LPO) asserts that for every sequence
`f : ℕ → Fin 2` there either exists an `n` such that `f n ＝ 1` or for all `n`
we have `f n ＝ 0`.

```agda
LPO : UU lzero
LPO =
  (f : ℕ → Fin 2) →
  type-disj-Prop
    ( ∃-Prop ℕ (λ n → f n ＝ one-Fin 1))
    ( Π-Prop ℕ (λ n → Id-Prop (Fin-Set 2) (f n) (zero-Fin 1)))
```

## See also

- [The principle of omniscience](foundation.principle-of-omniscience.md)
- [The lesser limited principle of omniscience](foundation.lesser-limited-principle-of-omniscience.md)
- [The weak limited principle of omniscience](foundation.weak-limited-principle-of-omniscience.md)

repository: UniMath/agda-unimath

gha_language: Agda

repo_name: UniMath/agda-unimath


text:
# TM checking
a project for CS544 (EA) course
[![Build Status](https://dev.azure.com/ahussein0459/CS544(EA)%20Project/_apis/build/status/CS544(EA)%20Project-Maven-CI?branchName=master)](https://dev.azure.com/ahussein0459/CS544(EA)%20Project/_build/latest?definitionId=1&branchName=master)

## Build with Docker
You need to have docker installed then you can build and run using command `docker-compose up`

After this you can open localhost (no need to specify a port, it will be hosted on port 80)


text:
# Depmod

This folder contains a bin file created by the depmod command.

Our goal was to automatically load our APU, CON, and PPU kernel modules without
manual user intervention. This works only after depmod is run. However, we
don't want to run depmod manually or at every boot. Instead, running low on
time, we just added the resulting bin file to this folder to be copied by our
build-script.sh.

repository: FP-GAme/fpgame-src

branch_name: refs/heads/main

repo_name: FP-GAme/fpgame-src


text:
This example shows that `keyExists` returns true if a key exists in the `Shape` (even if the corresponding value is `NULL`):

```basic-usage.hack
function run(shape(?'x' => ?int, ?'y' => ?int, ?'z' => ?int) $point): void {
  // The key 'x' exists in Shape $point
  \var_dump(Shapes::keyExists($point, 'x'));

  // The key 'z' doesn't exist in $point
  \var_dump(Shapes::keyExists($point, 'z'));

  // The key 'y' exists in $point, even though its value is NULL
  \var_dump(Shapes::keyExists($point, 'y'));
}

<<__EntryPoint>>
function basic_usage_main(): void {
  run(shape('x' => 3, 'y' => null));
}
```

repository: hhvm/user-documentation

gha_language: Hack

repo_name: hhvm/user-documentation


text:
# Clipmenu GH-Emojis Snippet

Emoji snippet of [Clipmenu](http://www.clipmenu.com/)(for MacOSX).

Some emoji of MacOSX doesn't work on Github. So I made this to purpose to use
emoji with github markdown emoji markup and [Clipmenu](http://www.clipmenu.com/).

[Clipmenu](http://www.clipmenu.com/) has not updated since 2010,
but it works nicely! :grinning:

I found the list of emojis in [rxaviers's gist](https://gist.github.com/rxaviers/7360908).
Some emoji that did not work was removed. :scissors:

## References

- [Clipmenu](http://www.clipmenu.com/) :clipboard:
- [rxaviers/gist:7360908 - Complete list of github markdown emoji markup](https://gist.github.com/rxaviers/7360908) :book:

## License

This work is licensed under a [MIT LICENSE](LICENSE):bell:

repository: paikwiki/clipmenu-gh-emojis-snippet

repo_name: paikwiki/clipmenu-gh-emojis-snippet


text:
# docker-backup-restore

This tool allows the user to do the following operations on docker containers created with docker or docker-compose:

- Backup
- Restore
- Move containers and docker-compose container sets between machines.

## docker-compose Usage

**Test this procedure before using it.**

- Create your `docker-compose.yml` file. Make sure that all volumes that need to be backed up are named. Here's an example:

```YAML
services:
  postgres:
    image: postgres:10
    environment:
      POSTGRES_USER: someuser
      POSTGRES_PASSWORD: somepassword
    volumes:
      - database:/var/lib/postgresql/data
    restart: always
volumes:
  database:
```

- Run `docker-compose up -d` on this file.
- Do whatever you want to configure the container, add data, etc.
- `cd` to the path that has the docker-compose file
- Download [docker-backup.sh](https://github.com/dotn8/docker-backup-restore/blob/master/docker-backup.sh) and put it in the same folder as the docker-compose file.
- Make `docker-backup.sh` executable by running this: `chmod +x docker-backup.sh`
- Create a file for backing up and restoring your stack. Let's name it `postgres_backup.sh`. Give it the following contents:

```bash
#!/usr/bin/env bash

ACTION=$1

# You can add all your containers here. Once a container is running,
# the backup operation automatically detects what volumes it has and backs them up.
./docker-backup.sh $ACTION drupal_postgres_1

# The script isn't smart enough to know what the container IDs for the docker-compose file are,
# so you have to have a separate line for each container:
#./docker-backup.sh $ACTION myservice2
#./docker-backup.sh $ACTION myservice3
```

- This file will be used to backup and restore the Docker application
- Make this file executable: `chmod +x postgres_backup.sh`
- Back up the application by running `./postgres_backup.sh backup`
- WARNING: this will stop your docker-compose application, but you won't lose the data in your volumes.
- If you want to start the docker-compose application again, run `docker-compose up -d` after the backup is done.
- The backup creates a folder for each container that was backed up.
  - Each folder contains a `*.tar` file for each volume in that container.
  - Each container has a single file named `volumes.txt` which contains the list of volumes and mountpoints for that container.
- To restore a backup, change the docker-compose file so that all the volumes are external, and have the `<COMPOSER_PROJECT>_VOLUME`. So for example, if your `docker-compose.yml` is in the folder `postgres`, the `docker-compose.yml` file should look like this:

```YAML
services:
  postgres:
    image: postgres:10
    environment:
      POSTGRES_USER: someuser
      POSTGRES_PASSWORD: somepassword
    volumes:
      - database:/var/lib/postgresql/data
    restart: always
volumes:
  database:
    external:
      name: postgres-database
```

- Once this has been done, you can `docker-compose kill` and `docker-compose rm -v` to remove any containers and volumes created by docker-compose.
- To do the actual restore, run `./postgres-backup restore`.
- To start the newly-restored application, run `docker-compose up -d`.
- Your service should be accessible now.

## To-do

Here are some things that need to be done next on this repository:

- Automatically create the initial volumes, so that the volumes can be external from the start.
- Make the script automatically detect the containers in the docker-compose file. (This might require switching to a different language than bash, ugh.) This would eliminate the need for a custom script alongside the `docker-compose.yml` file.
- Snapshot the containers before backing them up. I think this might make it unnecessary to kill the docker-compose application when backing it up.
- Make backups be a single `.tar.gz` file, including the docker-compose file for reference.


text:
[Extraction](http://extraction.js.org/)
==========

Tree Extraction for JavaScript Object Graphs

[![github (author stars)](https://img.shields.io/github/stars/rse?logo=github&label=author%20stars&color=%233377aa)](https://github.com/rse)
[![github (author followers)](https://img.shields.io/github/followers/rse?label=author%20followers&logo=github&color=%234477aa)](https://github.com/rse)

[![npm (project release)](https://img.shields.io/npm/v/extraction?logo=npm&label=npm%20release&color=%23cc3333)](https://npmjs.com/extraction)
[![npm (project downloads)](https://img.shields.io/npm/dm/extraction?logo=npm&label=npm%20downloads&color=%23cc3333)](https://npmjs.com/extraction)

About
-----

Extraction is a small JavaScript library for extracting object trees
from arbitrary object graphs. Object graphs usually have cycles and
contain many information. Hence, the clue is that the extracted object
trees use links to break object reference cycles and can be just
partial by leaving out non-requested information. The tree extraction
is controlled with a custom JSON-style query language. The object tree
is structurally derived from the object graph, but contains no
references to the original objects and hence can be further mutated by
the caller.

The Extraction library is intended for two main use cases: primarily, to
support the generation of responses in REST APIs based on object graphs
(where the cycle problem and the partial information problem has to be
resolved) and, secondarily, to support the persisting and restoring of
arbitrary in-memory object graph structures (where the cycle problem has
to be resolved, too).

Notice: this library intentionally does provide only a query language
for the tree extraction (starting at a certain tree root node) and not
also a query language for locating the tree root node. Locating nodes in
a graph is not within the scope of this library.

[Play around with Extraction in the interactive demo!](http://extraction.js.org/)

Sneak Preview
-------------

```js
import { extract, reify } from "./lib/extraction"
import { expect } from "chai"

/*  the graph  */
var Graph = {
    Person: [
        { id: 7,   name: "God",   tags: [ "good", "nice" ] },
        { id: 666, name: "Devil", tags: [ "bad", "cruel" ] } ],
    Location: [
        { id: 0,   name: "World"  },
        { id: 1,   name: "Heaven" },
        { id: 999, name: "Hell"   } ] }
Graph.Person[0].home    = Graph.Location[1]
Graph.Person[1].home    = Graph.Location[2]
Graph.Person[1].rival   = Graph.Person[0]
Graph.Person[0].rival   = Graph.Person[1]
Graph.Location[1].owner = Graph.Person[0]
Graph.Location[2].owner = Graph.Person[1]
Graph.Location[0].subs  = [ Graph.Location[1],
                            Graph.Location[2] ]

/*  use case 1: tree extraction  */
let tree = extract(Graph.Person[0],
    "{ name, rival: { home: { *, !owner, !subs } } }")
expect(tree).to.be.deep.equal(
    { name: "God", rival: { home: { id: 999, name: "Hell" } } })

/*  use case 2: graph persistance  */
let storage = JSON.stringify(extract(Graph, "{ -> oo }"))
expect(reify(JSON.parse(storage))).to.be.deep.equal(Graph)
```

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

```shell
$ npm install extraction
```

Usage
-----

The Extraction library exposes two API functions (signatures given in TypeScript notation):

### `extract`

This is the main API method for extracting an object tree from an object
graph with the help of a tree extraction DSL.

```
extraction.extract(graph: object, spec: string, options?: object): object
```

- The `graph` argument has to be an Array of Object and be any start node in the graph.

- The `spec` argument is the tree extraction specification Domain-Specific Language (DSL).
  It has to follow the following PEG-style grammar:

    RHS      |     | LHS
    ---------|-----|---------------------------
    spec     | ::= | object / array
    object   | ::= | `"{"` content? `"}"`
    array    | ::= | `"["` content? `"]"`
    content  | ::= | (`"->"` num) / (field (`","` field)*)
    field    | ::= | (property `":"` spec) / (`"!"`? property)
    property | ::= | id / `"*"` / (num `".."` num) / num
    num      | ::= | (`"-"`? `[0-9]`+) / `"-oo"` / `"oo"`
    id       | ::= | `[$a-zA-Z_][$a-zA-Z0-9_]`\*

  Hint: the matching of multiple `field` in `content` follows a last-match semantic!

- The `options` argument is optional and can contain the following properties:

    - `procValueBefore: (value: any, path: string) => any`:

       Pre-process a value (object or property value) at `path` before
       it is taken into account. A caller could use this to convert the
       value from a custom type into a standard JavaScript type.

    - `procValueAfter: (value: any, path: string) => any`:

       Post-process a value (object or property value) at `path` after
       it was taken into account. A caller could use this to convert the
       value into an external representation like JSON or XML.

    - `makeRefValue: (value: Object, pathNow: string, pathFirst: string) => any`:

       Make an object reference out of an object `value`, which is now found (again)
       at path `pathNow` and the first-time found at `pathFirst`. The default
       is to use `pathFirst` as the reference, but a caller could also use
       a stub for `value` (usually based on just the OID of it) as the reference.

    - `getKeysOfObject: (value: Object) => String[]`:

       Retrieve the keys of an object `value`. A caller could use this
       to provide the keys of custom objects which are either
       non-enumerable or perhaps are based on getter/setter on the
       prototype chain.

    - `debug: boolean`:

       Print debug information about internal processing.

### `reify`

This is a utility API method to re-generate an object graph from an
object tree by reifying all self-references back to the referenced
objects.

```
extraction.reify(tree: object, options?: object): object
```

- The `tree` argument is the root of an object tree which should be traversed.

- The `options` argument is optional and can contain the following properties:

    - `procValueBefore: (value: any, path: string) => any`:

       Pre-process a value (object or property value) after it is taken into account.
       A caller could use this to convert the value from an external representation
       like JSON or XML.

    - `procValueAfter: (value: any, path: string) => any`:

       Post-process a value (object or property value) after it was taken into account.
       A caller could use this to convert the value from a standard type into a custom
       JavaScript type.

    -  `isReference: (value: any, path: string) => boolean`:

       Determine whether `value` is an object reference.

    -  `getObject: (value: any, path: string) => any`:

       Fetch the underlying object from an object reference `value`, found at `path`.

    -  `setObject: (value: any, path: string) => void`:

       Store an underlying object `value`, found at `path`.

    - `debug: boolean`:

       Print debug information about internal processing.

Example
-------

Suppose we have an object graph (aka "business model") based
on two entity definitions (in pseudo language):

```
Person {
    id:    number
    name:  string
    tags:  string+
    home:  Location
    rival: Person?
}
Location {
    id:     number
    name:   string
    owner:  Person?
    subs:   Location*
}
```

A possible JavaScript instanciation of this object graph definition then
could be:

```js
var Graph = {
    Person: [
        { id: 7,   name: "God",   tags: [ "good", "nice" ] },
        { id: 666, name: "Devil", tags: [ "bad", "cruel" ] }
    ],
    Location: [
        { id: 0,   name: "World" },
        { id: 1,   name: "Heaven" },
        { id: 999, name: "Hell" }
    ]
}

Graph.Person[0].home    = Graph.Location[1]
Graph.Person[1].home    = Graph.Location[2]

Graph.Person[1].rival   = Graph.Person[0]
Graph.Person[0].rival   = Graph.Person[1]

Graph.Location[0].subs  = [ Graph.Location[1], Graph.Location[2] ]

Graph.Location[1].owner = Graph.Person[0]
Graph.Location[2].owner = Graph.Person[1]
```

Because of the relationship cycles in this graph, you cannot easily
serialize this graph as JSON with plain `JSON.stringify()` as it
will detect but not handle the cycles correctly. With the Extraction library
you can serialize and deseralize this graph just fine:

```js
/*  import external requirements  */
import { extract, reify } from "extraction"
import { expect }         from "chai"
import { inspect }        from "util"

/*  extract entire graph as a tree with self-references  */
let tree = extract(Graph, "{ -> oo }")
console.log(inspect(tree, { depth: null }))

//  { Person:
//     [ { id: 7,
//         name: 'God',
//         tags: [ 'good', 'nice' ],
//         home: { id: 1, name: 'Heaven', owner<EMAIL_ADDRESS>},
//         rival:
//          { id: 666,
//            name: 'Devil',
//            tags: [ 'bad', 'cruel' ],
//            home: { id: 999, name: 'Hell', owner<EMAIL_ADDRESS>},
//            rival<EMAIL_ADDRESS>} },
//<EMAIL_ADDRESS>],
//    Location:
//     [ { id: 0,
//         name: 'World',
//         subs: [<EMAIL_ADDRESS><EMAIL_ADDRESS>] },
//<EMAIL_ADDRESS>//<EMAIL_ADDRESS>] }

/*  as the tree has no cycles, it can be serialized/unserialized just fine  */
tree = JSON.parse(JSON.stringify(tree))

/*  reify the object references to gain the original graph again  */
let GraphNew = reify(tree)
expect(GraphNew).to.be.deep.equal(Graph)
```

Now suppose we have a REST API where we want to let Persons
with their home Location be queried:

```js
/*  import external requirements  */
import HAPI        from "hapi"
import { extract } from "./lib/extraction"

/*  import sample graph  */
import Graph       from "./sample-graph"

/*  establish a new REST service  */
var server = new HAPI.Server()
server.connection({ address: "<IP_ADDRESS>", port: "12345" })

/*  provide REST endpoints  */
server.route({
    method: "GET",
    path: "/persons/{id}",
    handler: (request, reply) => {
        let id = parseInt(request.params.id)
        let person = Graph.Person.find((person) => person.id === id)
        let response = JSON.stringify(extract(
            person, "{ id, name, home: { id, name } }"
        ))
        reply(response)
    }
})

/*  fire up REST service  */
server.start((err) => {
    if (err)
        console.log(err)
})
```

Querying the two Persons yields:

```
$ curl http://<IP_ADDRESS>:12345/persons/7
{"id":7,"name":"God","home":{"id":1,"name":"Heaven"}}

$ curl http://<IP_ADDRESS>:12345/persons/6660
{"id":666,"name":"Devil","home":{"id":999,"name":"Hell"}}
```

Finally, instead of extracting a tree and then encoding it
as JSON, you can immediately encode it during extraction:

```js
extraction.extract(Graph, "{ -> oo }", {
    procValueAfter: (value, path) => {
        if (typeof value === "object" && value !== null) {
            if (value instanceof Array)
                value = "[" + value.join(",") + "]"
            else
                value = "{" + Object.keys(value).map(function (key) {
                    return JSON.stringify(key) + ":" + value[key]
                }).join(",") + "}"
        }
        else
            value = JSON.stringify(value)
        return value
    }
}))
// {"Person":[{"id":7,"name":"God","tags":["good","nice"],
//<EMAIL_ADDRESS>// "rival":{"id":666,"name":"Devil","tags":["bad","cruel"],
//<EMAIL_ADDRESS>// "rival":"<EMAIL_ADDRESS>//<EMAIL_ADDRESS>// "<EMAIL_ADDRESS>//<EMAIL_ADDRESS>```

Implementation Notice
---------------------

Although the Extraction library is written in ECMAScript 6, it is
transpiled to ECMAScript 5 and this way runs in really all(!) current
(as of 2017/Q1) JavaScript environments, of course.

License
-------

Copyright © 2015-2023 Dr. Ralf S. Engelschall (http://engelschall.com/)

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

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

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

repository: rse/extraction

repo_name: rse/extraction


text:
# Changelog

All notable changes to this project will be documented in this file.

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

## [1.2.15][] - 2020-05-29

### Fixed

  - Specifically excluded `10.1.0` from acceptable versions of our `kubernetes`
    dependency (#25)

## [1.2.14][] - 2019-11-29

### Added

  - Support for custom Kubernetes resources (#23)

## [1.2.13][] - 2019-10-29

### Fixed

  - Move away from deprecated Kubernetes API; switch from `extensions/v1beta1` to `apps/v1`
  for Deployment definitions.
  - Switch from `extensions/v1beta1` to `networking.k8s.io/v1beta1` for Ingress definitions.

## [1.2.12][] - 2019-05-22

### Fixed

  - Don't build tag branches in CI.

## [1.2.11][] - 2019-05-21

### Added

  - Documentation for first-time use
  - README converted to RST format (README.rst)
  - README linting

### Removed

  - README.md

## [1.2.10][] - 2019-05-21

### Fixed

  - Failing Read The Docs build.

## [1.2.9][] - 2019-05-21

### Added

  - CI script for checking if the version number has been updated.

## [1.2.8][] - 2019-05-20

### Added

  - Initial Sphinx documentation in RST format.
  - `make docs` command to build docs.

### Changed

  - CONTRIBUTING.md now points to hosted Sphinx docs.

## [1.2.7][] - 2019-05-17

### Changed

  - Alignment of badges in README.

## [1.2.6][] - 2019-05-17

### Added

  - Added badges to README.
  - Publish code coverage after build.

### Removed

  - Removed redundant `delivery.yaml` file.

## [1.2.5][] - 2019-05-16

### Fixed

 - Change the configuration of [Zappr](.zappr.yaml) to comply with the [Rules of Play].

[Rules of Play]: https://opensource.zalando.com/docs/releasing/index/#be-compliant

## [1.2.4][] - 2019-05-10

### Added

  - Use Travis for CI.

## [1.2.3][] - 2019-05-10

### Added

  - Published to PyPI.

### Changed

  - Updated dependencies.
  - Updated README to instruct downloading from PyPI instead of building locally.

### Fixed

  - Missing PyYAML dependency.

## [1.1.0][] - 2019-05-10

### Added

  - Implemented `-v`/`--version` option to show Zelt version.
  - This changelog.

[1.2.15]: https://github.com/zalando-incubator/zelt/compare/v1.2.14...v1.2.15
[1.2.14]: https://github.com/zalando-incubator/zelt/compare/v1.2.13...v1.2.14
[1.2.13]: https://github.com/zalando-incubator/zelt/compare/v1.2.12...v1.2.13
[1.2.12]: https://github.com/zalando-incubator/zelt/compare/v1.2.11...v1.2.12
[1.2.11]: https://github.com/zalando-incubator/zelt/compare/v1.2.10...v1.2.11
[1.2.10]: https://github.com/zalando-incubator/zelt/compare/v1.2.9...v1.2.10
[1.2.9]: https://github.com/zalando-incubator/zelt/compare/v1.2.8...v1.2.9
[1.2.8]: https://github.com/zalando-incubator/zelt/compare/v1.2.7...v1.2.8
[1.2.7]: https://github.com/zalando-incubator/zelt/compare/v1.2.6...v1.2.7
[1.2.6]: https://github.com/zalando-incubator/zelt/compare/v1.2.5...v1.2.6
[1.2.5]: https://github.com/zalando-incubator/zelt/compare/v1.2.4...v1.2.5
[1.2.4]: https://github.com/zalando-incubator/zelt/compare/9513e05cb6f20ddb3459095ff771e1e8ad1ae299...3b5cc6bb09c923fa713d5f1348b39c7def97afeb
[1.2.3]: https://github.com/zalando-incubator/zelt/compare/022588a3c51b3b313bf1a9df03db96a5a7a3e9bb...9513e05cb6f20ddb3459095ff771e1e8ad1ae299
[1.1.0]: https://github.com/zalando-incubator/zelt/compare/aca82a82608a931fe9d34b0271102feac0ee7e28...022588a3c51b3b313bf1a9df03db96a5a7a3e9bb

repository: zalando-incubator/zelt

gha_language: Python

repo_name: zalando-incubator/zelt


text:
[![Latest Stable Version](https://poser.pugx.org/bingo-soft/el/v/stable.png)](https://packagist.org/packages/bingo-soft/el)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg)](https://php.net/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bingo-soft/el/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/bingo-soft/el/?branch=main)

# Expression Language

Base classes of Java Expression Language (EL) ported to PHP

repository: bingo-soft/el

repo_name: bingo-soft/el


text:
sips-atos, SIPS/ATOS online payments API for node.js
===

Installation
---
```
npm install 'sips-atos'
```

Usage
---
1.Create a directory in your app directory and drop the files from your bank ('bin', 'param', ... folders)  :

```
/app
/atos-config
    /bin
      request
      ...
    /param
      certif.fr.011223344551111
      parmcom.011223344551111
      pathfile
      ...
/node_modules
```

2.Load 'sips-atos' and specify (at least) the path to your 'atos-config' folder.

````
var path = require('path'),
    AtosSIPS = require('../atos'),
    sips = new AtosSIPS({
        rootPath: path.join(__dirname, 'atos-config')
    });
```

3.Create the request and show the form in your view

```
app.get('/', function (req, res, next) {
    sips.request({
        merchant_id: '011223344551111', // Demo merchant id
        amount: '100',
        customer_id: '1',
        cancel_return_url: 'http://<IP_ADDRESS>:1337/return',
        normal_return_url: 'http://<IP_ADDRESS>:1337/return',
        automatic_response_url: 'http://<IP_ADDRESS>:1337/return'
    }, function (err, data) {
        if (err) {
            return next(new Error(err));
        }
        res.render('form', { data: data });
    });
});
```

----- The customer pay on the bank platform -----

3.Catch the DATA parameter in POST response by listening to the 'automatic\_response\_url'

```
app.post('/return', function (req, res, next) {
    sips.response(req.body.DATA, function (err, data) {
        // Your implementation
    });
});
```

4.You get an object in 'data', that follows the API specs :

```
{
  code,
  error,
  merchant_id,
  merchant_country,
  amount,
  transaction_id,
  payment_means,
  transmission_date,
  payment_time,
  payment_date,
  response_code,
  payment_certificate,
  authorisation_id,
  currency_code,
  card_number,
  cvv_flag,
  cvv_response_code,
  bank_response_code,
  complementary_code,
  complementary_info,
  return_context,
  caddie,
  receipt_complement,
  merchant_language,
  language,
  customer_id,
  order_id,
  customer_email,
  customer_ip_address,
  capture_day,
  capture_mode,
  data
}
```

Notes
---
* The following parameters are _required_ to perform a request :

	- merchant_id
	- customer_id
	- amount
	- automatic_response_url
	- normal_return_url
	- cancel_return_url

Above those required parameters, you can specify other parameter that follows the API specs.

* Default language is set to 'fr' and currency to 'Euro', simply pass your own 'locale/currency' in
  the request to override, as shown above.

* Don't forget to check at the 'pathfile' Atos file, and fill requested paths according to your app _absolute_ location on the server

* Drop the credit card logos in a public dir, then fill this directory's _absolute_ location on the server
  in the 'atos/param/pathfile' file

* The '011223344551111' merchant\_id is the demo merchant\_id, edit it to use your own.

Run the example
---
* `cd` to the 'example' folder
* Create a folder 'config' and drop the files from your bank ('bin', 'param', ... folders)
* Run `npm install`, then `npm start`.

repository: Lorel/sips-atos

repo_name: Lorel/sips-atos


text:
[![Build Status](https://travis-ci.org/juju4/ansible-harden-windows.svg?branch=master)](https://travis-ci.org/juju4/ansible-harden-windows)
# Windows harden ansible role

Ansible role to harden windows system.

* install EMET, Powershell v5
* LSA hardening, review javascript/hta file association
* review log settings, enabling command-line, powershell and WMI logging
* try to harden adobe reader, flash

It's a work in progress and some tasks are not working as expected.

Pay attention to test carefully role and fit to your context unless you want to lock yourself.
This role is continuous work in progress as security landscape is constantly evolving.

## Requirements & Dependencies

### Ansible
It was tested on the following versions:
 * 2.0 (required for Win)

### Operating systems

Tested with vagrant on Ubuntu 14.04.
Only tested against Win10 Evaluation.
Follow
http://kitchen.ci/blog/test-kitchen-windows-test-flight-with-vagrant/

## Example Playbook

Just include this role in your list.
For example

```
- host: all
  roles:
    - harden-windows
```

Run
```
$ ansible-playbook -i inventory --limit win10 site.yml
```

## Variables

Sample. See defaults/main.yml for full scope

```
harden_eventlogs_maxsize: 314572
```

## Continuous integration

Pending

## Troubleshooting & Known issues

* Ensure you follow ansible guide to be able to connect
http://docs.ansible.com/ansible/intro_windows.html

* 'The property 'changed' cannot be found on this object. Verify that the property exists and can be set.'
https://github.com/ansible/ansible/issues/17139
Ansible bug in 2.1.1, ok in 2.0.1 and 2.1.2

* AdobeReader chocolatey install issue

## License

BSD 2-clause

repository: GanyBaba/Packer-BIA

repo_name: GanyBaba/Packer-BIA


text:
# SoundSpace
Ever been at a party/in a car with colleagues/just hanging out with friends, and nobody got to listen to the music they wanted? Then look no further!

SoundSpace is a social music-organization app that allows users to upvote and downvote songs in user-created playlists, thus impacting the priority of each song in the queued playlist. The more upvotes a song has, the higher its priority! And the more downvotes a song has, well... then clearly no one wants to listen to it.

Never worry about who wants to play what music ever again; with SoundSpace, everyone gets their say!

Lives at: http://nodejs-soundspace.rhcloud.com/

###Built By
- Myself ([atheed](https://github.com/atheed))
- [Colliflower](https://github.com/Colliflower)
- [Orangehop](https://github.com/Orangehop)
- [mcey](https://github.com/mcey)
- [iCabala](https://github.com/iCabala)
- [g2kokaro](https://github.com/g2kokaro)

###Built Using
- [Node.js](https://nodejs.org/en/) (with [Express](http://expressjs.com/en/index.html))
- [Socket.IO](http://socket.io/)
- [MongoDB](https://www.mongodb.org/) (with [Mongoose](http://mongoosejs.com/))
- A little bit of [Bootstrap](http://getbootstrap.com/)
- HTML + CSS + JavaScript (with [jQuery](https://jquery.com/))

##License
[MIT License](LICENSE.md)

repository: atheed/SoundSpace

repo_name: atheed/SoundSpace


text:
# bf.elv

A brainfuck interpreter written in pure Elvish

## Info

- It reads the program from a file named in the first argument
	- If there are no arguments, it reads from standard input
- A list of 30,000 cells is initialized
	- Negative pointers count from the back of the list
- Unmatched brackets are detected before runtime
- Output is UTF-8-encoded

# bf2.elv Info

- The program is transpiled into Elvish then evaluated

repository: AlexRogalskiy/bf

repo_name: AlexRogalskiy/bf


text:
### 0.x.x
(not released)

- ...

### 0.2.1
(July 20th, 2012)

- Fix important bug where result data wasn't restored from Redis correctly
  (affected non-string results only).

### 0.2.0
(July 18th, 2012)

- `q.enqueue()` accepts instance methods now, too.  Objects will be pickle'd
  along with the instance method, so beware.
- `q.enqueue()` accepts string specification of functions now, too.  Example:
  `q.enqueue("my.math.lib.fibonacci", 5)`.  Useful if the worker and the
  submitter of work don't share code bases.
- Job can be assigned custom attrs and they will be pickle'd along with the
  rest of the job's attrs.  Can be used when writing RQ extensions.
- Workers can now accept explicit connections, like Queues.
- Various bug fixes.

### 0.1.2
(May 15, 2012)

- Fix broken PyPI deployment.

### 0.1.1
(May 14, 2012)

- Thread-safety by using context locals
- Register scripts as console_scripts, for better portability
- Various bugfixes.

### 0.1.0:
(March 28, 2012)

- Initially released version.

repository: ShriramK/rq

repo_name: ShriramK/rq


text:
# ADB plugin for Flipper
Features:
- restart app
- clear app data
- clear app data and restart
- uninstall app
- kill app

The idea of this plugin is to recreate https://github.com/pbreault/adb-idea functions as a flipper plugin
For easier setup, adb-plugin branch is used for development. Upstream gets merged pereodicaly.
github repo is here https://github.com/maxim-pandra/adb-flipper-plugin

All contributions are welcome. Problems to solve can be found in issues section in github.

![Plugin screenshot](https://i.ibb.co/VS7ThyB/Screen-Shot-2020-11-28-at-18-08-21.png)

repository: maxim-pandra/adb-flipper-plugin

branch_name: refs/heads/adb-plugin

gha_language: TypeScript

repo_name: maxim-pandra/adb-flipper-plugin


text:
# How It Works
This sample app domonstrates usage of [webcomponents-redux](https://github.com/sheeshpaul/webcomponents-redux) binding package for connecting Web Components to [Redux](https://github.com/reduxjs/redux). The app has a Counter Web Component, which is connected to Redux through webcomponents-redux bindings. The component implements mapStateToProps for handling state change, and mapDispatchToProps for dispatching actions. This app uses ES Modules and has the build system. For the version of this app which includes required packages as script tag and does not use any build system see [webcomponents-redux-script-sample](https://github.com/sheeshpaul/webcomponents-redux-script-sample).

# Quick Start Guide
- [Installation](#installation)
- [Development Workflow](#development-workflow)

## Installation

**1. Clone this repo**
```sh
git clone --depth 1 https://github.com/sheeshpaul/webcomponents-redux-sample.git
cd webcomponents-redux-sample
```

**2. Install the dependencides**
```sh
npm install
```

## Development Workflow

**3. Start the local server**
```sh
npm run start
```

## License
MIT

repository: sheeshpaul/webcomponents-redux-sample

repo_name: sheeshpaul/webcomponents-redux-sample


text:
# Prescription Drug Claims Analysis
## 1,3,7-Trimethylxanthine

The purpose of this project is to understand and predict drug usage of the Medicaid population, which will enable local governments and health plan providers to respond strategically to reduce expenditures.

* Source Code: [Github Repository](https://github.com/Viral1101/Rx_claims_hackathon2018)
* Presentation: [Slides](https://docs.google.com/presentation/d/161zXyUf1gQDV95C6VQlIDrQCJhbf6KNRCBGZd8pqHtQ/edit?usp=sharing)
* Video: [Youtube](https://www.youtube.com/watch?v=Z4ZtlFfPu0M&feature=youtu.be)

## Requirements

The following features were required for this project:
1. Combine datasets for analysis
2. Analyze and visualize interesting patterns in the data.
3. Predict future prescription usage by state or zip code.

## Datasets

* [Medicaid Claims](https://www.medicaid.gov/medicaid/prescription-drugs/state-drug-utilization-data/index.html)
* [National Drug Codes](https://www.ncqa.org/hedis/measures/hedis-2019-ndc-license/hedis-2019-final-ndc-lists/)

The *Medicaid Claims* dataset includes the information states have reported on drug utilization for covered outpatient drugs paid for by state Medicaid agencies.

The *National Drug Codes* dataset is from the Healthcare Effectiveness Data and Information Set (HEDIS), published by the National Committee for Quality Assurance (NCQA). The lists used are referred to as the Medication List Directory (MLD). The MLD includes medications listed by National Drug Code, which correspond to claims information in the Medicaid dataset.

## Approach

This project is built as an interactive web application using MEAN Stack.
SQL code was used to join the two tables for more responsive use by the application, according to the following code.

```
import State_Drug_Utilization_Data_2018.csv as medicaid
import ndc_med_list.csv as ndcmed
```

```sql
proc sql;
create table one as
select f.state, total_amount_reimbursed, f.number_of_prescriptions, f.ndc, e.medication_list
from medicaid f
join ndcmed e
on f.ndc = e.ndc_code;
quit;

proc sql;
create table two as
select state, sum(total_amount_reimbursed)as total_amount_reimbursed,
sum(number_of_prescriptions) as number_of_prescriptions, medication_list
from one
group by state, medication_list;
quit;
```

Relevant tables from the datasets were imported into MongoDB. Database queries return data on Medicaid prescription expenditures by state and product. This data is accessed by and displayed to the user through an interactive front-end using D3.

### Technologies
* HTML5
* CSS
  * Bootstrap
* MEAN Stack
  * MongoDB
  * Express
  * Angular
  * NodeJS
* D3

## Features

* Interactive map of the United States
  * The color of each state is dynamically generated to reflect expenditure range
  * Mouse-over tooltip wihch displays the state abbreviation and total expenditure for 2018
  * Clicking a state centers the state in the view and zooms the map
* Donut Charts with proportional data
  * Chart starts with nationwide data by total amount reimbursed in each Medication List category
  * Selecting a state updates the chart with state specific data
  * Clicking the button toggles between total prescriptions and total amount reimbursed per Medication List category.

## Documentation

The US Map visualization was based on an example published on the D3 Github Gallery:
[Zoomable Map](https://bl.ocks.org/mbostock/2206590)

Our donut chart visualization was also based on an example published on the D3 Github Gallery:
[Pie Chart with Labels](http://bl.ocks.org/dbuezas/9306799)

MEAN stack application is based on previous code given in CSS5590_490 ICP.

## Runtime requirements
* MongoDB insllation
  * `mongoimport --db medicaid --collection prescriptions --type csv --headerline --file PATH\TO\FILE\State_Drug_Utilization_Data_2018.csv`
  * `mongoimport --db medicaid --collection ndcpres --type csv --headerline --file PATH\TO\FILE\medList_by_state.csv`
* Node.js
  * run mongo.js before launching web app
  * To avoid heap size issues run with:
    * `node --max-old-space-size=2000000 mongo.js`

## Contributing Members

* [Dave Walsh](https://github.com/Viral1101)
* [Trinadha Muppala](https://github.com/rmuppala)
* [Hari Velivela](https://github.com/Githubhari9966)
* [Neil Pirch](https://github.com/neilpirch)


text:
# Ncurses Snake
Snake created using ncurses

## How to play

Press directional arrows to control snake's direction.

Press `q` or `esc` to exit game.

At the beginning of the game, press any arrow to give the snake a direction and start the game.
A snake of length 1 can move in any direction. A snake longer than 1 square cannot switch direction to a direction
opposite of it's current direction.

All calculations are relative to current terminal dimensions and the game scales according to the size of your terminal.
To make sure the game runs comfortably though, try to use terminal at least 15 columns wide and 10 rows long and avoid
playing the game on your IOT Samsung Smart Fridge.

## Compilation

You should be able to compile and run the game on any POSIX compliant system using a C++11 compliant compiler.

`g++ src/*.cpp -std=c++11 -lncurses -Os -o snake`

## Dependencies

This game only has one dependency, ncurses, which should be available on all POSIX compliant systems. If you're using Windows,
try to install something useful on your PC, like [Hannah Montana Linux](http://hannahmontana.sourceforge.net/).

repository: fpeterek/ncurses-snake

repo_name: fpeterek/ncurses-snake


text:
---
layout: post
title: Announcing Uppercut.js
date: 2015-09-04 08:00
author: Matthew
header-img: "img/headers/code.jpg"
comments: true
---

[uppercut.js](http://uppercutjs.com) is a collection of classes, bindings, and helpers that extend [knockout.js](http://knokcoutjs.com). Over the course of the last few years I have spent a large amount of time working on or with Knockout.js. There are features and helpers that I personally wish it had that do not make sense as part of the library as a whole. This is either because it would increase dependency scope, requiring Jquery, or because they are to opinionated about how to preform a certain action.

uppercut.js is just starting out and I'm slowly gathering up all the bits and pieces I have scattered across all my different projects and making some of them more modular. I'll be posting a road map up to [github](https://github.com/osbornm/uppercut) soon but it's mainly getting all the common bindings and helper classes I used moved over, then moving to support AMD.

You can install uppercut.js using either bower `bower install uppercut` or with NuGet `nuget install uppercutjs`. For more information and example of everything avalible head over to the [uppercut.js github page](https://github.com/osbornm/uppercut), but here are a few quick examples of some of my favorite stuff

{% gist osbornm/0b2bae8aacb6e3e497ac %}


text:
Gyroball
=======================

### Code Badges
forthcoming

### Screenshots
forthcoming

### Description
forthcoming

### Models
```
Model 1
```

```
Model 2
```

### Database
```
Collecion 1
```

```
Collection 2
```

### Features
- [x] Node.js
- [x] Angular.js
- [x] Ionic
- [x] Cordova
- [ ] Feature 5
- [ ] Feature 6

### Running Tests
```bash
$ npm install
$ npm test
```

### Collaborators
- [Melanie Fryman](https://github.com/mlfryman)
- [Joy Pratt](https://github.com/JoyP)
- [Dennis Stanley](https://github.com/tdsjr82)

### License
[MIT](LICENSE)

repository: mlfryman/gp-gyroball

repo_name: mlfryman/gp-gyroball


text:
# Simple Example

Goose includes several examples to demonstrate load test functionality, including:
 - [Simple](https://github.com/tag1consulting/goose/blob/main/examples/simple.rs)
 - [Simple Closure](https://github.com/tag1consulting/goose/blob/main/examples/simple_closure.rs)
 - [Simple With Session](https://github.com/tag1consulting/goose/blob/main/examples/simple_with_session.rs)
 - [Drupal Memcache](https://github.com/tag1consulting/goose/blob/main/examples/drupal_memcache.rs)
 - [Umami](https://github.com/tag1consulting/goose/tree/main/examples/umami)

repository: finnefloyd/goose

repo_name: finnefloyd/goose


text:
---
templateKey: blog-post
title: The perils of perimenopausal procrastination
date: 2021-09-09T14:21:54.025Z
description: Why I blame perimenopause for my inability to start a website about
  perimenopause
featuredpost: true
featuredimage: /img/inks-in-water-color-abstract-explosion-bwlrlaflwv.jpeg
tags:
  - perimenopause
  - stories
  - brain fog
---
![erratic cycles logo](/img/inks-in-water-color-abstract-explosion-bwlrlaflwv.jpeg)

## Welcome to Erratic Cycles - tales of perimenopause!

I had the idea to start this site about perimenopause stories over a year ago \[a lot has happened since then].

The irony is, the symptoms of perimenopause that gave me the idea to create the Erratic Cycles website also meant I didn't actually make the website ... ok, to be completely clear - my lack of achievement was largely due to the usual putting it off/finding excuses, of course.

So, as an introduction, I'm going to list my symptoms. Some may be due to  perimenopause. Some may not. I'm no doctor.

**Brain fog** - inability to make lots of decisions, feeling like my brain has started wearing thick cement boots, covered in soft fur

**Irritability** - not new, but I'm now taking this opportunity to blame it on perimenopause instead of my star sign :)

**Hot flushes** - yes, these lovely ladies.  I actually *like* being hot and sweaty, It makes me feel like I'm on holiday. But I have taken to ripping of my t-shirt / covers at night and lying there panting and wondering why there's no mosquito net or the sounds of palm trees and waves outside my window. Which leads me nicely to...

**INSOMNIA** - again, not new. But it's changed - I used to get up twice a night for a wee (I drink too much water), now I get up three times and lie there panting - t-shirt on, t-shirt off - heart racing, wide awake... it's very boring.

***\[Hot flush break]***

**Anxiety / depression.** Ugh - who can be bothered. They come and go. I think I'll leave that to another day.

And of course, the reason for the name of this website - drum roll - **Erratic Cycles** - periods that pop in like a forgetful aunt (i.e. me) whenever they remember. And when they do come, they sometimes bring their friends and have a party in my pants, lasting for days or weeks. The thunderous rush of another gush. Other times, the period just sticks its head round the door - "coo-ee, just messing with you!!" and then off it goes.\
\
I would really love to hear about your experiences.  See you soon.

repository: AttyC/erraticcycles

repo_name: AttyC/erraticcycles


text:
# Installing `Az` Modules

## Overview

By default, modules are installed from the [PowerShell Gallery](https://www.powershellgallery.com/), which is the central repository for accessing published PowerShell modules (equivalent to NuGet for .NET, npm for JavaScript, etc.). With the [`Install-Module`](https://docs.microsoft.com/en-us/powershell/module/powershellget/install-module) cmdlet, users can specify which modules they want to install; in addition, users can provide the `-Repository` parameter to specify which repository they want to install modules from (if this parameter isn't provided, then the cmdlet defaults to using PowerShell Gallery).

## Removing Modules

In some cases, existing `Az` modules will need to be removed before a new version can be installed. Since the `Uninstall-Module` cmdlet does not currently remove modules and their dependencies, users will need to manually delete the folders where the modules were installed to.

To figure out if you have any `Az` modules currently installed, as well as the location they are found, use the following command:

```
Get-Module -Name Az* -ListAvailable
```

This command will list all modules installed on your machine that are found in your `$env:PSModulePath`. Deleting the corresponding `Az.*` folders in the file explorer will remove these modules from your machine.

## Registering Repositories

In some cases, users will need to install modules from a different repository than the PowerShell Gallery -- this can be a new endpoint, or even a local folder containing `.nupkg` files. In either case, the [`Register-PSRepository`](https://docs.microsoft.com/en-us/powershell/module/powershellget/register-psrepository) cmdlet should be used to create a new local repository that can be used to install modules from.

Below is an example of registering a new repository from a local folder containing `.nupkg` files:

```
Register-PSRepository -Name "{{repository_name}}" -SourceLocation "{{folder_with_nupkg_files}}" -PackageManagementProvider NuGet -InstallationPolicy Trusted
```

### Registering the Test Gallery

Before a module is published to the PowerShell Gallery, it must first be published to the [Test Gallery](https://www.poshtestgallery.com/) to ensure there are no problems during the publishing and installation process. If you ever need to use this gallery for testing an installation, first register it by running the following command:

```
Register-PSRepository -Name TestGallery -SourceLocation https://poshtestgallery.com/api/v2 -PackageManagementProvider NuGet -InstallationPolicy
```

Modules can then be installed from this gallery by providing "TestGallery" to the `-Repository` parameter for the `Install-Module` cmdlet.

## Installing Modules

To install a module from the PowerShell Gallery, run the following command:

```
Install-Module -Name "{{module_name}}"
```

To install a module from a specific repository, run the following command:

```
Install-Module -Name "{{module_name}}" -Repository "{{repository_name}}"
```

### Installing `Az` Modules

To install the latest stable `Az` modules from the PowerShell Gallery, run the following command:

```
Install-Module -Name Az
```

To install a specific `Az` module from the PowerShell Gallery, run the following command:

```
Install-Module -Name Az.{{service}}
```

To install a preview version of a specific `Az` module, run the following command:

```
Install-Module -Name Az.{{service}} -RequiredVersion {{version}} -AllowPrerelease
```

_Note_: to install preview versions of modules, version 1.6.0 or greater of the `PowerShellGet` module will be needed. Users can run the following command to get the latest version of this module:

```
Install-Module -Name PowerShellGet -Force
```

Full documentation around installing the `Az` module can be found in the [_Install the Azure PowerShell module_](https://docs.microsoft.com/en-us/powershell/azure/install-az-ps) article.

repository: wastoresh/azure-powershell

gha_language: C#

repo_name: wastoresh/azure-powershell


text:
# FAQ

## Plugin running on wrong engine

You have several options

* Disconnect or delete the engine the plugin is connecting to see [here](#managing-plugin-engines)).
* In the plugin menu (clicking on the little puzzle symbol left of the plugin name), select the appropriate engine.

## Remove conda environment

At one point, your conda environment might get corrupted. You can easily remove it, and create a new one

1. Open anaconda terminal
0. **Activate base environment**: `conda deactivate`
0. **Remove `fq-imjoy` environment**: `conda env remove --name fq-imjoy`

## Specify your own Jupyter token

You can specify your own token `yourtoken`

``` bash
imjoy --jupyter --token yourtoken
```

When launched like this, you will not get the full Jupyter URL in the terminal, but `http://localhost:8888/?token=...`.

When copying this link to the ImJoy app for the first time you have to replace the `...` by the token you actually specified.

The next time you start jupyter with `imjoy --jupyter` your custom token will be used.

repository: rachel-kt/fq-imjoy

repo_name: rachel-kt/fq-imjoy


text:
# Puck.js Media Control
Remote control to pause, resume, and rewind audiobooks playing from my phone.

* Short press toggles play/pause. Light blinks green.
* Long press rewinds 30 seconds. Light blinks blue.
  * It actually sends 3x "previous track" commands, but I have my [audiobook player](https://play.google.com/store/apps/details?id=ak.alizandro.smartaudiobookplayer) configured to interpret each of those as 10-second rewind.

![demo](demo.gif)

Why?

I have some otherwise great earbuds that have frusturatingly-unreliable touch controls. This gives me a physical button that reliably performs my most common two tasks.

This code is meant to run on a [Puck.js](https://www.puck-js.com/) via [Espruino](https://www.espruino.com/).

[![Puck.js](http://www.espruino.com/refimages/Puckjs_board.jpg)](https://www.puck-js.com/)


text:
# Typescript

Overmind is written in Typescript and it is written with a focus on your keeping as little time as possible helping Typescript understand what your app is all about. Typescript will spend a lot more time helping you.

## Two typing approaches

### 1. Declare module

The most straight forward way to type your application is to use the **declare module** approach. This will work for most applications, but might make you feel uncomfortable as a harcore Typescripter. The reason is that we are overriding an internal type, meaning that you can only have one instance of Overmind running inside your application.

```marksy
h(Example, { name: "guide/typescript/declare" })
```

Now you can import any type directly from Overmind and it will understand the configuration of your application. Even the operators are typed.

```marksy
h(Example, { name: "guide/typescript/declare_imports" })
```

### 2. Explicit typing
You can also explicitly type your application. This gives more flexibility.

```marksy
h(Example, { name: "guide/typescript/explicit" })
```

You only have to set up these types once, where you instantiate Overmind. That means if you use multiple namespaced configuration you still only create one set of types, as shown above.

Now you only have to make sure that you import your types from this file, instead of directly from the Overmind package.

```marksy
h(Example, { name: "guide/typescript/explicit_import" })
```

```marksy
h(Notice, null, "The Overmind documentation is written for implicit typing. That means whenever you see a type import directly from the Overmind package, you should rather import from your own defined types")
```

## Linting

When you are using TSLint it is important that you use the official [Microsoft Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin) for VS Code.

## Actions

The action type takes either no arguments or a single argument. If you give no arguments to the action it will be typed as not expecting an argument at all. When you do type with an argument that is the type of the **value** passed as the second argument to the function .

```marksy
h(Example, { name: "guide/typescript/action" })
```

## Operators

Operators is like the **Action** type, it can take an optional input, but it can also have an output. By default the output of an operator is the same as the input. Most operators has its output the same as the input, meaning the incoming values just passes through.

```marksy
h(Example, { name: "guide/typescript/operatorinputsandoutputs" })
```

Now what is important to understand is that the **Operator** type is used with all operators in Overmind, cause all of them is about "passing a value to the next operator". The type arguments you give to **Operator** has to match the specific operator you use though. So for example if you type an **action** operator with a different output than the input:

```marksy
h(Example, { name: "guide/typescript/wrongoperator" })
```

Typescript yells at you, because this operator just passes the value straight through.

Typically you do not think about this and Typescript rather yells at you when the value you are passing through your operators is not matching up.

### Caveats
There are two **limitations** to the operators type system which we are still trying to figure out:

#### 1. Partial input type

For example:

```marksy
h(Example, { name: "guide/typescript/operatorpartial" })
```

There is no way to express in Typescript that you should uphold this partial typing of **filterAwesomeUser** and still pass the inferred input, **User**, as the output. This will give a typing error.

This can be handled by making the operator a factory instead:

```marksy
h(Example, { name: "guide/typescript/operatorpartial_solution" })
```

#### 2. Infer input

You might create an operator that does not care about its input. For example:

```marksy
h(Example, { name: "guide/typescript/operatorinfer" })
```

Composing **doSomeStateChange** into the **pipe** gives an error, cause this operator expects a **void** type.

To fix this you can do the same trick as above, though you do not need to pass in the type, it will be inferred:

```marksy
h(Example, { name: "guide/typescript/operatorinfer_solution" })
```

#### Summary
Typescript is not functional, it is object oriented and it is very difficult to make it work with this kind of APIs. We have high hopes though cause Typescript is evolving rapidly and Microsoft is dedicated to make this an awesome type system for JavaScript. If you got mad Typescript skills, please contact us to iterate on the type system and make this stuff work :-)

repository: jkleiser/overmind

repo_name: jkleiser/overmind


text:
# Legitbot [![Build Status](https://secure.travis-ci.org/alaz/legitbot.png?branch=master)](http://travis-ci.org/alaz/legitbot) [![Gem Version](https://badge.fury.io/rb/legitbot.svg)](https://badge.fury.io/rb/legitbot)

Ruby gem to check if an IP really belongs to some bot, typically a search
engine. This can of much help if one wants to protect his/her web site from
malicious scanners who pretend to be e.g. a Googlebot.

## Usage

Suppose you have a Web request and you'd like to make sure it's not from a fake
search engine:

```ruby
bot = Legitbot.bot(userAgent, ip)
```

`bot` will be `nil` if no bot signature was found in the `User-Agent`. Otherwise,
it will be an instance with methods

```ruby
bot.detected_as # => "Google"
bot.valid? # => true
bot.fake? # => false
```

Sometimes you already know what search engine to expect. For example, you may
be using [rack-attack](https://github.com/kickstarter/rack-attack):

```ruby
Rack::Attack.blocklist("fake Googlebot") do |req|
  req.user_agent =~ %r(Googlebot) && Legitbot::Google.fake?(req.ip)
end
```

## Supported

* [Google crawlers](https://support.google.com/webmasters/answer/1061943)
* [Yandex robots](https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.xml)
* [Bingbot](https://blogs.bing.com/webmaster/2012/08/31/how-to-verify-that-bingbot-is-bingbot/)
* [Baidu spider](http://help.baidu.com/question?prod_en=master&class=498&id=1000973)
* [DuckDuckGo bot](https://duckduckgo.com/duckduckbot)
* [Facebook crawler](https://developers.facebook.com/docs/sharing/webmasters/crawler)

## Issues, problems, plans

* Rails middleware
* More testing for Facebook
* Review for thread safety
* Make it possible to reload Facebook IP ranges
* Bots masquerading as someone else, e.g. `Telegram (like Twitter)` - what to do?

## License

Apache 2.0

## References

* I have initially created Play Framework version in Scala: [play-legitbot](https://github.com/osinka/play-legitbot)
* Article [When (Fake) Googlebots Attack Your Rails App](http://jessewolgamott.com/blog/2015/11/17/when-fake-googlebots-attack-your-rails-app/)
* [Voight-Kampff](https://github.com/biola/Voight-Kampff) is a Ruby gem which
  detects bots by `User-Agent`
* [browser](https://github.com/fnando/browser) is a Ruby gem which may tell
  you if the request comes from a search engine.

repository: nickpoorman/legitbot

repo_name: nickpoorman/legitbot