text:
bmr
===

Evolution of metabolic scaling
===

This repository is intended to accompany the following manuscript:

Uyeda, JC; Pennell, MW; Miller, ET; Maia, R and CR McClain. In press. The evolution of energetic scaling across the vertebrate tree of life. The American Naturalist.

The primary document providing scripts is ./R/ManuscriptNotebook.Rmd which is an Rstudio markdown notebook.

repository: uyedaj/bmr

repo_name: uyedaj/bmr


text:
# ember-class-list

Concatenate really long dynamic class lists without worrying about whitespace.

### Without ember-class-list

```hbs
<div class="Btn
  {{if this.loaded "active"}}
  {{this.theme}}
">
  Update Photo
</div>
```
_output:_
```html
<div class="Btn

  dark
">
  Update Photo
</div>
```

### With ember-class-list

```hbs
<div class={{class-list
  "Btn"
  {{if this.loaded "active"}}
  {{this.theme}}
>
  Update Photo
</div>
```
_output:_
```html
<div class="Btn dark">
  Update Photo
</div>
```

## Compatibility

* Ember.js v3.4 or above
* Ember CLI v3.4 or above
* Node.js v10 or above

## Installation

```
ember install ember-class-list
```

## Usage

[Longer description of how to use the addon in apps.]

## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.

## License

This project is licensed under the [MIT License](LICENSE.md).

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# ubuntu1604_python36_installer
Commands required to install python3.6 with pip on Ubuntu 16.04

### How to run
```
make build
```

branch_name: refs/heads/master


text:
#End Credits in jQuery

###Version 2.0

Movie end credits for your website!

