text:
# Caffeine daemon

This is a really simple [caffeine](https://en.wikipedia.org/wiki/Caffeine) daemon for your linux system.

This works entirely without requiring root access and bypasses any imposed system management by emulating a mouse wiggle every few minutes.

## Get started

Build the daemon & controller:

```
$ make install
```

This produces a `caffeine` artifact in the directory, and creates a folder in your `~/.config/` directory. You can then copy this onto your `$PATH`.

N.B. this requires `xdotool` at the moment.

## Usage

Command               | Effect
---                   | ---
`caffeine daemon`     | Start the caffeine daemon. Creates a lockfile in the caffeine config dir.
`caffeine status`      | Check if the daemon is running, and if it is, check if it is keeping the screen awake.
`caffeine query`      | Same as status, but returns an exit code instead of printing (for embedding).
`caffeine start`      | Start keeping the screen awake.
`caffeine stop`       | Stop keeping the screen awake.
`caffeine toggle`     | Toggle keeping the screen awake.
`caffeine diagnostic` | Show some diagnostic information (daemon status, etc.)
`caffeine version`    | Show version.

## Configuration

Check out the `config.h` file for configuration options.

repository: pkage/caffeine

repo_name: pkage/caffeine


text:
---
layout: post
title: Study a live memory dump
---

This section explains how to analyze a memory dump before using Volatility : extracting files and secrets.

Before analyzing a memory dump with Volatility, you can conduct a little background research :

### Live Memory Dump Format

The format of a memory dump can be :
- full data
- a core file

```sh
$ file mem1.dmp
mem1.dmp:	data
$file mem2.dmp
mem2.dmp:	ELF 64-bit LSB core file, x86-64, version 1 (SYSV)
```

### Extract files

- extract a pcap file which represents packets passing through the machine :

```sh
$ bulk_extractor -x all -e net -o mem.dmp
```

- extract (specific) files :

```sh
$ foremost -o result/ -t zip -i mem.dmp
$ binwalk --dd='.*' mem.dmp
```

In these examples, foremost extracts zip files and binwalk extracts all files in the memory dump.

### Extract information

- use strings and grep to determine some simple information :

```sh
strings mem.dmp | grep -B 10 -A 20 "some text"
```

This example prints results with 10 lines before the result and 20 lines after the result.

```sh
strings mem.dmp | grep -i "text"
```

This example use the option ```-i``` to perform a case-insensitive match.

With these techniques, you can search specific words like **passphrase**, **password**, **pass**, **phrase**, ...

### Extract secrets

#### Extract AES keys

You can find AES keys (128, 192, 256 bits) in running process memory. A specific tool exists and his name is **findaes**.
You can download **here** too.

```sh
$ ./findaes mem.dmp
Searching mem.dmp
Found AES-128 key schedule at offset 0x1c5f6c30:
1f ab 01 5c 1e 3d f9 ea c8 72 8f 65 a3 d1 66 46

$ echo 1fab015c1e3df9eac8728f65a3d16646 | xxd -r -p > key.bin
```

#### Extract RSA keys

You can find RSA keys in running process memory. A specific tool exists and his name is **rsakeyfind**.

#### Extract TrueCrypt key

There is a volatility plugin to extract the key used to decrypt a truecrypt container :

```sh
volatility -f mem.dmp --profile=Win7SP1x86 truecryptsummary
Volatility Foundation Volatility Framework 2.5
Registry Version     TrueCrypt Version 7.0a
Password             A_Very_Bad_Passw0rd at offset 0x01224426
[...]
```

#### Extract Bitlocker key

There is a volatility plugin to extract the key used to decrypt a bitlocker volume :

```sh
$ vol -f mem.dmp --profile Win7SP1x64 bitlocker
Volatility Foundation Volatility Framework 2.5

Address : 0xfa8009958c10
Cipher  : AES-256
FVEK    : d5b6e71adb0c2e2d38dafdcedade8fc11e8be631b9fed5b2ba5b51ba32a57cd1
TWEAK   : 49f9ecd5ddffcae44cde7f7a578b9a3ca5e79087826779e147de89423ebdf3f3
```

### Next step

Now you can study the memory dump with Volatility : firstly, find the correct profile and then, use different commands to understand the content of the memory dump.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: default
---

# 1996-01-12 - Re: (none) [httpd finding your identity]

## Header Data

From: Rich Graves<EMAIL_ADDRESS>To: sameer<EMAIL_ADDRESS>Message Hash: 45f94a3300d783c38d3919e00aa66f491d94e3623ce6f899c7703dae2adcd91b

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-01-12 19:56:43 UTC

Raw Date: Sat, 13 Jan 1996 03:56:43 +0800

## Raw message

```
{% raw  %}From: Rich Graves<EMAIL_ADDRESS>Date: Sat, 13 Jan 1996 03:56:43 +0800
To: sameer<EMAIL_ADDRESS>Subject: Re: (none) [httpd finding your identity]
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Fri, 12 Jan 1996, sameer wrote:

> > > control what information is passed out to the other end.
> > > Specifically, I'd like http://anonymizer.cs.cmu.edu:8080/prog/snoop.pl
> > > to come up nearly blank.)
> >
> >   We do not send the HTTP 'From:' header.  I will look into where
> > they are getting the user name and location from.  There is really
> > nothing I can do in the Navigator to stop them from getting your
> > IP address or DNS name.
>
> 	I beleive that it uses finger. If you really want to prevent
> people from finding out where you're coming from, use the
> anonymizer. Not at CMU? Don't worry.

On most UNIX machines or a Mac or PC running most common talk clients?
Worry. Not just finger, but also identd will identify you. I think Eudora
Pro has an identd option, too.

-rich

{% endraw %}
```

## Thread

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

+ Return to "[Jeff Weinstein <jsw@netscape.com>](/authors/jeff_weinstein_jsw_at_netscape_com_)"
+ Return to "[Rich Graves <llurch@networking.stanford.edu>](/authors/rich_graves_llurch_at_networking_stanford_edu_)"
+ Return to "[sameer <sameer@c2.org>](/authors/sameer_sameer_at_c2_org_)"

+ _Unknown thread root_
  + 1996-01-12 (Fri, 12 Jan 1996 23:35:10 +0800) - [Re: (none)](/archive/1996/01/02ac0d84d414267e93153994b71b9b4b414b697c48849da34c99117606c3bc63) - _Jeff Weinstein<EMAIL_ADDRESS>    + 1996-01-12 (Sat, 13 Jan 1996 01:28:48 +0800) - [Re: (none)](/archive/1996/01/92b14453630f61e7bbb7d37a1783285237efe437ab5566bbfe2a8e6894f37e6a) - _sameer<EMAIL_ADDRESS>      + 1996-01-12 (Sat, 13 Jan 1996 03:56:43 +0800) - Re: (none) [httpd finding your identity] - _Rich Graves<EMAIL_ADDRESS>        + 1996-01-13 (Sun, 14 Jan 1996 00:22:57 +0800) - [Re: (none) [httpd finding your identity]](/archive/1996/01/f0d7cc146fdea821d82d106180e2a3df53449f76cc3f912d65b3ad578b42c237) - _sameer<EMAIL_ADDRESS>

gha_license_id: MIT


text:
---
layout: post
title: "Priorities Change in the Weeds"
date: 2023-05-10T22Z
tags: productivity
---

In even the simplest projects, it's natural to think priorities stay the same to the very end. We make our plans and get to work until we finish, right?

Let's say we're planting flowers in the flowerbed, and the end-result is flowers in the front yard. Here's our plan:

1. Dig up existing plants.
2. Buy flowers from the store.
3. Place flowers in the flowerbed.
4. Dig wholes for new flowers.
5. Plant flowers.

Done, right?

Well, during the work, we considered brick edges around the flowerbeds, found many weeds, and didn't buy enough flowers. What was a 2-hour job became a weekend hobby we didn't anticipate.

I've found even with the most simple plans; the priorities change when we break up the work further.

We get excited about new ideas.
We notice details we have yet to see.
We question how perfect we need to make this.
We make mistakes.

Now we have to figure out how to prioritize this new work. What's a nice-to-have and what's a must-have?

## The point is

The nice-to-haves list grows as you progress, and we don't want these nice-to-haves to get in the way of the must-haves.

Focus on the must-haves first, but not at the expense of quality.

repository: chancesmith/chance-smith-gatsby-blog

gha_language: JavaScript

repo_name: chancesmith/chance-smith-gatsby-blog


text:
# Quick Start with yaml files

## Start kadalu operator

```
kubectl apply -f https://raw.githubusercontent.com/kadalu/kadalu/devel/manifests/kadalu-operator.yaml
```

You have different flavors of operator yaml files available. Mainly for kubernetes (default), openshift, RKE, Microk8s. Find the relevant file from [here](https://github.com/kadalu/kadalu/tree/devel/manifests). Just remember to use the raw file as argument to `kubectl`.

**Note**: Openshift may have some Security Context Constraints, which can be applied only by admins, Run `oc login -u system:admin` to login as admin.

## Prepare and start storage exports

Identify the devices available from nodes and run the following command to add storage to Kadalu.

```console
$ kubectl get nodes
kube1 # <-- known your hostname, which needs to be given in storage config below.
...
...
```

NOTE: if your host is running RHEL/CentOS 7.x series or Ubuntu/Debian older than 18.04, you may need to do below tasks before adding storage to kadalu.

```
# On CentOS7.x/Ubuntu-16.04
sudo wipefs -a -t dos -f /dev/sdc
sudo mkfs.xfs /dev/sdc
```

Once the device is ready, inform the kadalu operator that it can be used as storage.

```yaml
# File: sample-storage-config.yaml
---
apiVersion: kadalu-operator.gluster/v1alpha1
kind: KadaluVolume
metadata:
  # This will be used as name of PV Hosting Volume
  name: storage-pool-1
spec:
  type: Replica1
  storage:
    - node: kube1
      device: /dev/sdc
  options: {}
```

```console
$ kubectl apply -f sample-storage-config.yaml
```

Other than `device`, kadalu also supports `path` and `pvc` as **storage** options.

kadalu supports `Replica1`, `Replica2` and `Replica3` type. This maps to glusterfs volume replication feature. It also support `External` as a type, where gluster volume may be managed externally, and kadalu is used to provide only CSI access.

## Check status

Operator will start the storage export pods as required. And, in 2 steps, your storage system is up and running.

Check the status of Pods using,

```console
$ kubectl get pods -n kadalu
NAME                             READY   STATUS    RESTARTS   AGE
server-storage-pool-1-kube1-0    1/1     Running   0          84s
csi-attacher-0                   2/2     Running   0          30m
csi-nodeplugin-5hfms             2/2     Running   0          30m
csi-nodeplugin-924cc             2/2     Running   0          30m
csi-nodeplugin-cbjl9             2/2     Running   0          30m
csi-provisioner-0                3/3     Running   0          30m
operator-6dfb65dcdd-r664t        1/1     Running   0          30m
```

## CSI to claim Persistent Volumes (PVC/PV)

Now we are ready to create Persistent volumes and use them in application Pods.

```yaml
# File: sample-pvc.yaml
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: pv1
spec:
  storageClassName: kadalu.replica1
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
```

Create PVC using,

```console
$ kubectl apply -f sample-pvc.yaml
persistentvolumeclaim/pv1 created
```

and check the status of PVC using,

```console
$ kubectl get pvc
NAME   STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS     AGE
pv1    Bound    pvc-8cbe80f1-428f-11e9-b31e-525400f59aef   1Gi        RWO            kadalu.replica1  42s
```

Now, this PVC is ready to be consumed in your application pod. You can see the sample usage of PVC in an application pod by below:

```yaml
# File: sample-app.yaml
---
apiVersion: v1
kind: Pod
metadata:
  name: pod1
  labels:
    app: sample-app
spec:
  containers:
  - name: sample-app
    image: docker.io/kadalu/sample-pv-check-app:latest
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - mountPath: "/mnt/pv"
      name: csivol
  volumes:
  - name: csivol
    persistentVolumeClaim:
      claimName: pv1
  restartPolicy: OnFailure
```

```console
$ kubectl apply -f sample-app.yaml
pod1 created
```

repository: bholmgren/kadalu

branch_name: refs/heads/devel

gha_license_id: NOASSERTION

repo_name: bholmgren/kadalu


text:
## Configuring WebStorm/IDEA File Watchers for TypeScript Transpilation

The best supported way to transpile code is by using chipper's `node js/scripts/transpile.js --watch`. However, for
developers that want IDE integration way want to experiment with WebStorm/IDEA File Watchers. This process is not
well-vetted and should be used at your own risk.

I experimented with a configuration like so:

![image](https://user-images.githubusercontent.com/679486/143963489-ab2c1ae7-86b2-4bbf-bc29-d54cbf144353.png)

And I observed that it quickly transpiles a single file when saved. It seems to be working nicely and could be a good
solution for those who don't want to run a watch process. You can also see an indicator in the bottom bar of WebStorm
that shows when compilation starts and ends. It's pretty speedy.

My main concern about using File Watcher is my uncertainty about what's best for "Scope"--when I tried "all files"
changes to Sim.js seemed to trigger on sim mains as well (even when unchanged). Could setting scope to "all changed
files" sometimes do more or less than it should?

Also, keep in mind you need to watch both *.js and *.ts files. I'm not sure if those can be combined into one watcher or
if they have to be 2 separate watchers.

Also, should "auto save edited files to trigger the watcher" be checked? Probably.

repository: phetsims/phet-info

gha_language: Python

repo_name: phetsims/phet-info


text:
# Gomoku game in Arweave
This application is an enchanced version of the [Intro to React tutorial](https://reactjs.org/tutorial/tutorial.html) and published on the [Arweave blockchain](https://www.arweave.org/).

## Install Packages
```sh
npm install
```

## Run App Locally
```sh
npm start
```
Then the app should be available via http://localhost:3000.

## App deployment
```sh
npm run build
npm run savekey
npm run deploy
```
Be sure to put your wallet keyfile (`arweave-keyfile.json`) in the root directory (ignored on GitHub).
If you don't have a wallet, please get one [here](https://tokens.arweave.org/).

Deployed at: https://arweave.net/tYEUM5lK6y3DAkm-6rggTq3vscRmssgWpth_jdLw388

repository: jofen-blockchain/arweave-gomoku

repo_name: jofen-blockchain/arweave-gomoku


text:
# SRv6 Controller

This project provides a collection of modules implementing different functionalities of a SDN controller

### Topology Information Extraction ###

This project includes a module named ***ti_extraction.py*** for extracting network topology from a router running OSPF6 protocol. This module is invoked with router IP address, a list of ports on which OSPF6 daemon(s) VTY is listening and the interval between two extractions. It buils a NetworkX object and exports it into a JSON file in the folder ***topo_extraction***. Network graph is also exported as an image file in the same folder.

Run an example experiment

    > cd /home/user/workspace/srv6-controller

    Usage: ti_extraction.py <ip_address> <port1,port2,...,portN> <period_in_seconds>

    Options:
    <ip_address> ip address of the router
    <port1,port2,...,portN> telnet ports of the daemons
    <period_in_seconds> polling period in seconds

You can extract topology from ospfd

    > ./ti_extraction.py 2000::c 2606 1

After a while the enitity will populate the ***topo_extraction*** folder with the topology files

	> route-detail-2609.txt
	> topo-graph.dot
	> topo-graph.json
	> topo-graph.svg

### SRv6 Southbound API ###

The project provides four different implementations of the SRv6 Southbound API: i) gRPC; ii) NETCONF; iii) REST; iv) SSH.
Each folder contains the server and the client implementation.

