text:
# Using the Blocklist

Exoskeleton automatically helps you to [avoid duplicates](avoiding-duplicates.md "How to avoid duplicates in exoskeleton"). The blocklist is a feature to exclude some pages to be processed at all.

The blocklist is based on the fully qualified domain name (FQDN). The FQDN for `https://www.example.com/foo.html?id=1` would be `www.example.com`.

If `www.example.com` is on the blocklist, exoskeleton will not add any URL to the queue whose FQDN matches that. If the URL is already in the queue, the task will not be executed if the FQDN has been added to the blocklist in the meantime. Exoskeleton checks again while processing the queue.

However `example.com` (missing 'www') is a different FQDN and `https://example.com/foo.html?id=1` (missing 'www') would be processed with `www.example.com` on the blocklist even if it has the same content. Be aware that some browsers (like Chrome) do not the full URL / the 'www' until you click in the address bar.

*Exoskeleton's blocklist does not yet support wildcards or regular expressions.*

You have three functions to control the blocklist:
```python
def block_fqdn(self,
               fqdn: str,
               comment: Optional[str] = None):
```
Use `blocklist.block_fqdn('www.example.com')` to add `www.example.com` to the blocklist. A comment is optional.

```python
def unblock_fqdn(self,
                 fqdn: str):
```

Expectedly `blocklist.unblock_fqdn('www.example.com')` reverses `block_fqdn()` and removes `www.example.com` from the blocklist.

```python
def truncate_blocklist(self):
```
The command `blocklist.truncate_blocklist()` removes all entries from the blocklist.

repository: RuedigerVoigt/exoskeleton

repo_name: RuedigerVoigt/exoskeleton


text:
### [CVE-2021-29649](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29649)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

An issue was discovered in the Linux kernel before 5.11.11. The user mode driver (UMD) has a copy_process() memory leak, related to a lack of cleanup steps in kernel/usermode_driver.c and kernel/bpf/preload/bpf_preload_kern.c, aka CID-f60a85cad677.

### POC

#### Reference
- https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.11.11
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f60a85cad677c4f9bb4cadd764f1d106c38c7cf8

#### Github
No PoCs found on GitHub currently.

license: MIT

repository: trickest/cve

branch_name: refs/heads/main

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive

repo_name: trickest/cve


text:
---
nav_order: 32
---

# Hot reload

![hmr](./images/hmr.gif)

