text:
## VEP-Pipeline Readme
written and maintained by Erin Winter<EMAIL_ADDRESS>
These scripts require Python 3 and a command line interface. Anaconda -- a distribution of Python and many useful packages -- is recommended.
If you have questions about what arguments each script requires, run python {name of script} -h to get a command line menu.

### Standard Processing Script Pipeline:
1. *character-cleaner.py*: given a folder of .xml files, outputs character cleaned files with the same extension\
2. *tei-decoder.py* OR *tei-decoder-stage.py* (early modern drama XML only): given a folder of character-cleaned xml files, outputs extracted plain-text files
3. (optional) *EMStandardizer.py:* given a folder of character cleaned, extracted plain-text texts, outputs standardized plain-text files \*

### Other Files:
- *conversion_dict.py*: a python dictionary class that enumerates unicode characters and ascii substitutions. limited to characters from the TCP.
- *config_all_TCP.yaml* AND *stage_config.yaml*: files that tells our tei-decoder which divs (or XML tags) to extract text from. use config_all_TCP to extract all text on the page, and stage_config.yaml to extract only dialogue from plays.
- *standardizer_dictionary.txt*: the dictionary for our standardizer, instructions for reading the dictionary are in the form of comments at the top

\* Our standardizer dictionary was curated for spelling from Early Modern texts keyed by the Text Creation Partnership, which means its dictionary is heavily skewed towards the Early English Books Online corpora. It makes changes like doe->do that have largely positive effects on the majority of Early Modern texts, but those same changes will have undesirable effects on texts dated 1700 or later because of change in spelling practices over time.

repository: olivercalder/VEP-pipeline

repo_name: olivercalder/VEP-pipeline


