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

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

Daniel Waddington<EMAIL_ADDRESS>
## 2018-2
- updates to build system; remove COMANCHE_HOME requirement
- FUSE integration
- Example component based on wrapped-Python
## [v0.2.0]
## 2017-12
### Changed
- Posix block device component now supports callback functions.
## 2017-11-06
#### changed
- Use CMAKE_SOURCE_DIR for out-of-tree build
#### added
- Wiki page on configuring qemu with nvme support with libvirt, [here](https://github.com/fengggli/comanche/wiki/vm)
#### note
- before running fetch-deps.sh
    export MAKEFLAGS="-j 8"
- uuid-dev is required by spdk build
## 2017-11
### Added
- Initial RDMA network component (net/rdma)
- Compiled with clang++
- Mechanics test for SSD to GPU DMA.  Requires patch to SPDK see deps/spdk-extra.
- Initial implementation of Core::UIPC
- Initial implementation of MPMC postbox; unverified.
## 2017-10
### Changed
- Default read/write sync operations on IBlock_device now use a semaphore and thus do a sleep-based wait.
- Added second call back argument to IBlock_device asynchronous methods.  This allows this pointer passing.
- Rework of CMakeLists.txt for components to improve common.cmake and use COMANCHE_HOME env variable
- Break out components into family directories
### Added
- Initial RAID0 component. Untested.
- Zero-copy read iterator to Append-Store
- Support for callbacks to async_read/write methods on IBlock_device
- Sample component
## 2017-9
### Changed
- Major overhaul of the build/linking arrangement.  SPDK and DPDK are now compiled into the comanche-core dynamic library.  All components needing access to DPDK/SPDK should link to this library.
- Updated to DPDK 17.08 and SPDK (tag fca11f1)
- Changed libcommon.a to dynamic library so that its license (LGPL) can be kept separate.
- Block-nvme component; major rework around out-of-order operation fixes.
- Unified cmake build system.  CMakeLists.txt should include common.cmake, e.g.,include(../../../mk/common.cmake)
- Debug, Release or ASAN (Address Sanitizer) builds configured through: cmake -DCMAKE_BUILD_TYPE=<DEBUG|ASAN|RELEASE> .
- Cmake should be run for root to ensure consistency
### Added
- Placeholder for shared work hooks in IBlock_device interface
- Jenkins continuous integration support for build testing
- Address santizer (ASAN) build support; used for memory leak debugging. Note: ASAN may not work with components t that perform memory tricks.
- Support for DPDK memory in block-posix block device.  This allows it to be used with the pmem-paged-posix component.
- Patch for DPDK 17.05.1 to support XMS-module based physical address resolution.
- Updates to fetch-deps script to perform DPDK patch.
- Removed rapidjson from the fetch-deps into a install-apts (i.e. package). Make sure you delete /usr/local/include/rapidjson from previous installations.
- Improved load component to search current path and COMANCHE_HOME path.
## 2017-8-30
### Changed
- The pmem-paged-posix uses POSIX APIs and XMS module (to get virtual-physical address mappings.  Only the posix-nvme block device current works with the pager-simple. Do NOT attempt to use the uNVMe based block device - this will result in memory corruption.

repository: dnbaker/comanche

repo_name: dnbaker/comanche


text:
# dc-portal
The repo hosts the development of the Digital Connect Self-Service Portal. The portal is to provide GE internal users the subscription access to the rest of DC Services/Products.

## Getting Started

### Development

This repository hosts all the content for DC Service Cloud Portal. Frontend code uses React JS, Bootstrap and JQuery as primary libraries used. Actual code is in the `src/` directory.

We use Node JS and npm for Testing, Development and Linting.

To start a local Web Development Server, run the following commands:

```shell
$ git clone git@github.build.ge.com:DC-Admin-Portal/dc-portal-mirror.git
$ cd dc-portal-mirror
$ npm install
$ npm start
```
Afer successful run of above commands, a new tab will open in your **default** browser pointing to `http://localhost:3011`.

This is a live server to assist your development, by hot reloading the UI everytime you make a change to the concerned files.

### Deploy
It is recommended to launch the app via OCI container spec. For quickest adoption, following below the docker command-

```shell
docker run -e AGENT_REV_TEMP_UNSET=1.2-b.0.reiwa \
CA_PPRS=<app owner's hash> \
EC_AGT_GRP=<can be any random or existing group-name> \
EC_AGT_MODE=<used for system-process access. E.g. "x:gateway"> \
EC_API_APP_NAME=<app context path. E.g. "dcsc"> \
EC_API_DEV_ID=<the app owner's client(license) Id> \
EC_API_OA2=<the URL to SDC> \
EC_PORT=<a local port number to enable the app access. E.g. ":17990"> \
EC_SEED_HOST=<this app's URL> \
EC_SEED_NODE=<the domain seeder's URL. when specified a same value from EC_SEED_HOST, the app becomes self-seeding node> \
ghcr.io/ec-release/api:v1.2beta
```
The deployment requires a pair of client(license) ID and owner's hash which can be aquired [from here](https://github.com/EC-Release/certifactory).

## Live Instances
Instance | API | Branch | Description
-- | --- | --- | ---
[dc-portal](https://dc-portal.run.aws-usw02-dev.ice.predix.io/v1.2beta/dc) | [swagger](https://dc-portal.run.aws-usw02-dev.ice.predix.io/v1.2beta/assets/swagger-ui/) | [Repo](https://github.com/dc-release/dc-portal/tree/v1beta) | staging
[dc-portal-1x](https://dc-portal-1x.run.aws-usw02-dev.ice.predix.io/v1.2beta/dcsc) | N/A | [Repo](https://github.com/paskantishubham/dc-portal/tree/v1beta) | dev
sdc | [swagger](https://ec-oauth-sso.run.aws-usw02-dev.ice.predix.io/v1.2beta/assets/swagger-ui/) | [Repo](https://github.com/EC-Release/web-ui-oa2) | security domain controller
[system access](https://ng-portal-3.run.aws-usw02-dev.ice.predix.io/v1.2beta/ec) | N/A | [Repo](https://github.com/EC-Release/ng-portal/tree/v1.2beta) | seeder management. E.g. terminal access, logs, reboot, etc.

license: MIT

repository: paskantishubham/dc-portal

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: paskantishubham/dc-portal


text:
Reinforcement Learning Examples
===============================

Single-gpu training reinforcement learning examples can be launched from
`isaacgymenvs` with `python train.py`.

When training with the viewer (not headless), you can press `v` to toggle
viewer sync. Disabling viewer sync will improve performance, especially
in GPU pipeline mode. Viewer sync can be re-enabled at any time to check
training progress.

List of Examples
----------------

### Ant [ant.py](../isaacgymenvs/tasks/ant.py)

An example of a simple locomotion task, the goal is to train quadruped
robots (ants) to run forward as fast as possible. The Ant task includes
examples of utilizing Isaac Gym's actor root state tensor, DOF state
tensor, and force sensor tensor APIs. Actor root states provide data for
the ant's root body, including position, rotation, linear and angular
velocities. This information can be used to detect whether the ant has
been moving towards the desired direction and whether it has fallen or
flipped over. DOF states are used to retrieve the position and velocity
of each DOF for the ant, and force sensors are used to indicate contacts
with the ground plane on the ant's legs.

Actions are applied onto the DOFs of the ants to allow it to move, using
the `set_dof_actuation_force_tensor` API.

During resets, we also show usage of
`set_actor_root_state_tensor_indexed` and `set_dof_state_tensor_indexed`
APIs for setting select ants into a valid starting state.

It can be launched with command line argument `task=Ant`.

Config files used for this task are:

-   **Task config**: [Ant.yaml](../isaacgymenvs/cfg/task/Ant.yaml)
-   **rl_games training config**: [AntPPO.yaml](../isaacgymenvs/cfg/train/AntPPO.yaml)

![Ant_running](https://user-images.githubusercontent.com/463063/125260924-a5969800-e2b5-11eb-931c-116cc90d4bbe.gif)

### Humanoid [humanoid.py](../isaacgymenvs/tasks/humanoid.py)

The humanoid example is conceptually very similar to the Ant task. In
this example, we also use actor root states to detect whether humanoids
are been moving towards the desired direction and whether they have
fallen. DOF states are used to retrieve the position and velocity of
each DOF for the humanoids, and force sensors are used to indicate
contacts with the ground plane on the humanoids' feet.

It can be launched with command line argument `task=Humanoid`.

Config files used for this task are:

-   **Task config**: [Humanoid.yaml](../isaacgymenvs/cfg/task/Humanoid.yaml)
-   **rl_games training config**: [HumanoidPPO.yaml](../isaacgymenvs/cfg/train/HumanoidPPO.yaml)

![Humanoid_running](https://user-images.githubusercontent.com/463063/125266095-4edf8d00-e2ba-11eb-9c1a-4dc1524adf71.gif)

### Shadow Hand Object Manipulation [shadow_hand.py](../isaacgymenvs/tasks/shadow_hand.py)

The Shadow Hand task is an example of a challenging dexterity
manipulation task with complex contact dynamics. It resembles OpenAI's
[Learning Dexterity](https://openai.com/blog/learning-dexterity/)
project and [Robotics Shadow
Hand](https://github.com/openai/gym/tree/master/gym/envs/robotics)
training environments. It also demonstrates the use of tendons in the
Shadow Hand model. In this example, we use `get_asset_tendon_properties`
and `set_asset_tendon_properties` to get and set tendon properties for
the hand. Motion of the hand is controlled using position targets with
`set_dof_position_target_tensor`.

The goal is to orient the object in the hand to match the target
orientation. There is a goal object that shows the target orientation to
be achieved by the manipulated object. To reset both the target object
and the object in hand, it is important to make **one** single call to
`set_actor_root_state_tensor_indexed` to set the states for both
objects. This task has 3 difficulty levels using different objects to
manipulate - block, egg and pen and different observations schemes -
`openai`, `full_no_vel`, `full` and `full_state` that can be set in the
task config in `observationType` field. Moreover it supports asymmetric
observations, when policy and value functions get different sets of
observation.

The basic version of the task can be launched with command line argument `task=ShadowHand`.

Config files used for this task are:

-   **Task config**: [ShadowHand.yaml](../isaacgymenvs/cfg/task/ShadowHand.yaml)
-   **rl_games training config**: [ShadowHandPPO.yaml](../isaacgymenvs/cfg/train/ShadowHandPPO.yaml)

Observations types:

-   **openai**: fingertip positions, object position and relative to the
    goal object orientation. These are the same set of observations as used in
    the OpenAI [Learning Dexterity](https://openai.com/blog/learning-dexterity/) project
-   **full_no_vel**: the same as `full` but without any velocity
    information for joints, object and fingertips
-   **full**: a standard set of observations with joint positions and
    velocities, object pose, linear and angular velocities, the goal
    pose and fingertip transforms, and their linear and angular
    velocities
-   **full_state**: `full` set of observations plus readings from
    force-torque sensors attached to the fingertips and joint forces
    sensors. This is the default used by the base **ShadowHand** task

#### OpenAI Variant

In addition to the basic version of this task, there is an additional variant matching OpenAI's [Learning Dexterity](https://openai.com/blog/learning-dexterity/) project.
This variant uses the **openai** observations in the policy network, but asymmetric observations of the **full_state** in the value network.
This can be launched with command line argument `task=ShadowHandOpenAI_FF`.

Config files used for this are:

-   **Task config**: [ShadowHandOpenAI_FF.yaml](../isaacgymenvs/cfg/task/ShadowHandOpenAI_FF.yaml)
-   **rl_games training config**: [ShadowHandOpenAI_FFPPO.yaml](../isaacgymenvs/cfg/train/ShadowHandOpenAI_FFPPO.yaml).

![Shadow_Hand_OpenAI](https://user-images.githubusercontent.com/463063/125262637-328e2100-e2b7-11eb-99af-ea546a53f66a.gif)

#### LSTM Training Variants

There are two other variants of training

-   [ShadowHandOpenAI_LSTM](../isaacgymenvs/cfg/train/ShadowHandOpenAI_LSTMPPO.yaml)
    -   This variant uses LSTM policy and value networks instead of
        feed forward networks, and also asymmetric LSTM critic designed for the OpenAI variant of the task.
    - This can be launched with command line argument `task=ShadowHandOpenAI_LSTM`.
-   [ShadowHand_LSTM](../isaacgymenvs/cfg/train/ShadowHandPPOLSTM.yaml)
    -   This variant uses LSTM policy and value networks instead of
        feed forward networks, but unlike the previous config, uses symmetric observations for the standard variant of Shadow Hand.
    - This can be launched with command line argument `task=ShadowHand train=ShadowHandPPOLSTM`.

#### OpenAI Testing Variant

This is a testing variant of the config to match test conditions from the Learning Dexterity paper such as a longer episode time and not re-applying
domain randomizations after initial randomization. It is not intended to be used for training. Note that if the successTolerance config option is changed to 0.1 during training,
running the testing variant with the standard 0.4 successTolerance will show improved performance. The testing variant will also output the average number of
consecutive successes to the console, showing both the direct average of all environments as well as the average only over environments that have finished.
Over time these numbers should converge.

To test the FF OpenAI variant, use these arguments: `task=ShadowHandTest train=ShadowHandOpenAI_FFPPO test=True checkpoint=<CHECKPOINT_TO_LOAD>`.

To test the LSTM OpenAI variant, use these arguments: `task=ShadowHandTest train=ShadowHandOpenAI_LSTMPPO test=True checkpoint=<CHECKPOINT_TO_LOAD>`.

-   **Task config**: [ShadowHandOpenTest.yaml](../isaacgymenvs/cfg/task/ShadowHandTest.yaml)

### Allegro Hand [allegro_hand.py](../isaacgymenvs/tasks/allegro_hand.py)

This example performs the same cube manipulation task as the Shadow Hand environment, but using the Allegro hand instead of the Shadow hand.

It can be launched with command line argument `task=AllegroHand`.

Config files used for this task are:

-   **Task config**: [AllegroHand.yaml](../isaacgymenvs/cfg/task/AllegroHand.yaml)
-   **rl_games training config**: [AllegroHandPPO.yaml](../isaacgymenvs/cfg/train/AllegroHandPPO.yaml)

![Allegro_Hand_400](https://user-images.githubusercontent.com/463063/125261559-38373700-e2b6-11eb-80eb-b250a0693f0b.gif)

### Anymal [anymal.py](../isaacgymenvs/tasks/anymal.py)

This example trains a model of the ANYmal quadruped robot from ANYbotics
to follow randomly chosen x, y, and yaw target velocities.

It can be launched with command line argument `task=Anymal`.

Config files used for this task are:

-   **Task config**: [Anymal.yaml](../isaacgymenvs/cfg/task/Anymal.yaml)
-   **rl_games training config**: [AnymalPPO.yaml](../isaacgymenvs/cfg/train/AnymalPPO.yaml)

![image](images/rl_anymal.png)

### Anymal Rough Terrain [anymal_terrain.py](../isaacgymenvs/tasks/anymal_terrain.py)

A highly upgraded version of the original Anymal environment which supports
traversing rough terrain and sim2real.

It can be launched with command line argument `task=AnymalTerrain`.

-   **Task config**: [AnymalTerrain.yaml](../isaacgymenvs/cfg/task/AnymalTerrain.yaml)
-   **rl_games training config**: [AnymalTerrainPPO.yaml](../isaacgymenvs/cfg/train/AnymalTerrainPPO.yaml)

**Note** during test time use the last weights generated, rather than the usual best weights.
Due to curriculum training, the reward goes down as the task gets more challenging, so the best weights
do not typically correspond to the best outcome.

**Note** if you use the ANYmal rough terrain environment in your work, please ensure you cite the following work:
```
@misc{rudin2021learning,
      title={Learning to Walk in Minutes Using Massively Parallel Deep Reinforcement Learning},
      author={Nikita Rudin and David Hoeller and Philipp Reist and Marco Hutter},
      year={2021},
      journal = {arXiv preprint arXiv:2109.11978}
```
**Note** The IsaacGymEnvs implementation slightly differs from the implementation used in the paper above, which also
uses a different RL library and PPO implementation. The original implementation will be made available [here](https://github.com/leggedrobotics/legged_gym). Results reported in the Isaac Gym technical paper are based on that repository, not this one.

### Trifinger [trifinger.py](../isaacgymenvs/tasks/trifinger.py)

The [Trifinger](isaacgymenvs/tasks/trifinger.py) environment is modelled on the [Real Robot Challenge 2020](https://real-robot-challenge.com/2020).
The goal is to move the cube to the desired target location, which is represented by a superimposed cube.

It can be launched with command line argument `task=Trifinger`.

-   **Task config**: [Trifinger.yaml](../isaacgymenvs/cfg/task/Trifinger.yaml)
-   **rl_games training config**: [TrifingerPPO.yaml](../isaacgymenvs/cfg/train/Trifinger.yaml)

**Note** if you use the Trifinger environment in your work, please ensure you cite the following work:
```
@misc{isaacgym-trifinger,
  title     = {{Transferring Dexterous Manipulation from GPU Simulation to a Remote Real-World TriFinger}},
  author    = {Allshire, Arthur and Mittal, Mayank and Lodaya, Varun and Makoviychuk, Viktor and Makoviichuk, Denys and Widmaier, Felix and Wuthrich, Manuel and Bauer, Stefan and Handa, Ankur and Garg, Animesh},
  year      = {2021},
  journal = {arXiv preprint arXiv:2108.09779},
}
```

### NASA Ingenuity Helicopter [ingenuity.py](../isaacgymenvs/tasks/ingenuity.py)

This example trains a simplified model of NASA's Ingenuity helicopter to navigate to a moving target.
It showcases the use of velocity tensors and applying force vectors to rigid bodies.
Note that we are applying force directly to the chassis, rather than simulating aerodynamics.
This example also demonstrates using different values for gravitational forces, as well as dynamically writing a physics model from Python code at runtime.
Ingenuity Helicopter visual 3D Model courtesy of NASA: https://mars.nasa.gov/resources/25043/mars-ingenuity-helicopter-3d-model/.

It can be launched with command line argument `task=Ingenuity`.

Config files used for this task are:

-   **Task config**: [Ingenuity.yaml](../isaacgymenvs/cfg/task/Ingenuity.yaml)
-   **rl_games training config**: [IngenuityPPO.yaml](../isaacgymenvs/cfg/train/IngenuityPPO.yaml)

![image](images/rl_ingenuity.png)

### Cartpole [cartpole.py](../isaacgymenvs/tasks/cartpole.py)

Cartpole is a simple example that shows usage of the DOF state tensors. Position and velocity data are used as observation for the cart and pole DOFs. Actions are applied as forces to the cart using `set_dof_actuation_force_tensor`. During reset, we use `set_dof_state_tensor_indexed` to set DOF position and velocity of the cart and pole to a randomized state.

It can be launched with command line argument `task=Cartpole`.

Config files used for this task are:

-   **Task config**: [Cartpole.yaml](../isaacgymenvs/cfg/task/Cartpole.yaml)
-   **rl_games training config**: [CartpolePPO.yaml](../isaacgymenvs/cfg/train/CartpolePPO.yaml)

![image](images/rl_cartpole.png)

### Ball Balance [ball_balance.py](../isaacgymenvs/tasks/ball_balance.py)

This example trains balancing tables to balance a ball on the table top.
This is a great example to showcase the use of force and torque sensors, as well as DOF states for the table and root states for the ball. In this example, the three-legged table has a force sensor attached to each leg using the `create_force_sensor` API. We use the force sensor tensor APIs to collect force and torque data on the legs, which guide position target outputs produced by the policy. The example shows usage of `set_dof_position_target_tensor` to set position targets to keep the ball balanced on the table.

It can be launched with command line argument `task=BallBalance`.

Config files used for this task are:

-   **Task config**: [BallBalance.yaml](../isaacgymenvs/cfg/task/BallBalance.yaml)
-   **rl_games training config**: [BallBalancePPO.yaml](../isaacgymenvs/cfg/train/BallBalancePPO.yaml)

![image](images/rl_ballbalance.png)

### Franka Cabinet [franka_cabinet.py](../isaacgymenvs/tasks/franka_cabinet.py)

The Franka example demonstrates interaction between Franka arm and cabinet, as well as setting states of objects inside the drawer.
It also showcases control of the Franka arm using position targets.
In this example, we use DOF state tensors to retrieve the state of the Franka arm, as well as the state of the drawer on the cabinet.
Actions are applied using `set_dof_position_target_tensor` to set position targets for the Franka arm DOFs.

During reset, we use indexed versions of APIs to reset Franka, cabinet, and objects inside drawer to their initial states. `set_actor_root_state_tensor_indexed` is used to reset objects inside drawer, `set_dof_position_target_tensor_indexed` is used to reset Franka, and `set_dof_state_tensor_indexed` is used to reset Franka and cabinet.

It can be launched with command line argument `task=FrankaCabinet`.

Config files used for this task are:

-   **Task config**: [FrankaCabinet.yaml](../isaacgymenvs/cfg/task/FrankaCabinet.yaml)
-   **rl_games training config**: [FrankaCabinetPPO.yaml](../isaacgymenvs/cfg/train/FrankaCabinetPPO.yaml)

![image](images/rl_franka.png)

### Quadcopter [quadcopter.py](../isaacgymenvs/tasks/quadcopter.py)

This example trains a very simple quadcopter model to reach and hover near a fixed position.  The quadcopter model is generated procedurally and doesn't actually include any rotating blades.  Lift is achieved by applying thrust forces to the "rotor" bodies, which are modeled as flat cylinders.  This is a good example of using LOCAL_SPACE forces.  In addition to thrust, the pitch and roll of each rotor is controlled using DOF position targets.

It can be launched with command line argument `task=Quadcopter`.

Config files used for this task are:

-   **Task config**: [Quadcopter.yaml](../isaacgymenvs/cfg/task/Quadcopter.yaml)
-   **rl_games training config**: [QuadcopterPPO.yaml](../isaacgymenvs/cfg/train/QuadcopterPPO.yaml)

![image](images/rl_quadcopter.png)

repository: munjuhyeok/IsaacGymEnvs

branch_name: refs/heads/main

repo_name: munjuhyeok/IsaacGymEnvs


text:
---
title: bloblang
type: input
status: beta
categories: ["Utility"]
---

<!--
     THIS FILE IS AUTOGENERATED!

     To make changes please edit the contents of:
     lib/input/bloblang.go
-->

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

BETA: This component is mostly stable but breaking changes could still be made outside of major version releases if a fundamental problem with the component is found.

Generates messages at a given interval using a [Bloblang](/docs/guides/bloblang/about)
mapping executed without a context. This allows you to generate messages for
testing your pipeline configs.

```yaml
# Config fields, showing default values
input:
  bloblang:
    mapping: ""
    interval: 1s
    count: 0
```

## Fields

### `mapping`

A [bloblang](/docs/guides/bloblang/about) mapping to use for generating messages.

Type: `string`
Default: `""`

```yaml
# Examples

mapping: root = "hello world"

mapping: root = {"test":"message","id":uuid_v4()}
```

### `interval`

The time interval at which messages should be generated, expressed either as a duration string or as a cron expression. If set to an empty string messages will be generated as fast as downstream services can process them.

Type: `string`
Default: `"1s"`

```yaml
# Examples

interval: 5s

interval: 1m

interval: 1h

interval: '@every 1s'

interval: 0,30 */2 * * * *

interval: 30 3-6,20-23 * * *
```

### `count`

An optional number of messages to generate, if set above 0 the specified number of messages is generated and then the input will shut down.

Type: `number`
Default: `0`

## Examples

You can use Bloblang to generate payloads of differing structure at random:

```yaml
input:
  bloblang:
    mapping: |
      root = if random_int() % 2 == 0 {
        {
          "type": "foo",
          "foo": "is yummy"
        }
      } else {
        {
          "type": "bar",
          "bar": "is gross"
        }
      }
```

repository: dilipkk-foyernet/benthos

branch_name: refs/heads/master

gha_language: Go

repo_name: dilipkk-foyernet/benthos


text:
# Employee Tracker
### Table of Contents
- [Description](#Description)
- [Video Links](#video-link)
- [How to Use](#how-to-use)
- [Sources](#sources)

## Description
This is an application that allows the user to track employees, departments, and roles via the terminal.

---
## Video Link
There are many features to this application so there are three videos.
### Video 1 [Link to Video 1](https://drive.google.com/file/d/1nLYfGJmI5qSLCMsAyXtl5yl-cyNdZApd/view)
This video shows how the user can view department, roles, and employees.

---
### Video 2 [Link to Video 2](https://drive.google.com/file/d/1f6pb20KEklsIUbtzH7ajpQo6eXEVHjMH/view)
This video shows how the user can add department, roles, and employees. It also shows how to delete an employee and role.

---
### Video 3 [Link to Video 3](https://drive.google.com/file/d/1h6W6OcB6nd_1xm7r1BnYuz8zMQSPGWnW/view)
This video shows how the user can delete a department. It also shows how to exit the application.

---
## How to Use
Install the necessary NPM packages to run the program. You will need inquirer, mysql, and console-table.
```bash
npm install inquirer
npm install mysql
npm install console.table
```
You will need to add the database to your workbench. In order for it to work, you must update your credentials in the index.js file. From there, run
```bash
mysql -uroot -p < db/employeetrac_db.sql
```
Add the seeds.sql file via the terminal.

After you install the NPM packages, seed the database and seed file, open the terminal and run
```bash
node index.js
```

From there, you can add or delete departments, roles, and employees. You can also update an employee's role.

---
## Sources
Created and designed by me. Click [whatawhat](www.github.com/whatawhat) to visit my repository.


text:
# Scroll Direction

[![npm version](https://badge.fury.io/js/%40ryanburnette%2Fscroll-direction.svg)](https://badge.fury.io/js/%40ryanburnette%2Fscroll-direction)

This library is my approach to gracefully detecting vertical scroll direction
in a browser. It works by keeping track of a series of throttled detect events,
then invoking a callback with a direction argument once the series contains
only one event direction.

## Usage

```javascript
var s = new ScrollDirection(function (dir) {
  console.log(dir)
})
```

### Options

There are two options, series and throttle. Tweak the options to get the
desired behavior.

```javascript
var options = {
  series: 5,
  throttle: 100
}
new ScrollDirection(callback,options)
```

### Destroy

```javascript
s.destroy()
```

## Installation

As a library consumed and packaged by something like Webpack or Rollup.

```
npm install @ryanburnette/scroll-direction
```

```javascript
var ScrollDirection = require('@ryanburnette/scroll-direction')
```

From a CDN.

```
<script src="https://unpkg.com/<EMAIL_ADDRESS>type="text/javascript"></script>
```

license: ISC

repository: ryanburnette/scroll-direction

repo_name: ryanburnette/scroll-direction


text:
[![GitHub Issues](https://img.shields.io/github/issues/xinabox/pxt-SW02.svg)](https://github.com/xinabox/pxt-SW02/issues)
![GitHub Commit](https://img.shields.io/github/last-commit/xinabox/pxt-SW02)
![Maintained](https://img.shields.io/maintenance/yes/2020)
![Build status badge](https://github.com/xinabox/pxt-SW02/workflows/maker/badge.svg)
![Build status badge](https://github.com/xinabox/pxt-SW02/workflows/microbit/badge.svg)
# XinaBox SW02 MakeCode extension

This library provides functions to access environmental data from the [XinaBox SW02](https://xinabox.cc/products/sw02).

[Read more about it or purchase one here](https://xinabox.cc/products/sw02)

## License:

MIT

Copyright (c) 2019, XinaBox Limited

## Supported targets:

* PXT/microbit
* PXT/CC03
* PXT/CS11
* PXT/CW03


text:
# EventEventlistEvent

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**devid** | **Integer** | The device id of the node if it is still part of the cluster otherwise None. |  [optional]
**ended** | [**BigDecimal**](BigDecimal.md) | Time event was ended (eventgroup resolved) |  [optional]
**event** | **Integer** | Integer identifier of the event type |  [optional]
**id** | **String** | Unique identifier of event occurrence. |  [optional]
**lnn** | **Integer** | The lnn of the node if it is still part of the cluster, otherwise None. |  [optional]
**message** | **String** | Human readable description |  [optional]
**resolveTime** | **Integer** | Time the event was resolved. |  [optional]
**severity** | [**SeverityEnum**](#SeverityEnum) | Severity of event occurrence. |  [optional]
**specifier** | [**Empty**](Empty.md) | A collection of parameters defined per event. |  [optional]
**time** | **Integer** | Time event was detected as UNIX timestamp. |  [optional]
**value** | [**BigDecimal**](BigDecimal.md) | Value of measurement associated with this event. |  [optional]

## Enum: SeverityEnum
Name | Value
---- | -----
INFORMATION | "information"
WARNING | "warning"
CRITICAL | "critical"
EMERGENCY | "emergency"
UNKNOWN | "unknown"


text:
# README

## Description:
A high-contrast Monokai with focus on visibility and clean colors!

Press Ctrl+K Ctrl+T and type Monokai Plus and select your desired theme

Font used: Hack,
Looks good with: Bracket Pair Colorizer

## Screenshots

### Light Teal
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/light-teal-screenshot.PNG)

### Dark Teal
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/dark-teal-screenshot.PNG)

### Black Forest
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/black-forest-screenshot.PNG)

### Cyber Yellow
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/cyber-yellow-shreenshot.PNG)

### Sunny Side
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/sunny-side-screenshot.PNG)

### Disney Pink
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/disney-pink-screenshot.PNG)

### Angry Red
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/angry-red-screenshot.PNG)

### Chalk White
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/chalk-white-screenshot.PNG)

### Slate
![Screenshots](https://github.com/hsakas/MonokaiPlus/raw/master/screenshots/slate-screenshot.PNG)

## Author:
algor

## Questions or Feedback:
Send it to<EMAIL_ADDRESS>will be happy to look into it.

## Licence
MIT

repository: hsakas/MonokaiPlus

repo_name: hsakas/MonokaiPlus


text:
### [CVE-2015-10036](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-10036)
![](https://img.shields.io/static/v1?label=Product&message=dronfelipe&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%20n%2Fa%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-89%20SQL%20Injection&color=brighgreen)

### Description

A vulnerability was found in kylebebak dronfelipe. It has been declared as critical. Affected by this vulnerability is an unknown functionality. The manipulation leads to sql injection. The name of the patch is 87405b74fe651892d79d0dff62ed17a7eaef6a60. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-217951.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/Live-Hack-CVE/CVE-2015-10036

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# psf

> Compute the point spread function from a 3d image of beads

This package computes the point spread function (psf) from a 3d image of beads. It first finds the centers of each well separated bead and then fits 2d Gaussians to max projections of the bead. It returns the resulting psfs as a table. Look at the examply jupyter notebook for usage instructions.

### install

```bash
git clone https://github.com/sofroniewn/psf
```


text:
nginx-bakery
============

PHP scripts to create nginx config files from templates

**_ATTENTION_: This repository (by now) is meant for demonstration purposes only. Unless the includes were not pimped by an experienced nginx admin, I do not recommend using generated configs in production environments.**

This library can possibly help you, if you are managing a lot of virtual hosts.
It has some basic logic for dynamic inclusion and using variables and mixins, stuff that is often refered as to "templating".

If you start with nginx, you might stumble upon some basic problems, like the wish to use variables within your server definitions.
All discussions point out, that nginx does not support this, because of runtime performance impacts.
The recommended solution is to use a template system to generate your configs. As so often, I could not find anything ready-to-use, so I wrote this small library.

The configurations are far away from being good, as I started to learn nginx just a couple of days ago.
I can manage my own sites using these scripts, so I thought I share it with the community.

Directories
===========
For the sake of out-of-the-box usage, all scripts rely on two paths:

- /etc/nginx/             - as base configuration directory for nginx
- /opt/nginx-bakery/      - as installation directory of this library

Installation
============

```
cd /opt/
git clone https://github.com/kevinpapst/nginx-bakery
```

Initial setup
=============

- Create "sites-php" with `cp sites.php.dist sites.php`
- Adjust "sites.php" to your needs (or use the example from sites.php.dist for a demo)
- Run "php bakery.php"
- Enable sites from the "nginx/sites-enabled" directory (some options are named below)

Enable sites
============
There are several ways on how to activate the generated configs ... use your imagination if you do not like the ones mentioned below :)

1. This is the most easy one and will work, if you manage all sites with this library:
```
mv /etc/nginx/sites-enabled /etc/nginx/backup_sites-enabled
ln -s /opt/nginx-bakery/nginx/sites-enabled /etc/nginx/sites-enabled
ln -s /opt/nginx-bakery/nginx/includes /etc/nginx/includes
```

2. Or you could copy the files over to their new location:
```
cp -r /opt/nginx-bakery/nginx/includes /etc/nginx/
cp /opt/nginx-bakery/nginx/sites-enabled/* /etc/nginx/sites-enabled/
```

HOW-TO
======
Lets start with a wording definition.

nginx-bakery knows three different stages of configuration files:
1) cookbooks (a full set of several server definitions)
2) recipes (single server definitions)
3) ingredients (nginx includes)
where each stage supports the usage of variables during the generation process.

A set of server configurations and includes are "baked" - namely the process of parsing your configuration
and creating static nginx config files and includes from your definitions.

All your sites are defined in the file "sites.php". If you want to add cookbooks, recipes or ingredients, you need to adjust "config.php" by now.
This might change in the future, but for now keeping them in a config file makes it easier to handle.

repository: Rndwiga/nginx-bakery

repo_name: Rndwiga/nginx-bakery


text:
# Trebbianno

[![Build Status](https://travis-ci.org/jGRUBBS/trebbianno-ruby-api.svg?branch=master)](https://travis-ci.org/jGRUBBS/trebbianno-ruby-api)
[![Code Climate](https://codeclimate.com/github/jGRUBBS/trebbianno-ruby-api.png)](https://codeclimate.com/github/jGRUBBS/trebbianno-ruby-api)

Ruby library for interfacing with the Trebbianno Fulfillment API

## Installation

Add this line to your application's Gemfile:

    gem 'trebbianno-ruby-api'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install trebbianno-ruby-api

## Usage

Send order request

```ruby

order = {
  shipping_address: {
    first_name: "John",
    last_name:  "Smith",
    address1:   "123 Here Now",
    address2:   "2nd Floor",
    city:       "New York",
    state:      "NY",
    country:    "US",
    zipcode:    "10012",
    phone:      "123-123-1234"
  },
  number:       "R123123123",
  orderdate:    "2014-06-16",
  line_items: [
    {
      price:    "127.23",
      quantity: "1",
      sku:      "123332211"
    }
  ],
  shipping_method: "UPS 1-Day",
  shipping_cost:   "20.00",
  invoice_url:   "http://example.com/R123123123/invoice"
}

client   = Trebbianno::Client.new("username", "password")
response = client.send_order_request(order)

if response.success?
  # DO SOMETHING
else
  # QUEUE REQUEST, STORE AND RAISE ERRORS
end

```

Get inventory

```ruby

client    = Trebbianno::Client.new("username", "password")
inventory = client.get_inventory

inventory.each do |stock|
  ...
end

```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: jGRUBBS/trebbianno-ruby-api

gha_language: Ruby

repo_name: jGRUBBS/trebbianno-ruby-api


text:
# unbound-crypto-ms

### Set up & Run
1. Clone the unbound-crypto-ms repository.
2. Install all required dependencies using maven.
3. run: mvn clean package in order to build the application jar file.
4. navigate to the jar target folder
5. run: java -jar crypto-ms-1.0.0.jar (or run through your IDE).

### API Explanations
controller baseUrl: http://localhost:8080/crypto
#### generateKey
HTTP POST http://localhost:8080/crypto/keys \
generates a new RSA KeyPair and returns a UUID string which serves as their unique key (e.g dc4b4395-cee5-44ec-ad2e-6758131fee7f)
with HttpStatus 201 (created)
#### deleteKey
HTTP DELETE http://localhost:8080/crypto/keys/{id} \
example: http://localhost:8080/crypto/keys/dc4b4395-cee5-44ec-ad2e-6758131fee7f
will delete the id associated RSA KeyPair with HttpStatus 204 (no content)
iff the id exists.
#### getIds
HTTP GET http://localhost:8080/crypto/keys/ids \
will return a list of all existing KeyPairs ids along with a 200 (ok) status response.
#### sign
HTTP POST http://localhost:8080/crypto/signatre \
content-type: application/json \
with parameters:
* id: UUID String
* data: a base64 string or byte array
* request body example:\
``
{
    "id": "dc4b4395-cee5-44ec-ad2e-6758131fee7f",
    "data": "aGVsbG8gd29ybGQ0NDQ="
}
``

returns the corresponding signature in it's base64 string representation
with a status 200 (ok) iff the id exists.
#### verifySign
HTTP POST http://localhost:8080/crypto/signatre \
content-type: application/json \
with parameters:
* id: UUID String
* data: a base64 string or byte array
* signature: a base64 string representation of the signature
* request body example: \
``
{
    "id": "dc4b4395-cee5-44ec-ad2e-6758131fee7f",
    "data": "aGVsbG8gd29ybGQ0NDQ=",
    "signature": "oSXk+kRf3I5yD4yHjuM3R587h2DU7oCrEdtW7zgxBluX9pKpDiGEz2sT3xZ..."
}
``

returns true iff the id exists, and the signature has been verified on the given data,
with a status 200 (ok).

repository: lior-negri/unbound-crypto-ms

repo_name: lior-negri/unbound-crypto-ms


text:
# Installation on Ubuntu 18.04 LTS (Bionic)

> This is a standalone, distribution-specific version of `INSTALL.md`. You do not need to read or follow the original file, but can refer to it for generic steps like setting up SSH keys (which are assumed to be common knowledge here)

`piku` setup is simplified in Bionic, since it can take advantage of some packaging improvements in [uWSGI][uwsgi] and does not require a custom `systemd` service. Since Bionic also ships with Python 3.6, this is an ideal environment for new deployments on both Intel and ARM devices.

## Dependencies

Before installing `piku`, you need to install the following packages:

```bash
sudo apt-get update
sudo apt-get install -y build-essential certbot git incron \
    libjpeg-dev libxml2-dev libxslt1-dev zlib1g-dev nginx \
    python-certbot-nginx python-dev python-pip python-virtualenv \
    python3-dev python3-pip python3-click python3-virtualenv \
    uwsgi uwsgi-plugin-asyncio-python3 uwsgi-plugin-gevent-python \
    uwsgi-plugin-python uwsgi-plugin-python3 uwsgi-plugin-tornado-python
```
## Setting up the `piku` user

`piku` requires a separate user account to run. To create a new user with the right group membership (we're using the built-in `www-data` group because it's generally thought of as a less-privileged group), enter the following commands:

```bash
# pick a username
export PAAS_USERNAME=piku
# create it
sudo adduser --disabled-password --gecos 'PaaS access' --ingroup www-data $PAAS_USERNAME
```

This user _is not supposed to login to your system_. Instead, you'll interact with `piku` via SSH, and set things up by using `su`:

```bash
# copy your public key to /tmp (I'm assuming it's the first entry in authorized_keys)
head -1 ~/.ssh/authorized_keys > /tmp/pubkey
# install piku and have it set up SSH keys and default files
sudo su - $PAAS_USERNAME -c "wget https://raw.githubusercontent.com/rcarmo/piku/master/piku.py && python3 ~/piku.py setup && python3 ~/piku.py setup:ssh /tmp/pubkey"
rm /tmp/pubkey
```

The `setup` output should be something like this:

```
Creating '/home/piku/.piku/apps'.
Creating '/home/piku/.piku/repos'.
Creating '/home/piku/.piku/envs'.
Creating '/home/piku/.piku/uwsgi'.
Creating '/home/piku/.piku/uwsgi-available'.
Creating '/home/piku/.piku/uwsgi-enabled'.
Creating '/home/piku/.piku/logs'.
Setting '/home/piku/piku.py' as executable.
```

## uWSGI Configuration

[uWSGI][uwsgi] in Bionic requires very little configuration, since it is already properly packaged. All you need to do is place a link to the `piku` configuration file in `/etc/uwsgi/apps-enabled`:

```bash
sudo ln /home/$PAAS_USERNAME/.piku/uwsgi/uwsgi.ini /etc/uwsgi/apps-enabled/piku.ini
sudo systemctl restart uwsgi
```

## `nginx` Configuration

`piku` requires you to edit `/etc/nginx/sites-available/default` to the following, so it can inject new site configurations into `nginx`:

```
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    root /var/www/html;
    index index.html index.htm;
    server_name _;
    location / {
        try_files $uri $uri/ =404;
    }
}
# replace `PAAS_USERNAME` with the username you created.
include /home/PAAS_USERNAME/.piku/nginx/*.conf;
```

## `incron` Configuration

To detect configuration changes and tell `nginx` to activate new `piku` sites, we use `incron`. Create `/etc/incron.d/paas` with the following contents:

```bash
# replace `PAAS_USERNAME` with the username you created.
/home/PAAS_USERNAME/.piku/nginx IN_MODIFY,IN_NO_LOOP /bin/systemctl reload nginx
```

## Notes

> This file was last updated on November 2018

[uwsgi]: https://github.com/unbit/uwsgi


text:
---
title: "Leg Shortening"
---

This dictates how long the pants will be. It is a factor of the inseam measurement. The larger the value, the more that will be taken off the length.

## Effect of this option on the pattern

![This image shows the effect of this option by superimposing several variants that have a different value for this option](waralee_legshortening_sample.svg "Effect of this option on the pattern")

repository: freesewing/freesewing

branch_name: refs/heads/develop

repo_name: freesewing/freesewing


text:
---
layout: default
---

# 1993-02-05 - RE: 'Sunday Times' article on GSM changes

## Header Data

From<EMAIL_ADDRESS>(Murdering Thug)

To<EMAIL_ADDRESS>Message Hash: 04879a03d47222d82c86ba95348f2ca0dd4c7b4f40175269029a87f19fe3528a

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1993-02-05 19:40:52 UTC

Raw Date: Fri, 5 Feb 93 11:40:52 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Murdering Thug)
Date: Fri, 5 Feb 93 11:40:52 PST
To<EMAIL_ADDRESS>Subject: RE: 'Sunday Times' article on GSM changes
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

(Eric Fogleman writes)
> (Thug writes)
> > According to what I read it seems that the whole issue of cellular radio
> > signal encryption is really a non-issue.  They could have the most secure
> ...
> > What makes you think they don't have the same kind of REMOB/BLV capability
> > to the cellular telephone switches?  I mean, if a conversation is scrambled
> ...
>
> If getting around GSM encryption is no problem, then why are governments
> pushing the issue?
>
> Eric Fogleman

The first reason is that they want to steer people's attentions away from the
real issues.   Basically,
they want to fight us every step of the way, to make sure we don't get close
enough to really start eating into their security..

The second reason of course is that they want to play super g-men, and ride
around in vans full of cellular equipment following their suspects around
the city.
They need outdoor recreation, they need to feel like they're all James Bond
or something.  That's what the second reason is.

Practically speaking though, cellular encryption does hamper their ability
to listen in.  Because sometimes they don't have access to the REMOB at
a cellular switch, like when they are listening in without a warrant.  If
they access the REMOB, that would be noted in a log somewhere and then they
could have problems if the suspect finds out they were wiretapping without
a warrant.  If they just pick it off the air, they don't need a warrant. If
they do a wiretap the old way, they do.  Hence, secure cellular encryption
would actually prevent unauthorized wiretapping, which is something they
never seem to mention to the people they are empowered to protect.

Thug

{% endraw %}
```

## Thread

+ Return to [February 1993](/archive/1993/02)

+ Return to "[Eric Fogleman <Eric.Fogleman@analog.com>](/authors/eric_fogleman_eric_fogleman_at_analog_com_)"
+ Return to "[Eric Hughes <hughes@soda.berkeley.edu>](/authors/eric_hughes_hughes_at_soda_berkeley_edu_)"
+ Return to<EMAIL_ADDRESS>(Charles E. Wareing)](/authors/ncselxsichasw_at_netcom_com_charles_e_wareing_)"
+ Return to "[Phiber Optik <phiber@eff.org>](/authors/phiber_optik_phiber_at_eff_org_)"
+ Return to<EMAIL_ADDRESS>(Murdering Thug)](/authors/thug_at_phantom_com_murdering_thug_)"

+ 1993-02-05 (Fri, 5 Feb 93 10:52:13 PST) - [RE: 'Sunday Times' article on GSM changes](/archive/1993/02/7ab468b53e140757d2528510e5cefdb2415a090435f86d0e3bcf217b48831b78) - _Eric Fogleman<EMAIL_ADDRESS>  + 1993-02-05 (Fri, 5 Feb 93 11:40:52 PST) - RE: 'Sunday Times' article on GSM changes -<EMAIL_ADDRESS>(Murdering Thug)_
    + 1993-02-05 (Fri, 5 Feb 93 13:25:04 PST) - [RE: 'Sunday Times' article on GSM changes](/archive/1993/02/1b782193c7de9bb3f158935db3c66b9748efb201681c409b64c516dbe6e444b6) - _Phiber Optik<EMAIL_ADDRESS>      + 1993-02-05 (Fri, 5 Feb 93 15:22:47 PST) - [Re: 'Sunday Times' article on GSM changes](/archive/1993/02/2e30bd2f6e0201436af38ae7d831a01eab83fc60b16c56ff5442a6ae26cfb939) -<EMAIL_ADDRESS>(Charles E. Wareing)_
        + 1993-02-06 (Sat, 6 Feb 93 00:09:28 PST) - [Re: 'Sunday Times' article on GSM changes](/archive/1993/02/269e0e4319740e6fc0b2c85663d736e8071256634f6c51f6b436e15b750f8b9d) - _Phiber Optik<EMAIL_ADDRESS>  + 1993-02-05 (Fri, 5 Feb 93 12:25:23 PST) - ['Sunday Times' article on GSM changes](/archive/1993/02/9e41c219290036d81e1adf64569e756e5b21b3fcabbbe0caf81fe7a3ad9f907d) - _Eric Hughes<EMAIL_ADDRESS>


text:
---
date: 2015-10-06 23:59
layout: rafaga
rafagas:
- desc: The importance of historical maps, interview with David Rumsey
  keyw: oldies
  link: http://www.citylab.com/tech/2013/05/why-historical-maps-still-matter-so-much-today/5537/
  microlink:
    desc: Mega-collector David Rumsey explains how maps are an “archive of information.”
    image: https://assets.bwbx.io/images/users/iqjWHBFdfxIU/i5fqDi2DKqhA/v0/1200x743.png
    logo: https://assets.bwbx.io/s3/javelin/public/javelin/images/favicon-black-63fe5249d3.png
    title: Why Historical Maps Still Matter So Much, Even Today
- desc: Earth as art, an USGS imagery selection
  keyw: art
  link: https://eros.usgs.gov/imagegallery/earth-art#https://eros.usgs.gov/sites/all/files/external/imagegallery/2050
  microlink:
    desc: At the USGS EROS Center, we study land change and produce land change data
      products used by researchers, resource managers, and policy makers across the
      nation and around the world. We also operate the Landsat satellite program with
      NASA, and maintain the largest civilian collection of images of the…
    image: https://www.usgs.gov/sites/all/themes/usgs_palladium/logo.png
    logo: https://www.usgs.gov/sites/all/themes/usgs_palladium/favicons/apple-touch-icon.png
    title: Earth Resources Observation and Science (EROS) Center
- desc: 6th of November, all day long course about GIS & Drones by CATUAV and BGEO
  keyw: uav
  link: http://www.eventbrite.com/e/entradas-gis-drones-17919077443
  microlink:
    desc: ^^^^^ La revolución tecnológica que estamos viviendo actualmente está rompiendo
      muchos paradigmas. Tecnologías muy sofisticadas están cada vez mas al alcance
      de todos. El alto coste de licencias y de la tecnologia ya no es un problema
      para acceder a ellas, pero es necesario invertir recursos en con…
    image: https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F14521898%2F80492117123%2F1%2Foriginal.jpg?w=1000&auto=format%2Ccompress&q=75&sharp=10&rect=0%2C7%2C1386%2C693&s=0b4cd3041bf49b200a4bc19422f4611f
    logo: https://cdn.evbstatic.com/s3-build/201048-rc2021-09-27_16.04-17ad9e6/django/images/favicons/favicon-194x194.png
    title: GIS & DRONES
- desc: London tube map with the prize for 1 room apartments rents
  keyw: rent
  link: https://www.thrillist.com/lifestyle/london/london-underground-rent-map
  microlink:
    desc: Jesus Hyde Park Corner, relax.
    image: https://assets3.thrillist.com/v1/image/1564592/1200x600/scale;
    logo: https://www.thrillist.com/static/thrillist-fav.ico
    title: 'The London Underground Rent Map: Where You Can’t Afford to Live, by Stop'
- desc: 3D globe of Ceres made with imagery from Dawn mission
  keyw: ceres
  link: http://www.nytimes.com/interactive/2015/01/13/science/space/photos-of-ceres-from-nasa-dawn.html
  microlink:
    desc: Dawn is mapping the dwarf planet Ceres, a Texas-size ball of ice and rock.
    image: https://static01.nyt.com/images/2015/01/13/science/space/photos-of-ceres-from-nasa-dawn-1421171310893/photos-of-ceres-from-nasa-dawn-1421171310893-facebookJumbo-v7.png?year=2015&h=549&w=1050&s=342b45e5da6c46cf5e9900dbb4f459395379665119c807d78d88b1cef535b86b&k=ZQJBKqZ0VN
    logo: https://static01.nyt.com/images/icons/ios-ipad-144x144.png
    title: NASA’s Dawn Spacecraft Maps the Surface of Ceres (Published 2015)
rid: '199'
---

repository: geoinquiets/rafagas

branch_name: refs/heads/gh-pages

gha_language: SCSS

gha_license_id: NOASSERTION

repo_name: geoinquiets/rafagas


text:
Calculator+
===========

A calculator extension for chrome, designed to make quick calculations on the fly.

Install: https://chrome.google.com/webstore/detail/calculator%2B/pmjjijdigbmcgnmkmgkcboemdggjgpog

Author: Matas Kairaitis


text:
## 1.0.0+6
  * Fixed a bug in image url caching which caused to return null if not cached instead of receiving the image url from firebase.

## 1.0.0+5
  * Fixed a bug that caused customUploadFunction not to work because of a forgotten await
  * Made parsing of file name more flexible.
  * The filename mist be like custom1_..._custom_x_id_customy.(jpg|png|...) now

## 1.0.0+4
  * Add reference to complete tutorial
  * Add documentation to code

## 1.0.0+3
  * Updated homepage to github reference.

## 1.0.0+2
  * Updated homepage to github reference.

## 1.0.0+1
  * Initial release.


text:
---
layout: default
---

# 1995-12-18 - Re: [more NOISE] BIO-MUNITION: gifs of perl-RSA tattoo

## Header Data

From: Alan Olsen<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 226740b6cb8e35eafba0e50293e20f5b6ab98714cc9c26d1ee7a3219b56d943a

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-12-18 09:13:32 UTC

Raw Date: Mon, 18 Dec 1995 17:13:32 +0800

## Raw message

```
{% raw  %}From: Alan Olsen<EMAIL_ADDRESS>Date: Mon, 18 Dec 1995 17:13:32 +0800
To<EMAIL_ADDRESS>Subject: Re: [more NOISE] BIO-MUNITION: gifs of perl-RSA tattoo
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 11:06 PM 12/17/95 -0500, you wrote:
[Much noise on Perl-RSA tatoo and compile problems deleted]

The only thought that came to mind on this thread was how closely the tatoo
artist spellchecked that tatoo.  It would be pretty funny to have a
"munitions violation" that was non-functional due to tatooing errors.

|   Remember: Life is not always champagne. Sometimes it is REAL pain.   |
|"It's only half a keyserver. I had to split the  | Disclaimer:          |
|other half with the government man." - R. Rococo |   Ignore the man     |
|`finger -l<EMAIL_ADDRESS>for PGP 2.6.2 key |  behind the keyboard.|
|         http://www.teleport.com/~alano/         |<EMAIL_ADDRESS>|

{% endraw %}
```

## Thread

+ Return to [December 1995](/archive/1995/12)

+ Return to "[Alan Olsen <alano@teleport.com>](/authors/alan_olsen_alano_at_teleport_com_)"

+ 1995-12-18 (Mon, 18 Dec 1995 17:13:32 +0800) - Re: [more NOISE] BIO-MUNITION: gifs of perl-RSA tattoo - _Alan Olsen<EMAIL_ADDRESS>


text:
# Discord bot for CoD Warzone using node.js

This is a [Discord](https://discord.com/) bot written in Node.js.
It serves the channel data on a Battle[]().net users [Call of Duty Warzone](https://www.callofduty.com/warzone) career with simple commands.
The bot also saves the data of the users that has run the command in MongoDB to update a leader board.
The leader board is accessible through the `!leaderboard` command.
Replies from the bot comes as an "embed", a richer type of message:

Big thank you to the project over at the [node Call of Duty API wrapper](https://github.com/lierrmm/Node-CallOfDuty) for providing an easy to use API wrapper.

## Installation
### prerequisites
To use this bot you need:
* an [Activision account](https://profile.callofduty.com/cod/signup)
* [Node.js installed.](https://nodejs.dev/learn/how-to-install-nodejs)
* a [Discord developer account with a bot user created](https://discordpy.readthedocs.io/en/latest/discord.html)
* * to add the bot account to your server (also covered in the link above).
* a MongoDB account, [it's free!](https://www.mongodb.com/what-is-mongodb)

#### Yes, I have all of that already. How do I install?
1. Clone this repository to a folder.
2. Enter the values of your Activision, Discord bot and MongoDB accounts in the file called "config_EXAMPLE.json".
3. Open the folder with your favorite command line tool and run the command `npm install`
4. After that is done run the command `node server.js`
5. The server will reply with a "Ready!" when it is ready.

To test that everything is working I suggest that you type in `!wins <player_id>`.
This command both loads data from the CoD API and pushes data to the database. If you get no error there you should be good to go!
## Usage
The commands available and their respective usage is best seen by using the `!help` command.
This lists all commands and how they are used together with a short but silly description.

## Screenshots
#### !wins

#### !kills

#### !leaderboard

#### !fails


text:
# DocAuth - Document forgery detection and analysis Application.
## Team - Guardians of the Galaxy (15491)
### Smart India Hackathon

This is an implementation of python script to detect a series of forgeries that can happen in a document. Our basic module supports
-signature fraud detection and analysis
-copy and move forgery detection
-identification document forgery detection
-And normal document forgery detection and analysis.

### [Working]
1. We have tried impelementing a cloud based web application where user is asked to choose whether he wants to check signature forgery or document forgery.
2. Based on his choice he is asked to upload the scanned document. Our machine learning algorithms and neurals network based artificial intelligence detection technique.
3. The results generate a graph of the analysis and shows the areas where the forgery has been done. It shows a percentage accuracy of the report which is classified as follows
  0% - 10%  : Authenic
  10% - 55% : Suspicious
  55% - 60% : Foreged

### Attachments
-The source code of all the python files used for analysis.
-The backend and frontend code of the web application
-Several analysis results generated from the code with the disrepencies underlined.
-Design of the web-app

### Source and Papers used

1. Farid, H., 2009. Seeing is not believing. IEEE Spectrum, 46(8).
2. Farid, H., 2009. Image forgery detection. IEEE Signal processing magazine, 26(2), pp.16-25.
3. Johnson, M.K. and Farid, H., 2005, August. Exposing digital forgeries by detecting inconsistencies in lighting. In Proceedings of the 7th workshop on Multimedia and security (pp. 1-10). ACM.


text:
# `wasi-tensorflow-inference`

### TensorFlow inferencing in WebAssembly outside the browser

<https://radu-matei.com/blog/tensorflow-inferencing-wasi/>

This is a demonstration of running the [MobileNet V2 TensorFlow
model][mobilenet] in WebAssembly System Interface (WASI) runtimes outside the
browser. The project uses [the Sonos Tract crate][sonos-tract] to build an
inference program in Rust, which is then compiled to Rust's `wasm32-wasi`
WebAssembly target.

This is an experimental project, which has a few goals:

- build a more complex WebAssembly module that does _not_ use any code
  generation for bindings (such as [`wasm-bindgen`][wasm-bindgen]).
- run the module in Wasmtime, exemplifying writing arbitrary data (such as
  images) in the guest's linear memory using Rust and `Wasmtime::Memory`.
- build a simple runtime on top of a web server that accepts incoming
  connections, reads an image URL from their request body, execute the inference
  on the fetched image, and return the model's prediction
- execute the same WebAssembly module in Node's WASI runtime and exemplify
  writing into the module's linear memory using JavaScript.

### Implementation Notes

- the project uses a pre-trained convolutional neural network model - [MobileNet
  V2][mobilenet] with around 6M parameters, used for computer vision tasks such
  as classification or object detection.
- this project starts from [the Sonos Tract's example][sonos-example-mobilenet]
  for execution the model locally, and makes the necessary changes to compile it
  to WebAssembly.
- this project does not treat training neural network models.
- while the _approach_ used by this project can be used to execute inferences
  using different neural network models, the implementation is specialized for
  performing inferences using MobileNet model. Changing the model architecture,
  as well as its inputs and outputs, would require changes in both the
  WebAssembly module, as well as in how it is instantiated in Wasmtime.
- because a `Wasmtime::Instance` [cannot be safely sent between
  threads][instance-send], a new instance of the module is created for each
  request, which adds to the overall latency.

### Building and running from source

When executing `cargo build`, the following are executed:

- build and optimize a WebAssembly module based on [the
  `wasi-mobilenet-inferencing` crate][crate] (see [`build.rs`][build])
- build a server that listens for HTTP requests and get the model prediction for
  the image URL in the request body using Wasmtime.

```
$ cargo run --release
Listening on http://<IP_ADDRESS>:3000

module instantiation time: 774.715145ms
inference time: 723.531083ms
```

In another terminal instance (or from an HTTP request builder, such as Postman):

```
$ curl --request GET 'localhost:3000' \
--header 'Content-Type: text/plain' \
--data-raw 'https://upload.wikimedia.org/wikipedia/commons/3/33/GoldenRetrieverSnow.jpg'
golden retriever
```

Prerequisites (required in the path):

- `cargo`
- [`wasm-opt` from Binaryen][binaryen]

### Testing the module in Node's WASI runtime

The repository contains an already built and optimized module, which can be
found in `model/optimized-wasi.wasm`. It can be tested without any compilation
(and without any Node dependencies) using a recent NodeJS installation:

```
$ node -v
v14.5.0
$ node --experimental-wasi-unstable-preview1 --experimental-wasm-bigint test.js

predicting on file  golden-retriever.jpeg
inference time:  953 ms
prediction:  golden retriever

predicting on file  husky.jpeg
inference time:  625 ms
prediction:  Eskimo dog, husky
```

### References

- [the MobileNet V2 neural network model][mobilenet]
- [running the MobileNet V2 model in Rust, using Sonos
  Tract][sonos-example-mobilenet]
- [the WASI-NN proposal][wasi-nn]
- [Wasmtime module instantiation discussion][wasmtime-perf]

[binaryen]: https://github.com/WebAssembly/binaryen#tools
[mobilenet]:
  https://github.com/tensorflow/models/tree/master/research/slim/nets/mobilenet
[sonos-example-mobilenet]:
  https://github.com/sonos/tract/tree/main/examples/tensorflow-mobilenet-v2
[sonos-tract]: https://github.com/sonos/tract
[wasm-bindgen]: https://github.com/rustwasm/wasm-bindgen
[instance-send]: https://github.com/bytecodealliance/wasmtime/issues/793
[crate]: ./crates/wasi-mobilenet-inference/src/lib.rs
[build]: ./build.rs
[wasi-nn]:
  https://www.w3.org/2020/06/machine-learning-workshop/talks/introducing_wasi_nn.html
[wasmtime-perf]: https://github.com/bytecodealliance/wasmtime/issues/2295

repository: radu-matei/wasi-tensorflow-inference

repo_name: radu-matei/wasi-tensorflow-inference


text:
# Json Configuration File Description

Due to the large number of deep learning parameters, it is cumbersome to specify parameters directly by script. From Angel 2.0, it is supported to specify model parameters with Json files (System parameters are still configured by script). Currently, Json files have two purposes:
- Provide parameters for existing algorithms, including:
    + DeepFM
    + PNN
    + NFM
    + Deep and Wide
- Similar to Caffe, you can customize your new network with Json

The parameters that can be configured with Json files are as follows:

- Data-related parameters

- Model parameters

- Training related parameters

- Default optimizer, transfer function, loss function

- Layers in the Network

Here's an introduction.

## 1. Data-related Parameters

A complete data configuration is as follows:

```json
"data": {
    "format": "dummy",
    "indexrange": 148,
    "numfield": 13,
    "validateratio": 0.1,
    "sampleratio": 0.2,
    "useshuffle": true,
    "translabel": "NoTrans",
    "posnegratio": 0.01
}
```

Json key | configuration item | description
---|---|---
format | ml.data.type | Input data format,including dense, dummy and libsvm, the default one is dummy
indexrange | ml.feature.index.range | Feature dimension
numfield | ml.fm.field.num | Number of fields in the input data. Although feature intersections can generate very high dimensional data, for some data sets, the number of each sample field is constant.
validateratio | ml.data.validate.ratio | Angel will divide the input data into a training set and a validation set. This parameter is used to specify the scale of the validation set. Note: All validation sets are evenly stored in memory. OOM may occurs when the amount of data is particularly large.
sampleratio | ml.batch.sample.ratio | The sampling rate for spark to sample mini-batches.
useshuffle | ml.data.use.shuffle | Whether to shuffle data before training each epoch, the default set is false. Note: large dataset with shuffle training may cause poor performance.
translabel | ml.data.label.trans.class | For two classes classification task, Angel requires the label format as (-1, 1),set it to true if your label format is (0, 1). The default set is false.
posnegratio | ml.data.posneg.ratio | Angel supports sampling mini-batches, but in a different way from Spark. Angel firstly separates the positive and negative examples of the data set, and then separately generates mini-batch from positive and negative samples in proportion. Parameter posnegratio is the ratio of positive and negative samples in a mini-batch. This parameter is helpful for the training of unbalanced data sets. posnegratio defaults to -1, indicating no sampling.

Note: In addition to indexrange, all other parameters have default values, which means they are optional.

## 2. Model Parameters

A complete model configuration is as follows:
```json
"model": {
    "loadPath": "path_to_your_model_for_loading",
    "savePath": "path_to_your_model_for_saving",
    "modeltype": "T_DOUBLE_SPARSE_LONGKEY",
    "modelsize": 148
}
```

Json key | configuration item | description
---|---|---
loadpath | angel.load.model.path | Model loading path
savepath | angel.save.model.path | Model save path
modeltype | ml.model.type | Model type, refers to the type of input layer parameters on the PS (data and storage), and it also determines the data type of the non-input layer (the storage type of the non-input layer is dense)
modelsize | ml.model.size | The effective data dimension. For the entire dataset, there may be no data in some dimensions, and the feature dimension is inconsistent with the model dimension

Commonly used modeltypes are:
- T_DOUBLE_DENSE
- T_FLOAT_DENSE
- T_DOUBLE_SPARSE
- T_FLOAT_SPARSE
- T_DOUBLE_SPARSE_LONGKEY
- T_FLOAT_SPARSE_LONGKEY

## 3. Training Parameters
A complete training configuration is as follows:
```json
"train": {
    "epoch": 10,
    "numupdateperepoch": 10,
    "batchsize": 1024,
    "lr": 0.5,
    "decayclass": "StandardDecay",
    "decayalpha": 0.001,
    "decaybeta": 0.9
}
```

Json key | configuration item | description
---|---|---
epoch| ml.epoch.num | Num of epochs
numupdateperepoch | ml.num.update.per.epoch | Number of times the parameter data is updated in each iteration. Only useful for Angel
batchsize |ml.minibatch.size | Number of samples in each mini-batch
lr |ml.learn.rate | Learning rate
decayclass |ml.opt.decay.class.name| Learning rate decay method
decayalpha |ml.opt.decay.alpha| Learning rate decay parameter alpha
decayalpha |ml.opt.decay.beta| Learning rate decay parameterbeta

![model](http://latex.codecogs.com/png.latex?\dpi{150}lr_{epoch}=\max(\frac{lr}{\sqrt{1.0+decay*epoch}},\frac{lr}{5}))

## 4. Default optimizer, transfer function, loss function
- Angel allows different trainable layers to use different optimizers. For example, in the deep and wide model, the wide part uses FTRL and the deep part uses Adam.
- Similarly, different layers are allowed to use different transfer functions (activation functions). Usually, the intermediate layers use Relu or Sigmoid function, and the layer connected to the LossLayer uses Identity function.
- Angel can set the default loss function, which is designed for multitasking training. Multitask training is not supported yet, please ignore it.

### 4.1 Default optimizer
Since each optimizer has default parameters, there are two ways to set the default optimizer. Take Momentum as an example:
```json
"default_optimizer": "Momentum"

"default_optimizer": {
    "type": "Momentum",
    "momentum": 0.9,
    "reg1": 0.0,
    "reg2": 0.0
}
```

- Specify only the optimizer name and use the default optimizer parameters
- Use the key-value method to specify the type (name) and related parameters of the optimizer. It is worth noting that the parameters of the optimizer are not mandatory except for the name. If you want to use the default value, just ignore it.

For specific parameters of the optimizer, please refer to [Optimizer in Angel] (./optimizer_on_angel.md)

### 4.2 Default transfer function
Most transfer functions have no parameters, only a few transfer functions do, such as dropout. So there are two ways to specify the default transfer function:
```json
"default_transfunc": "Relu"

"default_transfunc": {
    "type": "Dropout",
    "actiontype": "train",
    "proba": 0.5
}
```

- Only specify the name of the transfer function, if the transfer function has parameters, use the default parameters
- Similar to the parameter specification of the optimizer, use the key-value method to specify the type (name) of the transfer function and related parameters. The parameters of the transfer function are not required, if you want to use the default value, just ignore it  directly.

Note: Since the dropout transfer function is not calculated the same way in training and testing (predictive), use actiontype to indicate the task type: train | inctrain | predict.

For more details on the transfer function, please refer to [Transfer Function in Angel] (./transfunc_on_angel.md)

## 5. Layers in the network

Each deep learning algorithm in Angel can be represented as an AngelGraph, and the nodes in AngelGraph are Layers. Layers can be divided into three categories:
- verge: edge node, only in the input or output layer, such as input layer and loss layer
- linear: layer with one input and one output
- join: layer with two or more inputs, one output

Note: Layers in Angel can have multiple inputs, but only one output is allowed. A layer's output can be used as input for multiple layers, which means the output can be "repeatedly consumed".

In the Json configuration file, all layer-related parameters are placed in a list, as follows:

```json
"layers" : [
    {parameters of layer},
    {parameters of layer},
    ...
    {parameters of layer}
]
```

Although different layers have different parameters, they have some commonalities:
- Each layer has a name (name) and a type (type):
    + name: is the unique identifier of the layer, so it cannot be repeated
    + type: is the type of the layer, which is actually the `class name of the Layer'.
- In addition to the input layer (DenseInputLayer, SparseInputLayer, Embedding), the other layers have the "inputlayer" parameter. For the join layer, it has multiple inputs, so its input is specified with "inputlayers":
    + inputlayer: For the linear or loss layer to be specified, the inputlayer value is the name of the input layer
    + inputlayers: For the join layer to be specified, represented by a list whose value is the name of the input layer
- All layers have output except the Loss layer, but explicitly pointing out the outputs is not needed. The dimensions of the output should be specified:
    + outputdim: the dimensions of the output
- For trainable layer, "optimizer" can be specified, otherwise the default optimizers are used
- For some layers, such as DenseInputLayer, SparseInputLayer, FCLayer, "transfunc" can be specified
- For the loss layer, "lossfunc" can be specified

Here is an example of DeepFM:

```json
"layers": [
    {
      "name": "wide",
      "type": "SimpleInputLayer",
      "outputdim": 1,
      "transfunc": "identity"
    },
    {
      "name": "embedding",
      "type": "Embedding",
      "numfactors": 8,
      "outputdim": 104,
      "optimizer": {
        "type": "momentum",
        "momentum": 0.9,
        "reg2": 0.01
      }
    },
    {
      "name": "fclayer",
      "type": "FCLayer",
      "outputdims": [
        100,
        100,
        1
      ],
      "transfuncs": [
        "relu",
        "relu",
        "identity"
      ],
      "inputlayer": "embedding"
    },
    {
      "name": "biinnersumcross",
      "type": "BiInnerSumCross",
      "inputlayer": "embedding",
      "outputdim": 1
    },
    {
      "name": "sumPooling",
      "type": "SumPooling",
      "outputdim": 1,
      "inputlayers": [
        "wide",
        "biinnersumcross",
        "fclayer"
      ]
    },
    {
      "name": "simplelosslayer",
      "type": "SimpleLossLayer",
      "lossfunc": "logloss",
      "inputlayer": "sumPooling"
    }
  ]
```

Note: Angel supports "folding" method when specifying sequential FC layers. For more examples, please refer to the specific algorithm and [layer in Angel] (./layers_on_angel.md)

repository: xs-li/sona

repo_name: xs-li/sona


text:
Releasing
========

 1. Change the version in top level `build.gradle` to a non-SNAPSHOT verson.
 2. Update the `CHANGELOG.md` for the impending release.
 3. Update the `README.md` with the new version.
 4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
 5. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
 6. Update the top level `build.gradle` to the next SNAPSHOT version.
 7. `git commit -am "Prepare next development version."`
 8. `git push && git push --tags`
 9. Create a PR with these 2 commits.
     * **IMPORTANT** Add this comment to your PR "This is a release PR, it must be merged as individual commits. Do not squash commits on merge"
     * Longer explanation: we release automatically through Travis CI. When Travis builds on master a script is run to send either a new shapshot or a new release version to Maven. If you squash the commits in the PR, Travis will only see what's left at the end, which is your commit to change back to `SNAPSHOT` release. Thus, Travis will not end up sending a release version to Maven. If you land as multiple commits, Travis will build both and send a release build to Maven for the commit where you bumped the version to a new release version.

**Note:** We are currently not pinning the sample app to the last version because the API is still fluid while `Store` is in alpha. We will resume pinning the sample app to a released version when we move to beta (see #159).

When we're ready to pin, restore the final step:

10. Update the sample module's `build.gradle` to point to the newly released version. (It may take ~2 hours for artifact to be available after release)


text:
---
layout: post
title:      "Why is testing so important."
date:        "2021-10-31"
permalink:  rspec_testing_your_code
---

There are many articles written about why testing is important and required to be able to build/deploy production-ready applications. For example, they might save your hours of debugging or easier to refactor saving your company millions, etc.

All These reasons are true however in my opinion there is one fundamental reason that is even more important. When you have to write a Unit Test it makes you rethink not just “I hope this code works with your fingers crossed “. It forces you to think about.
1. What will this method/function do?
2. What is the expected input and output?
3. What data type is the input?
4. Is my code really dry and clean?
5. Can this code be writeen better ?

Because even if you never ever run these tests you have just accomplished alot just by answering these questions

The system is loading will be back soon ………...

extension: markdown


text:
# Useful technologies, tips, tricks and caveats for cpgf script binding

* [Overview](#a2_1)
* [Use non-const reference as function in/out parameter](#a2_2)
* [Function returning reference to fundamental will be converted to value](#a2_3)
* [Use C++ operator overloading in script language](#a2_4)
* [Use C++ bit fields in script language](#a2_5)
* [Be careful that in script variable is assigned by reference, not by value](#a2_6)

## Overview

This documentation discusses several technologies and caveats which is not obvious to know when using cpgf script binding.

After reading this documentation, we can use a lot of C/C++ only features, such as reference, operator overloading, bit field, in any script languages supported by cpgf script binding engine.

## Use non-const reference as function in/out parameter

It's not rare in C++ we have below code
```c++
bool foo(MyClass & a)
{
    a = MyClass(blah, blah);
    return true;
}

char * bar(int & b)
{
    b = 5;
    return "OK";
}

// Call the functions.
MyClass a;
foo(a);

int b = 0;
bar(b);
```
The function parameter is used to return value.

In cpgf script binding, we can invoke those kind of functions from script, with or without tweaks.

For function foo, we can call it in quite nature way from script
```javascript
var a = new MyClass();
foo(a);
```

For function bar, there is no way to pass reference to fundamental types (here is int) around the script, we need to use byte array to simulate it.
```javascript
// Don't forget to import byte array
cpgf.import(null, "builtin.collections.bytearray");

var b = cpgf.createByteArray();

// set initial value, same as "int b = 0" in C++
b.writeInt32(0);

// getPointer() will return the address of b
bar(b.getPointer());

// rewind the position
b.setPosition(0);

// get the value returned from bar
var bValue = b.readInt32();

// bValue is 5
```

## Function returning reference to fundamental will be converted to value

If a function returns a reference to fundamental type such as int, the result is converted to the value itself than a reference. This because there is no way to manipulate reference to fundamental in script. So we can't change the returned value.

C++
```c++
static int value = 0;
int & getA()
{
    return value;
}

int & a = getA();

// here a == 0 and value == 0

a = 5;
// here a == 5 and value == 5
```

Script
```javascript
var a = getA();
// here a == 0 and value == 0

a = 5;
// here a == 5 and value Still == 0
```

If the return type is a reference to class, the address will be returned. So changing any class member will affect the original value.

C++
```c++
static MyClass value; // value.n == 0
MyClass & getM()
{
    return value;
}

MyClass & a = getM();
a.n = 5;
// here a.n == 5 and value.n == 5
```

Script
```javascript
var a = getM();
a.n = 5;
// here a.n == 5 and value.n == 5
```

## Use C++ operator overloading in script language

Though cpgf Lua binding supports operator overloading, it's not recommended to use operator overloading in script because not all script languages support it. Instead that, we can use the wrapper functions to access those operator, thus we can even use operator overloading in JavaScript.

The tool metagen can generate wrappers for operator overloading perfectly.

For more information, please read the document about "Use C++ operator wrapper functions from script". There is a full page document for this topic.

## Use C++ bit fields in script language

cpgf can't reflect meta data for bit fields. However, if we use metagen, metagen can generate wrapper code to reflect bit fields as properties. So in script, we can use bit fields as if they are common member data. Indeed we can forget the difference between bit field and member data.

If we don't use metagen, we can reflect bit fields as property manually. We only need to add setter and getter function to access the bit field.

## Be careful that in script variable is assigned by reference, not by value

If we have below C++ code
```c++
class A {
public:
    void setValue(int n);
};

const A & getA();
```

In C++, if we wrote
```c++
A a = getA();
a.setValue(0);
```
The code works.

But if we wrote in JavaScript
```javascript
var a = getA();
a.setValue(0);
```
The code will cause runtime error because we can't call a non-const function setValue on a const object. This is because getA returns a "const A &", so "a" is a reference to const! The C++ version works because when assigning to "a", the whole class A is copied, but in script, it's just a reference.

To make the code works in script, we need to create new A and copy return value of getA.
```javascript
var a = new A(getA());
a.setValue(0);
```
That works!

repository: cpgf/cpgf

repo_name: cpgf/cpgf


text:
# Following the checklist saves the reviewers' time and gets your PR reviewed faster.

# Self Review
Have you reviewed every line of your changes by yourself?

# Test
Have you added enough test cases to cover the new feature or bug fix?
Also, add comments to describe your test cases.

# Naming
Do function names keep consistent with its behavior?
Is it easy to infer the function's behavior by its name?

# Comment
Is there any code that confuses the reviewer?
Add comments on them! You'll be asked to do so anyway.
Make sure there is no syntax or spelling error in your comments.
Some online syntax checking tools like Grammarly may be helpful.

# Refactor
Is there any way to refactor the code to make it more readable?
If the refactoring touches a lot of existing code, send another PR to do it.

# Single Purpose
Make sure the PR does only one thing and nothing else.

# Diff Size
Make sure the diff size is no more than 500, split it into small PRs if it is too large.

repository: pingcap/tidb

repo_name: pingcap/tidb


text:
# Lopla language

# Syntax
Lines of code are sperated by new line.

# Keywords

## conditional execution
```
a=0
if(a==0){

}
```
## loop
```
a=10
while(a>0){
    a=a-1
}
```

## function declaration
There is a required convention on how to specify a function name. Each function name should have `namespace` part (which usually sould be the filename) `.` and  a `name`. In the same line as the declaraion we should provide arguments in `()` and starting bracket `{` for method body.

Function can return a value using `return` keyword for that.

`File.lpc`
```
a=2
b="test"
function File.FunctionName(a,b){
    return a
}
```
## function call
```
Namespce.Name()
```

# Types and variables

## Number
Used to store any real number
```
a=0
a=-1
a=122.12
```
## String

Any list of characters
```
b="a"
```
### Indexing operator and strings
It is possible to modify strings by indexing operator: `[]`. Empty `' '` characters will be added if you will add your value at some nonexisitient index.
```
b="a"
b[0]=1
b[2]=34

```
## LoplaList

list of any types.
```
a=["one", "two", "..."]
b=[1, 2, 3]
c=["one", 2 , "4"]
d=[]
e=["one", 2, c]
```

## Scopes
All variables defined on file level are availble only as global variables wihion one file.

`a.lpc`
```
a=123

function a.test1(){
    IO.Write(a)
    return a
}
```

`b.lpc`
```
function b.test1(){
    /* line below causes error */
    IO.Write(a)
}
```

# Comments
All characters (multiline) between `/*` and `*/` are treated as comments.

repository: Lopla/Language

gha_language: C#

repo_name: Lopla/Language


text:
# Algorithmic-Problems
http://www.appliedprogramming.net/algorithmic-problems/home.html

You can download a particular Algorithm solution by either:

1. Visiting [appliedprogramming.net](http://www.appliedprogramming.net/), understanding how that algorithm works and where it can be used, and then following the download link at the end.

2. Browsing [appliedprogramming.net](https://github.com/Applied-Programming)'s official Github organization and downloading the repo you want.

3. Using [DownGit](http://minhaskamal.github.io/DownGit) created by [MinhasKamal](https://github.com/MinhasKamal).

<hr>

repository: ikishorek/Algorithmic-Problems

repo_name: ikishorek/Algorithmic-Problems


text:
# Permission system

## Install and use the permission system
To install and use the permission system do the following:

- First create a file `permissions.py` in the main package. This will define the permissions in the system
- Add the following content to the `permissions.py`
```
permissions = {
	'default': [ # Default permissions everybody has
		('auth.view_user', 'own'),
		('auth.unmasquerade_user', None), # If you are masquarade, the user must be able to unmasquarade
		('auth.login_user', None),
		('auth.logout_user', None),
	],
}
```
This will allow everybody to login, logout, unmasquerade, and view their own user account.
- Add the following to settings.py
```
from .permissions import permissions
BINDER_PERMISSION = permissions
```

repository: nstylo/django-binder

repo_name: nstylo/django-binder


text:
# erhan_bms
 IoT Based BMS Design

Erhan_bms is designed as main board for modular battery management sytems. It has many feautes plus wlan connectivity that enables IoT applications as well. I have designed it during my erasmus time at Berlin Beuth University as master thesis. All details can be found in my thesis doc. Ps. Tehere is one hardware bug thus gate pins for mosfet switches has to be connected to other gpios. This rework can be seen from the pictures.

![alt text](https://github.com/ErhanYILMAZ/erhan_bms/blob/main/pics/erhan_bms_block.PNG)

![alt text](https://github.com/ErhanYILMAZ/erhan_bms/blob/main/pics/1.jpg)

![alt text](https://github.com/ErhanYILMAZ/erhan_bms/blob/main/pics/2.jpg)

![alt text](https://github.com/ErhanYILMAZ/erhan_bms/blob/main/pics/3.jpg)


text:
# Dopv

Dopv orchestrates deployments of nodes. A node can be a virtual machine or a bare-metal compute node.

## Installation

Add this line to your application's Gemfile:

    gem 'dopv'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install dopv

## Usage

### Library
Deploy a plan
```ruby
require 'dopv'
plan = ::Dopv::load_plan(plan_file)
data_volumes_db = ::Dopv::load_data_volumes_db(db_file)
::Dopv::run_plan(plan, data_volumes_db)
```
Undeploy a plan while keeping data volumes
```ruby
require 'dopv'
plan = ::Dopv::load_plan(plan_file)
data_volumes_db = ::Dopv::load_data_volumes_db(db_file)
::Dopv::run_plan(plan, data_volumes_db, :undeploy)
```
Undeploy a plan and remove data volumes from infrastructure provider (stack) as
well as from persistent data volumes DB:
```ruby
require 'dopv'
plan = ::Dopv::load_plan(plan_file)
data_volumes_db = ::Dopv::load_data_volumes_db(db_file)
::Dopv::run_plan(plan, data_volumes_db, :undeploy, true)
```

### CLI
A command line interface utility `dopv` is provided.

#### Getting help
A help can be obtained by calling `dopv --help`:
```
$ dopv --help
NAME
    dopv - DOPv command line tool

SYNOPSIS
    dopv [global options] command [command options] [arguments...]

VERSION
    0.14.0

GLOBAL OPTIONS
    --help                    - Show this message
    --log_dir=LOGDIR          - Directory for the log files (default: $home/.dop/log)
    --log_level, -l LOGLEVEL  - Log level for the logfiles (default: DEBUG)
    --plan_store_dir, -s DIR  - Specify the directory where the plans and their state will be stored (default: $home/.dop/cache)
    --[no-]trace, -t          - Show stacktrace on crash
    --verbosity, -v Verbosity - Verbosity of the command line tool (default: INFO)
    --version                 - Display the program version

COMMANDS
    add      - Add a new plan file to the plan store
    deploy   - Deploy a plan.
    export   - Export the internal data disks state into a local file
    help     - Shows a list of commands or help for one command
    import   - Import data disks from a file into internal state store of the given plan
    list     - List plans stored in the plan store
    refresh  - Refresh a plan.
    remove   - Remove existing plan from the plan store
    undeploy - Undeploy a plan.
    update   - Update the plan and/or the plan state for a given plan yaml or plan name.
    validate - Validate a plan file.
```

#### Validating a plan
The deployment plan `/tmp/foo_plan.yml` could be validated by issuing:
```
$ dopv validate -p /tmp/foo_plan.yml
Plan valid.
```

Please note that the plan is always validated before any action takes place.

#### Adding a plan
In order to add a plan to plan cache, use `dopv` `add` command:
```
$ dopv add /tmp/bar_plan.yml
```

Please note that this feature is considered experimental and should be used with extreme care.

#### Updating a plan
In order to update a plan in the cache after some local changes have been introduced, use `dopv`
`update` command:
```
$ dopv update /tmp/bar_plan.yml
```

One may use `-c` or `-i` in order to remove the existing disk information and start with a clean
state or to ignore the update and to merely set it to the latest version.

Please note that this feature is considered experimental and should be used with extreme care.

#### Listing plans in cache
One may use the `list` command to check which plans are stored in the plan cache.

#### Deploying a plan
To get a help on deploy CLI options launch `dopv help deploy` argument:
```
$ dopv help deploy
NAME
    deploy - Deploy a plan

SYNOPSIS
    dopv [global options] deploy [command options]

COMMAND OPTIONS
    --diskdb, -d path_to_db_file                                             - Use a local diskdb file and import/export it automatically (default: none)
    --exclude_nodes=node01.example.com,node02.example.com,/example\.com$/    - Exclude this nodes from the run (default: )
    --exclude_nodes_by_config='{"var1": ["val1", "/val2/"], "var2": "val2"}' - Exclude nodes with this config from the run (You have to specify a JSON hash here) (default: {})
    --exclude_roles=role01,role01,/^rolepattern/                             - Exclude this roles from the run (default: )
    --nodes=node01.example.com,node02.example.com,/example\.com$/            - Run plans for this nodes only (default: )
    --nodes_by_config='{"var1": ["val1", "/val2/"], "var2": "val2"}'         - Run plans for this nodes with this config only (You have to specify a JSON hash here) (default: {})
    --plan, -p path_to_plan_file                                             - plan name from the store or plan file to deploy. If a plan file is given DOPv will run in oneshot mode and add/remove
                                                                               the plan automatically to the plan store (required, default: none)
    --roles=role01,role01,/^rolepattern/                                     - Run plans for this roles only (default: )
```
To deploy a plan located at `/tmp/plan.yaml` and store and/or load persistent disks database located at `/tmp/pdisks.yaml` one can launch `dopv` with following options:
```
$ dopv deploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml
```

To deploy only nodes matching a regular expression `^foo-[1-9]+\.bar\.baz$` that are defined in a plan called `/tmp/plan.yaml` and store and/or load persistent disks database located at `/tmp/pdisks.yaml` one can launch `dopv` with following options:
```
$ dopv deploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml --nodes=/^foo-[1-9]+\.bar\.baz$/
```

Please note that disk database file is created if it does not exist.

#### Undeploying a plan
To get a help on undeploy CLI options launch `dopv` `help undeploy` argument:
```
$ dopv help undeploy
NAME
    undeploy - Undeploy a plan

SYNOPSIS
    dopv [global options] undeploy [command options]

COMMAND OPTIONS
    --diskdb, -d path_to_db_file - (default: none)
    --plan, -p path_to_plan_file - (required, default: none)
 ME
    undeploy - Undeploy a plan

SYNOPSIS
    dopv [global options] undeploy [command options]

COMMAND OPTIONS
    --diskdb, -d path_to_db_file                                             - Use a local diskdb file and import/export it automatically (default: none)
    --exclude_nodes=node01.example.com,node02.example.com,/example\.com$/    - Exclude this nodes from the run (default: )
    --exclude_nodes_by_config='{"var1": ["val1", "/val2/"], "var2": "val2"}' - Exclude nodes with this config from the run (You have to specify a JSON hash here) (default: {})
    --exclude_roles=role01,role01,/^rolepattern/                             - Exclude this roles from the run (default: )
    --nodes=node01.example.com,node02.example.com,/example\.com$/            - Run plans for this nodes only (default: )
    --nodes_by_config='{"var1": ["val1", "/val2/"], "var2": "val2"}'         - Run plans for this nodes with this config only (You have to specify a JSON hash here) (default: {})
    --plan, -p path_to_plan_file                                             - plan name from the store or plan file to undeploy. If a plan file is given DOPv will run in oneshot mode and
                                                                               add/remove the plan automatically to the plan store (required, default: none)
    --[no-]rmdisk, -r                                                        - Remove the disks
    --roles=role01,role01,/^rolepattern/                                     - Run plans for this roles only (default: )   --[no-]rmdisk, -r            -
```

In order to destroy a deployment specified by a plan located at `/tmp/plan.yaml` and persistent disks database located at `/tmp/pdisks.yaml` one can launch `dopv` with following options:
```
$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml
```
If you also want to remove the data volumes of each node and remove their records from persistent data volumes DB, please specify `-r` or `--rmdisk` option as shown bellow:
```
$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml -r
```
If you'd like to selectively remove a node called `foo.bar.baz` as well as nodes that match regular expression `^foo[1-5]\.bar\.baz$` and their data disks, you would use `--nodes` filter:
```
$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml -r --nodes=foo.bar.baz,/^foo[1-5]\.bar\.baz$/
```
If you'd like to remove all nodes but those matching `foo.bar.baz` as well as nodes that match regular expression `^foo[1-5]\.bar\.baz$` and their data disks, you would use `--exclude_nodes` filter:
```
$ dopv undeploy -p  /tmp/pdisks.yaml -d /tmp/pdisks.yaml -r --exclude_nodes=foo.bar.baz,/^foo[1-5]\.bar\.baz$/
```

#### Logging
By default `dopv` logs messages with `INFO` level and higher to standard output. In order to log to a file `-l` can be specified. The `-v` option is used to set a different log threshold. Following is an example of logging everything (`DEBUG` and above) into `/tmp/dopv.log` during plan deployment:
```
$ dopv -l /tmp/dopv.log -v debug deploy -p /tmp/plan.yaml -d /tmp/disks.yaml
```

## Node Filtering Notes
Please note that `dopv` filtering by configuration and roles is not yet supported.

## Plan
A plan format and description can be found [here](https://github.com/swisscom/dop_common/blob/master/doc/plan_format_v0.0.1.md). A plan example can be found [here](https://github.com/swisscom/dop_common/blob/master/doc/plan_format_v0.0.1.md)

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: swisscom/dopv

repo_name: swisscom/dopv


text:
# XSSTracer v1.3 by 1N3 @CrowdShield
https://crowdshield.com

### XSSTracer is a small python script that checks remote web servers for Clickjacking, Cross-Frame Scripting, Cross-Site Tracing and Host Header Injection.

```
Usage: ./xsstracer <host> <port>
```


text:
chaff.sh

Purpose: Add additional pseudo-randomness to /dev/random from 5 sources : date, iostat, temperature (please verify that in the script), ping and ps

Please install sensors package or set variable GET_ENTROPY_FROM_TEMPERATURE to false

The terms "random", "randomized" and "randomness" are here loosely used and do not mean "true randomness"

It would be better to have a reliable hardware RNG or install haveged and be less happy, or both, or to be a tin-foil hat moron and run chaff.sh alongside haveged

In a terminal window:

>user@computer:~$ **/your/path/here/chmod.sh +x /your/path/here/chaff.sh** to make the script executable

>user@computer:~$ **/your/path/here/chaff.sh** without arguments for a normal run

>user@computer:~$ **/your/path/here/chaff.sh --test** for building file _/dev/shm/.random.hex_ that can be tested against random number analysers (ent, rngtest, dieharder or any other tool)

>user@computer:~$ **/your/path/here/chaff.sh whatever** will produce a help message

run from cron as a local user: edit cron in a terminal window with "crontab -e" and add "@reboot /your/path/here/chaff.sh", save and exit and reboot

Adapt as needed (perhaps modifying the path where chaff.sh stores data, **/dev/shm/**, to **/tmp/** in the script and in the one-liner below)

EARLY ALPHA - YOU HAVE BEEN WARNED

PS: one-liner ugly hacks to check the "randomness" of chaff.sh for 5 runs. Test mostly fails with rngtest because of the small sample produced some of the times. Can be very slow with dieharder.

>user@computer:~$ **echo "chaff.sh output tested with ent (5 runs)" > /dev/shm/chaff_ent.txt; for (( i  = 1; i <= 5; i++ )) do printf "\n\n=====\n\n" >>/dev/shm/chaff_ent.txt; /your/path/here/chaff.sh --test; ent /dev/shm/.random.hex >> /dev/shm/chaff_ent.txt 2>&1;done**

>user@computer:~$ **echo "chaff.sh output tested with rngtest (5 runs)" > /dev/shm/chaff_rngtest.txt; for (( i  = 1; i <= 5; i++ )) do printf "\n\n=====\n\n" >>/dev/shm/chaff_rngtest.txt; /your/path/here/chaff.sh --test; rngtest < /dev/shm/.random.hex >> /dev/shm/chaff_rngtest.txt 2>&1;done**

>user@computer:~$ **echo "chaff.sh output tested with dieharder (5 runs)" > /dev/shm/chaff_dieharder.txt; for (( i  = 1; i <= 5; i++ )) do printf "\n\n=====\n\n" >>/dev/shm/chaff_dieharder.txt; /your/path/here/chaff.sh --test; dieharder -a < /dev/shm/.random.hex >> /dev/shm/chaff_dieharder.txt 2>&1;done**