As of the server, it requires the init of the variable interfaces which defines the interface under the control of the SRv6Manager

    interfaces = ['eth0']

For the NETCONF and SSH implementation it is required to properly initialized USER and PASSWORD

    SSH_USER = 'srv6'
    SSH_PASSWORD = 'srv6'

Run the server

    > cd /home/user/workspace/srv6-controller/*

    Usage: *_server.py [options]

    Options:
        -h, --help    show this help message and exit
        -d, --debug   Activate debug logs
        -s, --secure  Activate secure mode

Instead for the client, it is necessary to define the mode and the IP/PORT of the server

    SECURE = False
    srv6_stub,channel = get_grpc_session(IP, PORT, SECURE)

NETCONF and SSH implementation does support only secure mode

Run the client

    > cd /home/user/workspace/srv6-controller/*

    Usage: *_client.py


text:
# Hello World Websocket Server

This container is designed for testing hosting environment setup. It exposes a websocket at `/` on port 8765; the socket simply repeats back anything it receives. This should be adequate for testing that a container can be deployed successfully and that port mappings are configured properly to expose the web socket on port 80.

To build: `$ docker build -t helloworld-socketserver .`

To run locally: `$ docker run --rm -p 8765:8765 helloworld-socketserver`


text:
# Windy paragliding plugin
This plugin adds icons to the map indicating takeoffs, with the flyability of each site based on the weather forecast.

**This plugin's goal is to help paragliders in choosing a take-off that suits the weather forecast. It is only intented as a tool. In no way this plugin replaces the full weather analysis any pilot needs to do before taking off from anywhere**

![Screenshot of windy-plugin-pg](docs/windy-plugin-pg_screenshot.png)

In the current version (0.1.0), flyability of a site is determined as follows:
- Wind has to come from a direction that is appropriate for the takeoff
- Wind has to be less to 5m/s (green icon) or 8m/s (orange icon)

## How to use?
1.  Click on "More layers" in the lower right corner of the map, the list of available layers should appear
3. Click on "Paragliding plugin" in the list
4. Zoom until you see paragliding site icons
![Screenshot of how to activate the plugin](docs/how-to-activate.png)

## Features
- Displays sites only at a certain zoom level
- Displays the orientation of each site on the icon

## Limitations
- /!\ For the flyability feature, only takes wind into account, doesn't take wind gusts, visibility or rain for example.
- Only works with Wind overlay, displays grey icons with other overlays
- Only works for alpine sites at the moment. Soaring sites are displayed, but flyability doesn't take into account the minimum wind.

## Next steps
- Improve icon management (smaller icons when low zoom, bigger icons when zooming)
- Add a tooltip with site infos on hover (like Windy's basic PG plugin)
- Performance improvements (avoid reloading already loaded sites from the API, avoid re-drawing already drawn icons)
- Manage Soaring sites properly
- Display landings and takeoffs with an unknown orientation
- Add a link to Google map for driving instructions
- Improve flyability with wind gusts, rain and visibility, and make it work with any overlay

repository: xVinCe/windy-plugin-pg

repo_name: xVinCe/windy-plugin-pg


text:
I've attempted to make it as lightweight and flexible as posible (ye you know.. regular sales pitch stuff).

## Animations
There's a ton of different ways of animating elements. In some cases a simple CSS **transition**/**animation** will be more then enough, but in other cases a more complicated aproach is required wich calls for **JavaScript**. Either way you should have the flexibilty to add and modify these queued animations as required.

###Here's an example my friend

#### CSS animations
```html
<style>
div{
	opacity: 0;
	background: red;
	transition: 3s;
}
/* Default if no animation is assigned */
.queue-animation{
	opacity: 1;
}
.scaleUp{
	animation: scaleUp 3s;
}
</style>

<div data-queue>
	I'll fade in first!
</div>

<div data-queue
	 data-queue-position="1"
	 data-queue-animation="scaleUp">
	Let me just wait until the first elements are done animating
</div>
```
#### JavaScript animations
```html
<div data-queue
	 data-queue-position="groupName"
	 data-queue-animation="changeBG">
	I'll just wait until my group is run...

	<div data-queue
		 data-queue-position="groupName:3"
		 data-queue-animation="changeBG">
		I'm the third in my group
	</div>
</div>

<script>
	var queue = Queue();
	document.getElementById('trigger-favorite-group').addEventListener('click', function(){
		queue.run('groupName');
	});

	// Animation function 'changeBG'
	function changeBG (queueObject, complete) {
		var element = queueObject.node;

		element.style.background = "tomato";

		// Continue with the queue
		complete(queueObject);
	}
</script>
```
The above is a samll example of how to animate using **transitions**, **animations** and **JavaScript**.

## Queue
Being able to animate is only a small part of chaining animations together. Some elemement may require multiple queue positions, multiple groups and even multiple animations. Groups should be as easy to manipulate. What good is a bunch of elements, if you can't manipulate them in an easy manner.

> The queue will start at position 0

> If there is no elements between two queue positions (1,2,3,99), the queue will simply just jump to the next element

### Adding to the queue
#### Multiple positions
```html
<div data-queue
	 data-queue-position="1,10,50">
	I'm number 1, 10 and 50! Rock ON!
</div>
```
#### Multiple positions, different animations
```html
<div data-queue
	 data-queue-position="1:changeColor,1:scaleUp,5:scaleDown">
	'changeColor' and 'scaleUp' will get triggered at the same time, while 'scaleDown' will be the 6th
</div>
```
#### Multiple positions, groups and animations
```html
<div data-queue
	 data-queue-position="raf:rafAnimation,pageLoad:5,pageLoad:6:scale">
	I'll be added to the 'raf' and 'pageLoad' group.
	When the 'raf' group is run I'll use the 'rafAnimation' animation!
	Besides that I'll run twice through the pageLoad,
	once with the default animation and once with the 'scale' animation!
</div>

<script>
	var queue = Queue();

	// Run group: pageLoad onload
	window.onload = function(){
		queue.run('pageLoad');
	}

	// Run group: raf after 2sec
	setTimeout(function(){
		queue.run('raf')
	}, 2000);

	// 'rafAnimation' function. is run once per element
	function rafAnimation(object, complete){
		var element = object.node,
			opacity = 0;

		(function run(){
			opacity = element.style.opacity = opacity + 0.1;

			if(opacity > 1){
				complete(object); // Tells the queue to continue
				return;
			}

			requestAnimationFrame(run);
		})();
	}

</script>
```
### Properties
The last thing I'll mention is **properties**. Being able to pass along with an animation function will give you a huge advantage with complex animations and will allow you to build a DRY setup. Having a fadeIn JavaScript animation function and passing the duration as a property eleminates the need to create a new animation function per duration.