text:
Having trouble? Got questions? Check the [FAQ](FAQ.md) or try the
[SL4A discussion group](http://groups.google.com/group/android-scripting).

# Introduction #

Sometimes it's nice to be able to write scripts on your computer and run them on
the phone. This is possible using SL4A's "server" support.

First, start an SL4A server from the Interpreter Manager. (From the SL4A
frontpage, press Menu, then Interpreters, then Menu, then Start Server). You can
either start a public or a private server (**recommended**).

If you start a public server, anyone that can reach your device's IP address can
control your phone. Because of this, we recommend that you start a private
server instead. However, to use a private server you will need to install the
[Android SDK](http://developer.android.com/sdk/index.html) and add the adb
utility to your path.

When you use a private server and set up port forwarding and environment
variables as described below, then you will be able to run scripts on your
computer that should also work **unmodified** when run directly on the phone.
NICE. This is not true for public servers.

To use a private server, first connect your device to your computer via USB
(this is not necessary if you are using a public server).

  * Note the port displayed in the SL4A notification in the Android notification
    area,
  * Use adb to forward the network connection to your phone, AND
  * Set the AP\_PORT environment variable.

Example: Suppose you've started a private server within SL4A which you've noted
is listening on port 4321. You've connected the device to your computer with a
USB cable, and you've verified that "USB debugging connected" shows up in the
Android notification area.

You would then set up port forwarding like:

```
$ adb forward tcp:9999 tcp:4321
```

This command will forward all local traffic targeting port 9999 to the
private-server port on the Android device (port 4321 in this example).

Next you must set up an environment variable (AP\_PORT) that the android
bindings use to find the local port. Continuing with the example above, you
would do:

```
$ export AP_PORT=9999  # Use set AP_PORT=9999 on Windows
```
### Specifying a fixed port ###
**New as of version r5x** (see [Unofficial](Unofficial.md)) you can specify
which port you wish the server to use.

This setting can be found in **Preferences-->General-->Server Port**

This should not be set to anywhere in the common ports. I suggest setting this
to something high... I use 45001

If the port is set to 0, or the specified port is already in use, another random
port will be chosen.

This makes it possible to write a standard script/batch file to set up your
remote control environment.

You still need to manually start the server.

## Public Servers ##
If you don't want to connect your device to the host over USB, you can use a
public server. For public servers, you must additionally export the IP of the
device. To extend the previous example, suppose your phone is connected over
wifi on your home network and has an IP address of <IP_ADDRESS>. You would now
need to do:

```
$ export AP_PORT=4321  # Use set AP_PORT=9999 on Windows
$ export AP_HOST=<IP_ADDRESS>  # Use set AP_HOST=<IP_ADDRESS> on Windows
```

Now you can execute Python or Lua on your PC, import the android package or
module for the language, and interact with the AndroidProxy on the phone.

# For Example #

For our example, let's use Python.

First, make sure that you have Python 2.6 installed on your computer (this
matches the Python version that SL4A uses on the phone).

Then, make sure you have the SL4A's
[android.py](http://android-scripting.googlecode.com/hg/python/ase/android.py)
module in your Python path (i.e. in site-packages or the current directory).
android.py is the **only** extra file you need; you **don't** need to do any
sort of extensive SL4A install on your computer.

Then, connect your Android device via USB, start a private server, and set up
adb port forwarding and the AP\_PORT environment variable as described above.

Now you can have some fun!

```
$ python
Python 2.6
Type "help", "copyright", "credits" or "license" for more information.
>>> import android  # The SL4A android.py module should be on your sys.path.
>>> droid = android.Android()  # Or android.Android(('<IP_ADDRESS>', 6789)) for a public server, where <IP_ADDRESS> is the public server's IP, and 6789 is its port.
>>> droid.makeToast("Hello from my computer!")
```

### Rhino Example ###
A [HOWTO for Rhino](Rhino_Remote.md).

## Copying Scripts to Your Phone ##

Once you're satisfied, you can copy script to your phone:

```
$ adb push my_script.py /sdcard/sl4a/scripts
```

Now you can execute or continue to edit the script on your phone.

# Remotely Starting SL4A #

It is possible to launch scripts on your phone via the `adb shell`:

  * Launch a script in the background.

```
$ am start -a com.googlecode.android_scripting.action.LAUNCH_BACKGROUND_SCRIPT -n com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher -e com.googlecode.android_scripting.extra.SCRIPT_PATH /sdcard/sl4a/scripts/test.py
```

  * Launch a script in a terminal.

```
$ am start -a com.googlecode.android_scripting.action.LAUNCH_FOREGROUND_SCRIPT -n com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher -e com.googlecode.android_scripting.extra.SCRIPT_PATH /sdcard/sl4a/scripts/test.py
```

It is also possible to launch an SL4A server via the `adb shell`:

  * Start a private server.

```
$ am start -a com.googlecode.android_scripting.action.LAUNCH_SERVER -n com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher
```

  * Start a private server on a particular port (in this case, 45001)

```
$ am start -a com.googlecode.android_scripting.action.LAUNCH_SERVER -n com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher --ei com.googlecode.android_scripting.extra.USE_SERVICE_PORT 45001
```

  * Start a public server.

```
$ am start -a com.googlecode.android_scripting.action.LAUNCH_SERVER -n com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher --ez com.googlecode.android_scripting.extra.USE_PUBLIC_IP true
```

# Troubleshooting #

  * If you've mounted your SD card on your computer, the lists of scripts will
    appear empty in SL4A on your phone.  Don't panic.  As soon as you unmount
    the SD card on your computer, SL4A will display the list of scripts again.

  * If you try to set up adb port forwarding and get "no device found" errors,
    ensure that "USB debugging" is enabled on your phone and all proper drivers
    are installed on your computer.  You can enable USB debugging on your phone
    under Settings > Applications > Development > USB debugging.  In general,
    external scripting via private server will only work if "adb devices"
    shows your android device after you've connected it via USB.

    If "adb devices" comes up empty, Google around for tips on this problem
    before trying to move forward with SL4A itself.

<!---
 vi: ft=markdown:et:fdm=marker
 -->

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Gazebo Terrain Model Generator

## Summary

This repository contains a simple python-based program that can generate a Gazebo terrain model from a greyscale PNG image input. The program creates the necessary files for the model based on user input, while also resizing and reformating the given heightmap image to ensure compatability with Gazebo. (Based on this [tutorial](https://github.com/AS4SR/general_info/wiki/Creating-Heightmaps-for-Gazebo))

## Requirements

The program requires the following to function:
* [Gazebo](http://gazebosim.org/)
* [Pillow](http://pillow.readthedocs.io/en/3.0.x/index.html)
* [python-resize-image](https://pypi.python.org/pypi/python-resize-image)

Tested on Ubuntu 16.04 LTS with Gazebo 7.9

## Instructions

### Installation

Clone the repsitory into your `home/$USER/catkin_ws/src/` directory

### Terrain Generation

Place your heightmap image into your `Pictures` directory before running the program so that it can be found. This image should be a greyscale PNG.

In order for this program to work:

  1. The PNG should be a greyscale image without any alpha channels (ideally an unsigned 8-bit image, but the code should be able to convert other bit-size images to the proper format).
  2. The height and width (in pixels) of the PNG must be equal.

In the `gazebo_terrain` directory, run the program with:

```
./terrain_gen.sh
```

When running the program, it will first ask you for the name of your image; make sure that this is the same as the image in the `Pictures` directory but without the ".png"! You will then be asked to enter various information needed to fill out the configuration files, such as the menu name for the model, size, and other parameters.

Once the program is finished generating the files, open up Gazebo to test out your model. The name that you selected for the model should appear on the `Insert` menu bar.

### Deleting Models

Also included in this repository is `delete_model.sh`, a script that can look into the Gazebo model directory and interactively delete the user-selected directory, if it exists. Be careful to not delete default Gazebo models or anything you want to keep when using this!

Run it with:

```
./delete_models.sh
```

## Notes

* I have managed to get up to 8km x 8km terrains to spawn without issue on my computer
* The image output should be an 8-bit greyscale image. Conversion from 16-bit to 8-bit images are confirmed to work, but it should work with larger grayscales (this still needs to be tested).
* Based on [issues](http://answers.gazebosim.org/question/17984/heightmap-insertion-unsuccessful-with-gazebo-7/) [others](http://answers.gazebosim.org/question/16319/gazebo-700-crash-on-heightmap-insertion/) have been [having](https://github.com/MatthewVerbryke/gazebo_terrain/issues/1), it appears that you need Gazebo 7.9 or higher for heightmap insertion to work (may work with versions as low as 7.7).

## License

This program is licensed under the BSD 3-clause license, as presented in the LICENSE file

Program is Copyright (c) University of Cincinnati


text:
We call a fraction a / b a nice fraction, if a and b are 5-digit positive integers and all ten digits are used exactly once in a and b combined (leading zeros are possible).

For a given integer n find the number in nice fractions, that are equal to n.

### Example

For n = 22 the only nice fraction is 51678 / 02349, so the answer is 1.

[input] integer n

[output] integer

license: MIT


text:
2.20 - John Henry Thompson - Invent Your Future

[Yoga](../../../yoga.md) > [Patanjali's Yoga Sutras - A Comparison](../../patanjani.md) > [Book 2](../book-2.md) >

### 2.20

**द्रष्टा दृशिमात्रः शुद्धोऽपि प्रत्ययानुपश्यः ॥२०॥**
draṣṭā dṛśimātraḥ śuddho-'pi pratyaya-anupaśyaḥ ||20||

[\[RS\] 2.20 Only the true self (drashtu) sees; it is immutable, although seeing is based on accurate perception.](http://www.ashtangayoga.info/philosophy/yoga-sutra-patanjali/chapter-2/item/drashta-drishimatrah-shuddho-pratyaya-anupashyah/)

[\[JW\] 2.20 The Seer, who is nothing but \[the power of seeing\], although undefiled (cuddha), looks upon the presented idea.](http://books.google.com/books?id=YzFImjtOxUwC&pg=PA154&ci=149%2C216%2C739%2C61&source=bookclip)

[\[SS\]](http://www.amazon.com/Yoga-Sutras-Patanjali-Commentary-Satchidananda/dp/0932040381) 2.20  The Seer is nothing but the power of seeing which, although pure, appears to see through the mind.  \[p110\]

[\[EB\]](http://www.amazon.com/Yoga-Sutras-Patanjali-Translation-Commentary/dp/0865477361/ref=sr_1_1?ie=UTF8&s=books&qid=1250508322&sr=1-1) 2.20 The seer is merely the power of seeing; \[however,\] although pure, he witnesses the images of the mind. \[p222\]

[<Page 2.19](219.md)  [Page 2.21>](221.md)

(**द्रष्टा**, draṣṭā) = the seer; he who perceives; the true self; drashtu
(**दृशि**, dṛśi) = seeing; the seeing principle
(**मात्रः**, mātraḥ) = only
(**षुद्ध**, ṣuddha) = immutable; pure
(**अपि**, api) = although
(**प्रत्यय**, pratyaya) = accurate perception
(**अनुपश्यः**, anupaśyaḥ) = appears to see with; seeing is based on

gha_language: HTML

gha_license_id: MIT


text:
# Releasing

Each push to GitHub triggers a new GitHub Actions build using the maven-ci workflow.

To release, simply create a tag:

```
git tag -a v2023.06 -m "release v2023.06"
git push origin v2023.06
```

This triggers a new GitHub Actions build (maven-release workflow) using the tag as version number and creates a draft release with the release artifact attached.
On the releases GitHub page, you can edit the release notes, set the pre-release checkbox if applicable, and publish the release.

If you detected a problem and want to recreate the release, you can remove the draft release and create a new build by re-tagging it:

```
git tag -d v2023.06
git push --delete origin v20023.06
git tag -a v1.0.0 -m "release v2023.06"
git push origin v2023.06
```

repository: belgif/rest-guide

gha_language: CSS

repo_name: belgif/rest-guide


text:
# grunt-resize-crop [![Build Status](https://travis-ci.org/traviswimer/grunt-resize-crop.png?branch=master)](https://travis-ci.org/traviswimer/grunt-resize-crop)

> Make images a specific size without distorting the aspect ratio. Resizes as close as possible and crops the rest.

_This plugin is a wrapper for [resize-crop](https://github.com/traviswimer/resize-crop.js)_

## Getting Started
This plugin requires [Grunt](http://gruntjs.com/) `~0.4.4` -- [Learn to use Grunt](http://gruntjs.com/getting-started)

Install the plugin with this command:

```shell
npm install grunt-resize-crop --save-dev
```

Enable in your Gruntfile with:

```js
grunt.loadNpmTasks('grunt-resize-crop');
```

## The "resize_crop" task

In your project's Gruntfile, add a section named `resize_crop` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  resize_crop: {
    image_group: {
      options: {
        format: "jpg",
        gravity: "center",
        height: 200,
        width: 200
      },
      files: {
        'your/destination/directory': [
          'your/source/images/kittens.png',
          'your/source/images/puppies.jpg'
        ],
      },
    },
    other_images: {
      options: {
        height: 400,
        width: 400
      },
      files: {
        'your/other/destination/directory': [
          'your/source/images/image.png'
        ],
      },
    },
  },
});
```

## Options

### options.height

* REQUIRED OPTION
* Type: `integer`
* Description: Sets the height in pixels to be used for the output image.

### options.width

* REQUIRED OPTION
* Type: `integer`
* Description: Sets the width in pixels to be used for the output image.

### options.format

* Type: `String`
* Default: `"png"`
* Description: Sets the image type to output. Supporst any image format supported by [imagemagick](https://github.com/rsms/node-imagemagick)

### options.gravity

* Type: `string`
* Description: Determines the part of the image that will be removed during cropping. For example, `"center"` will try to keep the centermost part of the image and only remove the furthest edges.

## Files

Follows the format of:
```javascript
{
  "an output directory": ['image1', 'image2', 'image3']
}
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).


text:
ANLHideNavigationAndTabBar
==========================

A very ligth category of UIViewController that let hide the above and bellow bars when you use a UIScrollView subclass and dragging it.

![Example](http://ruralnerd.com/gitFtp/demoHideBars.gif)

##How to use it
Only import to your project ANLHideNavigationAndTabBar.h and .m and in your ViewController asing your UIScrollView subclass and enable the hidden flag, you can select the delay time in seconds to show the bars when the user end scroll. If you want disable the hide function, only set NO the hiddenEnable property.

**Enable**

	//Example
	-(void)viewWillAppear:(BOOL)animated {

    	[super viewWillAppear:animated];

    	[self setScrollViewInheritor:[self tableView]];
    	[self setHiddenEnable:YES];
    	[self setDuration:0];
	}

**Disable**

	[Self setHiddenEnable:NO];

You can change the delay when you want

**setNewDelay

	[self setDuration:3];

All feedback are wellcome.


text:
# Work
### An interactive story about work, truth, and life in the modern world.
This is an interactive multimedia story that may be viewed in a web browser.

## Reading the story
Extract the contents of `CWFinalProject.zip` to one directory. Ensure that `CWFinalProject.html` and the `Audio` folder are in the same directory.

Open `CWFinalProject.html` in a web browser. Google Chrome and Mozilla Firefox are both officially supported, but Firefox retains a few outstanding bugs so Chrome is preferred.

## Editing the story
The story must be edited and built (or rebuilt) with Twine.

**Tweecode dependencies**

* [Twine 1.4.2](http://twinery.org)

* [Sugarcube 2.12.0](http://www.motoslave.net/sugarcube/2/)

repository: runphilrun/CWFinalProject

repo_name: runphilrun/CWFinalProject


text:
1.

- To install Node on your machine, go to https://nodejs.org and click on the Download button. Depending on your computer's platform (Windows, MacOS or Linux), the appropriate installation package is downloaded.

2. Verifying the Node Installation?

node -v
npm -v

3.Initializing package.json

- npm init

  4.Install an NPM module, lite-server, that allows you to run a Node.js based development web server and serve up your project files. To do this, type the following at the prompt

  npm install lite-server --save-dev ` { "name": "git-test", "version": "1.0.0", "description": "This is the Git and Node basic learning project", "main": "index.html", "scripts": { "start": "npm run lite", "test": "echo \"Error: no test specified\" && exit 1", "lite": "lite-server" }, "repository": { "type": "git", "url"<EMAIL_ADDRESS>}, "author": "", "license": "ISC", "homepage": "https://bitbucket.org/jogesh_k_muppala/git-test#readme", "devDependencies": { "lite-server": "^2.2.2" } } ` npm start

license: ISC,MIT

repository: mametur/to-do-list

detected_licenses: ISC MIT

repo_name: mametur/to-do-list


text:
# ng2-handsontable

Native Angular2+ wrapper for [Handsontable](https://github.com/handsontable/handsontable).

[Handsontable](https://github.com/handsontable/handsontable) is a data grid component with an Excel-like appearance. Built in JavaScript, it integrates with any data source and comes with [features](http://docs.handsontable.com/tutorial-features.html) like data validation, sorting, grouping, data binding or column ordering. Actively supported by the Handsoncode team and the GitHub community.

- - -

## Quick start

1. Add ***ng2-handsontable*** to your package.json or install with `npm i ng2-handsontable --save`.

2. If you are using SystemJS, add the ng2-handsontable path to your SystemJS.config.js: `'ng2-handsontable': 'node_modules/ng2-handsontable/bundles/ng2-handsontable.umd.js'`. Webpack (used by Angular-CLI) picks up the path automatically.

3. Import the `HotTableModule` into your module. Here's a TypeScript example:

```typescript
import { HotTableModule } from 'ng2-handsontable';
...

@NgModule({
  ...
  imports: [
    HotTableModule
  ],
  ...
})
export class MyModule {
}
```

4. Use the `hot-table` component in your template. The following example displays the supported attributes:

```html
<hot-table [data]="data"
           [columns]="columns"
           [colHeaders]="colHeaders"
           [colWidths]="colHeaders"
           [options]="options"
           (HANDSONTABLE_EVENT)="eventHandler">
</hot-table>
```

- `data: any[]` - data source
- `pageData: Observable<any[]>` - observable data source for paged data
- `columns?: any[]` - descriptors of columns that contains information regarding type, format, source, ... of particular column
- `colHeaders?: string[]` - array of column headers, default column headers will be shown (or not be shown, it depends on other settings) if this parameter is undefined
- `colWidths?: number[]` - array of column sizes, default column size will be applied if this parameter is undefined
- `options?: any` - any of the [Handsontable options](http://docs.handsontable.com/pro/Options.html)
- 'HANDSONTABLE_EVENT' - all [Handsontable events](http://docs.handsontable.com/pro/Hooks.html#event:afterAddChild) are implemented as EventEmitters, e.g. `(beforeInit)="onBeforeInit"`.

The free version of Handsontable is used by default, but the pro-version could be used as a drop-in replacement.

5. The following methods are available as a public API on HotTableComponent (which you can access from your parent component with `@ViewChild(HotTableComponent) hotTableComponent`):
- `getHandsontableInstance(): Handsontable` - returns the underlying [Handsontable Core instance](https://docs.handsontable.com/Core.html); all registered Handsontable plugins are accessible via [instance.getPlugin()](https://docs.handsontable.com/pro/1.11.0/Core.html#getPlugin)
- `triggerOnChanges(properties: ('data' | 'options' | 'colHeaders' | 'colWidths' | 'columns')[])`- Call this function to trigger the OnChanges logic for any of the given input properties, in case they were changed partially,
rather than replaced by a new object. Angular would pick up the latter in ngOnChanges(), but not the former. For example, if another row has been added to the 'data' input array, call `triggerOnChanges(['data'])`.

6. See the [demo](http://valor-software.github.io/ng2-handsontable/) and the [demo sources](https://github.com/valor-software/ng2-handsontable/tree/master/demo/src) for further details.

## Troubleshooting

- ZoneJS < 0.8.20 was throwing an error because of [Handsontable's wrapping of the native Promise](https://github.com/handsontable/handsontable/issues/4452). If you are not able to update zone.js, you will need to import handsontable _before_ zone.js with `import 'handsontable'`. For an AngularCLI-project, the zone.js import happens in the `polyfill.ts` file.

Please follow this guidelines when reporting bugs and feature requests:

1. Use [GitHub Issues](https://github.com/valor-software/ng2-handsontable/issues) board to report bugs and feature requests (not our email address)
2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for your understanding!

## License

The MIT License (see the [LICENSE](https://github.com/valor-software/ng2-handsontable/blob/master/LICENSE) file for the full text)


text:
## Auto `unregprod`
Script that monitors last produced block time and unregisters producer in the event of failure to produce.

Clone the repo into your server's root:
```
git clone https://github.com/eon-llc/rem-utils
cd /root/rem-utils/auto-unregprod/
```

Install dependencies:
* [jq](https://stedolan.github.io/jq/) - command line json parser
```
sudo apt-get install jq -y
```

Make script executable:
```
sudo chmod +x auto-unregprod.sh
```

Edit config:
```
nano config.conf
```

Run:
```
./auto-unregprod.sh
```

repository: eon-llc/rem-utils

gha_language: Shell

repo_name: eon-llc/rem-utils


text:
# ReportMod
Report Modifier Proof Of Concept - Change Your Reports For Third Parties Without Rewriting The Dang Thing Again

**Purpose:**
	ReportMod is a tool that takes a single report, copies it, and modifies the copied report so that it can be handed to third parties. The modifications it does to the copied report are done to redact or obscure information.
	ReportMod does not destroy or modify the original report. Nor is this POC feature-complete or beta-ready; this POC is meant only to showcase the application and purpose of this tool. To this end, efforts have been made to ensure safety of the original reports over speed, unusual report structure and supporting non-intended workflows. This tool is NOT intended to stay in this state. I personally hope to support it for some time to come, fixing every edge-case I can and adding many, many more features as this project matures.

**Requirements:**

	Python 3.7+
	python-docx
	pillow
	Element Tree

**To Install**

	git clone https://github.com/ConchoPecan/ReportMod.git <desired homepath for cloned repo>
	cd <path to local ReportMod repo>
	pip3 install -r requirements.txt #Make sure you're install via python3, pip works if Python3 is your only install

**To Make an Executable in Windows**

	pip3 install pyinstaller
	>Ensure pyinstaller is in your path<
	cd <path to local ReportMod repo>
	pyinstaller -F ReportMod.py

**Supported File Formats:**

	Docx
	html
	Future Formats: PDF, doc, odt, xlsx, xls

**Usage:**
	ReportMod.py (--html | --docx) -i <ifile/ifolder> -o <ofile/ofolder> [-e regex] [-s redactedtext] [-b] [-t]

**Arguments:**

	--html		Input html folder Flag – If --docx is not chosen, this is necessary
	--docx		Input docx file Flag – If --html is not chosen, this is necessary
	-i		The name of the initial report - necessary
	-o		Name of output folder or file – necessary
	-e		Regex String to search for and replace - Optional
	-s		String to replace matches - Default is ***** - Optional
	-b		Blur all images of the report - Optional
	-t		Shrink all images of the report - HTML only right now – Optional

**Current POC Limitations**

**Limited Error Handling** – Error handling is not robust – this tool is not yet guaranteed for fitness of duty or for widespread release. In the beta, there will be planned Robust error handling, with all known current error messages and types documented and will be handled with a specialized error class and procedures at the release of the beta.

**Multiple optional flags** – Using multiple switches isn't yet efficient. You can use multiple switches for this proof of concept, but it relies on hacks and os processes to make it work, which is less than optimal.

**Word XML avoidance** – Right now, word's xml structures are largely left alone. This is currently being tackled, but it was determined to be too complex to be completely tackled before the POC. Indeed, some known issues are due to XML not being updated after images are modified. Current python libraries modify and change the xml only in certain ways, which means that to resolve these issues, word's xml libraries have to be manually loaded.

**No Auto-detection of input files** – docx and html files aren't automatically figured on the fly. You do have to specify what you are working with.

**No Config files** – Right now, to change what the program considers to be text files, code files, pictures or even picture sizes, you have to modify the source code. It is planned, yet not implemented, to have the tool read from configuration files to determine these things, as well as files/images to exclude.

**Upzipping is only done by scripting** – Right now, ReportMod supports unzipping both docx and html files... but only when using ReportMod as a library.

**No Doc, PDF, Odt and xlsx files are supported** – Regrettably, not all file types are yet supported. Doc files require separate libraries from docx files, so do xls and xlsx files. And pdfs... will require much more testing. While all these files are specified for the beta, they are not implemented or supported for the POC.

**No named groups for Regex** – In an announcement that'll surely annoy the one or two regex-nerds in the group (Hey fellow nerds!), named groups are not yet supported. This is a personal requirement.

**Reporting:**
	Even though this is just a POC, I am very interested in feedback. Please email me at<EMAIL_ADDRESS>if you run into any problems... even ones that you may suspect that I'm aware of. Chances are, you may be the first one to stumble on it. If you encounter any issues, please let me know. This allows me to update ReportMod not based on some personal goalposts but rather informed real world usage. I look forward to hearing from you!

repository: ConchoPecan/ReportMod

gha_language: Python

repo_name: ConchoPecan/ReportMod


text:
#"Sit on Chair" basic website project#
**"Sit on chair"** is simply a basic HTML&CSS exercise that consists in scripting a
.psd design. The basis has been provided by [Coders Lab](http://coderslab.pl).

#Licence#
"Sit on chair" is licensed under The MIT License (MIT).

#Inspiration#
The design has been provided by [Coders Lab](http://coderslab.pl) during the first
week of Front-End Development course.

#Feedback & Contribution#
Feel free to contribute to the project or tell me what could be done better. These
are my first steps so any kind of support is more than welcome!:bowtie:

In order to contribute please do the following:

1. Fork this repo
2. Create a new branch (git checkout -b branch-name)
3. Commit your changes (git commit -am "Comment/Description")
4. Push to the branch (git push origin branch-name)
5. Create new pull request


text:
---
layout: default
---

# 1997-09-09 - Re: A helluva way to run a country, er, a world

## Header Data

From: Bill Frantz<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e7684dfad8d9ddd5d690d3989aa6ac8f7b4521a82ac09180a045cdd7da83b129

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-09-09 07:01:58 UTC

Raw Date: Tue, 9 Sep 1997 15:01:58 +0800

## Raw message

```
{% raw  %}From: Bill Frantz<EMAIL_ADDRESS>Date: Tue, 9 Sep 1997 15:01:58 +0800
To<EMAIL_ADDRESS>Subject: Re: A helluva way to run a country, er, a world
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 9:41 AM -0700 9/6/97, Tim May wrote:
>But look on the bright side: the militias and other patriot groups are
>getting a huge bounce out of this. Stay far away from the nests of vipers.
>Jefferson's wisdom that we need a revolution every generation or so is
>apt...though it's been about 180 years too long.

I claim the overthrow of Jim Crow laws and the Vietnam war in the 1960s and
1970s were the last revolution.  We're right on schedule for the next one.
Civilization can be measured as the inverse of the blood shed during
revolutions.

-------------------------------------------------------------------------
Bill Frantz       | The Internet was designed  | Periwinkle -- Consulting
(408)356-8506     | to protect the free world  | 16345 Englewood Ave.
<EMAIL_ADDRESS>| from hostile governments.  | Los Gatos, CA 95032, USA

{% endraw %}
```

## Thread

+ Return to [September 1997](/archive/1997/09)

+ Return to "[Bill Frantz <frantz@netcom.com>](/authors/bill_frantz_frantz_at_netcom_com_)"
+ Return to "[Declan McCullagh <declan@pathfinder.com>](/authors/declan_mccullagh_declan_at_pathfinder_com_)"
+ Return to "[Jonathan Wienke <JonWienk@ix.netcom.com>](/authors/jonathan_wienke_jonwienk_at_ix_netcom_com_)"
+ Return to "["Peter D. Junger" <junger@upaya.multiverse.com>](/authors/peter_d_junger_junger_at_upaya_multiverse_com_)"
+ Return to "[Syniker@aol.com](/authors/syniker_at_aol_com)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1997-09-06 (Sat, 6 Sep 1997 23:07:12 +0800) - [Re: Political News from Wired News](/archive/1997/09/1a7c3f5685bb4e4e172b10b5493b0f6a9291d73cbb1dfe0e602c7e9b3167c89f) -<EMAIL_ADDRESS>  + 1997-09-06 (Sun, 7 Sep 1997 00:51:18 +0800) - [A helluva way to run a country, er, a world](/archive/1997/09/442b721b56de44b6a20bc039c6da88f4572beecbee8ae366a0890464c683ddf0) - _Tim May<EMAIL_ADDRESS>    + 1997-09-06 (Sun, 7 Sep 1997 03:01:09 +0800) - [Re: A helluva way to run a country, er, a world](/archive/1997/09/30584074775882953a4c8845acce29b7dae30a193ebad4b34fd561651649eb2b) - _"Peter D. Junger"<EMAIL_ADDRESS>    + 1997-09-07 (Mon, 8 Sep 1997 03:48:45 +0800) - [Re: A helluva way to run a country, er, a world](/archive/1997/09/33c63f8ccd4a7b6b4a4d88cdcd90ee862ecbb46f96c017a6e85e3c8a8697b184) - _Declan McCullagh<EMAIL_ADDRESS>    + 1997-09-09 (Tue, 9 Sep 1997 10:18:29 +0800) - [Re: A helluva way to run a country, er, a world](/archive/1997/09/8cb729d834dc19898d6cd7005d0f277d9691d86e84e3385571445da84964b07c) - _Jonathan Wienke<EMAIL_ADDRESS>  + 1997-09-09 (Tue, 9 Sep 1997 15:01:58 +0800) - Re: A helluva way to run a country, er, a world - _Bill Frantz<EMAIL_ADDRESS>


text:
This service is part of amazee.io Lagoon, a Docker build and deploy system for
OpenShift & Kubernetes. Please reference our [documentation] for detailed
information on using, developing, and administering Lagoon.

# Webhook Handler (`webhook-handler`)

The main Lagoon entrypoint for webhooks originating from other services. Every
incoming webhook is parsed and validated before being queued for processing
later.

Examples of webhooks Lagoon is interested in: GitHub/Bitbucket/GitLab repository
activity, Lagoon project environment backup events.

## Technology

* Node.js
* Message Queue

## Related Services

* API [***dependency***]
* RabbitMQ [***dependency***]
* webhooks2tasks [***related***]

## Message Queues

* Produces: `lagoon-webhooks`

## Testing

There is test data available from Postman. In order to use it, download
[Postman] and import the `lagoon-webhook-handler.postman_collection.json` as
collection, plus the `localhost.postman_environment.json` as environment. Now
you can send single requests to the webhook handler.

You can also run all tests from the CLI via newman

        yarn run newman:all

[documentation]: https://lagoon.readthedocs.io/
[Postman]: https://www.getpostman.com/

repository: uselagoon/lagoon-one

gha_language: TypeScript

repo_name: uselagoon/lagoon-one


text:
Add the oil and swirl to coat the bottom. When the oil is hot, add the onions, garlic, fermented black beans, chilies and scallion whites. Sauté until lightly caramelized, 4 to 5 minutes. Add the tamari sauce and deglaze the pot.  Add the lemon juice and season with salt and pepper. Simmer until the mixture has reduced by one-quarter, 45 to 60 minutes.
* Meanwhile, in a small bowl, combine the yogurt, scallion greens and lemon zest. Season with salt and pepper. Serve from the pot or transfer the chili to four individual serving bowls. Serve with yogurt on the side.

repository: tcmacdonald/recipes

gha_language: JavaScript

repo_name: tcmacdonald/recipes


text:
# Snap Collector Plugin - Apache Mesos

  1. [Contributing Code](#contributing-code)
    * [Vagrant development environment](#vagrant-development-environment)
  2. [Contributing Examples](#contributing-examples)
  3. [Contributing Elsewhere](#contributing-elsewhere)
  4. [Thank You](#thank-you)

This repository has dedicated developers from Intel working on updates. The most helpful way to contribute is by
reporting your experience through issues. Issues may not be updated while we review internally, but they're still
incredibly appreciated.

## Contributing Code
**_IMPORTANT_**: We encourage contributions to the project from the community. We ask that you keep the following
guidelines in mind when planning your contribution.

  * Whether your contribution is for a bug fix or a feature request, **create an [Issue][create-issue]** and let us know
   what you are thinking.
  * **For bugs**, if you have already found a fix, feel free to submit a Pull Request referencing the Issue you created.
  * **For feature requests**, we want to improve upon the library incrementally, which means small changes at a time. In
   order ensure your PR can be reviewed in a timely manner, please keep PRs small, e.g. <10 files and <500 lines
   changed. If you think this is unrealistic, then mention that within the issue and we can discuss it.

Once you're ready to contribute code back to this repo, start with these steps:

  * Fork the appropriate sub-projects that are affected by your change
  * Clone the fork to `$GOPATH/src/github.com/intelsdi-x/`

    ```
    $ git clone https://github.com/<yourGithubID>/<project>.git
    ```

  * Create a topic branch for your change and checkout that branch

    ```
    $ git checkout -b some-topic-branch
    ```

  * Make your changes and run the test suite if one is provided (see below)
  * Commit your changes and push them to your fork
  * Open a pull request for the appropriate project
  * Contributors will review your pull request, suggest changes, and merge it when it’s ready and/or offer feedback
  * To report a bug or issue, please open a new issue against this repository

If you have questions feel free to contact the [snap maintainers][snap-maintainers].

### Vagrant development environment
Included in this repo is a Vagrant development environment that provisions a single-node Mesos cluster for developing
and testing this plugin. To get started, you'll need to have:

  * VirtualBox: <https://www.virtualbox.org/wiki/Downloads>
  * Vagrant: <https://www.vagrantup.com/downloads.html>

Next, assuming that your current working directory is the root of this Git repository, simply run the following command:

```
$ vagrant up
```

The provisioning script will install Mesos, ZooKeeper, Go, and Snap. You can then connect to Mesos at the following
URLs:

  * Mesos master: <http://<IP_ADDRESS>:5050>
  * Mesos agent: <http://<IP_ADDRESS>:5051>
  * InfluxDB: <http://<IP_ADDRESS>:8083>
  * Grafana: <http://<IP_ADDRESS>:3000>

In order to launch a task on the cluster that you can then observe with Snap, try running the following command in a
separate terminal window / SSH session:

```
$ mesos execute --master="$(mesos resolve zk://<IP_ADDRESS>:2181/mesos)" \
    --name="PythonHttpServer" --command="python -m SimpleHTTPServer 9000"
```

## Contributing Examples
The most immediately helpful way you can benefit this project is by cloning the repository, adding some further examples
and submitting a pull request.

Have you written a blog post about how you use [snap](http://github.com/intelsdi-x/snap) and/or this plugin? Send it to
us!

## Contributing Elsewhere
This repository is one of **many** plugins in **snap**, a powerful telemetry framework. See the full project at
<http://github.com/intelsdi-x/snap>.

## Reporting Security Issues

The Snap team take security very seriously. If you have any issue regarding security,
please notify us by sending an email to<EMAIL_ADDRESS>and not by creating a GitHub issue.
We will follow up with you promptly with more information and a plan for remediation.
While we are not offering a security bounty, we would love to send some Snap swag your way along with our
deepest gratitude for your assistance in making Snap a more secure product.

## Thank You
And **thank you!** Your contribution, through code and participation, is incredibly important to us.

[create-issue]: https://github.com/intelsdi-x/snap-plugin-collector-mesos/issues
[snap-maintainers]: https://github.com/intelsdi-x/snap/blob/master/README.md#maintainers

repository: jamespitt/snap-plugin-collector-mesos

repo_name: jamespitt/snap-plugin-collector-mesos


text:
!!! warning
    This tutorial is currently under reconstruction! We'll let you know when its ready

This tutorial expands on the [Getting Started Tutorial](../quick-start/introduction.md) to introduce you to more advanced playbook development concepts. Specifically, you'll learn how to:

* Interact with humans using SOCless' Human Interaction Workflow and Slack Integrations
* Add branching logic to our State Machine using Choice
* Make our playbooks more legible using Pass States

In our Getting Started Tutorial, we wrote a playbook called "Investigate Login" that handled a "Suspicious Login" alert by:

1. Geolocating the Login IP to identify its country, latitude, and longitude
2. Posting a message containing that information to a #bat-signals channel in Slack

In this tutorial, we'll expand that playbook to:

3. Prompt a user to confirm or denounce the login activity via Slack message buttons
4. Request more details on the activity via a Slack interactive dialog
5. Notify the user of the actions that will be taken based on their response

The workflow for the playbook we'll create in this tutorial is shown below

[diagram coming soon]

Let's start by deploying SOCless Slack, which contains the integrations we'll use in this tutorial

repository: twilio-labs/socless

repo_name: twilio-labs/socless


text:
# ETdynTs
## Dynamic Trees through Euler tours under the functional programming setting.

Euler-tour trees answer  the query "are these two nodes connected?" for a forest of unrooted trees. Also permit to **_link_** two nodes provided the nodes belong to different components in a forest and **_cut_** an edge where the nodes involved are members of the same component within a forest.

We also present in this repository the work in progress for publication regarding dynamic trees through Euler-tours

We accompany every operations and some details throught the Haskell programming language

repository: jcsaenzcarrasco/ETdynTs

repo_name: jcsaenzcarrasco/ETdynTs


text:
---
layout: default
---
# Law of Retribution - Volt

![Volt](http://i.imgur.com/jByK7z8.png)

King of speed, Volt is a very versatile frame and widely used not only in normal runs but also speedruns. Not only can he make the raid go a lot faster, but his unique abilites allow him to buff his allies damage considerably and also CC the enemies (albeit smaller range of CC than Rhino and Vauban).

* * *

## Recommended build

![Volt recommended build](http://i.imgur.com/xWjefkj.jpg)

The Arcane Storm and, to a lesser extent, Arcane Pulse helmets are a nice addition to this build but are by no means required.

## Budget build*

![Volt budget build](http://i.imgur.com/SjyjhJp.png)

[Link to budget build](http://warframe-builder.com/Warframes/Builder/Volt/t_30_0300020020_4-2-5-5-3-5-6-6-5-7-1-5-12-5-7-14-4-5-34-8-5-57-0-5_57-15-7-5-4-9-5-9-14-9-12-7-6-11-f-f-34-5-f-f_0/en/1-0-21)

*_budget build means no forma, no primed warframe, no primed mods, no event or Baro Kit'eer mods, and no mods over rank 8_

* * *

## Role: Support and, if you have Volt Prime, bomb carrier.

## Build notes

* Strength is the main stat here, as it increases the speed and (if you have Shock Trooper) damage buffs that your team will receive.
* A higher Range makes it easier to speed up the whole team in fewer casts.
* More Duration will make your buffs last longer, but is not as important as strength or range since all of them can be refreshed by casting them again.
* Primed Flow gives Volt Prime a huge energy pool, making him one of the best bomb carriers.

## Tactics

* Make sure that everyone in your team always has Speed, and don't be afraid to recast.
* Electric Shields can block any source of damage, including bomb explosions. Use them to protect yourself from enemy fire during the Hijack section, and always remember to drop one parallel to the ground near and facing the injector so that the carriers can safely shoot a fully charged battery.
* Electric Shields can also boost the whole team's damage output, and can be stacked to kill Vay Hek more quickly.
* Discharge is useful as emergency CC, but can also kill enemies easily with high Strength. Make sure not to deprive your EV Trinity of targets.

## Alternative Builds

![Volt alternative build](http://i.imgur.com/80ilckX.jpg)

You can replace Rush with Shock Trooper to further boost your teammates' damage and help them kill priority targets or the final boss.


text:
---
layout: post
title: "Active Storage, startless range in queries, SMS links and more!"
categories: news
author: repinel
published: true
date: 2019-07-20
---

Hello! This is [Roque](https://twitter.com/repinel) bringing the latest news from the Rails community. It's been awhile so let's see what has changed since then... Oops, since last week 😜

### [Preserve existing attachment assignment behavior for app upgraded to Rails 6.0](https://github.com/rails/rails/pull/36716)

Assigning a collection of attachments appends to the collection as it did in 5.2. Existing 5.2 apps that rely on this behavior will no longer break when they're upgraded to 6.0.
For Apps generated on 6.0, assigning replaces the existing attachments in the collection. `#attach` should be used to add new attachments to the collection without removing existing ones.

### [Support startless ranges in queries](https://github.com/rails/rails/pull/36696)

Add support to [startless ranges](https://bugs.ruby-lang.org/issues/14799) (_e.g._ `..10` and `..Date.today`), introduced by [Ruby 2.7.0-preview1](https://www.ruby-lang.org/en/news/2019/05/30/ruby-2-7-0-preview1-released/), to Active Record queries. This enables expression like `Order.where(created_at: ..1.year.ago)`.

### [Helper method to create an SMS link](https://github.com/rails/rails/pull/36511)

When the users click the SMS link, their messaging app opens with the phone number and optional message body set in the link.

### [Superclass for aborted queries](https://github.com/rails/rails/pull/36694)

The class `ActiveRecord::QueryAborted` makes it possible, for example, to rescue all possible query timeouts without rescuing other query exceptions.

### [Add `--skip-collision-check` option to the Rails generator](https://github.com/rails/rails/pull/36603)

This allows the generator for 6.0 to behave like it used to in 5.2, and overwrite files.

[18 people](https://contributors.rubyonrails.org/contributors/in-time-window/20190716-20190720) contributed to Rails in the last week. Want to see your name on that list? Check out the list of [issues](https://github.com/rails/rails/issues) here.

Until next time!

repository: rails/weblog

branch_name: refs/heads/gh-pages

extension: markdown

repo_name: rails/weblog


text:
# Bumper Cars!

Bumper Cars is a 2D video game where you use your keyboard to control a bumper car with the intent to be the first to perform three laps around a track or capture a flag three times, depending on the map.  It has multiplayer support for both local and remote players (up to 4) because it just would not be fun to be the only person driving a bumper car.

My friend Chris and I did this for our college senior project in 2001.  It was written in C++ and Visual Basic, targeted for the Windows platform and leveraged DirectX 6.

# Game Play

When a player starts the game, they are given a menu with some options to configure their experience.

They are able to choose their car color, the track (we had many! oooh!) and whether or not they wanted to play against other players.  We did not have any AI players so if you chose not to play against anyone you were on a track by yourself.  Guaranteed winner!

The multiplayer logic would essentially create or join a game play session with other people. Once sessions were created, colors chosen (with a very nifty 3D car selection screen if I do say so myself), and map chosen, the map track would display with all participating players line up and the countdown to start would begin.

Using only UP, DOWN, LEFT and RIGHT keys, players would try to race around the track avoiding both each other and obstacles.  Upon hitting any player or part of the track boundaries/obstacles, the players cars would bounce back and cause them to slow down considerably.  If you bumped into something too many times, your car would eventually explode and you would respawn at the starting line.

There were periodic "power ups" that appeared on the maps from time to time.  It was either dynamite or a health kit.  Hitting dynamite would not bump you backward but would increase  your car damage. Hitting the healthkit would reverse your damage and make you more durable.
Too many dynamites and.. you would explode.  Really, what do you expect driving over lit dynamite?

# Goal

There were two styles of play depending on the map.  The maps with the checkered lines were for racing around and completing three laps to win.  Maps without the lines were a 'capture the flag' type scenario.  A flag would randomly spawn on the map and players would race to be the first one to drive over it.  Three captures and you win.

  We had the classic asphalt map where you race around a junk yard:

We had a sandy beach that I now realize looks like a weird face:

We even had a Thanksgiving themed map because this was written in the fall of 2000:

And finally a molten metal map because I had a lot of nifty textures to use in Photoshop.

# Collisions

To set the boundaries and have the cars collide with stuff, each car and map had a 'mask' that we loaded behind the scenes.  As each car's position updated, I would check if any portions of the car mask and map mask had overlapped and if so, raise a collision event on that car or cars.

# Graphics

Most of the graphics were created by us using either Photoshop or Bryce 3D.  Art is a necessary evil in small game development and we tried our best.

# Building The Game

Unfortunately I doubt this project is in a very buildable state.  I did not try before posting everything since that was not my purpose.  I put this code up to preserve it and provide a starting point for anyone that wanted to try building or learning about DirectX/DirectPlay techniques from the days of yore.  I did include an executable in case anyone wanted to try their luck.  Not sure it will run since we built it for Windows XP!

repository: rudotim/bumpercars

repo_name: rudotim/bumpercars


text:
# ImmediateTestFeedback

![Dark Mode Screenshot](https://user-images.githubusercontent.com/5360508/109427413-9a238e00-79f2-11eb-952e-d013427b19eb.png)

This repo serves as the starting point for installing and
tweaking the `ImmediateTestFeedback` Prototype build inside
the PLCTE seminar at the software architecture chair of the Hasso-Plattner-Institute.
[This screencast demonstrates the functionality.](https://vimeo.com/512282859/04ed6920bd)

# Introduction
Changing software without correctly understanding it often leads to confusion, as developers do not understand how the change corresponds to the new observed behaviour of the system.
Today, many software systems are equipped with a test suite.
Test suites document code and give feedback on changed program behaviour.
We explored ways to use test suites for software comprehension. We implemented a tool that provides additional visualization and gives immediate feedback on software changes.
Information about changes in the software and their implications to the test suite are collected using mutation testing. The tool uses this information to present relevant test cases for developers, and additionally prioritize test executions for immediate feedback.

This system uses mutation testing data to present relevant test cases for developers and additionally prioritize test executions for immediate feedback.

# Setting Up The Prototype
The prototype system consists of several parts:
* [TestingPlugin](https://github.com/XPerianer/TestingPlugin) - The plugin that integrates and visualizes tests into Visual Studio Code
* [TestingBackend](https://github.com/XPerianer/TestingBackend) - The backend that provides the plugin with the necessary information.
* [pytest-immediate](https://github.com/XPerianer/pytest-immediate/) - The plugin for pytest that enables immediate response times for failing tests and test reordering

## Installation Steps
1.  Clone the repository you want to get immediate test feedback during development.
    Examplatory, we will use flask.
    (The version is pinned to make sure that all test run through with this concrete setup. Unfortunatley, currently flask uses dependencies for its tests on the master branches of other repos like Werkzeug. This makes the setup really flaky.)
    ```
    git clone https://github.com/pallets/flask.git
    git checkout e0d7d402
    ```
    The required datasets for the flask repository are already present in the TestingBackend repository, which simplifies the setup. See [Using Custom Data](https://github.com/XPerianer/ImmediateTestFeedback#Using-Custom-Data) for more information.
1.  Create a virtual environment that can run the test using `pytest`
    Example for flask:
    ```
    cd flask
    python -m venv venv
    . venv/bin/activate
    pip install -e . -r requirements/dev.txt
    ```
    A run of pytest should now complete without errors.
1. Clone this repository including all submodules.
    ```
    git clone --recurse-submodules https://github.com/XPerianer/ImmediateTestFeedback
    ```
1.  Install `pytest-immediate` into the flask virtual environment.
    ```
    cd flask
    . venv/bin/activate
    cd ../pytest-immediate
    pip install . -r requirements.txt
    ```
    If you now call pytest in the flask folder, it should mention `immediate` under plugins.
1.  Install and start the Backend:
    ```
    cd TestingBackend
    ```
    and follow the instructions [in the TestingBackend repository](https://github.com/XPerianer/TestingBackend)
1.  Install and start the Frontend:
    ```
    cd TestingPlugin
    ```
    and follow the instructions [in the TestingPlugin repository](https://github.com/XPerianer/TestingPlugin)

## Datasets
The relevancy data, as well as the prediction model for predicting failing tests can be customized to other repositories.

For the installation steps, we used the standard data which is already included in the TestingBackend repo.

## Using Custom Data
There are two different datasets needed for the prototype:
*   The mutation testing dataset
*   The Prediction Model

### The Mutation Testing Dataset
The mutation testing dataset can be generated by [Mutester](https://github.com/XPerianer/Mutester). The Mutester repo also has additional information on setup requirements and optional parameters.

Based on the mutation testing dataset the prediction model is generated, that can be loaded by the TestingBackend.
This gives the possibility to quickly try out different predictor models.
It also enables use other embeddings than TSNE for the visualization of tests.

### The Predictor Model
Given the mutation testing dataset the necessary files can be generated by using the [preprocessing jupyter notebook](preprocessing.ipynb).
Its dependencies can be installed in a virtual environment with these commands:
```
python -m venv venv
. venv/bin/activate
pip install -r requirements.txt
```
Now the notebook can be run
```
jupyter notebook preprocess.ipynb
```
Follow it to create the necessary files, that can then be inserted into the TestingBackend.

repository: XPerianer/ImmediateTestFeedback

branch_name: refs/heads/main

repo_name: XPerianer/ImmediateTestFeedback


text:
---
layout: post
title:  "Ruby Command Line Argument"
date:   2016-07-17 15:52:48 -0400
---

07.17.2016

Ruby Command Line Argument

We have all used command line arguments one way or the other if have ever properly used the terminal.  In fact, bash commands are filled with commands with arguments.  For example:

	cd ../to/some/path

*in this case, ‘../to/some/path' is the argument for the cd command*

	cp file1.txt file2.txt

*file1 is the first argument and fil2 is the second argument*

Even a simple command like ‘ls’ can take arguments as well.

	ls -la

*-la stands for Lists All files,including the hidden files*

We take nice things for granted all the time.  Imagine the world without command line arguments so we can realize its importance.  Without arguments, all the commands we use in bash has to be user interactive, meaning, it will ask for user to prompt in inputs every time.

	~$ cd
	~$ Where would you like to go? ../to/some/path
	~../to/some/path$

This is actually not that bad, try the *mv* command to move files around

	~$ mv
	~$ Which file do you want to move?  ../some/path/file.txt
	~$ Choose your destination: ./file1.txt

It would be really annoyed if you have made a typo at “*Choose your destination:*” because then you will have to go through it again from the beginning.

The easiest way to understand command line argument is to treat the command itself like a function or a method.  If you have ever written or programmed before, it is basically the same idea.

	def some_method( arg1 , arg2 )
	   #some code here
	end

The only difference I can think of is that a method or a function has a limited number of arguments which the user can define.  Whereas the command line arguments has no limitations.  Although the program may accept an array of arguments, the programmer can set a limit to the program.  In other words, the command line argument is simply an array of **string** that the user inputs whenever they run the program.

Most of the programming language such as Java, Python, Perl, and even Ruby, the first argument will be will be saved in the array with the index of 0.  However, there are exceptions. Programming language such as C/C++ will save the name of the program as the first argument by default.  It means when you use the array of arguments in C/C++, array index of 0 will return the name of the program.

### Using Command Line Arguments in Ruby:

A simple way to obtain the array of arguments in Ruby is to simply use the default constant ARGV, this array may be empty if the user did not provide any.  Another way to access the argument array is ARGF.argv.  (*ARGF is a whole different topic which contains extra functionalities such as STDIN and more*) Please keep in mind that the type of the array is an array of **String** by default.  You may convert it to integer or float if mathematical computation is required.

### Let’s see a live code example in Ruby:

	#sums up all the integers

	#user input validation omitted

	if ARGV.empty?
		sum = 0
		input = ""
		loop do
			print "Enter your number or 'exit' to quit: "
			input = gets.strip
			break if input == "exit"
			sum += input.to_i
		end
		puts "Sum is: " + sum.to_s
	else
		puts "Sum is: " + ARGV.inject(0){|total,x| total+=(x.to_i)}.to_s
	end

The program first checks if the ARGV array is empty by using the #empty? method.  You may also use the other array method from the Array class.  If the array is empty, then it goes into the section with user interaction:

![user interactive](https://raw.githubusercontent.com/irevived1/img-dump/master/tty-1.gif)

	sum = 0
	input = ""
	loop do
		print "Enter your number or 'exit' to quit: "
		input = gets.strip
		break if input == "exit"
		sum += input.to_i
	end
	puts "Sum is: " + sum.to_s

It takes this many lines to perform a program with user interactive functions.
Whereas a program with command line arguments, it only takes this one line to get the job done:

	puts "Sum is: " + ARGV.inject(0){|total,x| total+=(x.to_i)}.to_s
 *User input validation omitted*

![commandline](https://raw.githubusercontent.com/irevived1/img-dump/master/tty-2.gif)

Awesome right?  Use ARGV when you can!  Let’s all live inside the terminal.

-revived1

##### source: http://ruby-doc.org/core-1.9.3/ARGF.html#method-i-argv


text:
# Chrome-Plugin-for-hiding-eight-blocks-in-new-tab
I could not agree with the UI design in new tab, especially the eight blocks. We have to figure out some methods to solve it. Never bear it.

This one looks much better.
![image](https://github.com/max-yeah/Chrome-Plugin-for-hiding-eight-block-in-new-tab/blob/master/new%20tab%20page.PNG)

# Description

<u>This plugin could hide:</u>

1. navigation bar

2. search bar

3. Google logo

4. 8 blocks

You could customize them in "Option".

![image](https://github.com/max-yeah/Chrome-Plugin-for-hiding-eight-block-in-new-tab/blob/master/options.PNG)

![image](https://github.com/max-yeah/Chrome-Plugin-for-hiding-eight-block-in-new-tab/blob/master/optional.png)

# Installation in Chrome (Chrome 56)

1. Open the extension page in preference.
2. Click the "developer mode".
3. Drag the whole folder into the page.
4. Done!

# Statement

1. Chrome Version specific

   This plugin could not work in the latest chrome version. After my tests, It could perfectly work in Chrome 56. You can download the version 56 chrome in the link below and disable the chrome auto-update (Search it in google! I'm sure it's easy. ).
   + [Mac](http://google-chrome.en.uptodown.com/mac/old)
   + [Windows 64 bit](https://github.com/max-yeah/Chrome-Plugin-for-hiding-eight-block-in-new-tab/releases/download/v1.0/Chrome.56.-64.bit.Windows.rar)
   + [Linux-support Ubuntu & Debian](https://github.com/max-yeah/Chrome-Plugin-for-hiding-eight-block-in-new-tab/releases/download/v1.0/Chrome.56.-linux.support.Debian.Ubuntu.rar)
   + [Linux-support Fedora & openSUSE](https://github.com/max-yeah/Chrome-Plugin-for-hiding-eight-block-in-new-tab/releases/download/v1.0/Chrome.56.-linux.support.Fedora.openSUSE.rar)

2. The codes of this plugin is not fully original. I adopt them from two resources:

   - Hide the Most Visited pages in Chrome's New Tab page - (HMVPNT)

     https://github.com/claudiosanches/chrome-hide-most-visited

   - Hide Most Visited Pages Reloaded (3.1.1 version) - (HMVPR)

     https://github.com/superevilmegaco/Hide-Most-Visited-Pages-Reloaded

   Thanks to their wisdom!

   The HMVPR plugin works quite well in the 3.1.1 version but it will auto update to 6.0.0 version which works worse; the HMVPNT plugin only has limited function but will not have annoying update. Thus, I want a plugin which has the former 3.1.1 version plugin's function and NO AUTO UPDATE!!!


text:
[![Build Status](https://travis-ci.org/geggleto/circuit-breaker-js.svg?branch=master)](https://travis-ci.org/geggleto/circuit-breaker-js)

# circuit-breaker-js

This package implements the Circuit Breaker pattern. Circuit breakers are useful for stopping and raising events/notifications about system problems. In complex distrubuted applications it is hard to gracefully handle remote dependent failures.

# Services

The breaker allows you to register multiple "services". The states of each service are held in memory

Each service has 5 properties.
  - State
  - Retry Threshold (milliseconds)
  - Failure Threshold
  - Tripped Handler
  - Failure Counter

# Process Flow
  To use the breaker, you simply register your services and execute code via the .try(service, callback) method.
  Your callback should return either TRUE for success, or FALSE in the even there was a problem.
  try will return a boolean value representing the success or failure of the callback.

  When the Failure Threshold is hit, the following will happen.

- The breaker will go from CLOSED ==> OPEN
- If a handler is present, it will be excuted.
- A timer basd on Retry Threshold will be executed
    - This will set the breaker from OPEN to RETRY
    - The fail count remains at maximum. The system will now execute one more request through the breaker
    - Upon success the failcount will return to 0 and the state will be RETRY ==> CLOSED
    - If the next request fails, then the process will repeat until it is successful.
    - ***PLEASE NOTE THAT THE TRIPPED HANDLER WILL BE EXECUTED EACH TIME THE BREAKER IS RESET TO "RETRY"***

# Example Breaker Usage

```js
var breaker = require('circuit-breaker-js');

breaker.registerService('MyService', 100, 5000); //100 fails, 5 seconds

breaker.registerHandler('MyService', function () {
  //I should alert someone with this code
});

var result = breaker.try('MyService', service.action());
```

repository: geggleto/circuit-breaker-js

repo_name: geggleto/circuit-breaker-js


text:
---
id: 3uQtk3MF5umGi2KWuUoKIi
title: HLTH 2018 The Future of Healthcare—Las Vegas
slug: hlth18-future-of-healthcare-vegas
date_start: '2018-05-06T00:00-06:00'
date_end: '2018-05-09T00:00-08:00'
hide_after_date: '2018-07-30'
tags: []
event_tags:
  - Conferences
  - Presentations
event_logo: /assets/general/events/HLTH_Logo_Blue_Event_2017_sm.png
summary: >-
  HLTH will cover innovation in healthcare that is driving substantial reduction
  in costs and dramatic increase in quality.
event_related_people:
  - 1gpUmvd6yuOKUIUIY620i0
discovery_topic: discovery_topic/healthcare-cloud
event_location:
  lon: -115.17817030000003
  lat: 36.1069373
---
Join Datica's CEO Travis Good at the inaugural _HTLH: The Future of Healthcare_ conference May 6-9 in Las Vegas. This event will feature over 350 CEOs and Founders bringing together health IT startups and major health systems to focus on innovation. [Travis is a featured speaker at the conference.](https://hlth.co/speakers/travis-good-md/)

[Contact our sales<EMAIL_ADDRESS>to book a 1:1 meeting with one of our team members before the event. Meet to see how Datica can help with your global digital health expansions or problems.

[Click here to register for HLTH](https://hlth.co/registration/).

gha_language: PHP


text:
bootstrap-webpack
=================

bootstrap package for webpack.

This is the `less` version. If you are looking for the `sass` version, refer to [bootstrap-sass-loader](https://github.com/justin808/bootstrap-sass-loader).

Usage
-----

Bootstrap use some fonts. You need to configure the correct loaders in your `webpack.config.js`. Example:

``` javascript
module.exports = {
  module: {
    loaders: [
      // the url-loader uses DataUrls.
      // the file-loader emits files.
      {test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/font-woff'},
      {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream'},
      {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file'},
      {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml'}
    ]
  }
};
```

Bootstrap javascript components depends on jQuery. This uses `imports-loader` of webpack. Install [imports-loader](https://github.com/webpack/imports-loader) by `npm install imports-loader --save-dev`.

### Complete Bootstrap

To use the complete bootstrap package including styles and scripts with the default settings:

``` javascript
require("bootstrap-webpack");
```

### Custom configuration

You can configurate bootstrap-webpack with two configuration files:

* `bootstrap.config.js`
* `bootstrap.config.less`

Add both files next to each other to your project. And:

``` javascript
require("bootstrap-webpack!./bootstrap.config.js");
```

Or simple add it as entry point to your `webpack.config.js`:

``` javascript
module.exports = {
  entry: [
    "bootstrap-webpack!./bootstrap.config.js",
    "your-existing-entry-point"
  ]
};
```

### Using with other js loaders.

If you are using other loaders for all js files`(test: /\.js$/)`, this might interfere with bootstrap-webpack.
You can override the configuration loader order in the module request to suit special cases.

* adding ! to a request will disable configured preLoaders
``` javascript
require("!bootstrap-webpack!./bootstrap.config.js")
```
* adding !! to a request will disable all loaders specified in the configuration
``` javascript
require("!!bootstrap-webpack!./bootstrap.config.js")
```
* adding -! to a request will disable configured preLoaders and loaders but not the postLoaders
``` javascript
require("-!bootstrap-webpack!./bootstrap.config.js")
```

Check details in [`webpack loader order`](https://webpack.github.io/docs/loaders.html)

You can also change your configuration, so that other loaders are not applied to bootstrap.

1. Use `exclude` option of the module.loaders section of the config.
2. Adjust the regex in `test` option of the module loaders to prevent matching all the js files to which the loaders are applied.

See the explanation of different module options under [`module.loaders`](http://webpack.github.io/docs/configuration.html)

#### `bootstrap.config.js`

Example:

``` javascript
module.exports = {
  scripts: {
    // add every bootstrap script you need
    'transition': true
  },
  styles: {
    // add every bootstrap style you need
    "mixins": true,

    "normalize": true,
    "print": true,

    "scaffolding": true,
    "type": true,
  }
};
```

#### `bootstrap.config.less`

Write less code. I. e. overwrite the default colors or sizes.

Example:

``` less
@font-size-base:          24px;

@btn-default-color:              #444;
@btn-default-bg:                 #eee;
```

### extract-text-webpack-plugin

Configure style loader in `bootstrap.config.js`.

Example:

``` javascript
module.exports = {
  styleLoader: require('extract-text-webpack-plugin').extract('style-loader', 'css-loader!less-loader'),
  scripts: {
    ...
  },
  styles: {
    ...
  }
};
```

Install `extract-text-webpack-plugin` before using this configuration.

### extract-text-webpack-plugin and postcss-loader

Configure style loader in `bootstrap.config.js`.

Example:

``` javascript
module.exports = {
  styleLoader: require('extract-text-webpack-plugin').extract('style-loader', 'css-loader!postcss-loader!less-loader'),
  scripts: {
    ...
  },
  styles: {
    ...
  }
};
```

Install `extract-text-webpack-plugin` before using this configuration.


text:
# text_tree

Simple tool to visualize text trees in Python.
Developed in Python 3.6.

## Installation notes
text_tree uses spacy to segment sentences and words, ete3 to build and visualize trees, and matplotlib for colours.

## Usage

```python
from text_tree import text_tree
texts = ['Sentence one starts with the same word as sentence two. Sentence two continues a bit differently. Sentence two is also shorter. Last sentence does not meet criteria for root word.']
t, s = text_tree.draw_tree(texts, [{'LOWER': 'sentence'}], 'simple_example.png')
```

![Simple example](test/simple_example.png)

```python
from text_tree import text_tree
texts = ['Tree can also be reversed. The root word will be positioned on the right when tree is reversed. Currently, punctuation in the end of the sentences is disregarded when tree orientation is reversed.']
t, s = text_tree.draw_tree(texts, [{'LOWER': 'reversed'}], 'simple_example_reversed.png', reverse=True)
```

![Reverse example](test/simple_example_reversed.png)

```python
from text_tree import text_tree
texts = ['Tree can also be reversed. Tree root word will be positioned on the right when tree is reversed. Currently, punctuation in the end of the sentences is disregarded when tree orientation is reversed.',
'Tree nodes can be highlighted. Tree nodes can have annotations indicating their source/reference.']
t, s = text_tree.draw_tree(texts, [{'LOWER': 'tree'}], 'simple_example_highlights_refs.png', highlights=['tree', 'can', 'revers'], doc_refs=['first document', 'second document'])
```

![Highlight and refs example](test/simple_example_highlights_refs.png)

```python
from text_tree import text_tree
import textacy.datasets

ds = textacy.datasets.IMDB()
ds.download()
texts = []
refs = []
for i, record in enumerate(ds.records(limit=30)):
    texts.append(record.text.replace('\n', ''))
    refs.append('{} {}'.format(record.meta['movie_id'], i))

text_tree.draw_tree(
    texts,
    [{'LOWER': 'i'}],
    output_file='IMDB_tree.png',
    doc_refs=refs)
```

![IMDB example](test/IMDB_tree.png)

## Current issues
Text clean-up is not robust, input text should already be cleaned (e.g., \n removed, etc.).

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


text:
# Application Notes
All app notes and reference docs:

### Design Notes

1. RAM Notes:
* Bit swapping is useful to simplify the layout. To improve length matching by swapping suitable pins
* Bit swapping works only for Datalines (DQ) not the Addresslines (A)
* DDR Routing Bank group
* DDR strobe signal
* Some pins (lower) cannot be swapped due to JEDEC standard 21C?
* Pins can be swapped only within the nibble
* All command and adress signals *must not be swapped*.

### Reference Docs

1. [Getting started with STM32MP151, STM32MP153
 and STM32MP157 line hardware development](https://www.st.com/resource/en/application_note/an5031-getting-started-with-stm32mp151-stm32mp153-and-stm32mp157-line-hardware-development-stmicroelectronics.pdf)
 2. [STM32MP1 Series DDR memory
routing guidelines](https://www.st.com/resource/en/application_note/dm00505673-ddr-configuration-on-stm32mp1-series-mpus-stmicroelectronics.pdf)
3. [Advanced Design System Simulation:
A New Methodology for Next-Generation DDR4](https://www.keysight.com/in/en/assets/7018-07118/application-notes/5992-0816.pdf?success=true)
4. [DDR configuration on STM32MP1 Series MPUs](https://www.st.com/resource/en/application_note/dm00505673-ddr-configuration-on-stm32mp1-series-mpus-stmicroelectronics.pdf)

path: /Application Notes/README.md


text:
# Is It Good? - built by Richard Booth ([Rixcy](https://github.com/Rixcy))

### A Simple But Powerful Rating Website

Built with the purpose of providing a platform in which you can rate/review items such as movies, tv shows, restaurants, books etc.

## License

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

![screen shot 1](https://user-images.githubusercontent.com/11819124/35161640-b1229734-fd38-11e7-977d-6f878adfecdd.png)

repository: Rixcy/isitgood

gha_language: Ruby

repo_name: Rixcy/isitgood


text:
This demos the ProseObject format for the Definition and the License.  A few notes:

The license is renamed "License.md", dropping the "Open Weights" part as redundant, removing spaces as inconvenient, and making the .MD lowercase for consistency.

To see these ProseObject versions rendered, go to http://www.commonaccord.org/i.php?v=l&f=G/Open-Weights/Pr0b/.

repository: CommonAccord/Cmacc-Org

repo_name: CommonAccord/Cmacc-Org


text:
---
layout: pub-link
title: "Deformation of extremal black holes from stringy interactions"
modified:
categories: pubs
excerpt: "Finding the shape of extremal black holes in beyond-GR theories"
tags: [general relativity, gravity, black holes, perturbation theory, symmetry, group theory, beyond-GR, Chern-Simons, Gauss-Bonnet]
pub:
  authors: "Baoyi Chen and Leo C. Stein"
  doi: "10.1103/PhysRevD.97.084012"
  arXiv: "1802.02159"
  jref: "Phys. Rev. D <b>97</b>, 084012 (2018)"
date: 2018-02-08
---

![]({{ site.url }}/images/DeltaV-u.png)
{: .align-right style="width: 350px"}
> Black holes are a powerful setting for studying general relativity
> and theories beyond GR. However, analytical solutions for rotating
> black holes in beyond-GR theories are difficult to find because of
> the complexity of such theories. In this paper, we solve for the
> deformation to the near-horizon extremal Kerr metric due to two
> example string-inspired beyond-GR theories:
> Einstein-dilaton-Gauss-Bonnet, and dynamical Chern-Simons theory. We
> accomplish this by making use of the enhanced symmetry group of NHEK
> and the weak-coupling limit of EdGB and dCS. We find that the EdGB
> metric deformation has a curvature singularity, while the dCS metric
> is regular. From these solutions we compute orbital frequencies,
> horizon areas, and entropies. This sets the stage for analytically
> understanding the microscopic origin of black hole entropy in
> beyond-GR theories.

repository: duetosymmetry/web-site

branch_name: refs/heads/customization

gha_language: Mathematica

repo_name: duetosymmetry/web-site


text:
## Python Patching

Unfortunately, Infra has to make some changes to Python to get it to statically
compile.

If the patches don't land, you can manually apply them by running the `git am`
command:

```sh
export TAG=refs/tags/v2.14.1
export TPP_PATCHES=/path/to/this/dir
git clone https://chromium.googlesource.com/external/github.com/python/cpython
git fetch origin $TAG
git checkout -b patch FETCH_HEAD
git am --reject $TPP_PATCHES/*.patch

# If the patches fail to apply, you can resolve the problems, add the results to
# the current commit, and continue. Repeat until all patches land.
git add ...
git am --continue

# Finally, regenerate the patch set. Use a limited diff context so we don't
# pull in version-specific information.
git format-patch -U2 FETCH_HEAD -o $TPP_PATCHES/
```

## Dry Runs

Each `third_party_packages` module can be dry-run via example:

```sh
./recipes/recipes.py run \
  --workdir $HOME/temp/recipes/workdir \
  --properties '{"dry_run": true}' \
  third_party_packages:examples/python
```


text:
---
title: A feast of music all year long
feature_image:
  description: Bad Hagrid. Meet the beast on Friday.
  image: >-
    https://res.cloudinary.com/whanganuihigh/image/upload/v1581895083/News/Bad_Hagrid._Te_Paerata_Tichbon.Finn_Mithcell_A._Midweek_5.2.20.jpg
news_author:
  date: 2020-02-04T23:15:28.576Z
  name: Ken Chernoff / Whanganui Musicians’ Club
  publication: Whanganui Midweek
show_in_slider: true
date: 2020-02-16T23:15:28.593Z
---
Vintage Weekend treated us to a feast of music, and the Whanganui Musicians’ Club is one place where the music keeps coming all year long, featuring the monthly club night on the first Friday of every month.

Local musicians are invited to put their names on the board and play a few songs before the invited bands take to the stage. It’s a formula that stands the test of time.

February’s edition is shaping up to be a stormer, as we welcome home three young guns who are creating the music of today. Based in Wellington, Bad Hagrid is the band’s name. Here, in their own words, is a description of their adventure:

“Legends speak of a being so dastardly, so monstrous, that the mere mention of his name is enough to send even the most hardened souls into a cold sweat. The creature’s name — Bad Hagrid. No-one has ever met the beast and lived to tell the tale. That is, until today.

“Bad Hagrid are an ‘alternative-progressiveregressive-banana-brainedankle-sprained-hipster-sisterpsychedelic-synth-rock’ fourpiece comprising Whanganuians **Te Paerata Tichbon, Finn Mitchell-Anyon and Shay Wright** (all ex WHS students), alongside non-Whanganuian Hakopa Kuka-Larsen. This weekend, they return home to regale you with tales of their journeys through far-off lands — including their new single, Rose — a high-energy, riffcentric journey featuring complex rhythms and fierce vocals.”

Joining the party from the Ka¯ piti Coast are jazz maestro Geoff Culverwell and Robert Kingi, playing improvisations on modern grooves. Horns, voice, percussion and acoustic guitar are treated with electronic effects.

Friday, February 7 at the Musicians’ Club, 65 Drews Ave. Doors open at 7pm, with the music playing until 11pm. $15 General Admission, $10 for members. Memberships available at the door.

gha_language: Blade


text:
---
metaTitle: "C# | How to use C# Structs to create a Union type  (Similar to C Unions)"
description: "C-Style Unions in C#, Union Types in C# can also contain Struct fields"
---

# How to use C# Structs to create a Union type  (Similar to C Unions)

## C-Style Unions in C#

Union types are used in several languages, like C-language, to contain several different types which can "overlap".  In other words, they might contain different fields all of which start at the same memory offset, even when they might have different lengths and types.   This has the benefit of both saving memory, and doing automatic conversion.   Think of an IP address, as an example.  Internally,  an IP address is represented as an integer, but sometimes we want to access the different Byte component,  as in Byte1.Byte2.Byte3.Byte4.   This works for any value types,  be it primitives like Int32 or long,  or for other structs that you define yourself.

We can achieve the same effect in C# by using Explicit Layout Structs.

```cs
using System;
using System.Runtime.InteropServices;

// The struct needs to be annotated as "Explicit Layout"
[StructLayout(LayoutKind.Explicit)]
struct IpAddress
{
    // The "FieldOffset" means that this Integer starts, an offset in bytes.
    // sizeof(int) 4, sizeof(byte) = 1
    [FieldOffset(0)] public int Address;
    [FieldOffset(0)] public byte Byte1;
    [FieldOffset(1)] public byte Byte2;
    [FieldOffset(2)] public byte Byte3;
    [FieldOffset(3)] public byte Byte4;

    public IpAddress(int address) : this()
    {
        // When we init the Int, the Bytes will change too.
        Address = address;
    }

    // Now we can use the explicit layout to access the
    // bytes separately, without doing any conversion.
    public override string ToString() => $"{Byte1}.{Byte2}.{Byte3}.{Byte4}";
}

```

Having defined out Struct in this way, we can use it as we would
use a Union in C.  For example,  let's create an IP address as a
Random Integer and then modify the first token in the address
to '100', by changing it from 'A.B.C.D' to '100.B.C.D':

```cs
var ip = new IpAddress(new Random().Next());
Console.WriteLine($"{ip} = {ip.Address}");
ip.Byte1 = 100;
Console.WriteLine($"{ip} = {ip.Address}");

```

Output:

```cs
<IP_ADDRESS> = 537211211
<IP_ADDRESS> = 537211236

```

[View Demo](https://dotnetfiddle.net/CnrgBi)

## Union Types in C# can also contain Struct fields

Apart from primitives,  the Explicit Layout structs (Unions) in C#,  can also contain other Structs.   As long as a field is a Value type and not a Reference, it can be contained in a Union:

```cs
using System;
using System.Runtime.InteropServices;

// The struct needs to be annotated as "Explicit Layout"
[StructLayout(LayoutKind.Explicit)]
struct IpAddress
{
    // Same definition of IpAddress, from the example above
}

// Now let's see if we can fit a whole URL into a long

// Let's define a short enum to hold protocols
enum Protocol : short { Http, Https, Ftp, Sftp, Tcp }

// The Service struct will hold the Address, the Port and the Protocol
[StructLayout(LayoutKind.Explicit)]
struct Service
{
    [FieldOffset(0)] public IpAddress Address;
    [FieldOffset(4)] public ushort Port;
    [FieldOffset(6)] public Protocol AppProtocol;
    [FieldOffset(0)] public long Payload;

    public Service(IpAddress address, ushort port, Protocol protocol)
    {
        Payload = 0;
        Address = address;
        Port  = port;
        AppProtocol = protocol;
    }

    public Service(long payload)
    {
        Address = new IpAddress(0);
        Port = 80;
        AppProtocol = Protocol.Http;
        Payload = payload;
    }

    public Service Copy() => new Service(Payload);

    public override string ToString() => $"{AppProtocol}//{Address}:{Port}/";
}

```

We can now verify that the whole Service Union fits into the size of a long (8 bytes).

```cs
var ip = new IpAddress(new Random().Next());
Console.WriteLine($"Size: {Marshal.SizeOf(ip)} bytes. Value: {ip.Address} = {ip}.");

var s1 = new Service(ip, 8080, Protocol.Https);
var s2 = new Service(s1.Payload);
s2.Address.Byte1 = 100;
s2.AppProtocol = Protocol.Ftp;

Console.WriteLine($"Size: {Marshal.SizeOf(s1)} bytes. Value: {s1.Address} = {s1}.");
Console.WriteLine($"Size: {Marshal.SizeOf(s2)} bytes. Value: {s2.Address} = {s2}.");

```

[View Demo](https://dotnetfiddle.net/cROlki)

#### Remarks

Union types are used in several languages, notably C-language, to contain several different types which can "overlap" in the same memory space. In other words, they might contain different fields all of which start at the same memory offset, even when they might have different lengths and types. This has the benefit of both saving memory, and doing automatic conversion.

Please, note the comments in the constructor of the Struct.  The order in which the fields are initialized is extremely important.  You want to first initialize all of the other fields and then set the value that you intend to change as the last statement.  Because the fields overlap, the last value setup is the one that counts.

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
# Auro migrate shell script

Install this BASH shell script to easily migrate an existing Auro custom element to a new repository based on a current build. This process does not upgrade an existing repository, but migrates the necessary files from a legacy repo to a newly created repo.

## Install

To install the script, run the following command:

```
curl https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/util/auroMigrate.sh -o ~/.auroMigrate.sh
```

Even if you have installed this before, it's good to reinstall to ensure you have the latest version.

The next step is to add a reference to this file in either your `~/.bash_profile` or `~/.bashrc` file.

```
echo -e "\n\n# Auro repo migration tool\nsource ~/.auroMigrate.sh" >> ~/.bash_profile

or

echo -e "\n\n# Auro repo migration tool\nsource ~/.auroMigrate.sh" >> ~/.bashrc
```

## Install generator dependency

**Dependency**: This process has a dependency on the [WC-Generator](http://auro.alaskaair.com/generator). Installed or not, running this command will at least ensure that you have the latest version of the generator.

```
$ npm i @aurodesignsystem/wc-generator@latest -g
```

Having gone through the install steps, it's **important** to either **open a new terminal window** or **re-source the one you are using**. Depending on your configuration, BASH may or may not be aware of the new commands from the WC-Generator or the migration script.

```
$ source ~/.bash_profile

or

$ source ~/.bashrc
```

## Generate a new repo

First step to performing the migration is to create a new repository from the Auro WC-Generator. The following command will generate a new repo, ignoring the npm install and build steps. See the [WC-Generator API](/getting-started/developers/generator/generator/api) for more information.

Use the optional namespace argument if you do not want `@aurodesignsystem`. Use this option with `@aurolabs` if you are migrating an auroLabs repo.

```
$ generateRepo [element-name] [optional npm namespace]
```

## What to expect

When running the migration, the tool will address the following steps:

1. Migrate the ./.git, ./src, ./test, and ./demo directories from the legacy repo to the new repo
1. The ./CHANGELOG.md will be copied over as well
1. The tool will change directories into the newly created repo and...
  * if the legacy repo used a `master` branch, this will be renamed to `main`
  * a new `upgradeRepo` branch will be created for all the changes
  * the changes will be committed to the new `upgradeRepo` branch

Once this is complete there will be an instruction about amending the previous commit if there are any subsequent changes from the migration.

## Migrate the files

To start the migration, run the `auroMigrate` function.

```
auroMigrate [legacy repo] [new repo] [--no-demo]
```

This function takes up to three arguments in this order:

1. Path to the legacy directory `{ String }`
1. Path to the newly created directory `{ String }`
1. `--no-demo` flag `{ Boolean }`

### DIrectory path support

For obvious reasons, you cannot have two directories named the same. The migration command accepts any directory path, e.g. if the newly created repo was in a sub-directory from where the legacy repo is, the command could be the following:

```
$ auroMigrate auro-flight migration/auro-flight
```

Or if the new repo was outside the current directory:

```
$ auroMigrate auro-flight ../auro-flight
```

If the repos are in the same directory, again using auro-flight as an example, ensure that the directory names do not clash. The command may be like the following:

```
$ auroMigrate flight auro-flight
```

### Migrating the demo

If the repo you are migrating from does not have a modern markdown demo in the `./demo` directory, please add the `--no-demo` flag.

```
$ auroMigrate auro-flight migration/auro-flight --no-demo
```

## Review and test the migration

Once the migration is complete, you will be in the **newly created repository**. Run `$ npm i`. The install was not addressed with the initial repo creation step. Be sure to review the following:

1. Be sure to evaluate all the changed files, especially the `./package.json`. This file will be the one created with the new repo, not the legacy one. If there were customizations made in the legacy repo, this will need to be manually migrated.
1. No need to update the `"version": "0.0.0",` line. This will be addressed with the first publish of the new repo.
1. If the legacy repo had multiple CDN deliverables, if there were alterations, these will need to be manually migrated.
1. Run `$ git log --date=local --abbrev-commit --graph`. This should contain the full history from the legacy repo.

If the remote repo is still using a `master` branch, you will need to push the `main` and the `upgradeRepo` branches before you make the PR. The legacy `master` branch is to be deleted.

At this point you should be able to create a pull request to the element's Github repo for review.

repository: Izook/WC-Generator

repo_name: Izook/WC-Generator


text:
---
id: "accsfields"
title: "ACCSFields"
sidebar_label: "ACCSFields"
---

[swapchain documentation](../globals.md) › [ACCSFields](accsfields.md)

Contains raw user input to run an ACCS. Needs to get parsed.

**`interface`** ACCSFields

## Hierarchy

- **ACCSFields**

## Index

### Properties

- [amountToReceive](accsfields.md#amounttoreceive)
- [amountToSend](accsfields.md#amounttosend)
- [bitcoinPrivateKey](accsfields.md#bitcoinprivatekey)
- [bitcoinTxID](accsfields.md#bitcointxid)
- [bitsharesPrivateKey](accsfields.md#bitsharesprivatekey)
- [counterpartyBitcoinPublicKey](accsfields.md#counterpartybitcoinpublickey)
- [counterpartyBitsharesAccountName](accsfields.md#counterpartybitsharesaccountname)
- [currencyToGive](accsfields.md#currencytogive)
- [mode](accsfields.md#mode)
- [networkToTrade](accsfields.md#networktotrade)
- [priority](accsfields.md#priority)
- [rate](accsfields.md#rate)
- [secret](accsfields.md#secret)
- [secretHash](accsfields.md#optional-secrethash)

## Properties

### amountToReceive

• **amountToReceive**: _number_

_Defined in [pkg/accs/accs.ts:44](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L44)_

The amount to receive.

---

### amountToSend

• **amountToSend**: _number_

_Defined in [pkg/accs/accs.ts:34](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L34)_

The amount to send.

---

### bitcoinPrivateKey

• **bitcoinPrivateKey**: _string_

_Defined in [pkg/accs/accs.ts:49](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L49)_

The Bitcoin private key.

---

### bitcoinTxID

• **bitcoinTxID**: _string_

_Defined in [pkg/accs/accs.ts:69](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L69)_

The Bitcoin transaction ID to spend.

---

### bitsharesPrivateKey

• **bitsharesPrivateKey**: _string_

_Defined in [pkg/accs/accs.ts:54](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L54)_

The Bitshares private key.

---

### counterpartyBitcoinPublicKey

• **counterpartyBitcoinPublicKey**: _string_

_Defined in [pkg/accs/accs.ts:59](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L59)_

The Bitcoin public key of the counterparty.

---

### counterpartyBitsharesAccountName

• **counterpartyBitsharesAccountName**: _string_

_Defined in [pkg/accs/accs.ts:64](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L64)_

The Bitshares account name of the counterparty.

---

### currencyToGive

• **currencyToGive**: _string_

_Defined in [pkg/accs/accs.ts:29](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L29)_

The currency to give. Either BTC or BTS.

---

### mode

• **mode**: _string_

_Defined in [pkg/accs/accs.ts:19](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L19)_

The transaction mode. Either proposer or accepter.

---

### networkToTrade

• **networkToTrade**: _string_

_Defined in [pkg/accs/accs.ts:24](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L24)_

The network name. Either mainnet or testnet.

---

### priority

• **priority**: _number_

_Defined in [pkg/accs/accs.ts:74](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L74)_

The priority of the transactions. Either 0 (high), 1 (medium) or 2 (low).

---

### rate

• **rate**: _number_

_Defined in [pkg/accs/accs.ts:39](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L39)_

The exchange rate both parties agreed on.

---

### secret

• **secret**: _[Secret](secret.md)_

_Defined in [pkg/accs/accs.ts:79](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L79)_

A secret object with a random preimage and its corresponding SHA256 hash.

---

### `Optional` secretHash

• **secretHash**? : _undefined | string_

_Defined in [pkg/accs/accs.ts:84](https://github.com/chronark/swapchain/blob/c023355/src/pkg/accs/accs.ts#L84)_

A secret SHA256 hash.


text:
---
title: Disaster Recovery Plan
---

## Purpose

This Disaster Recovery Plan documents the contingencies and planning that Welkin has in place to recover from a disaster that disrupts normal functioning of our IT systems. The focus of this document is on recovery from a disaster that damages or destroys the hosting infrastructure that runs our product operations, which our customers rely on in the course of their patient care.

## Scope

This document applies to Welkin's production information systems.

## Responsible Parties & Team Communication

The Welkin engineering team has an on-call rotation. At any given time one engineer is responsible for monitoring our error alerting channels and responding to production errors as they arise, including cases of catastrophic failure. This responsibility rotates weekly.

In the event of a disaster, the on-call engineer will implement the recovery plan outlined in this document. They will notify the Security Officer of the outage and delegate investigative or recovery tasks to other engineers trained in the disaster recovery process as needed. We maintain an up-to-date contact sheet with phone numbers and both professional and personal email addresses for all engineering team members.

## Goal Metrics

*   Recovery Time Objective: under 2 hours to be fully operational.
*   Recovery Point Objective: data state as of 15 minutes immediately before the disaster.

## Site Designation & Backup Processes

Welkin's computing operations are hosted on Amazon's Web Services cloud. The core services of AWS that Welkin requires to run are EC2 instances (for running database and web server virtual machines) and S3 storage (for storing binary user data and database backups).

EC2 instances are all assigned to an "availability zone." For more information on Amazon's availability zones for EC2, refer to the EC2 [documentation](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions-availability-zones). For the purposes of this document a "disaster" refers to an event that has rendered our entire availability zone unusable. In the event of such a disaster, we will bring up new instances of our EC2 machine images in a different availability zone. Our current availability zone is located in Amazon's "US East" region.

S3 automatically replicates stored data on multiple devices in different data center facilities within a region. It is designed to sustain the concurrent loss of data from two separate facilities at a time. For more information about S3 durability, see the [S3 documentation](http://docs.aws.amazon.com/AmazonS3/latest/dev/DataDurability.html).

Welkin's database backup strategy has two layers. First, as a part of Amazon's Relational Database Service (RDS), Welkin keeps 10 days of point-in-time recovery logs. Second, Welkin takes nightly snapshots that are permanently archived.. In the event of a disaster, after new EC2 instances have been created in a new availability zone, we load the most recent backup from before the disaster.

## Testing and Training

Product stack bringup occurs routinely as part of normal product operations. This is by design; we rely on the same tools to both administer development stacks and the production stack.

However, we do not routinely re-create the network and logging stacks, nor do we routinely bring up development stacks in different availability zones. As part of the HIPAA Risk Assessment conducted most recently before this writing, an Opportunity for Improvement was identified to do more regular and thorough tests of the Disaster Recovery Plan. Going forward, Welkin will perform a full test of its Disaster Recovery plan at least annually, including the recreation of the network, logging, and product stacks in a new availability zone. We will create separate DNS entries for these tests to avoid disrupting service during the exercise.

Welkin publishes engineering documentation on disaster recovery and trains the engineering team on their use.

repository: awans/policy

repo_name: awans/policy


text:
# cache-simulator

This simulator is used for testing cache hit/miss, no data is stored actually.

https://github.com/jaminthorns/cpu-cache-simulator for reference

## Usage
```bash
$ python ./simulator.py -h
usage: simulator.py [-h] Memory Cache Block Mapping REPLACE Write

Cache Simulator

positional arguments:
  Memory      Memory size, e.g. 16K
  Cache       Cache size, e.g. 16K
  Block       Block size, e.g. 4K
  Mapping     Cache mapping, e.g. 8-ways
  REPLACE     Cache policy, LRU,LFU,FIFO,RAND
  Write       Write policy, WB,WT

optional arguments:
```

## Supported commands

* read addr
  * read data from addr
* write addr data
  * write data to addr
* seqread start_addr size
  * sequential read from start_addr with size
* seqwrite start_addr size
  * sequential write to start_addr with size
* randread size
  * random read size of data
* randwrite size
  * random write size of data
* stats
  * show stats of cache, hit/miss
* clear
  * clear all cache

repository: atomsos/cache-simulator

repo_name: atomsos/cache-simulator