text:
# Rex: an open-source quadruped robot

![](images/intro.gif)

The goal of this project is to train an open-source 3D printed quadruped robot exploring
`Reinforcement Learning` and `OpenAI Gym`. The aim is to let the robot learns domestic and generic tasks in the simulations and then
successfully transfer the knowledge (`Control Policies`) on the real robot without any other manual tuning.

This project is mostly inspired by the incredible works done by Boston Dynamics.

## Related repositories
[rexctl](https://github.com/nicrusso7/rexctl) - A CLI application to bootstrap and control Rex robot running the trained `Control Policies`.

[rex-models](https://github.com/nicrusso7/rex-models) - A web URDF visualizer. Collection of Rex robot models.

# Rex-gym: OpenAI Gym environments and tools
This repository contains a collection of `OpenAI Gym Environments` used to train Rex, the Rex URDF model,
the learning agent implementation (PPO) and some scripts to start the training session and visualise the learned `Control Polices`.
This CLI application allows batch training, policy reproduction and single training rendered sessions.

# Installation
Create a `Python 3.7` virtual environment, e.g. using `Anaconda`
```
conda create -n rex python=3.7 anaconda
conda activate rex
```

## PyPI package
Install the public `rex-gym` package:
```
pip install rex_gym
```

## Install from source
Clone this repository and run from the root of the project:
```
pip install .
```

# CLI usage
Run ``` rex-gym --help ``` to display the available commands and ``` rex-gym COMMAND_NAME --help ``` to show the help
message for a specific command.

Use the `--arg` flag to eventually set the simulation arguments. For a full list check out the [environments parameters](#environments-parameters).

To switch between the `Open Loop` and the `Bezier controller (inverse kinematics)` modes, just append either the `--open-loop` or `--inverse-kinematics` flags.
```
rex-gym COMMAND_NAME -ik
rex-gym COMMAND_NAME -ol
```
For more info about the modes check out [the learning approach](#learning-approach).

## Policy player: run a pre-trained agent
To start a pre-trained agent (play a learned `Control Policy`):
```
rex-gym policy --env ENV_NAME
```

## Train: Run a single training simulation
To start a single agent rendered session (`agents=1`, `render=True`):
```
rex-gym train --playground True --env ENV_NAME --log-dir LOG_DIR_PATH
```

## Train: Start a new batch training simulation
To start a new batch training session:
```
rex-gym train --env ENV_NAME --log-dir LOG_DIR_PATH
```

# Robot platform
## Mark 1
The robot used for this first version is the [Spotmicro](https://www.thingiverse.com/thing:3445283) made by [Deok-yeon Kim](https://www.thingiverse.com/KDY0523/about).

I've printed the components using a Creality Ender3 3D printer, with PLA and TPU+.

![](https://camo.githubusercontent.com/cf4858999d5f9ffd1b4e9dfcf0cb43cc6505c890/68747470733a2f2f692e696d6775722e636f6d2f446e43303548572e6a7067)

The hardware used is listed in this [wiki](https://github.com/nicrusso7/rexctl/wiki/Mark-I).

The idea is to extend the robot adding components like a robotic arm on the top of the rack and a LiDAR sensor in the next versions alongside
fixing some design issue to support a better (and easier) calibration and more reliable servo motors.

# Simulation model

## Base model
Rex is a 12 joints robot with 3 motors (`Shoulder`, `Leg` and `Foot`) for each leg.

The robot `base` model is imported in `pyBullet` using an [URDF file](rex_gym/util/pybullet_data/assets/urdf/rex.urdf).

The servo motors are modelled in the `model/motor.py` class.

![rex bullet](images/rex.png)

## Robotic arm
The `arm` model has the open source 6DOF robotic arm [Poppy Ergo Jr](https://github.com/poppy-project/poppy-ergo-jr) equipped on the top of the
rack.

![rex arm](images/rex_arm.png)

To switch between `base` and `arm` models use the `--mark` flag.

# Learning approach
This library uses the `Proximal Policy Optimization (PPO)` algorithm with a hybrid policy defined as:

```a(t, o) = a(t) + π(o)```

It can be varied continuously from fully user-specified to entirely learned from scratch.
If we want to use a user-specified policy, we can set both the lower and the upper bounds of `π(o)` to be zero.
If we want a policy that is learned from scratch, we can set `a(t) = 0` and give the feedback component `π(o)` a wide output range.

By varying the open loop signal and the output bound of the feedback component, we can decide how much user control is applied to the system.

A twofold approach is used to implement the Rex `Gym Environments`: `Bezier controller` and `Open Loop`.

The `Bezier controller` implements a fully user-specified policy. The controller uses the `Inverse Kinematics` model (see `model/kinematics.py`)
to generate the gait.

The `Open Loop` mode consists, in some cases, in let the system lean from scratch (setting the open loop component `a(t) = 0`) while others
just providing a simple trajectory reference (e.g. `a(t) = sin(t)`).

The purpose is to compare the learned policies and scores using those two different approach.

# Tasks
This is the list of tasks this experiment want to cover:

1. Basic controls:
    1. **Static poses - Frame a point standing on the spot.**
    - [x] Bezier controller
    - [ ] Open Loop signal
    2. **Gallop**
        - forward
        - [x] Bezier controller
        - [x] Open Loop signal
        - backward
        - [ ] Bezier controller
        - [ ] Open Loop signal
    3. **Walk**
        - forward
        - [x] Bezier controller
        - [x] Open Loop signal
        - backward
        - [x] Bezier controller
        - [ ] Open Loop signal
    4. **Turn - on the spot**
     - [x] Bezier controller
     - [x] Open Loop signal
    5. **Stand up - from the floor**
    - [ ] Bezier controller
    - [x] Open Loop signal
2. Navigate uneven terrains:
    - [x] Random heightfield, hill, mount
    - [ ] Maze
    - [ ] Stairs
3. **Open a door**
4. **Grab an object**
5. **Fall recovery**
6. **Reach a specific point in a map**
7. **Map an open space**

# Terrains
To set a specific terrain, use the `--terrain` flag. The default terrain is the standard `plane`. This feature is quite useful to
test the policy robustness.

## Random heightfield
Use the `--terrain random` flag to generate a random heighfield pattern. This pattern is updated at every 'Reset' step.

![hf](images/heightfield.gif)

## Hills
Use the `--terrain hills` flag to generate an uneven terrain.

![hills](images/hills.gif)

## Mounts
Use the `--terrain mounts` flag to generate this scenario.

![mounts](images/mounts.gif)

## Maze
Use the `--terrain maze` flag to generate this scenario.

![maze](images/maze.gif)

# Environments
## Basic Controls: Static poses
Goal: Move Rex base to assume static poses standing on the spot.

### Inverse kinematic
The gym environment is used to learn how to gracefully assume a pose avoiding too fast transactions.
It uses a one-dimensional `action space` with a feedback component `π(o)` with bounds `[-0.1, 0.1]`.
The feedback is applied to a sigmoid function to orchestrate the movement.
When the `--playground` flag is used, it's possible to use the pyBullet UI to manually set a specific pose altering the robot base position
(`x`,`y`,`z`) and orientation (`roll`, `pitch`, `jaw`).

![](images/ik.gif)

## Basic Controls: Gallop
Goal: Gallop straight on and stop at a desired position.

In order to make the learning more robust, the Rex target position is randomly chosen at every 'Reset' step.

### Bezier controller
This gym environment is used to learn how to gracefully start the gait and then stop it after reaching the target position (on the `x` axis).
It uses two-dimensional `action space` with a feedback component `π(o)` with bounds `[-0.3, 0.3]`. The feedback component is applied to two ramp functions
used to orchestrate the gait. A correct start contributes to void the drift effect generated by the gait in the resulted learned policy.

![](images/gallop_ik.gif)

### Open Loop signal
This gym environment is used to let the system learn the gait from scratch. The `action space` has 4 dimensions, two for the front legs and feet
and two for the rear legs and feet, with the feedback component output bounds `[−0.3, 0.3]`.

![](images/gallop_ol.gif)

## Basic Controls: Walk
Goal: Walk straight on and stop at a desired position.

In order to make the learning more robust, the Rex target position is randomly chosen at every 'Reset' step.

### Bezier controller
This gym environment is used to learn how to gracefully start the gait and then stop it after reaching the target position (on the `x` axis).
It uses two-dimensional `action space` with a feedback component `π(o)` with bounds `[-0.4, 0.4]`. The feedback component is applied to two ramp functions
used to orchestrate the gait. A correct start contributes to void the drift effect generated by the gait in the resulted learned policy.

#### Forward
![](images/walk_ik.gif)

#### Backwards
![](images/walk_back_ik.gif)

### Open Loop signal
This gym environment uses a sinusoidal trajectory reference to alternate the Rex legs during the gait.

```
leg(t) = 0.1 cos(2π/T*t)
foot(t) = 0.2 cos(2π/T*t)
```
The feedback component has very small bounds: `[-0.01, 0.01]`. A ramp function are used to start and stop the gait gracefully.

![](images/walk_ol.gif)

## Basic Controls: Turn on the spot
Goal: Reach a target orientation turning on the spot.

In order to make the learning more robust, the Rex start orientation and target are randomly chosen at every 'Reset' step.

### Bezier controller
This gym environment is used to optimise the `step_length` and `step_rotation` arguments used by the `GaitPlanner` to implement the 'steer' gait.
It uses a two-dimensional `action space` with a feedback component `π(o)` with bounds `[-0.05, 0.05]`.

![](images/turn_ik.gif)

### Open loop
This environment is used to learn a 'steer-on-the-spot' gait, allowing Rex to moving towards a specific orientation.
It uses a two-dimensional `action space` with a small feedback component `π(o)` with bounds `[-0.05, 0.05]` to optimise the `shoulder` and `foot` angles
during the gait.

![](images/turn_ol.gif)

## Basic Controls: Stand up
Goal: Stand up starting from the standby position
This environment introduces the `rest_postion`, ideally the position assumed when Rex is in standby.

### Open loop
The `action space` is equals to 1 with a feedback component `π(o)` with bounds `[-0.1, 0.1]` used to optimise the signal timing.
The signal function applies a 'brake' forcing Rex to assume an halfway position before completing the movement.

![](images/standup_ol.gif)

# Environments parameters
| Environment | `env` flag | `arg` flag |
| ----------- | ---------- | ---------- |
| Galloping | gallop | `target_position` |
| Walking | walk | `target_position` |
| Turn | turn | `init_orient`, `target_orient` |
| Stand up | standup | N.A |

| `arg` | Description |
| ----- | ----------- |
| init_orient | The starting orientation in rad. |
| target_orient | The target orientation in rad. |
| target_position | The target position (`x` axis). |

| Flags | Description |
| ----- | ----------- |
| log-dir | The path where the log directory will be created. (Required) |
| playground | A boolean to start a single training rendered session |
| agents-number | Set the number of parallel agents |

## PPO Agent configuration
You may want to edit the PPO agent's default configuration, especially the number of parallel agents launched during
the simulation.

Use the `--agents-number` flag, e.g. `--agents-number 10`.

This configuration will launch 10 agents (threads) in parallel to train your model.

The default value is setup in the `agents/scripts/configs.py` script:

```
def default():
    """Default configuration for PPO."""
    # General
    ...
    num_agents = 20
```

# Credits
## Papers
[Sim-to-Real: Learning Agile Locomotion For Quadruped Robots](https://arxiv.org/pdf/1804.10332.pdf) and all the related papers. Google Brain, Google X, Google DeepMind - Minitaur Ghost Robotics.

[Inverse Kinematic Analysis Of A Quadruped Robot](https://www.researchgate.net/publication/320307716_Inverse_Kinematic_Analysis_Of_A_Quadruped_Robot)

[Leg Trajectory Planning for Quadruped Robots with High-Speed Trot Gait](https://www.researchgate.net/publication/332374021_Leg_Trajectory_Planning_for_Quadruped_Robots_with_High-Speed_Trot_Gait)

## Robot platform v1
[Deok-yeon Kim](https://www.thingiverse.com/KDY0523/about) creator of SpotMini.

The awesome [Poppy Project](https://github.com/poppy-project).

SpotMicro CAD files: [SpotMicroAI](https://github.com/FlorianWilk/SpotMicroAI) community.

## Inspiring projects
The kinematics model was inspired by the great work done by [Miguel Ayuso](https://hackaday.io/project/171456-diy-hobby-servos-quadruped-robot).


text:
# dotfiles

## bootstrap

`curl -sSf https://raw.githubusercontent.com/Kimundi/dotfiles/master/.scripts/system_setup/install_dotfiles_commands.sh | /bin/bash`

## based on

- https://github.com/Xyene/wsl-dotfiles
- https://de.atlassian.com/git/tutorials/dotfiles

license: MIT

repository: Kimundi/dotfiles

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Kimundi/dotfiles


text:
# v1.0.0
* Initial release (bare bones).

# v1.0.1
* Encodes all user-input.
* Replaces textarea with QuillJS rich text editor.
* Other smaller changes.

# v1.0.2
* Catch more errors.
* Fail requests larger than 100kb (100,000 bytes). Likewise, uploading images has been disabled both browser and server side.
* Other smaller changes.

# v1.1.0
* Add status to all calls.
* Replaced JQuery and Bootstrap JS with vanilla JS.
* Refactored code allowing for production usage.
* Fixed errors with encoding pad names that would cause them to not get saved correctly.
* Save pads as strings rather than an array of objects.
* Fixed an error on the error URL (ironic).

# v1.1.5
* Replaced local resources with CDNs; if other services use Quill or Bootstrap from the respective CND, it will be already cached when loaded.
* Replaced references to my own server with the server currently running Bit-Pad.
* Added in meta tags so it can be embedded into Discord/Twitter, etc. - WIP
* Better error "handling" to notify the user when an error occurs, instead of doing nothing.

# v1.1.6
* Remove "patch" that disallowed $ or . to be included in the paste name.
* Upped the limit of data allowed in body-parser from 100kb max to 5mb.
* Cleaner database connection.
* Removed Quill from dependencies and references to it on the backend.
* Text-editor now has more options (blockquote, strikethrough, bullet/numbered lists).

# v1.2.0
* Complete rewrite.
* Added accounts: login, register, and own pads that only you can access.
* Separated functions into different files.
* Disable browser caching of pads.
* A lot more I am forgetting.

# v1.2.1
* Add users to pads (/profile).
* Password is hashed before being inserted into the database.

# v1.2.2
* Fixed an issue where adding users to pads did not work.
* Small changes to HTML to be "up to standard". Future releases will contain more about this.
* Added in a hotkey. Press CTRL+S to save pads automatically, does not work on old browsers.
* Nuke browser caching once and for all: this fixes users having access to pads after they logged out and users not being able to access pads.
* Greatly improved speeds, most likely related to browser caching.
* Clear ``connect.sid`` cookie on logout.

# v1.2.3
* Fixed crash when saving a pad that was not modified.
* Removed all JavaScript and CSS from /profile. When adding a user to a pad the page will be refreshed.
* Add static resources.
* Add XMLHttpRequest support if the browser does not support fetch or Promises.

repository: KhafraDev/bit-pad

gha_language: JavaScript

gha_license_id: MIT

repo_name: KhafraDev/bit-pad


text:
---
layout: default
category: producers
title: "Telerik TeamPulse"
link: "http://www.telerik.com/team-productivity-tools.aspx"
---
The Telerik TeamPulse Silverlight client interacts with the database using a WCF data service, and more specifically by using the Open Data Protocol which is a popular way to expose information from a variety of sources including, but not limited to, relational databases, file systems, content management systems and traditional Web sites.

gha_language: HTML


text:
---
widget: slider
headless: true  # This file represents a page section.

# ... Put Your Section Options Here (section position etc.) ...
weight: 10  # Order that this section will appear.
title: "Gruen Laboratory"
subtitle: "Unravelling the genetics of reading"

# Slide interval.
# Use `false` to disable animation or enter a time in ms, e.g. `5000` (5s).
interval: 5000

# Minimum slide height.
# Specify a height to ensure a consistent height for each slide.
height: calc(100vh - 70px)

item:
  - title: Bike photo
    overlay_color: '#666'  # An HTML color value.
    overlay_img: "heros/pages.jpg"  # Image path relative to your `static/media/` folder
    overlay_filter: 0.5  # Darken the image. Value in range 0-1.
  - title: Pages photo
    overlay_color: '#666'  # An HTML color value.
    overlay_img: "heros/bike_group.color.jpeg"  # Image path relative to your `static/media/` folder
    overlay_filter: 0.5  # Darken the image. Value in range 0-1.
  - title: Cells photo
    overlay_color: '#666'  # An HTML color value.
    overlay_img: "heros/purple_cells.jpg"  # Image path relative to your `static/media/` folder
    overlay_filter: 0.5  # Darken the image. Value in range 0-1.

advanced:
  css_class: "home-jumbotron"
---
{{< button text="Learn more" url="#about-us">}}

repository: dburkhardt/gruenlab

branch_name: refs/heads/main

repo_name: dburkhardt/gruenlab


text:
Clone or fork this project.
1. Install Packages: `yarn`
1. Start the site in `develop` mode: `gatsby develop`
1. Enjoy ~

## 🧐 What's inside?

Packages:

- [react](https://github.com/facebook/react)
- [react-helmet](https://github.com/nfl/react-helmet): A document head manager for React.
- [react-intl](https://github.com/yahoo/react-intl): Internationalize React apps.
- [prop-types](https://github.com/facebook/prop-types): Runtime type checking for React props and similar objects.
- [styled-components](https://github.com/styled-components/styled-components): Use the best bits of ES6 and CSS to style your apps without stress.

Plugins:

- [gatsby-plugin-react-helmet](https://www.gatsbyjs.org/packages/gatsby-plugin-react-helmet/): Provides drop-in support for server rendering data added with React Helmet.
- [gatsby-source-filesystem](https://www.gatsbyjs.org/packages/gatsby-source-filesystem/): A Gatsby source plugin for sourcing data into your Gatsby application from your local filesystem.
- [gatsby-plugin-sharp](https://www.gatsbyjs.org/packages/gatsby-plugin-sharp/): Wrapper of the Sharp image manipulation library for Gatsby plugins.
- [gatsby-image](https://www.gatsbyjs.org/packages/gatsby-image/): Speedy, optimized images without the work.
- [gatsby-transformer-sharp](https://www.gatsbyjs.org/packages/gatsby-transformer-sharp/): Gatsby transformer plugin for images using Sharp.
- [gatsby-plugin-manifest](https://www.gatsbyjs.org/packages/gatsby-plugin-manifest/): Gatsby plugin which adds a manifest.webmanifest to make sites progressive web apps.
- [gatsby-plugin-offline](https://www.gatsbyjs.org/packages/gatsby-plugin-offline/): Gatsby plugin which sets up a site to be able to run offline.
- [gatsby-plugin-page-creator](https://www.gatsbyjs.org/packages/gatsby-plugin-page-creator/): Gatsby plugin that automatically creates pages from React components in specified directories.
- [gatsby-transformer-remark](https://www.gatsbyjs.org/packages/gatsby-transformer-remark/): Gatsby transformer plugin for Markdown using the Remark library and ecosystem.
- [gatsby-plugin-google-analytics](https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/): Easily add Google Analytics to your Gatsby site.
- [gatsby-plugin-styled-components](https://www.gatsbyjs.org/packages/gatsby-plugin-styled-components/): A Gatsby plugin for styled-components with built-in server-side rendering support.
- [gatsby-plugin-i18n](https://github.com/angeloocana/gatsby-plugin-i18n): Multi language routes for Gatsby.

A quick look at the top-level files and directories you'll see in a Gatsby project.

    .
    ├── node_modules
    ├── src
    ├── .gitignore
    ├── .prettierrc
    ├── gatsby-browser.js
    ├── gatsby-config.js
    ├── gatsby-node.js
    ├── gatsby-ssr.js
    ├── LICENSE
    ├── yarn-lock.json / package-lock.json
    ├── package.json
    └── README.md

1.  **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.

2.  **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for “source code”.

3.  **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.

4.  **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent.

5.  **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.

6.  **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.org/docs/gatsby-config/) for more detail).

7.  **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.

8.  **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.

9.  **`LICENSE`**: Gatsby is licensed under the MIT license.

10. **`yarn-lock.json / package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won’t change this file directly).**

11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project.

12. **`README.md`**: A text file containing useful reference information about your project.

## 🎓 Learning Gatsby

Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.org/). Here are some places to start:

- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.

- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar.

repository: jnoodle/gatsby-starter-website

repo_name: jnoodle/gatsby-starter-website


text:
---
author: "Robert Pearce"
authorTwitter: "@RobertWPearce"
desc: "A quick-dive in to RiotJS, with examples."
keywords: "riotjs, riot.js, riotjs tutorial, tutorial, javascript"
title: "RiotJS Example"
updated: "2023-02-04T18:00:00Z"
---

When I look at any of the myriad JavaScript UI libraries out there, I now ask
two questions:

* Does data flow in one direction?
* Do updates to the UI happen intelligently?

I am a fan of Facebook's [ReactJS](https://facebook.github.io/react/) library
because of its DOM diffing (via the "virtual DOM") and one-way data binding.
React is a tool I use every day and have come to enjoy (sans-JSX), but I am
always on the lookout for way to do things simpler.

A colleague of mine recently shared the second iteration of
[RiotJS](https://muut.com/riotjs/) with me. Of course, I was sucked in because
it compared itself with React (a bold statement). You can [view the comparisons
between Riot and React](https://muut.com/riotjs/compare.html) for yourself.

One unfortunate fact about fledgling JS libraries is that they lack examples of
how to accomplish common goals for the web. This is an attempt to help out with
that.

## Installation

### Project-Specific

Given you have a `package.json` set up, you can easily install the Riot compiler
as a development dependency:

```text
npm install riot --save-dev
```

and then set up Riot to run as an NPM script and watch for any changes

```javascript
"scripts": {
  "watch:riot": "riot -w src/ build/"
}
```

which is then run by a simple

```text
npm run watch:riot
```

Alternatively, you can [download the riot.js
library](https://muut.com/riotjs/download.html) via any of their recommended
methods.

### Global Installation (alternative)

If you don't have a `package.json` and want to install Riot globally:

```text
npm install riot -g
riot -w src/ build/
```

## Tab Example

I decided to start small and make a tabbing example where clicking a tab shows
content related to it underneath. Here is the final product:

<iframe
  class="iframe--example"
  frameborder="0"
  height="550"
  loading="async"
  src="https://rpearce.github.io/riotjs-examples/tabs.html"
></iframe>

### Step 1: Start With Markup

Starting with a blank HTML document, add the `<riot-tabs></riot-tabs>` tag to
your document:

```html
<!DOCTYPE html>
<html>
  <head></head>
  <body>
    <riot-tabs></riot-tabs>
  </body>
</html>
```

As mentioned previously, we know we need the (very tiny) RiotJS library, so
don't forget to include it:

```html
<body>
  <riot-tabs></riot-tabs>

  <script src="path/to/riot-2.0.1.js"></script>
</body>
```

Easy enough, right? Given Riot doesn't write our applications for us, we will
need to tell Riot to mount some component, which in this case is "tabs."

```html
<body>
  <riot-tabs></riot-tabs>

  <script src="path/to/riot-2.0.1.js"></script>
  <script>riot.mount('riot-tabs')</script>
</body>
```

When we run this code through the browser, we're going to receive an error
telling us that `'tabs'` is not a thing. Congrats! Time for Step 2.

### Step 2: Creating Your Custom Tag

Riot's NPM package, as mentioned earlier, allows us to write and compile
pseudo-markup mixed with a little JS. To get started, create a `src` folder and
add a `tabs.tag` file to it, then run

```text
npm run watch:riot
```

if you have an NPM script set up or

```text
riot -w src/ build/
```

to compile and watch for more changes to the file/folder.

Back in the `tabs.tag` file, add this:

```html
<riot-tabs>
  <h2>Tabs</h2>
  <ul>
    <li class={ tabItem: true }>Tab 1</li>
    <li class={ tabItem: true }>Tab 2</li>
    <li class={ tabItem: true }>Tab 3</li>
  </ul>
</riot-tabs>
```

That looks almost exactly like vanilla HTML, save for the conditional class(es),
which we will use later with `is-active` classes. Also, they are way better than
concatenating `className` strings yourself.

Refreshing your browser will show you that you now have content that is nested
within a `<riot-tabs></riot-tabs>` tag.

Next up, we can add in the different tabs' contents:

```html
<riot-tabs>
  <h2>Tabs</h2>
  <ul>
    <li class={ tabItem: true }>Tab 1</li>
    <li class={ tabItem: true }>Tab 2</li>
    <li class={ tabItem: true }>Tab 3</li>
  </ul>
  <div class="tabContent">
    <div class={ tabContent__item: true }>(1) Lorem ispum dolor...</div>
    <div class={ tabContent__item: true }>(2) Lorem ispum dolor...</div>
    <div class={ tabContent__item: true }>(3) Lorem ispum dolor...</div>
  </div>
</riot-tabs>
```

Okay, this is no big deal, so far.

Being software developers, we hate writing things over and over, so let's start
with the tabs.

```html
<riot-tabs>
  <h2>Tabs</h2>
  <ul>
    <li each={ tab, i in tabs } class={ tabItem: true }>{tab.title}</li>
  </ul>
  <div class="tabContent">
    <div class={ tabContent__item: true }>(1) Lorem ispum dolor...</div>
    <div class={ tabContent__item: true }>(2) Lorem ispum dolor...</div>
    <div class={ tabContent__item: true }>(3) Lorem ispum dolor...</div>
  </div>

  this.tabs = [
    { title: 'Tab 1' },
    { title: 'Tab 2' },
    { title: 'Tab 3' }
  ]
</riot-tabs>
```

Riot has a nice each={ item, i in array } attribute, similar to JavaScript's
for ... in ...

While we're at it, why not iterate over the content items, as well?

```html
<riot-tabs>
  <h2>Tabs</h2>
  <ul>
    <li each={ tab, i in tabs } class="tabItem">{tab.title}</li>
  </ul>
  <div class="tabContent">
    <div each={ tab, i in tabs } class="tabContent__item">{tab.content}</div>
  </div>

  this.tabs = [
    { title: 'Tab 1', content: "(1) Lorem ipsum dolor" },
    { title: 'Tab 2', content: "(2) Lorem ipsum dolor" },
    { title: 'Tab 3', content: "(3) Lorem ipsum dolor" }
  ]
</riot-tabs>
```

Next, we need to set a default "active tab" and "active content."

### Step 3: Conditional Classes

We want to be able to specify a default tab and tab content. This is
accomplished via a conditional `is-active` class on both the `.tabItem` as well
as the corresponding `.tabContent__item`. To keep track of what tab/content is
active, we can

* add a property to the `this.tabs` array objects
* set an `activeTab` property and
* create a function to check if the currently iterated tab is the `activeTab`

```html
<riot-tabs>
  <h2>Tabs</h2>
  <ul>
    <li each={ tab, i in tabs } class="tabItem { is-active: parent.isActiveTab(tab.ref) }">{tab.title}</li>
  </ul>
  <div class="tabContent">
    <div each={ tab, i in tabs } class="tabContent__item { is-active: parent.isActiveTab(tab.ref) }">{tab.content}</div>
  </div>

  this.tabs = [
    { title: 'Tab 1', ref: 'tab1', content: "(1) Lorem ipsum dolor" },
    { title: 'Tab 2', ref: 'tab2', content: "(2) Lorem ipsum dolor" },
    { title: 'Tab 3', ref: 'tab3', content: "(3) Lorem ipsum dolor" }
  ]

  this.activeTab = 'tab1'

  isActiveTab(tab) {
    return this.activeTab === tab
  }
</riot-tabs>
```

Since these are _conditional_ classes, they will either be evaluated as true or
false (I believe that anything that is not falsy is considered true; for
example, `new Date()` is considered `true`). Here, we create a function called
`isActiveTab` and call it from the item itself, but because the function is not
scoped to the item, we need to access the `parent` scope and call the function
on that.

Finally, we need a way to react to _events_.

### Step 4: Toggling the Tabs

When we click on a tab, we want that tab to now be active, and we want the
corresponding tab content to be displayed. This can be done via an `onclick`
handler that calls a function on the parent called `toggleTab`

```html
<riot-tabs>
  <h2>Tabs</h2>
  <ul>
    <li each={ tab, i in tabs } class="tabItem { is-active: parent.isActiveTab(tab.ref) }" onclick={ parent.toggleTab }>{tab.title}</li>
  </ul>
  <div class="tabContent">
    <div each={ tab, i in tabs } class="tabContent__item { is-active: parent.isActiveTab(tab.ref) }">{tab.content}</div>
  </div>

  this.tabs = [
    { title: 'Tab 1', ref: 'tab1', content: "(1) Lorem ipsum dolor" },
    { title: 'Tab 2', ref: 'tab2', content: "(1) Lorem ipsum dolor" },
    { title: 'Tab 3', ref: 'tab3', content: "(1) Lorem ipsum dolor" }
  ]

  this.activeTab = 'tab1'

  isActiveTab(tab) {
    return this.activeTab === tab
  }

  toggleTab(e) {
    this.activeTab = e.item.tab.ref
    return true
  }
</riot-tabs>
```

The `onclick` event handler receives an event object that is packed with
information. What we want is the current tab that we are clicking on, and this
is accessed through `e.item.tab.ref`, which is just the `ref` property on the
`tab` object of the currently iterated `item`.

According to the Riot docs, when an event handler is called, Riot will
automatically call `this.update()` and re-render the component. However, I found
that after I altered my data, I had to `return true`.

Once this event handler is completed and the component is re-rendered, the
correct tab and content will be displayed, and you will be happy.

## Wrap up

In sum, playing with Riot was a mostly enjoyable experience, and I am thankful
to the [Muut](https://muut.com/) folks for releasing it.

While there are quirks (single quote vs double quote issues, among others) and
opinions (neglecting the use of semi-colons, as well as `return`s), this is a
promising UI library that I am _definitely_ going to consider vs. React in my
future projects.

gha_language: Haskell


text:
# How we ignore `eslint` rules

## Decision
When ignoring `eslint` rules inside files, specify the rules being ignored. Where appropriate,
add a comment to explain why it's being ignored.

Disabling rules for entire files is discouraged. If it's necessary to do so, include a comment to explain the rationale.

### Examples
* `// eslint-disable-line max-len`
* `// eslint-disable-next-line no-alert`
* `/* eslint-disable no-console */` followed by `/* eslint-enable no-console */`

## Thinking

It's preferable to know exactly which rules are being ignored.

repository: domantasjurkus/backpack

repo_name: domantasjurkus/backpack


text:
# Contributing

This document outlines the ways to contribute to `pandas_market_calendars`. This is a fairly small, low-traffic project, so most of the contribution norms (coding style, acceptance criteria) have been developed ad hoc and this document will not be exhaustive. If you are interested in contributing code or documentation, please take a moment to at least review the license section to understand how your code will be licensed.

## Types of contribution

### Bug reports
Bug reports are an important type of contribution - it's important to get feedback about how the library is failing, and there's no better way to do that than to hear about real-life failure cases. A good bug report will include:

1. A minimal, reproducible example - a small, self-contained script that can reproduce the behavior is the best way to get your bug fixed. For more information and tips on how to structure these, read [Stack Overflow's guide to creating a minimal, complete, verified example](https://stackoverflow.com/help/mcve).

2. The platform and versions of everything involved, at a minimum please include operating system, `python` version and `pandas_market_calendars` version. Instructions on getting your versions:
    - `pandas_market_calendars`: `python -c "import pandas_market_calendars; print(pandas_market_calendars.__version__)"`
    - `Python`: `python --version`

3. A description of the problem - what *is* happening and what *should* happen.

While pull requests fixing bugs are accepted, they are *not* required - the bug report in itself is a great contribution.

### Feature requests

If you would like to see a new feature in `pandas_market_calendars`, it is probably best to start an issue for discussion rather than taking the time to implement a feature which may or may not be appropriate for `pandas_market_calendars`'s API. For minor features (ones where you don't have to put a lot of effort into the PR), a pull request is fine but still not necessary.

### Pull requests

If you would like to fix something in `pandas_market_calendars` -  improvements to documentation, bug fixes, feature implementations, etc - pull requests are welcome!

All pull requests should be opened against the `dev` branch and should include a clear and concise summary of the changes you made.

The most important thing to include in your pull request are *tests* - please write one or more tests to cover the behavior you intend your patch to improve.

gha_language: Python


text:
# How to make the masks

## Prep the data

- Put the PNGs of the sources you want to measure in a directory.
- Put the corresponding fits files in a sub-directory named *fits*.
- Create a sub-directory named *masks*.

The naming scheme should be *object_id*.png, fits/*object_id*_g.fits, fits/*object_id*_r.fits, etc.

## Run the macro in ImageJ

- Install and run ImageJ.
- From the menu, select plugins, edit, and choose savemask.ijm
- Edit the path in the file to point to your images
- Optionally, edit the zoom level
- Install the macro - Macros/install macro from the menu, or *ctrl-i*.

The macro installs some key commands:

- "a" - loads the file list, initializes the process
- "w" - prints the first file (a sanity check)
- "z" - load the next image
- "q" - save the mask

When the image is loaded, use any of the ImageJ tools (rectangle, oval, polygon) to draw the mask. When done, hit 'q'.

# How to do the photometry

- Repeat the process to make separate masks for the lens and source if required (rename the masks directory in between)
- Run *mags.py*, as follows: `python mags.py directory_name`

Where *directory_name* is the directory containing the pngs. The output will appear in a file called `mags.csv` in that directory.

If the sub-directories masks_lens and mask_source are present, then it will include both; otherwise, just the mags for the single masks directory will be present.

repository: coljac/quickmags

repo_name: coljac/quickmags


text:
<!-- README.md is generated from README.Rmd. Please edit that file -->

# hare

<!-- badges: start -->
<!-- badges: end -->

This package stores my custom themes and functions for personal use.
Currently the only function in this package is `theme_james`, a slightly
more minimal version of `theme_minimal`.

## Installation

You can install `hare` like so:

``` r
devtools::install_github("jamesphare/hare")
```

## Usage

Load the library:

``` r
library(hare)
```

`theme_james()` may be added to a GGPlot object or set generally using
`theme_set()`.

## Example

``` r
theme_set(theme_james())

ggplot(mpg, aes(displ, hwy, colour = class)) +
  geom_point() +
  labs(title = "Title",
       subtitle = "Subtitle",
       caption = "Source: GGPlot2")
```

<img src="man/figures/README-unnamed-chunk-2-1.png" width="100%" />


text:
# Personal website

## Description

This website is intended to facilitate the reading of the documentation of some
projects on [@ralflorent](https://github.com/ralflorent)'s GitHub account.

## Author

Developed by [Ralph Florent](https://github.com/ralflorent).

## License

The underlying content of this website is licensed under [MIT](LICENSE).


text:
# DevBar

![](screenshot.png)

DevBar is a workflow tool for developers. It watches a URL and displays a menu bar so you can easily see actions you can take, like pull requests that needs a review, PRs that have failing tests, etc.

# Installation

Install it from the AppStore: https://apps.apple.com/se/app/devbar/id1462747827?l=en&mt=12

# Usage

Start DevBar. It will ask you for a URL to watch, and it will add a username query parameter (so if you give it https://example.com/foo it will access https://example.com/foo?username=username). The endpoint should reply with a JSON document that looks something like this:

```json
{
    "data": {
        "needs_work": [
            {
                "title": "Trying to fix the gadget widget",
                "url": "https://github.com/example/prs/1",
            }
        ],
        "other_problems": [],
        "waiting_for_review": [
            {
                "title": "Stop the crashing",
                "url": "https://github.com/example/prs/2",
            },
            {
                "title": "Cool new feature",
                "url": "https://github.com/example/prs/3",
            }
        ],
        "devtest": [],
        "ready_to_merge": [],
        "workflow_problem": [],
        "wip": []
    },
    "metadata": {
        "display": {
            "prod_crash": {
                "priority": 0,
                "symbol": "💥",
                "title": "💥 Prod crash"
            },
            "other_problems": {
                "priority": 10,
                "symbol": "😟",
                "title": "😟 Other problems"
            },
            "waiting_for_review": {
                "priority": 10,
                "symbol": "🕐",
                "title": "🕐 Waiting for review"
            },
            "devtest": {
                "priority": 10,
                "symbol": "🧪",
                "title": "🧪 Can be tested by developers"
            },
            "ready_to_merge": {
                "priority": 10,
                "symbol": "🎉",
                "title": "🎉 Ready to merge"
            },
            "workflow_problem": {
                "priority": 10,
                "symbol": "🤨",
                "title": "🤨 Workflow problem: should be 4EYE or ready for test"
            },
            "wip": {
                "priority": 11,
                "symbol": "🚧",
                "title": "🚧 Work in progress"
            }
        }
    }
}
```

`metadata.display` is a dict of the different workflow types you've got. The symbol is used in the menu bar as a compact representation and the title is the full title displayed in the drop down menu.

You can give it a spin by pointing it to the example.json file: `https://raw.githubusercontent.com/boxed/DevBar/master/example.json?`

Your server can also respond with 503 to signal it's not ready yet. This is handy for when you have a cache that needs to be warmed up after the server side is restarted. Just return 503 until you're done and DevBar won't show the server as down but will just keep showing the data it had last time.

repository: boxed/DevBar

repo_name: boxed/DevBar


text:
# Traffic Lights control draft

##### [Goal]() : Optimize the traffic signals such that the average time taken at the signal must tend to minimum.

#

```The inefficiency is determined by ```
  - Obsolete time
    - The time given to a particular road even after the road has been cleared
  - Round robin time
    - The time spent on waiting for the road's turn to recur.

> The light may shift when there are no vehicles are on a side and</br>
> The time given to a side must be decided dynamically.

#### Manipulation of the signals can only be done as long as it's ensured that all the roads get their turn and the average weighting period decreases.

Equations
---
~~~
Variance of the traffic across the mean -> minimum
The time given to a road shall be t + x[i] where t < T/4
//t is the minimum time given for a road, x is the array of varaible durationations and T is the total time for a round.
~~~

#### Scope for improvment
- The total time for a round doesn't have to be dynamic
  - When the data is analysed for longer durations(months) the total time for a round can also be manipulated.
  - The lights on one side of a road can go to sleep when there is inactivity.
- Emergency situations can be taken into account by detecting unusual amounts for traffic.
- Piped data from routing to predict upcomming traffic.
- A cost function that learns from it's mistakes and adjusts x[i].

#### Current implmentation plan
 - Will be using dummy data to simulate.
 - Will be used proposed equation for normalizing Traffic by manipulating traffic lights.


text:
[![Build status](https://ci.appveyor.com/api/projects/status/76956gfy2n7sl5me?svg=true)](https://ci.appveyor.com/project/codewarrior0/mcedit2)
[![Build Status](https://travis-ci.org/mcedit/mcedit2.svg?branch=master)](https://travis-ci.org/mcedit/mcedit2)

# MCEdit 2.0 ID Fix

MCEdit 2.0 ID Fix is my altered version of MCEdit, the World Editor for Minecraft. I have tried to e.g extend the IDs of blocks which are usable from max 4096 all the way to 16384 which will make it work much better with modded blocks. About MCEdit: it allows you to edit every aspect of
a Minecraft world, and to import and export .schematic files created by many programs including WorldEdit and the
original MCEdit 1.x. It is free to use and licensed under the BSD license.

MCEdit 2.0's development is in the alpha stage. Many features may be buggy or missing. To download MCEdit 2.0 anyway, head over to
http://www.mcedit.net/


text:
# Collection of utilities

This is my collection of scripts that I use or ever used in Linux, mainly in vulnerability assessment and penetration testing.

## Contents

There are call hierarchy viewer, string manipulation util, CSV manipulation util, tiny web server, process pool, such a "shortcut" but not a shortcut, decryptor, brute force generator, etc.

### Smali CTrace

Smali CTrace (pronounced _smali seh trace_) is like call tracer or call hierarchy viewer in common IDE, but it reads [smali](https://github.com/JesusFreke/smali) instead of Java source code. Not only methods, it also lists classes and fields.

![Smali CTrace](https://raw.githubusercontent.com/fikr4n/linux-pentest-util/master/screenshot/smalictrace-1.png)

To get smali from an APK, you can use either smali or [Apktool](http://ibotpeaches.github.io/Apktool/) which wraps smali. I prefer Apktool instead of smali directly.

### Other utils

- **cexec** execute programs/scripts concurrently with limit and queue a.k.a. process pool
- **chdelim** change text delimiter
- **csvmerge** merge/group rows in CSV file based on equivalent columns
- **csvunmerge** reverse of csvmerge
- **httpserver.py** simple HTTP server; can be used to transfer files with your colleague
- **nmap2csv** convert Nmap result to CSV (in case you forgot to use `-oA` option of Nmap)
- **nmapfilter.sh** filter Nmap result; actually filtering like this can be done in Metasploit if you import the result to Metasploit
- **nmaptotal.sh** execute Nmap _killer scan_ by using `cexec`
- **switchip.sh** handy tool to switch (static) IP address by name

### More other utils

- **brute.py** brute force generator
- **Brute.groovy** brute force generator
- **pkcs5.py** PKCS#5 (PKCS#7) pad/unpad
- **sqldecipher.sh** SQLCipher decipherer

## License

The license is like Apache License v2.0, with addition that it must not be used for evil. So this collection is not really free to use/modify/distribute, because of that restriction :).


text:
# Tech Mahindra Centralized Operations

Tech Mahindra Centralized Operations is an open-source tool that provides a unified interface with Jenkins for all the “day-to-day” activities.

## Download

Download the latest version from the Releases. After extracting the zip, follow the steps from [Installation](INSTALLATION.txt)

## Documentation

You can check the Help Documentation from [HelpDoc].

## Development / Contribution

Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting your pull requests. It also has details on how to setup your development environment.

## Code of Conduct

To provide clarity on what is expected of our members, Tech Mahindra Centralized Operations has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities and we think it articulates our values well. For more, see the [Code of Conduct](CODE_OF_CONDUCT.md).

## Contact

If you have any queries on Tech Mahindra Centralized Operations , please contact CentOps Support.

To ask specific questions on project development, to discuss future improvements or for any other technical detail, please join the [Tech Mahindra Centralized Operations chat].

## License

Tech Mahindra Centralized Operations is licensed under [MIT License](LICENSE).

repository: CentOps-TechMahindra/CentOps

repo_name: CentOps-TechMahindra/CentOps


text:
# php-events
Trigger and listen to events

## Requirement
This package requires PHP 7.0 or later.

## Introduction
> You can implements **\base\Component** or extends **EventComponent** for create your Component

## Example
Class level events:
```php
const EVENT_SAVE = "save";
$callback = function(){ print "Save event trigger"; };
Event::on(EVENT_SAVE, $callback); # Adds the handler
Event::on(EVENT_SAVE, function(){ print "Second hadnler for the save event"; }, false); # Will be processed first
...
Event::trigger(EVENT_SAVE);
# print "Second hadnler for the save event"
# print "Save event trigger"

Event::off(EVENT_SAVE, $callback); # Deattaches the handler $callback from the save event
...
Event::trigger(EVENT_SAVE); # print "Second hadnler for the save event"
```

Object level events:
```php
const EVENT_SAVE = "save";
$callback = function(){ print "Second hadnler for the save event"; };

$component = new EventComponent();
$component->on(EVENT_SAVE, function(){ print "Save event trigger"; }); # Adds the handler
$component->on(EVENT_SAVE, $callback, false); # Will be processed first
...
$component->tigger(EVENT_SAVE); # print "Save event trigger"
# print "Second hadnler for the save event"
# print "Save event trigger"

$component->off(EVENT_SAVE, $callback); # Deattaches the handler $callback from the save event
...
$component->trigger(EVENT_SAVE); # print "Save event trigger"
```

repository: koperdog/php-events

repo_name: koperdog/php-events


text:
# Designing and Implementing an application that incorporates relevant APIs

* Investigate appropriate APIs for the City Explorer System.

* In city explorer project I used these 3 APIs:

### API Description

* LocationIQ, [link to it](https://locationiq.com/) provides flexible enterprise-grade location based solutions.

### Usage

* this one helped my project to get the Geocoding and maps picture for each city in the world. by searching only for the name of city/country.

### API Endpoints/Request URLs

* LOcation IQ was having 2 endpoints. In US ans EU. the one i used is ```/search```

* in city explorer the endpoint was in EU and the request URL was
```https://eu1.locationiq.com/v1/search.php?key=YOUR_ACCESS_TOKEN&q=SEARCH_STRING&format=json```

### Authentication Key

* Using Access Tokens.
* Key: pk.a0fd29311853789b83630c120d292f03

----------------------
### API Description

* Weatherbit, [link to it](https://www.weatherbit.io/api) provides weather information for future,past and the current weather data. and this can be done in many ways such as searching by city name, city ID, Latitude/longitude etc.

### Usage

* in city explorer i used this API to retrieve the weather for forecast API (16day / daily) with searching by city name feature.

### API Endpoints/Request URLs

* EndPoints: searching by city name, city ID, Latitude/longitude, postal code, and station. and in city explorer was searching by city name. Endpoint: ```/forecast/daily?```

* Request URL sample:
```https://api.weatherbit.io/v2.0/forecast/daily?city=Raleigh,NC&key=API_KEY```

### Authentication Key

* API master Key (Access Tokens)
* Key:<PHONE_NUMBER>f14da4a8b2d5064dd19e7c

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

### API Description

* MovieDB, [link to it](https://www.themoviedb.org/) provides a collection of movies, TV shows and actor data.

### Usage

* In city explorer i used this API for getting the movies and shows that related/same as the city name that the user want to search about.

### API Endpoints/Request URLs

* in city explorer i used ```/search``` end points and this is a sample request url:
```https://api.themoviedb.org/3/search/movie?api_key={api_key}&query=Jack+Reacher```

### Authentication Key

* API Key Access Tokens.
* Key: 54cc9f2eb55ebbd8b733256bd764b01a

---

## Link To my Live URL:

### [City-Explorer](https://deploy-preview-15--city-explorer-qamar.netlify.app/?utm_source=github&utm_campaign=bot_dp)
https://deploy-preview-15--city-explorer-qamar.netlify.app/?utm_source=github&utm_campaign=bot_dp

### [Heroku](https://city-explorer-class07.herokuapp.com/)
https://city-explorer-class07.herokuapp.com/

### [Backend Repo](https://github.com/QamarAlkhatib/city-explorer-api)
https://github.com/QamarAlkhatib/city-explorer-api

### [Frontend Repo](https://github.com/QamarAlkhatib/city-explorer)
https://github.com/QamarAlkhatib/city-explorer

repository: QamarAlkhatib/API-BTEC

repo_name: QamarAlkhatib/API-BTEC


text:
# roda-websockets

The roda-websockets gem integrates [async-websockets](https://github.com/socketry/async-websocket) into the [roda](http://roda.jeremyevans.net/) web toolkit. Use this plugin for asynchronous websockets alongside roda and falcon.

## Installation

```sh
gem install roda-websockets
```

## Source Code

Source code is available on GitHub at
https://github.com/havenwood/roda-websockets

## Usage

roda-websockets requires that you use [Falcon](https://github.com/socketry/falcon) as your web server in order to establish asynchronous websocket connections.

```ruby
falcon serve --count 1
```

roda-websockets is a roda plugin, so you need to load it into your roda
application similar to other plugins:

```ruby
class App < Roda
  plugin :websockets
end
```

In your routing block, you can use `r.websocket` to pass the routing
to a websocket connection.

```ruby
r.websocket do |connection|
  # ...
end
```

repository: socketry/roda-websockets

repo_name: socketry/roda-websockets


text:
# Fitness Tracker

## Description
As a user I want to be able to view create and track my daily workouts. I want to be able to log multiple exercises and track the name, type, weight, sets, reps, and duration of my exercises. I should be able to see the results and the track information of my imputed workouts in my dashboard.
## License
<img width="170" alt="Screen Shot 2021-01-11 at 10 59 23 PM" src="https://img.shields.io/badge/license-MIT%20License-blue?style=flat-square">

## Table of Contents
- Installation
- Link
- Usage
- Media
- Technologies
- Dependencies
- Contributors
- Questions
- Tests

## Installation
- To create this app on your local environment first clone the repo.
   -- $ cd [path_to_save_codebase]
   -- $ git clone (CLONE LINK)
- Run the application:
 -- Open Terminal
  -- $ npm install
  -- $ npm run seed
  -- $ npm start

## Usage
- On the Homepage. Create a new workout routine.
- Add all the details about your workout.
- Navigate to the Dashboard to see your progress.
- Continue to add workouts as you go.

## Media
![ReadMe-Gif](https://user-images.githubusercontent.com/75399668/116801734-0b0a2380-aad2-11eb-9b1c-353f58144a57.gif)

## Technologies Used
- Node.js
- Javascript
- VSCode
- Cloud Mongo
- Heroku

## Dependencies
- Express
- Mongoose
- Morgan
- Chart.js

## Contributors
DORA AND MANNY

## Tests
N/A

repository: manorathn/workoutTracker

repo_name: manorathn/workoutTracker


text:
---
services: app-service\web,app-service
platforms: python
author: cephalin
---

# Flask and PostgreSQL sample for Azure App Service

This is a sample application that you can use to follow along with the tutorial at
[Build a Python and PostgreSQL web app in Azure](https://docs.microsoft.com/azure/app-service/app-service-web-tutorial-python-postgresql).

The sample is a simple Python Flask application that connects to a PostgreSQL database via SQLAlchemy.

The database connection information is specified via environment variables `DBHOST`, `DBPASS`, `DBUSER`, and `DBNAME`. This app always uses the default PostgreSQL port.

# Contributing

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode<EMAIL_ADDRESS>with any additional questions or comments.


text:
---
layout: post
title: "The art of agile development, my review"
date: 2011-03-11 13:43
comments: true
categories: [agile, book]
alias: "/296/the-art-of-agile-development-my-review"
---

I've read this book 2 times, with a 2-years interlude: once when I was running my own company, a really small one, and the second time after [DNSEE](http://www.dnsee.com/) started looking for talented developers on the market to join our team, in the middle of 2010.
<!-- more -->

{% img right /images/art.agile.jpg %}

In both cases there were interesting situations while reading the book: firstly I was trying to leverage my skill as a developer and PM, then I was helping a team mix together.

The second time has been really hard, because it really took several months to me to complete it, really dunno why.

Apart from personal thoughts, I would really like to share you some considerations about this book, a really cool one in my honest opinion.

## This book fits very well when...

...you are a newcomer and want to know about agile development.

It explains very well every transition happening during an agile-based process.

Don't expect to read the latest from the agile universe, like Kanban or notions of LSD: this book is really focused on well-established patterns and processes and will deal with letting you master all the basics of any agile-based *doctrine*.

This is pretty useful when you can't afford being overwhelmed by notions, a typical situation while being a newbie.

## XP over agile

The whole book explains [extreme programming](http://www.extremeprogramming.org/), not any other single agile methodology ( like SCRUM, Crystal or whatever ).

This is, IMHO, a pretty winning choice: XP has been widely recognized as the masterpiece - but also as the more difficult - of all the agile methodologies.

Just to be clear: when you know how to deal with the whole team, when your teammates know their responsibilities and are used to XP, each of them will suite perfectly as a SCRUM master ( although they will probably tell you SCRUM seems cheap to them :-) ).

That's why XP is a win-win trade while learning about the agile world.

## General considerations

The book is really pragmatic and will help you in several situations: I really appreciated that, for every single change it would push you towards, it explains how you should face the change, how you should make other members of the team face it and in which manner, because of any problem, you can ( although you shoudn't ) ignore it.

## What I didn't like

The only thing I disliked in the book was the chapter's organization: the usage of *etudes* and final considerations in each chapter sounded reduntant to me.

It may be a problem with me reading it for the second time: in fact, this kind of organization was really helpful to better understand what I was reading, how to adopt it and how to guide the transition **from whatever to agile** the first time I read it.

## Long-term retrospectives

I read it 2 times for a single reason: to reflect on how I improved myself over 2 years.

How much of the book I introduce in my daily job and how I managed others to face my thoughs.

I really gotta say that reading it for the second time **helped me so much realizing where, and why, I failed**.

## So, is the book right for you?

Don't you know how to conduct a retrospective? Need to learn what timeboxed iterations are? Can't figure out why refactoring and incremental design are *that* important? Don't know why you should take decision at the **last responsible moment**? Are you into a team and want to understand how far did you get?

If you can't tame these topics, sure, this book is right for you.

branch_name: refs/heads/source

extension: markdown


text:
# **lane-lines** [![Udacity - Self-Driving Car NanoDegree](https://s3.amazonaws.com/udacity-sdc/github/shield-carnd.svg)](http://www.udacity.com/drive)

A pipeline to identify and mark simple, straight lane lines on the road using Python and OpenCV.

_This project is a part of Udacity's Self-Driving Car Engineer Nanodegree program_

<img src="examples/laneLines_thirdPass.jpg" width="480" alt="Combined Image" />

## Install

- **Numpy**

    Install Numpy with pip by running the command below in the terminal

    ```sh
    $ pip install numpy
    ```

    or explore Numpy's [Installation Guide](https://numpy.org/install/)

- **OpenCV**

    Install OpenCV with pip by running the command below in the terminal

    ```sh
    $ pip install opencv-python
    ```

    or explore OpenCV's [Installation Guide](https://numpy.org/install/)

- **Jupyter Notebook**

    Install Jupyter Notebook with pip by running the command below in the terminal

    ```sh
    $ pip install notebook
    ```

    and open the Jupyter Notebook file using the command

    ```sh
    $ jupyter notebook
    ```

    in the directory containing .ipynb file.

    [More info](https://jupyter.org/install)

## Getting Started

Clone this repository to your local machine

```sh
$ git clone https://github.com/nantanitv/lane-lines/
```

## Contact for more details

Email me at<EMAIL_ADDRESS>

repository: nantanitv/lane-lines

repo_name: nantanitv/lane-lines


text:
# .files

Repository of configuration files to be
shared between different working machines.

Adapted from klmr's dotfiles repository:
 https://github.com/klmr/.files

# klmr's README
For organisational purposes dotfiles are kept *separate* from the actual home
directory, and inside a (conveniently hidden) folder `.files`.

Deployment happens via `./deploy`. This will read a local configuration file
(machine specific and thus not to be synched with Github) and only deploy the
components specified therein. Note that this will override files in the home
directory without questions asked – proceed with extreme caution and have a
backup handy!

## Installation
Run

```bash
git clone git@github.com:klmr/.files.git ~/.files
cd ~/.files
git submodule update --init
```

## Configuration & deployment

To deploy the files to the local home directory, run `./deploy`. This will read
two configuration files to determine which config files to install:

 * [`components.conf`](components.conf): This file defines which files belong to
   which logical “components”, which form the units of installation. This file
   should reflect the files that are actually part of the repository, rather
   than any local machine configuration.
 * `local.conf`: The local (= machine specific) configuration. This contains a
   simple list of components to install on the local machine. Since the file is
   machine specific, it is not part of `origin/master` (but a local branch may
   be appropriate?). However, this repository has an
   [`example.conf`](example.conf) which can be used instead.
* In addition, machine-specific patch files are read from `./patches`. Files in
  this directory are not under version control and need to be maintained
  separately. Patch files should be created using the conventional workflow
  using the `diff` utility.

repository: HannahVMeyer/dotfiles

repo_name: HannahVMeyer/dotfiles


text:
# Learning Cumulative Distribution Function with Neural Networks
Here is a implementation of the new technique for density estimation with neural networks.

This model Learns cumulative distribution function with a *[Monotonic Networks (J. Sill, NIPS1997)](https://papers.nips.cc/paper/1358-monotonic-networks)*.

## 1d Gaussian
![Output heat map for 1d gaussian](images/gaussian_1d.png?raw=true)

## Truncated 1d Gaussian
![Output heat map for 1d gaussian](images/half_gaussian_1d.png?raw=true)

## Mixture of 2d Gaussians
![Output heat map for mixture of 2d gaussian](images/mixed_gaussian_2d.png?raw=true)

## Truncated 2d Gaussians
![Output heat map for truncated 2d gaussian](images/half_gaussian_2d.png?raw=true)

## Run
```
python3 train.py --gpu 0 --dataset gaussian_1d
```
```
python3 train.py --gpu 0 --dataset gaussian_mix_2d
```

# Sampling
You can also use this technique to sampling from the distribution by learning inverse of the model.

## 1d Mixed Gaussian
```
python3 train.py --gpu 0 --dataset gaussian_mix_1d --resume result/forward_snapshot_epoch_100 --mode inverse
```

![Sampled data for mixture of 1d gaussian](images/mixed_gaussian_1d_sampled.png)

Learned distribution(orange line), sampled data from learned model(blue bars).

## 2d Mixed Gaussian
```
python3 train.py --gpu 0 --dataset gaussian_mix_2d --resume result/forward_snapshot_epoch_100 --mode inverse
```

![Sampled data for mixture of 1d gaussian](images/mixed_gaussian_2d_sampled.png)

Original data(left), learned distribution(center), sampled data from learned model(right).


text:
---
title: The sister ship of the
tags:
  - Jan 1923
---

The sister ship of the Esther Weems, the Plainfield, which will be renamed to Mary Weems, arrives in Miami. [The Tipton and Plainfield were bought by B. & C. Steamship Company in October 1922. It was reported in November 1922 that the Esther Weems was formerly the Plainfield.]

Newspapers: **Miami Morning News or The Miami Herald**

Page: **1**, Section: **A**


text:
# CHANGELOG

## Version 28.0.0 -
* Updates for Elm 0.19.
* `Exts.Date` is removed. There have been major changes to
  Date-representation in Elm 0.19. Read the docs for `elm/time` and
  consider using it with `rtfeldman/elm-iso8601-date-strings`
  instead. `Exts.Json.Decode.decodeDate` is removed for the same
  reasons.
* `Exts.Function` is removed, because Elm no longer supports custom
  infix operators.
* `Exts.Json.Encode.dict` and `.set` are removed. See `elm/json`
  instead.
* `Exts.Html.Attributes.styleList` now returns `List (Attribute msg)`
  instead of a single `Attribute msg`. See `elm/html` for the
  justification.
## Version 27.0.0 -
* Removed `Exts.Tuple.mapFirst` and `.mapSecond`. These are in core.

## Version 26.0.0 -

Big breaking changes for Elm 0.18.

* Removed `RemoteData`. This now lives in [its own package][remotedata].
* `Exts.Tuple.first` and `second` become `mapFirst` and `mapSecond`.
[remotedata]: package.elm-lang.org/packages/krisajenkins/remotedata/latest
* Removed most of `Exts.Http`. The new version of `elm-lang/http` is
  much more user-friendly, so few of those supporting functions still
  apply.

repository: krisajenkins/elm-exts

gha_language: Elm

repo_name: krisajenkins/elm-exts


text:
# salt-unicef-web

## 1. API for checking User & Role : [ Method Get ]
```
<EMAIL_ADDRESS>```
#### Result/Output
##### Correct Email and Password
```
{
    "data":{
        "message":"Ok",
        "user":{
            "id":10,
            "name":"admin",
<EMAIL_ADDRESS>            "role":1,
            "facility_id":null
        }
    }
}
```
##### User doesn't exist
```
{
    "data":{"message":"User doesn't exist"}
}
```
##### Incorrect password
```
{
    "data":{"message":"Incorrect password"}
}
```

## 2. API for Data synchronization : [ Method Get ]
```
localhost/api/sync_data_app
```
#### Sample of Post Json data to server for Synchronization
```
[
	{
		"producer_measurements" : [
					{"user_id":"2","facility_id":"1","date_of_data":"2018-04-05 10:30:31","quantity_salt_processed":50,"quantity_potassium_iodate": 11,"stock_potassium":2,"measurement_1":"50","measurement_2":"30"},
					{"user_id":"2","facility_id":"1","date_of_data":"2018-04-05 10:30:31","quantity_salt_processed":30,"quantity_potassium_iodate": 31,"stock_potassium":2,"measurement_1":"30","measurement_2":"10"}
			]
	},
	{
		"monitor_measurements" : [
					{"monitor_id":"3","facility_id":"1","at_producer_site":"1","location":"","latitude":"","longitude":"","measurement":"30","warning" :"1", "date_of_visit":"2018-04-05 10:30:31","date_of_follow_up":""},
					{"monitor_id":"3","facility_id":"1","at_producer_site":"0","location":"Rousey Keo, PP","latitude":"","longitude":"","measurement":"60","warning" :"1", "date_of_visit":"2018-04-05 10:30:31","date_of_follow_up":""}
			]
	}
]
```
#### Result/Output
##### Successfully Inserted data
```
{
    "code":"200",
    "message":"Ok"
}
```
##### Error while insertion
```
{
    "code":"500",
    "message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'salt.producers' doesn't exist (SQL: insert into `producers` (`facility_id`, `measurement_1`, `measurement_2`) values (1, 20, 30))"
}
```
## 3. API for Get list of facilities: [ Method Get ]
```
localhost/api/list_facilities_app
```
#### Result/Output
##### Successfully Inserted data
```
{
    "facilities":[
            {"id":1,"facility_ref_id":"F_001","facility_name":"Daun Keo Salt Facility"},
            {"id":2,"facility_ref_id":"F_002","facility_name":"Village Salt Facility"},
            {"id":3,"facility_ref_id":"F_003","facility_name":"Kompot Salt Facility"}
        ]
}
```
## 4. API for requesting for data from Table facilities by number_of_records & last_download_date [ Method POST ]
```
localhost/api/get_updated_facility_lists_app
```
#### Sample of Post Json
```
{
	"number_of_records":"5",
	"last_download_date":"2018-05-02"

}
```
#### Result/Output
##### If number of records in app and server is matched, Return only updated records
```
{
    "code": "200",
    "equal": 0,
    "data": [
        {
            "id": 4,
            "facility_ref_id": "F_004",
            "facility_name": "ABC",
            "Latitude": null,
            "Longitude": null
        },
        {
            "id": 5,
            "facility_ref_id": "ss",
            "facility_name": "ss",
            "Latitude": null,
            "Longitude": null
        }
        ........
        ........
    ]
}
```
##### Else returned all records in tbl order_questions
```
{
    "code": "200",
    "equal": 0,
    "data": [
        {
            "id": 1,
            "facility_ref_id": "F_001",
            "facility_name": "Daun Keo Salt Facility",
            "Latitude": "11.582855",
            "Longitude": "104.833521"
        },
        {
            "id": 2,
            "facility_ref_id": "F_002",
            "facility_name": "Village Salt Facility",
            "Latitude": "11.582855",
            "Longitude": "104.833521"
        },
        {
            "id": 3,
            "facility_ref_id": "F_003",
            "facility_name": "Kompot Salt Facility",
            "Latitude": "11.582855",
            "Longitude": "104.833521"
        },
        {
            "id": 4,
            "facility_ref_id": "F_004",
            "facility_name": "ABC",
            "Latitude": null,
            "Longitude": null
        },
        {
            "id": 5,
            "facility_ref_id": "ss",
            "facility_name": "ss",
            "Latitude": null,
            "Longitude": null
        }
        ..........
        ..........
    ]
}
```
##### Input is not in JSON format
```
{
    "code": "500",
    "message": "Receiving data is not JSON format"
}
```
##### If number_of_records or/and last_download_date is empty
```
{
    "code": "500",
    "message": "Either Number of records or Last download date is null. Those fields are required."
}
```

repository: OpenInstituteCambodia/salt-unicef-web

repo_name: OpenInstituteCambodia/salt-unicef-web


text:
Pennies: A Virtual Piggy Bank and Indivisible Crypto Currency.

[![Build Status](https://travis-ci.org/RazorLove/pennies.png?branch=master)](https://travis-ci.org/RazorLove/pennies)

*****

**The latest update requires all users to update to the client version v<IP_ADDRESS>
before January 1st 2014 at 00:00:00 GMT after which:**

Older client versions will no longer be able to initiate a connection to
this version.

This version will no longer accept blocks from any older versions that
remain connected in the interim.

Seven days after older versions are disconnected (8th January 2014 at
00:00:00 GMT) the new stake percentage will take effect. This will be a
massive reduction to prevent further over inflation from this point
forward.

*****

*Based on Scrypt-Jane for CPU centric mining.

*No decimals, every CENT is a single, indivisible unit.

*1,000,000,000 total Proof of Work coins, no halving, no special blocks.

*1 Minute Block Targeting, 1 Week NFactor Retargetting, Progressive diff adjustment.

*7 Day Coin-Age for Proof of Stake Minting, full coin age after a fortnight. (experimental)

Pennies are straightforward cryptographic coins. They are based on YaCoin and use
Scrypt-Jane to encourage CPU-centric mining. They are designed to mint Proof of
Stake blocks easily and encourage saving. They have no decimals and no micro or nano
units--every penny is a single coin!

Minting of shiny new pennies can be done using the Command Line Banking Virtual
Teller Window within the Piggy Bank. Freshly minted coins take 25 blocks to mature.
Pennies are not meant to have specific value or be keyed to a specific value in any
fiat or electronic currency.

Due to the uniqueness of indivisibility a few interesting challenges are posed to the
crypto-currency community through Pennies. How might fees work at an exchange? How does
pool minting work if the block reward is 1 and it can't be broken down? Pennies are meant
to be simple to use, save, and transfer for beginners--and simultaneously enable advanced
crypto-currency users quick, non-nonsense interaction via Command Line Banking.

CHANGELOG:

As of release 0.9.2, The Piggy Bank includes QR code support.

As of release 0.9.3, The Piggy Banks has been translated in to multiple languages.

As of release 0.9.4, The Piggy Bank has a fork in place reducing interest payouts by a factor of 100.
The fork is set to occur on Midnight GMT, All Hallow's Eve, 2013. Also new in this release is the
ability to mint coins using the command "mintpennies true" in Command Line Banking.

As of 0.9.6, the Piggy Bank has returned interest to its previous levels, temporarily. Coin Control
has also been added to the Bank.

0.10.0 Fixes the stake issues, set to take effect on Jan 8th.

As of release 10.3.1,
   1. Accelerate startup. Old Version startup cost 30 minutes at least , new cost only 3 minutes at most.
   2. Accelerate sync. Old Version can't sync normally.
   3. Support Bloom Filter Protocol, it means Pennies will support Light-Wallet soon, Android Wallet will be released later.
   4. Fix the issue:Stake-Mining cost 100% CPU.
   5. Fix crash issue. Old Version startup will crash in some PC because scrypt-hash has some CPU-specific code.
   6. Upgrade openn-ssl to 1.0.1g

As of release 10.3.2,
   1. fix a random crash issue
   2. disconnect zombie connection when syncing, it will accelerate syncing

repository: zahidaliayub/Pennies

repo_name: zahidaliayub/Pennies


text:
---
layout: default
---

# 1998-12-18 - Re: Comrade Klinton at it again

## Header Data

From: Jim Gillogly<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 3fc496b10e332b7586069fd7b8010958d6e7dc37820831da44330af7715f0f49

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-12-18 03:54:12 UTC

Raw Date: Fri, 18 Dec 1998 11:54:12 +0800

## Raw message

```
{% raw  %}From: Jim Gillogly<EMAIL_ADDRESS>Date: Fri, 18 Dec 1998 11:54:12 +0800
To<EMAIL_ADDRESS>Subject: Re: Comrade Klinton at it again
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Somebody said:
> As I recall, the name "Desert Fox" was a nickname held by a Nazi general.
> Fitting, that.

Fitting?  I find the occasional anti-American hyperbole around here
rather depressing.  I'm reminded of 30-year-old engineers talking
about the depression of the 80's!  If you don't see the difference
between the US and Nazi Germany, you need to do a lot more reading.
While the anti-privacy activities of the administration and law
enforcement are threatening and need to be resisted, they are by no
means on a par with the excesses of the Nazi leadership.

--
	Jim Gillogly
	Trewesday, 28 Foreyule S.R. 1998, 02:48
	<IP_ADDRESS>.0, 6 Ahau 13 Mac, First Lord of Night

{% endraw %}
```

## Thread

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

+ Return to "[Jim Gillogly <jim@acm.org>](/authors/jim_gillogly_jim_at_acm_org_)"

+ 1998-12-18 (Fri, 18 Dec 1998 11:54:12 +0800) - Re: Comrade Klinton at it again - _Jim Gillogly<EMAIL_ADDRESS>


text:
# JPA example with MariaDB

## Running the tests

By default, the tests of this module are disabled.

To run the tests in a standard JVM with MariaDB started as a Docker container, you can run the following command:

```
mvn clean install -Dtest-mariadb -Ddocker
```

Please note that waiting on the availability of MariaDB port does not work on macOS.
This module does not work with `-Ddocker` option on this operating system.

Additionally, you can generate a native image and run the tests for this native image by adding `-Dnative`:

```
mvn clean install -Dtest-mariadb -Ddocker -Dnative
```

If you don't want to run MariaDB as a Docker container, you can start your own MariaDB server. It needs to listen on the default port and have a database called `hibernate_orm_test` accessible to the user `hibernate_orm_test` with the password `hibernate_orm_test`.

You can then run the tests as follows (either with `-Dnative` or not):

```
mvn clean install -Dtest-mariadb
```

If you have specific requirements, you can define a specific connection URL with `-Dmariadb.url=jdbc:mariadb://...`.

repository: FroMage/quarkus

gha_language: Java

repo_name: FroMage/quarkus


text:
# Product Landing Page
### By Safiy Cham

## Description

A freeCodeCamp responsive website project (part of their front-end certification curriculum).

## ToDo
* Add javascript to load new haiku every 10 seconds

## License

This software is licensed under the MIT License

Copyright 2019

repository: safiyc/product-landing-fcc

repo_name: safiyc/product-landing-fcc


text:
# RTS
Merwin's Ringtone Search

C# ASP.NET Web Application

Nokia RTTTL ringtones with the ability to play any ringtone as a MIDI file

## Connection string file
The file containing the SQL connection string should be called **SqlConnectionString.txt** and be located in the root of the solution folder (the same level as **RTS.sln**)


text:
## Classes and Objects:

Python is an object oriented programming language.

Almost everything in Python is an object, with its properties and methods.

A Class is like an object constructor, or a "blueprint" for creating objects.
```
Create a class named MyClass, with a property named x:
class MyClass:
  x = 5

Now we can use the class named MyClass to create objects:

p1 = MyClass()
print(p1.x)

```
The `__init__()` Function
The examples above are classes and objects in their simplest form, and are not really useful in real life applications.

To understand the meaning of classes we have to understand the built-in `__init__()` function.

All classes have a function called `__init__()`, which is always executed when the class is being initiated.

Use the `__init__()` function to assign values to object properties, or other operations that are necessary to do when the object is being created:

```
Create a class named Person, use the `__init__()` function to assign values for name and age:

class Person:
  def `__init__`(self, name, age):
    self.name = name
    self.age = age

p1 = Person("John", 36)

print(p1.name)
print(p1.age)
```

[object_methods](https://www.w3schools.com/python/gloss_python_object_methods.asp)

## Thinking Recursively in Python:
Along the way on your programming journey, there are a few milestones that you need to conquer to advance ahead. For example, getting comfortable with classes, understanding pointers, master the art of functionalizing your code, and so on. One of the trickest programming concepts to learn for newcomers and master for those who have been programming for a while is recursion.

Steps to train your mind to think recursively:
1. Use the iterable-approach first.
2. Extract the parameters of your function.
3. Deduct minimal problem instance.
4. Add the solution to the minimal problem instance.
5. Expand your function.

### Naive Recursion is Naive
Thus, we avoid recomputation by explicitly checking for the value before trying to compute it.

## Python Testing with pytest: Fixtures and Coverage:

What Does Fixtures Mean?
Fixtures, in the context of insurance, are movable or personal property attached to an immovable property that they become a part of the immovable or real property and are covered under a real estate insurance policy.

Insuranceopedia Explains Fixtures
Fixtures are said to form part of the immovable when they are attached or affixed permanently, such as when they are embedded, rooted, or permanently attached with cement, glue, nails, screws, bolts, or plaster. There are four types of fixtures, namely:

Agricultural fixtures, or those attached for the purpose of farming;
Domestic fixtures, or those attached to a home in order to make it more livable;
Ornamental fixtures, or those attached to a property in order to make it more attractive; and
Trade fixtures, or those necessary in the conduct of business in the real property.
To determine whether a personal property is a fixture or not, the following shall be considered:

Method of attachment;
Adaptability of use;
Intent of the buyer and the seller in a contract of sale;
Agreement of the parties; and
Relationship of the parties.

examples:
```
>>> while True print('Hello world')
  File "<stdin>", line 1
    while True print('Hello world')
                   ^
SyntaxError: invalid syntax
```
Exceptions:

```
>>> 10 * (1/0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: division by zero
>>> 4 + spam*3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'spam' is not defined
>>> '2' + 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly
```

shell:
```
$ pytest
================== test session starts =============================
platform darwin -- Python 3.7.3, pytest-5.3.0, py-1.8.0, pluggy-0.13.0
rootdir: /.../effective-python-testing-with-pytest
collected 2 items

test_with_pytest.py .F                                          [100%]

======================== FAILURES ==================================
___________________ test_always_fails ______________________________

    def test_always_fails():
>       assert False
E       assert False

test_with_pytest.py:5: AssertionError
============== 1 failed, 1 passed in 0.07s =========================
```

##### *writen by OBADA ALHAWJREH.*

My name is obada jaber, I’m 27 years old, I studied Mechanical engineering and i graduated from al balqa applied university, i am now a software student. [OBADA ALHAWJREH](https://github.com/Obada-gh).

##### *Support or Contact:*

Having trouble with Pages? Check out our<EMAIL_ADDRESS>or phone number :<PHONE_NUMBER> or [contact support for gethub](https://support.github.com/contact) and we’ll help you sort it out. 🚑 🚑 🚑

repository: Obada-gh/reading-notes

repo_name: Obada-gh/reading-notes


text:
* HL7 v2
   * Sort Order
      * See the [General Guidelines](mapping_guidelines.html#sort-order)

   * Identifier
      * Contains an xml/json like path using the HL7 v2 XML approach of [MessageStructure].[GroupName or CHOICE].[SegmentName] where there may be multiple Group Names in play.
      * When there is a segment in multiple places in the message structure where this path would yield the same string even though it involves different uses of the same segment, thus potentially different mappings, the main segment preceding the segment at hand will be included in front of that segment using a ":follow:" tag.
         * For example, the ARV segment is used after the PID and the PV1 in the ADT_A01 structure.  There may be in either case other segments between the PID (or PV1) and the ARV.  The identifier in both cases would be ADT_A01.ARV.  To distinguish the two uses and likely mappings of ARV, the identifier will be ADT_A01:follow:PID.ARV for the ARV effectively related to the PID and ADT_A01:follow:PV1.ARV for the ARV effectively related to the PV1.
         * The primary segment it is related to will be used rather than any segments that may still be listed be between them (e.g., PD1) as they may not be present.

  * Syntax
     * Contains the first column of the Message Structure Table in the base standard.
     * This is included as it is a familiar format to understand the message structure using the { [ ] } brackets.

  * Name
     * The formal name of the segment or group
  * Cardinality (Min and Max)
     * The cardinality expressed numerically.
     * Note that "-1" is used for the max cardinality where v2 indicates it to be "*".

  * Condition
     * See the [General Guidelines](mapping_guidelines.html#condition)

* HL7 FHIR
   * Primary Target
      * The FHIR resource that is the main resource that the v2 segment will map to.
   * Segment Map
      * The URL to the Segment Map that is to be used for the segment in this message structure in this location.
      * There may be multiple flavors of the segment maps to support different mappings.  The flavor is appended to the end of the segment name using [] brackets, e.g., MSH[Provenance - Originator].
   * References
      *  An assignment that indicates for the FHIR resource being mapped to the attribute that needs to reference a particular other resource.  For example, a PV1 segement being mapped to an Encounter resource must reference the Patient resource that the PID earlier in the message was mapped to.

gha_language: GLSL


text:
---
tags: [ mono, monodevelop tips ]
title: 'MonoDevelop Tips: Import Type'
created:<PHONE_NUMBER>
redirect_from:
- /node/183
- /journal/2011/02/08/monodevelop_tips_import_type
---
One of my favourite features that we added to MonoDevelop 2.4 is the "import
Type" command. It is accessed using the keybinding _Ctrl-Alt-Space_, and shows a
list of all types in all namespaces in all referenced assemblies.<!--break-->

![The completion list for the Import Type
command](/files/images/md-tips/import-type.png)

You can use our [completion list
filtering](/journal/2011/02/07/completion_list_filtering) to find the type
you're looking for, then, when you commit the selection from the list,
MonoDevelop automatically adds the "using" statement to the file. For example,
using StringBuilder is as easy as `<ctrl-alt-space>StrB<space>` even if you
don't yet have `using System.Text;` at the top of the file.

gha_license_id: NOASSERTION


text:
# Penn State IEEE
## PlutoSDR Workshop
March 20, 2021

### About
Workshop led by Rebecca DeSipio and sponsored by the Huff Research Group (HRG) in which attendees learned about Software Defined Radio and received hands-on experience using Raspberry Pi's and PlutoSDR modules.

### Required Tools
- Raspberry Pi 4 kit w/ touchscreen
- Mouse/Keyboard
- PlutoSDR module & kit

### Resources
- [ADALM-PLUTO Evaluation Board](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/adalm-pluto.html#eb-overview)


text:
Secure Password Generator Lite
==============================

The Story
---------
The story behind this tool is rather simple. I used to work for A DoE contractor as a Systems Administrator.
I had to maintain thousands of linux nodes (via SSH keys) but I still needed root passwords for local conole
access. The law (not policy but an actual law) required that each server have it's own unique password that matched
some very specific requirements. We also had to change these passwords every 180 days. Instead of insecure methods
such as spreadsheets, or notepad files, I opted to create a tool. It takes two strings, and uses a password generation
formula to convert them into the same password each time. This way you can reliably recover any password.

Using The Tool
--------------
The first string is the fully qualified domain name (FQDN) of the server. (ie: mysql0017.server.doe.gov)
The second string is a unique phrase (Seed Text) that you must keep secret. This string should always be the same.
The Seed Text string is the phrase that when combined with the FQDN produces a DoE compliant password.
It's the same password every time, so whoever knows the Seed String, can gain root on any server you use this on.
In 180 days just change the Seed Text, and update the password on all of the servers.

Why is it called "Lite"?
------------------------
This version of the tool is missing some features. The DoE one had AD authentication built into it as well as a check-in
with a server to make sure it was on site on a DoE computer. (Server was not exposed to the web) The "Full version" also
used a slightly different algorithm and contained a third variable. I had to differentiate the two versions enough knowing
one day I'd want to open source this.

Is this secure?
---------------

The short answer?
![no](readme-no.png)

The long answer?
This type of password generation is completely frowned upon by anyone who knows what they're doing. This repo existed
for a very specific purpose to fulfill a requirement that no longer exists because it was terrible.
**USE [1PASSWORD](https://1password.com/)**

What is a DoE compliant password?
---------------------------------
A DoE compliant password has a bunch of requirements:
1) Password contains at least eight non-blank characters, provided such passwords are allowed by the operating system or application.
2) Password contains a combination of letters (a mixture of upper and lowercase), numbers, and at least one special character within the
first seven positions, provided such passwords are allowed by the operating system or application.
3) Password contains a nonnumeric in the first and last position.
4) Password does not contain the user ID. (Note: My tool obviously cannot enforce this)
5) Password does not include the user’s own or, to the best of his/her knowledge, close friends or
relatives names, employee serial number, Social Security number, birth date, phone number, or any
information about him/her that the user believes could be readily learned or guessed. (Note: My tool obviously cannot enforce this either)
6) Password does not, to the best of the user’s knowledge, include common words that would be in an English dictionary, or from another
language with which the user has familiarity.
7) Password does not, to the best of the user’s knowledge, employ commonly used proper names, including the name of any
fictional character or place. (Sorry no Dalek themed passwords)
8) Password does not contain any simple pattern of letters or numbers, such as “qwertyxx” or “xyz123xx.”
9) Password employed by the user on his/her unclassified systems is different than the passwords employed
on his/her classified systems. (Up to you to enforce)

Yup that's a lot of requirements. DoE is in charge of nuclear research though, and I've never had an issue
remembering the few passwords I used daily, so it's not too bad.

Why are you open sourcing this?
-------------------------------
This tool was part of my early years as a junior engineer and while the security behind it is absolutely terrible, I
don't like throwing away code. Some day someone can look at this and use it as a lesson in why certain things are no
longer done certain ways.

repository: ahrenstein/SecurePassGenLite

gha_language: C#

repo_name: ahrenstein/SecurePassGenLite


text:
# sawtooth-sdk-go

This fork builds a variant Docker image with golang 1.10 installed, the sawtooth-sdk-go project premounted, and the sdk protos prebuilt.

This image is publically available at [hub.docker.com/pa3ng/sawtooth-sdk-go](https://hub.docker.com/r/pa3ng/sawtooth-sdk-go/). To obtain this image, do:

```
$ docker login hub.docker.com
$ docker pull hub.docker.com/pa3ng/sawtooth-sdk-go
```

## Build image from project

Build the SDK image locally

```
$ git clone https://github.com/pa3ng/sawtooth-sdk-go.git
$ cd sawtooth-sdk-go
$ docker build . -t sawtooth-sdk-go
$ docker run sawtooth-sdk-go
```

This will build the protos / mocks and place them in the protobuf / mocks directory, respectively.

detected_licenses: Zlib MIT Apache-2.0


text:
# Esp8266PCF8583WaterCounter

Project use:

PlatformIO  (http://platformio.org/)
Visual Studio Code (https://code.visualstudio.com/)

The device reads the readings from the water meter through the built-in reed switch, meter electricity through the output for verification.

Hardware needs ESP8266 ESP12-E, PCF8583 and 74HC00 to suppress the chatter of the contact.

This project implements ideas for my personal IOT from gitHub, ESP8266 libraries and much more. The device has been working for more than a month.

The source code can be considered as an example of the implementation of libraries:

OneWire: http://www.pjrc.com/teensy/td_libs_OneWire.html
DallasTemperature: https://github.com/milesburton/Arduino-Temperature-Control-Library
RemoteDebug: https://github.com/JoaoLopesF/RemoteDebug
SoftwareSerial, PubSubClient, ArduinoOTA with ESP8266

Also thanks to the forum http://www.homes-smart.ru/index.php/component/kunena/4-zhelezo/968-sbor-i-peredacha-pokazanij-schetchikov-vody-gaza-i-elektrichestv?q=/index.php/component/kunena/4-zhelezo/968-sbor-i-peredacha-pokazanij-schetchikov-vody-gaza-i-elektrichestv


text:
---
title: Fonts
---

# Fonts

## Installing custom fonts

The easiest way to install custom fonts to your RN project is do as follows:

  `1.` Define path to assets directory with fonts in project:

  Example:

  ```js
    module.exports = {
      ...
      assets: [
        './assets/fonts'
      ],
  ```

  Note: `fonts` is a folder with `.ttf` files

  `2.` Place your font files in your assets directory.

  `3.` Link font files, using the following command in the terminal:

  * React Native  `>= 0.69`:

  ```sh
  npx react-native-asset
  ```

  * React Native `< 0.69`:

  ```sh
  npx react-native link
  ```

  `4.` Restart your project to refresh changes.

Now, you are able to use `fontFamily` from font files.

repository: pdcprod/react-native-paper

repo_name: pdcprod/react-native-paper


text:
# Postman

Developers may leverage [Postman](https://www.postman.com/) to validate API
requests. The available collection covers the Looker REST API.

## Collection for the Looker REST API

1. File: [tools/postman/Looker REST API.postman_collection.json](../../tools/postman/Looker%20REST%20API.postman_collection.json)

1. Postman Environment Variables:

   | NAME                | DESCRIPTION                                                                |
   | ------------------- | -------------------------------------------------------------------------- |
   | `SCHEME`            | The URI scheme: `http` or `https`                                          |
   | `SERVER`            | URL of the Looker server                                                   |
   | `API_VERSION`       | Version of the Looker REST API, e.g. `3.1`                                 |
   | `CLIENT_ID`         | Client ID to authenticate the API calls                                    |
   | `CLIENT_SECRET`     | Client Secret to authenticate the API calls                                |
   | `QUERY_ID`          | ID of a Query to fetch its metadata, including the generated SQL statement |
   | `LOOKML_MODEL_NAME` | Name of a LookML Model to fetch metadata from                              |
   | `CONNECTION_NAME`   | Name of a Connection to fetch metadata from                                |

---

Back to the [Developer Resources index](..)


text:
Flutterman Sample
====================
This project is a complete 2D-side scroller game showing how to use
resources and interact with the display list.

It also uses a delegate to open a browser window on different platforms.

Online Demo
===========
http://www.defrac.com/sample-flutterman/

repository: defrac/defrac-sample-flutterman

repo_name: defrac/defrac-sample-flutterman


text:
# Fuzz Testing

This directory contains TiKV fuzz test cases as well as a CLI utility to run these fuzz tests using
a specific fuzzer.

Supported fuzzers:

- [libfuzzer](https://llvm.org/docs/LibFuzzer.html)
- [Honggfuzz](https://github.com/google/honggfuzz)

Planned to support:

- [AFL](http://lcamtuf.coredump.cx/afl/)

## Prerequisites

### Honggfuzz

See [honggfuzz-rs documentation](https://github.com/rust-fuzz/honggfuzz-rs).

## Usage

### List Available Fuzz Targets

```bash
# In TiKV directory
cargo run --package fuzz -- list-targets
```

### Fuzz Specific Target with a Fuzzer

```bash
# In TiKV directory
cargo run --package fuzz -- run [FUZZER] [TARGET]
```

repository: edwardpku/tikv

repo_name: edwardpku/tikv


text:
# Stellar Vanity
A simple CLI tool to generate Stellar vanity addresses.

**Vanity Address:** similar to a vanity license plate, a vanity cryptocurrency address is an
address where either the beginning (prefix) or end (postfix) is a special or meaningful phrase.
Generating such an address requires work. Below is the expected time and difficulty of finding
different length words in a vanity address (based on a more optimized algorthim/codebase).

![Vanity Key Chrt](https://imgur.com/diotZ02.png)

## How to use library:
```
use stellar_vanity::vanity_key::AddressGenerator;

let mut generator: AddressGenerator = Default::default();

let (public_key, private_key) = generator.find(|public, private| {
  // any conditions go here
  public.as_str().ends_with("RUST") // e.g. find address with the "RUST" suffix
});
```

This will continuously loop until a key with the desired properties is found. Once the vanity address is found,
a tuple (public_key, private_key) will be returned. Note, this is a synchronous function.

## How to use CLI:
```
cargo run -- [--postfix=<POSTFIX>] [--prefix=<PREFIX>] [-c=<NUMBER_OF_THREADS>]

Either `--postfix` or `--prefix` option is required, while thread count is optional.
```

As an example, the following looks for an address ending in pizza with 8 threads:
```
cargo run -- -c=8 --postfix=pizza
```

repository: thorhs/stellar-vanity-address-generator

repo_name: thorhs/stellar-vanity-address-generator