> Property values are seperated with ``;``, instead of ``,``. This is due to the fact that JSON requires ``,``.

#### Animation function with properties
```html
<div data-queue
	 data-queue-animation="fade"
	 data-queue-property="1000">
	I'll fade in over the duration of 1 sec
</div>

<div data-queue
	 data-queue-position="1:fade"
	 data-queue-property="-3000">
	I'll fade out, after the first div, over the duration of 3 sec
</div>

<script>
	var queue = Queue();

	// Animation function 'fade'
	// duration: 400 -> fadeIn over 400ms
	// duration: -1000 -> fadeOut over 1000ms
	function fade(object, complete){
		var element = object.node,
			duration = !isNaN(object.property) ? object.property : 200,
			start = Date.now();

		(function run(){
			var ratio = (Date.now() - start) / duration;

			if(duration > 0){
				element.style.opacity = ratio;
			}else{
				element.style.opacity = 1 + ratio;
			}

			if(Math.abs(ratio) > 1){
				complete(object); // Tells the queue to continue
				return;
			}

			requestAnimationFrame(run);
		})();
	}
</script>
```
#### Animation function with JSON property
```html
<div data-queue
	 data-queue-position="introduce:0:alertAnimation"
	 data-queue-property='{"value":"My name is El Stefano!", "callback":"askForName"}'>
	I'll fade in over the duration of 1 sec
</div>

<script>
	var queue = Queue();

	document.getElementById('introduce').addEventListener('click', function(){
		queue.run('introduce');
	});

	function alertAnimation(object, complete){
		var element = object.node,
			value = object.property.value,
			callback = object.property.callback;

		alert(value);

		window[callback]();

		// Continue with the queue
		complete(object);
	}

	function askForName(){
		var name = prompt("What's your name old chap?");
	}
</script>
```
#### Multiple animations with properties
```html
<div data-queue
	 data-queue-position="3:firstAnimation, 10:secondAnimation, 5:thirdAnimation"
	 data-queue-property='firstValue; secondValue; {"name": "thirdValue"}'>
	My properties are maped to my position! The first position in the attribute will match
	the first property in the property-attribute.
</div>
```

### Demo
There's a small demo in the demo folder. Go check it out homebro!

### There we go
That was all for now. I hope You've got an impression of what and what not to expect of this little tool. You will, without doubt have a question or two along the way. Feel free to contact med over twitter, mail, facebook, postage service, pidgens, in person or even give me call. This goes with out saying, you can contact me either It's relevent to the tool or not.

Bird

@schonert

F

stefan.schonert

Interweb

sh[at]schonert[dot]dk

repository: schonert/queued-animations

repo_name: schonert/queued-animations


text:
# Altruism In Animats

## Development mode
Install using `pip install -e .`

## Non-Development mode
Install using `pip install -r requirements.txt`

## Todo:

- Two types of animats
- Peeled fruit varieties. The appearance of the fruit must change on peeling.
- Remove the bites, pickup, make fruits spawn all over the map


text:
# Please don't swear

A simple package that allows you to easily censor text.

For now, it only supports Polish "bad words" and allows basic censorship of the text, but in the future I plan to add support for other languages, as well as more methods to work with censored text.

# Installation

Use composer to install PleaseDontSwear into your project:

```
composer require deoomen/please-dont-swear
```

# How to use

```php
<?php

use PleaseDontSwear\PleaseDontSwear;

// ...

$PDS = new PleaseDontSwear();
$myCensoredText = $PDS->censor($myBadText);
```

