text:
# Tutorial

This tutorial will guide you through the different topics of kdo

## Starlark

Starlark is a python dialect, which is also use in bazel or ytt. It allows you to run code
in a controlled sandbox without access to the outer world.

## Interoperability with helm

Kubernete deployment orchestrator is designed from ground up to be mostly compatible with helm packages

### Helm to kdo

You can deploy almost every helm chart using *kdo* except those, which uses [hooks](https://helm.sh/docs/topics/charts_hooks/) for deployment.

```
kdo apply helm://charts.helm.sh/stable/mysql
kubectl get pods
kdo list -A
kdo delete helm://charts.helm.sh/stable/mysql

```

### Kubernete deployment orchestrator to helm

Kubernete deployment orchestrator charts can be wrapped into helm charts using `kdo package --helm`. Kubernete deployment orchestrator uses [hooks](https://helm.sh/docs/topics/charts_hooks/) to implement this.

```python
# Chart.star
def init(self):
  self.__class__.version = "0.0.1"
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.__class__.version = "0.0.1"
EOF
kdo package --helm .
helm upgrade -i example example-0.0.1.tgz
helm uninstall example
```

## Templating

In kdo, you can chose between go templating and [ytt](https://get-ytt.io/)

### ytt templating

You should prefer ytt templating because ytt also uses starlark. Therefore the interoperability between kdo and ytt is much better compared to helm templating.
You can directly call methods from ytt.

```python
# Chart.star
def init(self):
  self.timeout = 30
```

```yaml
kind: Secret
stringData:
  timeout: #@ self.timeout
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example/ytt-templates
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.timeout = 30
EOF
cat > ytt-templates/secret.yaml <<EOF
kind: Secret
stringData:
  timeout: #@ self.timeout
EOF
kdo template .
```

### Go Templating (helm)

Go templating is mostly compatible with helm. All required functions are provided. All attributes of `self` are available as `.Values`

```python
# Chart.star
def init(self):
  self.timeout = 30
```

```yaml
kind: Secret
stringData:
  timeout: {{ .Values.timeout | quote }}
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example/templates
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.timeout = 30
EOF
cat > templates/secret.yaml <<EOF
kind: Secret
stringData:
  timeout: {{ .Values.timeout | quote }}
EOF
kdo template .
```

#### Methods

You can also call methods from the go template

```python
# Chart.star
def name(self):
  return "my-name"
```
```yaml
kind: Secret
stringData:
  upper: {{ call .Methods.name }}
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example/templates
cd /tmp/example
cat > Chart.star <<EOF
def name(self):
  return "my-name"
EOF
cat > templates/secret.yaml <<EOF
kind: Secret
stringData:
  upper: {{ call .Methods.name }}
EOF
kdo template .
```

### Overriding methods

You can override the built in methods `apply`, `delete` and `template`. You can use the provided methods `__apply`, `__delete` and `__template` to call the base implementations

```yaml
# Chart.star
def template(self, glob="", k8s=None):
   print("Hello World")
   return self.__template(glob, k8s)
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def template(self, glob="", k8s=None):
   print("Hello World")
   return self.__template(glob, k8s)
EOF
kdo template .
```

## Deployment

You can choose between different deployment methods:
* kubectl
* kapp
* helm (see [helm-subcharts](#helm-subcharts))

### kubectl

```bash
rm -rf /tmp/example
mkdir -p /tmp/example/ytt-templates
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  pass
EOF
cat > ytt-templates/secret.yaml <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: test
stringData:
  test: test
EOF
kdo apply .
kdo delete .
```
### kapp

```python
cat > Chart.star <<EOF
def apply(self, k8s):
  k8s.tool = "kapp"
  self.__apply(k8s)
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example/ytt-templates
cd /tmp/example
cat > Chart.star <<EOF
def apply(self, k8s):
  k8s.tool = "kapp"
  self.__apply(k8s)
EOF
cat > ytt-templates/secret.yaml <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: test
stringData:
  test: test
EOF
kdo apply .
kapp list -A
kdo delete .
```

## Properties

You can define properties, which can be set using the command lines. All items from `values.yaml` inside the (helm) chart are automatically converted to properties

```python
def init(self):
  self.timeout = property(default=30)
  self.docker_config = struct_property(password=property(),username=property(default="_json_key"))
```

```yaml
kind: Secret
stringData:
  timeout: #@ self.timeout
```

```bash
kdo template . --set timeout=60
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example/ytt-templates
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.timeout = property(default=30)
EOF
cat > ytt-templates/secret.yaml <<EOF
kind: Secret
stringData:
  timeout: #@ self.timeout
EOF
kdo template . --set timeout=60
```

## Associations

You can have 3 types of associations
* sub charts
* depedencies
* helm sub charts

### Subcharts

Subcharts can be used if another chart is owned (not shared) by the parent chart. You can set any property of the sub chart.

```python
def init(self):
  self.mysql = chart('helm://charts.helm.sh/stable/mysql')
  self.mysql.ssl.enabled = False
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.mysql = chart('helm://charts.helm.sh/stable/mysql')
  self.mysql.ssl.enabled = False
EOF
kdo template .
```

### Helm subcharts

This is mostly the same as the example above, except that `helm template` is used for templating and `helm upgrade -i` for application.

```python
def init(self):
  self.mysql = helm_chart('helm://charts.helm.sh/stable/mysql')
  self.mysql.ssl.enabled = False
```
### Dependencies

Dependencies can be used, if a subchart can be shared. If the dependency is not installed, it's automatically applied to the cluster.
You can also set properties of the sub chart. But this is not implemented correctly yet.
Currently the properties are only taken into account, if the dependency is not already installed.

```python
def init(self):
  self.mysql = depends_on('helm://charts.helm.sh/stable/mysql',">= 1.0")
```

### Calling methods of associations

It's not only possible to set properties of associations. It's also possible to
call methods. For associations created with `depends_on` this only possible
during `apply` or `delete`.

```python
def hello(self, name):
  print("Hello " + name)
```

```python
def init(self):
  self.__class__.version = "1.0.0"
  self.hello = depends_on('../hello',">= 0.0")
def apply(self,k8s):
  self.hello.hello("Kyma")
```

```bash
rm -rf /tmp/hello
mkdir -p /tmp/hello
cd /tmp/hello
cat > Chart.star <<EOF
def hello(self, name):
  print("Hello " + name)
EOF
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.__class__.version = "1.0.0"
  self.hello = depends_on('../hello',">= 0.0")
def apply(self,k8s):
  self.hello.hello("Kyma")
EOF
kdo apply /tmp/example
```

## URLs

| URL                                                               | Description                               |
|-------------------------------------------------------------------|-------------------------------------------|
| `./`                                                                | current directory                         |
| `helm://charts.helm.sh/stable/mysql`                                | latest helm chart in this helm repository |
| `helm://charts.helm.sh/stable/mysql`                                | latest helm chart in this helm repository |
| `https://github.com/<repo>/archive/<branch-or-tag>.zip`             | Github repository                         |
| `https://github.com/sap/kubernetes-deployment-orchestrator/archive/master.zip#charts/kdo` | Subdirectory in github repository         |
| `https://<host>/api/v3/repos/<owner>/<repo>/zipball/<branch>`       | Enterprise github repository              |
| `catalog:<chart>`                                                   | Chart from catalog (see below)            |

### Catalog

You can define a catalog, which contains all charts, you would like to be able to deploy.
The chart name is appended to the configured catalog URL.
The catalog can be configured in `~/.kdo/config`. You can have many catalogs. They are tried in the given order.

```yaml
catalogs:
  - /Users/d001323/workspace/catalog
```

You can use the urls like

```bash
kdo template catalog:cluster-essentials
```

## Utilities
### User credentials

```python
def init(self):
  self.credential = user_credential('test')
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.credential = user_credential('test')
EOF
kdo template .
```

### Certificates

```python
def init(self):
  self.certificate = certificate('test',is_ca=True,domain="example.com")
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def init(self):
  self.certificate = certificate('test',is_ca=True,domain="example.com")
EOF
kdo template .
```

## kubernetes client

Kubernete deployment orchestrator includes a full featured kubernetes client which can be used in `apply`, `delete` or `template` actions

### Get

```python
def apply(self,k8s):
  print(k8s.get('service','kubernetes').status)
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def apply(self,k8s):
  print(k8s.get('service','kubernetes').status)
EOF
kdo apply .
```

### Watch

The `watch` loop will never end by default. You need to use `break` for this purpose.

```python
def apply(self,k8s):
  for service in k8s.watch('service','kubernetes'):
    print(service)
```

```bash
rm -rf /tmp/example
mkdir -p /tmp/example
cd /tmp/example
cat > Chart.star <<EOF
def apply(self,k8s):
  for service in k8s.watch('service','kubernetes'):
    print(service)
EOF
kdo apply .
```

### Apply

```python
def apply(self,k8s):
  service = k8s.get('service','kubernetes')
  service.metadata.labels.test = "test"
  k8s.apply(service)
```

### Delete

## Unit testing

There is an in memory implementation of the kubernetes client

```python
c = chart("../charts/example/simple/uaa")
c.apply(k8s)
uaa = k8s.get("statefulset","uaa-master")
assert.eq(uaa.metadata.name,"uaa-master")
assert.neq(uaa.metadata.name,"uaa-masterx")
```

```bash
kdo test test/*.star
```

## Controller

There is also a controller available, which reconciles installation. Currently it's broken.
## Extend

It's easy to extend kdo with you own DSL: https://github.com/wonderix/cfpkg


text:
# vexpansion
An application to expand vim with custom functionalities via Python.
This project is still WIP.

This is a small tool I use to expand my Vim with some functionalities I find convenient to have when using Vim for simple scripting.

While I personally use this little program as is this project is supposed to be an exmaple of how to implement plugins for Vim using python3.

# structure

license: MIT

repository: meisto/vexpansion

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: meisto/vexpansion


text:
# 0.4.0
* **Remove** bower pkg

# 0.3.2
* We are currently not support `latest` as a version. I replaced this tag by the the numeric latest version.

# 0.3.1
* remove invalid invisible characters

# 0.3.0
* Add all the packages documents here: https://confluence.ciena.com/display/frost/Ember+ecosystem

# 0.2.0
* Add documentation
* Fix #1

# 0.1.1
* Remove unnecessary dependencies

# 0.1.0
* Add "fake" LTS file
* Add addon "ember-cli-ecosystem-installer" installation in blueprint

# 0.0.1
* Fix travis file

repository: dafortin/ember-cli-ember-ecosystem

repo_name: dafortin/ember-cli-ember-ecosystem


text:
---
layout: post
title: "Adelaide Versus Alice Springs Climate, Visualized"
description: "A silly comparison of climate in two Australian cities: Alice Springs and Adelaide. Done in Python with Matplotlib."
feature-img: "assets/img/rainbow.jpg"
thumbnail: "assets/img/rows.jpg"
tags: [Python, Matplotlib, Australia, Data Visualization]
---

A short walk around the Adelaide CBD was enough to start me wondering if Adelaide's climate wasn't better than that of Alice Springs. It seemed that no matter the time of year, the weather in Adelaide was much nicer than Alice. I grabbed some climate data from Wikipedia and a couple of graphs later my suspicion was confirmed: If Alice Springs and Adelaide had a baby and it was exactly like Adelaide in every way it would be a great place.

Adelaide stays nice in the summer while Alice gets blisteringly hot.

![Summer temps]({{site.baseurl}}/assets/img/hot.png)

Yet manages to stay warmer in the winter months. I definitely moved to the wrong city.

![Winter temps]({{site.baseurl}}/assets/img/cold.png)

gha_language: HTML

gha_license_id: MIT


text:
# Certificate Authorities

_acme4j_ should support any CA that is providing an ACME server.

## Available Providers

The _acme4j_ package contains these providers:

* [Let's Encrypt](letsencrypt.md)
* [Pebble](pebble.md)

More CAs may be supported in future releases of _acme4j_.

Also, CAs can publish provider jar files that plug into _acme4j_ and offer extended support.

!!! note
    You can always connect to any ACMEv2 compliant server, by passing the `URL` of its directory service to the `Session`.

gha_language: Java


text:
---
layout: post
title:  "Software Optimization - SIMD Practice (gcc compiler option)"
date:   2019-10-30 23:32:00
categories: SoftwareOptimization
tags: SIMD gcc Optimization Architecture
---
* content
{:toc}

As we discussed in previous blog Software-Optimization-With-SIMD.
We are going to use three methods to see the performance of SIMD vectorization.
1. gcc compiler option:
2. C Inline
3. C Intrinstics

## gcc compiler option:

```c++
//Loop 1
// Fill the array with random data
for (x = 0; x < SAMPLES; x++) {
    data[x] = (rand()%65536)-32768;
}

Result: vol1.c:25:2: note: not vectorized: loop contains function calls or data references that cannot be analyzed
```

```c++
//Loop 2
// Scale the volume of all of the samples
for (x = 0; x < SAMPLES; x++) {
    data[x] = scale_sample(data[x], 0.75);
}

Result: vol1.c:32:2: note: LOOP VECTORIZED
```

```c++
//Loop 3
// Sum up the data
for (x = 0; x < SAMPLES; x++) {
    ttl = (ttl+data[x])%1000;
}

Result :vol1.c:38:2: note: not vectorized: unsupported use in stmt.
```

After use -O3 and -ftree-vectorize options, we are going to see the auto vectorization results from compiler. Among these three loops, only the second loop can be successfully vectorized.

The reason Loop 2 is able to be vectorized is that the single intruction ```scale_sample(data[x], 0.75);``` can be applied to various lanes and the result of lanes will not be influenced by order of executions.

Loop 3 is failed to be vectorized because the instruction ```ttl = (ttl+data[x])%1000;``` is order sensitive and the result of each current ttl is depend on the previous ttl. We cannot simply do same instruction on each lane and sum them up at the end.

Let's make an minimal example:

```c++
ttl = 0;
data[4] = {1,2,3,4};
```

In sequencial way, each loop should be:
```c++
ttl = (0+1)%1000 = 1
ttl = (1+2)%1000 = 3
ttl = (3+3)%1000 = 6
ttl = (6+4)%1000 = 10
```

If we seperate it into 2 lanes and apply this operation:
```c++
//Lane 1
ttl = (0+1)%1000 = 1
ttl = (1+2)%1000 = 2

//Lane 2
ttl = (0+3)%1000 = 3
ttl = (3+4)%1000 = 7
```
The result of serial version and vectorization can be totally different. So the compiler decise not to use auto-vectorization.

In order to optimize the loop3, we can make this loop vectorized by move the remainder outside

```c++
//Loop 3
// Sum up the data
for (x = 0; x < SAMPLES; x++) {
    ttl = ttl+data[x];
}
ttl = ttl%1000
Result :vol1.c:38:2: note: LOOP VECTORIZED.
```

In this case, the result each lane can be independent from others after we copy ```ttl = 0``` to each lane. we need to notice that the ttl result will be affected.

To see examples about C Inline methods, please go to next blog: Software-Optimization-With-SIMD-Practice-C-Inline

extension: markdown


text:
# HRsoft

HRsoft is single page applications for managing database for clients, created for portfolio purpose. With all the best practices and modern design.

The site scores 88% on Performance and 100% all the aspect in Lighthouse i.e. Accessibility , Best Practices and SEO and loads up in less than 3 seconds approx.

Click [here](https://hrsoft-app.herokuapp.com/) for live site.

## Technologies and Library used in the project.

- ReactJS
- State Management - Redux with Thunk
- Serverless - Firebase
- SASS
- Bundler - Parcel
- Yarn - Package Manager
- Testing with Jest
- Hosting - Heroku

## Due credit to

- [Google Fonts](https://fonts.google.com/) - Fonts
- [flaticon](https://www.flaticon.com/) - Icons

## License

This project is licensed under the MIT License

Note: Feel free to clone, edit and redistribute but do provide required credit/attribution for Images, Icons, and Fonts etc.

gha_language: JavaScript


text:
# ROS_Tello
ROS Tello driver
Goal: for use with keyboard teleop and ROStopic command

Fork of https://github.com/yuokamoto/ros_tello

To Run:
```
./setup.sh
catkin build
roslaunch ros_tello tello.launch
```

# Ros Topics
## tello/keys
Keyboard operations (WASD, Up/Down, Left/Right)

## tello/command
A command from the list below

```python
takeoff
land
forward
backward
left
right
ccw
cw
```


text:
# Potpesa
Integrating Lipa Na Mpesa Online payments into Swahilipot Hub Website(or any other).

# Prerequisites

Create an App on the Safaricom Developer Portal.

Access to the Mpesa Web Portal

Wordpress Installation

## Installation
Download from the latest releases of this repository.

## Configuration
Navigate to https://yoursite.tld/wp-admin/admin.php?page=potpesa and fill in the configuration as required.

## Usage
To render a payments form on any page, use the shortcode [POTPESA].
The form shows two fields ( phone and amount ).

## Payment Processing
Once the customer presses the button, they will get a prompt on their phone asking them to confirm the payment by entering their PIN Number.

## Payment Reconciliation
The plugin creates a custom post type called post_payment on request and updates the same when response is received from Safaricom Mpesa.

## Listing Records
The payments received are listed on a page in the admin dashboard.

## Contributing
You are free to contribute to changes to the code and make a pull request and we will merge.

## Licensing
This code is released under the MIT license. See LICENSE

repository: isaacongoma/potpesa

repo_name: isaacongoma/potpesa


text:
## is-judge ![npm](https://badge.fury.io/js/is-judge.png)

a tiny, smart utility to use in js's judgement

### Installation
````
$ [sudo] npm install is-judge
````

Or

````
$ component install Tinple/is
````

### Node
````
var is = require('is-judge');
````

### Browser
````
<script src="./is.js">
````

### API

Support five primitive data types
```
is.Null(obj);
is.Undefined(obj);
is.String(obj);
is.Boolean(obj);
is.Number(obj);
```

Type Check Utility
```
is.Object(obj);
is.Array(obj);
is.ArrayLike(obj); // is.ArrayLike support node element
is.RegExp(obj)
is.Function(obj);
is.Arguments(obj);
is.Empty(obj);
is.Finite(obj);
is.Generator(obj);
is.GeneratorFunction(obj);
is.Node(obj);
is.Element(obj);
is.Window(obj);
```

Environment Check Utility
```
is.Chrome();
is.Firefox();
is.Opera();
is.Safari();
is.ie(v); // support specific ie version check
is.Mobile();
is.Tablet();
is.iphone();
is.ipad();
is.ipod();
is.ios();
is.Android();
is.AndroidPhone();
is.AndroidTablet();
is.BlackBerry();
is.WindowsPhone();
is.WindowsTablet();
is.Desktop();
is.Windows();
is.Mac();
is.Linux();
```

Other Useful Check Utility
```
is.inArray(val, arr);
is.Equal(a, b); //support object, is.Equal({}, {}) return true
```

### Contributing
- Fork this repo
- Clone your repo
- Install dependencies
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Open a pull request, and enjoy <3

### MIT license
Copyright (c) 2014 Tinple

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.

---
![docor](https://cdn1.iconfinder.com/data/icons/windows8_icons_iconpharm/26/doctor.png)
built upon love by [docor](https://github.com/turingou/docor.git) v0.1.3

repository: Tinple/is

repo_name: Tinple/is


text:
# comment ranking : wilson score interval

https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9

https://www.evanmiller.org/how-not-to-sort-by-average-rating.html

We need to balance the proportion of positive ratings with the uncertainty of a small number of observations

confidence sort

submission time is irrelevant

Comments are ranked by confidence and by data sampling — — i.e. the more votes a comment gets the more accurate its score will become.

```
If a comment has one upvote and zero downvotes, it has a 100% upvote rate, but since there’s not very much data, the system will keep it near the bottom. But if it has 10 upvotes and only 1 downvote, the system might have enough confidence to place it above something with 40 upvotes and 20 downvotes — figuring that by the time it’s also gotten 40 upvotes, it’s almost certain it will have fewer than 20 downvotes. And the best part is that if it’s wrong (which it is 15% of the time), it will quickly get more data, since the comment with less data is near the top.
```

repository: sanjosh/csdocs

repo_name: sanjosh/csdocs


text:
# Release notes for October 19th - November 1st

## Table of contents
* [Identity](#identity)

## Identity

### .NET
#### [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/communication/Azure.Communication.Identity/CHANGELOG.md#110-beta1-2021-10-29)

- Updated version of Identity API to enable to build custom Teams endpoint using M365 Teams identities

### JS
#### [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/communication/communication-identity/CHANGELOG.md#110-beta1-2021-10-29)

- With the dropping of support for Node.js versions that are no longer in LTS, the dependency on `@types/node` has been updated to version 12. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
- Updated our internal core package dependencies to their latest versions in order to add support for Opentelemetry 1.0.0 which is compatible with the latest versions of our other client libraries.
- Changed TS compilation target to ES2017 in order to produce smaller bundles and use more native platform features
- Added support to build custom Teams endpoint using M365 Teams identities
  - `CommunicationIdentityClient` added a new method `getTokenForTeamsUser` that provides the ability to exchange an AAD access token of a Teams user for a Communication Identity access token

### Java
#### [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/communication/azure-communication-identity/CHANGELOG.md#120-beta1-2021-10-29)

- Added support for Microsoft 365 Teams identities

repository: Azure/Communication

repo_name: Azure/Communication


text:
# MIRO – Minimum Information for Reporting of an Ontology

The MIRO guidelines are a community-validated set of recommendations on what should be reported about an ontology and its development, most importantly in the context of ontology description papers intended for publishing in scientific journals or conferences.

[MIRO guidelines](https://github.com/owlcs/miro/blob/master/miro.md "MIRO guidelines")

repository: coolvinod/miro

repo_name: coolvinod/miro


text:
**Important Note:** As of September 2018, Google has [deprecated the adsenseformobileapps.com placement exclusion](https://support.google.com/google-ads/answer/9051067), rendering this script obsolete.

# Exclude adsenseformobileapps.com AdWords Script

This script was built to ensure adsenseformobileapps.com is systematically excluded from display campaigns.

## Setup

The only part of the script that needs to be modified is replacing 'Display' by what you identify display campaigns with:

```javascript
// Your naming convention to identify display campaigns
var DISPLAY = 'Display'
```

You'll also want to schedule the script to run hourly.

## Considerations

While I realize that you could simply add adsenseformobileapps.com to your account placement exclusions (which can't be accessed through a script right now), this automates the process so you don't ever have to think about it.


text:
# Blissful Maze

<img width="2560" alt="BlissfulMaze" src="https://user-images.githubusercontent.com/38311240/115366273-fdf25800-a1e6-11eb-81a2-6188eee37160.png">

This repository is sample game project on Unity.

## Technologies

* Built on: [Unity 2020.1.15f](https://unity3d.com/get-unity/download)
* DI-Container: [Zenject v9.2.0](https://github.com/modesttree/Zenject)

## Gameplay

The game consists in passing __procedurally generated__ maze. Start project and use ___W,A,S,D___ keys to move the cube.\
Find the best way to reach the finish!

repository: Ferbdi/BlissfulMaze

branch_name: refs/heads/main

repo_name: Ferbdi/BlissfulMaze


text:
# box
A box type for modern C++.

Sometimes, all you need is an object on the heap, be it due to inheritance requirements or space management issues. Currently, many people resort to `std::unique_ptr`, but this actually poses a problem: Unique pointers are not copyable and are, as the name suggests, modeled after regular pointers, which is oftentimes not what you want or need. Instead, this sort of problem calls for a box type: A container that contains at most a single element, with all the conveniences and interfaces of regular containers built in.

## Usage
*This project is C++17 only.* The library is single header only. Just drop `include/box.hpp` into your project and you're good to go!

## Examples
_TODO_

## TODO

 - Expand the interface
 - Write more tests
 - Documentation
 - Implement EBO for stateless allocators
 - `noexcept` correctness and exception guarantees
 - Think of a better namespace name (suggestions welcome!)

repository: BiCapitalization/box

repo_name: BiCapitalization/box


text:
# ghal.ga
Navigate to GitHub Asset Location

## How does it work?
Just put repository path, OS and architecture after our URL and you will navigated to latest release download URL.

Like this:

    https://ghal.ga/tcnksm/ghr?os=darwin&arch=amd64

You can also specify the tag name.
Like this:

    https://ghal.ga/tcnksm/ghr@v0.5.0?os=linux&arch=386

Have fun!


text:
# dropbox downloader
downloads **all files** inside dropbox account

## limitations
a limitation to be mindful of is the amount of bandwidth used daily for your share links. Basic accounts have a total of 20GB of bandwidth and Plus accounts have 200GB. This is per day on a 24-hour sliding window.
[source](https://help.dropbox.com/security/banned-links)

## usage
`python lol.py`

follow instructions.

gha_language: Jupyter Notebook


text:
# Nanopod

A minimalist command-line podcast downloader, designed to be run from a crontab.

## Requirements

- Python 2
- Modules listed in requirements.txt

## Usage

Install Nanopod requirements:

    pip install -r requirements.txt

Install Nanopod:

    ./setup.py install

Create a nanopod.yaml file (or any other name actually), wherever works best
for you, with content like this:

    default:
        # Where to save podcasts
        download_dir: /home/media/podcasts

        # How many podcasts to keep
        max_count: 5
    podcasts:
        - url: http://feeds.gitminutes.com/gitminutes-podcast
        - url: http://cdn2-europe1.new2.ladmedia.fr/var/exports/podcasts/sound/revue-de-presque.xml

Let Nanopod download them:

    nanopod -c /path/to/nanopod.yaml

It will create in `/home/media/podcasts` one directory per podcast, and in this
directory, one file per podcast, named using the following format:
`<year>-<month>-<day> - <slugified-version-of-title>.mp3`.

If there are more than `max_count` mp3 files in the podcast dir, the oldest ones
will be removed.

## Motivation

I was looking for a podcast download tool with the following features:
- Crontab friendly: run from the command-line, without requiring configuration
  files to be stored in the home of a specific user
- Capable of handling the "La revue de presque de Nicolas Canteloup" podcast,
  which has the particularity of having all its episodes named "podcast.mp3"
  (hence the renaming feature)
- Would run on the Debian Wheezy of my home server

I tried quite a few tools, could not find one which satisfied my needs, so ended
up writing Nanopod in an evening.

## License

BSD

repository: agateau/nanopod

repo_name: agateau/nanopod


text:
---
layout: post
title:  "Lorenz attractor with Python"
tags: [chaos, complex systems, complexity, data, math, matplotlib, modeling, numpy, python, science, theory, visualization]
excerpt: Our world is strange but if we look into some mathematical problems we can find that is even stranger than we thought before. One of this strange mathematical problems is the Lorenz system which we will solve using Euler method.
---

{% include math-jax.html %}

Imagen a world were even the smallest butterfly can destroy the whole planet, it sounds ridicules, right. However, there may be some truth in that and in the mid-twentieth century, mathematician Edward Lorenz developed a simple mathematical model for describing atmospheric convection. The model contain a system of three ordinary differential equations which we now know as the Lorenz equations:

$$\begin{alignedat}{2}
    &\frac{dx}{dt} = \sigma (y - x)\\
    \\
    &\frac{dy}{dt} = x (\rho - z) - y\\
    \\
    &\frac{dz}{dt} = x y - \beta z
\end{alignedat}$$

These equations show us that if we change the initial conditions even a little bit, we will get a different output. Here is the tricky part the output will be fundamentally different not just closely related to the previews one. This behavior is called chaotic and this is the reason why many physical systems are fundamentally unpredictable.

# Solving the Lorenz system
There are many methods to solve this system, some of them are easy other are extremely difficult. We will use the easiest one the Euler method. First we need to understand how the method is working. We'll use the equation:

$$y'=y, \quad y(0)=1$$

The formula to solve this equation:

$$y_{n+1} = y_n + hf(t_n,y_n)$$

where the step is equal to 1 $(h=1)$

$y_1 = y_0 + hf(y_0) = 1 + 1 \cdot 1 = 2$

$y_2 = y_1 + hf(y_1) = 2 + 1 \cdot 2 = 4$

$y_3 = y_2 + hf(y_2) = 4 + 1 \cdot 4 = 8$

$y_4 = y_3 + hf(y_3) = 8 + 1 \cdot 8 = 16$

Now we can apply the same method to the Lorenz system and find the numerical solution of the system.

{% highlight python %}
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
%matplotlib inline

sigma = 10
rho = 28
beta = 8/3

h = 0.01
t = 10000

x = np.empty(t+1)
y = np.empty(t+1)
z = np.empty(t+1)

x[0]=10
y[0]=10
z[0]=10

for i in range(t):
    x[i+1] = x[i] + h*(sigma*(y[i] - x[i]))
    y[i+1] = y[i] + h*(x[i]*(rho - z[i]) - y[i])
    z[i+1] = z[i] + h*(x[i]*y[i] - beta*z[i])

fig = plt.figure(figsize=(12, 9))
ax = fig.gca(projection='3d')
ax.xaxis.set_pane_color((1,1,1,1))
ax.yaxis.set_pane_color((1,1,1,1))
ax.zaxis.set_pane_color((1,1,1,1))
ax.plot(x, y, z, color='g', alpha=0.7, linewidth=0.5)
ax.set_xlabel("X Axis")
ax.set_ylabel("Y Axis")
ax.set_zlabel("Z Axis")
{% endhighlight %}
![](/assets/lorenz_attractor.png)

It looks amazing and it wasn't so difficult. This looks great, however, it is static but we want to have some movement. Fortunately we can do it relatively easy and the result is astonishing.

![](/assets/lorenz_attractor_animation.gif)

To produce this gif image we needed 500 images which we combine with [Ezgif](https://ezgif.com/maker).

We saw that if we change the initial conditions we will get different output. If we play with $\rho$ and change the values we can produce many different outputs. Now you can understand why is chaotic, right.
![](/assets/lorenz_attractor_many.png)

# Sources:
[Lorenz system in Wikipedia](https://en.wikipedia.org/wiki/Lorenz_system)

[Lorenz Attractor in MathWorld](https://mathworld.wolfram.com/LorenzAttractor.html#:~:text=The%20Lorenz%20attractor%20is%20an,(1))

[Euler method](https://en.wikipedia.org/wiki/Euler_method#:~:text=In%20mathematics%20and%20computational%20science,with%20a%20given%20initial%20value.)


text:
# to-centesimal

This is a little module that tries to convert units of currency (think dollars) into centesimal values.

[![Build status](https://travis-ci.org/michaelrhodes/to-centesimal.svg?branch=master)](https://travis-ci.org/michaelrhodes/to-centesimal)

## Install

```sh
$ npm install to-centesimal
```

## Usage

```js
var cents = require('to-centesimal')

cents('$1.50')
=> 150
cents('£1.25')
=> 125
cents('£1')
=> 100
cents('€10.50')
=> 1050
cents('1¢')
=> 1
cents('1c')
=> 1
```

## Page weight

| compression             |    size |
| :---------------------- | ------: |
| to-centesimal.js        | 2.36 kB |
| to-centesimal.min.js    | 1.66 kB |
| to-centesimal.min.js.gz |   864 B |

## Caveats

The regular expression used is auto-generated from a list of countries’ currency symbols. I’m too lazy to research all of them, so please open an issue if notice something is amiss.

## License

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

repository: michaelrhodes/to-centesimal

repo_name: michaelrhodes/to-centesimal


text:
# HLS_DECIMAL_MULT EXAMPLE

* Provides a simple base allowing to discover how to exchange ***single precision floating points (float) or double precision floating points (double)*** between the application on server and the action in the FPGA.
* C code is multiplying 3 decimal numbers read from host memory and writing result in host memory
  * code can be executed on the CPU (application + software action)
  * code can be simulated (application + software and hardware action)
  * code can then run in hardware when the FPGA is programmed (application + software and hardware action)
* The example code shows the following:
  * **application** writes floats or doubles to system host memory and read results to display and compare results processed and expected
  * **software or hardware action** reads floats or doubles from system memory, multiply decimals 3 by 3 and write the results back in memory
  The key point here is for the FPGA to ***understand*** the data read from the host memory and formatted by the server Operating System. The code shows the conversion to be done so that the number read can be used as a float or double in HLS code.
As an example it is important to understand that 4.5 is represented in host memory differently depending on the type used:
    * as a double as 0x4012_0000_0000_0000
    * as a float  as 0x4090_0000.

 __Usage:__
 * `./snap_decimal_mult -n12 -v` Application calls the hardware action and multiply 12 values 3 by 3. Dumps of data displayed
 * `SNAP_CONFIG=CPU ./snap_decimal_mult` Application calls the software action
 * `SNAP_TRACE=0xF  ./snap_decimal_mult` to display all MMIO exchanged between application and action
 * `./../tests/test_0x1014100B.sh` to execute automatic testing

 __Parameters:__
*  arguments in command line:
   * `-n [value]` defines the number of decimals to process (lower or equal than MAX_NB_OF_DECIMAL_READ)
   * `-w` writes to files the result processed by the action (dec_mult_action.bin) and the expected results (dec_mult_ref.bin). Used for automatic testing.
   * `-v` verbose mode which will display a dump of the inputs and results from host memory
* parameters in include/common_decimal.h:
   * `#define MAX_NB_OF_DECIMAL_READ  16` defines the maximum number of decimals to read
   * `typedef float  mat_elmt_t;` definse the type used: float or double

__Files used__:
```
|
|       Makefile                  General Makefile used to automatically prepare the final files
|       README.md                 Documentation file for this example
|
├───sw                            Software directory containing application called from POWER host and software action
|       snap_decimal_mult.c       APPLICATION which calls the software or the hardware action depending on the flag used
|                                 (use SNAP_CONFIG=CPU to call software action and SNAP_CONFIG=FPGA or nothing to call hardware action)
|       action_decimal_mult.c     SOFTWARE ACTION which will be executed on the CPU only
|       Makefile                  Makefile to compile the software files
|
├───include                       Common directory to sw and hw
|       common_decimal.h          COMMON HEADER file used by the application and the software/hardware action.
|                                 (It contains the main structure and the defines parameters)
|
├───hw                            Hardware directory containing the hardware action
|       action_decimal_mult.cpp   HARDWARE ACTION which will be executed on FPGA and is called by the application
|       action_decimal_mult.H     header file containing hardware action parameters
|       Makefile                  Makefile to compile the hardware action using Vivado HLS synthesizer
|
└───tests                         Test directory containing all automated tests
        test_0x1014100B.sh        Basic test shell running snap_decimal_mult application
 ```

gha_language: C


text:
---
title: Account Settings
layout: post
category: Account
description: Questions about admin type stuff? Account Settings? Billing statements? Don't worry, we've got it all covered right here.
post_intro:
 Here's the lowdown on your Account Settings. Billing questions? Need to add a Manager? Just need some light reading? Let's do this.

footer: 'for_intermediates'
---

### Opening Your Account Settings

Most of the important settings for your Wistia Account are housed in the
*Account Settings*. Many of the tips below require you to open the Account
Settings as well.

{{ "Account Settings is an Account Owner privilege. Make sure you're logged in as the Account Owner to access these menus." | alert}}

Once you're logged in as the Account Owner, find the *Account* drop-down menu in the upper-right hand corner. Next, select the
*Settings* option seen here:

{% post_image hashed_id: '3ec494cfbab90a33f10773c437fc58e72f28b752', width: 600, class: 'float_left' %}

That will bring you straight to the Overview section of your Account Settings. Hooray!

---

## Uploading Your Logo
From the *Settings*, choose the Account tab on the right. In there, you will see your current account logo (it's the Wistia logo by default) and have the option to upload a new one.  Your logo will be displayed on the upper left of every page in your account area, and on your public video pages.

{% post_image hashed_id: '2751326997d8c973714f35073f807b89023c7088', width: 600, class: 'center' %}

If you'd like to place your logo below an embedded video, check out the Social Bar section in [Customize]({{ '/customizing-your-video' | post_url }}).

---

## Change the Subdomain (URL) of your Wistia Account

By default, your account URL is based on the domain of your email address. To change your Wistia account URL, you must be logged in as the **Account Owner**. Click the Account tab in *Settings*, and scroll down to find the *Wistia URL* section shown here:

{% post_image hashed_id: '1d3b8b8cc903d5df0a3dd9432dd6933428e305b3', width: 600, class: 'center' %}

In the section labeled "Wistia Subdomain," you will see a text box showing the current URL of your Wistia account (in the case of the above picture,`http://home.wistia.com`).  Type the name you wish to use instead in the text box (only letters, numbers, and hyphens) and press *Save Settings* at the bottom to save your changes.

{{ "Once you change the URL for your account, all previous links referenced by http://YourOldName.wistia.com will no longer work." | note }}

---

### Twitter Handle

Want to make sure tweets referencing your Wistia videos tag your Twitter account? Learn more about Wistia and Twitter on the [Social Sharing page]({{ '/social-sharing#twitter_handle' | post_url }}).

---

## Filtering Out Internal Stats

Need to make sure you're not skewing the stats during testing? Good news! You can filter out your own viewing activity (and the viewing activity of anyone else on your team) from your Wistia stats based on IP address.

As the **Account Owner**, in *Settings*, click the Account tab on the right - this contains an IP filtering section where you can enter comma-separated IP addresses. You can find your IP address by [searching for "ip" in Google](https://www.google.com/search?q=ip). Google will tell you what yours is at the top of the search results.

{% post_image hashed_id: 'fd9c39a7ec8f628703b0bdc623ee159929b1eb87', width: 600, class: 'center' %}

{{ "Activating IP filtering will not remove any historical data – it will, however, keep your activity from getting tracked in the stats going forward." | note }}

---

## Anonymize IPs

Sometimes you'll need to anonymize the IPs Wistia collects in order to abide by local laws (looking at you Germany). If you need to anonymize the IP addresses Wistia pulls in, in *Settings* click on the **Account** tab on the right. Scroll down to the Anonymize IPs section, and click **Activate**.

{% post_image hashed_id: '207aeca78e6f7d95c1ddc80d94b052dfbeb43738', width: 600, class: 'center' %}

Make sure you scroll all the way to the bottom of the page to **Save** your settings!

---

## Domain Restrictions

Video embed domain restrictions allows you to prevent a viewer
from copying your video embed codes and pasting them on their domain.
When domain restriction is set up, the videos in your account will only
display on the domains you specify.

Domain restrictions apply to all videos in your account. Here's how to set up
Domain restrictions for your account:

1. Open to the Account tab in your Account Settings (which requires
  **Account Owner** privileges).
2. Scroll down to the **Domain Restrictions** section.
3. Select the "Enabled" radio button, and enter the domains you wish to whitelist.
  Don't forget to save your updates!
4. When you embed your videos onto a website you allow, it will appear
  properly. If the video was embedded on a webpage **not** in your whitelist,
  it would appear as it does below.

{% post_image hashed_id: '76dbe0fb4f1d3373bc1e307446218d11742f2590', class: 'center' %}

## Video Quality

By default, [Wistia will automatically determine]({{ '/export-settings#how_wistia_does_hd' | post_url }})
the best way to deliver your video for the smoothest playback. If,
however, you'd like to choose your own Video Quality setting for your
account, you can do so in your Account Settings. Click the Account tab
in *Settings*, and scroll down to find the *Video Quality* section.

{% post_image hashed_id: 'd0246fca7aa6bf6753b1c47f5c5da479502ab63e', class: 'center' %}

Choose a Video Quality, and don't forget to save!

## Monthly Usage

To see the storage and bandwidth usage on your account, you must be logged in as
the **Account Owner**. Select the *Usage* tab in your Account Settings.

{% post_image hashed_id: '7920ac1e4d2ab7634c5aadfc0e8f63cdb8976f53', class: 'center' %}

This will show you how much bandwidth you have used, along with your current
account limits. If you have a storage limit on your account, that will be
displayed as well.

## Billing Statements

To see billing statements, you must be logged in as the **Account Owner**.
Click the "Billing" tab in your Account Settings. This will display a complete
history of the payment activity on your account.

{% post_image hashed_id: 'b00b87b48826ed1a31d96b045bf6579a79c3a7b3', width: 600, class: 'center' %}

## Updating your Credit Card

To update your credit card, you must be the **Account Owner**. Once logged in,
head to your [Account Settings](#opening_your_account_settings) and select the
"Billing" tab on the right. On your billing page, you will see a form to enter
your credit card information.

{% post_image hashed_id: '34cfa3061946b0459e777a2f9e20c8f09856d238', width: 600, class: 'center' %}

After updating your credit card, you can check to make sure that your recent
payments went through successfully by looking at the
[Billing Statements](#billing_statements) section.

## Adding & Removing Managers

From your *Account Settings*, click the "Managers" tab on the sidebar. To add a Manager, enter the new Manager's
email address into the text box and click ADD AS MANAGER.

{% post_image hashed_id: 'd9c181f32c331c7aa16a98632025f0ebca9c916b', width: 600, class: 'center' %}

To remove existing Managers, click *Remove* next to their email address in the Current Managers list.

## API Access

An API token and password can be used for interacting with the
[Wistia APIs]({{ '/developers' | post_url }}), and for setting up 3rd party
integrations (like Pardot and HubSpot).

To access those credentials for your account, select the API tab from your
*Account Settings* as the **Account Owner**.

## Integrations

Want to integrate Wistia with your email service provider or marketing automation
platform? This is the place to start setting it up! From your Account Settings just
select **[Integrations](https://my.wistia.com/account/integrations)** under *Advanced*.

{% post_image hashed_id: 'e240fa09932698de83f7cb7d2b20d23b1075849c', class: 'center' %}

For more information about email and marketing automation integrations, head over
to the [Integrations Index]({{ '/integrations' | post_url }}).

### Beta Features

Here you can enable (or disable) new and experimental features! Fair warning:
**beta features may change, break, or be removed at any time**. For more information
on beta features check out our [Betapugs](http://wistia.com/beta) program.

{% post_image hashed_id: '508d66c23dd4ddf08a51d1b8011de37c1620ec2d', class: 'center' %}

## Transferring Ownership of Your Account

If you need to set someone else up as the owner of your account, the first step
is to [add them as a Manager](#adding__removing_managers).

Once the new owner is a Manager (or maybe they already were, you are so sneaky
efficient!), select the *Account* tab in your Account Settings.

{% post_image hashed_id: 'aa398787f771bec9d8d92b4a566f364da6bcbf44', class: 'center' %}

Select the new owner from the *Account Owner* menu, and then *Save Settings* at
the bottom of the page. Ownership will be transferred immediately.

## Changing your Email Address

If you would like to change the email address associated with your user account,
it's actually super easy! Click the *Personal* tab in Settings sidebar.

{% post_image hashed_id: '71ead07ca1c43264669608f037bdc00216abe6ba', class: 'center' %}

From there you can very easily change the email that you use to log in to Wistia and receive notifications to!

## Canceling Your Account

We understand, sometimes it just isn't meant to be.

If you'd like to cancel your account you must be logged in as the **Account Owner**.
After logging in, navigate to your Account Settings and choose "Cancel" from the
side menu. We'll ask you to fill out a few questions about your experience,
and you're good to go.

Godspeed, fellow video friend.

{% post_image hashed_id: '4b245e3c8a2acb7722fd4234d260e68e92fdca27', class: 'center' %}

{{ "Accidentally cancel? You can re-activate your account by logging in as the Account Owner. Hooray!" | tip }}

repository: DLIProj/wistia-open-docs

repo_name: DLIProj/wistia-open-docs


text:
# Animation Plugin for Leaflet.js
[![npm version](https://badge.fury.io/js/leaflet.motion.svg)](https://www.npmjs.com/package/leaflet.motion)

## General information

A [leaflet](http://www.leafletjs.com) plugin which allows users to [apply animation](https://igor-vladyka.github.io/leaflet.motion/).

### Downloads
**NPM**
````
npm install --save leaflet.motion
````

**YARN**
````
yarn add leaflet.motion
````

### Usage
**Include script**:
```html
<script src="dist/leaflet.motion.min.js"></script>
```

**Main options**:
```js
L.motion.polyline([], options, motionOptions, markerOptions).addTo(map); //  as L.polyline
L.motion.polygon([], options, motionOptions, markerOptions).addTo(map); //  as L.polygon
L.motion.group([], options).addTo(map); //  as L.featureGroup - to run all animation at same time
L.motion.seq([], options).addTo(map); //  as L.featureGroup - to setup seq for animations.
```

### Options:

You can pass a number of options to the plugin to control various settings.

**Default control options**

| Option        | Type         | Default      | Description   |
| ------------- |--------------|--------------|---------------|
| pane    		| [Pane](https://leafletjs.com/reference-1.3.4.html#map-pane) | 'polymotionPane' 	  | Default pane |

**Motion options**

| Option        | Type         | Default      | Description   |
| ------------- |--------------|--------------|---------------|
| auto     		| Boolean      | false  	  | Indicates auto start animation on plugin added to the map |
| easing    	| [L.Motion.Ease](https://github.com/Igor-Vladyka/leaflet.motion/blob/master/src/leaflet.motion.easing.js)| L.Motion.Ease.linear | Animation strategy |
| speed    		| Number | 0 | Motion speed in KM/H |
| duration    	| Number | 0 | Motion duration in ms, 0 means no animation, instant rendering on motionStart()|

**Marker options**

All [MarkerOptions](https://leafletjs.com/reference-1.3.4.html#marker-option) that you can add to any marker + one more:

| Option        | Type         | Default      | Description   |
| ------------- |--------------|--------------|---------------|
| removeOnEnd	| Boolean | false  | Removes marker from map on motion end |

Here's an example of passing through some options:
``` js
L.motion.polyline([[50,0], [60,10]], {
	color: "transparent"
}, {
	auto: true,
	duration: 3000,
	easing: L.Motion.Ease.easeInOutQuart
}, {
	removeOnEnd: true,
	icon: L.divIcon({html: "<i class='fa fa-car fa-2x' aria-hidden='true'></i>", iconSize: L.point(27.5, 24)})
}).addTo(map);
```

### Public methods

#### L.motion.*
Public methods in all motion objects:
``` js
motionStart() // to start motion.
motionStop() // to stop motion.
motionPause() // to pause motion.
motionResume() // to resume paused motion.
motionToggle() // to pause motion, if it's running. To start motion if it's not. Also will resume motion if it was paused.
```

#### L.motion.polyline and L.motion.polygon
Additional methods in polyline and polygon
``` js
motionDuration(duration) // - expected duration for motion in milliseconds, can be used after motion is created.
motionSpeed(speed) // - expected motion speed in KM/H, can be used after motion is created.
addLatLng(latLng) // - allows to add additional point in the end for the motion animation.
```

### Motion Events
| Event           | Value     | Description |
| - | - | - |
| L.Motion.Event.Started   | { layer } | Fires on motion stated on root element only |
| L.Motion.Event.Paused | { layer } | Fires on motion paused on root element only |
| L.Motion.Event.Resumed | { layer } | Fires on motion resumed on root element only |
| L.Motion.Event.Ended | { layer } | Fires on motion ended on root element only |
| L.Motion.Event.Section | { layer } | Fires on each motion section change in L.Motion.Seq starting with first one |


text:
# ExDaas

Elixir Database as a Service

Serialized - fault tolerant - self caching - self sharding - NoSQL DB :rocket:

Provides a RESTful API that can handle concurrent requests (Phoenix) but serializes all writes to disk.

All serialized writes can be split up by amount of shards.

Default shard size is 4. Any other wanted size can be set via `SHARD_LIMIT` (Any number above 0).

DiskIO is delegated via [DETS](http://erlang.org/doc/man/dets.html) and all cache is handled using [ETS](https://elixir-lang.org/getting-started/mix-otp/ets.html).

If the entire app fails, the data is loaded form disk into cache, and performance is back to normal.

Example supervision tree of a default shard size (4):

![](https://user-images.githubusercontent.com/9837366/37997853-005b93e0-31e2-11e8-9fe7-0e33eb54f943.PNG)

_Suprisingly performant_ :smile:

## Development

**Deps**:

1. Docker
1. Elixir
1. Bash (masOS, Linux, WSL (Win10))

**On first boot**:

`./scripts/test.sh`

1. Generate Secret
1. Ensure all needed directories are made
1. Ensure everything is installed
1. Run tests
1. Create an Alpine Docker Container
1. Build release (not exposed, just testing it can build)

Essentially the _bootstrapping_ script :rocket:

Called test, because it ensures that your dev enviornment is ready to roll, and it runs tests :smile:

## Deploying to Heroku (for testing purposes)

**WARNING: THIS SHOULD ONLY BE FOR TESTING PURPOSES**

_Heroku will not keep the `dets_*` files on reboot/rebuild since it is not in git history_

Make sure the container builds (heroku will rebuild it anyways but just be sure it works)!

`./scripts/test.sh`

### If not logged in to Heroku

```bash
heroku login
heroku container:login
```

Now: `APP_NAME=<app_name> ./scripts/heroku.sh`

## Deploying to Digital Ocean/Vultr/EC2

Make sure you have Docker and docker-compose!
Make sure you have your ssh key as an authorized key for your target node!

### Build the release with Docker

1. In one shell: `./scripts/docker.release.sh`
1. In another shell (once release is built): `./scripts/docker.copy.release.sh`
1. Grab tarball and scp: `scp -r ./exdaas.tar.gz user@<target_ip>:/home/user`
1. SSH into your server: `ssh user@<target_ip>`
1. Unpack the tarball: `tar -xzf exdaas.tar.gz`
1. Make your DETS_ROOT directory: `mkdir -p $DETS_ROOT`
1. Run the server:

        a. As a Daemon: `DETS_ROOT=<dets_root> PORT=<port> ./bin/exdaas start`
        b. In the foreground: `DETS_ROOT=<dets_root> PORT=<port> ./bin/exdaas foreground`
        c. In interactive mode: `DETS_ROOT=<dets_root> PORT=<port> ./bin/exdaas console`

## Backing up data

1. Tarball: `./scripts/archive.tar.sh`
2. Zip: `./scripts/achrive.zip.sh`

You may pass `DETS_ROOT`:

Example:

`DETS_ROOT=/home/user/my_persistance_dir ./scripts/archive.tar.sh`

## Current Benchmarks

~13k req/s in an Alpine Docker Container running on Ubuntu 17.10 in production mode on a 2 Core Intel i7 from 2013

**CPU Info**

```bash
Model name:          Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
```

### To run benchmarks

You will need two tabs/panes/shell for this:

1. Build the container and run it: `./scripts/test.sh`
2. Wait for: `Attaching to exdaas_prod_1`
3. Run the bench suite in a different shell/pane/tab: `./scripts/bench.sh`

        a. To keep changes in git HEAD pass the `-c` flag
        b. Ex: `./scripts/bench.sh -c`
        c. Otherwise the `.results.log` file will be checked out

### Another Alternative for Benching

_Default sharding is set to 4_

```bash
./scripts/console.bench.sh
```

**If you want to increase the shard size**

_You may set `SHARD_LIMIT` to any positive number over 0_

```bash
SHARD_LIMIT=16 ./scripts/console.bench.sh
```

_Remember this is synchronous and using a stream or a parallel map can be more realistic_

```elixir
alias ExDaas.Ets.Table, as: EtsTable

data = %{color: "blue"}

# if you changed SHARD_LIMIT
# ex: SHARD_LIMIT=24
# change 0..3 to 0..23 (or limit - 1)
ets_tables = 0..3 |> Enum.map(fn i -> :"ets_table_#{i}" end)

# this will be cold cache
0..20_000 |> Enum.each(fn i ->
  table_id = rem(i, length(ets_tables))
  EtsTable.fetch(i, data, Enum.at(ets_tables, table_id))
end)

# this will be warm cache
0..20_000 |> Enum.each(fn i ->
  table_id = rem(i, length(ets_tables))
  EtsTable.fetch(i, data, Enum.at(ets_tables, table_id))
end)
```

Exit the shell and `rm dets_*`

## LICENSE

**MIT**

See: `LICENSE` file in root of project

repository: selfup/exdaas

gha_language: Elixir

repo_name: selfup/exdaas


text:
v0.2.2
------
Not yet released

* Gt.css updated. New normalize.css, vanilla style as standard.
* FontAwesome updated to version 4

v0.2.1
------
15th Jan 2014

* Manifest introduced to handle client-side assets.
* JShrink added to ClientSideCompiler to minify JavaScript.
* Using Composer to manage class dependencies.
* Replaced bundled PhpSass processor with SCSSPHP.
* HTML5 <template> element introduced.
* URLs are intuitive & case-insensitive.
* DomEl objects can call all native DOMNode methods correctly.
* Session class implemented for easy namespace-setting within $_SESSION.
* IDs used in the database are all signed integers.
* Blueprint styles added.
* Making use of the new (2013) Google Analytics code.

v0.2
----
24th Oct 2013

* Client-side manifest files added.
* JavaScript server-side includes.
* @include within PageView deprecated.
* All configuration settings are made static, so they are accessible from anywhere in the code.
* ResponsiveImg PageTool allows serving multi-resolution images dependent on screen width.
* FileOrganiser class improved and optimised.
* ClientSideCompiler class improved and optimised.
* Log class added allowing configurable logging.
* Updated order of Dispatcher for enhanced client-side compilation.
* Unit tests use own bootstrapper.
* Http class deprecated in favour of PHP's native HttpRequest.
* All client-side files served from individual Style, Script and Asset directories within webroot.
* Behat tests extracted into individual Blueprint repositories.

v0.1.0
------
10th May 2013

* Auth class provides wrapper to easy OAuth + social network interaction.
* Optional PageView when PageCode handles request itself.
* @include(path/to/file) to provide HTML includes.
* Introduction of Gt.js client side file v0.0.1.
* Introduction of Gt.css client side file v0.0.1.
* Class system fully replaces Utility classes.
* SCSS files are pre-processed *much* faster.
* Major improvements and bugfixes in User PageTool.
* User PageTool implemented to allow OAuth authentication and anonymous users.
* Blog PageTool initial features.
* Bugfixes in the DOM classes.
* PHP errors and exceptions handled by PHP.Gt.
* Translatable content through data-lang attribute.
* Selection of web-ready fonts included as standard.

v0.0.3
------
20 Dec 2012

* Error handling implemented with exceptions.
* Translatable content, language switchable in URL.
* PHPUnit tests are implemented within repository.
* Major improvements with client side code.
* SCSS (preprocessed CSS files) supported natively.
* Http class for easy OOP interface to cURL.
* Cache handler allows bi-directional cache access from anywhere.
* GT.js and GTUI.css files extraced into separate repositories.
* dbtouch files are 'touched' only when each database table changes.
* Public webroot directories are now named 'www'. Not backwards compatible!
* Vimeo PageTool for interacting with the Vimeo API.
* Database connection is not opened until it is used.
* Various improvements to the efficiency of the DAL.
* DOM interaction more supportive of W3C standards.
* User PageTool allows white-listed domains.
* PageView _Header and _Footer files can be ignored using ignore comments.
* Many changes with the FileOrganiser and client-side Injector classes.

v0.0.2
------
22 Aug 2012

* Multiple improvements on the DOM object.
* Bugs fixed with CSS selectors.
* URL handling improved - automatic case fixing and directory style URLs fixed.
* User PageTool updated to allow anonymous user tracking via UUID.
* Multiple enhancements with GtUi.
* Bugs fixed within DAL.
* Default PHP code style guidelines changed (dropped extra indent).
* Added FakeSlow capability for testing slow connections on AJAX calls.
* Simplified client-side library by removing hacks for out-of-date browsers.

v0.0.1
------
23 Feb 2012

* Automatic database deployment
* Strange unicode characters provided by software such as MS Word now handled.
* Database creation order defined in creation scripts.
* Optional PageCode class suffix
* Content PageTool
* Blog PageTool
* Nested PageCode objects executed in correct order, can be suppressed.
* DOM `map()` function
* DOM shorthand methods such as insertBefore, insertAfter, append, etc.
* JSON webservices without methods supported.
* Debugging JavaScript through query string.
* Error pages added.
* FileOrganiser used to keep original source files out of web root.


text:
---
layout: post
title:  "Document NIAK"
date:   2017-1-11 10:23:06
project_categories: Brainhack EDT Montreal
image: angelniak.png
description: The Neuroimaging Analysis Kit (NIAK) is a software library for the data mining of large fMRI datasets.
---
## Summary
The Neuroimaging Analysis Kit (NIAK) is a software library for the data mining of large fMRI datasets. It is developped by members and collaborators of the SIMEXP-lab at UdM. The objective of this project will be to reformat the existing documentation into a much cleaner flat doc website, using easy-to-edit mark-down files. In addition to a simple port of the existing documentation, we’ll add pages on some recent pipelines (BASC-FIR, GLM-connectome, GLM-FIR). We’ll also be working on step-by-step tutorials.

During Brainhack, we will continue the development of this web-interface. We are interested in any advices and help from people experimented in web-interface development.

## What can I do?
Some NIAK contributors will be at the hackaton, working on new content. Even if you don’t know anything about the project, there are ways to make extremely useful contributions: review/clarify the existing documentation, test-drive and improve the tutorials.

## Contact
Pierre Bellec
[pierre.bellec@criugm.qc.ca](mailto<EMAIL_ADDRESS>


text:
Clone Media Fragment
====================

This is a quick way to support URLs such as YouTube's time offset URLs. This snippet of Javascript will clone the page's Media Fragment to any embedded media on the page.

This is written in plain Javascript, and has no external dependencies.

Usage: Just include this Javascript file on your site. It will find any `<video>` and `<audio>` tags and set up the necessary event listeners.

Background: https://aaronparecki.com/2017/02/19/4/day-61-media-fragments

repository: EdwardHinkle/clone-media-fragment

repo_name: EdwardHinkle/clone-media-fragment


text:
---
id: type-annotations
title: Type Annotations
---

Sorbet provides the most value when it has a wealth of programmer-supplied
static types. However, because Sorbet implements a
[gradual type system](gradual.md), it treats most definitions without explicit
annotations as [untyped](untyped.md). This means that Sorbet can only use static
types for methods, constants, instance variables, and class variables if they
are accompanied with explicit static types.

The exceptions to the above list are that Sorbet does not need type annotations
for local variables or in some simple cases for instance variables. In the
absence of a type annotation, Sorbet will infer the type of a local variable
based on how the variable is initialized. It is still possible to provide type
annotations in these instances.

Type annotations for methods are provided using a `sig` before the method
definition. Method type annotations are
[described in great detail on the Method Signatures](sigs.md). Other type
annotations are provided using the `T.let` [type assertion](type-assertions.md).

## When Are Type Annotations Optional?

Sorbet does not need type annotations for local variables, as it can infer the
type of the local variable based on how it is initialized. For example, in the
following program, Sorbet can tell `x` is an `Integer` based on the fact that it
is initialized with an expression that evaluates to an `Integer`:

```ruby
x = 2 + 3
```

You may still provide a wider type annotation if you would like. This can
occasionally be helpful if you want the type of a variable to be broader than
Sorbet's inferred type, such as in situations where you are changing the value
of a variable in a loop to something that is broader than the expression that
you use to initialize the variable:

```ruby
# without this T.let, x would have the inferred type NilClass
x = T.let(nil, T.nilable(Integer))
(0..10).each do |n|
  x = n if n % 3 == 0
end
```

Sorbet can also infer the types of instance variables in some limited
situations, specifically when the instance variable is initialized with the
value of a parameter of the constructor:

```ruby
class MyObj
  sig {params(x: Integer).void}
  def initialize(x)
    @y = x  # y has the inferred type Integer
  end
end
```

For more details on why Sorbet can only infer the types of instance variables in
relatively narrow situations, see the section below about the
[limitations on instance variable inference](#limitations-on-instance-variable-inference).

## Annotating constants

Sorbet does not, by default, infer the types of constants, but they can be
specified using `T.let`:

```ruby
NAMES = T.let(["Nelson", "Dmitry", "Paul"], T::Array[String])
```

## Declaring class and instance variables

To declare the static type of an instance variable, we can use `T.let` in a
class's constructor:

```ruby
class MyObj
  def initialize
    @foo = T.let(0, Integer)
  end
end
```

We can also declare class variables and instance variables on a singleton class
using `T.let` at the top-level of a class:

```ruby
class HasVariables
  # Class variable
  @@llamas = T.let([], T::Array[Llama])

  # Instance variable on the singleton class
  @alpaca_count = T.let(0, Integer)
end
```

Sorbet requires that instance and class variables are defined in these specific
places to guarantee that they're initialized. But sometimes requiring that these
variables be declared in specific places is too restrictive. Sorbet allows an
instance variable to be declared **anywhere** so long as the type is at least
nilable:

```ruby
class A
  def foo
    # Does NOT have to be declared in `initialize`, because it's nilable:
    @x = T.let(0, T.nilable(Integer))
  end

  def self.bar
    # Also works for `self.` methods:
    @y = T.let('', T.nilable(String))
  end
end
```

It's common to use this technique to add type annotations for instance variables
in functions that memoize their results by lazily initializing instance
variables:

```ruby
module B
  sig {returns(String)}
  def current_user
    @user = T.let(@user, T.nilable(String))
    @user ||= ENV.fetch('USER')
  end
end
```

## Limitations on instance variable inference

A current shortcoming of Sorbet is that in many cases it cannot reuse static
type knowledge in order to automatically determine the type of an instance or
class variable. In the following example, Sorbet will naturally understand that
`@x` is of type `Integer`, but it cannot determine the static type of `@y`
without a `T.let` and therefore treats it as `T.untyped`:

```ruby
class Foo
  sig {params(x: Integer, y: Integer).void}
  def initialize(x, y)
    @x = x
    @y = y + 0

    T.reveal_type(@x)  # Integer
    T.reveal_type(@y)  # T.untyped
  end
end
```

Sorbet can only infer the types of instance variables in a relatively specific
context: in particular, only when that instance variable is initialized to the
exact value of a parameter to the constructor in the body of the constructor. In
other cases, you will need to use `T.let` to explicitly give the types of
instance variables.

> **Note**: This particular limitation is because of how Sorbet performs
> typechecking: it needs to know the types of instance variables _before_ it
> typechecks method definitions, but even a simple expression like `y + 0` will
> require a typechecking pass to determine what its resulting type is, which
> means Sorbet won't be able to tell what type to infer for an instance variable
> until _after_ it has already started typechecking the method where instance
> variables are defined. Sorbet resolves this cyclical dependency by either
> using types that you have explicitly defined with `T.let`, or by relying on
> simple code patterns like the one described above.

## Type annotations and strictness levels

Sorbet allows the programmer to opt-in to greater levels of static type rigor.
At lower [strictness modes](static.md), Sorbet allows definitions to be untyped,
but at `# typed: strict`, Sorbet requires explicit type annotations on any
definitions where it would have assumed `T.untyped` without an annotation
before. Specifically, in a `# typed: strict` file it's an error to omit type
annotations for:

- methods
- instance variables
- class variables
- constants

It may seem counterintuitive that Sorbet does _not_ require type annotations in
a file marked `# typed: true`, but this is an intentional part of Sorbet's
implementation of [gradual typing](gradual.md). In the `# typed: true`
strictness level, unannotated methods, instance variables, and constants are
assumed to be `T.untyped`. This allows a programmer to write untyped or
partially-typed definitions while still benefiting from type checking when
static type information is present.

repository: seachel/sorbet

repo_name: seachel/sorbet


text:
# v6.1.0 (2019-02-18)
### Dependency Updates
* Upgraded carbon-factory to bring in babel 7
* Updated peer and dev dependencies to 16.7.0 for react, react-dom and react-test-renderer. Also updated enzyme-adapter-react-16 (1.7.1)
* Updates Carbon-factory dependencies to add babel upgrades and required Typescript dependencies and plugins

### Improvements
* Extending dropdown component to allow for autocompletion with tab
* Npm scripts has been modified to allow development of Carbon on Windows platform
* FE-1159 - We have started the process of breaking down the decorators. To begin with we have added some experimental components to handle the common markup of an input; `Input` and `InputPresentation`. We will continue to add to these over time as we break the decorators down further.

### Experimental
* We have added a new Select and Option component. These are still classed as experimental while full Dropdown support is provided.
* InputDecoratorBridge is a temporary component that we can use to gradually remove our reliance on the input decorators.
* A new Textbox component has been added, this is still under __experimental__ so production use is not recommended.

### New Components
* Added new Selectable List component which can be composed with input / select components
* Filterable component has been added, this component allows you to make a list of components that will only render for a given filter value.

### Bug Fixes
* Add height styling to carousel to fix no scroll issue
* Fixed color generation script that has been creating a corrupted js file
* Fixes bug FE-1196 where date inputs display incorrect date when in different timezones

### New Features
* Adds type definitions for dependencies in Carbon, adds defintion files for Button and Link components and adds scripts to add Typescript functionality
* Added a palette utility function which, given a configuration of base colors, will return functions to add tint or shade.
* The presence validator now supports values that are arrays, as well as strings.
* Adds support for a close icon to be added to pill by passing onDelete prop to component

### Theming
* Added basic implementation of Small, Medium and Large themes using the palette utility function.

Each theme adds to a base which includes style rule which are general to all.

repository: Sage/carbon

gha_language: TypeScript

repo_name: Sage/carbon


text:
# DIY GPS Module for Nikon DSLR

The Nikon GPS project is a compact and lightweight DIY module which adds GPS functionality to Nikon DSLR cameras. It adds the ability to record location data for each photo in the EXIF and later view it on a map.

The module is attached to the flash hot shoe mount and connects to the camera's dedicated GPS port. The GPS gets its power from the camera and transmits the received GPS NMEA sentences using UART at 4800 bps. It also features an on/off button and a LED indicator which shows when the GPS module is active.

The project was created mostly to advance my DIY and electronics skills.

## Overview

The idea of building a GPS for my Nikon DSLR me after building the [GPS module for my Yaesu VX-8DE transceiver](https://github.com/4x1md/vx8_gps). I searched the internet and found some projects, some of which had a very small size. For my project I chose RG1411 GPS module which is only 10x10mm in size. It requires 3.3V which can be supplied by the camera.

The first version of the GPS had a linear voltage regulator powering the GPS module. This solution had one big disadvantage: the GPS module was turned off completely and didn't keep any GPS data while it was off. Each time the module was turned on it had to acquire all the required GPS data again and consumed more current during the first minutes after power on. The delay of 3-5 minutes and even more made this GPS module impractical while walking in a city when I turned it on and off very often in order to save camera's battery.

The second version of this GPS project had the following changes:

1. The linear voltage regulator was replaced with a switching power supply with a very high efficiency at low currents.

2. On/off button puts the GPS module is a sleep mode instead of turning it off. In this mode it keeps the GPS data all the time when the GPS is connected to the camera and its start time is much shorter than during a full power-on cycle.

This document describes the latest version of this project. The first version of this project (revision A) is presented in [revision-a.md](docs/revision-a.md).

## Circuit Diagram

The project has the following circuits: GPS module, power supply, on/off switch, logic level shifter and LEDs. All the circuits are assembled on the same PCB.

![PCB](images/schematics.png)

1. **GPS module.** Hornet ORG1411 was chosen due to its small footprint and good performance. It is powered from the 3.3V supply and is connected in UART mode.

2. **Power supply.** TI TPS62203DBVR is a switching voltage regulator with fixed 3.3V output. It requires only an inductor and filter capacitors in order to work. It features more than 90% at the currents below 1mA. Such efficiency is important for reducing power consumption from the camera.

3. **On/off button.** The button is used to toggle the ON_OFF pin of the GPS for putting it into sleep mode or waking it up. The button is debounced by an RC-filter with a Schmitt trigger.

4. **Logic level shifter.** The logic level shifting circuit converts the 1.8V logic levels of the GPS to 3.3V levels required by the camera. When the GPS is in the sleep mode the level shifter enters high-Z mode. The enable pin of U3 is controlled by a circuit which acts like a flip-flop. If the WAKEUP pin of the GPS is LOW, the output of the AND gate U2 is also LOW and the output of U3 is disabled. After the GPS wakes up, its WAKEUP pin becomes HIGH, but the second input of U2 is still LOW, and its output continues LOW. When the UART TX of the GPS wakes up and becomes HIGH it toggles the output of U2 to HIGH. R5 pulls the B input of the AND gate up and the diode D1 prevents level of the B input from being changed to LOW by the UART RX when the latter transmits zero bits. The output of U2 will remain HIGH until the WAKEUP line falls to LOW again.

6. **LEDs.** The LEDs indicate that the GPS in in active state. They are controlled by the output of U2 and are turned off when the output buffer is in high-Z mode.

## Mechanics

The project is enclosed in a plastic box of 36x36x15mm. These boxes are cheap and are widely available on eBay/AliExpress.

![Mechanics](images/revision-a/mech_1.jpg)

![Mechanics](images/revision-a/mech_2.jpg)

## PCB Design

The PCB was designed in KiCAD. Its shape fits the plastic box shown above.

### 3D Model

![PCB](images/rev-b-3d-model-1.png)

![PCB](images/rev-b-3d-model-1.png)

### Manufactured PCB

![PCB](images/revision-a/rev-a-pcb.jpg)

## Assembled Device

![Assembled](images/revision-a/assembled_1.jpg)

![Assembled](images/revision-a/assembled_2.jpg)

![Assembled](images/revision-a/assembled_3.jpg)

![Assembled](images/revision-a/assembled_4.jpg)

## Device Tests

### Design Validation Tests

The tests were done in order to verify the assembled circuit. Refer to [development-tests-rev-b.md](docs/development-tests-rev-b.md) for test notes.

### ORG1411 GPS Module On/Off Tests

The on/off sequence of the ORG1411 GPS module was tested in order to understand how to connect an external on/off button to the module. Refer to [gps-on-off-tests.md](docs/gps-on-off-tests.md) for details.

### Field Tests

![Field tests](images/field_tests_1.png)

![Field tests](images/field_tests_2.png)

## Conclusions

The second version of the module works as I expected. I tested it in Tel Aviv, Budapest and Thessaloniki and it showed fast data acquisition and good precision. Currently, I'm not planning to develop it further.

## Links

### Reference projects

1. [A low-cost GPS module for Nikon DSLRs](https://github.com/marmat/nikon-gp1-diy) by Martin Matysiak
2. [Build Notes for DIY Nikon GPS](http://www.petermillerphoto.com/nikongps/nikongps2.html) by Peter Miller

### Technical data

1. [Nikon D90, D3100, D3200, D5000, D7000 focus / shutter MC-DC2 connector pinout](http://pinoutguide.com/DigitalCameras/nikon_d90_pinout.shtml)

## Questions? Suggestions?
You are more than welcome to contact me with any questions, suggestions or propositions regarding this project. You can:

1. Visit [my QRZ.COM page](https://www.qrz.com/db/4X5DM)
2. Visit [my Facebook profile](https://www.facebook.com/Dima.Meln)
3. Write me an email to iosaaris =at= gmail dot com

## How to Support or Say Thanks

If you like this project, or found here some useful information and want to say thanks, or encourage me to do more, you can buy me a coffee!

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Q5Q4ITR7J)

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/4x1md)

You can aslo make a donation with PayPal:

[!["Donate with PayPal"](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=NZZWZFH5ZBCCU)

---

**73 de 4X1MD**


text:
# ProjectBase

ProjectBase (PB) is a Utility and Data Access library. PB designed with a database independent interface oriented approach to ensure extentibility and reliablity. PB's codes can be changed or manipulated easily.

PB has 3 type of data access:

* Automatic Connection Management: Uses single connection object and while executing a command, connection is opened and closed automatically.
* Manuel Connection Management: Uses single connection object and connection is opened and closed by developer manually.
* Transaction Mode: PB supports PL/SQL type code writing of transactional processes. PB creates transactions and manages them automatically.

PB currently supports Oracle (Managed-Unmanaged Provider), SQL Server databases and OleDb. PB supports MySql provider with v2.0.0 and PostgreSQL with v3.0.0.

PB supports asynchronous programming with v4.0.0-beta.

Also PB supports low level object mapping features.

For introduction:

http://www.yigityolcu.com/2017/10/veri-erisim-katmanna-giris-introduction.html

For connection management examples:

http://www.yigityolcu.com/2017/10/projectbase-ile-veri-taban-baglant.html

For transactions examples:

http://www.yigityolcu.com/2017/10/projectbase-ile-veri-taban-islemleri.html

For DML examples:

http://www.yigityolcu.com/2017/10/projectbase-ile-querygenerator.html

For parametric database procedures and functions examples:

http://www.yigityolcu.com/2017/10/projectbase-ve-querygenertor-ile-veri.html

For typed data selection using objects examples:

http://www.yigityolcu.com/2017/10/projectbase-ile-datatable-yerine-nesne.html

For global parameter usage examples:

http://www.yigityolcu.com/2017/12/projectbase-kutuphanesi-ile-evrensel.html

For asynchronous programming examples:

http://www.yigityolcu.com/2018/03/projectbase-pb-ile-asenkron-programlama.html

repository: vyigity/ProjectBase

gha_language: C#

repo_name: vyigity/ProjectBase


text:
# ProtoPyToJsonSchema
This is a python script to convert protobuf to json schema.

First you need to compile proto to python modules, then use this script to convert messages in the python modules to json schema.

The script file is Protos/Proto2JsonSchema.py and is written in Python3. Other files are examples.

To run this script, make sure the path of google protobuf python modules is included in your PYTHONPATH. And you can see all command line arguments with argument -h.


text:
# Release Process

This page describes the release cadence and process for Thanos project.

We use [Semantic Versioning](http://semver.org/).

NOTE: As [Semantic Versioning](http://semver.org/spec/v2.0.0.html) states all 0.y.z releases can contain breaking changes in API (flags, grpc API, any backward compatibility)

## Cadence

We aim for regular and strict one release per *6 weeks*. 6 weeks is counter from first release candidate to another. This means that there is no *code freeze* or anything like that. We plan to stick to the exact 6 weeks, so there is no rush into being within release (except bug fixes).

No feature should block release.

Additionally, we (obviously) aim for `main` branch being stable.

We are assigning a release shepherd for each minor release.

Release shepherd responsibilities:

* Perform releases (from first RC to actual release).
* Announce all releases on all communication channels.

| Release | Time of first RC     | Shepherd (GitHub handle)      |
|---------|----------------------|-------------------------------|
| v0.32.0 | (planned) 2023.03.09 | No one ATM                    |
| v0.31.0 | (planned) 2023.01.26 | No one ATM                    |
| v0.30.0 | 2022.12.21           | `@bwplotka`                   |
| v0.29.0 | 2022.10.21           | `@GiedriusS`                  |
| v0.28.0 | 2022.08.22           | `@yeya24`                     |
| v0.27.0 | 2022.06.21           | `@wiardvanrij` and `@matej-g` |
| v0.26.0 | 2022.04.29           | `@wiardvanrij`                |
| v0.25.0 | 2022.03.01           | `@bwplotka` and `@matej-g`    |
| v0.24.0 | 2021.12.22           | `@squat`                      |
| v0.23.0 | 2021.09.02           | `@bwplotka`                   |
| v0.22.0 | 2021.07.06           | `@GiedriusS`                  |
| v0.21.0 | 2021.05.28           | `@metalmatze` and `@onprem`   |
| v0.20.0 | 2021.04.23           | `@kakkoyun`                   |
| v0.19.0 | 2021.03.02           | `@bwplotka`                   |
| v0.18.0 | 2021.01.06           | `@squat`                      |
| v0.17.0 | 2020.11.18           | `@metalmatze`                 |
| v0.16.0 | 2020.10.26           | `@bwplotka`                   |
| v0.15.0 | 2020.08.12           | `@kakkoyun`                   |
| v0.14.0 | 2020.07.10           | `@kakkoyun`                   |
| v0.13.0 | 2020.05.13           | `@bwplotka`                   |
| v0.12.0 | 2020.04.15           | `@squat`                      |
| v0.11.0 | 2020.02.19           | `@metalmatze`                 |
| v0.10.0 | 2020.01.08           | `@GiedriusS`                  |
| v0.9.0  | 2019.11.26           | `@bwplotka`                   |
| v0.8.0  | 2019.10.09           | `@bwplotka`                   |
| v0.7.0  | 2019.08.28           | `@domgreen`                   |
| v0.6.0  | 2019.07.12           | `@GiedriusS`                  |
| v0.5.0  | 2019.06.31           | `@bwplotka`                   |

# For maintainers: Cutting individual release

Process of releasing a *minor* Thanos version:

1. Release `v<major>.<minor+1>.0-rc.0`
2. If after 3 work days there is no major bug, release `v<major>.<minor>.0`
3. If within 3 work days there is major bug, let's triage it to fix it and then release `v<major>.<minor>.0-rc.++` Go to step 2.
4. Do patch release if needed for any bugs afterwards. Use same `release-xxx` branch and migrate fixes to main.

## How to release a version

Release is happening on separate `release-<major>.<minor>` branch.

### Prepare the release branch

Prepare branch `release-<major>.<minor>` that will start minor release branch and prepare changes to cut release.

Push the created branch to origin (Thanos repository) to be able to make your PR with the CHANGELOG.md changes against this branch later.

```bash
$ git push origin release-<major>.<minor>
```

For release candidate, reuse the same branch and rebase it on every candidate until the actual release happens.

### Indicate that a release is in progress

1. Create small PR to `main` (!) to cut CHANGELOG. This helps to maintain new changelog on main. Add entry to CHANGELOG indicating release in progress. This reduces risk for the new PRs to add changelog entries to already released release.

2. Update `VERSION` file to version one minor version higher than the released one and `dev` suffix. This allows CI to build Thanos binary with the version indicating potential next minor release, showing that someone uses non-released binary (which is fine, just better to know this!).

Feel free to mimic following PR: https://github.com/thanos-io/thanos/pull/3861

### Prepare the release

1. Create a branch based on the release branch. You will use this branch to include any changes that need to happen as a part of 'cutting' the release. Follow the steps below and commit and resulting changes to this branch.

2. Double check and update [CHANGELOG file](../CHANGELOG.md). Note that `CHANGELOG.md` should only document changes relevant to users of Thanos, including external API changes, bug fixes, performance improvements, and new features. Do not document changes of internal interfaces, code refactorings and clean-ups, changes to the build process, etc. People interested in these are asked to refer to the git history. Format is described in `CHANGELOG.md`.
   - The whole release from release candidate `rc.0` to actual release should have exactly the same section. We don't separate what have changed between release candidates.

3. Double check backward compatibility:

   1. *In case of version after `v1+.y.z`*, double check if none of the changes break API compatibility. This should be done in PR review process, but double check is good to have.
   2. In case of `v0.y.z`, document all incompatibilities in changelog.

4. Double check metric changes:

   1. Note any changes in the changelog
   2. If there were any changes then update the relevant alerting rules and/or dashboards since `thanos-mixin` is part of the repository now

5. *(Applies only to minor, non-`rc` release)* Update website's [hugo.yaml](https://github.com/thanos-io/thanos/blob/main/website/hugo.yaml) to have correct links for new release ( add `0.y.z: "/:sections/:filename.md"`).

6. *(Applies only to minor, non-`rc` release)* Update tutorials:

   1. Update the Thanos version used in the [tutorials](https://github.com/thanos-io/tutorials) manifests to use the latest version.
   2. In case of any breaking changes or necessary updates adjust the manifests so the tutorial stays up to date.
   3. Update the [scripts/quickstart.sh](https://github.com/thanos-io/thanos/blob/main/scripts/quickstart.sh) script if needed.

7. Set the version in `VERSION` to reflect the tag you are going to make.
   - If you are going to tag `v<major>.<minor>.0-rc.0`, this exact tag should be in `VERSION`. Example: [v0.25.2-rc.0/VERSION](https://github.com/thanos-io/thanos/blob/v0.25.2-rc.0/VERSION)

8. Open a PR with any changes resulting from the previous steps against the release branch and ask the maintainers to review it.

### Tag and publish the release

1. After review and obtaining (an) approval(s), merge the PR and after this tag a version:

   ```bash
   tag=$(cat VERSION)
   git tag -s "v${tag}" -m "v${tag}"
   git push origin "v${tag}"
   ```

   Signing a tag with a GPG key is appreciated, but in case you can't add a GPG key to your GitHub account using the following [procedure](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key), you can replace the `-s` flag by `-a` flag of the `git tag` command to only annotate the tag without signing.

   Please make sure that you are tagging the merge commit because otherwise GitHub's UI will show that there were more commits after your release.

2. Once a tag is created and pushed, **immediately** create a GitHub Release using the UI for this tag, as otherwise CircleCI will not be able to upload tarballs for this tag. Go to the releases page of the project, click on the `Draft a new release` button and select the tag you just pushed. Describe release and post relevant entry from changelog. Click `Save draft` **rather** than `Publish release` at this time. (This will prevent the release being visible before it has got the binaries attached to it.) *In case you did not manage to create the draft release before CircleCI run is finished (it will fail on the artifacts upload step in this case), you can re-trigger the run manually from the CircleCI dashboard *after* you created the draft release.*

3. You are also encouraged to include a list of (first time) contributors to the release. You can do this by clicking on `Auto-generate release notes`, which will generate this section for you (edit the notes as required to remove unnecessary parts).

4. Once tarballs are published on release page, you can click `Publish` and release is complete.

### Completing the release

1. Announce the release on the `#thanos` Slack channel. You are also encouraged to announce the new release on any Thanos social media accounts, such as Twitter (the credentials are available via Thanos' [Keybase](https://keybase.io/) team which includes all maintainers).

2. Pull commits from release branch to main branch for non `rc` releases. Make sure to not modify `VERSION`, it should be still pointing to `version+1-dev` ([TODO to automate this](https://github.com/thanos-io/thanos/issues/4741))

3. After releasing a major version, please cut a release for `kube-thanos` as well. https://github.com/thanos-io/kube-thanos/releases Make sure all the flag changes are reflected in the manifests. Otherwise, the process is the same, except we don't have `rc` for the `kube-thanos`. We do this to make sure we have compatible manifests for each major versions.

4. Merge `release-<major>.<minor>` branch back to main. This is important for Go modules tooling to make release tags reachable from main branch.

   - Create `merge-release-<major>.<minor>-to-main` branch **from `release-<major>.<minor>` branch** locally
   - Merge upstream `main` branch into your `merge-release-<major>.<minor>-to-main` and resolve conflicts
   - Open a PR for merging your `merge-release-<major>.<minor>-to-main` branch against `main`
   - Once approved, merge the PR **by using "Merge" commit**.
     - This can either be done by temporarily enabling "Allow merge commits" option in "Settings > Options".
     - Alternatively, this can be done locally by merging `merge-release-<major>.<minor>-to-main` branch into `main`, and pushing resulting `main` to upstream repository. This doesn't break `main` branch protection, since PR has been approved already, and it also doesn't require removing the protection.

## Pre-releases (release candidates)

The following changes to the above procedures apply:

* In line with [Semantic Versioning](http://semver.org/), append something like `-rc.0` to the version (with the corresponding changes to the tag name, the release name etc.).
* Tick the `This is a pre-release` box when drafting the release in the GitHub UI.
* Still update `CHANGELOG.md`, but when you cut the final release later, merge all the changes from the pre-releases into the one final update.

repository: openshift/thanos

gha_language: Go

repo_name: openshift/thanos


text:
---
layout: page
title: About
permalink: /about/
---

### Life Story

I started programming around 9 years of age. My father was an electrical engineer turned software developer and introduced me to a number of computing technologies including Assembly for PIC16 and PBasic for the Basic Stamp. My parents encouraged me to persue technology and I spent elementary and high school working on simple robots and games using LEGO Mindstorms, QBasic, Blitz3D, and GameMaker.

I attended Indian River State College for my Associate's in Computer Science, but decided my talents were better suited for hardware than pure software. When I moved on to Florida Atlantic University I switched majors to Computer Engineering and stuck with that through my Master's degree.

After university I spent a couple years working as am embedded developer for Logus Microwave before moving on to Microchip Technology Inc. where I am now.

In my free time I continue working on games and robots, as well as experimenting with AI, blockchain, and the .NET platform.

### Contact me

[Steven.Gann@Microchip.com](mailto:Steven.Gann@Microchip.com)


text:
---
itemtype: Item/Page/Article
title: "Shifting Loyalties Is Available Today!"
published: 2018-06-14
---

You can stop holding your breath! [Shifting Loyalties: The Piero Codex Book Two][1]
has been released! (Okay, I know you weren't really holding your breath, but I
was!) This is my second novel, as well as being the second book in The Piero
Codex series.

I'm excited to introduce shape-shifters into the Seers Guild world with this
release. You have some new characters to meet (including the mysterious ex,
Marina), some secrets of the Codex itself will be revealed, and Mack is going to
get into a whole new mess of trouble! This second installment has more action,
more magic, more pages, and possibly more bourbon (I didn't count the drinks).
Trust me, it's even better than the first one!

If you pre-ordered the book, you should have it on your reading gizmo already.
If you didn't, hit your favorite ebook retailer and grab it today (links below
for your convenience)!

I'm currently hard at work writing Summoning Courage: The Piero Codex Book
Three to wrap up this trilogy. In the meantime, I hope you enjoy reading
Shifting Loyalties!

[<img src="cover-PC2-ShiftingLoyalties.jpg" alt="Shifting Loyalties: The Piero Codex Book Two" />][1]

[1]: https://https://books2read.com/b/vv-shifting-loyalties


text:
---
hrs_structure:
  division: '1'
  volume: '1'
  title: '2'
  chapter: '16'
  section: 16-25
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0016-0025
    parent: HRS0016
    name: 16-25 Order and method of counting
weight: 29050
title: Order and method of counting
full_title: 16-25 Order and method of counting
---
**§16-25 Order and method of counting.** Each ballot shall be counted and finished as to all the candidates thereon before counting a second and subsequent ballots. Except as provided in section 11-71, the ballots shall be counted by teams in the following manner only: by one precinct official announcing the vote in a loud clear voice, one precinct official tallying the vote, one precinct official watching the precinct official announcing the vote and one precinct official watching the precinct official tallying the vote. The precinct official doing the announcing or tallying and the precinct official watching that official shall not be of the same political party. [L 1970, c 26, pt of §2; am L 1973, c 217, §6(c); gen ch 1993]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Prong

![PRONG](https://github.com/JDatPNW/Prong/blob/master/logo/Prong.png)

Making a simple Pong game in processing.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

What things you need to install the software and how to install them:

```
a Processing IDE
```

### Installing

A step by step series of examples that tell you have to get a development env running

```
Open the code inside the Processing IDE and run it
```

## Running the tests

At this stage its just tial and error, which works great with processing

## Authors

* **JD** - *Initial work*

## License

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

repository: JDatPNW/Prong

repo_name: JDatPNW/Prong


text:
# BLE Supported Features

This application will list BLE features supported by your device. Knowing which features
are supported, might have an influence on how exactly you implement BLE feature of your applications.

# Running the application

## Requirements

Hardware requirements are in the [main readme](https://github.com/ARMmbed/mbed-os-example-ble/blob/master/README.md).

## Building instructions

Building instructions for all samples are in the [main readme](https://github.com/ARMmbed/mbed-os-example-ble/blob/master/README.md).

## Checking for success

After flashing your device open up a serial monitor and start your device to find out which optional BLE
features it supports.

repository: ARMmbed/mbed-os-example-ble

branch_name: refs/heads/development

repo_name: ARMmbed/mbed-os-example-ble