- run with `HOT=1` env variable
- have your `./main.tsx` file [like this](https://github.com/cztomsik/slack-app/blob/master/src/main.tsx#L13)
- do any changes and it should get reflected instantly

repository: egasimus/graffiti

branch_name: refs/heads/master

repo_name: egasimus/graffiti


text:
# Quiz: Organizing Code

Try this self-check quiz to test your knowledge!

<quiz name="">
    <question multiple>

Why would we organize code using Functions?

        <answer correct>To improve readability of code by grouping functionality into discrete code blocks.</answer>
        <answer correct>To make maintenance easier by containing and isolating logic.</answer>
        <answer correct>To improve debugging by creating authoritative code blocks that handle one specific feature.</answer>
        <answer correct>To facilitate more complex algorithms.</answer>
        <explanation>All of the above are reasons for organizing code using Functions.</explanation>
    </question>
    <question>

What command is used to declare a Function in JavaScript?

        <answer>def</answer>
        <answer correct>function</answer>
        <answer>fnc</answer>
        <answer>subroutine</answer>
        <explanation>The command function is used to declare a Function in JS.</explanation>
    </question>
    <question multiple>

What two kinds of objects can go between the parentheses of a Function declaration?

        <answer correct>parameters</answer>
        <answer>setters</answer>
        <answer correct>arguments</answer>
        <answer>getters</answer>
        <explanation>The parentheses in the declaration of the Function can contain parameters and/or arguments.</explanation>
    </question>
    <question>

What command sends data back to the code that called the Function?

        <answer>respond</answer>
        <answer >dispatch</answer>
        <answer>update</answer>
        <answer correct>return</answer>
        <explanation>The return command sends data back to the code that called the Function.</explanation>
    </question>
    <question>

True or False: JavaScript parameters can have default values specified in the Function declaration?

        <answer correct>true</answer>
        <answer>false</answer>
        <explanation>True: Default Parameters are possible as of ECMAScript 6.</explanation>
    </question>
    <question>

What command is used to declare a local variable in JavaScript?

        <answer>var</answer>
        <answer>local</answer>
        <answer correct>let</answer>
        <answer>loc</answer>
        <explanation>The command let is used to declare a local variable in JS.</explanation>
    </question>
    <question multiple>

What is do we call the context of the code (including all known object references) as it is executed by the interpreter?

        <answer>context</answer>
        <answer>library</answer>
        <answer correct>scope</answer>
        <answer>platform</answer>
        <explanation>The word "scope" indicates the context of the code as it is executed.</explanation>
    </question>
    <question>

True or False: Variables declared with let can be used outside of the code block where they are declared?

        <answer>true</answer>
        <answer correct>false</answer>
        <explanation>False: Variables declared with let do not exist outside of the code block where they are declared (although they can be used in child code blocks of the block where they are declared).</explanation>
    </question>
    <question>

How are code blocks identified?

        <answer correct>{ }</answer>
        <answer >( )</answer>
        <answer>[ ]</answer>
        <answer>< ></answer>
        <explanation>The curly braces ({ }) indicate a code block in JavaScript.</explanation>
    </question>
</quiz>

Visit Quiz Online

         The quiz on this page has been removed from your PDF
         or ebook format. You may take the quiz by visiting
         this book online.

repository: shawnr/practical-javascript

gha_language: CSS

repo_name: shawnr/practical-javascript


text:
## pyroclast-js

Browser + Node.js support for sending events to a Pyroclast topic.

## Installation

```bash
npm install --save pyroclast
```

## Topic APIs

### Write events

First, start the client.

```javascript
const pyroclast = require('pyroclast');

const topicClient = new pyroclast.PyroclastTopicClient({
    writeApiKey: "<your api token>",
    readApiKey: "<your api token>",
    topicId: "<your topic ID>"
});
```

#### Send one event asynchronously

```javascript
topicClient
    .sendEvent({value: {type: "page-visit", page: "/home", timestamp:<PHONE_NUMBER>000}})
    .then((result) => {
        // ...
    });
```

#### Send a batch of events asynchronously

```javascript
topicClient
    .sendEvents([
        {value: {type: "page-visit", page: "/home", timestamp:<PHONE_NUMBER>000}},
        {value: {type: "page-visit", page: "/home", timestamp:<PHONE_NUMBER>000}},
        {value: {type: "page-visit", page: "/home", timestamp:<PHONE_NUMBER>000}}
    ])
    .then((results) => {
        // ...
    });
```

### Reading events

Start the client.

```javascript
const pyroclast = require('pyroclast');

const topicClient = new pyroclast.PyroclastTopicClient({
    readApiKey: "<your api token>",
    topicId: "<your topic ID>"
});
```

#### Subscribe to a topic

```javascript
topicClient.subscribe("my-example-subscription").then(
    (consumerInstance) => {
    //...
    })
```

#### Poll subscribed topic

```javascript
consumerInstance.poll()
    .then((result) => {
        // ...
    });
```

#### Commit read records

```javascript
consumerInstance.commit()
    .then((result) => {
        // ...
    });
```

## Supplying a [Fetch](https://fetch.spec.whatwg.org/) implementation

By default:
* In the browser, the native `window.fetch` implementation is used, if available (as in modern browsers).
* In Node.js, `node-fetch` is used.

To override this behavior:
* (Browser/Node.js) Pass the implementation as the `fetchImpl` option, or
* (Browser only) Use a polyfill to define fetch globally.

Note that to support older browsers, you will likely also need a Promise polyfill.

## License

(The MIT License)

Copyright © 2017 Distributed Masonry

repository: PyroclastIO/pyroclast-js

gha_language: JavaScript

repo_name: PyroclastIO/pyroclast-js


text:
# Minsync

Minsync is a tool for synchronizing contents of large files to devices with differing read and write speeds.
The tool will read both copies of a file and copy only differentiating blocks.

The tool preserves existing and adds new holes in sparse files.

## Running

minsync /disk/large.file /slowdisk/large.file

repository: grzegorz-zur/minsync

gha_language: Go

repo_name: grzegorz-zur/minsync


text:
---
title: AV EcoSystem Review More WSO CleanUp
author: Sam Joseph
---

![cleanup](../images/cleanup.jpg)

So running the cuke tests I get this one bit of extraneous output:

```
Encountered Error in get: 404 Resource Not Found: {"code":"route_not_found","kind":"error","error":"The path you requested has no valid endpoint."}
```
and of course huge dumps of VCR and Puffing Billy cache changes.  I can clean that up with our `rake vcr_billy_caches:reset` commmand but I wonder what other projects do?  Perhaps I should ask the VCR folks?  I think the issue we have is that we need to throw out some of our old caches and reload, dealing with the pain that will cause ... maybe we need some VCR version of dependabot that will throw out old caches for us?

I posted the [following to the vcr-ruby mailing list](https://groups.google.com/forum/#!topic/vcr-ruby/8DoA7MUq-38):

> Hi everyone,

> We've been using VCR in our rails projects for a long time (and now puffing billy as well) and I'm concerned about how confusing cached network recordings are for new contributors that we onboard.

> We also seem to end up with a fair few new network cache files when tests fail and so on, which show up in `git status`.  New contributors wonder what these files are for, try to add the cache directories to .gitignore, or do other strange things.

> We've recently introduced a rake task `rake vcr_billy_caches:reset` to make it easy to reset the caches to the way they are in the current branch, but I wonder if there isn't some better long term solution.

> I wonder if we're using VCR incorrectly, or perhaps not updating our cached network files frequently enough.  I'm a little scared to delete large swathes of recorded files for the extra work that might pop up in terms of ensuring that everything works again, but perhaps I'm being silly.  It's just that it's all volunteer time, so well, anyway.  Here are the two main OS projects I'm running that use VCR:

> https://github.com/AgileVentures/LocalSupport

> https://github.com/AgileVentures/WebSiteOne

> I've added sections to our contributing docs, but I feel like all my text should probably be replaced with images or a video: https://github.com/AgileVentures/LocalSupport/blob/develop/CONTRIBUTING.md#acceptance-testing--caching

> I just wondered if others had similar experiences and any suggestions.

> Many thanks in advance

> Best, Sam

I also opened a [GitHub issue](https://github.com/vcr/vcr/issues/672) to also mention the idea of some sort of automated tool to delete old cache files.

Annoyingly I'm almost out of time this morning, and I wanted to see if I could fix the `local_time` update that dependabot was suggesting, as well as cleaning out the cruft in the Cucumber logs.  I was also thinking that the ultra slow cukes needed to be worked on.  Hmmm, leave `local_time` to next week I guess ... urgh, and I left a hanging PR to update some of the Slack channels that get pinged ...

repository: tochman/av-static-website

extension: markdown

repo_name: tochman/av-static-website


text:
# COS3712_Assignment1
This repository: https://github.com/DragonStorm97/COS3712_Assignment1
## Project Structure
* libs
	* (libraries as described below)
* src
	* css
		* main.css (stylesheet file)
	* js
		* globals.js (Contains project & constant globals)
		* setup.js (sets up WebGL and the scene and calls the relavant functions to add meshes to the scene)
		* createIntersection.js (creates the roads and pavement)
		* addTrafficLights.js (builds and then adds the traffic lights to the intersection)
		* addVehicles.js (adds the vehicles to the intersection, adding the vehicle meshes to an array to be used by the animation button)
		* animation.js (handles the button press and animating of a random vehicle)
		* createBuildings.js (builds and then adds the buildings to the scene)
	* index.html (page definition)

## UI:
This project has:
* A heading (COST3712 Assignment 1 - Johnathan Jacobs - 61009172)
* A button that will animate a random car.
* A label (to indicate what the slider does)
* A slider, used to control camera zoom. (z distance change only as FoV change isn't as pleasent in the context)
* Another Label to indicate the slider's value

## Environment
* Intersection (road + curbsides)
* Vehicles at the intersection
	* Car
	* Bus
	* Truck
	* Pickup Truck
* Traffic lights
* Buildings

## Libraries Used
All libraries are included for ease of use.
* three.js
* three.modules.js (to use the OrbitControls and OBJLoader three.js modules)
* OBJLoader.js (used to load vehicle assets)
* OrbitControls.js (for mouse pan, rotate, and zoom to aid usability)
* TweenMax.min.js (for animating with tweens)

## Assets
The Traffic lights are (simplisticly) procedurally generated.
The buildings are (simplisticly) procedurally generated to match the assignment specification.
As the models for the car, bus and truck weren't specified, custom models were made.
* car model
* bus model
* truck model
* Pickup truck model
These models are un-textured so their material is set upon creation.
The car, bus, and truck have predefined colours, extras (such as Pickup Truck) have a randomised colour.
If the project is run by directly opening index.html, then the vehicles are generated as boxes with a defined colour.

# Assignment 1 Specification
NB. You need to submit code for this assignment. Place all your files that would be required to execute your project in a zip folder and upload on myunisa.
In this project, you have to design and construct a 3D road intersection using WebGL.
You can make use of WebGL libraries like three.js.
On the road intersection there must 3 different modes of transport – a car, bus and truck.
On each corner of the intersection, you need to add a traffic light.
On one of the corners of the intersection there must be at least one building (rectangular block, with rectangular shaped windows – any colour).
You can add as many buildings to the scene as your wish.
Add a button to your project where if the button is pressed one of the modes of transport will move from a starting position at the intersection and will cross the intersection.
Add sliders to your project that will allow the user to Zoom in/out to the centre of your viewing window.


text:
---
title : "热气球 旅行 04"
title2 : "Northampton Balloon Festival 2017 "
info2 : "Video shot during the morning launch of the Northampton Balloon festival, Sunday 20th August 2017 6am.  In true British style the weather was unfavourable for most of the weekend for the mass launches, however early on Sunday 20th August a ridge of high pressure moved in giving clear skies and light winds and a beautiful launch ensued.  The balloons drifted in a general easterly direction and the final balloon in the sky (seen in the final part of this video) landed near the village of Riseley. "
date:        2020-05-22T21:51:01-07:00
author:
 - youtube_Andy_Ball
tags:
 - youtube
 - Andy_Ball
 - youtube_Andy_Ball
 - 2020_05
 - 2020_0522
 - 2020_0522_21
categories:
 - 2020_0522
#icon:        "fas fa-lock-open"
#resImgTeaser: teaserpics/wikipedia.org/emacs-jokes.png
---

{{< mydiv text="热气球 旅行 04"
>}}

{{< my2mp4withjpgdownload mp4="20170821_d_1bdrqpjl4-001.mp4" >}}
{{< my2mp4withjpgdownload mp4="20170821_d_1bdrqpjl4-002.mp4" >}}
{{< my2mp4withjpgdownload mp4="20170821_d_1bdrqpjl4-003.mp4" >}}
{{< my2mp4withjpgdownload mp4="20170821_d_1bdrqpjl4-004.mp4" >}}
{{< my2mp4withjpgdownload mp4="20170821_d_1bdrqpjl4-005.mp4" >}}
{{< my2mp4withjpgdownload mp4="20170821_d_1bdrqpjl4-006.mp4" >}}

{{< my2jpgexist "xx1.jpg" >}}

{{< my2jpgexist "xx2.jpg" >}}

{{< my2jpgexist "xx3.jpg" >}}

{{< mydiv text="热气球 旅行 04"
>}}

{{< my2linktextonly link="https://www.youtube.com/watch?v=D_1BDrqpjL4"
>}}

{{< my2buttoncopy2clip "music.xspf"        "blue"   "red"    " 单曲 "  "复制 VLC 播放器使用的链接：单曲" >}} {{< my2buttoncopy2clip "/all.xspf"         "green"  "black"  " 全部 "  "复制 VLC 播放器使用的链接：全部" >}} {{< my2buttoncopy2clip "music.m3u8"        "blue"   "red"    " M3U  "    "复制 M3U 播放器使用的链接：单曲" >}} {{< mybr2 >}} {{< my2buttoncopy2clip ""                  "green"  "black"  " 本页 "    "复制 本页的网址 " >}} {{< my2buttoncopy2clip "/"                 "black"  "red"    " 主站 "    "复制 主站的网址 " >}} {{< mybr2 >}} {{< my2buttongoto      "/hot/endothers/"   "blue"   "red"    " 月份"   "转到月份总目录" >}} {{< my2buttongoto      "/hot/alltags/"     "green"  "blue"   " 列表"   "转到文章总列表" >}} {{< my2buttongoto      "/hot/helpxspf/"    "green"  "blue"   " 播放器" "如何使用 VLC 播放器或者 IPTV 播放器的教程" >}}


text:
# ChangeLog

### v2.1.0
8-November-2016

Default loaders support markdown file [PR41](https://github.com/kadirahq/storyshots/pull/41)

### v2.0.2
7-November-2016

* `NODE_ENV` is set to `"development"` by default [PR50](https://github.com/kadirahq/storyshots/pull/50)
* `require.context` regexp test includes the begining `./` of filenames [PR55](https://github.com/kadirahq/storyshots/pull/55)

### v2.0.1
20-October-2016

Prepare channel before reading storybook as some addons use it before running stories. [PR41](https://github.com/kadirahq/storyshots/pull/41)

### v2.0.0
11-October-2016

* Update `jest-snapshot` to version 16.0.0. [PR39](https://github.com/kadirahq/storyshots/pull/39)
* Use a directory and extension different from regular jest snapshots for storyshots. [PR40](https://github.com/kadirahq/storyshots/pull/40)

#### Migrating from 1.x.x

From version 2.0.0 by default storyshot files will be stored in a directory named `__storyshots__` (instead of `__snapshots__`) inside storybook config directory. Further storyshot files will use extension `.shot` instead of `.snap`.

These changes are important because they allow storyshots to be used with jest in the same project. See [issue#34](https://github.com/kadirahq/storyshots/issues/34) for more info.

This mean that once storyshots is updated to 2.0.0 it wont check your existing snapshots. It will create new snapshots in the new location and you can delete old ones.

To update safely, follow these steps.

1. Run your 1.x.x version of storyshots and make sure all stories pass.
2. Update storyshots. `npm install<EMAIL_ADDRESS>--save-dev`
3. Delete `__snapshots__` directory and contents from your storybook config directory. Also remove it from your version control system.
4. Run updated storyshots and add the newly added `__storyshots__` directory to your version control system.

Done!

### v1.1.5
9-October-2016

Fix issue where `require.context` did not work with regexps for full path. [PR37](https://github.com/kadirahq/storyshots/pull/37)

### v1.1.4
6-October-2016

Add support for `require.context` inside storybook config module. The regression introduced in v1.1.2 is addressed. [PR33](https://github.com/kadirahq/storyshots/pull/30)

### v1.1.3
30-September-2016

v1.1.2 introduce a [regression](https://github.com/kadirahq/storyshots/pull/30#issuecomment-250805615). So this revert that version.

### v1.1.2
30-September-2016

Add support for `require.context` inside storybook config module. [PR30](https://github.com/kadirahq/storyshots/pull/30)

### v1.1.1
28-September-2016

* Watch mode Summary shows the stats for the last run only. [PR27](https://github.com/kadirahq/storyshots/pull/27)
* If some tests fail exit with status code 1. [PR28](https://github.com/kadirahq/storyshots/pull/28)

### v1.1.0
27-September-2016

Add `--exclude` flag to avoid running stories matching a given regexp. [PR24](https://github.com/kadirahq/storyshots/pull/24) [PR25](https://github.com/kadirahq/storyshots/pull/25)

### v1.0.5
25-September-2016

* Fix missing dependencies. [PR21](https://github.com/kadirahq/storyshots/pull/21)
* Context should contain only the story name. [PR20](https://github.com/kadirahq/storyshots/pull/20)

### v1.0.4

Invalid Version. Same as v1.0.3

### v1.0.3
23-September-2016

Fix a typo in the console Summary message.

### v1.0.1
22-September-2016

Fix: Allow module loaders to return something. [PR14](https://github.com/kadirahq/storyshots/pull/14)

### v1.0.1
22-September-2016

Fix a typo.

### v1.0.0
22-September-2016

Initial Release.

repository: benzaita/storyshots

repo_name: benzaita/storyshots


text:
![](https://img.shields.io/badge/Microverse-blueviolet)

# To do List

> This is a To do list project built for learning purposes.

## Built With

- HTML
- Bootstrap
- Javascript
- CSS
- HTML Webpack

## How to use it

> Clone the repository using Github Desktop or by command line using the following command on the folder you want the repository to be:
- git clone https://github.com/jonathastavares/to-do-list.git
> Now use the following commands to setup the project
- npm init -y
- npm install webpack webpack-cli --save-dev
- npm install --save lodash
- npm install --save-dev html-webpack-plugin
- npm install --save-dev style-loader css-loader
- npm run build

## Live Version

- Check out the [Live Version.](https://jonathastavares.github.io/to-do-list/dist/index.html)

# Author

👤 **Jonathas Tavares**

- Github: [Jonathas Tavares](https://github.com/jonathastavares)
- Twitter: [Jonathas Tavares](https://twitter.com/jhstavares)
- Linkedin: [Jonathas Tavares](https://www.linkedin.com/in/jonathas-tavares-24b8bba3/)

# 🤝 Contributing

Contributions, issues and feature requests are welcome!

## License

This project is MIT licensed.

# Show your support

Give a ⭐ if you like this project!

repository: jonathastavares/to-do-list

branch_name: refs/heads/development

repo_name: jonathastavares/to-do-list


text:
---
title: Getting Started with Danger JS
subtitle: Getting Started with Danger JS
layout: guide_js
order: 0
---

So, you're ready to get set up.

There are 5 steps involved in getting Danger running:

* [Include the Danger module](#including-danger).
* [Creating a Dangerfile](#creating-a-dangerfile) and add a few simple rules.
* [Creating an account for Danger to use](#creating-a-bot-account-for-danger-to-use).
* Setting up [an access token for Danger](#setting-up-an-access-token) with that account.
* Setting up [Danger to run on your CI](#setting-up-danger-to-run-on-your-ci).

## Including Danger

We recommend you install Danger via [Yarn][]. Though you can use the npm CLI.

### Installation

Adding the Danger module by `yarn add danger --dev`. This will add Danger as a `devDependency` and make the command `danger` available by running `yarn danger`.

### Creating a Dangerfile

Create either an empty JavaScript or TypeScript file named `Dangerfile`. Either `Dangerfile.js` or `Dangerfile.ts` will be picked up automatically.

Danger uses [Jest's][jest] infrastructure for handling source code transpilation for your Dangerfile. This means if you are using Jest for your testing, then you have no configuration. If you do not use Jest, I would recommend looking at their [config settings][jest-config]

To get yourself started, try this as your Dangerfile:

```js
import { message, danger } from "danger"
message(":tada:, this worked @" + danger.github.pr.user.login)
```

Which, once you have your authentication set up, will have danger post a message to your PR with your name.

For a deeper understanding of using a Dangerfile, see the guide [The Dangerfile][dangerfile]

### Creating a bot account for Danger to use

This is optional. Pragmatically, you want to do this though. Currently Danger JS only supports communication on GitHub. If you're interested in GitLab and BitBucket support, PRs are welcome, or look at the Ruby version of Danger.

### GitHub

In order to get the most out of Danger, we recommend giving her the ability to post comments in your Pull Requests. This is a regular GitHub account, but depending on whether you are working on a private or public project, you will want to give different levels of access to this bot. You are allowed to have [one bot per GitHub account][github_bots].

To get started, open [https://github.com](https://github.com) in a private browser session.

### OSS Projects

Do not add the bot to your repo or to your organization.

### Closed Source Projects

Add the bot to your repo or to your organization. The bot requires permission level "Write" to be able to set a PR's status. Note that you _should not_ re-use this bot for OSS projects.

## Setting up an Access Token

[Here's the link][github_token], you should open this in the private session where you just created the new GitHub account. Again, the rights that you give to the token depend on the openness of your projects. You'll want to save this token for later, when you add a `DANGER_GITHUB_API_TOKEN` to your CI.

### Tokens for OSS Projects

We recommend giving the token the smallest scope possible. This means just `public_repo`, this scopes limits Danger's abilities to just writing comments on OSS projects. Because the token can be quite easily be extracted from the CI environment, this minimizes the chance for bad actors to cause chaos with it.

### Tokens for Closed Source Projects

We recommend giving access to the whole `repo` scope, and its children.

## Enterprise GitHub

You can work with GitHub Enterprise by setting 2 environment variables:

* `DANGER_GITHUB_HOST` to the host that GitHub is running on.
* `DANGER_GITHUB_API_BASE_URL` to the host that the GitHub Enterprise API is reachable on.

For example:

```sh
DANGER_GITHUB_HOST=git.corp.evilcorp.com
DANGER_GITHUB_API_BASE_URL=https://git.corp.evilcorp.com/api/v3
```

### Continuous Integration

Continuous Integration is the process of regularly running tests and generating metrics for a project. It is where you can ensure that the code you are submitting for review is passing on all of the tests. You commonly see this as green or red dots next to commits.

Danger is built to run as a part of this process, so you will need to have this set up as a pre-requisite.

### Setting up Danger to run on your CI

(should we do this for DangerJS too?)

/ These docs all come from
/ https://github.com/danger/danger/tree/master/lib/danger/ci_source
/ inline documentation, rather than from inside this page.

### Verify Installation

You should be able to verify that you have successfully integrated Danger by either re-building your CI or pushing your new commits.

## What now?

There are a few of places you can go from here. We'd recommending opening tabs on all these articles:

* [The Dangerfile][dangerfile].
* [Cultural Changes of Danger][culture].
* [The Dangerfile API reference][api].

Then depending on the type of project you are working on, checking out either [Danger + Node App][app], or [Danger + Node Library][lib]. These should give you good overview of what is possible from here, then it's really up to you to find how you can codify some aspects of your team's culture.

Good luck!

[jest]: https://facebook.github.io/jest/
[jest-config]: https://facebook.github.io/jest/docs/configuration.html
[github_bots]: https://twitter.com/sebastiangrail/status/750844399563608065
[github_token]: https://github.com/settings/tokens/new
[Yarn]: https://yarnpkg.com
[api]: /js/reference.html
[dangerfile]: /js/guides/the_dangerfile.html
[culture]: /js/guides/culture.html
[app]: /js/tutorials/node-app.html
[lib]: /js/tutorials/node-library.html

repository: frozegnome/danger-js

repo_name: frozegnome/danger-js


text:
My Vim Config
=============

This is a backup of my personal .vimrc and .gvimrc files

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

To install this config, first ensure you have ~/.vim and ~/.vim/bundle directories:

    mkdir -p ~/.vim/bundle

Next, clone this repository in your .vim directory:

    git clone https://github.com/Elzair/my-vimrc.git ~/.vim/my-vimrc

Then, copy the two vim files to your home directory:

    cp ~/.vim/my-vimrc/vimrc ~/.vimrc && cp ~/.vim/my-vimrc/gvimrc ~/.gvimrc

Now, clone the vundle repository in ~/.vim/bundle

    git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

Finally, execute vim with the following command to install all the bundles

    vim +BundleInstall +qall

Alternatively, use **gvim** or **mvim** if you are using Gtk-Vim or MacVim

    gvim +BundleInstall +qall

or

    mvim +BundleInstall +qall

Requirements
------------

- Vim 7.3+ (or Gtk-Vim 7.3+ or MacVim 7.3+) with support for Python
- Python 2.7+
- Git
- JSLint (for Javascript syntax checking)

license: Unlicense

repository: Elzair/my-vimrc

repo_name: Elzair/my-vimrc


text:
<!--

    The template below contains optional suggestions. You
    can omit some information.

-->

## The Problem

## Expected Behavior

## Actual Behavior

## Steps to Reproduce
<!-- Provide a set of steps to reproduce the problem.
     If the program unexpectedly crashes, please run it with
     `perl6 --ll-exception` or  `raku --ll-exception` and provide the produced output. -->

## Environment
* Operating system:
* Compiler version (`rakudo -v` or `raku -v`):

repository: rakudo/rakudo

gha_language: Raku

repo_name: rakudo/rakudo


text:
# <img src="https://raw.githubusercontent.com/Autodesk/synthesis/master/installer/Windows/W16_SYN_launch.ico" alt="logo" width="50" height ="50" align="left"/>Synthesis: An Autodesk Technology
![Engine](https://github.com/Autodesk/synthesis/workflows/Engine/badge.svg) ![ModuleAPI](https://github.com/Autodesk/synthesis/workflows/Modules/badge.svg)

Synthesis is a robotics simulator designed to help FIRST Robotics teams design, strategize, test, and practice. Teams can import their own robot and field designs or use preexisting ones into the simulator for a variety of uses, including:
* Testing robot designs
* Exploring the field environment
* Driver practice & strategy
* Code emulation

Developed solely by FIRST students, Synthesis is built with a direct focus on the FIRST community. We've also made the project completely open source in order to better involve the community. This way contributors can help make Synthesis better or modify Synthesis to better suit their team’s needs.

For more information on the product itself or the team, visit http://synthesis.autodesk.com/

## Getting Started

Synthesis is comprised of 4 separate components that are mostly developed independently of each other. You will want to clone the entire repository first, then follow a different set of steps depending on which component you wish to work on. The links below will lead you to specific instructions that will get you a copy of that component up and running on your local machine for development and testing purposes.

* [Simulation Engine](/engine)
* [Inventor Robot Exporter (Inventor Plugin)](/exporter/SynthesisInventorGltfExporter/)
* [Fusion Robot Exporter (Fusion 360 Plugin)](/exporter/SynthesisFusionGltfExporter/)
* [Controller API](/modules/Controller/)

## Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. This  way, we can ensure that there is no overlap between contributions and internal development work. You may contact us at<EMAIL_ADDRESS>
When ready to contribute, just submit a pull request and be sure to include a clear and detailed description of the changes you've made so that we can verify them and eventually merge. Feel free to check out our [contributing guidlines](contributing.md) to learn more.

repository: miaoxd/synthesis

repo_name: miaoxd/synthesis


text:
# Disaster Response Pipeline Project

### Table of Contents

1. [Installation and Instructions](#installation)
2. [Project Motivation](#motivation)
3. [File Descriptions](#files)
4. [Results](#results)
5. [Licensing, Authors, and Acknowledgements](#licensing)

## Installation and Instructions

All aditional python libraries to run this project are in *requirements.txt*. The code should run in Python versions 3.*.

1. To install all dependences, run in comand line:

          `pip install -r requirements.txt`

2. Run the following commands in the project's root directory to set up database and model.

    - To run ETL pipeline that cleans data and stores in database:
        `python src/process_data.py data/raw/disaster_messages.csv data/raw/disaster_categories.csv data/processed/DisasterResponse.db`
    - To run ML pipeline that trains classifier, saves it and stores results in database:
        `python src/train_classifier.py data/processed/DisasterResponse.db models/model.pkl`

3. Run the following command in the project's root directory to run web app:
    `python wsgi.py`

4. Go to http://<IP_ADDRESS>:3001//

## Project Motivation

For this project, I was interestested in creating a machine learning model to predict if a natural disaster happens based in text messages.
The solution is a pipeline end-to-end to deploy a web app with model embedded in a cloud service.

All raw data sets were organized and labeled by [Figure Eight](https://appen.com/).

## File Descriptions

1. File structure of the project:

.
|-- app
|   |-- template
|   |   |-- master.html  # main page of web app
|   |   |-- go.html  # classification result page of web app
|   |-- __init__.py # app module init
|   |-- run.py  # Flask file that runs app
|-- data
|   |-- processed
|   |   |-- DisasterResponse.db # sqlite database to store processed data.
|   |-- raw
|   |   |-- disaster_categories.csv  # data to process
|   |   |-- disaster_messages.csv  # data to process
|-- docs
|   |-- imgs
|   |   |-- home_app.PNG # picture of home app
|   |   |-- plots.PNG # picture of plots
|   |   |-- model_result_1.PNG # picture 1 of model prediction
|   |   |-- model_result_2.PNG # picture 2 of model prediction
|-- models
|   |-- model.pkl  # saved model
|-- src
|   |-- process_data.py # script to process raw data
|   |-- train_classifier.py # script to train a new model
|-- utils_pkg
|   |-- utils_pkg #
|   |   |-- __init__.py # package init
|   |   |-- transformers.py # module containing custom sklearn transformers
|   |   |-- utils.py # module containing auxilar functions
|   |-- setup.py # package setup
|-- LICENSE
|-- Procfile # config file to deploy in Heroku plataform
|-- README.md
|-- requirements.txt # dependencies
|-- wsgi.py # entry point to run the app

2. In `data/processed/DisasterResponse.db` there are 2 tables:
- *messages* - process data
- *results* - model score metrics for test data

## Results

1. Home app and plots:

![Picture 1](docs/imgs/home_app.PNG)
![Picture 2](docs/imgs/plots.PNG)

2. Example of model's predict:

![Picture 3](docs/imgs/model_result_1.PNG)
![Picture 4](docs/imgs/model_result_2.PNG)

3. Deploy:

The application can be accessed [here](https://dis-resp-app.herokuapp.com/).

4. Features used to train the model:
- TF-IDF extractions of message after text processing
- Number of tokens in the message
- Message genre

5. Modeling challeges:

This problem has a lot of imbalanced labels. As example, *child_alone* was dropped because there is not positive samples for
it.
The impact of imbalanced data is the possibility of trainned model to be biased for the majority class. Therefore, during model training, class_weight was set up
to 'balanced' as a possible treatment. However, it is observed in graph *F1-score x Percentage of positive class* that in labels too imbalanced, the performance
decreases a lot.

## Licensing, Authors, Acknowledgements

All raw data credit is from Figure Eight. Otherwise, use the code as you wish.


text:
# Recipes Builder Serverless API

A serverless, Node.js API deployed to AWS for a Recipe Building app.

Code is adapted from a serverless starter that adds ES6, TypeScript, serverless-offline, linting, environment variables, and unit test support. Create by adapting the [Serverless Stack](http://serverless-stack.com) guide. The starter repo can be found here [Serverless Node.js Starter](https://github.com/AnomalyInnovations/serverless-nodejs-starter).

repository: mindwrapped/recipes-app-api

repo_name: mindwrapped/recipes-app-api


text:
# Set Up Kubernetes Repos

1. make sure the $HOME/go/src/github.com/kubernetes directory exists
1. clear out (remove) kubernetes repo if is already there (just makes things smoother with a new clone)
1. clone kubernetes/kubernetes repo into that directory as "upstream"
1. add k3s-io/kubernetes repo as "k3s-io"
1. fetch all objects from both repos into your local copy
   1. it is important to follow these steps because Go is very particular about the file structure (it uses the the file structure to infer the urls it will pull dependencies from)
   1. this is why it is important that the repo is in the github.com/kubernetes directory, and that the repo's directory is "kubernetes" matching the upstream copy's name `$HOME/go/src/github.com/kubernetes/kubernetes`


text:
# RabbitMQ Implementation
A RabbitMQ front-end to BundleGen.

## Architecture
![](./Rabbitmq.png)

### Terminology
* Client - the application sending requests to BundleGen
* Server - BundleGen instance(s)

### Design
* Requests for Bundle generation are sent by the client to the `bundlegen-requests` queue, where BundleGen server instances are listening for messages.
    * Messages are sent in msgpack format
* When BundleGen has completed bundle generation:
    * If success - BundleGen will save the resulting `tar.gz` in it's output directory and send a success message containing the bundle filepath over the `reply-to` queue back to the requestor
    * If failure, BundleGen will send a failure message over the `reply-to` queue

The reply-to queue is a temporary queue generated by RabbitMQ that exists for the lifecycle of the client. Each client gets a unique reply-to queue so that BundleGen always sends the success/failure message back to the client that requested it. https://www.rabbitmq.com/direct-reply-to.html

### Message Format
Messages should be sent in msgpack format.

The bundle generation request should contain the following files (see `message.py`)
```
uuid: str
platform: str
image_url: str,
app_metadata: dict,
lib_match_mode: "normal"|"image"|"host"
```

BundleGen will respond with the following message on success/failure
```
success: bool
uuid: string
bundle_path: string [only if success == true]
```

### Usage
Install BundleGen as normal:
```
pip install -r requirements.txt
pip install --editable .
```

Create a `.env` file in this directory using `sample.env` as an example.

Run `bundlegen-rabbitmq start`
```
bundlegen-rabbitmq -v start
2021-07-06 12:22:31.666 | INFO     | bundlegen.rabbitmq.main:start:262 - Starting RabbitMQ BundleGen consumer. . .
2021-07-06 12:22:31.686 | INFO     | bundlegen.rabbitmq.main:start:282 - Connected to RabbitMQ broker. Waiting for messages. . .
```

View `bundlegen-rabbitmq --help` for all available options

### Configuration
`bundlegen-rabbitmq` reads some settings either from environment variables or a `.env` file.

See `sample.env` for an example `.env` file.

## Docker Container
See the `<repo-root>/docker/rabbitmq/` directory for a Dockerfile that can be used to run
RabbitMQ and BundleGen.

repository: guruvinayakp/BundleGen

repo_name: guruvinayakp/BundleGen


text:
# Image Noise Removal - CNN-keras
A keras implemention of Deep CNN for Image Denoising and analysed the effective of changing padding and strides in results of PSNR and SSIM.

### Dependence
```
tensorflow
keras2
numpy
opencv
```
### Prepare train data

Clean patches are extracted from 'data/Train100' and saved in 'data/npy_data'.

### Train
```
$ python Main.py -- trains the given image directory
```

Trained models are saved in current directory

### Test
```
$ python Main.py -- test the given image directory('data/Test/Set68') by the trained model.
```

denoised images are saved in 'data/OutImg'.

### Results

For the Noise Level 25 , average PSNR(dB) and SSIM results are taken for the dataset.

| Epoch   | Noise Level| Padding | Stride  | PSNR    | SSIM    |
|:-------:|:----------:|:-------:|:-------:|:-------:|:-------:|
| 10      | 25         |50       |5        |25.57    | 0.79    |
| 10      | 25         |60       |5        |26.16    | 0.75    |
| 10      | 25         |70       |4        |27.99    | 0.77    |
| 10      | 25         |40       |4        |28.62    | 0.77    |
| 10      | 25         |60       |3        |26.24    | 0.76    |
| 10      | 25         |10       |3        |28.38    | 0.75    |
| 10      | 25         |10       |1        |28.65    | 0.74    |
| 10      | 25         |**30**   |**1**    |**28.88**| **0.80**|

  ###  The above table shows the average PSNR and SSIM obtained for various padding size and strides. Here i have used minimum epochs with lesser gaussian noise. From the result, it shows that with the minimum Stride and increased Padding will helps to achieve maximum accuracy in image denoising.


text:
# Pimento Cheese Grits

## Overview

- Yield: 4
- Total Time: 1 Hr

## Ingredients

#### Pimento Cheese

- 12 ounces sharp white cheddar cheese freshly grated

- 1 4-ounce jar of pimentos, drained

- 4 ounces 1/2 block cream cheese, softened

- 1/2 cup mayonnaise

- 1/2 teaspoon garlic powder

- 1/2 teaspoon onion powder

- 1/4 teaspoon salt

- 1/4 teaspoon pepper

#### Grits

- 4 cups low-sodium chicken or vegetable stock

- 1 cup quick-cooking grits I like the quaker 5 minute grits, but you can definitely use the stone ground if you’re a grit purist! – just follow the directions they come with.

- 1/4 teaspoon salt

- 1/4 teaspoon pepper

- 6 slices cooked bacon

- 4 eggs cooked to your liking! (poached, fried, etc)

- 1/4 cup sliced green onions for topping

## Method

#### Pimento Cheese

1. Add all ingredients together in a large bowl and mix well until combined.

---

#### Grits

1. As a note, I like to get the bacon started (I usually just fry it in a skillet!) and have a skillet or pot ready for your eggs.
---
2. Bring the stock to a boil in a medium saucepan. Once boiling, add the grits and whisk constantly until they are fully mixed into the stock, about a minute or two. Reduce the heat to low and cover, stirring once or twice more, until the grits are thicker and creamy, about 5 minutes. Stir in about 1/2 to 2/3 cup of pimento cheese until creamy. Keep the grits over the lowest heat possible and take a few minutes to cook the eggs to your liking.
---
3. To serve, spoon the grits into bowls. Top with an egg, a slice or 2 of bacon and some green onions. I like to serve with a spoonful of extra pimento cheese!
---

## References and Acknowledgments

[How Eat Sweets - Pimento Cheese Grits](https://www.howsweeteats.com/2018/04/pimento-cheese-grits/)

repository: troyerta/recipes

gha_language: Python

repo_name: troyerta/recipes


text:
Blackjack game (varied game rules)

Setup required:
java 1.8
sbt (mine is 0.13.13)
npm

Go to \[root project folder]\public\angular\
In cmd: npm install
it should get all the neccesary front end modules like angular


text:
---
layout: default
---

# 1996-01-10 - Bignum support added to XLISP 2.1h

## Header Data

From<EMAIL_ADDRESS>(Peter Wayner)

To<EMAIL_ADDRESS>Message Hash: 9a78702da4659574792fd498c051d51970e06cfd6406ada343a35ba65cf68a04

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-01-10 16:35:08 UTC

Raw Date: Thu, 11 Jan 1996 00:35:08 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Peter Wayner)
Date: Thu, 11 Jan 1996 00:35:08 +0800
To<EMAIL_ADDRESS>Subject: Bignum support added to XLISP 2.1h
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Many cypherpunks might enjoy programming in XLISP 2.1h because the freely
available implementation of LISP now offers support for BIGNUMS. That means
it is quite easy to write cryptographic algorithms that use very large
numbers without adding extra support. The downside is that the language is
interpretted and thus much slower than something like C.

It should also be possible to write RSA in a very short XLISP program. I
don't know if you can do 4 lines, but it should be quite short.

-Peter

{% endraw %}
```

## Thread

+ Return to [January 1996](/archive/1996/01)

+ Return to "[grimm@MIT.EDU](/authors/grimm_at_mit_edu)"
+ Return to<EMAIL_ADDRESS>(Peter Wayner)](/authors/pcw_at_access_digex_net_peter_wayner_)"
+ Return to "["Perry E. Metzger" <perry@piermont.com>](/authors/perry_e_metzger_perry_at_piermont_com_)"
+ Return to "[Rick Busdiecker <rfb@lehman.com>](/authors/rick_busdiecker_rfb_at_lehman_com_)"

+ 1996-01-10 (Thu, 11 Jan 1996 00:35:08 +0800) - Bignum support added to XLISP 2.1h -<EMAIL_ADDRESS>(Peter Wayner)_
  + 1996-01-10 (Thu, 11 Jan 1996 02:03:02 +0800) - [Re: Bignum support added to XLISP 2.1h](/archive/1996/01/5d5ae1b3de8c089ba8cc069d047508f45b9f7715fa973915305ebf739568a139) - _"Perry E. Metzger"<EMAIL_ADDRESS>  + 1996-01-15 (Sun, 14 Jan 96 20:39:30 PST) - [Re: Bignum support added to XLISP 2.1h](/archive/1996/01/9b16f254bd55d77439a7af0c3d4bd23dd7e2cbc7643ed8d6036305fe83661b08) - _Rick Busdiecker<EMAIL_ADDRESS>    + 1996-01-15 (Mon, 15 Jan 96 09:36:41 PST) - [Re: Bignum support added to XLISP 2.1h](/archive/1996/01/93b5553aec565ae9f7052214b33c55ddf0831559b92fdbcba181668981386aef) -<EMAIL_ADDRESS>


text:
# Data Analytics Portfolio
Repository containing portfolio of data Analytics projects completed by me for academic, self learning, and hobby purposes. Presented mostly in the form of iPython Notebooks.

_Note: Data used in the projects (accessed under data directory) is for demonstration purposes only._

## Contents

- ### Data Exploration Projects

	- [Scraping and Analyzing Datascience jobs from Glassdoor](https://nbviewer.jupyter.org/github/muhammadtoqeerzafar/muhammadtoqeerzafar.github.io/blob/main/Scraping_and_analyzing_glassdoor_data.ipynb): Scraping the data from Glassdoor and cleaning and analyzing it

	_Tools: Python, Selenium, Matplotlib, Seaborn_

	- [Preprocessing data to predict Home Prices in Banglore](https://github.com/muhammadtoqeerzafar/muhammadtoqeerzafar.github.io/blob/main/Data_Cleaning_Practice_Predicting_Home_Prices_in_Banglore.ipynb): Preparation and cleaning of Data to build a linear regression model using banglore home prices dataset.

	_Tools: Numpy, Pandas, Matplotlib_
	- [COVID-19 Data exploration Using SQL](https://github.com/muhammadtoqeerzafar/muhammadtoqeerzafar.github.io/blob/main/COVID-19%20Data%20exploration%20using%20SQL.sql):
Exploration of COVID-19 data to find out insights.

	_Key Skills: [Summary of SQL skills](https://github.com/muhammadtoqeerzafar/muhammadtoqeerzafar.github.io/blob/main/SQL_Skills.md)_

- ### Data Analysis and Visualisation
	 __MS PowerBI__
	- [Superstore's Performance ](https://github.com/muhammadtoqeerzafar/muhammadtoqeerzafar.github.io/blob/main/MS%20PowerBi/Sales_Insights_SuperStore.pdf): Developing report and dashboard to track the performance of super store in each state of U.S over the period of last 04 years.

	- [Tracking Sales and revenue](https://github.com/muhammadtoqeerzafar/muhammadtoqeerzafar.github.io/blob/main/MS%20PowerBi/Sales%20and%20revenue%20trends.pdf): Developing a live dashboard for Sales director to track sales, profit and revenue trend of each branch of a Computer Hardware Store.

	- [Students Performance Overview](https://github.com/muhammadtoqeerzafar/muhammadtoqeerzafar.github.io/blob/main/MS%20PowerBi/Students_performance_overview.pdf): Creating a report to present to academic Head to figure out the reason of failiure of students.

	_Key Skills: Transform shape and model data, Connecting PowerBi to MySQL, Data preparation in Power Query Editor, transformation tools, Front End Development including report and dashboard designing, Geospatial Data, Shape Maps and DAX_

If you liked what you saw, want to have a chat with me about the portfolio, work opportunities, or collaboration, shoot an email at<EMAIL_ADDRESS>

repository: ZilEHumashah/Protfolio

repo_name: ZilEHumashah/Protfolio


text:
---
layout: post
title: Good Design, Bad Design
subtitle: Assignment Due 9/10/18
gh-repo: daattali/beautiful-jekyll
gh-badge: [star, fork, follow]
tags: [assignment]
---

**Good Design, Bad Design**

Interested in what I think is [good design](https://kennethan12.github.io/assignments/good/good-design/) and [bad design](https://kennethan12.github.io/assignments/bad/bad-design/)? Check these out.


text:
# Description
Get all the subdomains and other DNS entries for the given domain. Ex: Get-ShodanDNSdomain -domain google.com -API

**Note:** Depending on the domain the output can be very long, you may want to consider redirecting the response to a file for ease of use.
## Prerequisites
You will need to have downloaded and installed the script already. Please see [Downloading](https://github.com/simeononsecurity/Shodan_PS#Download) and [Installing](https://github.com/simeononsecurity/Shodan_PS#Install) for further instruction.

## Usage
Run the script by entering the module name with the domain parameter followed by the domain name and then the API parameter followed by the api key in quotes.

```
PS C:\WINDOWS\system32> Get-ShodanDNSdomain -domain exampledomain.com -API "ApiKeyGoesHere"

Data         Value
----         -----
"more"        true
 "domain"     "exampledomain.com"
 "tags"       ["ipv6"]
 "data"       [
"subdomain"   ""
 "type"       "MX"
 "value"      "subdomain.exampledomain.com"
 "last_seen"  "2020-12-02T16
"subdomain"   "anothersubdomain.exampledomain.com"
 "type"       "CNAME"
 "value"      "anothersubdomain.exampledomain.com"
 "last_seen"  "2020-12-05T12
"subdomain"   "yetanothersubdomain.exampledomain.com"
 "type"       "AAAA"
 "value"      "2607
 "last_seen"  "2020-11-25T08
 ...
```
To redirect the output to a file in your current path, simply add the right angle bracket to the end of the command followed by the name of the output file.
```
PS C:\WINDOWS\system32> Get-ShodanDNSdomain -domain exampledomain.com -API "ApiKeyGoesHere" > output.txt
```

To learn more about redirection please read the [documentation.](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.1#:~:text=Use%20the%20Out%2DFile%20cmdlet,sends%20it%20to%20the%20pipeline.)

gha_language: PowerShell


text:
# What is Double Ended Queue?

It is a homogeneous list of elements in which insertion and deletion operations are performed from both the ends i.e, we can insert elements from the rear end or from the front ends. Hence, it is called double-ended queue. It is commonly referred to as deque.

There are two types of deques. These two types are due to the restrictions put to preform either the insertions or deletions only at the end. They are :

1. Input Restricted Deque

2. Output Restricted Deque

Four Operations :

=> Insertion of an element at the REAR end of the queue

=> Deletion of an element from the FRONT end of the queue

=> Insertion of an element at the FRONT end of the queue

=> Deletion of an element from the REAR end of the queue

## Description of the algorithm

Algorithm for Insertion at rear end

```python
Step-1: [Check for overflow]
		if(rear==MAX)
			Print("Queue is Overflow”);
			return;
Step-2:  [Insert Element]
		else
			rear=rear+1;
			q[rear]=no;
		[Set rear and front pointer]
		if rear=0
			rear=1;
		if front=0
			front=1;
Step-3: return
```

Algorithm for Insertion at front end

```python
Step-1 :  [Check for the front position]
		if(front<=1)
			Print("Cannot add item at the front”);
			return;
Step-2 :  [Insert at front]
		else
			front=front-1;
			q[front]=no;
Step-3  : Return
```

Algorithm for Deletion from front end

```python
Step-1 [ Check for front pointer]
		if front=0
			print(" Queue is Underflow”);
			return;
Step-2 [Perform deletion]
		else
			no=q[front];
			print(“Deleted element is”,no);
		[Set front and rear pointer]
		if front=rear
			front=0;
			rear=0;
		else
			front=front+1;
Step-3 : Return
```

Algorithm for Deletion from rear end

```python
Step-1 : [Check for the rear pointer]
		if rear=0
			print(“Cannot delete value at rear end”);
			return;
Step-2:  [ perform deletion]
		else
			no=q[rear];
			[Check for the front and rear pointer]
		if front= rear
			front=0;
			rear=0;
		else
			rear=rear-1;
			print(“Deleted element is”,no);
Step-3 : Return
```

## Time complexity

Insertion or deletion in the middle is O(n)

The time complexity of random access by index is O(1)

time complexity of all enque(insert)/deque(delete) operations is O(1)

repository: myNameArnav/dsa-visualizer

repo_name: myNameArnav/dsa-visualizer


text:
# webhookit
Tool built in Go for verifying the integrity of GitHub web hooks and providing the option to delete web hooks based off of multiple parameters.

## Usage
- `export WEBHOOKIT_API_KEY=<api-key>` Ensure api key has privileges to modify web hooks in your repositories.
- `go build`
- `./webhookit <action> [options]`

### Actions
- `--c`
    Check repos for broken webhooks. Cannot be used along with -destroy.
- `--d`
    Destroy broken webhooks. Cannot be used along with -check.

### Options
- `-f <string>`
    File path of JSON file containing repos. Uses filepath as argument. Cannot be used along with -repo.
- `-r <string>`
    A single specified repo using the syntax namespace/repo. Cannot be used along with -filepath.
- `-t <string>`
    CSV list of HTTP status code types to destroy e.g. 2XX, 501 e.g. 2XX, 501 or `none` to disable HTTP status code matching (default "3XX,4XX,5XX").
- `-b <string>`
    Backup webhooks to JSON file. Uses filepath as argument.
- `-ds`
    Include duplicates webhooks when destroying.
- `-l`
    List hooks to be destroyed before confirmation.
- `-u`
    Include untriggered webhooks when destroying.

### Encountering duplicates
With the -ds option specified, a dialog will appear on encountering a duplicate. This shows a diff of all the duplicates found for that particular webhook and then allows you to choose which webhooks to destroy, through the use of a CSV list.

### Repos JSON file syntax
```
{
    "repos": [
        {
            "name": "eimlav/api-testing"
        }
    ]
}
```

repository: eimlav/webhookit

repo_name: eimlav/webhookit


text:
# `powerly` `1.7.1`

## Improvements

* Update moved URL https://codecov.io/gh/mihaiconstantin/powerly to
  https://app.codecov.io/gh/mihaiconstantin/powerly based on comments of CRAN
  maintainer Uwe Ligges.

# `powerly` `1.7.0`

## Features

* Add `summary` S3 method support for `Validation` class objects.

## Improvements

* Add new `R` version to the CI pipeline for the `R CMD check` job.

* Update `R CMD check` workflow to use `check` action from `r-lib/actions`.

* Add explicit `.data` and `.env` pronoun calls (i.e., from the `rlang` package)
  to variables used inside data-masking function (e.g., `ggplot2::aes()`) to
  avoid `CRAN` notes regarding missing bindings for global variables. See this
  question for more information: https://stackoverflow.com/q/9439256/5252007.

* Update plot functions to respect the signature of the S3 plot generic.

* Improve documentation and positioning of figures in the help pages.

* Create `roxygen2` templates for documenting the public API and S3 methods.

* Extract `plot()` methods from `R6` classes into standalone S3 methods.

* Update package start-up logo with message to welcome and encourage users to
  submit ideas for improving the package.

* Extend CI workflow to include branch `dev`.

* Fix preprint URL in package documentation.

* Fix heading typo in news file.

## Bug fixes

* Fix backend test where the cluster would contain an unexpected `.Random.seed`.
  The `.Random.seed` is caused by loading the `bootnet` package which in turn
  loads the `snow` package. The `snow` package uses the `RNG` within the
  `.onLoad()` function to draw from the uniform distribution and set a port
  number. The result of this operation is a `.Random.seed` in the `.GlobalEnv`.
  For more information see: https://stackoverflow.com/q/69866215/5252007 and
  https://github.com/SachaEpskamp/bootnet/issues/82.

# `powerly` `1.6.1`

## Improvements

* Update line exclusions for `covr::codecov()`.

# `powerly` `1.6.0`

## Improvements

* Add new `Validation` class plot to `README.md` file.

* Update `GgmModel` tests to vary various model estimation and data generation
  parameters.

* Update `testthat::expect_equal` to test with a tolerance of `1e-6` for `Basis`
  and `Solver`.

* Replace own `GgmModel` estimation with `qgraph::EBICglasso()`.

* Add ECDF plot to `Validation` class.

* Import external functions to `NAMESPACE` via `Roxygen2`.

* Add more cool badges to `README.md` (e.g., CRAN version and check status).

* Fix missing missing period in package description in `DESCRIPTION` file.

## Bug fixes

* Fix issue where `GGM` estimation test would fail due to a precision level set
  too high.

# `powerly` `1.5.2`

## Bug fixes

* Update `Description` field in `DESCRIPTION` file to follow CRAN guidelines.

# `powerly` `1.5.1`

## Bug fixes

* Update preprint link in `powerly()` documentation to use the `\doi{}` syntax
  as indicated by CRAN member Uwe Ligges.

* Update `DESCRIPTION` to start with capital letter as indicated by CRAN member
  Uwe Ligges.

* Fix typo in `DESCRIPTION`.

# `powerly` `1.5.0`

## Features

* Add preliminary `summary()` support for `Method` and `Validation` objects.

* Update citation and references to the preprint available at
  [psyarxiv.com/j5v7u](https://psyarxiv.com/j5v7u).

* Add `ggplot` plots and saving support for `StepOne`, `StepTwo`, `StepThree`
  and `Validation` objects.

## Improvements

* Migrate from `R` base plots to `ggplot2` and `patchwork`.

* Add more detailed `Description` in `DESCRIPTION` file as per comment by CRAN
  member Julia Haider.

## Bug fixes

* Fix seed in `StepOne` unit test.

* Fix superfluous test fail for `GGM` model estimation. Restricted the unit test
  to compare the estimated edge weights up to 7 digits precision.

# `powerly` `1.4.0`

## Features

* Add code coverage workflow based on action provided by
  `usethis::use_github_action("test-coverage")` and badge to `README.md`.

# `powerly` `1.3.0`

## Bug fixes

* Fix cluster creation bug in `Backend` when the machine had only 1 or 2 cores.
  The previous version would result in an error when the machine contained only
  1 or 2 cores. Now, when the machine has only 1 core, the cluster creation will
  fail, with a message that not enough cores are available. When the machine has
  2 cores, all 2 cores are used. In all other cases, the number of cores used is
  given by the number of cores on the machine minus one.

## Improvements

* Add names and comments to workflow file `R-CMD-check.yaml`.

* Update `README.md` and package startup logo to only show major version.

* Update existing tests and added new ones.

* Add type check for `method` argument of `validate()` to ensure that only
  instances of `Method` class (i.e., produced by `powerly()` are passed).

* Add `Backend` stopping to `on.exit()` in `powerly()` to ensure the cluster is
  stopped no matter the execution status of the function.

* Improve logic around setting and resetting the number of cores when the
  cluster is created and stopped (i.e., also for adopted clusters).

* Correct version number and add changes in `NEWS.md` for `1.2.0`.

# `powerly` `1.2.0`

## Features

* Add *CI* workflow via `usethis::use_github_action_check_standard()`.

## Bug fixes

* Restrict tests to using a maximum of two cores to respect CRAN restriction.

## Improvements

* Hide package logo at startup if the `R` session is not interactive.

* Add more informative changelogs to `NEWS.md` for previous releases.

# `powerly` `1.1.1`

## Bug fixes

* Add `.remove_missing()` to clear any `NA` values that may be present in
  `.measures` in `StepOne` class after the *Monte Carlo* procedure.

# `powerly` `1.1.1`

## Bug fixes

* Fix broken URLs in documentation causing build warnings.

# `powerly` `1.1.0`

## Features

* Add `validate()` public *API* to validate method results.

* Add `Validation` class to perform validation on a `Method` object.

## Improvements

* Add example in `README.md` for `validation()` and fixed images.

* Decrease legend font size in `StepThree` class.

* Rename from quantile to percentile in `StepThree` class plots.

# `powerly` `1.0.0`

* Add `powerly()` public *API* to run the method.

* Add `generate_model()` public *API* to generate true models.

* Add package documentation for public *API*.

* Add plotting for all three method steps.

* Add option to save last two iterations in `Method` class.

* Add `Method` class to run the method steps iteratively.

* Add parallel support for *Step 1* and *Step 3* of the method.

* Add `Backend` class to manage parallel clusters.

* Add support for multiple solvers for estimating spline coefficients.

* Rewrite prototype using `R6` *OOP* style into first stable release.

# `powerly` `0.2.0`

* Remove text feedback from each method step function.

# `powerly` `0.1.1`

* Fix bug cased by initial candidate sample size ranges being too narrow.

# `powerly` `0.1.0`

## Features

* Add preliminary support for the *Gaussian Graphical Model* via `ggm` object.

* Add preliminary support for two statistics via `statistic.power()` and
  `statistic.mean()`.

* Add `validate.recommendation()` prototype for validating a sample size
  recommendation.

* Add `run.method()` prototype for running all method steps iteratively.

* Add `run.step.1()` prototype for *Step 1* of the method.

* Add `run.step.2()` prototype for *Step 2* of the method.

* Add `run.step.3()` prototype for *Step 3* of the method.

---

# Planned changes and ideas to consider

- Add tests for `Validation` class.
- Option to set seeds for the cluster via `parallel::setclusterSetRNGStream`
- Mechanism for performing replicable simulations using the method.
- Mechanism for extending the package with new models, measures and statistics.
- Tutorial for methodologists on how to extend the package.
- Tutorial to demonstrate how the internal API of the package can be used.
- Add *UML* class diagram to give an overview of the structure of the package.
- Add package website using the `pkgdown` generator.
- Switch to generating `README.md` file from `README.Rmd` via `knitr`.
- Bisectional algorithm for choosing an optimal starting range (i.e., not too
  wide, not too narrow).
- Switch to accelerated bootstrap CI in `StepThree` for better precision.
- Reuse Monte Carlo results from previous iterations if they fall within the
  updated range.
- Shiny application for running the method.
- Allow rerunning the validation procedure with a custom sample size.
    - If multiple custom sample sizes are used during the validation, then
      switch from the histogram to a violin plot.

repository: riccardoporreca/powerly

gha_license_id: NOASSERTION

repo_name: riccardoporreca/powerly


text:
# publish-docs hook: when tapestry runs post-deploy documentation publishing

**THESE HOOKS ONLY RUN UNDER CI, NEVER UNDER** `tapdev`**!**

## hooks :
* `tapestry:before:publish-docs`
* `tapestry:after:publish-docs`

Please see [docs/hooks/documentation](../documentation.md) for more info.

repository: tapestry-ci/tapestry

repo_name: tapestry-ci/tapestry


text:
---
layout: post
title: "Dying languages"
categories:
- culture
date: 2002-12-11 00:00
comments: true
---

This is heart-breaking and uplifting at the same time: Ethnologue, Languages of the World [via BoingBoing] lists thousands of languages, where they are spoken, and how many people still speak it. The diversity is staggering, as are some of the names: anyone here from Mali who speaks Xaasongaxango? But a depressing number of the entries are labelled "extinct" or "nearly extinct". It's really sad that all these local languages are being lost. When you lose a language, you lose a culture and a history, as language colours so much of how a community sees the world and interacts with it. If I could find a "Xaasongaxango for Dummies" book (and I wasn't so utterly rubbish at learning languages), I'd learn it just to try to stop it disappearing entirely.

repository: bsag/blog-octo

repo_name: bsag/blog-octo


text:
---
slug: parker-mccollum-tests-positive-for-covid
title: Parker McCollum Tests Positive for COVID
date: 2020-08-19
tags: [coronavirus]
image: images/parker.jpg
---

It's tough times for everyone all around. [Parker McCollum][parker] was excited to get back to playing shows in Kansas and Oklahoma when he sat down to breakfast and realized he couldn't smell or taste anything. After visiting the doctor, he tested positive for COVID-19.

> _Parker McCollum has deleted [this tweet][tweet]._

This is terrible news to get just as music venues are starting to open up for masked, socially distant shows. Don't worry Parker, you didn't let us down. Focus on your recovery and get well soon, [Daily Texas Country][dtxc] is sending you good vibes.

And once again, [_**#fuck2020**_][2020].

[parker]: https://twitter.com/ParkerMcCollum
[2020]: https://twitter.com/hashtag/fuck2020
[dtxc]: https://twitter.com/dailytxcountry
[tweet]: https://twitter.com/ParkerMcCollum/status/1296238129142206469


text:
# aws-architecture-icon-browser

AWS publish the [AWS Architecture Icons][icons], a collection of product and service icons that you can use in architecture diagrams.
I normally download the asset package, which contains PNG and SVG icons.

This is a small web app that lets me look for icons by name, rather than poking through files and folders:

![A screenshot of the browser. There are three headings 'Architecture' 'Category' and 'Resource', and a filter applied for the keyword 'network', which shows a collection of red, orange and purple icons. Icons are shown on the left-hand side, with their name and a list of sizes on the right.](screenshot.png)

Features:

- Display all the icons in a list
- Show me all the different sizes of icon
- Let me search for icons, and see all the matching icons together

[icons]: https://aws.amazon.com/architecture/icons/

## Motivation

I'm sure there are better ways to look at an icon collection if you use professional diagramming software, but I don't have much experience in those tools.
I'm more used to making simple diagrams as hand-written SVGs, or dropping a few icons into a slide deck.
(I use OmniGraffle, but only about 1% of what it can do.)

I threw this together in a pinch while trying to find icons for a blog post, so the code is a bit slapdash.
Use accordingly.
(Apparently there's no icon for CloudWatch Metrics?)

## Usage

This tool needs Python 3.
Once you have Python 3 installed, to run this app:

```
# Clone the repo
git clone https://github.com/alexwlchan/aws-architecture-icon-browser.git
cd aws-architecture-icon-browser

# Install requirements
pip3 install -r requirements.txt

# Run the app
python3 viewer.py
```

The app will automatically download a copy of the AWS Architecture Icons to your computer, then you'll then see the app running at <http://localhost:2520>.

I did consider providing a hosted version, but I'm not sure if anybody else will even find this useful – and there might be copyright issues with serving the icons from my website that I don't want to think about right now.

## License

MIT.


text:
# Coding Assignment for Lana Card

## Quick Start

#### Live Demo

This application is deployed to gh-pages using gatsbyjs. You can see the deployed version here: https://cschwendiman.github.io/restaurant/

#### Running Locally

```
npm install
npm run develop
```

The site is now running at `http://localhost:8000`.

## Requirements

A restaurant needs to keep track on how many ingredients it has left in stock after each order has been placed
They also want to know how many times a recipe has been ordered.
You are being tasked with building a ui that will let management keep track of these things.
Although management is willing to give you creative freedom they do have certain demands and requirements:

#### Main requirements(Actual assignment):

1 - Management is a big fan of Facebook and has heard of this thing called React so they want you to use it
2 - Management wants to be able to see in the same screen pending orders and items inventory
3- Management would like to have a top bar where the number of cancelled, pending, in progress and fulfilled orders is visible
4 - An order should not be created if not all the items are in stock

#### Nice to Have Requirements:

1 - Management has read some tech blogs and learned about TypeScript and would like it to be used
1 -Management likes filtering things, so he would like to be able to filter the items by color
2 - Management wants to be able to cancel an order that is in pending state within 3 minutes of the order being created.
3 - An order should be in pending state when first created and transitioned into in progress state after 3 minutes of being created

All this is supported by the apis the manager wrote and the documentation can be found here
https://app.swaggerhub.com/apis/d65yan/restaurant/0.0.0

The Manager does not have a development environment so anything you can do to make it easier to view the code and the running result would be highly appreciated.

## Description of Design Decisions

## TODO

- Rewrite filters to not renter when filters change, instead of using classes and hiding rows
- Use actual API instead of example response data

repository: cschwendiman/restaurant

repo_name: cschwendiman/restaurant


text:
Pipe Game Solver
================

This is a simple solver for a certain type of "connect the pipes" game.

**THIS CODE IS PROVIDED SOLELY FOR ENTERTAINMENT PURPOSES**

Game Rules
----------

* There is a grid of m*n fields.
* Each field can either be empty or have a pipe with 1,2,3 or 4 neighbours.
* Each pipe must have exactly as many pipes in the 4 adjacent fields (top, left, bottom, right)
  as it's number.
* Two pipes with the same number cannot be neighbours.
* In the end there can be only one interconnected system of pipes (ie. it must be possible to
  reach every pipe on the board from every other pipe without having to go over an empty field).

Usage
-----
The game can be run by executing the `com.github.users.dmoagx.pipes.Game` Java class.
The `examples` folder contains some boards (of varying difficulty) which can be used to test the solver.

Credits
-------
This program is based on a game in "Professor Layton and the Miracle Mask".
(C) 2012 LEVEL-5 Inc.
Distributed by Nintendo

repository: Alexthipp/pipes

repo_name: Alexthipp/pipes


text:
# Deploying on Google Cloud

## Compute Instance
I provisioned a small Ubuntu VM installing
- go
- mysql command-line utility to administor/test the GCP SQL instance running MySQL

## Long Running Event Collector
The main purpose is to run the long running process which
- Queries the Flow blockchain for NBA TopShot contract events
- Uploads the database with the events

I have a simple bash script which runs an infinte loop.  Ideally, you could create a systemd service and provide cloud alerting in-case of errors.

```
#!/bin/bash
export DB_CONNECTION="root:*******@tcp(<IP_ADDRESS>:3306)/topshotdev"
export COLLECTOR_ID=1
while true
do
        echo "START RUN LOOP" >> console
        echo $(date) >> console
        go run ./query_loop.go 1000 >> console 2>> console.err
        sleep 60
done
```

launching via
```
./query_run &
```

repository: NoChopFoundation/topshot-alert

repo_name: NoChopFoundation/topshot-alert


text:
# Responsibilities

* Provide location-specific markers to place on the Leaflet map.
* Bring in the resources to create those markers.

# Approach

* The JavaScript files which support Leaflet are intended to be
used across a broad range of browser-based applications.
* Since ionic builds device apps using Type Script, there are a
few steps required to get the resources in place:
  * image files
  * CSS (actually, SCSS)
  * JavaScript
* There are Stack Overflow posts for bringing in Font Awesome
  (https://stackoverflow.com/questions/39122669/using-font-awesome-in-ionic-2),
  but that only gets you part way there.
  * SCSS and images for Font Awesome itself is covered.
  * The Leaflet CSS that is supplied with `leaflet.awesome-markers` has
    additional CSS.
* Additional steps:
    * Copy leaflet.awesome-marker's CSS to a SCSS file.
    * Include a line in the `config/sass.config.js` to grab that SCSS.
    * manually copy the images into the build directory.

## Debugging

Looking at the markup and styles that get brought in and placed
on the map is perhaps the easiest way to tell if the needed
resources have been applied to the DOM elements.

## Resources
* Font Awesome icon cheatsheet: http://fontawesome.io/cheatsheet/
* Plugin: https://github.com/lvoogdt/Leaflet.awesome-markers
* Approach: https://stackoverflow.com/questions/39122669/using-font-awesome-in-ionic-2
* Not followed, but maybe worthwhile: https://luiscabrera.site/tech/2017/01/09/fontawesome-in-ionic2.html

repository: ClueRide/MobiLoc

gha_language: TypeScript

repo_name: ClueRide/MobiLoc


text:
# microscopy-instrumentation
DataJoint pipeline for maintenance and configuration of microscopy instrumentation

## Notes (preliminary): List of fields to record:

#### General categories of elements:

* Objectives: List of all Objectives used in the lab
* Filters : List of all filters used in the labs with details of supplier, catalogue number or custom supplier assigned name or number, description, and tiff/jpeg/png or excel uploaded spectra
* PMTs list (fields include name, serial number, date of production, date of installation, microscope name/location, color it is used for, QE measurement(s))
* Laser (brand, head serial number, location, date of most recent install, date of cooling liquid replacement, date of last wavelength tuning routine was run, measurement of power spectrum at specific wavelength)
* Scanners type (assembly type (XY mount, XY lens conjugated, XYY) supplier, model, resonant/non-resonant, Res freq)
* GDD method (one field taking the values of “internal to laser”, “external table”, “both”)
* Fast Z-scanning (one field taking the values of “remote focussing”, “liquid lens”, “electrowetting lens”, “piezo-objective”)
* Preamplifiers list
* DAQ system (NI chassis / NI6710 / ScanImageBoard(2019)...)

#### Specifics of individual microscopes (A priori, these values are fixed)

* Microscope (name, location, categorie, its laser, its filters, fast z-method, GDD method, scanner type)

#### Status of a microscope and  calibration:

*  Channel 1 configuration:
  -- color
  -- PMT installed
  -- Preamplifier model installed
  -- Preamplifier settings
  -- Conversion Digital Units to photon number
*  Channel 2 configuration: ...
*  objective installed,
*  Wavelength
*  GDD
*  Pulse width at sample
*  PSF
*  Flat Field
*  Field Curvature
*  ScanImage Percentage Power conversion to mW
*  Fluorescein recording to verify MP proper power law

repository: thiberge/microscopy-instrumentation

repo_name: thiberge/microscopy-instrumentation


text:
# MLflow workshop
First steps to interact with [MLflow](mlflow.org).

The idea aims to discover how MLflow works and which benefits could provide to our Data Scientists.

[![Build Status](https://travis-ci.com/afranzi/mlflow-workshop.svg?branch=master)](https://travis-ci.com/afranzi/mlflow-workshop)

# Steps
## Environment setup
Create a **virtual env** with Python3 to have a clean setup for our projects with all the required libraries listed in the **requirements.txt**

```:python
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
```

# Tracking API
***Docs:** [MLflow // docs // Tracking](https://mlflow.org/docs/latest/tracking.html)*

> Launch Tracking UI (*http://localhost:5000*)
```
mlflow ui
```

```
mlflow server \
    --file-store /tmp/mlflow/fileStore \
    --default-artifact-root /tmp/mlflow/artifacts/ \
    --host localhost
    --port 5000
```

> Launch MLFlow Tracking Docker
```
docker run -d -p 5000:5000 \
    --name mlflow-tracking afranzi/mlflow-tracking:0.7.0
```

By default it will store the artifacts and files inside ***/opt/mlflow***.
It's possible to define the following variables:
* MLFLOW_HOME (`/opt/mlflow`)
* MLFLOW_VERSION (`0.7.0`)
* SERVER_PORT (`5000`)
* SERVER_HOST (`<IP_ADDRESS>`)
* FILE_STORE (`${MLFLOW_HOME}/fileStore`)
* ARTIFACT_STORE (`${MLFLOW_HOME}/artifactStore`)

> ⚠**NOTE** Since clients needs to have access to the final path, it would be better to use a remote store, since we would need to have direct access to the fileStore directory.

# Run trainings
Since we have our MLflow Tracking docker exposed at 5000, we can log executions by setting the env variable `MLFLOW_TRACKING_URI`.
```
MLFLOW_TRACKING_URI=http://localhost:5000 python example.py
```

# Serving models
***Ref:** [Saving and serving models](https://mlflow.org/docs/latest/quickstart.html#saving-and-serving-models)*

```
MLFLOW_TRACKING_URI=http://<IP_ADDRESS>:5000 mlflow sklearn serve \
    --port 5005 \
    -r 3e86bf0f27a347c59f0735aa92510a69 \
    -m model
```

> i.e: Query Wine Quality model prediction
```
curl -X POST -H "Content-Type:application/json" \
    --data '[{"fixed acidity": 3.42, "volatile acidity": 1.66, "citric acid": 0.48, "residual sugar": 4.2, "chlorides": 0.229, "free sulfur dioxide": 39, "total sulfur dioxide": 55, "density": 1.98, "pH": 5.33, "sulphates": 4.39, "alcohol": 20.8}]' http://<IP_ADDRESS>:5005/invocations
```

# Run model from Spark

> pyspark
```
import mlflow.pyfunc
wine_udf = mlflow.pyfunc.spark_udf(spark, '/tmp/mlflow/artifacts/0/b0dfd62600ac4289a7b1bc058c528aad/artifacts/model/')
df = spark.read.format("csv").option("header", "true").option('delimiter', ';').load('/Users/yc00096/Projects/mlflow-workshop/examples/wine_quality/data/winequality-red.csv')
df.withColumn("prediction", wine_udf('fixed acidity','volatile acidity','citric acid','residual sugar','chlorides','free sulfur dioxide','total sulfur dioxide','density','pH','sulphates','alcohol')).show(10, False)
```

# Jupyter

```
export SPARK_HOME=~/spark
export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS='notebook  --notebook-dir=/Users/yc00096/Projects/notebooks'
```

# Notes

## Docker management
***Ref:** [Remove docker images and containers](https://tecadmin.net/remove-docker-images-and-containers/).*

> List all images
```
docker images
```

> Remove intermediate images
```
docker rmi $(docker images -qa -f 'dangling=true')
```

> List all containers
```
docker ps -a
```

> Stop all containers
```
docker stop $(docker ps -a -q)
```

> Remove all containers
```
docker rm $(docker ps -a -q)
```

# Links Of Interest
* [Docs // MLflow Tracking](https://mlflow.org/docs/latest/tracking.html)
* [Docs // Supported Artifact Stores](https://mlflow.org/docs/latest/tracking.html#supported-artifact-stores)
* **Base Docker** with Machine Learning libraries to build the MLflow image - *[frolvlad/alpine-python-machinelearning](https://hub.docker.com/r/frolvlad/alpine-python-machinelearning/)*

repository: endicotttechnology/mlflow-workshop

repo_name: endicotttechnology/mlflow-workshop


text:
# Unity Post-Processing Playable

Control Post-Process Effects with Timeline.

## Requirements

- Unity [Post-processing (v2)](https://github.com/Unity-Technologies/PostProcessing)

This playable works by animating the `weight` of PostProcessVolume so that it overrides an existing Volume already present in the scene. This playable is also limited to working with global volumes setup such that there is a single global Volume in the scene that has a profile containing the _'base'_ post-process effect setup. The playable needs a profile that overrides specific paramaters base parameters.

The included example scene showcases the intended usecase.


text:
# OpenTok .NETCore SDK

Please note: This version has been migrated to .NET Core from the Standard .NET OpenTOK SDK.

[OpenTok .NET SDK](https://github.com/opentok/Opentok-.NET-SDK)


text:
Two questions often arise when designing the Redux state object:

What data should go into the state?
How should the state object be organized?

Many applications deal with data that is nested and/or relational in nature, but reducers are easier to write, test, and maintain when the data is normalized. We will talk about guidelines for deciding when to move state into Redux and look at some of the strategies for modeling the data and transforming API responses.

repository: briebug/presentations

branch_name: refs/heads/gh-pages

repo_name: briebug/presentations


text:
(sec-user-governing-eqns)=
# Governing Equations

This chapter presents the solution schemes we use for solving variations of the elasticity equation using the finite-element method.
In all of our derivations, we use the notation described in {ref}`tab:notation`.

```{table} Mathematical notation
:name: tab:notation
|    **Symbol**     | **Description**             |
| :---------------: | :-------------------------- |
|     $\vec{a}$     | Vector field a              |
|   $\mathbf{a}$    | Second order tensor field a |
|     $\vec{u}$     | Displacement vector field   |
|     $\vec{v}$     | Velocity vector field       |
|    $\vec{{d}}$    | Fault slip vector field     |
|     $\vec{f}$     | Body force vector field     |
|   $\vec{\tau}$    | Traction vector field       |
| $\mathbf{\sigma}$ | Stress tensor field         |
|     $\vec{n}$     | Normal vector field         |
|      $\rho$       | Mass density scalar field   |
```

:::{toctree}
elasticity-derivation.md
petsc-formulation.md
elasticity-infstrain/index.md
elasticity-infstrain-prescribedslip/index.md
incompressible-elasticity.md
poroelasticity/index.md
:::

repository: rwalkerlewis/pylith

repo_name: rwalkerlewis/pylith


text:
---
status: "active"
title: >-
  NGX-Feature-Toggle — Flexible User Management and Page Access control for Angular Apps
description: >-
  TL;DR; You can start using NGX Feature Toggle module in your Angular apps
  right now and get the built-in performance, flexibility and extensibility benefits in your application
date: '2023-04-24T08:23:47.870Z'
path: >-
  /posts/ngx-feature-toggle-flexible-user-management-and-page-access-control-for-angular-apps
category: "post"
lang: en
layout: post
author: Wilson Mendes
tags: ['frontend', 'angular', 'open-source', 'module', 'tooling', 'performance', 'architecture']
---
![](./feature-toggle.png)

> TL;DR; You can start using [NGX Feature Toggle](http://bit.ly/ngx-feature-toggle) module in your Angular apps right now and get the built-in performance, flexibility and extensibility benefits. Support the project by starring the Github repository and enjoy! 🎉

\*\* Feel free to play with the online demos powered by Stackblitz [**https://stackblitz.com/edit/ngx-skeleton-loader-sample**](https://stackblitz.com/edit/ngx-skeleton-loader-sample)

### Introduction

Feature Toggle is a common concept in software development. You might also find this content covered with other names, such as _Feature Flags_ or mixed/combined with other concepts, such as _Feature Business_. Even though these are different names and perhaps, integrated in different scenarios, they have its roots on the same core concept: *release early, release often*.

> Being empathetic over being right is the key sometimes ❤

Keep in mind this crucial concept: anything, absolutely *anything* in software development is documented, created and integrated based on release product improvements in any level to customers as quick as possible without compromising user experience and platform relieability. Development experience, Accessibility, Performance and such are there with this goal. It also means that anything that might not be helpful or can make this a painful process should be revisited.

### Problem statement in Frontend

Let's start with the first question related to that level of integration, which is:

> Why using a module, package or library instead solve it via server-side rendering?

The idea of this - and any other - module is to bring transparency and flexibility to this step as much as possible. So the main point is integrate this module with other level of tooling, process, such as:

- Server-side rendering;
- Progressive rendering;
- Integration with third-party platforms, such as Launchdarkly, among others;
- Any other that you like :)

As an example, you can integrate with WebSockets or handling this in a EventSourcing architecture. It's totally transparent for you and you can integrate easier in your application.

At the end, NGX Feature Toggle is covering the scenarios related to Angular, the framework, not the core concepts which are - and for few scenarios should not - be covered by such integration.

### Using Feature Toggles to improve Leading time

Feature toggle is a good approach to integrate your teams with a different mindset, moving towards continuous deployment applications. With that, you can still ship features that require other integrations in different layers of your app or even turn off some experimental feature in case of production issues.

So that, several applications running in different environments, such as web, mobile, embedded and others, can now have their code shipped with even more confidence and avoiding long issues running in production when they could just be something turned off via code.

### Toggles x Business: Understanding the scenarios

Therefore you might find these 2 concepts mixed across apps, it's good - and totally worth it - to know the difference conceptually.

Feature Toggle is totally about delivery. In a scenario of a new feature, for example, you should define the release strategy. It should cover different things, but in summary releasing features should cover these points:

- Feature should have definition of success. It can be error rates, user conversion, etc.;
- Feature should be implemented having in mind it's feature toggles to be turned on/off during the ship process;
- Feature should be released to all application environments. This new features should be released turned off by default, having this value changed per environment after release strategy validation;
- Feature should be tested and turned on in test environment. It can be for a specific list of team members or for everyone using the test environment;
- Feature should be released to production environments following the release process. It can be all or nothing approach (like turning on the feature for every single user) or using progressive rollout until reach all customers;
- Feature toggle should be removed after all the checks have passed and integration is working as expected in production;

Good to keep in mind that every single feature toggle should have time-to-live. It means they will be removed after release and having the feature running in production with success after some predefined timeframe.

On the other hand, Feature Business are more related to features that need to be enabled in some specific and predefined time range. A good example of that are related to some specific features you can find in e-commerce apps during Black Friday or any other sales they're promoting to their customers. These feature flags won't be removed and they're totally connected to the business rules related to the application's domain. Of course there's more, but that's the main difference between them in its core.

### NGX-Feature Toggle: Components, Directives And Route Guards

Specifically about `NGX-Feature-Toggle` library, some decisions were applied to make this process smooth, adding even more benefits for consumers which are using it. As an example, instead of exposing services and enforce integrations with specific libraries such as RXJS, Signals, and others, everything is a component.

It means that this management level can be done using different approaches, adding flexibility to the released code and another level of possibilities and integrations to consumers!

Here's a list of components and directives you might find available on `NGX-Feature-Toggle` library:

- `feature-toggle-provider`: Handle with feature toggle configuration in your application. It adds the default values of your enabled/disabled features;
- `*featureToggle`: Directive that handles with feature toggle check. So that, the component will be rendered/removed based on the feature toggle configuration is enabled;
- `*featureToggleWhenDisabled`: Directive that handles with feature toggle check. So that, the component will be rendered/removed when the feature toggle configuration is disabled;

And here's a sample showing the components and directives in action.

```typescript
import { Component } from '@angular/core';

@Component({
  selector: 'component-docs',
  template: `
    <feature-toggle-provider [features]="featureToggleData">
      <div *featureToggle="'enableSecondText'">
        <p>condition is true and "featureToggle" is enabled.</p>
      </div>
      <div *featureToggle="'enableFirstText'">
        <p>condition is false and "featureToggle" is disabled. In that case this content should not be rendered.</p>
      </div>
      <div *featureToggle="'!enableFirstText'">
        <p>
          condition is false and "featureToggle" is disabled
          <b>but it has "!" as a prefix of the feature toggle to be checked.</b>
          In that case this content should be rendered.
        </p>
      </div>
      <div
        class="combined-feature-toggles-with-truthly-option"
        *featureToggle="['!enableFirstText', 'enableSecondText']"
      >
        <p>
          This is a combined condition. It shows if <b>enableSecondText</b> is true and <b>enableFirstText</b> is falsy,
          but it has "!" as a prefix. If both cases are correct, then the "featureToggle" is enabled and rendering this
          component.
        </p>
      </div>
    </feature-toggle-provider>
  `,
})
export class ComponentDocsComponent {
  public featureToggleData: {
    [k: string]: boolean;
  } = {
    enableFirstText: false,
    enableSecondText: true,
  };
  // ...
}
```

In some scenarios when you need to prevent the route to be loaded, you can use `NgxFeatureToggleCanLoadGuard`, by passing the class and configuration of the feature toggle to be checked in your route data.

You might have some specific requirements that you should redirect a user to a specific route in case of a feature flag is disabled. For that, you can use `redirectTo` as a mechanism to redirect a user in a specific route when it tries to access in a route with a `CanActivate`/`CanActivateChild`/`CanLoad` Feature Toggle Guard and the feature toggle is disabled.

For advanced scenarios you can use a combination of route guards AND redirects. E.G.

```js
...
export const routes: Routes = [
  {
    path: 'customer',
    component: CustomerComponent,
    canLoad: [NgxFeatureToggleRouteGuard],
    canActivate: [NgxFeatureToggleRouteGuard],
    canActivateChild: [NgxFeatureToggleRouteGuard],
    // This is the featureToggle configuration for
    // the parent component
    data: {
      featureToggle: ['enableCustomerPage'],
      // If feature toggle is disabled, the user will be redirected to `/error` URL
      redirectTo: '/error'
    },
    children: [
      {
        path: ':id',
        component: CustomerDetailComponent,
        // This is the featureToggle configuration for
        // the child component. It can also use
        // a combination of feature toggles
        data: {
          featureToggle: ['enableCustomerPage', '!enableChildrenNavigation'],
          // If one (or all of them) of the feature toggle is disabled, the user will be redirected to `/customer-error` URL
          // Note that you can use redirects for the main url and their children
          redirectTo: '/customer-error'
        },
      },
    ],
  },
];
...
```

### Bundle and package size matters

Bundle and package sizes are always important and this is something to always keep in mind when thinking about this module.

The module supports routes guards, redirects, component composition, third-party integrations and more feature with an impressive bundle size of 1.69KB and the package has 104kB to be installed in an application. That's massive! 🎉

### That’s all for now

Stay tuned because this is not the end, it's just the beginning. Let's keep building awesome stuff and have **_#ngxFun_** 🚀

I hope you enjoyed this reading as much as I enjoyed writing it. Thank you so much for reading until the end and see you soon!

### Cya 👋


text:
### 🔢🔄 Issue RSS-ECOMM-4_11: Modify Quantity of Products in Cart (15 points)

#### 📝📚 Description

To give users 🧑💻 flexibility in managing their shopping cart 🛒, implement a feature that allows them to modify the quantity 🔢 of each product in their cart. This feature should also integrate with the commercetools API 🔗 to update the corresponding data 🔄 and recalculate the total cost 💲 accordingly.

#### 💻🔧 Implementation Details

1. **Quantity Modification Interface 🔢🖱:** Include an interface element (like an input box 📥 or spinner 🔄) that allows users to change the quantity of a product in their cart.
2. **Data Updating 🔄:** When a user changes the quantity of a product, the application should make the necessary API call 🔗 to update the cart data in the backend.
3. **Total Cost Recalculation 💲🔄:** After the cart data is updated, recalculate the total cost of the cart and update the total cost displayed to the user.

#### ✅🎯 Acceptance Criteria

- Users can modify the quantity of each product in their cart 🛒.
- The application updates the cart data 🔄 using the commercetools API 🔗 when the quantity of a product is modified.
- The application recalculates and displays the updated total cost 💲 when the quantity of a product is modified.

#### 🔗📚 Useful Links and Resources

1. [Commercetools API Documentation 📘](https://docs.commercetools.com/api)
2. [Commercetools Cart and Order API 🛒](https://docs.commercetools.com/api/projects/carts)
3. [Commercetools Update Cart 🔃](https://docs.commercetools.com/api/projects/carts#update-cart)
4. [Commercetools My Carts 🛍](https://docs.commercetools.com/api/projects/me-carts)
5. [Commercetools Change LineItem Quantity 🔢](https://docs.commercetools.com/api/projects/carts#change-lineitem-quantity)

repository: rolling-scopes-school/tasks

repo_name: rolling-scopes-school/tasks


text:
---
layout: docs
title: Component plugin - Merkur
---

# Component plugin

The component plugin is one of the base [Merkur]({{ '/' | relative_url }}) plugins which adds base lifecycle methods and properties to your widget. Other [Merkur plugins]({{ '/docs/plugins' | relative_url }}) can depend on it.

## Installation

We must add import of `componentPlugin` and register it to the `$plugins` property of the widget.

```javascript
// ./src/widget.js
import { componentPlugin } from '@merkur/plugin-component';

export const widgetProperties = {
  name,
  version,
  $plugins: [componentPlugin],
  // ... other properties
};

```

After that we have `info`, `load`, `bootstrap`,`mount`, `unmount`, `update`, `setState`, `setProps` async methods and `props`, `state`, `assets` properties available on widget.

## Properties

### props

The `props` property defines interface between Merkur widget and your application. It contains data from the application or server which are input for the widget. The data must be stringifiable. You can't directly mutate `props`, use [setProps]({{ '/docs/component-plugin#setprops' | relative_url }}) method instead.

### state

The `state` property contains current internal state of Merkur widget. The data must be stringifiable. You can't directly mutate `state`, use [setState]({{ '/docs/component-plugin#setstate' | relative_url }}) method instead.

### assets

The `assets` property contains important widget assets(css, js and others). The assets must be downloaded before widget can be created.

## Methods

All new available methods are asynchronous and we define their returning value in widget's code.

### info

The `info` method returns information about the widget such as name, version, props, state, assets, containerSelector, etc. It is primary useful for server-side rendering, where we need to collect important values for hydrating the widget in the browser.

```javascript
const { name, version, props, state, assets, containerSelector } = await widget.info();
```

### bootstrap

The `bootstrap` method is called only once before the widget loads its state and is mounted. We can connect other third-party code (services, listeners, etc) with the widget here.

### load

The `load` method is **mandatory** and returns current state of the widget. The load method is called before mounting the widget and after changing props.

### mount
The `mount` method is used for client and server environments. On server it has to return a string. On client it has to mount the widget to HTML and return promise that resolves after mounting the widget to DOM is completed.

### unmount
The `unmount` method is the opposite of the `mount` method. On server it's not used but on client it has to unmount the widget from HTML and return a promise that resolves after unmounting the widget from DOM is completed.

### update
The `update` method is called after changing widget state and it has to update DOM.

### setState
The `setState` method is for changing widget state. The method makes shallow copy of the state.

```javascript
console.log(widget.state); // { primitive: 1, object: { key: 'value'} };
await widget.setState({ object: { key: 'value2'} });
console.log(widget.state); // { primitive: 1, object: { key: 'value2'} };
```

### setProps
The `setProps` method is for changing widget props. The method makes shallow copy of the props.

```javascript
console.log(widget.props); // { pathname: '/'};
await widget.setProps({ pathname: '/detail/1'});
console.log(widget.props); // { pathname: '/detail/1' };
```

repository: mjancarik/merkur

repo_name: mjancarik/merkur