Based on [original version](https://github.com/Malkafly/endcredits) by Daniel Malkafly.

---

Basically re-wrote everything. Still using the same html from the original as the example though.

Changes from original version listed below:

```
+ complete re-write
+ hold mouse button down for one second to speed up scrolling
^ animation time dynamically calculated based on credits height
^ css: credits text is unselectable
^ css: titles is now fixed position and full screen
* credits reset their position properly after closing
```

repository: AndrewDavid/endcredits

repo_name: AndrewDavid/endcredits


text:
# rail-fit

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Description

A fitness tracker that tracks workouts and the exercises the user completed for that session. The app also records the amount of weight lifted, reps, distance, and duration. It uses mongoDB, mongoose, and express for the backend.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Questions](#questions)

## Installation

1. Clone repo

2. ```npm i```

3. ```npm start```

## Usage

To seed database with working data:

```npm run seed```

## License

This project is distrubuted under the following licenses:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Questions

Github: [jlamonade](https://github.com/jlamonade)

Email: nyjasonlam@gmail.com

repository: jlamonade/rail-fit

repo_name: jlamonade/rail-fit


text:
# Paspalidium constrictum (Domin) C.E.Hubb. SPECIES

#### Status
ACCEPTED

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

#### Published in
null

#### Original name
Panicum constrictum Domin

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
Kotlin
------
>Feature tests:
1. [Arrow](https://arrow-kt.io)
2. [Hoplite](https://github.com/sksamuel/hoplite)
3. [Ktor](https://ktor.io)
4. [Exposed](https://github.com/JetBrains/Exposed)
5. [Json](https://kotlinx-serialization-json)
6. [JavaFX](https://openjfx.io/)
7. [Java Swing](https://docs.oracle.com/javase/tutorial/uiswing/index.html)

Apps
----
>The following apps are available:
1. console.App
2. http.ChuckNorrisClient
3. http.NowServer
4. javafx.ChuckNorrisFxApp
5. swing.ChuckNorrisApp
>The default app is: console.App See the Run section below.

>**Note:** Unlike Scala Sbt, Gradle does not provide a list of available apps to run.

Gradle
------
>To upgrade Gradle, edit the **version number** in this file:
* gradle/wrapper/gradle-wrapper.properties
>**Note:** Also validate Preference > ... > Build Tools > Gradle for the correct **current** Gradle version.

Build
-----
>Use Intellij gradle to clean and build. Or use gradle:
* gradle clean build
>Or use gradlew:
*  ./gradlew clean build -Pkotlin.experimental.tryK2=true

Test
----
>Use Intellij gradle to clean, build, run and view tests. Or use gradle:
* gradle clean build test
     * view results courtesy of com.adarshr.test-logger plugin
     * optionally open ***build/reports/tests/test/index.html*** in a browser

Run
---
>To run the default app ( **console.App** ):
1. gradle run
>To selectively run any app:
1. select
2. right click
3. select run '*Kt'

Logs
----
1. build/kotlin.log
2. build/kotlin.test.log

Resources
---------
1. [Kotlin Docs](https://kotlinlang.org/docs/home.html)
2. [Kotlin Quick Guide](https://github.com/Mr-Skully/kotlin-quick-guide)

repository: objektwerks/kotlin

repo_name: objektwerks/kotlin


text:
# Swagger Test Templates

[![Build Status](https://travis-ci.org/apigee-127/swagger-test-templates.svg?branch=master)](https://travis-ci.org/apigee-127/swagger-test-templates)

> Generate test code from a [Swagger](http://swagger.io) spec(version 2.0)

## Usage

Install via npm

```
npm install --save swagger-test-templates
```

Use your [Swagger](http://swagger.io) API spec file to generate test for your API.

```javascript
var stt = require('swagger-test-templates');
var swagger = require('/path/to/swagger.json');
var config = {
  assertionFormat: 'should',
  testModule: 'supertest',
  pathName: ['/user', '/user/{id}'],
  loadTest: [{pathName:'/user', operation:'get', load:{requests: 1000, concurrent: 100}}, { /* ... */ }],
  maxLen: 80,
  pathParams: {
    "id": "0123"
  }
};

// Generates an array of JavaScript test files following specified configuration
stt.testGen(swagger, config);
```

## API

`swagger-test-templates` module exports a function with following arguments and return values:

### Arguments
* **`assertionFormat`** *required*: One of `should`, `expect` or `assert`. Choose which assertion method should be used in output test code.
* **`testModule`** *required*: One of `supertest` or `request`. Choose between direct API calls (`request`) vs. programatic access to your API (`supertest`).
* **`pathName`** *required*: List of path names available in your Swagger API spec used to generate tests for. Empty array leads to **all paths**.
* **`statusCodes`** *optional* Array with status codes to generate tests for. Useful for generating only happy-flow tests. Excluding this param will generate tests for all responses.
* **`loadTest`** *optional*: List of objects info in your Swagger API spec used to generate stress tests. If specify, pathName & operation are **required**. Optional fields requests defaults to `1000`, concurrent defaults to `100`.
* **`maxLen`** *optional*: Maximum line length. If set to `-1`, descriptions will not be truncated. Defaults to `80`.
* **`pathParams`** *optional*: Object containing the values of a specific path parameters.
* **`templatesPath`** *optional* String indicating a custom handlebars-template path for generating the tests. Note: copy all the templates to your custom directory, this is a 'all-or-nothing' path
* **`requestData`** *optional* Array containing data to send with the request See section on requestData for more details

### Return value
An array in which each string is content of a test file and the file name. Use this information to write those files to disk.

You can send this mock data along with the tests generated by this module by filling the `requestData` property of the module.
 The mock data needs to have with the following structure:

```javascript
{
   '/endpoint': {
       operation: {
           'responseCode': [{ body: {}, description:'some description of the data']
       }
   }
 }

```

so, for example this could be:

```javascript
{
     '/pet': {
         post: {
             '200': [{
               body: {
                  id: 1,
                  otherProperty: 'some property that is a string'
                 },
                 description: 'the description for this data'
               }]
         },
         get: {
            '200': [ {
              guid: 'some_string_to_place_in_path',
              anotherPathParam: 100,
              description: 'valid path or query parameters'
            }]
         }
     }
 }
```

Note: for get-requests matching data will be transferred to the pathParams. So setting config.pathParams directly will have the same effect (see above).

Every mockData item in the `responseCode` array will be used to generate a test. The description will be added to the "it" function for reference.
##License
[MIT](/LICENSE)

gha_language: HTML


text:
# grpc-tutorial for deepthrought
https://github.com/ymmt2005/grpc-tutorial の実装

## require
- protoc
- protoc-gen-go
- protoc-gen-doc
- protoc-gen-grpc

## usage
### build
```shell
make
```

### run server
```shell
./bin/server
```

### run client
```shell
./bin/clinet -h
./bin/clinet boot
./bin/clinet infer Life
```

## read proto docs
```shell
make deepthought.html
open deepthought.html
```

gha_language: Go


text:
# Ernest’s work

- [Data Clean](#data-clean)
- [Data Segmentation](#data-segmentation)
- [Regularization](#regularization)
- [Decision Tree](#decision-tree)
- [Logistic Regression](#logistic-regression)
- [Conclusion](#conclusion)

## Data Clean

### hard code to delete useless cols

including:
- EmployeeCount
- EmployeeNumber
- Over18
- OverTime

### delete repeat data

The new dataSet named entireDataSet\_Ernest.csv is created in data/data\_Ernest dict.

### compare information gain and information gain ratio

/src/models/decisionTree/algorithm\_Ernest/getGainRatio_Ernest.py is used to calculated for each Feature's information gain and information gain rate, the results saved in / references. We can use this indicator to filter out useless features.

## Data Segmentation

The data set is randomly divided into training set and test set in the ratio of 3: 1.

The new dataSets are in data/data\_Ernest dict.

## Regularization

Regularization.py is used to normalize the data, it transform a value into a new value between 0 and 1. The new value between 0 and 1 is obtained by calculating the ratio of the value to the difference between the maximum value and the minimum value of the feature.(This work is based on Ted's quantified data.)

## Decision Tree

### Brief Introduction

In this part, the following scripts are used to build the decision tree:

- API\_Ernest.py
- decisionTree.py
- postpruning.py
- testTree.py

API\_Ernest.py saves the main common functions for this part.

decisionTree.py is used to build the decision tree by using train Dataset. The decision tree will be created in /models dict.

postpruning.py is used to do postpruning on the decision tree to improve its generalization.

testTree.py can be used to test the decision tree by using test data set.

/models/decisionTree\_Ernest is used to save the decision tree while decisionTree\_Postpruninged\_Ernest is used to save the postpruninged tree.

### Usage

- run src/data/devideData\_hold-out\_Ernest.py to devide the whole data set.
- run src/models/decisionTree/algorithm\_Ernest/decisionTree.py to build decision tree.
- run src/models/decisionTree/algorithm\_Ernest/postpruning.py to do postpruning on the tree.
- run src/models/decisionTree/algorithm\_Ernest/testTree.py to test.

### Main Algorithm

#### How to select best node for the three

Firstly, calculate information gain of all left features on this node. Then calculate the information gain ratio for the features above the average of information gain. Then compare these infomation ratio and select best feature.

#### How to handle continuous values

Using dichotomies and greedy algorithms, select the demarcation point that maximizes the current information gain.

#### Pruning

The reason why use postpruning is that it can better improve the generalization ability, and the current data less, making the pruning process time will not be too long

### Result

The accuracy was improved by pruning. However, it is still around 84%.

## Logistic Regression

### Brief Introduction

In this part, the logistic.py can be used to run the logistic regression algorithm.

This training is mainly based on mathematical projections.

### Main Algorithm

Based on Sigmoid function, we can get the expression of logistic regression. Then we can use maximum likelihood method and get a expression. We can use different methods on how to get the unknown parameter of this expression, such as the gradient descent method and Newton's method. In this script, we have used Newton's method.

### Unbalanced data

We found that there was a very unbalanced situation with the data, which could affect the results. Therefore, we adjust the threshold of judgment according to the ratio of positive and negative training data.

### Result

The result is reasonable, its accuracy is around 87%. It might be improved if we improve features.

## Conclusion

The initial result is satisfactory but still needs to be further improved.

A test

2en test

gha_language: Python

gha_license_id: MIT


text:
# Overview

| Artifact                                                | Platform                  | Description                                                  |
| ---                                                     | ---                       | ---                                                          |
|<EMAIL_ADDRESS>|
Linux 64-bit
   | Checksum for the Linux executable.                           |
|<EMAIL_ADDRESS>|
Linux 64-bit
   | Linux executable with auto-completion script for bash shell. |
|<EMAIL_ADDRESS>|
MacOs 64-bit
   | Checksum for the MacOS executable.                           |
|<EMAIL_ADDRESS>|
MacOs 64-bit
   | MacOS executable with necessary system libraries.            |
|<EMAIL_ADDRESS> |
Windows 64-bit
 | Checksum for Windows executable.                             |
|<EMAIL_ADDRESS>    |
Windows 64-bit
 | Windows executable with necessary DLLs.                      |

# Installation Instruction

## Linux 64-bit

1. Install [jormungandr@X.Y.Z](https://github.com/input-output-hk/jormungandr/releases/tag/vX.Y.Z) from the official repository.

2. Download<EMAIL_ADDRESS>and uncompress it in a directory that is on your `$PATH`, e.g. `/usr/local/bin`.

  ```bash
  $ curl -L<EMAIL_ADDRESS>| tar xz -C $HOME/.local/bin
  ```

3. (optional) Install the bash/zsh auto-completion script:

  ```bash
  $ mv $HOME/.local/bin/cardano-wallet.sh > /etc/bash_completion.d/cardano-wallet.sh
  $ source /etc/bash_completion.d/cardano-wallet.sh
  ```

4. Start `cardano-wallet --help` and see available parameters.

#### TroubleShooting

  cardano-wallet: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

`libcrypto 1.0.0` is no longer shipped with RHEL for a while (since ver. 6) and
SuSE. On these distributions, it is impossible to install it using native
package manager (e.g. `yum`).

One possible work-around is to create an artificial symbolic link from a newer version of `libcrypto`:

```bash
sudo ln -s /usr/lib64/libcrypto.so.1.1.1 /usr/lib64/libcrypto.so.1.0.0
```

Alternatively, one may also try using the docker image instead.

## Mac OS 64-bit

1. Install [jormungandr@X.Y.Z](https://github.com/input-output-hk/jormungandr/releases/tag/vX.Y.Z) from the official repository.

2. Download<EMAIL_ADDRESS>and uncompress it in a directory that is on your `$PATH`, e.g. `/usr/local/bin`.

*Note:* Make sure all `*.dylib` files are in the same directory as `cardano-wallet` binary.

## Windows 64-bit

1. Install [jormungandr@X.Y.Z](https://github.com/input-output-hk/jormungandr/releases/tag/vX.Y.Z) from the official repository.

2. Download<EMAIL_ADDRESS>and uncompress it in a directory that is on your `%PATH%`.

## Docker

Since vYYYY-MM-DD, Docker images are available for the wallet backend and published on [hub.docker.com](https://hub.docker.com/repository/registry-1.docker.io/inputoutput/cardano-wallet).

Assuming `docker` is installed on the host machine, go through the following steps:

1. Pull the `docker` image from docker-hub:

  ```bash
  $ docker pull inputoutput/cardano-wallet:YYYY.MM.DD-jormungandr
  ```

2. Interact with the image using `docker run`:

  ```bash
  $ docker run inputoutput/cardano-wallet:YYYY.MM.DD-jormungandr --help
  ```

# Known Issues

# Key Features

## Command-Line

## Server

## Internal

## Known Limitations

# Documentation

| Link                                                                                | Audience                                                   |
| ---                                                                                | ---                                                        |
| [API Documentation](https://input-output-hk.github.io/cardano-wallet/api/vYYYY-MM-DD)                         | Users of the Cardano Wallet API                            |
| [Haddock Documentation](https://input-output-hk.github.io/cardano-wallet/haddock/vYYYY-MM-DD)                 | Haskell Developers using the `cardano-wallet` as a library |
| [CLI Manual](https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface/<revision>) | Users of the Cardano Wallet API                            |

# Changelog

# Bug Fixes

# Weekly Reports

# Signatures

Name                           | Role                | Approval
---                            | ---                 | ---:
Matthias Benkort @KtorZ        | Technical Team Lead | :hourglass:
Piotr Stachyra @piotr-iohk     | QA Engineer         | :hourglass:
Tatyana Valkevych @tatyanavych | Release Manager     | :hourglass:

[new]: https://raw.githubusercontent.com/input-output-hk/cardano-wallet/master/.github/images/badge-new.png

repository: ksemaev/cardano-rest

repo_name: ksemaev/cardano-rest


text:
# NEAR Community
> Coordination repository of NEAR Community

The content of this repository, the issue tracker, and the pull requests are used to coordinate the efforts towards making Near Community a great place.
Below you can find a list of resources to help you get started.

## Quick Links

### Communication Channels

* [Telegram Announcement Channel](https://t.me/cryptonear)
* [Discord Community Channel](https://discord.gg/8NBNhav)

And sign-up to our [newsletter](https://near.org/newsletter/) to receive all updates summarised right to your inbox.

### Community Meetings

You can find the list of our community meetings [here](https://calendar.google.com/calendar/embed?src=nearprotocol.com_ltk89omsjnc2ckgbtk6h9157i0%40group.calendar.google.com&ctz=America%2FLos_Angeles).

We currently host the following meetings:
* Community Talk -- Bi-weekly events to which we invite founders and researches in the space to introduce their project
* Thursday Jam -- Weekly event to discuss ideas, use cases, and hear from builders across the space
* NEAR Middleware Work Group (Wasm, RPC, Bridge, Runtime, Trie, etc) -- Weekly event
* NEAR Bridge Work Group -- Weekly event
* NEAR Engineering Weekly -- Weekly event

### Community Resources

* [NEAR Blog](https://near.org/blog/)
* [NEAR YouTube Channel](https://www.youtube.com/channel/UCuKdIYVN8iE3fv8alyk1aMw)
* [NEAR Technical Resources](https://near.org/technology/)

### Developer Resources

If you just starting to learn about Near Protocol then please read our [documentation](https://docs.nearprotocol.com/).
To get inspiration, have a look at our [example projects](http://examples.nearprotocol.com/).

If you have any questions, please head over to our [Discord server](https://discord.gg/t5KGGG) or our [NEAR Slack](https://join.slack.com/t/near-community/shared_invite/zt-dqpw6l4l-gMKRRgBsgf92_UkzmyXGWg).

## Join us

### Contributions

We love contributions!

*  Check-out our [contribution guide and examples](https://docs.nearprotocol.com/docs/contribution/contribution-overview)
*  Organise events, create content or code tutorials as part of our [contributor program](https://nearprotocol.com/contributor/)
*  Look for the starter issues on [GitHub](https://github.com/nearprotocol/)

### Community Ideas

We would love to hear your community ideas!

To submit your ideas on how to make the NEAR Community a better place, provide feedback, or propose initiatives, please file an issue in this [community repository](https://github.com/near/community/issues).

If you would like to collaborate on events, please submit an issue in our events [repository](https://github.com/nearprotocol/near-events/issues).

Someone from the core team will get back to you within a week.

## Security

NEAR would ever reach out to you directly and ask you to send funds, share your login credentials, private keys, or other sensitive information.

If you came across vulnerabilities in our code, or you want to flag other security-related concerns, please follow the security protocol detailed [here](https://github.com/nearprotocol/nearcore/blob/master/SECURITY.md).

## Who we are?

Generally, we differentiate between three entities: The NEAR Protocol, the Near Foundation and Near Inc.

#### The NEAR Protocol
A permissionless, Proof-of-Stake blockchain protocol that anyone can access, add transactions to, or read from. The public NEAR blockchain is an instantiation of the reference code at http://github.com/nearprotocol/nearcore, but theoretically, this repo could be forked and deployed as a separate chain, as much as many protocols have done to build upon the core Bitcoin code.

#### The NEAR Foundation
A non-profit foundation headquartered in Switzerland, and is responsible for contracting protocol maintainers, funding ecosystem development, and shepherding core governance of the protocol.

#### Near Inc
A US-based software research and development company that did much of the early development of the protocol and its tooling. While Near Inc does not own or run the NEAR Protocol (which is decentralized), it continues to propose changes to the reference implementation codebase as one of multiple third-party entities performing R&D work for the protocol.

repository: syrusakbary/community

repo_name: syrusakbary/community


text:
This app serves as a native Android notification client for [cronhub.io](https://cronhub.io/). Its only purpose is to deliver status notifications at the alert time specified on CronHub, using their [public API](https://docs.cronhub.io/public-api.html). It does not currently allow users to edit CronHub monitors, but that functionality may be added in the future.

[![Build Status](https://travis-ci.com/fennifith/Cronhub-Monitor.svg?branch=master)](https://travis-ci.com/fennifith/Cronhub-Monitor)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e6685a052a6d4f0681fb7b64f1e26aa2)](https://www.codacy.com/app/fennifith/Cronhub-Monitor)
[![Discord](https://img.shields.io/discord/514625116706177035.svg?logo=discord&colorB=7289da)](https://discord.gg/VgJwGua)

## Screenshots

| Login Screen | Interface | Notification |
|--------------|-----------|--------------|
| ![img](./.github/images/login.png?raw=true) | ![img](./.github/images/interface.png?raw=true) | ![img](./.github/images/notification.png?raw=true) |

## Contributing

See this repository's [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for more information.

## Disclaimer

This app is not endorsed by, related to, or a part of CronHub. It is a third party CronHub client, made by me (me is [James Fenn](https://jfenn.me/) - I am me). It is not an official CronHub app.

repository: fennifith/Cronhub-Monitor

repo_name: fennifith/Cronhub-Monitor


text:
metaswitch-extension
====================

A web extension that adds metacritic scores and links to Nintendo Switch games on eShop pages.

Getting Started
---------------

Ensure that the [metaswitch-server](https://github.com/gilbertw1/metaswitch-server) is running locally. [Instructions Here.](https://github.com/gilbertw1/metaswitch-server)

Using Firefox Developer Edition:
  1. Navigate to `about:debugging`
  2. Click `Load Temporary Add-on..`
  3. Select the `manifest.json` file in this project.


text:
# Docker Monitor
Purpose of this tool is to constantly monitor Docker containers and react when their state changes.

## Example use case
Some of your containers aren't coming back after machine restart or some of them are sometimes quiting. You can install this tool so it will check each couple of seconds if containers are up and if it will detect that they aren't it will run defined commands (so you can bring them back automatically, report the problem etc.).

## Usage
Tool requires JSON configuration file. By default it's `DockerMonitor.json` placed in same folder where tool's executable is but you can override that with `-config` command line argument.

## Configuration
You can find example configuration [here](https://github.com/EvilVir/DockerMonitor/blob/master/Docker%20Monitor/Config.example.json).

Configuration sections:

### Logging
You can log to stdout/console with `Console` logger or to Windows Events Log with `EventLog` logger. Possible logging levels:

* Trace
* Debug
* Information
* Warning
* Error
* Critical

### Docker
Standard way of connecting to Docker's engine is via pipes but you can also use [other means like TCP](https://docs.docker.com/engine/reference/commandline/dockerd/). You need to put address to the Docker's API endpoint in `Url` configuration property. You can also use either `BasicAuthorization` property or `CertificateAuthorization` property to add your authorization credentials.

#### BasicAuthorization configuration
```
{
    "Username" : "",
    "Password" : "",
    "UseTls" true/false
}
```

#### CertificateAuthorization configuration
```
{
    "File": "",
    "Password": ""
}
```

### Groups
This node defines all monitoring groups. Group is well-named set of containers that are monitored as one entity. If any of containers in group falls into certain state, whole group falls. Here's properties breakdown:

* Interval - how often (in seconds) group will be checked.
* Containers - array of container names to be monitored, exactly as they are named in your Docker.
* Actions - dictionary of states and actions to be taken if certain state. As keys of this dictionary you put comma-separated list of states, as value there should be a list of actions to be taken.

For example:

```
 "Nginx": {
      "Interval": 60,
      "Containers": [ "nginx", "nginx2" ],
      "Actions": {
        "AnyDown,AnyMissing": [
          {
            "Type": "ShellCommand",
            "Command": "powershell",
            "Arguments": "docker rm nginx",
            "ErrorDetecting": "ExitCode,StdErr"
          },
          {
            "Type": "ShellCommand",
            "Command": "powershell",
            "Arguments": "docker run -d --name \"nginx\" -p 8080:80 nginx:latest",
            "ErrorDetecting": "Ignore",
            "WorkingDirectory": "C:\\"
          }
        ]
      }
    }
```

This "Nginx" group will be monitored each `60` seconds. If any of two containers `nginx` or `nginx2` are either down or missing two `ShellCommand` actions will be executed in order they are configured above.

Possible states are:

* AnyDown - any container in group is stopped
* AnyUp - any container in group is running
* AnyMissing - any container in group doesn't exists
* AllDown - all containers in group are stopped
* AllUp - all containers in group are running
* AllMissing - all containers in group doesn't exists

You can mix and match these states, actions are executed if _any_ state is detected. So in example above these two shell commands will run when group will be in either `AnyDown` _or_ `AnyMissing` state.

## Running one-time
You can run this tool in one-time-check mode straight from CLI.

```
 DockerMonitor.exe [-config value] [-checknow value]
  - config   : Path to configuration file (string, default=DockerMonitor.json)
  - checknow : Will just check group, which name you need to pass here, and then exit without staying in background (string, default=)
```

## Running as a background service

### Windows
You can use Windows Service wrappers like great [WinSW](https://github.com/kohsuke/winsw) to setup your service wrapper. Here's example configuration for WinSW:

```
<configuration>
  <id>dockermonitor</id>
  <name>Docker Monitor</name>
  <description>Docker Monitor Service</description>
  <executable>%BASE%\bin\DockerMonitor.exe</executable>
  <workingdirectory>%BASE%\bin</workingdirectory>
</configuration>
```

Assuming following folders layout:

```
    |- bin <- folder where you should put all Docker Monitor's files
        |-- ..
        |-- DockerMonitor.exe <-- actual Docker Monitor's executable
        |-- DockerMonitor.json <-- actual Docker Monitor's configuration
        |-- *.* <-- other Docker Monitor's files
    |- DockerMonitor.exe <- copy of WinSW executable renamed
    |- DockerMonitor.xml <- configuration file shown above
```

For instructions on managing that service, check [WinSW repository here](https://github.com/kohsuke/winsw).

### Linux
Actual daemonization depends on your distribution. You can use `system.d` for example.

repository: EvilVir/DockerMonitor

gha_language: C#

repo_name: EvilVir/DockerMonitor


text:
# python 2.5 excercises

## 1. typehints
1. Let `mypy` (use strict checking) to check types in file [python2.5.exercise.mypy.py](python2.5.exercise.mypy.py):
1. Add proper type typehints according to report from previous step

## 2. test driven development (TDD)

> Don't implement functionality as first step. Write tests and after that implement them.
> See https://en.wikipedia.org/wiki/Test-driven_development#Test-driven_development_cycle

Implement class `PasswordVerificator` that you can find at plenty forms to
create new registration on internet. It took two inputs from user and has following capabilities:
1. Given passphrase has to be min 5 chars long.
1. Took two inputs from user to decide if they are same or not.
1. Calculate *strenght* by simple metric that will sum points by these rules:
   1. If passphrase contains a number, (**+1** point)
   1. If passphrase contains a `@` char, (**+1** point)
   1. If length of passphrase is bigger than 7 chars, (**+1** points)
   1. If passphrase contains a sequence `abc`, (**-2** points)

Scenario:
User will provide two input passphrases. Purpose of second passphrase is
to notify user, that there is a typo in his input, and it will not be further
accepted.

After these two inputs will be given, the class provides a way to check rules
(defined above) and tell user what is the strength of given passphrase as sum of points.

#### Wider context for consideration
Don't implement anything from following paragraph!
> We want to calculate statistics from user's behaviour to be able to tell
how mamy people do typos, how strong/weak passwords they are using...

repository: mpavlase/python-workshop

repo_name: mpavlase/python-workshop


text:
# Ramalina geniculata var. compacta Müll. Arg. VARIETY

#### Status
SYNONYM

#### According to
Index Fungorum

#### Published in
Bull. Herb. Boissier 4: 88 (1896)

#### Original name
Ramalina geniculata var. compacta Müll. Arg.

### Remarks
null

path: /life/Fungi/Ascomycota/Lecanoromycetes/Lecanorales/Ramalinaceae/Ramalina/Ramalina inflata/ Syn. Ramalina geniculata compacta/README.md


text:
You have found a machine which, when fed with two numbers  `s`  and  `e`, produces a strange code consisting of the letters  `a`  and  `b`. The machine seems to be using the following algorithm.

1.  Check if  `s`  is less than  `e - 1`. If so, continue to step  `2`. If not, exit.
2.  Increment  `s`  by  `1`
3.  Decrement  `e`  by  `1`
4.  If this is the first letter you're producing, produce  `a`. Otherwise produce a letter different from the one you last produced (only  `a`  and  `b`  may be produced)
5.  go to step  `1`.

You are to write a function that simulates the workings of the machine.

Example

For  `s = 4`  and  `e = 8`, the output should be
`strangeCode(s, e) = "ab"`.

Input/Output

-   **[execution time limit] 3 seconds (cs)**

-   **[input] integer s**

    _Guaranteed constraints:_
    `4 ≤ s ≤ 20`.

-   **[input] integer e**

    _Guaranteed constraints:_
    `4 ≤ e ≤ 20`.

-   **[output] string**

    -   A string of the letters the machine produced.

repository: M-Ekrim/codeSignal

repo_name: M-Ekrim/codeSignal


text:
# vite-jetbrains-plugin

> Migrate to https://github.com/rxliuli/web-project-tools/tree/master/jetbrains-plugins/vite-jetbrains-plugin

<!-- Plugin description -->
The integration of Vite scaffolding in JetBrains IDE is mainly responsible for creating a project directly using the IDE's boot panel.
<!-- Plugin description end -->

![image](https://user-images.githubusercontent.com/24560368/119949505-85906b00-bfcc-11eb-9cee-d1082f4923d0.png)

## Roadmap

- Support for using community modules
- Support for creating a module for a monorepo project via the right-click menu
- Automatic installation of dependencies after generation

repository: rxliuli/vite-jetbrains-plugin

repo_name: rxliuli/vite-jetbrains-plugin


text:
# XenonInc

A set of parts that allow for greater explotitaion of Xenon Gas

# Parts List

* Xenon Gas Drill (textures from The Blue Drill)[https://spacedock.info/mod/292/The%20Blue%20Drill]

* Xenon Atmospheric Harvester (from The Blue Scoop)[https://spacedock.info/mod/294/The%20Blue%20Scoop]

* Intake Air to Xenon converter

* Mk2 xenon fuselage

* Short Mk3 xenon fuselage

* Long Mk3 xenon fuselage

* Oceanic Xenon Harvester (models + textures from Stockalike Mining Expansion)[https://spacedock.info/mod/354/Stockalike%20Mining%20Extension]

* Xenon Fuel Cell (models + textures from Stockalike Mining Expansion)[https://spacedock.info/mod/354/Stockalike%20Mining%20Extension]

repository: HD-Projects/XenonInc

repo_name: HD-Projects/XenonInc


text:
---
uid: 'aws-services-events'
title: 'Listening To Events By AWS Services'
category: 'AWS'
draft: false
tags:
  - aws
  - eventbridge
  - s3
  - cloudtrail
  - serverless
  - cloudwatch
  - cloudwatch events
excerpt: "We recently needed to run some custom logic whenever one of our SQS-Lambda integration was disabled. In fact, at times there are use cases when we need to take some action when something happens in our AWS account. Here's how we use EventBridge to do just that."
---

An AWS account captures a lot of events. Like when someone logs in, creates a VPC, sees the list of EC2 instances, deletes an s3 bucket, etc. The list of events
is endless which is not surprising when you consider the number of services it has.

Even in a new account, you can see the list of a lot of these events by going to the AWS **CloudTrail's** dashboard and then clicking on the Event History tab as seen in the image below.

![CloudTrail Dashboard](./cloudtrail.png)

Before we look at how to listen to these events we first need to understand what events are and how they are created.

There are three types of events available to us via **CloudTrail**.

1. [Management Events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html)
2. [Data Events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
3. [Insights Events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html)

> Management events provide visibility into management operations that are performed on resources in your AWS account. These are also known as control plane operations. - _From the AWS Docs_

In other words, anytime a configuration change or activity is captured in an AWS account it's most likely to be a Management Event.

> Data events provide visibility into the resource operations performed on or within a resource. These are also known as data plane operations. Data events are often high-volume activities. - _From the AWS Docs_

You can think of Data Events as events that capture data-centric operations like uploading something to an S3 bucket, payload for lambda invocations, DynamoDB calls that modifies data.

For our use case, we wanted to be notified whenever one of our **SQS-Lambda** Integration was disabled. This is a configuration change which means that the event for that would be a management event.

CloudTrail is not the only service that deals with events in an AWS account. There is another service called **EventBridge** (used to be called CloudWatch Events).

I won't go into details of how EventBridge works but at a high level, it has a component which is called an **EventBus** which is similar to a conveyor belt in a factory. When you create a new AWS account, it comes with a pre-installed conveyor belt i.e a default EventBus. Now a lot of AWS services send events to EventBridge via the default EventBus. You can take a look at the full list [here](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html).

So now we know that CloudTrail records three types of events and EventBridge also receives events from some AWS services. Note that an event may be recorded by both the services. For example, when you shut down an EC2 instance, that event is recorded by CloudTrail, and EC2 service also sends that event natively to EventBridge.

CloudTrail supports much more events than the events that are sent by AWS services to EventBridge.

**But how does CloudTrail supports so many events?**

One reason is that it is older than EventBridge and the second is that because CloudTrail records API calls to our account whether they are being made by us or by AWS itself. That's how it can record a lot of events because most of the events are a result of an API call being made to our AWS account.

One interesting thing about these two services is that you can also set up CloudTrail to send all events that it captures to EventBridge. All the events in EventBridge that are sent by CloudTrail have the value of the field `detail-type` set to `AWS API Call via CloudTrail`.

Here's a diagram to illustrate the event flow in EventBridge.

![EventBridge CloiudTrail](./event-structure.png)

**So how do we set up CloudTrail to send events to EventBridge?**

For that we need to create something called a Trail in the CloudTrail's dashboard or via CLI.

_This was the thing that I spent the most time struggling with. I thought just because CloudTrail is showing an event in the Event History tab, it means it will also send that event to EventBridge. But that is not true, for most of the events you need to set up a Trail first before CloudTrail will send that event to EventBridge._

As the name suggests a Trail is a series of events that are recorded by CloudTrail and saved on an S3 bucket. You can view the S3 bucket to see the list of all the past events that were recorded by CloudTrail.

My suggestion is that if you are only interested in listening to a bunch of events and do not really care if those events are being saved to S3 by the Trail then you can configure the S3 bucket to use the cheapest storage type so your s3 storage cost gets reduced.

A Trail can be set up for storing management events, data events or insights events. Management events are the cheapest to record. Check the pricing [here](https://aws.amazon.com/cloudtrail/pricing/).

![create cloudtrail](./create-cloudtrail.png)

For our use case, we were only interested in management events so we created a Trail that only stored that.

So now we know a little about events let's see how can we listen to these events. We do that by adding a **Rule** to EventBridge. For example, we can add a rule to send a notification to us (via a Lambda Function or SNS topic) whenever someone creates a new EC2 instance or when someone creates an S3 bucket.

The first thing to do when you are interested in listening to an event in an AWS account is figuring out whether that event
is being sent to EventBridge natively by the service or not. You can check that [here](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html).

If yes, then you can skip setting up CloudTrail and directly configure EventBridge to start listening to that event.

If not, then first you have to check [here](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-list) that whether CloudTrail records that event or not. There are very high chances that CloudTrail will have support to capture the event you are interested in.

Now let's take an example. Let's say we want to execute a lambda function whenever someone stops or terminates any EC2 instance in our AWS account. Let's open the EventBridge console and click on **Create Rule**.

You provide a name, the event pattern, and the action(target) to take. There are some other minor configurations but these 3 are the important ones.

![create rule eventbridge](./create-rule-eventbridge.png)

EventBridge supports the following targets as actions when a rule is matched. Take a look that the updated list [here](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html).

- API destination
- API Gateway
- AWS Batch job queue
- CloudWatch Logs group
- CodeBuild project
- CodePipeline
- Amazon EC2 CreateSnapshot API call
- Amazon EC2 RebootInstances API call
- Amazon EC2 StopInstances API call
- Amazon EC2 TerminateInstances API call
- Amazon ECS tasks
- Event bus in a different account or Region
- Firehose delivery stream (Kinesis Data Firehose)
- Inspector assessment template (Amazon Inspector)
- Kinesis stream (Kinesis Data Streams)
- AWS Lambda function
- Amazon Redshift clusters (Data API statement execution)
- SageMaker Pipeline
- Amazon SNS topic
- Amazon SQS queues (includes FIFO queues)
- SSM Automation
- SSM OpsItem
- SSM Run Command

Step Functions state machines

The console provides a GUI to create your event pattern using some pre-defined options which or you can provide a JSON pattern for the event. See how to create event patterns [here](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html).

![definte pattern eventbridge](./definte-pattern-eventbridge.png)

For the EC2 event, our event pattern would look like this. This event is being sent to EventBridge by the EC2 service itself so we don't have to set up a CloudTrail for this event. It would work out of the box.

```json
{
  "source": ["aws.ec2"],
  "detail-type": ["EC2 Instance State-change Notification"],
  "detail": {
    "state": ["stopped", "terminated"]
  }
}
```

Now as soon as someone tries to stop or terminate the instance, The AWS EC2 service will send that event to the default EventBus in EventBridge, EventBridge will match it against all of our rules and if matched and it will invoke our lambda function with the details about the event.

![select targets eventbridge](./select-targets-eventbridge.png)

Now let's take another example where the service does not natively send an event to EventBridge which means we need to listen to that event using CloudTrail. **After setting up a Trail**, we create a rule to listen to anytime someone creates an S3 bucket.

This is how the event pattern would look like.

```json 2
{
  "source": ["aws.s3"],
  "detail-type": ["AWS API Call via CloudTrail"],
  "detail": {
    "eventSource": ["s3.amazonaws.com"],
    "eventName": ["CreateBucket"]
  }
}
```

If you're curious to know what the event pattern for our use case was. Here's it.

```json 2
{
  "source": ["aws.lambda"],
  "detail-type": ["AWS API Call via CloudTrail"],
  "detail": {
    "eventSource": ["lambda.amazonaws.com"],
    "eventName": [{ "prefix": "UpdateEventSourceMapping" }]
  }
}
```

Did you notice the _AWS API Call via CloudTrail_? This tells that this event is being provided by CloudTrail.

The great thing about the above setup is that it is completely serverless so we only pay for what we use. There are other ways to listen to events in an AWS account but this seems to be my new go-to way of doing it.

Thank you for reading.

gha_language: JavaScript


text:
# COMP9417  MACHINE LEARNING    YEAR: 2020  TERM: 02

# REPOSITORY GUIDE

## COMP9417_HW1

### SUMMARY

- Apply different classifier learning algorithms implemented in the Python scikit-learn machine learning library on a variety of datasets and answer questions based on anaylsis and intrepetation of the empirical results, using my knowledge of machine learning.

## COMP9417_HW2

### SUMMARY

- Apply parameter search for machine learning algorithms implemented in the Python scikit-learn machine learning library.
- Answer questions based on your analysis and interpretation of the empirical results of such applications, using your knowledge of machine learning.
- Complete an implementation of a different version of a learning algorithm you have previously seen.

## COMP9417_PROJECT

### SUMMARY

- Implement a ‘Transaction Fraud Prevention System’ leveraging machine learning models, which aims to predict whether a given financial transaction is ‘Fraudulent’ or ‘Valid’.

#  UPCOMING CHANGES IN REPOSITORY

- Self Reflection of the COMP9417 course as overall and individual self reflection for all the assessments of this course.


text:
---
index: 90
category: "usage"
toc: false
path: "/manual/working-behind-a-corporate-web-proxy"
title: "Working Behind Web Proxy"
---

If you are working behind a company proxy or you have a local proxy running, it's necessary to tell Inkdrop to go through it.
Here is a quick tip for those dealing with a proxy.

You can configure the web proxy settings by editing `config.cson`. This config file is in following directory:

 * on macOS: `~/Library/Application Support/inkdrop/config.cson`
 * on Windows: `%APPDATA%/inkdrop/config.cson`
 * on Linux: `~/.config/inkdrop/config.cson`

Quit Inkdrop before you edit it.

```yaml
"*":
  core:
    network:
      http_proxy: "http://webproxy:8080/"
      https_proxy: "http://webproxy:8080/"
```

Now open Inkdrop and you will be able to get synced!
If the web proxy requires BASIC auth, you can just specify a URL with username and password like so:

```
http://username:password@webproxy:8080/
```

## Configuring ipm

`ipm` is also necessary to be configured for working behind a web proxy.

```bash
ipm config set proxy "http://webproxy:8080"
ipm config set https_proxy proxy "http://webproxy:8080"
```

## Allow Self-signed Certificates

You have to disable SSL certificate validation if your proxy server is SSL-enabled but with a self-signed certificate.
You can disable it by adding `strict_ssl: 0` in your `config.cson` like so:

```yaml
"*":
  core:
    network:
      strict_ssl: 0
```

For `ipm`, run below command:

```sh
ipm config set strict-ssl false
```

## Troubleshooting

### Client network socket disconnected before secure TLS connection was established

If you got an error like that, your proxy server may be using TLSv1.0 which is obsolete.
You have to update your proxy server to support newer protocols like TLSv1.2 since Inkdrop does not support TLSv1.0.

repository: maedana/docs

repo_name: maedana/docs


text:
# Design Manifolds Capture the Intrinsic Complexity and Dimension of Design Spaces
Experiment code associated with our JMD paper: "[Design Manifolds Capture the Intrinsic Complexity and Dimension of Design Spaces](http://mechanicaldesign.asmedigitalcollection.asme.org/article.aspx?articleid=2610207)"

![Alt text](/design_manifolds.png)

Edit experiment configurations in config.ini

To perform the embedding and synthesize new shapes:
```
python training.py
```

To synthesize new shapes using trained models:
```
python synthesis.py
```

The settings of the kernel PCA and autoencoders are in the configuration files:
```
./hp-opt/hp_<example name>_<noise scale>.ini
```

We use [pySMAC](http://pysmac.readthedocs.io/en/latest/#) for hyperparameter optimization of kernel PCA and autoencoders.

The code is licensed under the MIT license. Feel free to use all or portions for your research or related projects so long as you provide the following citation information:

Chen W, Fuge M, Chazan J. Design Manifolds Capture the Intrinsic Complexity and Dimension of Design Spaces. ASME. J. Mech. Des. 2017;139(5):051102-051102-10. doi:10.1115/1.4036134.

    @article{chen2017design,
      title={Design Manifolds Capture the Intrinsic Complexity and Dimension of Design Spaces},
      author={Chen, Wei and Fuge, Mark and Chazan, Jonah},
      journal={Journal of Mechanical Design},
      volume={139},
      number={5},
      pages={051102-051102-10},
      year={2017},
      publisher={American Society of Mechanical Engineers}
    }


text:
# Tide

![Display wall running Tide](doc/wall.png)

Tide is BlueBrain's *Tiled Interactive Display Environment*.  See Tide in action in this [youtube
video](https://www.youtube.com/watch?v=wATHwvRFGz0).

## Features

Tide is a distributed application that can run on multiple machines to power
display walls or projection systems of any size.

Its user interface is designed to offer an intuitive experience on touch walls.
It works just as well on non touch-capable installations by using its web
interface from any web browser.

Tide helps users with:
* Presenting and collaborating on a variety of media such as high-resolution
  images, movies and pdfs.
* Sharing multiple desktop or laptop screens using the
  [DesktopStreamer](https://github.com/BlueBrain/Deflect/releases) application.
* Sketching new ideas by drawing on a whiteboard and browsing websites.
* Interacting with content streamed from remote sources such as high-performance
  visualisation machines through the
  [Deflect](https://github.com/BlueBrain/Deflect.git) protocol. In particular
  all [Equalizer](https://github.com/Eyescale/Equalizer)-based applications
  as well as [Brayns](https://github.com/BlueBrain/Brayns) ray-tracing engine
  have built-in support.
* Viewing high-resolution, immersive [stereo 3D streams](https://git.io/fpsoQ)
  on compatible hardware.

![Tide displaying immersive 3D data on BlueBrain's OpenDeck](doc/opendeck.png)

## Usage

Run 'tide' from the bin folder to start the application. By default it launches
three wall processes in a horizonal layout. Content can be opened from the
control user interface or by opening the web interface at
[http://localhost:8888](http://localhost:8888).

![Tide master interface](doc/master_interface.png)

On a touch wall, click the rocket icon on the left control bar to browse for
contents and applications. Touch points are received via the TUIO protocol on
port 1701. To simulate a touch interface, build and run the SimpleSimulator
application or download any client from [TUIO](http://www.tuio.org/?software).
On a smartphone, search for *TuioPad* app.

For more detailed information refer to the
[User Guide](http://bluebrain.github.io/Tide-1.5/user_guide.html).

## Web Interface

![Tide web interface](doc/web_interface.png)

The application can be entirely controlled from the web interface or even using
direct REST API calls. Simply drag and drop a file to upload it to the wall.

## Getting Tide

A pre-built Ubuntu 18.04 package is available from the
[releases](https://github.com/BlueBrain/Tide/releases) page.
Download it and install it with:

    sudo apt install ./tide_1.5.0~bionic_amd64.deb

Please note that there are some stability issues with the system Qt packages
affecting notably the web browser. We recommend installing Qt 5.9.7 from the
[official website](https://download.qt.io/archive/qt/5.9/5.9.7/). To use it,
add the following to your .bashrc:

    QT_HOME=/home/$USER/Qt5.9.7/5.9.7/gcc_64
    export PATH=$QT_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$QT_HOME/lib:$LD_LIBRARY_PATH
    export QML_IMPORT_PATH=$QT_HOME/qml

For other platforms, see next section for building from source.

## Building from Source

Basic procedure on Linux / OSX:

    git clone --recursive https://github.com/BlueBrain/Tide.git
    mkdir Tide/build
    cd Tide/build
    cmake -GNinja -DCLONE_SUBPROJECTS=ON ..
    ninja

The master branch always contains the latest development features; see
[Changelog](https://git.io/fpsK1).
To build a stable [release](https://github.com/BlueBrain/Tide/releases)
checkout its tag:

    git checkout 1.5.0

Tide uses a set of [common CMake modules](https://github.com/Eyescale/CMake) to
help with the configuration and handling of dependencies. To install required
system packages on Ubuntu (apt-get) or OSX (macports) run:

    cmake .. -DINSTALL_PACKAGES=ON

For detailed instructions on how to build Tide on a specific platform refer to
[Building Tide](http://bluebrain.github.io/Tide-1.5/building.html).

## Similar Projects

Tide is the direct successor of
[DisplayCluster](https://github.com/TACC/DisplayCluster) at BlueBrain. Most of
the code has been rewritten based on Qt's Qml2 engine and multithreaded
operations for greatly optimized performance and stability.

It offers a modern alternative to [Sage/Sage2](http://sagecommons.org) built on
proven and efficient technologies (C++14, Qt5, MPI).

## Documentation

The full documentation is available at
[bluebrain.github.io](http://bluebrain.github.io/Tide-1.5)

## Funding & Acknowledgment

The development of this software was supported by funding to the Blue Brain Project,
a research center of the École polytechnique fédérale de Lausanne (EPFL), from the
Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

This project has received funding from the European Union's Horizon 2020 Framework
Programme for Research and Innovation under the Specific Grant Agreement No. 720270
(Human Brain Project SGA1).

This project is based upon work supported by the King Abdullah University of Science
and Technology (KAUST) Office of Sponsored Research (OSR) under Award No. OSR-2017-CRG6-3438.

## License

Copyright (c) 2013-2022 Blue Brain Project/EPFL,

Copyright (c) 2013-2015 King Abdullah University of Science and Technology,
                        Saudi Arabia

Copyright (c) 2011-2012 The University of Texas at Austin.

All rights reserved.

The views and conclusions contained in the software and documentation are those of
the authors and should not be interpreted as representing official policies, either
expressed or implied, of École polytechnique fédérale de Lausanne de Lausanne.

repository: BlueBrain/Tide

repo_name: BlueBrain/Tide


text:
---
title: Release Notes for 0.1.1 PREVIEW
sidebar: overview_sidebar
keywords: introduction
permalink: rn_0101p.html
toc: false
tags: [getting_started]
folder: introduction
---

### 0.1.1 PREVIEW

Version | Handle  | Phase | State           | Release Date | Stability
--------|---------|-------|-----------------|--------------|----------------
0.1.1   | PREVIEW | Alpha | Released | 18/10/2018   | Volatile

The 0.1.1 PREVIEW release is the first release version of the UEC appointment booking standards. This version has the following highlights:

* Initial site structure and base content
* Background and context setting content
* User stories and scoping information
* Workflow and filtering slots content in the functional specification section
* non-functional requirements
* a link to the FHIR API specification

gha_language: CSS


text:
ember-data-experiments-mega-unstable
==============================================================================

This addon provides potential future ember-data APIs as experiments in ergonomics.

- You should play around with it, you probably shouldn't build a production app with it.
- You should create RFCs from the ideas or open issues with feedback, you probably shouldn't start refactoring your app with it.
- You should contribute tests, bugfixes, or additional concepts, you probably shouldn't copy paste any of this into your app.

### Why?

The goal of this addon is to explore paths for

- eliminating `PromiseProxy`.
- eliminating `ArrayProxy`.
- unwrapping dual-purpose proxies (proxies that proxy to more than one source, for instance, how relationships and queries also have meta and links attached to their proxy).
- eliminating unnecessary proxies.
- providing access to more complete document and resource contents.

The paths MUST be capable of working with the world we have today, while unlocking the world we want to refactor to tomorrow.

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

```
ember install ember-data-experiments-mega-unstable
```

Usage
------------------------------------------------------------------------------

### Template Helpers

The helpers provide a consistent (never promise-proxy, always Record or RecordArray) experience regardless
of whether `async` or `non-async` relationships are in use. They will trigger loads of relationships that
have not been loaded yet.

Further iterations will provide mechanisms for

- queryParams and other request options
- preventing fetch (enforce local data only)
- loading state for documents
- errors, meta, and links for documents
- disallowing template based fetch (data must be already locally available)

**fetch-data**

```hbs
{{#let (fetch-data record 'relationshipName') as |data|}}
  {{#if data}}
     ... do things with record or array of records ...
  {{else}}
     ... do something else ...
  {{/if}}
{{/let}}
```

**fetch-document**

```hbs
{{#let (fetch-document record 'relationshipName') as |document|}}
  {{#if document.errors}}
     ... do things with request errors ... // not yet implemented
  {{else if document.isLoading}}
     ... show spinner ... // not yet implemented
  {{else}}
     ... do things with {{document.meta}} {{document.data}} {{document.links}} ...
     ... meta and links access is not yet implemented
  {{/if}}
{{/let}}
```

### Alternative Relationship Layer

... coming soon ...

### Alternative to `store.findAll`, `store.query` and `store.queryRecord`

... coming soon ...

Contributing
------------------------------------------------------------------------------

### Installation

* `git clone <repository-url>`
* `cd ember-data-experiments-mega-unstable`
* `npm install`

### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`

### Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

### Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).


text:
# Postgres Node Template :rocket:

## Purpose :dark_sunglasses:

The purpose of this repository is to practice using postgres with node.

### User Stories :telescope:

1. Users will be able to look through the various examples and understand how postgres works with node.
2. Users will be able to identify the key steps in creating such a template.

### Vocabulary

| Done? | Word    |                                  What it means                                   | How it fits / When to use |
| ----- | ------- | :------------------------------------------------------------------------------: | :-----------------------: |
|       | Pooling | Pool of connections and caching those connections so that it can be reused again |                           |

## Sprint :athletic_shoe:

| Done? | Component                                            | Priority | Estimated Time | Actual Time |
| ----- | ---------------------------------------------------- | :------: | :------------: | :---------: |
| x     | Creating this checklist                              |    H     |    30 mins     |   30mins    |
| x     | Skim through documentation of required packages      |    H     |      1 hr      |   15 mins   |
| x     | Set up postgres                                      |    H     |    30 mins     |   15 mins   |
| x     | Create UML Diagram                                   |          |                |             |
| x     | Create table user                                    |          |                |             |
| x     | Create table notes                                   |          |                |             |
| x     | Can create table                                     |          |                |             |
| x     | Can post to table                                    |          |                |             |
| x     | Can edit table                                       |          |                |             |
| x     | Can delete from table                                |          |                |             |
| x     | Set up express server                                |          |                |             |
| x     | Understand how to collect data from frontend express |          |                |             |
|       | How to input that data from frontend to backend      |          |                |             |
|       | CRUD Operations from frontend to backend             |          |                |             |

[Example](https://github.com/hnasr/javascript_playground/blob/master/express-postgres/newserver.js)

### Set up postgres

![UML](https://www.dropbox.com/s/cwsgbxtlhurkgux/_ERD%20with%20colored%20entities%20example%20%28UML%20notation%29.png?raw=1)

```
// npm install --save pg

const pg = require("pg");
var config = {
  user: "postgres",
  database: "postgres",
  password: "",
  host: "localhost",
  post: 5432,
  max: 10,
  idleTimeoutMillis: 30000,
};
var client = new pg.Client(config);
client.connect();

// client.query initiates the query
// query (SELECT * FROM pizza)
// call back (function (err, results))
// if error, console log error
// Otherwise, log the rows to the console
client.query("SELECT * FROM pizza", function (err, results) {
  if (err) {
    console.log(err);
  }
  console.log(results.rows);
});

```

Querying for Data

- Remember to make your query an object (that would minimize vulnerabilities to your program)

```
const query = {
  text: 'INSERT INTO users(name, email) VALUES($1, $2)',
  values: ['brianc'<EMAIL_ADDRESS>}
// callback
client.query(query, (err, res) => {
  if (err) {
    console.log(err.stack)
  } else {
    console.log(res.rows[0])
  }
})
// promise
client
  .query(query)
  .then(res => console.log(res.rows[0]))
  .catch(e => console.error(e.stack))

```

- Or run it as a function

```

function getPizza(name) {
  var client = new Client(config);
  client.connect();
  var query = "SELECT * FROM pizza WHERE pizza_name = $1;";

  console.log("Running get pizza function here!");
  client.query(query, [name], function (err, results) {
    if (err) {
      console.log(err);
    }
    console.log(results.rows);
  });
}
getPizza("Pineapple");
```

### Collecting data from frontend to backend

![How Express Works](https://www.dropbox.com/s/oaky3r5p7tuji5s/Express%20and%20Frontend.png?raw=1)

#TODO: How does the data from frontend pass to the database in the backend?

## Issues and Resolutions :flashlight:

**ERROR**: :gear:
**RESOLUTION**: :key:

| Issue                | Where it occurs | Possible solution | Actual solution |
| -------------------- | :-------------: | :---------------: | :-------------: |
| Creating a checklist |        H        |       2hrs        |     2.5hrs      |

#### What is one thing that I learned from doing this project? :books:

- Better understand how express works with front end
- Diagrams are awesome

#### Credits :recycle:

- [cors](https://expressjs.com/en/resources/middleware/cors.html)
- [dotenv](https://github.com/motdotla/dotenv)
- [pg](https://node-postgres.com/)
- [express](https://expressjs.com/)
- [nodemon](https://nodemon.io/)
- [Jest](https://jestjs.io/)
- [body-parser](https://github.com/expressjs/body-parser)
- [morgan](https://www.npmjs.com/package/morgan)
- [express-promise-router](https://github.com/express-promise-router/express-promise-router)

#### Contributing :round_pushpin:

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Not sure how? Learn [Github](https://www.youtube.com/watch?v=3RjQznt-8kE&list=PL4cUxeGkcC9goXbgTDQ0n_4TBzOO0ocPR)
Please make sure to update tests as appropriate.

#### License :memo:

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

repository: alexzclin/secretsauces

repo_name: alexzclin/secretsauces


text:
# Trainee Profile Backend

Employees profile backend is built using express server, mongoDB atlas is used to store the data and the backend is hosted on Heroku.

## Getting Started

- [Check the frontend app of the employee page](https://github.com/altafshaikh/react-trainee-profile-pages)
- [Check the employee profile backend code](https://github.com/altafshaikh/nodejs-trainee-profile-backend)

## Features

- Get all employees details.
- Create New employee deatils and store in the mongoDb.
- Get detail of employee by fetching employeeId.

## Additional Features

- hosted on Heroku platform.
- Can upload image (used multer).
- used mongoDb cloud to store employee data.

### Downloading and Running this Project Locally

1. clone the repository

```

git clone https://github.com/altafshaikh/nodejs-trainee-profile-backend.git
```

2. add a `.env` file inside the root folder

```

DATABASE_URL=your_atlas_db_url(keep this empty is ur not provoding any url)
LOCAL_DB_URL=your local mongo url
DEBUG=true // set true to use local db and false to use atlas
PORT=3000

```

Sample for local

```

DATABASE_URL=
LOCAL_DB_URL=mongodb://<IP_ADDRESS>:27017/employees
DEBUG=true
PORT=4000

```

### Supported Routes

```

/employees : (method:get) - to get all employee details.
/employees/addEmployee : (method:post) - to add new employee details.
/employees/:id : (method:get) - to get a single data of employee using EmployeeId (Uniquid id)

```

Note:

1. send employee data in this format:

```

{
"firstName":"Sherlock",
"lastName":"Holmes",
"company":"ABC",
<EMAIL_ADDRESS>"contact":"1111111111",
"imageUrl":(upload image),
"skills":[],
"altDescription":"I am an employee.",
"hobbies":"Reading",
"socialLinks":{
"gitHub":"",
"linkedIn":"",
"website":""
}

```

## References

- [mongoose quick start](https://mongoosejs.com/docs/index.html)
- [mongoDB documentation reference](https://docs.mongodb.com/manual/introduction/)
- [uniquid to generate unique ids](https://www.npmjs.com/package/uniqid)
- [npm express](https://www.npmjs.com/package/express)
- [axios to make api calls](https://www.npmjs.com/package/axios)
- [CORS module to talk between cross-origin resources](https://www.npmjs.com/package/cors)
- [getting started with docker](https://docs.docker.com/get-started/)
- [middlewares in nodejs](https://medium.com/@selvaganesh93/how-node-js-middleware-works-d8e02a936113)

## Author

- **Altaf Shaikh** - _work by_ - [ialtafshaikh](https://github.com/ialtafshaikh)

- **Saurav Upadhyay** - _work by_ - [isauravupadhyay](https://github.com/sauravraw)

- **Rutuja Patil** - _work by_ - [irutujapatil](https://github.com/Rutuja9696)

- **Sagar Vartak** - _work by_ - [isagarvartak](https://github.com/sagar-vartak)

- **Rishikesh Raut** - _work by_ - [irishikeshraut](https://github.com/Rishikesh46)

## License

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

```

```


text:
---
layout: default
video: https://www.youtube.com/embed/zgf4Q7JNeSE
category: Collections
title: Smart Contract - Adopt a pet in custom token
description: |
---
Extends the [tutorial token](https://truffleframework.com/tutorials/robust-smart-contracts-with-openzeppelin) and [pet shop](https://truffleframework.com/tutorials/pet-shop) example projects from Truffle official site.
Let buyer can adopt a pet from a pet shop in custom ERC20 token. And seller can withdraw all tokens from shop.
Welcome to visit github pages of [my Pet Tutorial Token](https://github.com/M1stI4orK7U8y/PetShopPetToken/tree/master) and [pet shop](https://github.com/M1stI4orK7U8y/PetShopPetToken)

--------------------------------------------------------------------
Developmant: Solidity

extension: markdown


text:
# XP2Earth

X-Plane plugin to connect to Google Earth

For license see https://github.com/Djeez2/XP2Earth LICENSE.

View the terrain in Google Earth while flying X-Plane.

Currently, this plugin is only available for Windows.

## New in version 1.1:

- Users can now bind keys to control the plugin
- Some settings such as tilt angle and pilot height are now customizable
- Cockpit builders can now use commands and datarefs to control the plugin

## Installation

- Extract the zip file in the X-Plane\Resources\plugins folder. Ensure that you don't accidentally create a double xp2earth\xp2earth folder.
- Install Google Earth Pro desktop application (free of charge, see its license)
- Install the Microsoft Visual C++ Runtime 2019 from https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads.

## One-time setup

- To get the best experience, experiment with the fly-to speed in Google Earth. (Menu: Tools -> Options -> Navigation -> Fly-To Speed).
For me, the best setting is 3.5 to 4.0
- Select your viewing preferences. Some suggestions:
	* In View menu:
		- Show atmosphere
		- Hide grid
	* In Layers selection:
		- Uncheck everything, except
		- Check 3D buildings -> Photorealistic
		- Check Terrain

## Operating instructions

- In the X-Plane menu select Plugins -> XP2Earth -> Tracking to start tracking your position. Select again to stop tracking.
- Click XP2Earth -> Connect Earth to start Google Earth automatically (when not already started), and have it update its location.

Viewing options in the XP2Earth plugin menu:
- Pilot View: This sets the Google Earth eye point close to the ground. However, this leads to weird effects at some airports when the elevation in Google Earth is different from X-Plane's.
- Look Around: This allows you to look around in Google Earth by moving your head in the cockpit.

## Remote operation

You can run Google Earth on a second computer.
- In the X-Plane plugin start the tracking, but do NOT connect to Earth (as this would start a local Google Earth session)
- Copy the file xp2earth.kml to the second computer.
- Open the file with a text editor (e.g. Notepad) and change the text "localhost" to the name or IP-address of your X-Plane computer.
- In the Google Earth menu: File -> Open the updated xp2earth.kml file.

## Acknowledgements

This plugin uses ideas and code from
- https://www.fsdeveloper.com/forum/threads/ge-view-64-bit-httpx-v2-2-and-earthproxy-v1-3-fsx-thru-p3d-v4.442397/ EarthProxy, an FSX extension to connect Google Earth to FSX.
- https://github.com/cesanta/mongoose Mongoose, an embedded web server library provided by Cesanta.
- https://github.com/Stark2x/xp2kml xp2kml, an X-Plane plugin to write kml-files provided by Stark2x.

In the spririt of these open source projects I also contribute this plugin to the open source community.

Thanks to
- Kees Houbolt for testing many early versions of the plugin.
- Google for providing Google Earth free of charge.
- Laminar Research for opening up X-Plane through a well-documented SDK.
- Microsoft for providing Visual Studio Community Edition free of charge.

## For cockpit builders

Access to the plugin is clustered in the xp2earth/... commands and datarefs.

## For developers

The source of this plugin is available on GitHub: https://github.com/Djeez2/XP2Earth

Please create pull requests for improvements. I especially would appreciate contributions for other platforms,
as I have no experience building plugins for MacOS or Linux, nor am I able to test those.

The plugin was built with Visual Studio 2019 Community Edition. The project assumes the X-Plane SDK is located in D:\XPSDK.


text:
# 367. Valid Perfect Square (Easy)

Given a positive integer num, write a function which returns True if num is a perfect square else False.

Note: Do not use any built-in library function such as sqrt.

### Example 1:
```
Input: 16
Returns: True
```

### Example 2:
```
Input: 14
Returns: False
```

## Newton Solution
To find root of the given equation `f(x) = x^2 - num = 0`, the iteration is
```
x_(n + 1) = x - f(x)/f'(x)
          = x - (x*x - num) / 2 * x
          = x - x/2 + num / 2 * x
          = (x + num /x ) / 2

```

#LNKD

#Math


text:
# Memes Reposter

Service that steal memes from different sources and repost its to telegram.

### List of some channels

- [reddit ~ rad](https://t.me/pop_reddit)
- [imgur ~ telemgur](https://t.me/telemgur)
- rss feeds:
	- [The Verge](https://t.me/verge_media)
	- [WIRED](https://t.me/wired_media)
	- [TechCrunch](https://t.me/techcrunch_media)

### How it works

Publishing task (run every 30 minutes):
- fetch posts from somewhere
- filter out posts that were already poster
- filter out trash: low score, bad tags, etc
- format post: album or single image with title or whatever
- publish to the telegram

Clean up task (run at midnight):
- delete old posts from database


text:
https://csharp.hotexamples.com/examples/InTheHand.Net.Sockets/BluetoothClient/Connect/php-bluetoothclient-connect-method-examples.html

EXAMPLE #13

CakeRobot
=========

CakeRobot is an Arduino + Kinect Gesture Controlled Robot

**Intro**

Watch This Video: http://www.youtube.com/watch?v=ObEGB-chAnQ

**Hardware**

Here is the list of components you need to build CakeRobot.

 * A Chassis – I used Dagu Magician Chassis  – From Spark Fun, Rhydolabz – it comes with two stepper motors that can be controlled by our driver board.
 * A Arduino board with Motor Driver – I used Dagu Mini Motor Driver – bought from Rhydolabz in India. For other countries you need to search and find. Some description about the board can be found here – It also has a special slot to plug in dagu blue tooth shield. You could also use Micro Magician
 * You also need a Micro USB cable to connect your PC to the motor driver to upload code.
 * A Bluetooth Shield – Get the Dagu blue tooth module if you can find it. I’ve purchased a Class 2 Rn 42 blue tooth shield From Rhydolabz
 * Few mini modular bread boards
 * Jumper wires – Get a mixed pack with M/M, F/F, M/F – like this one
 * A Tiny blue tooth dongle for your PC/Laptop, like this one, to communicate with the blue tooth shield in the robot (if you don’t have built in blue tooth)
 * Few sensors if you want to have more fun – I had an ultra sonic distance sensor to avoid collisions in my final version. A better alternative is Ping sensor.
 * A battery pack and battery holder that should supply around 6V to the Mini Motor Driver
 * Other components for your later creativity/exploration LEDs Resistors More Sensors
 * Tools
 * Few star screw drivers
 * Duct tapes/rubber bands (yea, we are prototyping so no soldering as of now)

**Tutorial**

Here is a write up about components, assembling, and source code.

http://www.amazedsaint.com/2013/10/cakerobot-gesture-driven-robot-that.html

repository: SHAREVIEW/cakerobot

repo_name: SHAREVIEW/cakerobot


text:
# Database formats

## Domain DB
Location specified by `--domain-db`, this database is an `andybm`-based key/value storage.

- key: Domainpart of JID
- value: A tab-separated tuple
  1. API secret
  2. API URL
  3. Authentication domain (the one JSXC should check against)
  4. Unused value, can be used by other users of the database (must not contain a tab, as this will interfere with future database field updates)

## User Cache
Location specified by `--cache-db`, this database is an `andydbm`-based key/value storage.

- key: username`:`domain (a bare JID with ':' instead of '@')
- value: A tab-separated tuple
  1. Password hash (for local verification)
  2. Timestamp of first authentication
  3. Timestamp of last successful authentication (possibly local-only)
  4. Timestamp of last successful authentication against the server
  5. Unused value, can be used by other users of the database (must not contain a tab, as this will interfere with future database field updates)

## Shared Roster
Location specified by `--shared-roster-db`, this database is an `andydbm`-based key/value storage.

It contains two types of key/value pairs, differentiated whether the key contains one or two colons (`:`):

### User memberships

This is needed for removing a user from a group (s)he was in earlier. They should not be
deleted unless they become empty

- key: username`:`domain (a bare JID with ':' instead of '@')
- value: A tab-separated list of shared roster group IDs the user was in on the most recent login

### Response cache

This is used to avoid the many expensive `ejabberdctl` calls required otherwise.
They can be deleted without affecting functionality, but affecting performance.

- key: `CACHE:`username`:`domain (a bare JID with ':' instead of '@', prefixed with 'CACHE:')
- value: SHA256(`response body`)

repository: gibberfishinc/xmpp-cloud-auth

repo_name: gibberfishinc/xmpp-cloud-auth


text:
---
manufacturer: Xiaomi
name: Mi Body Composition Scale 2 / Mi Body Fat Scale
model: XMTZC02HM, XMTZC05HM, NUN4049CN
image: XMTZC05HM.png
physical_description:
broadcasted_properties:
  - weight
  - non-stabilized weight
  - stabilized weight
  - weight removed
  - impedance
  - rssi
broadcasted_property_notes:
  - property: weight
    note: is only reported after both the scale is stabilized and the impedance has been sent by the scale (wait for the white line on the scale to start flashing). The `weight` sensor and the `impedance` sensor always correspond to the same measurement.
  - property: stabilized weight
    note: is updated, even if the impedance has not been calculated and send by the scale. This sensor is updated slightly before the weight sensor, even if you step off the scale before the white line starts flashing, but the `weight` measurement does not always correspond to the `impedance` measurement.
  - property: non-stabilized weight
    note: this sensor is reporting all weight measurements
broadcast_rate:
active_scan:
encryption_key:
custom_firmware:
notes:
  - For additional data like BMI, viscaral fat, etc. you can use e.g. the [bodymiscale](https://github.com/dckiller51/bodymiscale) custom integration.
  - If you want to split your measurements into different persons, you can use [this template sensor](https://community.home-assistant.io/t/integrating-xiaomi-mi-scale/9972/533)
---


text:
# Peleton Scraper

Peleton Scraper is a reddit bot that scrapes the Peleton class website and posts classes on a subreddit.

## Dependencies

```
pip install BeautifulSoup
pip install praw
```

## Usage

```
python peletonscraperbot.py
```

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


text:
---
layout: post
title: LC 128 Longest Consecutive Sequence
---
###Task1
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.

For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4.

Your algorithm should run in O(n) complexity.
return 10.

###java
```java
public class Solution {
    /**
     * @param nums: A list of integers
     * @return an integer
     */
    public int longestConsecutive(int[] num) {
        // write you code here
        if (num == null || num.length == 0) {
            return 0;
        }
        HashMap<Integer, Integer> map = new HashMap<>();
        for (int i: num) {
            map.put(i, 0);
        }
        int max = 0;
        for (int i: num) {
            if (map.get(i) == 1) {
                continue;
            }
            int cur = i;
            int len = 1;
            while (map.containsKey(--cur)) {
                len++;
                map.put(cur, 1);
            }
            cur = i;
            while (map.containsKey(++cur)) {
                len++;
                map.put(cur, 1);
            }
            max = Math.max(max, len);
        }
        return max;
    }
}

```

###Points
* No magical part, need to check one by one. But we have to eliminate duplicated checkings by the use of HashMap: 0 value stands for "have this value and available", 1 value stands for "have this value but not available"


text:
# Deletion policies

Fluent augments and replaces the default object deletion behaviour for objects.
Based on the extensions applied to each object, invoking "->delete()" (or pushing the
delete button in gridfields) will trigger the policy.

## Standard policies

Each policy is described below

### DeleteRecordPolicy

This policy will delete the record from the current stage (e.g. live, draft).
This policy supports the ability to inject dependent policies (listed below)
which may conditionally suppress the base record being deleted.

A DeleteRecordPolicy with no dependent policies acts as the default silverstripe
deletion behaviour.

This policy is applied to any record with either `FluentExtension` or `FluentFilteredExtension`
applied.

### DeleteLocalisationPolicy

This policy will delete the localisation for the record in the current locale.
E.g. if you have a locale in both EN and CN, pressing delete in the CN locale
will delete only that locale, but not the EN (or base) record.

Note that if you have set `frontend_publish_required` config to `fallback` or `any`, then the record
will still be available in that locale, but will instead fall back to the failover instead
(depending on your configuration).

This policy is applied only to records with `FluentExtension` applied.

### DeleteFilterPolicy

This policy will remove the selected item from being visible in the current locale.

This policy is applied only to records with the `FluentFilteredExtension` extension.

## Overriding policies

You can modify the behaviour of any of these policies for one (or all) model types.

For example, if you wish to restore legacy behaviour, and ensure that deleting a record
removes records in all locales, you can either:

 - Implement a custom `DeletePolicyFactory`, and add only one policy per class.
 - Implement a custom policy altogether, and replace one or more of the default policies.

### Example use case: Delete base record and ignore localisations / filters

```yaml
---
Name: my-fluentdelete
After:
  - '#fluentdelete'
---
SilverStripe\Core\Injector\Injector:
  TractorCow\Fluent\Model\Delete\DeletePolicy:
    factory: App\DeletePolicyFactory
```

And your factory

```php
<?php

namespace App;

use SilverStripe\Core\Injector\Factory;
use TractorCow\Fluent\Model\Delete\DeleteRecordPolicy;

class DeletePolicyFactory implements Factory
{
    public function create($service, array $params = [])
    {
        // Build policy
        $policy = new DeleteRecordPolicy();
        return $policy;
    }
}

```

Note: You can access the object being deleted via `$params[0]` if you need to do inspection.

repository: tractorcow-farm/silverstripe-fluent

gha_language: PHP

repo_name: tractorcow-farm/silverstripe-fluent


text:
---
title: "Crag Tag"
date: 2019-03-16T21:42:30.604Z
translationKey: "crag-tag"
slug: "crag-tag"
order: 26
tags:
  - hero.findNearest
  - hero.move
  - follow
---

> Use your best boots to catch up to Pender Spellbane.

https://codecombat.com/play/level/crag-tag

Solution

```javascript
// Catch up to Pender Spellbane to learn her secrets.

while(true) {
    // Pender is the only friend here, so she's always the nearest.
    var pender = hero.findNearest(hero.findFriends());

    if (pender) {
        // moveXY() will move to where Pender is,
        // but she'll have moved away by the time you get there.
        //hero.moveXY(pender.pos.x, pender.pos.y);

        // move() only moves one step at a time,
        // so you can use it to track your target.
        hero.move(pender.pos);
    }
}

```

Points for |
--- |
time |

Needed items with |
--- |
findNearest |
findFriends |
moveXY |
move |

repository: LukaszSarzynski/static-site-go

repo_name: LukaszSarzynski/static-site-go


text:
# Common parameters {#concept_ak3_cyz_xfb .concept}

Common parameters include common request parameters and common response parameters. You can call a CDN API operation by sending an HTTP GET request to the endpoint of the CDN API. When you call an operation, you need to set the request parameters according to the corresponding parameter descriptions. The system then returns a response after processing the request.

## Common request parameters {#section_k11_njj_pgb .section}

**Note:** The sample requests are presented in an easy-to-read form in this document.

|Parameter|Type|Required|Description|
|:--------|:---|:-------|:----------|
|Format|String|No|The format of the returned value. Valid values: JSON and XML. Default value: XML.|
|Version|String|Yes|The API version in a date format of YYYY-MM-DD. The current version is 2018-05-10.|
|AccessKeyId|String|Yes|The AccessKey ID provided to you by Alibaba Cloud.|
|Signature|String|Yes|The signature string. For more information about the signature calculation method, see [Sign RPC APIs](../../../../intl.en-US/Alibaba Cloud API/Signature/Sign RPC APIs.md#).|
|SignatureMethod|String |Yes|The algorithm that is used to calculate the request signature. Only HMAC-SHA1 is supported.|
|Timestamp|String|Yes|The timestamp of the request. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Example: 2018-05-10T12:00:00Z \(for 12:00:00 on Thursday, May 10, 2018 Beijing Time\).|
|SignatureVersion|String |Yes|The version of the signature algorithm. The current version is 1.0.|
|SignatureNonce|String|Yes|A unique number that is randomly generated to prevent network replay attacks. A different random number is required for each request.|

Sample request

``` {#codeblock_3tm_ks6_vll}
https://cdn.aliyuncs.com/?Format=xml
&Version=2018-05-10
&Signature=Pc5WB8gokVn0xfeu%2FZV%2BiNM1dgI%3D
&SignatureMethod=HMAC-SHA1
&SignatureNonce=15215528852396&SignatureVersion=1.0
&AccessKeyId=key-test
&Timestamp=2018-05-10T12:00:00Z
```

## Common response parameters {#section_6f0_82x_zcl .section}

All API responses use the same format. If a 2XX HTTP status code is returned, the call is successful. If a 4xx or 5xx HTTP status code is returned, the call is failed. The result can be returned in JSON or XML format. You can specify the format of the returned data when sending an API request. The result is returned in XML format by default.

Each time you send a request to call an operation, the system returns a unique identifier RequestId, regardless of whether the request is successful or not.

Sample response in XML format

``` {#codeblock_xvr_srd_gjr}
<? xml version="1.0" encoding="utf-8"? >
    <!-Response root node-->
    <Operation + Response>
        <!-The request ID-->
        <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
        <!-The response data-->
    </Operation + Response>
```

Sample response in JSON format

``` {#codeblock_gn7_pz5_wc1}
{
    "RequestId":"4C467B38-3910-447D-87BC-AC049166F216",
    /*The response data*/
    }
```

If a 4xx or 5xx HTTP status code is returned, the call has failed. The request ID, host ID, error code, and error message are returned to you.

You can troubleshoot the error according to the error code. For more information, see [Error codes](https://error-center.aliyun.com/status/product/Cdn). Alternatively, you can [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex) and provide additional inputs such as the host ID and request ID to get technical support from us.

Sample response in XML format

``` {#codeblock_tvv_22r_w54}
<? xml version="1.0" encoding="UTF-8"? >
<Error><RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId>
<HostId>cdn.aliyuncs.com</HostId>
<Code>OperationDenied</Code>
<Message>The specified action is not supported. </Message></Error>
```

Sample response in JSON format

``` {#codeblock_3t5_lb5_oll}
{
"RequestId": "8906582E-6722-409A-A6C4-0E7863B733A5",
"HostId": "cdn.aliyuncs.com",
“Code”: “OperationDenied”,
"Message": "The specified action is not supported."
}
```

path: /intl.en-US/New API Reference/Common parameters.md

filename: Common parameters.md


text:
# grad-point-average
A simplistic and basic program to calculate the cumulative GPA usually needed for undergraduate and graduate courses.

Currently, the program sits at around 50 lines of code, and as such, does not require any modules to be imported. Running it is quite simple. Enter the following command in the terminal in the directory of the file:

`$> python calculate.py`

You will be required to enter three things:
1. The course name
2. The grade obtained
3. Number of credits the course is worth

The program will then display your cumulative GPA after each entry.

repository: nishantde/grad-point-average

repo_name: nishantde/grad-point-average


text:
---
title: "Accurate 3D Face Reconstruction via Prior Constrained Structure From Motion"
collection: publications
permalink: /publication/2017_CAG
excerpt: '[Download paper](https://www.sciencedirect.com/science/article/pii/S0097849317300572)'
date: 2017-08-01
venue: 'Computers & Graphics (CAG), 66: 14-22'
paperurl: ''
citation: 'Matthias Hernandez, Tal Hassner, Jongmoo Choi, and Gerard Medioni. Accurate 3D face reconstruction via prior constrained structure from motion. Computers & Graphics (CAG), 66: 14-22, 2017.'
---

### Abstract
We propose a novel structure from motion (SfM) based method for reconstructing the 3D shapes of faces appearing in unconstrained videos. SfM techniques were studied since the early days of computer vision and their limitations are well known. In particular, they are unsuited for the low resolution scenes typical of videos of faces in the wild. To address this, we propose using a parametric face representation as a shape prior to constrain the estimated 3D face shape. Our proposed reconstruction method explores the space around the prior, modifying its 3D shape along with the estimated, per frame cameras and expressions in a manner designed to maximize photometric consistency across video frames yet produce face shapes. Our tests show that this process is both faster and provides superior 3D reconstruction accuracy when compared to existing alternatives.

[Download paper here](https://www.sciencedirect.com/science/article/pii/S0097849317300572)

repository: TalHassner/home

repo_name: TalHassner/home


text:
# Eye-Exercise
This project styles two eyes on the page with CSS and HTML. With the use of javascript, the eyes follow the movement of the mouse around the screen.

## How to Run:
To run this, simply download the html, css, and javascript files and save them in the same folder. Then all that should be necessary is dragging and dropping onto a browser, and it should run. Any modifications would require a file editor, such as VS Code.

## Roadmap
It would be fun to add a bunch more eyes so that the screen is just full of eyes following the mouse across the screen. I also would like o set it up so that some of the eyes follow the inverse of the mouse so that some eyes move up as others move down. The other thing I would like to do is figure out how get the two eyes to automatically show up side-by-side when viewed on a mobile device, as right now they show up with one above the other on my phone.

## License
The project is licensed under the MIT license, as described in the files.


text:
# GNU Zip

Read and write gzip format compressed files

## Installation

```bash
flogo install github.com/retgits/flogo-components/activity/gzip
```
Link for flogo web:
```
https://github.com/retgits/flogo-components/activity/gzip
```

## Schema
Inputs and Outputs:

```json
{
    "inputs": [
        {
            "name": "action",
            "type": "string",
            "allowed": [
                "gzip",
                "gunzip"
            ]
        },
        {
            "name": "removeFile",
            "type": "boolean"
        },
        {
            "name": "sourceFile",
            "type": "string"
        },
        {
            "name": "targetDirectory",
            "type": "string"
        }
    ],
    "outputs": [
        {
            "name": "result",
            "type": "string"
        }
    ]
}
```
## Inputs
| Input           | Description    |
|:----------------|:---------------|
| action          | The action you want to take, either `gzip` or `gunzip` |
| removeFile      | Remove the sourceFile after the action is completed |
| sourceFile      | For gzip the sourceFile is the full path of the file you want to compress (like `/tmp/document.txt`) and for gunzip it is the full path of the file you want to decompress (like `/tmp/document.txt.gz`) |
| targetDirectory | The directory where you want to store compressed or decompressed file (like `/tmp`). This directory must exist! |

## Ouputs
| Output    | Description    |
|:----------|:---------------|
| result    | The result will contain OK if the action was carried out successfully or will contain an error message |

repository: wkarasz/flogo-components

repo_name: wkarasz/flogo-components