More examples of using methods can be found in the [examples](https://github.com/deoomen/please-dont-swear/tree/master/examples) folder.

# Tests

TODO

# License

[MIT License](https://github.com/deoomen/please-dont-swear/blob/master/LICENSE)

repository: deoomen/please-dont-swear

gha_language: PHP

repo_name: deoomen/please-dont-swear


text:
# Simplex Noise implementation for 2D space
## Introduction
>“Simplex noise is a method for constructing an n-dimensional noise function comparable to Perlin noise ("classic" noise) but with fewer directional artefacts and, in higher dimensions, a lower computational overhead. Ken Perlin designed the algorithm in 2001 to address the limitations of his classic noise function, especially in higher dimensions.“ Description taken from [Wikipedia](https://en.wikipedia.org/wiki/Simplex_noise).

## About this library
Aside from couple of changes and modifications (or to be more precisely, extensions), this library is direct port of Java algorithm presented by **Stefan Gustavson** and optimised by **Peter Eastman**.

Original algorithm site:
- Code:	 http://webstaff.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java
- Description:	http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

## Functions description
```cpp
void randomizeSeed();
```
Generate random seed (by shuffling permutation table) to prevent same output each time.

```cpp
void setSeed(const unsigned int &seedNumber);
```
Set custom seed to produce the same, expected output each time.

```cpp
double signedRawNoise(const double &xPos, const double &yPos);
```
Get raw signed noise value.

```cpp
double unsignedRawNoise(const double &xPos, const double &yPos);
```
Get raw unsigned noise value.

```cpp
double signedFBM(const double &xPos, const double &yPos, const unsigned int &octaves, const double &lacunarity, const double &gain);
```
FBM stands for Fractal Brownian Motion - get signed fractal value.
More about fractals can be seen [here](https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/procedural-patterns-noise-part-1/simple-pattern-examples).

```cpp
double unsignedFBM(const double &xPos, const double &yPos, const unsigned int &octaves, const double &lacunarity, const double &gain);
```
The same as above but returns unsgined fractal value.

## Raw noise and Fractal Brownian Motion
Fractional Brownian Motion is the summation of successive octaves of noise, each with higher frequency and lower amplitude.
Saying it simply, its an output of couple of different noises combined.

Results can be seen below (with raw noise output visualisation to the left). As one can see, FBM result in more sophisticated output:

![Imgur](https://i.imgur.com/G2Y1qdv.png)

Fractal Brownian Motion is determined by:
* **xPos**       - x value for noise
* **yPos**       - y value for noise
* **octaves**    - how many noise layers are used (number of octaves determines how detailed the output will be).
Differences between various octaves (1, 2 and 3) are presented below:

![Octaves](http://i.imgur.com/LVkToA0.png)

* **lacunarity** - is what makes the frequency grow as each octave the frequency is multiplied by the lacunarity
Differences between various lacunarity values (1.0, 1.5 and 2.1042) are presented below:

![Lacunarity](https://i.imgur.com/Cw9P75z.png)

* **gain**       - also called persistence, is what makes the amplitude shrink (or not shrink). Each octave the amplitude is multiplied by the gain
Differences between various persistence values (0.4, 0.5 and 0.6) are presented below:

![Persistence](http://i.imgur.com/cS3XzoA.png)

* **frequency**  - additional parameter applied directly to xPos and yPos. It determines "zoom" level for generated pattern.
Differences between various frequency values (1, 2 and 4) are presented below:

![Frequency](http://i.imgur.com/4PWOJUx.png)

## Output
How does it looks in practice?. It’s being well illustrated by below example (for the sake of simplicity, result is in greyscale):

![GreyScale](http://i.imgur.com/PrclqgJ.png)

## Usage
Example usage
```cpp
    const unsigned int WIDTH = 800;
    const unsigned int HEIGHT = 600;

    SimplexNoise noise;

    for ( std::size_t y = 0; y < HEIGHT; ++y ) {
        for ( std::size_t x = 0; x < WIDTH; ++x ) {
            double xPos = double( x ) / double( WIDTH ) - 0.5;
            double yPos = double( y ) / double( HEIGHT ) - 0.5;

            double noiseValue = noise.signedRawNoise( xPos, yPos );
            // do whatever you want with noiseValue here
        }
    }
```

## Examples
[Random world](./examples/README.md) playground visualised using [SFML](https://www.sfml-dev.org/) library.

## Additional articles
* Octaves (Fractal) algorithm   : http://flafla2.github.io/2014/08/09/perlinnoise.html
* Fractional Brownian Motion    : https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/procedural-patterns-noise-part-1/simple-pattern-examples
* Good tutorial how to generate terrain from noise (at least in my opinion): https://www.redblobgames.com/maps/terrain-from-noise/

## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the **LICENSE** file for more details

repository: PawelWorwa/SimplexNoise

repo_name: PawelWorwa/SimplexNoise


text:
# ML assignment - OCR

## Approach

- The model ([Segmentation model].https://github.com/qubvel/segmentation_models.pytorch.) with weigths of 'imagenet' as starting point is trained on our dataset as it bears the flexibility to choose various encoders with flexible choice of depth of encoders. Although, conclusively, since the features required are limited in principle to classify : text, bar_code and qr_code, almost any shallow encoder could be just as good.
- Label masks are constructed using the labels(with images as key and annotations as value) were provided.
- Binary Cross Entropy along with Dice Loss is used as a criterion for minimization.
- The validation Dice Metric that is achieved is ~0.96
-  After the model is trained to obtain a dice metric of ~0.96 the checkpoint is saved(link below). In inference, the cv2 find contours method is used recursively to obtain the bounding boxes for all the *artefacts* of the test image and whichever channel bears the maximum value(i.e the output- segmentation head of trained model consists of 3 channels dedicated to the 3 classes of text, bar and qr_code each) for that bounding region, that channel is the classification result(text, bar_code or qr_code).

## Training and Validation:

## Arriving at the bounding boxes during prediction phase
Using the function *cv2contour()* in predict.py, bounding boxes for artefacts are obtained using recursive trick as shown below:

## Input - Output
- Default argument text_on_plot is False for the function *inference*
```
localization,image_array=inference(test_dataloader,text_on_plot=False)
for i in image_array:
    figure(figsize=(20, 44), dpi=50)
    plt.imshow(i)
    plt.show()
```

- text_on_plot=True returns
```
localization,image_array=inference(test_dataloader,text_on_plot=True)
for i in image_array:
    figure(figsize=(20, 44), dpi=50)
    plt.imshow(i)
    plt.show()
```
For text recognition purposes, image is pre-processed in two stages:
 - image thresholding
 - image rescaling

## Checkpoint URL

-> "https://github.com/Siddicus/OCR_Classify/releases/download/1/cls_res50.ckpt"

- Predict.py Usage
```
def parse_args():
    import argparse
    parser = argparse.ArgumentParser(description='Inference script',
                                     formatter_class=argparse.ArgumentDefaultsHelpFormatter)

    parser.add_argument('img_path', type=str, help='path to the image') # link to the folder contianing the images
    parser.add_argument('checkpoint_path', type=str, help='path to your model checkpoint') # URL of checkpoint given above
    args = parser.parse_args()
    return args

if __name__ == "__main__":
    args = parse_args()
    localization,image_array= main(args)
    #localization -> ["image_name.jpg":[{"type": "text", "geometry": [.1, .1, .5, .15],"value":"word1"}, {"type": "qr_code", "geometry": [.85, .85, .95, .95],"value":None}],......]
    # image_array -> numpy array with predictions/plots on the original corresponding image

```
- Train.py Usage

```
def parse_args():
    import argparse
    parser = argparse.ArgumentParser(description='Model training script',
                                     formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('img_folder', type=str, help='path to image folder') # path to the image folder
    parser.add_argument('label_path', type=str, help='path to label file')  # label's(in json format) path
    args = parser.parse_args()
    return args

if __name__ == "__main__":
    args = parse_args()
    main(args)
```


text:
Example States
==============

In the example states and pillar, there is some simply example of configuration of a nginx server where the config file for nginx is a jinja template drawing from pillar.

Based on the way Flyingcloud is called, I'm curious to know if it would be possible to allow for the targetting of pillar data when building a container. This might perhaps be done by being able to call flyingcloud with a a targetted config yaml? e.g.

        flyingcloud -c dev.yaml

If this were available as an option then it would be possible in a CI situation to programmatically target pillar data when building a container.

repository: azmng/flyingcloud

repo_name: azmng/flyingcloud


text:
# PSLocalAdmin

Solution for maintaining a breakglass local admin account using Azure Functions and Key Vault.
The existing solution, [LAPS](https://www.microsoft.com/en-us/download/details.aspx?id=46899), only applies to Windows PC's that are attached to a traditional Active Directory domain. The functionality of LAPS can be replicated however, as is the case with this solution.

## Components

On each machine, a script is run periodically. This script checks for the existance of a commonly named admin account 'breakglassadmin'.
If the account doesn't exist, or it's password hasn't changed in a set period (30 days), then a HTTP request is sent to an Azure Function app.
The Azure Function app generates a new password, sends it to an Azure Key Vault for storage, then returns the password to the cilent machine.
The client machine script can then create the local admin account or reset the password.

## Setup

### Azure Function/Key Vault

1. Create new Azure Function app
   * App name should be globally unique
   * OS should be Windows
   * Hosting Plan should be consumption
   * Runtime Stack should be PowerShell Core
2. In the parent function app window, go to Platform features
3. Go to Networking --> Identity
4. In the System assigned tab, set the Status to On. This will create an identity in your Azure AD for the function app
5. In the left pane, create a new Function of type HTTP trigger
   * Name should be HttpTrigger
   * Authorization level should be Function
6. (Optional) I used VS Code with the Azure Function extension to deploy the Azure function code. The main file that needs uploading is run.ps1
7. Create new Azure Key Vault
   * App name should be globally unique
   * Pricing tier should be Standard
   * Access Policies should have no advanced policies checked
   * Access Policies should have a new policies configured
     * Principal should be the name of the Function app create above
     * The only permission required is Secret-->Set
   * Virtual Network Access can remain open

### Local Machine

#### Windows

1. Copy the [CheckLocalAdmin-Bootstrap](https://github.com/citadelgroup/PSLocalAdmin/tree/master/LocalScript/Windows/CheckLocalAdmin-Bootstrap.ps1) script to your PC
2. Edit the 4 variables at the top of the file
3. Deploy the script to every machine you want to manage and run

The bootstrap script will create relevant directories, copy the actual script from the repo top run, and schedule the script to run at logon.

## Versions

### 1.0.0

* Initial release.

repository: citadelgroup/PSLocalAdmin

repo_name: citadelgroup/PSLocalAdmin


text:
# GLFont
GLFont is a text-rendering library written in C++ for OpenGL 3.3, using FreeType 2.

## Dependencies
1. Freetype - http://freetype.org/
2. GLM - http://glm.g-truc.net/0.9.4/index.html
3. GLEW - http://glew.sourceforge.net/build.html
4. GLFW - http://www.glfw.org/ (This is only necessary for the included test project. You can still use GLFont with your own application without GLFW)

## C++ Quick Start

### Initialize library and create label
First create a font face to use for our labels.
```c++
shared_ptr<GLFont> glFont = shared_ptr<GLFont>(new GLFont(".../myFont.ttf"));
```

Now create a label, passing in the font face we just created.

```c++
// Some values we will use to create our labels
int startX = 100;
int startY = 100;
int windowWidth = 800;
int windowHeight = 600;

unique_ptr<FTLabel> label = unique_ptr<FTLabel>(new FTLabel(
  glfont,         // Font face handle
  "Hello world!", // Text to render
  startX,
  startY,
  windowWidth,
  windowHeight
));
```
Note that the starting x and y coords should be in window space.
This means (0,0) is at the top-left corner.

Additionally, we could specify a max width and/or height for our text. For example, the following will print a paragraph starting at window coordinates (100, 100), with a bounding box of 200 x 100.
```c++
int maxWidth = 200;
int maxHeight = 100;
unique_ptr<FTLabel> label = unique_ptr<FTLabel>(new FTLabel(
  glFont,
  "[long paragraph here]",
  startX,
  startY,
  maxWidth,
  maxWidth,
  windowWidth,
  windowHeight
));
```

You can manually change the size or starting position of your label at any time. This is often done when the window is resized (unless you are using absolute label positions that do not change depending on window size).

This will set our label to start being drawn at (500, 250):
```c++
label->setPosition(500, 250);
```

Set max width to 100 and max height to 100:
```c++
label->setSize(100, 100);
```

### Font Settings

Set the alignment, color, or size of the label text.
```c++
label->setPixelSize(24);
label->setIndentation(50);
label->setAlignment(FTLabel::FontFlags::LeftAligned);
label->setColor(0.89, 0.26, 0.3, 0.9);
```

Rotate text 90 degrees on the y axis:

```c++
label->rotate(90, 0, 1, 0);
```

Additionally, set font options with FTLabel::setFontFlags()
```c++
label->setFontFlags(FontFlags::WordWrap | FontFlags::Indented);
```

### Rendering Text
In the render loop, simply call FTLabel::render()
```c++
label->render();
```

### Additional Notes
Whenever the window is resized, you should update the window size of your label
```c++
label->setWindowSize(windowWidth, windowSize);
```

repository: jtberglund/GLFont

repo_name: jtberglund/GLFont


text:
# Mailscript templates: shared address for team

You can use this template to setup shared access to an address you control. Addresses use `scoped keys` (`read`/`write`) to be able to listen in to incoming messages and send messages from such address. By setting up redirects from an address an providing a `write-scoped key` to your peers you can easily setup a shared address.

## Workflow

```yml
version: "0.2"
addresses:
<EMAIL_ADDRESS>    keys:
      - name: Shared write key
        read: false
        write: true
      - name: owner
        read: true
        write: true
actions:
  - name: forward-to-alice
    type: mailscript-email
    config:
      type: forward
      forward<EMAIL_ADDRESS>      from<EMAIL_ADDRESS>      key: owner
  - name: forward-to-jane
    type: mailscript-email
    config:
      type: forward
      forward<EMAIL_ADDRESS>      from<EMAIL_ADDRESS>      key: owner
  - name: forward-to-brigit
    type: mailscript-email
    config:
      type: forward
      forward<EMAIL_ADDRESS>      from<EMAIL_ADDRESS>      key: owner
  - name: forward-to-team
    list:
      - forward-to-alice
      - forward-to-jane
      - forward-to-brigit
workflows:
  - name: redirect to team
    input<EMAIL_ADDRESS>    action: forward-to-team
```

## Manual setup

Claim an address on your username's subdomain:

```sh
mailscript addresses:add --address<EMAIL_ADDRESS>```

Set forwards to external (existing) addresses (you'll have to verify ownership of such addresses):

```sh
mailscript actions:add \
  --name forward-to-alice \
  --forward<EMAIL_ADDRESS>\
  --from<EMAIL_ADDRESS>
mailscript actions:add \
  --name forward-to-jane \
  --forward<EMAIL_ADDRESS>\
  --from<EMAIL_ADDRESS>
mailscript actions:add \
  --name forward-to-brigit \
  --forward<EMAIL_ADDRESS>\
  --from<EMAIL_ADDRESS>
mailscript actions:combine \
  --name forward-to-team \
  --action forward-to-alice \
  --action forward-to-jane \
  --action forward-to-brigit
```

Setup a workflow to redirecting incoming emails at<EMAIL_ADDRESS>to your team:

```sh
mailscript workflows:add \
  --name "redirect to team" \
  --input<EMAIL_ADDRESS>  --action forward-to-team
```

Create and get write key to share with peers:

```sh
mailscript keys:add \
  --address<EMAIL_ADDRESS>\
  --name "Shared write key" \
  --write

mailscript keys:list --address<EMAIL_ADDRESS>```

## SMTP out configuration

Keys with `write` scope can be used as passwords for sending messages via Mailscript's `smtp` gateway. The following configuration parameters are needed to setup a Gmail client to be able to "send as" from a Mailscript address:

```
host: smtp.mailscript.com
port: 465
user<EMAIL_ADDRESS>pass: key-with-write-scope
```

repository: dnsxyz/cli

branch_name: refs/heads/main

repo_name: dnsxyz/cli


text:
---
layout: page
title: Our speakers
subtitle: Speakers
permalink: /speakers/
---

We'll be listing speakers once the Call for Proposals closes.
Check back sooner for our keynote speaker.
In the meantime, if you have an idea, why not submit a talk [here](https://forms.gle/g6tCLBmqyvWQ5MFr8).


text:
## Deep Learning of Graph Matching

This is an implementation of the paper "Deep Learning of Graph Matching", CVPR, 2018.
**Note: This is not an official implementation.**

To run the above code, install the dependecies as listed in `environment.yml`. The easiest way to do this is to setup a conda environemnt

`conda env create -f environment.yml`

`conda activate dlgm`

Then update the parameters in the `config_sintel.py` script according to your hardware availability and needs.

### Training the network

`python main.py --dataset sintel --data_path path/to/sintel/root`

Note that only sintel dataset is supported as of now. We are not able to exactly reproduce the results of the paper. But the graph matching layers corresponding to optical flow has been tested for correctness. A primitive implementation of the Bistochastic layer is available but is not tested.

### Contributing
There is lot of scope for improvements with respect to the performance. PR's and discussion in this regard or any general matter on this topic is welcome :)

repository: hmchuong/dlgm

repo_name: hmchuong/dlgm


text:
I execute given valuable object (block or message sends) and return result to sender.
There are four cases:
	- evaluation completes successfully. I return SeamlessReturnValueResult with message answer.
	- evaluation signals exception. I return it as SeamlessThrowExceptionResult with SeamlessRemoteException which includes signalled exception info.
	- evaluation attempts to execute non local return.  I return SeamlessNonLocalReturnResult with target home context and returned value.
	- evaluation signals  Halt or Nortification. I pass it locally. They will not returned to sender.

Look it comments.

    Instance Variables
	evaluable:		<MessageSend or: BlockClosure>

repository: pavel-krivanek/Seamless

repo_name: pavel-krivanek/Seamless


text:
# kumobar
lemonbar support script

This script was from Peter Hessler via Pamela Mosiejczuk. I believe he
got it from elsewhere.

I'm slowly customizing it to work for me and to be less opaque to read.

Current advantages over other versions I've seen:

* Factored out the magic color strings
* Factored out the network interfaces into a variable for one easy change
* Added support for a trunk interface and detection of wired interface usage
* Battery status is split into four color categories for each 25% of battery
* Touching ~/.newbar will get the script to re-exec itself. Useful for development.

repository: kmosiejczuk/kumobar

repo_name: kmosiejczuk/kumobar


text:
# shapify [![Build Status](https://badgen.net/circleci/github/posva/shapify)](https://circleci.com/gh/posva/shapify) [![npm package](https://badgen.net/npm/v/shapify)](https://www.npmjs.com/package/shapify) [![coverage](https://badgen.net/codecov/c/github/posva/shapify)](https://codecov.io/github/posva/shapify) [![thanks](https://badgen.net/badge/thanks/♥/pink)](https://github.com/posva/thanks)

> Easily reshape objects with TS support

## Installation

```sh
npm install shapify
# or
yarn install shapify
```

## Usage

### Basic usage

Given an array of users:

```js
const users = [
  { fullname: 'Eduardo San Martin morote', id: 1, more: 'properties', that: 'exist', but: "you don't always need"]},
  // more users
]
```

You can transform objects

```js
import { shapify } from 'shapify'

const reshapedUser = shapify(
  {
    text: 'fullname',
    value: 'id',
  },
  users[0]
)
/**
 * only text and value are present
 * { text: 'Eduardo San Martin Morote', value: 1 }
 */
```

### Functional approach

This can be used to transform whole arrays of objects:

```js
import { shapify, shaper } from 'shapify'
// create a function with the first parameter fixed
const userShaper = shaper({ text: 'fullname', value: 'id' })
// equivalent to
const sameUserShaper = shapify.bind(null, { text: 'fullname', value: 'id' })

// generate the new array
const userChoices = users.map(userShaper)
```

**⚠: (#3) this breaks typings (mark them as `unknown`), if you know how to make it work, please file a PR**

### Customizing the new value

If you want to customize the value instead of just using the original one, you can provide a function:

```js
const reshapedUser = shapify(
  {
    text: 'fullname',
    value: user => 'id: ' + user.id,
  },
  users[0]
)
/**
 * only text and value are present
 * { text: 'Eduardo San Martin Morote', value: 'id: 1' }
 */
```

### Keeping original keys/values

If you need to keep original keys, you can provide a key with the same value:

```js
shapify({ id: 'id' }, users[0])
```

But a more appropriate syntax is an array of keys (strings, numbers or symbols):

```js
shapify(['id', 'fullname'], users[0])
```

This is similar to [`lodash.pick(users[0], ['id', 'fullname'])`](https://lodash.com/docs#pick). However, because shapify is type safe, it cannot support paths as strings as `lodash.pick` does. Instead you need to use a function.

If you need to keep **all of the original keys**, there is a helper that you can use:

```js
import { shapify, keepKeys } from 'shapify'

// this will generate a user object with all of the original properties as well
// as text with fullname's value
shapify(
  {
    ...keepKeys(users[0]),
    text: 'fullname',
  },
  users[0]
)
```

## License

[MIT](http://opensource.org/licenses/MIT)

repository: posva/shapify

repo_name: posva/shapify


text:
# python-playground <!-- omit in toc -->
Playground repository to experiment with matlab

## Creations:
- [Random password generator](random-password-generator/random-password-generator.md)

## Turorials and notes <!-- omit in toc -->
- [Implementing Autoencoders in Keras: Tutorial](tutorial-autoencoder/readme.md)
- [Rock paper scissors game](rock-paper-scissors/tutorial-rock-paper-scissors.md)
- [Yield in Python Tutorial: Generator & Yield vs Return Example](yield-generator/tutorial-yield-generator.md)
- [tutorialspoint Python Tutorial](tutorial-tutorialspoint/tutorial-tutorialspoint.md)
- [Getting Started with Python in VS Code Notes](tutorial-vscode/tutorial-vscode.md)

repository: constantinosgeorgiou/python-playground

repo_name: constantinosgeorgiou/python-playground


text:
# create-tls-certificates
Generate TLS certificates for Testing.

Secure communication is one of the most important feature of any product. So while development or testing people come across similar requirement of having tls certificates for development or test. Getting those certificate from CA might take some time so to save some time waiting for certificate one can create certificate by himself. There are multiple tools/options available for creating tls certificates. The problem of such tools are they are not really platform independent also sometime we feel that installing those tools on our workstation might create issue for system or make our workstation messy. I created following docker based procedure which can work across any platform and at the same time does not mess wity workstation.

Prerequiste - Docker

Steps :
1. clone the git repo (https://github.com/deepak-ghuge/create-tls-certificates.git)

2. cd create-tls-certificates

3. docker build -t createtlscert .

4. mkdir /tmp/crt

5. docker run -it --rm -v /tmp/crt:/crt createtlscert ip hostname

eg docker run -it --rm -v /tmp/crt:/crt createtlscert <IP_ADDRESS> ubiquity

TLS certificates will be created and copied in the /tmp/crt directory
Certificates with same name will be overwritten if present in the /tmp/crt.

Note - Generating TLS certificate using this method is only meant for Test purpose.

repository: deepak-ghuge/create-tls-certificates

gha_language: Shell

repo_name: deepak-ghuge/create-tls-certificates


text:
## This documentation is depricated and will be replaced

# Game Level Dropout Distribution per Day

## What question does this answer?

## Input required

## Output folder in Blob Storage

Container: results
Folder: level
Files:

*

## Output table in SQL

## Output format

Columns:

* Date without time, e.g. 2017-02-14
* Level
* Number of active users dropping at given level

repository: mssamuel/nether

repo_name: mssamuel/nether


text:
---
layout: post
title: Python Lazy Objects
categories:
- blog
---
Lazy objects are one in which the attributes are evaluated only when needed and againg if the refrence is made for that attribute, only the cached copy of that attribute is used.

{% highlight python %}

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

    def get_all_relatives(self):
        # some computation heavy function
{% endhighlight %}

This might incur some extra cost for initialization.
{% highlight python %}

class Person():
    def __init__(self, name, age):
        self.name = name
        self.age = age
        self._relatives = []

    @property
    def relatives(self):
        if not self._relatives:
            self._relatives  = ## get relatives...
        return self._relatives
{% endhighlight %}

In second case initializing Person is fast as relatives are not computed until explicitly called.and once initiated its ot computed again and again.


text:
## keychain

Initialize *keychain*(1), "re-use ssh-agent and/or gpg-agent between logins".

Check which agents are available (`ssh-agent` and/or `gpg-agent`), and call
`keychain` accordingly.

repository: alexbarton/ax-zsh

repo_name: alexbarton/ax-zsh


text:
404\. Sum of Left Leaves

Easy

Given the `root` of a binary tree, return _the sum of all left leaves._

A **leaf** is a node with no children. A **left leaf** is a leaf that is the left child of another node.

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/04/08/leftsum-tree.jpg)

**Input:** root = [3,9,20,null,null,15,7]

**Output:** 24

**Explanation:** There are two left leaves in the binary tree, with values 9 and 15 respectively.

**Example 2:**

**Input:** root = [1]

**Output:** 0

**Constraints:**

*   The number of nodes in the tree is in the range `[1, 1000]`.
*   `-1000 <= Node.val <= 1000`

repository: javadev/LeetCode-in-Kotlin

gha_language: Kotlin

repo_name: javadev/LeetCode-in-Kotlin


text:
### Kotest assertion artifacts for all platforms

- This is a hard fork of ⏩ [Kotest](https://github.com/kotest/kotest) ⏪ assertions.
- Single purpose - have assertions library prebuilt for all platforms.
- Probably will never get updates. Use upstream Kotest 👌 if it supports all your required platforms.

#### Add to project

Adding custom gradle repository (Requires gradle >=6.6)

`gradle.build.kts`
```kotlin
repositories {
  exclusiveContent {
    forRepository {
      maven {
        url = uri("https://maven.pkg.github.com/audkar/kotest-assertions")
      }
    }
    filter {
      includeGroup("io.kotest.assertions")
    }
  }
}
```
Add dependency to test sourceSet

`gradle.build.kts`
```kotlin
implementation("io.kotest:kotest-assertions-core:4.2.6")
```

repository: audkar/kotest-assertions

repo_name: audkar/kotest-assertions


text:
---
title: Layer 7 routing upgrade
description: Learn how to route layer 7 traffic to your swarm services
keywords: routing, proxy, hrm
---

The [HTTP routing mesh](/datacenter/ucp/2.2/guides/admin/configure/use-domain-names-to-access-services.md)
functionality was redesigned in UCP 3.0 for greater security and flexibility.
The functionality was also renamed to "layer 7 routing", to make it easier for
new users to get started.

[Learn about the new layer 7 routing functionality](index.md).

To route traffic to your service you apply specific labels to your swarm
services, describing the hostname for the service and other configurations.
Things work in the same way as they did with the HTTP routing mesh, with the
only difference being that you use different labels.

You don't have to manually update your services. During the upgrade process to
3.0, UCP updates the services to start using new labels.

This article describes the upgrade process for the routing component, so that
you can troubleshoot UCP and your services, in case something goes wrong with
the upgrade.

# UCP upgrade process

If you are using the HTTP routing mesh, and start an upgrade to UCP 3.0:

1. UCP starts a reconciliation process to ensure all internal components are
deployed. As part of this, services using HRM labels are inspected.
2. UCP creates the `com.docker.ucp.interlock.conf-<id>` based on HRM configurations.
3. The HRM service is removed.
4. The `ucp-interlock` service is deployed with the configuration created.
5. The `ucp-interlock` service deploys the `ucp-interlock-extension` and
`ucp-interlock-proxy-services`.

The only way to rollback from an upgrade is by restoring from a backup taken
before the upgrade. If something goes wrong during the upgrade process, you
need to troubleshoot the interlock services and your services, since the HRM
service won't be running after the upgrade.

[Learn more about the interlock services and architecture](architecture.md).

## Check that routing works

After upgrading to UCP 3.0, you should check if all swarm services are still
routable.

For services using HTTP:

```bash
curl -vs http://<ucp-url>:<hrm-http-port>/ -H "Host: <service-hostname>"
```

For services using HTTPS:

```bash
curl -vs https://<ucp-url>:<hrm-https-port>
```

After the upgrade, check that you can still use the same hostnames to access
the swarm services.

## The ucp-interlock services are not running

After the upgrade to UCP 3.0, the following services should be running:

* `ucp-interlock`: monitors swarm workloads configured to use layer 7 routing.
* `ucp-interlock-extension`: Helper service that generates the configuration for
the `ucp-interlock-proxy` service.
* `ucp-interlock-proxy`: A service that provides load balancing and proxying for
swarm workloads.

To check if these services are running, use a client bundle with administrator
permissions and run:

```bash
docker ps --filter "name=ucp-interlock"
```

* If the `ucp-interlock` service doesn't exist or is not running, something went
wrong with the reconciliation step.
* If this still doesn't work, it's possible that UCP is having problems creating
the `com.docker.ucp.interlock.conf-1`, due to name conflicts. Make sure you
don't have any configuration with the same name by running:
   ```
   docker config ls --filter "name=com.docker.ucp.interlock"
   ```
* If either the `ucp-interlock-extension` or `ucp-interlock-proxy` services are
not running, it's possible that there are port conflicts.
As a workaround re-enable the layer 7 routing configuration from the
[UCP settings page](deploy/index.md). Make sure the ports you choose are not
being used by other services.

## Workarounds and clean-up

If you have any of the problems above, disable and enable the layer 7 routing
setting on the [UCP settings page](deploy/index.md). This redeploys the
services with their default configuration.

When doing that make sure you specify the same ports you were using for HRM,
and that no other services are listening on those ports.

You should also check if the `ucp-hrm` service is running. If it is, you should
stop it since it can conflict with the `ucp-interlock-proxy` service.

## Optionally remove labels

As part of the upgrade process UCP adds the
[labels specific to the new layer 7 routing solution](usage/labels-reference.md).

You can update your services to remove the old HRM labels, since they won't be
used anymore.

## Optionally segregate control traffic

Interlock is designed so that all the control traffic is kept separate from
the application traffic.

If before upgrading you had all your applications attached to the `ucp-hrm`
network, after upgrading you can update your services to start using a
dedicated network for routing that's not shared with other services.
[Learn how to use a dedicated network](usage/index.md).

If before upgrading you had a dedicate network to route traffic to each service,
Interlock will continue using those dedicated networks. However the
`ucp-interlock` will be attached to each of those networks. You can update
the `ucp-interlock` service so that it is only connected to the `ucp-hrm` network.


text:
---
title: Using your own event storage model
weight: 6
---

The default model responsible for storing events is `\Spatie\EventSourcing\Models\EloquentStoredEvent`. If you want to add behaviour to that model you can create a class of your own that extends the `EloquentStoredEvent` model. You should put the class name of your model in the `stored_event_model` in the `event-sourcing.php` config file.

repository: spatie/laravel-event-sourcing

repo_name: spatie/laravel-event-sourcing


text:
# Major Project Proposal

## Description
For the major project I will be creating an Alien Invasion style game. There wil be a plane that the player moves around while trying to kill the alien invadors. There will be different "power ups" that appear on the screen for the player to collect that change characteristics of the ship and its weaponry and different levels for the player to progress through.

## Need To Have List:
- plane that moves, shoots bullets, has hit detection for the aliens and stays inside the canvas
- aliens that come in waves, move to bottom of screen to result in the game being over,
  has hit boxes that allow them to disappear when hit by a bullet
- game screens for different situations (start screen, controls, etc.)
- aliens with different amount of health
- aliens will move in a more "exiting" way then just going top to bottom
- have a wave system where the levels get harder as time goes on
- a "boss" level
- decent sound effects
- a scoring system that tracks highscores and progression
- "upgrades" that fall occasionally with aliens which change things like the type of bullet being shot,
strength or speed of plane
- a different type of alien that  can also shoot at the player and also aliens that move toward the player wherever you go

## Nice To Have List:
- nice graphics
- points and upgrade system using some type of "shop" setup where you can redeem points you get by killing aliens for upgrade,
  having lots of different types of upgrades and ship options which you can start with would be cool
- different background music for differnt levels and game screens
- very smooth animations for the alien waves, the bullets and the plane
- different planes, in addition to already being stronger or weaker, will have their own special ability that maybe has a cooldown
- a "level" screen that shows progress through different level which all have their own types of aliens and unique waves and bosses,
  measuring progress through those levels with a three star system based on how many aliens were let through/amount of damage taken
- different game modes: arcade mode where it's one giant level that keeps going and it tracks how long you last vs a level system
- project that works with different sized screens

license: Unlicense


text:
# sbt-reverse-dependency

Show which projects are depend on a specific project in your multi-project build.

[![Circle CI](https://circleci.com/gh/ocadaruma/sbt-reverse-dependency.svg?style=shield)](https://circleci.com/gh/ocadaruma/sbt-reverse-dependency)

## Usage

### Installation

Add the plugin in project/plugins.sbt:

```scala
addSbtPlugin("com.mayreh" % "sbt-reverse-dependency" % "0.2.0")
```

### Print reverse dependency

For example, suppose that there is a multi-project sbt build defined by following `build.sbt`

```scala
lazy val root = project in file(".")

lazy val core = project
lazy val web = project.dependsOn(core)
lazy val batch = project.dependsOn(core)
```

Then, `printReverseDependency` task works as below.

```bash
$ sbt core/printReverseDependency
web
batch
$ sbt web/printReverseDependency    # print nothing
$ sbt batch/printReverseDependency  # print nothing
```

There is also `reverseDependency` task, which just return `Seq[ResolvedProject]`.

### Configurations

- `reverseDependencySeparator` : Specify separator string for printing projects. `\n` as default.
- `printBaseDirectory` : Print base directory instead of project ID. `false` as default.
- `printAbsolutePath` : Print absolute path instead of related path. (only affects when `printBaseDirectory` is true) `false` by default.

## License

Published under the MIT License.

repository: ocadaruma/sbt-reverse-dependency

gha_language: Scala

repo_name: ocadaruma/sbt-reverse-dependency


text:
# radforest

# Testing using py.test.
It's good because it needs the minimal part code to work

## Structure of the test

Should be at the root level outside the package

package/
    __init__.py
    module/
        __init__.py

    tests/
        __init.py
        *_test.py
        test_*.py

Inside the test.py you should only put definitions with a test_ prefix

def test_Definition_in_Class(val):
    assert val == 1 # this code could be BS

### To execute

pytest ./tests
python -m ./test

repository: pabloderen/radforest

repo_name: pabloderen/radforest


text:
# python-synthi

A Python package for interacting with Synthi via Python scripts and/or Jupyter notebooks

## Environment variables

This package needs to know where a valid Synthi host is and have a valid api key. These
can be set as environment variables:

```bash
export SYNTHI_API_HOST=your_api_host
export SYNTHI_API_KEY=your_api_key
```

or, in python (before you `import synthi`):

```python
import os
os.environ['SYNTHI_API_HOST'] = your_api_host
os.environ['SYNTHI_API_KEY'] = your_api_key
```

## Usage

If you've already set environment variables as indicated above, you can
just rely on the defaults:

```python
from synthi import Connection
client = Connection()
client.organization.set_default('your-org')

# list datasets
synthi.dataset.list()

# get a dataset
df = synthi.dataset.get('some-dataset')
```

You can also specify a host and api key when initializing the `Connection`:

```python
from synthi import Connection
client = Connection('http://your-host', 'your-api-key')
client.organization.set_default('your-org')

# list datasets
client.dataset.list()

# get a dataset
df = client.dataset.get('some-dataset')
```

## Other operations

The python API is split into 3 major high level namespaces: `dataset`, `transformation`, and `organization`. The main ones you'll be working with are the first two.

Uploading a dataset:

```python
client.dataset.upload('dataset-name', '/path/to/dataset.csv')
```

Defining a computed dataset (via a non-reusable transformation):

```python
client.dataset.define('computed-name', '/path/to/transformation.py')
```

where 'transformation.py' would be expected to have something like the following:

```python
df = dataset_input('dataset-name')

def transform():
  return df.head()
```

This transformation assumes the existence of 'dataset-name'.

If we wanted to define a *reusable* transformation, we do something very similar:

```python
client.transformation.define('reusable-name', '/path/to/reusable.py', inputs=['dataset-name'])
```

We could even use the same file as above. The main difference is to use this transformation, we have to tell it what *actual* datasets to map to `dataset-name`:

```python
client.dataset.define('computed-name-2', template='reusable-name', inputs={ 'dataset-name': 'some-dataset'})
```

In this case, we expect `some-dataset` to exist, but we could have used that transformation on any other existing dataset as well.

## Development setup

The following will get you into a bash shell where you can test out changes
to the package. By default, it's connected to the synthi_default network, which
assumes that you've got Synthi running locally. We'll probably want to make this
configurable later.

```bash
docker-compose run dev
```

The project directory will be available in /usr/src/pkg, so you can do a local
pip install via:

```bash
pip install -e /usr/src/pkg
```

That should allow you to:

```python
import synthi
```

and work with whatever the most up to date code is in your project folder.
Keep in mind that you'll want to restart python and reimport your module to
test out changes to the code.

## Running tests

```bash
./run-tests.sh
```

This runs a python 3 development image, does a directory-based install of the current synthi
python package, and then runs *main.py* under *./test/*.

Resulting dataset output will show up in *./test/data/output*.

repository: cybera/python-synthi

repo_name: cybera/python-synthi


text:
# Alexa "Space Quiz" skill

---

This is a trivia-style skill for Amazon Alexa, with space-based questions.

### Development

1. Set Up Credentials for an Amazon Web Services (AWS) Account, see [this link](https://developer.amazon.com/docs/smapi/set-up-credentials-for-an-amazon-web-services-account.html)
2. Install and Initialize ASK CLI, see [this](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html#step-2-install-and-initialize-ask-cli)
3. Edit the skill
4. Deploy with the command `ask deploy`

repository: novoda/spikes

gha_language: Java

repo_name: novoda/spikes


text:
# Intro to Web
Living project that i'll build over time with the express intent of building something that covers 80% of edge cases when learning web development from development to deployment.

# Objectives
1. [HTML/CSS](./01-intro-to-html-css/README.md)
2. [JS](./02-intro-to-js/README.md)
3. Application Part 1
    - create a website
         - login, user, pass, experiation, cookies, localstorage
         - swapi.com
4. Bootstrap / jQuery - Develop Locally
5. Application Part 2
6. API's and Server Side
7. Application Part 3
8. SQL Databases
9. Application Part 4
10. Deployment on Cloud Services
11. Application Part 5
12. Frameworks
   - server-side MVC
   - client-side MVVM
13. Desktop / Mobile
   - WPF
   - Android Studio
   - Swift

repository: chrisbcarl/web-design-zero-to-hero

repo_name: chrisbcarl/web-design-zero-to-hero


text:
# Enda's Dotfiles

These are my dotfiles, as well as some common packages I have installed on my OS.

## Installation

To install the `dotfiles` binary and all my configurations, simply run the following

```sh
curl https://raw.githubusercontent.com/craicoverflow/dotfiles/main/install.sh | bash
```

This will install the `dotfiles` binary and add it to your path.

## Usage

### Install packages

To install the packages found in `$DOTFILES_ROOT/packages.yaml`:

```sh
dotfiles install
```

If you wish to disable installation of some of these packages, add a `packages-local.yaml` file to the `$DOTFILES_ROOT` folder, and only the configs you need to disable and set the value to `false`:

```diff
---
brew:
  packages:
-   neovim: true
+   neovim: false
-   docker: true
+   docker: true
```

### Compare dotfiles

When there are updates to the dotfiles repo, you can compare the changes with your dotfiles before you apply them:

```sh
dotfiles diff
```

### Apply dotfiles

If you are happy with then changes, run the following command to update your dotfiles:

```sh
dotfiles apply
```

### Add a new dotfile

If you have a dotfile you would like to be managed by this repo, run `dotfiles add <path/to/dotfile> <folder/in/dotfiles-repo>`

```sh
$ dotfiles add ~/.config/gh/config.yml gh
Creating directory /Users/jdoe/dotfiles/gh
```

> TIP: Run `dotfiles add <from> <to> local` to add a dotfile for this repo but ignore it in Git.

### Edit dotfiles

Run the following command to open the dotfiles in your preferred edit (`$EDITOR`):

```sh
dotfiles edit
```

repository: craicoverflow/dotfiles

repo_name: craicoverflow/dotfiles


text:
# OmniAuth Shootproof
### Based off OmniAuth OAuth2

[![Gem Version](http://img.shields.io/gem/v/omniauth-shootproof.svg)][gem]
[![Build Status](https://travis-ci.org/SavvySoftWorksLLC/omniauth-shootproof.svg?branch=master)](https://travis-ci.org/SavvySoftWorksLLC/omniauth-shootproof)
[![Dependency Status](http://img.shields.io/gemnasium/SavvySoftWorksLLC/omniauth-shootproof.svg)][gemnasium]

[gem]: https://rubygems.org/gems/omniauth-shootproof
[travis]: http://travis-ci.org/SavvySoftWorksLLC/omniauth-shootproof
[gemnasium]:https://gemnasium.com/github.com/SavvySoftWorksLLC/omniauth-shootproof

Shootproof API Docs:
- Auth: https://developer.shootproof.com/authdocs
- Actions: https://developer.shootproof.com/apidocs

This gem contains an OmniAuth strategy for Shootproof. It relies on the OAuth2 and OmniAuth-OAuth2 gems. Shootproof API does not conform exactly to the standard set forth with the base OAuth2 Client so some changes include:
- Access Tokens require the same params as the original Authorization request. The confusing part is the Token request is required POST so query string params are not included by default.
- The Access token requires the `redirect_uri` to match the `callback_url` from the Authorization request. Omniauth by default provides the query params from the Authorization callback in future `redirect_uri` params. This will no longer match so the query string is ditched.
- The Authorization endpoint does not pass-through any params os CSRF protection using the `state` param is not possible.

## Configuring the Shootproof Strategy

```ruby

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :shootproof, <SHOOTPROOF_APP_ID>,
    scope: 'sp.event.get_list sp.event.get_photos sp.photo.info'
end
```
That's pretty much it!

Like normal you will have to interpret the authenticaion response in your OmniAUth Session Controller.

The `info` response will contain the following hash
```
{
  token: <ACCESS TOKEN>,
  refresh_token: <REFRESH TOKEN>,
  expires_at: <WHEN THE TOKEN AND REFRESH EXPIRE>,
  expires_in: <TIME LEFT UNTIL EXPIRATION>
}
```

For convenience the `uid` will be populated with the Access Token

Paul Scarrone<EMAIL_ADDRESS>Gary Newsome<EMAIL_ADDRESS>SavvySoftWorks LLC.

repository: ninjapanzer/omniauth-shootproof

repo_name: ninjapanzer/omniauth-shootproof


text:
# Wind_Analysis

By Peter Sharpe

## Description

Statistical models for high-altitude winds over the CONUS in the summertime. By high-altitude, we just mean "outside of Earth's boundary layer", so at least 1-2km of altitude.

## Model

In code, the model looks like:

```python
def wind_speed_conus_summer_99(altitude, latitude):
    """
    Returns the 99th-percentile wind speed magnitude over the continental United States (CONUS) in July-Aug. Aggregate of data from 1972 to 2019.
    :param altitude: altitude [m]
    :param latitude: latitude [deg]
    :return: 99th-percentile wind speed over the continental United States in the summertime. [m/s]
    """
    l = (latitude - 37.5) / 11.5
    a = (altitude - 24200) / 24200

    agc = -0.5363486000267786
    agh = 1.9569754777072828
    ags = 0.1458701999734713
    aqc = -1.4645014948089652
    c0 = -0.5169694086686631
    c12 = 0.0849519807021402
    c21 = -0.0252010113059998
    c4a = 0.0225856848053377
    c4c = 1.0281877353734501
    cg = 0.8050736230004489
    cgc = 0.2786691793571486
    cqa = 0.1866078047914259
    cql = 0.0165126852561671
    cqla = -0.1361667658248024
    lgc = 0.6943655538727291
    lgh = 2.0777449841036777
    lgs = 0.9805766577269118
    lqc = 4.0356834595743214

    s = c0 + cql * (l - lqc) ** 2 + cqa * (a - aqc) ** 2 + cqla * a * l + cg * exp(
        -(abs(l - lgc) ** lgh / (2 * lgs ** 2) + abs(a - agc) ** agh / (
                    2 * ags ** 2) + cgc * a * l)) + c4a * (
                a - c4c) ** 4 + c12 * l * a ** 2 + c21 * l ** 2 * a

    speed = s * 56 + 7
    return speed
```

## Results

![50](wind_speeds_50.svg)

![75](wind_speeds_75.svg)

![90](wind_speeds_90.svg)

![95](wind_speeds_95.svg)

![99](wind_speeds_99.svg)


text:
OpenCRG
=======

[OpenCRG](https://en.wikipedia.org/wiki/OpenCRG) is a library and file format
used to describe road surfaces, enabling applications such as simulation of
tires and vibrations during driving.

This Repository
===============

This repository contains the C API found in the subdirectory `c-api/baselib`
of all releases previously published on [opencrg.org](http://opencrg.org/)
and available through
[web.archive.org](https://web.archive.org/web/*/opencrg.org) or sourced by
other means, i.e. some versions in the range from 1.0.2 to 1.1.2.

Due to unclear licensing, the current release 1.2.0 is not available here.
However, it may be obtained from another public
[git repository](https://code.asam.net/simulation/standard/asam-opencrg.git).

Building OpenCRG C API
======================

Either use `make` and install the haeders and resulting archive library
manually or use [Spack](https://spack.io/) together with the
[HLRS Vis Spack Repository](https://github.com/hlrs-vis/spack-hlrs-vis).

repository: hlrs-vis/opencrg

repo_name: hlrs-vis/opencrg


text:
# JS8 APRS Startup
Startup script for [JS8Call](http://js8call.com) and associated APRS app [JS8CallUtilsGPSD](https://github.com/m0iax/JS8CallUtilsGPSD) on Raspberry Pi running Buster Desktop.

Related to my [HF APRS with JS8Call project](https://lonneys-notebook.blogspot.com/2020/02/hf-aprs-with-js8call.html).

`js8aprs_start.sh` can run at startup via `js8aprs_start.desktop` located in `/home/pi/.config/autostart`.

I discovered this autostart method from [How to Run a Raspberry Pi Program on Startup](https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup#method-2-autostart).

The scripts assume the default `/home/pi` home directory.

To install:
```
cd
git clone https://github.com/lonney9/JS8AprsStart.git
cd JS8AprsStart
chmod +x js8aprs_start.sh
mkdir /home/pi/.config/autostart
mv js8aprs_start.desktop /home/pi/.config/autostart/
```


text:
# CloneSpaces

Clone DigitalOcean Spaces or Amazon S3 from one Space or Bucket to another

## Description

A very simple tool to copy all files from DO Spaces or Amazon S3 to another location and replicate all Keys.

## Getting Started

### Dependencies

- net5.0
- AWSSDK.S3
- System.CommandLine

### Executing program

- Clone the repo

### Run for DO Spaces

```
export SPACES_KEY=<your key>
export SPACES_SECRET=<your secret>
```

```
dotnet run -- <source-space-name> <destination-space-name>
```

### Run for S3

```
export AWS_ACCESS_KEY_ID=<your key>
export AWS_ACCESS_KEY_ID=<your secret>
```

```
dotnet run -- <source-space-name> <destination-space-name> --s3
```

## Use Docker

```
sh run.sh <key> <secret> <source> <destination>
```

## Help

Haven't tested on S3 yet. Most likely the EndpointURL config needs work.

## License

The MIT License (MIT)

Copyright (c) 2015 Chris Kibble

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: JasonKroll/CloneSpaces

repo_name: JasonKroll/CloneSpaces


text:
I've learned some of
my most important life lessons
from drug dealers
and gang members
and prostitutes,
and I've had some of my most
profound theological conversations
not in the hallowed halls of a seminary
but on a street corner
on a Friday night, at 1 a.m.
That's a little unusual, since I am
a Baptist minister, seminary-trained,
and pastored a church for over 20 years,
but it's true.
It came as a part of my participation
in a public safety
crime reduction strategy
that saw a 79 percent reduction
in violent crime
over an eight-year period in a major city.
But I didn't start out wanting to be
a part of somebody's
crime reduction strategy.
I was 25, had my first church.
If you would have asked me
what my ambition was,
I would have told you
I wanted to be a megachurch pastor.
I wanted a 15-, 20,000-member church.
I wanted my own television ministry.
I wanted my own clothing line.

(Laughter)

I wanted to be your long distance carrier.
You know, the whole nine yards.

(Laughter)

After about a year of pastoring,
my membership went up about 20 members.
So megachurchdom was way down the road.
But seriously, if you'd have said,
"What is your ambition?"
I would have said just to be
a good pastor,
to be able to be with people
through all the passages of life,
to preach messages that would have
an everyday meaning for folks,
and in the African-American tradition,
to be able to represent
the community that I serve.
But there was something else
that was happening in my city
and in the entire metro area,
and in most metro areas
in the United States,
and that was the homicide rate
started to rise precipitously.
And there were young people
who were killing each other
for reasons that I thought
were very trivial,
like bumping into someone
in a high school hallway,
and then after school,
shooting the person.
Someone with the wrong color shirt on,
on the wrong street corner
at the wrong time.
And something needed
to be done about that.
It got to the point where it started
to change the character of the city.
You could go to any housing project,
for example, like the one that was
down the street from my church,
and you would walk in,
and it would be like a ghost town,
because the parents wouldn't allow
their kids to come out and play,
even in the summertime,
because of the violence.
You would listen in the neighborhoods
on any given night,
and to the untrained ear,
it sounded like fireworks,
but it was gunfire.
You'd hear it almost every night,
when you were cooking dinner,
telling your child a bedtime story,
or just watching TV.
And you can go to any emergency
room at any hospital,
and you would see lying on gurneys
young black and Latino men
shot and dying.
And I was doing funerals,
but not of the venerated matriarchs
and patriarchs who'd lived a long life
and there's a lot to say.
I was doing funerals of 18-year-olds,
17-year-olds,
and 16-year-olds,
and I was standing in a church
or at a funeral home
struggling to say something
that would make some meaningful impact.
And so while my colleagues were building
these cathedrals great and tall
and buying property outside of the city
and moving their congregations out
so that they could create
or recreate their cities of God,
the social structures in the inner cities
were sagging under the weight
of all of this violence.
And so I stayed, because somebody
needed to do something,
and so I had looked at what I had
and moved on that.
I started to preach decrying
the violence in the community.
And I started to look
at the programming in my church,
and I started to build programs
that would catch the at-risk youth,
those who were on the fence
to the violence.
I even tried to be innovative
in my preaching.
You all have heard of rap music, right?
Rap music?
I even tried to rap sermon one time.
It didn't work, but at least I tried it.
I'll never forget the young person
who came to me after that sermon.
He waited until everybody was gone,
and he said, "Rev, rap sermon, huh?"
And I was like, "Yeah, what do you think?"
And he said, "Don't do that again, Rev."

(Laughter)

But I preached and I built these programs,
and I thought maybe if
my colleagues did the same
that it would make a difference.
But the violence just
careened out of control,
and people who were not involved in

the violence were getting shot and killed:
somebody going to buy a pack
of cigarettes at a convenience store,
or someone who was sitting
at a bus stop just waiting for a bus,
or kids who were playing in the park,
oblivious to the violence
on the other side of the park,
but it coming and visiting them.
Things were out of control,
and I didn't know what to do,
and then something happened
that changed everything for me.
It was a kid by the name of Jesse McKie,
walking home with his friend
Rigoberto Carrion
to the housing project
down the street from my church.
They met up with a group of youth
who were from a gang in Dorchester,
and they were killed.
But as Jesse was running
from the scene mortally wounded,
he was running in the direction
of my church,
and he died some 100, 150 yards away.
If he would have gotten to the church,
it wouldn't have made a difference,
because the lights were out;
nobody was home.
And I took that as a sign.
When they caught some of the youth
that had done this deed,
to my surprise, they were around my age,
but the gulf that was between us was vast.
It was like we were in two
completely different worlds.
And so as I contemplated all of this
and looked at what was happening,
I suddenly realized that there was
a paradox that was emerging inside of me,

and the paradox was this:
in all of those sermons
that I preached decrying the violence,
I was also talking about
building community,
but I suddenly realized
that there was a certain
segment of the population
that I was not including
in my definition of community.

And so the paradox was this:
If I really wanted the community
that I was preaching for,
I needed to reach out
and embrace this group
that I had cut out of my definition.
Which meant not about building programs
to catch those who were
on the fences of violence,
but to reach out and to embrace those
who were committing the acts of violence,
the gang bangers, the drug dealers.
As soon as I came to that realization,
a quick question came to my mind.
Why me?
I mean, isn't this a law
enforcement issue?
This is why we have the police, right?
As soon as the question, "Why me?" came,

the answer came just as quickly:
Why me? Because I'm the one who
can't sleep at night thinking about it.
Because I'm the one looking around saying
somebody needs to do something about this,
and I'm starting to realize
that that someone is me.
I mean, isn't that how
movements start anyway?
They don't start with a grand convention
and people coming together
and then walking in lockstep
with a statement.
But it starts with just a few,
or maybe just one.
It started with me that way,
and so I decided to figure out
the culture of violence
in which these young people
who were committing them existed,
and I started to volunteer
at the high school.
After about two weeks
of volunteering at the high school,
I realized that the youth
that I was trying to reach,
they weren't going to high school.
I started to walk in the community,
and it didn't take a rocket scientist
to realize that they weren't out
during the day.
So I started to walk the streets
at night, late at night,
going into the parks where they were,
building the relationship
that was necessary.
A tragedy happened in Boston
that brought a number of clergy together,
and there was a small cadre of us
who came to the realization
that we had to come out
of the four walls of our sanctuary
and meet the youth where they were,
and not try to figure out
how to bring them in.
And so we decided to walk together,
and we would get together
in one of the most dangerous
neighborhoods in the city
on a Friday night and on a Saturday night
at 10 p.m.,
and we would walk
until 2 or 3 in the morning.
I imagine we were quite the anomaly
when we first started walking.
I mean, we weren't drug dealers.
We weren't drug customers.
We weren't the police. Some of us
would have collars on.
It was probably a really odd thing.
But they started speaking
to us after a while,
and what we found out is that
while we were walking,
they were watching us,
and they wanted to make sure

of a couple of things:
that number one, we were going
to be consistent in our behavior,
that we would keep coming out there;
and then secondly,
they had wanted to make sure
that we weren't out there to exploit them.
Because there was always
somebody who would say,
"We're going to take back the streets,"
but they would always seem to have
a television camera with them,
or a reporter,
and they would enhance
their own reputation
to the detriment of those on the streets.
So when they saw that we had none of that,
they decided to talk to us.
And then we did
an amazing thing for preachers.
We decided to listen and not preach.
Come on, give it up for me.

(Laughter)

(Applause)

All right, come on, you're cutting
into my time now, okay?
(Laughter)

But it was amazing.
We said to them, "We don't know
our own communities after 9 p.m. at night,
between 9 p.m. and 5 a.m.,
but you do.

So talk to us. Teach us.
Help us to see what we're not seeing.
Help us to understand
what we're not understanding."
And they were all too happy to do that,
and we got an idea of what life
on the streets was all about,
very different than what you see
on the 11 o'clock news,
very different than what is portrayed
in popular media and even social media.
And as we were talking with them,
a number of myths were dispelled
about them with us.
And one of the biggest myths was
that these kids were cold and heartless
and uncharacteristically bold
in their violence.
What we found out was the exact opposite.
Most of the young people
who were out there on the streets
are just trying to make it on the streets.
And we also found out
that some of the most
intelligent and creative
and magnificent and wise
people that we've ever met
were on the street,
engaged in a struggle.
And I know some of them call it survival,
but I call them overcomers,
because when you're in
the conditions that they're in,
to be able to live every day
is an accomplishment of overcoming.
And as a result of that, we said to them,
"How do you see this church,
how do you see this institution
helping this situation?"
And we developed a plan
in conversation with these youths.
We stopped looking at them
as the problem to be solved,
and we started looking at them
as partners, as assets,
as co-laborers in the struggle
to reduce violence in the community.
Imagine developing a plan,
you have one minister at one table
and a heroin dealer at the other table,
coming up with a way in which the church
can help the entire community.
The Boston Miracle was about
bringing people together.
We had other partners.
We had law enforcement partners.
We had police officers.
It wasn't the entire force,
because there were still some who still
had that lock-'em-up mentality,
but there were other cops
who saw the honor in partnering
with the community,
who saw the responsibility from themselves
to be able to work as partners
with community leaders and faith leaders
in order to reduce violence
in the community.
Same with probation officers,
same with judges,
same with folks who were
up that law enforcement chain,
because they realized, like we did,
that we'll never arrest ourselves
out of this situation,
that there will not be
enough prosecutions made,
and you cannot fill these jails up enough
in order to alleviate the problem.
I helped to start an organization
20 years ago, a faith-based organization,
to deal with this issue.
I left it about four years ago
and started working in cities
across the United States,
19 in total,
and what I found out
was that in those cities,
there was always this component
of community leaders
who put their heads down
and their nose to the grindstone,
who checked their egos at the door
and saw the whole as greater
than the sum of its parts,
and came together and found ways
to work with youth out on the streets,
that the solution is not more cops,
but the solution is mining the assets
that are there in the community,
to have a strong community component
in the collaboration
around violence reduction.
Now, there is a movement
in the United States
of young people who I am very proud of
who are dealing with the structural issues
that need to change if we're going
to be a better society.
But there is this political ploy
to try to pit police brutality
and police misconduct
against black-on-black violence.
But it's a fiction.
It's all connected.
When you think about decades
of failed housing policies
and poor educational structures,
when you think about
persistent unemployment
and underemployment in a community,
when you think about poor healthcare,
and then you throw drugs into the mix
and duffel bags full of guns,
little wonder that you would see
this culture of violence emerge.
And then the response that comes
from the state is more cops
and more suppression of hot spots.
It's all connected,
and one of the wonderful things
that we've been able to do
is to be able to show the value
of partnering together --
community, law enforcement,
private sector, the city --
in order to reduce violence.
You have to value
that community component.
I believe that we can end
the era of violence in our cities.
I believe that it is possible
and that people are doing it even now.
But I need your help.
It can't just come from folks
who are burning themselves out
in the community.
They need support. They need help.
Go back to your city.
Find those people.
"You need some help? I'll help you out."
Find those people. They're there.
Bring them together with law enforcement,
the private sector, and the city,
with the one aim of reducing violence,
but make sure that
that community component is strong.
Because the old adage

that comes from Burundi is right:
that you do for me,
without me, you do to me.
God bless you. Thank you.

(Applause)

repository: prewittdavon/TEDVis

repo_name: prewittdavon/TEDVis


text:
---
layout: post
---
Programs allocate resources for use during execution.  The problem with resources is that they are limited and often times need to be recycled.  Languages devise constructs and patterns for developers to periodically free up resources so that their programs can continue running.

In Native C++ you typically dealt with two kinds of resources that needed recyling.

* Memory
* Operating System Resources (usually handles of one form or another)

C++ uses the "delete" operator and destructors to handle reclying both resources.  When "delete" is called on an object it will call it's destructor and then free the memory (in that order).  Operating system resources are typically freed in the destructor of a C++ object ([Resource Aquisition is Ini tialization](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initializati on)).  So in one fell swoop the "delete" operator handles recycling both C++ types of resources.

.Net is garbage collected and hence only has to deal with one kind of resource.

* Operating System Resources

.Net has no "delete" call because you're not meant to be freeing memory in yourself (it's the CLR's job).  .Net objects which handle operating system resources typically free them up via the Dispose interface.  Most languages (including C# and VB) provide a "using" pattern by which you can easily hold onto a resource for a given time and guarantee it will be freed at the end of the operation.

The problem comes when people familiar with C++ "delete" semantics attempt to apply them to the .Net dispose pattern.  Dispose does **not** free managed objects memory.  The memory of the object is still available and can be accessed just fine.

This is not saying that's a good idea (in fact it's typically a bad one).  Most objects provide for very unpredictable behavior once Dispose has been called and hence you shouldn't be using them.

gha_language: HTML


text:
# FunctionPacks
Adds function packs with argument feature to the PocketMine-MP

# What it does?

- It lets you run multiple commands with arguments!

# Usage

Create file in `functions` directory in your server folder.

Open it and type some commands!

Example:
```
say Hi! I am %player and i typed %0 while using this command! Also i used %1 after that!
say If i repeat i used %0 and %1 and maybe more!
```

NOTE: If you don't type anything for arguments it will be still %0 so will not be changed to something!

# TODO

- Maybe adding jsons to add settings for functions such as needed arguments / permissions etc.

# Help/Suggestion/Bug Report

- They can get help, suggest something or report some bugs here: https://github.com/OguzhanUmutlu/FunctionPacks/issues
- Also they can contact me on Discord: `Oğuzhan#6561`

repository: CrozeStudios/FunctionPacks

repo_name: CrozeStudios/FunctionPacks