text:
# Changelog

## [0.5.0](https://github.com/itinerisltd/acf-gutenblocks/tree/0.5.0) (2021-08-22)

[Full Changelog](https://github.com/itinerisltd/acf-gutenblocks/compare/0.4.0...0.5.0)

**Closed issues:**

- Bump Minimum PHP version to 7.3 [\#32](https://github.com/ItinerisLtd/acf-gutenblocks/issues/32)

**Merged pull requests:**

- Publish releases [\#49](https://github.com/ItinerisLtd/acf-gutenblocks/pull/49) ([codepuncher](https://github.com/codepuncher))
- Create dependabot.yml [\#47](https://github.com/ItinerisLtd/acf-gutenblocks/pull/47) ([codepuncher](https://github.com/codepuncher))
- Php version [\#46](https://github.com/ItinerisLtd/acf-gutenblocks/pull/46) ([codepuncher](https://github.com/codepuncher))
- Php versions [\#45](https://github.com/ItinerisLtd/acf-gutenblocks/pull/45) ([codepuncher](https://github.com/codepuncher))
- Fix CI issues [\#43](https://github.com/ItinerisLtd/acf-gutenblocks/pull/43) ([codepuncher](https://github.com/codepuncher))
- chore\(deps\): Bump dependencies [\#42](https://github.com/ItinerisLtd/acf-gutenblocks/pull/42) ([codepuncher](https://github.com/codepuncher))
- feat: add CI checks [\#41](https://github.com/ItinerisLtd/acf-gutenblocks/pull/41) ([codepuncher](https://github.com/codepuncher))

## [0.4.0](https://github.com/itinerisltd/acf-gutenblocks/tree/0.4.0) (2019-10-16)

[Full Changelog](https://github.com/itinerisltd/acf-gutenblocks/compare/0.3.1...0.4.0)

**Closed issues:**

- Allow passing variables to templates [\#31](https://github.com/ItinerisLtd/acf-gutenblocks/issues/31)

**Merged pull requests:**

- Add missing readme info [\#35](https://github.com/ItinerisLtd/acf-gutenblocks/pull/35) ([codepuncher](https://github.com/codepuncher))
- Version bump 0.4.0 [\#34](https://github.com/ItinerisLtd/acf-gutenblocks/pull/34) ([codepuncher](https://github.com/codepuncher))
- Extract user data to templates [\#33](https://github.com/ItinerisLtd/acf-gutenblocks/pull/33) ([codepuncher](https://github.com/codepuncher))

## [0.3.1](https://github.com/itinerisltd/acf-gutenblocks/tree/0.3.1) (2019-10-14)

[Full Changelog](https://github.com/itinerisltd/acf-gutenblocks/compare/0.3.0...0.3.1)

**Closed issues:**

- Plain PHP Template doesn't setup block classes like Blade [\#26](https://github.com/ItinerisLtd/acf-gutenblocks/issues/26)
- Return type not guaranteed to be string. [\#25](https://github.com/ItinerisLtd/acf-gutenblocks/issues/25)
- Redundant function import [\#24](https://github.com/ItinerisLtd/acf-gutenblocks/issues/24)

**Merged pull requests:**

- Version bump 0.3.1 [\#30](https://github.com/ItinerisLtd/acf-gutenblocks/pull/30) ([codepuncher](https://github.com/codepuncher))
- Use Util::sanitizeHtmlClasses [\#29](https://github.com/ItinerisLtd/acf-gutenblocks/pull/29) ([codepuncher](https://github.com/codepuncher))
- Remove redundant function import [\#28](https://github.com/ItinerisLtd/acf-gutenblocks/pull/28) ([codepuncher](https://github.com/codepuncher))
- Cast return value to string [\#27](https://github.com/ItinerisLtd/acf-gutenblocks/pull/27) ([codepuncher](https://github.com/codepuncher))

## [0.3.0](https://github.com/itinerisltd/acf-gutenblocks/tree/0.3.0) (2019-10-10)

[Full Changelog](https://github.com/itinerisltd/acf-gutenblocks/compare/0.2.1...0.3.0)

**Merged pull requests:**

- Version bump 0.3.0 [\#23](https://github.com/ItinerisLtd/acf-gutenblocks/pull/23) ([codepuncher](https://github.com/codepuncher))
- Allow for filtering of Blade engine function [\#20](https://github.com/ItinerisLtd/acf-gutenblocks/pull/20) ([alwaysblank](https://github.com/alwaysblank))

## [0.2.1](https://github.com/itinerisltd/acf-gutenblocks/tree/0.2.1) (2019-10-10)

[Full Changelog](https://github.com/itinerisltd/acf-gutenblocks/compare/0.2.0...0.2.1)

**Closed issues:**

- PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Argument 1 passed to Itineris\AcfGutenblocks\Util::Itineris\AcfGutenblocks\{closure}\(\) must be of the type string, null given in /dom6319/wp-content/plugins/acf-gutenblocks/src/Util.php:16 [\#21](https://github.com/ItinerisLtd/acf-gutenblocks/issues/21)
- Need to use default post\_types when none specified by user [\#18](https://github.com/ItinerisLtd/acf-gutenblocks/issues/18)
- Exception in AbstractBladeBlock with ACF 5.8 final [\#16](https://github.com/ItinerisLtd/acf-gutenblocks/issues/16)
- Adding blocks to CPTs [\#13](https://github.com/ItinerisLtd/acf-gutenblocks/issues/13)
- why would you `add` a disabled block? [\#4](https://github.com/ItinerisLtd/acf-gutenblocks/issues/4)

**Merged pull requests:**

- Version bump 0.2.1 [\#22](https://github.com/ItinerisLtd/acf-gutenblocks/pull/22) ([codepuncher](https://github.com/codepuncher))
- Use default post\_types if not set [\#19](https://github.com/ItinerisLtd/acf-gutenblocks/pull/19) ([lukasbesch](https://github.com/lukasbesch))
- Fixed blade block for empty block classes \#16 [\#17](https://github.com/ItinerisLtd/acf-gutenblocks/pull/17) ([tbruckmaier](https://github.com/tbruckmaier))
- Block: Allow customizing `post_types` [\#14](https://github.com/ItinerisLtd/acf-gutenblocks/pull/14) ([TangRufus](https://github.com/TangRufus))
- Readme [\#11](https://github.com/ItinerisLtd/acf-gutenblocks/pull/11) ([codepuncher](https://github.com/codepuncher))

## [0.2.0](https://github.com/itinerisltd/acf-gutenblocks/tree/0.2.0) (2019-02-26)

[Full Changelog](https://github.com/itinerisltd/acf-gutenblocks/compare/0.1.0...0.2.0)

**Merged pull requests:**

- Version bump 0.2.0 [\#10](https://github.com/ItinerisLtd/acf-gutenblocks/pull/10) ([codepuncher](https://github.com/codepuncher))
- Incorrect package name [\#9](https://github.com/ItinerisLtd/acf-gutenblocks/pull/9) ([codepuncher](https://github.com/codepuncher))

## [0.1.0](https://github.com/itinerisltd/acf-gutenblocks/tree/0.1.0) (2019-02-26)

[Full Changelog](https://github.com/itinerisltd/acf-gutenblocks/compare/6553222f25afa13bf6eca4aa8b73328632f0e28a...0.1.0)

**Merged pull requests:**

- Version bump 0.1.0 [\#8](https://github.com/ItinerisLtd/acf-gutenblocks/pull/8) ([codepuncher](https://github.com/codepuncher))
- Add changelog generator file [\#7](https://github.com/ItinerisLtd/acf-gutenblocks/pull/7) ([codepuncher](https://github.com/codepuncher))
- Add license info [\#6](https://github.com/ItinerisLtd/acf-gutenblocks/pull/6) ([codepuncher](https://github.com/codepuncher))
- Add Fields information [\#3](https://github.com/ItinerisLtd/acf-gutenblocks/pull/3) ([codepuncher](https://github.com/codepuncher))
- Brackets save lives [\#2](https://github.com/ItinerisLtd/acf-gutenblocks/pull/2) ([codepuncher](https://github.com/codepuncher))
- Add usage and instructional info [\#1](https://github.com/ItinerisLtd/acf-gutenblocks/pull/1) ([codepuncher](https://github.com/codepuncher))

\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

repository: lukasbesch/acf-gutenblocks

repo_name: lukasbesch/acf-gutenblocks


text:
# Chapter 11 Exercises

This repository contains programming exercises for accessing web APIs using R,
based on [Chapter 11](https://info201.github.io/apis.html)
of the [Technical Foundations of Informatics](https://info201.github.io/) course book.

Solutions can be found in the `solution` branch.

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
---
layout: page
title: Outreach
permalink: /outreach
---

## Talks and Workshops

### Upcoming

__13 September 2023__ - `speaker`
[Building products powered by Large Language Models]()
_Industry training_

__27 September 2023__ - `speaker`
[Transforming Legal Practice and Business in the Age of AI and Automation](https://blcyprus.com/program)
_Best Legal Conference Cyprus_

### Past

__27 July 2023__ - `speaker`
[Practical applications and risks of AI](https://www.youtube.com/watch?v=-d_zpzmRgeo)
_Sigma TV station_

__20 July 2023__ - `speaker`
[AI Regulation / UN Security Council on risks of AI ](https://youtu.be/8kS8Hu12PYM?t=2647)
_Radio Proto (Cypriot radio station)_

__29 June 2023__ - `trainer`
[GenAI, LLMs and AI Assistants](https://speakerdeck.com/christosdoulou/presi)
_ENGAGE summer school for PhD students_

__14 March 2023__ - `moderator`
[Innovation and Trends Track at Product Camp Cyprus](https://cyprus.productcamp.eu/)
_ProductCamp Cyprus_

__20 October 2022__ - `speaker`
[How can AI change society?](https://speakerdeck.com/christosdoulou/how-can-ai-change-society)
_Reflect tech festival_

__24 September 2022__ - `panelist`
[Can Cyprus become a global AI and Data scienc hub?](https://www.youtube.com/live/OCa9Rmr8zAo?feature=share)
_EcoX Cyprus meetup_

__June 2022__ - `trainer`
[TensorFlow/Keras for Text Processing](https://www.youtube.com/watch?v=OmIoiY1tJ2E)
_Industry training / the Cyprus Institute_

__September 2021__ - `trainer`
[Hands on Deep Learning with Tensorflow and Keras](https://www.youtube.com/watch?v=cjZB3iaQt3I&t=3432s)
_Industry training / the Cyprus Institute_

__January 2021__ - `speaker`
[Fostering Innovation with HPC, Advanced Simulations, AI and Big Data](https://www.youtube.com/watch?v=0pNaPO_riFk&t=731s)
_Announcement of Industry Program / the Cyprus Institute_

__April 2019__ -  `speaker`
[Introduction to (Py)Spark](https://www.meetup.com/fr-FR/PyData-Cyprus/events/259617209/)
_PyData Cyprus_

__October 2017__ - `speaker`
[Mapping with Folium](https://www.meetup.com/Python-Users-Berlin-PUB/events/xmdjfmywpbmb/)
_Python Users Berlin_

## PyData Cyprus - `organiser`
[Talks on AI, Data Science, Software Engineering and Product Development](https://www.youtube.com/playlist?list=PLGVZCDnMOq0pbyy5F3DOQbZHEFOrEqeQm)

gha_language: SCSS

gha_license_id: NOASSERTION


text:
###2016-11-18
diff between today and yesterday

####python
* [cameronfabbri/Colorful-Image-Colorization](https://github.com/cameronfabbri/Colorful-Image-Colorization): A deep learning approach to colorizing images
* [momja/Code-Club](https://github.com/momja/Code-Club): LNHS Code Club
* [crazyguitar/pysheeet](https://github.com/crazyguitar/pysheeet): Python Cheatsheet
* [beckenrode/mysql-workbench-export-laravel-5-migrations](https://github.com/beckenrode/mysql-workbench-export-laravel-5-migrations): A MySQL Workbench plugin which exports a Model to Laravel 5 Migrations
* [shidenggui/easytrader](https://github.com/shidenggui/easytrader): ////

####go
* [timshannon/bolthold](https://github.com/timshannon/bolthold): BoltHold is an embeddable NoSQL store for Go types built on BoltDB
* [containous/traefik](https://github.com/containous/traefik): Trfk, a modern reverse proxy
* [coreos/etcd](https://github.com/coreos/etcd): Distributed reliable key-value store for the most critical data of a distributed system
* [astaxie/build-web-application-with-golang](https://github.com/astaxie/build-web-application-with-golang): A golang ebook intro how to build a web with golang
* [gen2brain/url2img](https://github.com/gen2brain/url2img): HTTP server with API for capturing screenshots of websites
* [jochasinga/grx](https://github.com/jochasinga/grx): Reactive Extensions for the Go language.
* [gin-gonic/gin](https://github.com/gin-gonic/gin): Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
* [kubernetes/helm](https://github.com/kubernetes/helm): The Kubernetes Package Manager
* [ncw/rclone](https://github.com/ncw/rclone): "rsync for cloud storage" - Google Drive, Amazon Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Cloudfiles, Google Cloud Storage, Yandex Files

####cpp
* [PaddlePaddle/Paddle](https://github.com/PaddlePaddle/Paddle): PArallel Distributed Deep LEarning
* [Microsoft/LightGBM](https://github.com/Microsoft/LightGBM): A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks. It is under the umbrella of the DMTK(http://github.com/microsoft/dmtk) project of Microsoft.
* [rethinkdb/rethinkdb](https://github.com/rethinkdb/rethinkdb): The open-source database for the realtime web.
* [dmlc/xgboost](https://github.com/dmlc/xgboost): Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Flink and DataFlow
* [ETLCPP/etl](https://github.com/ETLCPP/etl): Embedded Template Library
* [v8/v8](https://github.com/v8/v8): The official mirror of the V8 git repository
* [googlesamples/android-ndk](https://github.com/googlesamples/android-ndk): Android NDK samples with Android Studio

####javascript
* [developit/preact](https://github.com/developit/preact):  Fast 3kb React alternative with the same ES6 API. Components & Virtual DOM.
* [jakebian/quiver](https://github.com/jakebian/quiver): Interactive convnet features visualization for Keras
* [d3/d3](https://github.com/d3/d3): Bring data to life with SVG, Canvas and HTML.
* [facebook/jest](https://github.com/facebook/jest):  Painless JavaScript Testing.
* [guerrerocarlos/WikipediaP2P](https://github.com/guerrerocarlos/WikipediaP2P): WikipediaP2P.org Chrome Extension http://www.wikipediap2p.org/

####coffeescript
* [samu/angular-table](https://github.com/samu/angular-table): Angular directive which allows to declare sortable tables and to add pagination with very little effort.
* [atom/tree-view](https://github.com/atom/tree-view): Explore and open project files in Atom
* [littlebee/git-time-machine](https://github.com/littlebee/git-time-machine): Atom package that allows you to travel back in commit history
* [AtomLinter/linter-coffeelint](https://github.com/AtomLinter/linter-coffeelint): Linter plugin for CoffeeScript, using coffeelint.
* [stormuk/wp-turbolinks](https://github.com/stormuk/wp-turbolinks): Turbolinks for WordPress
* [atom/markdown-preview](https://github.com/atom/markdown-preview): Markdown preview in Atom
* [JunoLab/atom-julia-client](https://github.com/JunoLab/atom-julia-client): Juno
* [atom/language-git](https://github.com/atom/language-git): Git editing package for Atom
* [sagemathinc/smc](https://github.com/sagemathinc/smc): SageMathCloud's complete current source code repository -- use SMC at
* [t3chnoboy/amazon-product-api](https://github.com/t3chnoboy/amazon-product-api):  Amazon Product Advertising API client
* [oauth-io/oauthd](https://github.com/oauth-io/oauthd): oauthd - The OAuth Daemon is the open source version of the OAuth.io core
* [ujiro99/RedmineTimeTracker](https://github.com/ujiro99/RedmineTimeTracker): Chrome app for tracking work time.

gha_language: Python


text:
# trillo

Lists tasks you create and complete, with member initials and due date. Considers default Trello labels to be time estimates. Green for 1 hour, yellow for 2, orange for 4, red for 8.

![screen shot 2018-07-04 at 16 30 27](https://user-images.githubusercontent.com/20999066/42280402-518e6264-7fa9-11e8-93a9-940f6a312d03.png)

## License

MIT

repository: nykula/trillo

repo_name: nykula/trillo


text:
---
id: debugging
title: Debugging
---

Flipper is built on Electron which itself is built on Chromium. This means we can debug Flipper using Chrome's developer tools. Flipper will also automatically install the React devtools extension allowing you to have better insight into what is going on in your plugin.

You can open the dev tools from the menu with `View` > `Toggle Developer Tools` or pressing ⌥⌘I on a Mac.

In addition to helping you with the JavaScript, the JS console will also display uncaught exceptions thrown from the client plugin in response to Flipper method calls.

## Plugin missing

If a plugin you created is not showing up there might be two potential classes of problems: Either there is a problem on the mobile side or on the desktop side. Understanding where the problem is rooted helps debugging it.

Click on "Plugin now showing" in the sidebar and see if your plugin is listed here. If it is not listed, the desktop side of the plugin is not loaded. One of the main reasons for this is that the plugin could not be compiled, due to some errors. Try launching Flipper from the Terminal to see some additional logs: `/Applications/Flipper.app/Contents/MacOS/Flipper`.

A common error here is `Error: fsevents unavailable (this watcher can only be used on Darwin)`. This can be fixed by installing watchman (`brew install watchman`).

If the plugin is listed in the desktop app, but still is not showing up in the sidebar, the mobile app is not announcing the plugin. In this case, make sure, to instantiate your plugin and add it to your FlipperClient.


text:
## README

### To deploy these applications

```
hyscale deploy service -f adservice.hspec  -n '<your-namespace>' -a OnlineBoutique -p <profile file>
```

To Deploy from the Dockerfile refer to [microservices-demo](https://github.com/hyscale/microservices-demo)

repository: niranjanchintu/hyscale

gha_language: Java

repo_name: niranjanchintu/hyscale


text:
# Constraint Layout Animation
Example project showing keyframe animation with ConstraintLayout

![screenshot](https://raw.githubusercontent.com/crehmann/ConstraintLayoutAnimation/master/assets/ConstraintSetAnimation.gif)

repository: crehmann/ConstraintLayoutAnimation

repo_name: crehmann/ConstraintLayoutAnimation


text:
# STM32 Timer Test

## Summary
Test/prototype code, creating a 1μs-precise, digitally trimmable clock using STM32F4 timers.

There's also a phase-locked loop get the timer to track a 1PPS input from a GPS module.

## License
MIT licensed.

## Compiling

Make and program with: `make && openocd -f /usr/share/openocd/scripts/board/st_nucleo_f4.cfg -c "program build/Test1.elf verify reset exit"`

Debug with `openocd -f /usr/share/openocd/scripts/board/st_nucleo_f4.cfg 1>/dev/null 2>&1& arm-none-eabi-gdb --eval-command="target remote localhost:3333" build/Test1.elf; killall openocd`


text:
---
layout: post
title: Yacrd or the hard way to build a bioinformatics tools
date: 2018-06-18
draft: true
published: true
tags: overlapper benchmark long-reads
---

{% include setup %}

# Yacrd: or the hard way to build a bioinformatics tools

First how sequencing work (very very rougly) :

1. extract DNA
2. cut in little fragment
3. sequence this fragment

Sometimes between step 2 and 3 little fragment merged in bigger fragmente, and sequencer generate a chimeric reads.

Chimeric reads trouble in many type of analysis, in assembly it connects remote regions of the genome, and create mis-assembly. Many tools exist to detect and remove/split this chimeric read.

## Why

I create Yacrd because I didn't find standalon tools for detect chimeric read in long read dataset without correcte this read. We can mention Dasscruber tools, but they do some other modification on read and bigger problem it's only work with dagliner.

## How

![Yacrd use long read mapping result to compute coverage of read and find gap in this coverage] ({{ POST_ASSETS_PATH }}/img/algoritm.png)

We can define YACRD algorithm like :
1. parse output of long read mapping
2. For each read :
    1. Compute the coverage curve of this read
    2. Find where coverage are less than a threshold

The idea is very very simply so I begin to write yacrd in python

#### Python Version 0.0

First we need read against read information minimap are pretty effecient tools for that. We can convert minimap output (a tsv with readname and mapping position) in a hashtable they associate read and all interval where they are covered by another read.

After we construct this table we can iterate over each read, and construct for each read the covered curve, this curve are modelise by a 1D table with size equal to the size of read and for each base a count of coverage level at this position at this end we rescreen the coverage table to found where the coverage drop of a threshold.

At this point we can observe some case :

![gap at begin in middle and at end of read huge gap]({{ POST_ASSETS_PATH }}/img/gap_position.png)

The gap at begin and end are algorithm gap some mapping tools didn't try to extend overlap to the end or begin of ther read, so the position at begin/end of read aren't realy coverage gap.
I observe some read where they have no overlap or just one or two read I called this read Not_covered if a read have a very small number of overlap this read provide any information or how we can trust in this information.

This first unpublish prototype work on simple example but on real data we experiment a huge performance issue.

#### C++ Arbok, Kabuto

Python version are slow but they validate the algorithm, so I just rewrite this algorithm in C++, this is the version 0.1 of Yacrd. After some discussion with [Maël Kerbiriou](https://twitter.com/wDimD) he rewrite the algorithm.

Maël replace the huge table of coverage by a priority queue of interval.

```
gap_list <- {}
queue <- {}
map_interval <- sort of mapping interval
gap_begin
for each interval in map_interval:
    for each i in queue:
	if i.end < interval.begin:
	    gap_begin = i.end
	    queue.pop(i)

    if length of queue < threshold:
	gap_list.add(gap_begin, intervale.begin)

    queue.add(interval)
```

If we assume the memory alocation are made in $O(1)$. The complexity of naive algorithm are $O(n \dot 2m)$ where m is the mean number of base in read, m the number of read, the complexity of Maël algorithm are near $O(m \dot i)$ where i is the number of mapping interval. Generaly $i << m$.

Maël add some C++ triks to read file more efficiently, read her [pull request](https://github.com/natir/yacrd/pull/8) it's very intersting.

Plus/Minus of this version.

Plus:

- code are speed

Minus:

- depency management are horrible

The performance improvement is due to the use of a compiled language but also has improvements in the algorithm. But the evolution of programme are little bit harder specialy when this fonctionality required to add dependency in project.

If I want continue to add fonctionality in yacrd I need a langage with good performance, an easy dependancy management so I select ~~Go~~ Rust.

I want to be sure result on real dataset are same between version Kabuto and Ninetales so I reuse *E. coli* Pacbio dataset from by last [blog post](http://blog.pierre.marijon.fr/2018/04/13/long-reads-overlapper-compare#datasets)

Run on result of this command :

```
minimap -x ava10k -k 14 e_coli_pacbio.fasta e_coli_pacbio.fasta > minimap_pacbio.paf
```
e_coli_pacbio.fasta come for [DevNet pacbio](https://github.com/PacificBiosciences/DevNet/wiki/E.-coli-Bacterial-Assembly) 589 MB

```
/usr/bin/time yacrd0.2.1 -i minimap_pacbio.paf
18.52 user 0.57 system 19.22 elapsed
```

```
/usr/bin/time yacrd0.3 -i minimap_pacbio.paf
20.09 user 0.62 system 20.88 elapsed
```

The rust version is slower indeed but the benefits are HUGE:

- simple dependency management
- integrated test framework
- sure not to have a memory leak
- future developments are easier
- I like this language:)

## Conclusion

it's work

algo is simple but implementation change many think

rust better than c++ because code are shorter, and dependancie management is simple

Ok I plan feature required for version 1.0 in [this issue](https://github.com/natir/yacrd/issues/12), but I'm open to any suggestion.

And I think that having in addition to the fixed threshold a dynamic threshold based on the reads coverage that shares a similar region with the target reads, would be a good idea.

## Thanks

Mael for the new algorithm, and some c++ tricks

Rayan Chikhi and Jean Stéphane Varré for correction

## Version naming convention

Build a string with contributors initial and version number transformed all characters into their base values64, apply a modulo 150 go look for the pokemon pokedex in the pokemon generation according to the major version number 0 generation 1, 1 generation 2, ...


text:
See the docs: https://godoc.org/github.com/mec07/rununtil

## Changelog

The [CHANGELOG.md](./CHANGELOG.md) file tracks all of the changes and each release.
We are managing it using the helpful [changelog-tool](https://github.com/ponylang/changelog-tool).
On Mac you can install it with brew: `brew install kaluza-tech/devint/changelog-tool`.
On linux (or any other platform) you have to install the pony language.
Then just follow the instructions on the github page for installing the changelog-tool:
https://github.com/ponylang/changelog-tool#installation

The use of the tool is straightforward.
To create a new changelog (don't run this in this repo because then you'll replace the current changelog with a new one!):
```
changelog-tool new
```
To start recording a new entry:
```
changelog-tool unreleased -e
```
The `-e` means update the changelog file in place.
Then manually edit the changelog to add your changes in the unreleased section.
When you're ready you can then "release" it by executing:
```
changelog-tool release 0.0.1 -e
```
Replace `0.0.1` with the new version.

gha_language: Go


text:
## This does not export `FOO`. Remove `$`/`${}` for that, or use `${var?}` to quiet.

### Problematic code:

```sh
MYVAR=foo
export $MYVAR
```

### Correct code:

```sh
MYVAR=foo
export MYVAR
```

### Rationale:

`export` takes a variable name, but shellcheck has noticed that you give it an expanded variable instead. The problematic code does not export `MYVAR` but a variable called `foo` if any.

### Exceptions:

If this is intentional and you do want to export `foo` instead of `MYVAR`, you can either use a directive:

```sh
# shellcheck disable=SC2163
export "$MYVAR"
```

Or after (but not including) version 0.4.7, take advantage of the fact that ShellCheck only warns when no parameter expansion modifiers are applied:

```sh
export "${MYVAR}"    # ShellCheck warns
export "${MYVAR?}"   # No warning
```

`${MYVAR?}` fails when `MYVAR` is unset, which is fine since `export` would have failed too. The main side effect is an improved runtime error message in that case.
[Source](https://github.com/koalaman/shellcheck/wiki/SC2163)

repository: codacy/codacy-shellcheck

gha_language: Scala

repo_name: codacy/codacy-shellcheck


text:
# KubernetesDriverEndpoint

`KubernetesDriverEndpoint` is a [DriverEndpoint](../scheduler/DriverEndpoint.md).

## <span id="onDisconnected"> Intercepting Executor Lost Event

```scala
onDisconnected(
  rpcAddress: RpcAddress): Unit
```

`onDisconnected` is part of the [RpcEndpoint](../rpc/RpcEndpoint.md#onDisconnected) abstraction.

`onDisconnected` [disables the executor](../scheduler/DriverEndpoint.md#disableExecutor) known by the [RpcAddress](../rpc/RpcAddress.md) (found in the [Executors by RpcAddress Registry](../scheduler/DriverEndpoint.md#addressToExecutorId) registry).

repository: RammySekham/apache-spark-internals

repo_name: RammySekham/apache-spark-internals


text:
# Iconography

The OBAP elements use 24x24 SVG icons and provides the full suite of [Material Design icons](https://material.io/resources/icons/?style=baseline) that can be used in your applications. You can also create and register your own SVG icon sets for use in your application.

## Using the Material Design Icons

The core icon set functionality is provided by `obap-icons`, which manages the icons used by applications. You generally don't need to use it directly unless you want to register a custom icon set. Before you can use icons in your application, you need to include at least one icon set (group) in your application. The following icon sets are provided out of the box:

* av
* communication
* core
* device
* editor
* hardware
* image
* maps
* notification
* places
* social
* standard

All of the sets, except `core` are well documented on the Material Design website. The `core` icons are a small set that are used by the other elements in the suite, so the should always be included in your application. You'd normally display an icon by using the `obap-icon` element and setting the icon attribute/property. You need to prefix the icon name with the icon set name (`set-name:icon-name`) except in the case of the standard icons, in which case you can simply use the icon name.

```javascript
// Always import the 'core' icon set.
import<EMAIL_ADDRESS>
// Import the 'device' icon set.
import<EMAIL_ADDRESS>
// Import the 'standard' icon set.
import<EMAIL_ADDRESS>
// Import the 'obap-icon' element.
import<EMAIL_ADDRESS>
<obap-icon icon="device:bluetooth"></obap-material>
<obap-icon icon="core:chevron-left"></obap-material>

// Standard icons don't need a group prefix (same as 'standard:android').
<obap-icon icon="android"></obap-material>
```

*Note: An icon set only needs to be imported once, so it's best to do it at the application element level.*

## Creating an Icon Set

It's not a good idea to include all the provided icon sets if you aren't going to use all of them (there's a lot of icons that will just take up space). It's better to copy the ones you want from the provided icon sets (or create your own) and create your own set.

```javascript
// In a file called 'my-icons.js'.
import { obapIcons } from<EMAIL_ADDRESS>
obapIcons.addGroup('my-icons', `
    <defs>
        <g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g>
        <g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g>
    </defs>
`);
```

This creates a new icon set called `my-icons`, which you can use like this:

```javascript
// Import your icon set.
import './my-icons.js';

// Import the 'obap-icon' element.
import<EMAIL_ADDRESS>
<obap-icon icon="my-icons:chevron-left"></obap-material>
<obap-icon icon="my-icons:chevron-right"></obap-material>
```

*If you want to create your own icons, ensure that they are 24x24 in size.*

repository: openbap/obap-elements

gha_language: JavaScript

repo_name: openbap/obap-elements


text:
# vokuro-form-generator
Form generator for Phalcon [Vökuró](https://github.com/phalcon/vokuro).
First you need generate JSON from [formbuilder.online](https://formbuilder.online/)

license: Unlicense

repository: yaskhan/vokuro-form-generator

repo_name: yaskhan/vokuro-form-generator


text:
# SINGLE PINGPONG-hand
Playing a pingpong game with just color detection  using opencv and python scripts

Using opencv, to detect a specific colour(of the glove),and draw a contour over it and use the glove movements to move the centroid obtained from the operations.This will in turn move the paddle for the game.

The Game is written such a way that there is only a single player and you gotta survive for as much time as possible.

**Installation**

```
pip install virtualpp
```

Example

```
from virtualpp import final
final.GameColor("Green")
```

(optional)You can integrate this into a projector inside a dark room and it will give good results.

repository: abhijithneilabraham/virtualpp

repo_name: abhijithneilabraham/virtualpp


text:
# Devporta API Documentation

This repo contains the official Devporta API documentation, which can be viewed online [HERE](https://docs.devporta.com/). Before submitting pull-requests, please remember to _fully_ read the [Contributing](CONTRIBUTING.md) guidelines.

## Markdown Syntax

This repository uses special markdown syntax that helps style the resulting web version of the documentation.

### H6 Headings
H6 headings should be used above tables and code blocks to properly label them.

### Linking
Links between docs can be achieved by using a hash symbol (#), plus the markdown file name, plus a slash, and finally the dash-separated anchor. For instance, to link to the above H6 heading section:

```md
[Links to README.md H6](#README/h6-headings)
```

### Alert Boxes
Alert boxes are achieved by using a block quote that has one of 'warn', 'danger' or 'info' on the first line.

## Join the Devporta Slack
The [Devporta slack](https://slack.devporta.com) is a common hangout for platform users, library and sdk developers alike. It's a great starting point for those looking to dive in and learn creating with the Devporta API.

<!-- https://docs.craftcms.com/v3/#tech-specs -->
<!-- https://discordapp.com/developers/docs/intro -->

repository: devporta/docs

repo_name: devporta/docs


text:
Restaurants (Byteland)
======================

This is a Symfony 2.6 application that provides REST services for Restaurant, Person and Reservation entities.

Find a [Postman collection] (doc/restaurants.json.postman_collection) of crafted http requests at ./doc/restaurants.json.postman_collection. Every call in this collection works if performed immediately after the fixtures have been loaded.

The tests bootstrap script performs an automated install of the application.

Before performing the tests, the run-tests script will set up the project and environment for the test suite (it performs a composer install and loads fixtures to the db).

Run the test bootstrap script with:

    ./bin/run-tests

The entire test suite is executed by this script and all tests pass. This test suite, however, does not have 100% code coverage. It has some unit and functional tests to exemplify/serve as reference (see the Tests dir in each bundle for details).

For setting up in a non-web root dir, please refer to step 4 below.

To get a list of all of the application's endpoints (routes) perform:

    app/console router:debug

The application expects a JSON payload in POST and PUT requests, and will always return JSON.

Manual installation instructions are as follows:

1. Unpack the zip.
2. Composer is used to manage the project's dependencies. If you don't have composer installed, install it
   on the application's root dir (https://getcomposer.org/download/)
3. From the application's root dir run:

    'php composer.phar install'

4. If you did not install the application inside your web directory's document root, add a vhost config, restart
   your server service and edit your /etc/hosts file (eg. add a new host 'restaurants.dev')
5. Make sure your web server has write permissions in the app/cache and app/logs directories
6. Update the database-related parameters on the app/config/parameters.yml file (the project uses the mysql db)
7. Install the db and fixtures by running on the application root folder the following:

    'app/console doctrine:database:drop --force && app/console doctrine:database:create && app/console doctrine:schema:create && app/console doctrine:fixtures:load --append'

8. Access the application (http://restaurants.dev/app_dev.php/v1/YOUR_REST_ENDPOINT)

** Access prod environment through app.php (app developed in dev environment, app.php should work but not fully tested!)

repository: guatebus/restaurants

repo_name: guatebus/restaurants


text:
---
external help file: Ruleset.Utility-help.xml
Module Name: Ruleset.Utility
online version: https://github.com/metablaster/WindowsFirewallRuleset/blob/master/Modules/Ruleset.Utility/Help/en-US/Invoke-Process.md
schema: 2.0.0
---

# Invoke-Process

## SYNOPSIS

Run process, format and redirect captured process output

## SYNTAX

### Default (Default)

```powershell
Invoke-Process [-Path] <String> [[-ArgumentList] <String>] [-NoNewWindow] [-Timeout <Int32>] [-Async] [-Raw]
 [-RunAsCredential <PSCredential>] [-LoadUserProfile] [-WorkingDirectory <String>] [<CommonParameters>]
```

### Domain

```powershell
Invoke-Process [-Path] <String> [[-ArgumentList] <String>] [-Domain <String>] [-Credential <PSCredential>]
 [-NoNewWindow] [-Timeout <Int32>] [-Async] [-Raw] [-RunAsCredential <PSCredential>] [-LoadUserProfile]
 [-WorkingDirectory <String>] [<CommonParameters>]
```

### Session

```powershell
Invoke-Process [-Path] <String> [[-ArgumentList] <String>] [-Session <PSSession>] [-NoNewWindow]
 [-Timeout <Int32>] [-Async] [-Raw] [-RunAsCredential <PSCredential>] [-LoadUserProfile]
 [-WorkingDirectory <String>] [<CommonParameters>]
```

## DESCRIPTION

Run process with or without arguments, set process timeout, capture and format output.
If target process produces an error, the error message is formatted and shown in addition
to standard output if any.

## EXAMPLES

### EXAMPLE 1

```powershell
Invoke-Process git.exe -ArgumentList "status" -NoNewWindow -Wait 3000
```

### EXAMPLE 2

```powershell
Invoke-Process gpupdate.exe -NoNewWindow -ArgumentList "/target:computer" -Async -Timeout 3000
```

## PARAMETERS

### -Path

Executable name or path to application which to start.
Wildcard characters and relative paths are supported.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases: FilePath

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
```

### -ArgumentList

A collection of command-line arguments to use when starting the application

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Domain

Computer name on which to invoke process

```yaml
Type: System.String
Parameter Sets: Domain
Aliases: ComputerName, CN

Required: False
Position: Named
Default value: [System.Environment]::MachineName
Accept pipeline input: False
Accept wildcard characters: False
```

### -Credential

Specify Credential used for authentication to Domain.

```yaml
Type: System.Management.Automation.PSCredential
Parameter Sets: Domain
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Session

Specifies the PS session to use

```yaml
Type: System.Management.Automation.Runspaces.PSSession
Parameter Sets: Session
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -NoNewWindow

Whether to use the operating system shell to start the process

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -Timeout

The amount of time, in milliseconds, to wait for the associated process to exit.
Value 0 means an immediate return, and a value of -1 specifies an infinite wait.
The default wait time is 15000 (15 seconds).

```yaml
Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 15000
Accept pipeline input: False
Accept wildcard characters: False
```

### -Async

If specified, reading process output is asynchronous.
This functionality is experimental because current thread will block until timeout.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -Raw

If specified, process output is returned as string.
By default process output is formatted and redirected to information and error stream.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -RunAsCredential

Optionally specify Windows user name and password to use when starting the process.

```yaml
Type: System.Management.Automation.PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -LoadUserProfile

Specify whether the Windows user profile is to be loaded from the registry
Because loading the profile can be time-consuming, it is best to use this value only if you must
access the information in the HKEY_CURRENT_USER registry key.
Requires RunAsCredential of the user to be specified.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -WorkingDirectory

Set the working directory for the process to be started.
The WorkingDirectory property must be set if Credential (UserName and Password) is provided.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None. You cannot pipe objects to Invoke-Process

## OUTPUTS

### [string]

### [System.Threading.CancellationTokenSource]

### [void]

## NOTES

TODO: Because of uncertain output this function needs a lot of improvements and a lot more test cases
to handle variable varieties of process outputs.
TODO: Domain parameter needed to invoke process remotely
TODO: Process may need to read input
TODO: NoNewWindow should be default
TODO: To implement LiteralPath parameter, it must be done with parameter sets.

## RELATED LINKS

[https://github.com/metablaster/WindowsFirewallRuleset/blob/master/Modules/Ruleset.Utility/Help/en-US/Invoke-Process.md](https://github.com/metablaster/WindowsFirewallRuleset/blob/master/Modules/Ruleset.Utility/Help/en-US/Invoke-Process.md)

[https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process)

[https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo)

repository: metablaster/WindowsFirewallRuleset

gha_language: PowerShell

repo_name: metablaster/WindowsFirewallRuleset


text:
---
title: "How to Unlock the Power of Entrepreneurship"
author<EMAIL_ADDRESS>tags: ["Announcements","aching"]
date: 2017-12-23 18:11:58
description: "This week, online magazine TwentyThirty features an article on Benjamin Powell, CEO of Agora Partnerships, which aims to drive social change through investing in small businesses."
---

*Rajah Lehal*, Founder and CEO of Clausehound has an organizational role in activating the BMW Foundation Responsible Leaders Networks in North America.

BMW Foundation is a supporter of **TwentyThirty**, an online magazine that highlights social innovation activities leading up to the UN sustainability targets for the year 2030.

This week, TwentyThirty features an article on *Benjamin Powell*, CEO of Agora Partnerships, which aims to drive social change through investing in small businesses.

Read more about and watch an interview with Ben in [this article](http://twentythirty.com/how-to-unlock-the-power-of-entrepreneurship/) on unlocking the power of entrepreneurship.

repository: clausehound/clausehound-blog

gha_language: TypeScript

repo_name: clausehound/clausehound-blog


text:
# Debugging Python code

This is a tutorial how to get started with debugging Python code by Christoph Deil.

We will start by looking at how Python executes code, exceptions and stack frames first, and only in the second half move on to using a debugger.

Throughout the tutorial you will find short exercises marked with :point_right:. Usually the solution is given directly below. Please execute the examples and try things for yourself. Interrupt with questions at any time!

This is the first time I'm giving a tutorial on this topic. Please let me know if you have any suggestions to improve!

## Outline

- [Prerequisites](#prerequisites)
- [1. When to debug?](#1-when-to-debug)
- [2. How Python executes code](#2-how-python-executes-code)
- [3. Exceptions and tracebacks](#3-exceptions-and-tracebacks)
- [4. Debugging with pdb](#4-debugging-with-pdb)
- [5. Debugging with ipython and Jupyter](#5-debugging-with-ipython-and-jupyter)
- [6. Debugging with PyCharm](#6-debugging-with-pycharm)
- [Things to remember](#things-to-remember)
- [Going further](#going-further)

## Questions

Please help me adjust the tutorial content and speed a bit:

- How often do you debug Python code? (never, last year, all the time)?
- Do you know how Python executes code?
- Do you know what exceptions and stack frames are and how to read a traceback?
- Have you used `pdb` to debug from Python?
- Have you used `%debug` or `%run -d` from ipython or Jupyter?
- Have you used the `PyCharm` debugger?
- Have you used any other Python debugging tool?

## Prerequisites

This tutorial assumes that you have used a terminal, Python, ipython and Jupyter before. No experience with Python debugging is assumed, this tutorial will get you started and focus on the basics.

:point_right: Check that you have Python (3.5 or later), `ipython` and `jupyter` installed

```
$ python --version
$ ipython --version
$ jupyter --version
```

If you don't have this, one nice option to get it is [Anaconda Python](https://www.anaconda.com/download/).

At the end of this tutorial, i will demo how to use the visual debugger in PyCharm.

If you want to try it out, install the free community edition
of [PyCharm](https://www.jetbrains.com/pycharm/download/).
After installing PyCharm, you need to configure two things:
your Python interpreter and execute `Tools | Create Command-line Launcher`.

:point_right: Check that you have PyCharm installed and configured.

One way to launch PyCharm is to cd into the directory for this tutorial
and use the command line launcher like this:
```
cd python-tutorials/debug
charm .
```
Then right-click on `analysis.py` and select "run analysis".
A console at the bottom should appear the output of "5.0" that we print from that script.

*Note: there are many other editors and IDEs that have Python debugging support
(either built in or via extensions), e.g. `vim` or `emacs` or [Visual Studio
Code](https://code.visualstudio.com/). I'm not familiar with those, and in any
case we will not have time to sort out installation / setup problems for those
during the tutorial. If you want to use those, try them after the tutorial and
try to re-do the examples from this tutorial.*

## 1. When to debug?

### Suspect result

When you have an incorrect or at least suspect output of your program, you have to investigate your code and data to try and pin down why the output is not what you expect. This is the worst, compared to this issue, the next two cases are nice, because it's obvious that there's a problem and you get a traceback with lots of info where to start looking.

### Exception

Most of the time you will be able to read the traceback and code and figure out what is wrong and not need to start a debugger. But sometimes it's not clear and you need to 'look around'; that's when you start a debugger.

### Crash

The Python process can crash. This is very rare, except if you work on or use buggy Python C extensions. To debug it you would use `gdb` or `lldb`. There are tutorials (see e.g. [here](http://www.scipy-lectures.org/advanced/debugging/index.html#debugging-segmentation-faults-using-gdb)), we won't cover it here.

:point_right: Cause Python to crash.

```
$ python
>>> import ctypes
>>> ctypes.string_at(1)
Segmentation fault: 11
$
```

## 2. How Python executes code

To debug Python code, you need to know how Python executes code.
Have a look at the Python module [point.py](point.py) that defines
a `Point` class and a `distance` function, and the [analysis.py](analysis.py)
script that does `from point import Point, distance` and runs a simple analysis.

Is it clear what happens when you run `python analysis.py`?

The short answer is that Python executes code top to bottom, line by line. When
a `def` or `class` statement is encountered, a function or `type` object are
created in the module `namespace`, and `import point` causes the code in
`point.py` to be executed, and when the bottom is reached, the `point` module is
stored in the global `sys.modules` dict, i.e. a second `import point` will be a
no-op, not execute the code in `point.py` again. You should never reload in
Python, always restart the interpreter if you edit any code.

If you're not sure what Python does with `def` or `class` or `import`, please
ask now, and we'll spend a few minutes to add print statements to show what is
going on.

Another important concept you need to know about is how Python variables and
function calls work. Superficially Python seems similar to C or C++, there are
variables to store data and function calls create stack frames. But if you look
a bit closer, you'll see that it works completely differently under the hood: in
Python everything is an object, variables are entries in namespace dictionaries
(`globals()` and `locals()`) pointing to objects, and Python is dynamic, i.e.
happy to have an integer variable `data = 999` and then on the next line change
to a string variable `data = 'spam'`. Memory management is automatic, using a
reference counting garbage collector that deletes objects with zero references.
Python is both "compiled" and "interpreted": code is parsed into an `ast`
(abstract syntax tree), compiled into `bytecode`, and executed by the `CPython`
"interpreter" or "virtual machine", which executes one byte code after the other
in an infinite `while` loop.

Most Python programmers don't know how Python works "under the hood". That's good, Python is supposed to be a high-level language that "fits your brain" and does what you intuitively expect. But you still need to have a "mental model" about variables, objects and the stack of function calls, each with it's own local namespace. The best way to learn about this is actually to step through code and see how the Python program state changes. Before we do this in a debugger, check this out:

:point_right: Step through the [point example](https://goo.gl/yTEbLX) using http://pythontutor.com/.

If you'd like to learn more, the [Whirlwind Tour Of
Python](http://nbviewer.jupyter.org/github/jakevdp/WhirlwindTourOfPython/blob/master/Index.ipynb)
is a beginner-level introduction, and [Python
epiphanies](https://nbviewer.jupyter.org/github/oreillymedia/python_epiphanies/blob/master/Python-Epiphanies-All.ipynb)
is a notebook explaining everything in great detail.

## 3. Exceptions and Tracebacks

If you use Python, you will see exceptions and tracebacks all the time.

In Python, the term "error" is often used to mean the same thing as "exception".
Although of course, "error" and "exception" are very general terms and are
widely used, not always referring to a Python exception (i.e. instances of the
built-in `Exception` class or subclasses of `Exception` like `TypeError`).

Once you've learned to read a traceback, there will be many times where
it's enough information for you to figure out what's wrong,
and you will only start the debugger in the cases where the problem
isn't clear from reading the traceback and relevant code for a minute or two.

Example: [exception.py](exception.py)
```python
$ python exception.py
Traceback (most recent call last):
  File "exception.py", line 14, in <module>
    main()
  File "exception.py", line 12, in main
    move_it(p)
  File "exception.py", line 8, in move_it
    point.move(42, '43')
  File "/Users/deil/code/python-tutorials/debug/point.py", line 16, in move
    self.y += dy
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
```

Sometimes you will see a "chained exception" (also called "double inception"),
where a second exception is raised inside an exception handler, i.e. an `except`
block.

Example: [chained_exception.py](chained_exception.py)
```
$ python exception_chain.py
Traceback (most recent call last):
  File "exception_chain.py", line 4, in <module>
    a / b
ZeroDivisionError: division by zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "exception_chain.py", line 6, in <module>
    print('Bad data:', a, c)
NameError: name 'c' is not defined
```

:point_right: Start `python` and create some of the most common exceptions.

These are some very common errors you'll see a lot:
- `SyntaxError`
- `IndentationError`
- `NameError`
- `AttributeError`
- `KeyError`
- `IndexError`

:point_right: What other exceptions have you seen? Are they clear or do you have any question?

There's more info on Python exceptions [here](https://docs.python.org/3/tutorial/errors.html) and an overview of all built-in exceptions [here](https://docs.python.org/3/library/exceptions.html#exception-hierarchy).

## 4. Debugging with pdb

Let's use the Python scripts from above ([exception.py](exception.py) and [silent_error.py](silent_error.py)) to debug with `pdb`, the Python debugger.

- with print statements
- `import pdb; pdb.set_trace()`
- `python -m pdb myscript.py`

## 5. Debugging with ipython and Jupyter

Similarly how `ipython` and `jupyter` often give a nicer interactive Python environment than `python`, they also make it often easier to debug.

- `ipython -i`
- `import IPython; IPython.embed()`
- `ipdb`

To learn debugging from Jupyter, let's use the [Errors and Debugging](https://jakevdp.github.io/PythonDataScienceHandbook/01.06-errors-and-debugging.html) notebook from the the excellent [Python Data Science Handbook](https://jakevdp.github.io/PythonDataScienceHandbook/) by Jake VanderPlas. It's freely available at https://github.com/jakevdp/PythonDataScienceHandbook and generally is a great resource to learn, so I wanted to introduce it.

:point_right: Clone the `PythonDataScienceHandbook` git repository and start Jupyter.
```
cd <where you have your repositories>
git clone https://github.com/jakevdp/PythonDataScienceHandbook.git
cd PythonDataScienceHandbook
jupyter notebook notebooks/01.07-Timing-and-Profiling.ipynb
```

- `%debug`
- `%run -d`
- `%pdb`

## 6. Debugging with PyCharm

PyCharm has a great visual debugger.

Since PyCharm is visual, it's hard to write a tutorial so that you can follow
along offline by just reading the info here.
Note that the PyCharm folks have a tutorial on debugging with many
screenshots [here](https://www.jetbrains.com/help/pycharm/debugging-code.html)
and a 6 min video on Youtube [here](https://www.youtube.com/watch?v=QJtWxm12Eo0).

One way to launch PyCharm is to cd into the directory for this tutorial
and use the command line launcher like this:
```
cd python-tutorials/debug
charm .
```

:point_right: Right-click on `analysis.py` and select "debug analysis".

## Things to remember

- Python is a very dynamic language
  - Very powerful
  - Easy to make mistakes
  - Easy to inspect and debug
- Use `pdb` from Python and `ipdb` from ipython and Jupyter for debugging, or a visual debugger like e.g. the one from Pycharm.
- See the debugger commands with `help` or [here](https://docs.python.org/3.6/library/pdb.html#debugger-commands).
- From ipython / jupyter, the commands are `%debug`, `%run -d` and `%pdb`
- Most people don't use a debugger often. There's code reading and `print` and `IPython.embed()` or just using ipython and the Jupyter notebook to see what's going on.

## Going further

These are good resources to learn more:

- Use http://pythontutor.com/ to learn how Python executes code.
- The [Errors and Debugging](https://jakevdp.github.io/PythonDataScienceHandbook/01.06-errors-and-debugging.html) page from the [Python data science handbook](https://jakevdp.github.io/PythonDataScienceHandbook/) by Jake VanderPlas.
- The Python standard library documentation for `pdb` ([link](https://docs.python.org/3.6/library/pdb.html))
- The Python module of the week tutorial for `pdb` by Doug Hellman ([link](https://pymotw.com/3/pdb/index.html))
- The [Python Debugging With Pdb](https://realpython.com/python-debugging-pdb/) tutorial by Nathan Jennings.
- The [Machete mode debugging](https://nedbatchelder.com/text/machete.html) talk by Ned Batchelder is fun and educational.
- [Software debugging](https://eu.udacity.com/course/software-debugging--cs259) free course on Udacity by Andreas Zeller. (I only watched the 1 min intro, don't know if it's any good.)


text:
---
layout: post
title: "Automatic streetlights that glow on detecting night and object using Arduino"
date: 2018-06-28 13:47:37
categories: arXiv_CV
tags: arXiv_CV Detection
author: Zain Mumtaz, Saleem Ullah, Zeeshan Ilyas, Shuo Liu, Naila Aslam, Jehangir Arshad Meo, Hamza Ahmad Madni
mathjax: true
---

* content
{:toc}

##### Abstract
Our manuscript aims to develop a system which will lead to energy conservation and by doing so, we would be able to lighten few more homes. The proposed work is accomplished by using Arduino microcontroller and sensors that will control the electricity based on night and object's detection. Meanwhile, a counter is set that will count the number of objects passed through the road. The beauty of the proposed work is that the wastage of unused electricity can be reduced, lifetime of the streetlights gets enhance because the lights do not stay ON during the whole night, and helps to increase safety measurements. We are confident that the proposed idea will be beneficial in the future applications of microcontrollers and sensors etc.

##### Abstract (translated by Google)

##### URL
[https://arxiv.org/abs/1806.10968](https://arxiv.org/abs/1806.10968)

##### PDF
[https://arxiv.org/pdf/1806.10968](https://arxiv.org/pdf/1806.10968)


text:
---
layout: doc_conf
title: Upstreams configuration
---

# Upstreams configuration in Rspamd

This document describes **upstreams**: list of servers that are selected by Rspamd using specific algorithm to establish a connection.

## Introduction

List of upstreams is a common structure used in various Rspamd configuration options when you need to setup some remote servers. For example, upstreams are used to connect to a Redis server, to select a DNS server and to establish a connection by Rspamd proxy. Servers in upstream list can be defined by IP addresses (IPv6 addresses should be enclosed in brackets):

    <IP_ADDRESS>,[::1]

by names:

    serv1.example.com,serv2.example.com

You can also specify custom ports if they differ from the default ones (e.g. `53` for DNS):

    serv1.example.com:8080,serv2.example.com

It is also possible to define upstreams priorities (described later), but in this case you must also specify a port number:

    <IP_ADDRESS>:53:10,<IP_ADDRESS>:53:1

Upstreams line can be separated by commas or by semicolons in any combination. You can prepend rotation algorithm to the upstreams line to override the default rotation method (specific for each upstream list definition):

    master-slave:<IP_ADDRESS>:53:10,<IP_ADDRESS>:53:1

There are several algorithms available in Rspamd so far:

* `master-slave`
* `round-robin`
* `random`
* `sequential`
* `hash`

### Master-slave algorithm

This algorithm always select the upstream with highest weight unless it is not alive. For example, `master-slave:<IP_ADDRESS>:53:10,<IP_ADDRESS>:53:1`, line specifies that `<IP_ADDRESS>` will be always used if possible. You can skip priorities, then the first element is treated as master and the subsequent ones are used as slaves: `master-slave:<IP_ADDRESS>,<IP_ADDRESS>` is the equialent of the previous definition.

### Round-robin algorithm

In this algorithm, upstreams are selected based on its weight, but, after selection, the upstream's weight is decreased by one. For example, `round-robin:<IP_ADDRESS>:53:10,<IP_ADDRESS>:53:1` will select `<IP_ADDRESS>` 10 times and `<IP_ADDRESS>` merely one time. After all upstreams are rotated, Rspamd reset current weights to the initial ones. Hence, this could be treated as `10:1` distribution for these two upstreams. Upstreams with errors pending have their priorities penalised according to number of errors pending, so Rspamd prefers to select upstreams with no errors.

### Sequential algorithm

Selects upstreams sequentially ignoring priorities.

### Random algorithm

Selects upstreams randomly ignoring priorities.

### Hash algorithm

Selects upstream based on hash value of the input key. Rspamd uses a [consistent hash algorithm](http://arxiv.org/abs/1406.2294) that allows you to split data between shards based on some key value. This rotation is available for specific upstreams, for example, some Redis upstreams. Otherwise, `round-robin` algorithm is used.

## Upstreams lifetime

Each upstream is monitored by Rspamd for errors. If an error occur Rspamd places an upstream in monitoring mode during which it analyses errors rate (this is usually set by options `max_errors` and `error_time` where rate is calculated by `errors` / `time elapsed since monitoring start`). If this error rate is higher than desired (`max_errors` / `error_time`) then Rspamd marks upstream as inactive unless there are no active upstreams. Any successful connection during `monitoring` state returns an upstream to the `active` state. Upon reaching error rate limit, an upstream is marked as inactive and Rspamd waits for some time configured by option `dead_time` to restore upstream in the active list. The overall process is depicted in the following scheme:

<img class="img-responsive" width="75%" src="{{ site.baseurl }}/img/upstreams.png">

## Name resolution

Rspamd has a special treatment for upstreams defined with their names. During `dead_time`, Rspamd tries to re-resolve names and insert new IP addresses into upstream. If a name has multiple addresses, then Rspamd inserts all. Addresses are selected using round-robin rotation with error checking. Unlike upstreams configurations, errors are persistent and not cleared after successful attempts, so Rspamd always select an address with fewer errors count. This is done to turn off an IPv6 address, for example, if IPv6 is improperly configured in the system.


text:
# Saved Posts Oragniser for Reddit

This is a small local webserver that pulls your data from your reddit saved posts.
It will allow you to tag, search and organise your saved posts.

## NOTE: STILL A WORK IN PROGRESS

## Installing

run `npm install -g save-for-reddit`

## Running

1. First you will have to create a reddit client key and secret from https://www.reddit.com/prefs/apps
2. Then head to https://not-an-aardvark.github.io/reddit-oauth-helper/ and enter your client id and client secret
3. Select permanent so you don't need to regenerate access token
4. Then select `account` `history` and `read`.
5. Click generate tokens
6. Once you have that data, run `save-for-reddit` and you will be prompted to enter you client id, client secret, refresh token and access token.
7. If all good the app will pull all of your saved posts into a local json file then a sever will start at http://localhost:8000/
8. Head to http://localhost:8000/ in your browser
9. ?
10. Profit

### NOTE:

- Right now this is still a work in progress and not ready to be pushed to NPM, if you would like to check it out clone this repo, then run a `npm link` on the directory, or run `node ./lib/index.js`
- The data is only pulled in once, in order to update the data you will need to run `save-for-reddit -g`
- To grab everything and reset the data completely run `save-for-reddit -ga` (NOTE: this will erase all the tags you have added ect)
- To set a limit to what you grab run `save-for-reddit -g -l 10`

repository: lucasaid/save-for-reddit

repo_name: lucasaid/save-for-reddit


text:
XSLT Excel engine
=================
This project is dedicated to changing the world, *together*. There's a lot of Microsoft Office documents generated by the ERP / CRM / *whatever* systems around the world, but most of those exports are done in `SpreadsheetML`. This project is specifically aimed at *any kind* of Excel generation, that uses XSLT transformation.

Using SpreadsheetML is bad. More than bad. You generate the xml file, save it as .xsl and when it's opened, the user has to *repair the file* - forcing himself into three clicks *per file*. When he tries to save it, Excel tries to save it in *XML format* and therefore, the user is forced into further clicking.

Let's generate VALID 2007+ formats!
-----------------------------------
All you need to do is following:
```xml
<?xml version='1.0'?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:include href="2012.engine.xsl" />

    <xsl:template match="/">
        <xsl:call-template name="generate_excel"></xsl:call-template>
    </xsl:template>
</xsl:stylesheet>
```

That will produce empty, valid xlsx file structure. You want to replace assets (if you're using free version of Saxon) and mainly - zip it & rename the *.zip* into *.xlsx* . No questions asked, excel will open the file and it will be perfectly valid.

Documentation
-------------
Documentation is [available within Wiki of this project](https://github.com/foglcz/xsl-excel-engine/wiki) as walkthrough.

tl;dr
-----
Here's your `template.xsl` file:
```xml
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:include href="engine/2012.engine.xsl" />
    <xsl:include href="static.xsl" />

    <!-- put your data-preprocessing in here -->

    <xsl:variable name="images">
        <!-- generate <image> structure in here based on data -->
    </xsl:variable>

    <xsl:variable name="contents">
        <!-- put your worksheet generation in here -->
    </xsl:variable>

    <xsl:template match="/">
        <xsl:call-template name="generate_excel">
            <xsl:with-param name="author">ACME Corp.</xsl:with-param>
            <xsl:with-param name="themes"><xsl:copy-of select="$themes" /></xsl:with-param>
            <xsl:with-param name="styles"><xsl:copy-of select="$styles" /></xsl:with-param>
            <xsl:with-param name="images"><xsl:copy-of select="$images" /></xsl:with-param>
            <xsl:with-param name="sheetContents"><xsl:copy-of select="$contents" /></xsl:with-param>
        </xsl:call-template>
    </xsl:template>
</xsl:stylesheet>
```

Run it as follows:

1. `cd tmp/output`
2. `transform -xsl:../template.xslt -s:../data.xml`
3. `cd tmp/output && zip * report.zip && mv report.zip report.xslx`

Done!

Implementing into current systems
---------------------------------
See [under the hood](https://github.com/foglcz/xsl-excel-engine/wiki/Under-the-hood#implementation-into-existing-systems) chapter of documentation.

License
-------
Licensed under MIT license. Full text of license available in `LICENSE.md` file.

Authors
-------
Author of the engine is **Pavel Ptacek** and contributors | [@foglcz](https://twitter.com/foglcz) | [in/foglcz](http://www.linkedin.com/in/foglcz) | [birdie<EMAIL_ADDRESS>
This project has been created with love, in spare time. The main reason was to teach the ERP systems new & valid formats of excel - while in 2007 it was not suitable to generate xlsx formats, it's 2013 now. I think it's time we abandoned the `SpredsheetML` and started using `OpenXML` instead.

 We need this to grow.

repository: grefel/xsl-excel-engine

repo_name: grefel/xsl-excel-engine


text:
---
title: Inspecting Implementations with the Adobe Experience Cloud Debugger
description: The Experience Cloud debugger is a tool that allows users to inspect and debug Experience Cloud Tags. This video covers how to use the Experience Cloud Debugger to inspect Analytics implementations.
feature: Validation
topics:
activity: implement
doc-type: technical video
team: Technical Marketing
kt: 1942
role: Developer, Data Engineer
level: Beginner
exl-id: c13a5973-3c7a-4980-95c5-447b50b962c7
---
# Inspecting Implementations with the [!DNL Adobe Experience Cloud Debugger] {#inspecting-implementations-with-the-adobe-experience-cloud-debugger}

The [!DNL Experience Cloud debugger] is a tool that allows users to inspect and debug Experience Cloud Tags. This video covers how to use the [!DNL Experience Cloud Debugger] to inspect [!DNL Analytics] implementations.

>[!VIDEO](https://video.tv.adobe.com/v/23878/?quality=12&learn=on)

You will learn how to see what is firing on different pages, load friendly names of variables, and export results for advanced use cases.

branch_name: refs/heads/main


text:
Presentation
============

This plugin allows you to manage GCE IPX800 cards.
Initially, this plugin was created to connect GCE IPX800s.

Data visible on the Dashboard :
-----------------------------------

-   ''analog inputs''

-   ''digital inputs''

-   ''the relays''

-   ''pulse counters''

Installation / Setup
========================

We will now configure a device. To do so, click
on '' Plugins / Home automation protocol / IPX800''

Then click on the button at the top left '' Add equipment''

Then enter the name of the equipment (ex. IPX 1).

Then define :

-   ''Parent object''

-   ''Category '' (optional)

-   ''Activate '' (tick, otherwise the equipment will not be usable)

-   ''Visible '' (optional if you don't want to make it visible on
    the dashboard)

-   ''IP adress''

-   ''Port''

-   ''Compte''

-   ''Password''

Refresh rate
-----------------------------

For analog inputs and counters, the data is
retrieved by the plugin every minute. It is not possible
to have a higher frequency. For the rest, if the push mode is
activated, refresh is almost instantaneous.

Behavior with the mobile application
--------------------------------------

By default, here is the behavior :

-   ''L'ip800''

The commands are all configured.

-   ''analog inputs''

The commands are all visible by default and the type depends on the
chosen probe.

-   ''digital inputs''

Orders are considered lights.

-   ''the relays''

Orders are considered lights.

-   ''pulse counters''

Orders are considered generic types.

It should be noted that we will find in the application the commands to
from the moment they are configured, even if they are not
marked as visible. To hide them, you must choose in
"Command configuration "⇒" Generic type "⇒" Disregard
this order".

Some screenshots
=======================

![ipx800 screenshot1](../images/ipx800_screenshot1.jpg)

![ipx800 screenshot2](../images/ipx800_screenshot2.jpg)

![ipx800 screenshot3](../images/ipx800_screenshot3.jpg)

repository: jeedom/documentations

gha_language: HTML

repo_name: jeedom/documentations


text:
# lightdash

> A small TypeScript utility library to complement lodash.

## Introduction

Lightdash is a utility library aiming to complement [lodash](https://lodash.com/),
written in TypeScript.

**[Docs](https://felixrilling.github.io/lightdash/)**

## Usage

Installation:

```shell
npm install lightdash
```

When using ES Modules:

```typescript
import { groupMapBy } from "lightdash";

groupMapBy([1, 2, 3, 4, 5], (val) => val % 2);
```

When using CommonJS (e.g. Node):

```typescript
const { groupMapBy } = require("lightdash");

groupMapBy([1, 2, 3, 4, 5], (val) => val % 2);
```

## Contributing

Contributions are always welcome, no matter if you have a request, an idea, found a bug, or spotted a typo: Feel free to create a PR or open an issue!

repository: HerschaLo/Smogon-Usage-Stats-Graph

repo_name: HerschaLo/Smogon-Usage-Stats-Graph


text:
# QRSimulator

QRCode Generation Simulator

- Sender (Generator) attaches digital signature in the QRCode.
- Receiver (Scanner) verifies sender's digital signature.

# Used resources

- qrcode.js from https://davidshimjs.github.io/qrcodejs/
- node-forge from https://www.npmjs.com/package/node-forge

# Deployed
- Demo service https://qrsimulator.netlify.app/

repository: lbcsultan/QRSimulator

repo_name: lbcsultan/QRSimulator


text:
---
layout: default
---

# 1994-10-06 - Re: He's dead Jim (Chomsky)

## Header Data

From<EMAIL_ADDRESS>(Anonymous)

To<EMAIL_ADDRESS>Message Hash: a9757f1569b50770f4b7027ad73414572b7119e3cdc67f9953b8f81547a02f76

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-10-06 15:59:18 UTC

Raw Date: Thu, 6 Oct 94 08:59:18 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Anonymous)
Date: Thu, 6 Oct 94 08:59:18 PDT
To<EMAIL_ADDRESS>Subject: Re: He's dead Jim (Chomsky)
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

First and foremost I would like to publicly apologize to Mr. James A.
Donald... re-reading my intial post to this thread, I feel that I was out
of line in some places.  As is the current topic of the MEME thread, I
would like to stress that one should attack the message and *not* the
messenger.  Mr. Donald (*not* McDonald) is neither a fascist, nor Hitler,
nor anything else than however he chooses to define himself.  His views,
however, *are* open to interpretation.  As it stands, I respect Mr.
Donald's views (and for the most part, I agree with him...on other things
;) ).

The second and last point I would like to make is that quotes to *back up*
an argument are more than helpful, and would save much bandwidth.  If Mr.
Donald would like to continue his part in this thread, either publicly or
privately, I am more than willing to discuss Chomsky (or anything for that
matter), as long as I have something tangible to discuss.  The same applies
to anyone else who wishes to discuss Chomsky....

Like many of us, I get over 500 pieces of email a day--and I try to read
every bit of it; I think one piece of footnoted or otherwise appended email
is worth 20 pieces of the Hitler-calling type.

Mi taku oyasin...

 _/_/_/  _/_/_/   _/  _/  _/_/_/      _/      _/  It's dangerous to be right
_/       _/  _/   _/  _/  _/         _/_/     _/  when the government is
_/_/_/   _/  _/   _/  _/  _/_/_/    _/  _/    _/  wrong.
     _/  _/  _/   _/  _/  _/       _/_/_/_/   _/
_/_/_/   _/_/_/   _/_/_/  _/_/_/  _/      _/  _/_/_/              --Voltaire
              _/

{% endraw %}
```

## Thread

+ Return to [October 1994](/archive/1994/10)

+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_cass156_ucsd_edu_anonymous_)"

+ 1994-10-06 (Thu, 6 Oct 94 08:59:18 PDT) - Re: He's dead Jim (Chomsky) -<EMAIL_ADDRESS>(Anonymous)_


text:
# grunt-clean

Removes previously generated files and directories.

## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-clean`

Then add this line to your project's `grunt.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-clean');
```

[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md

## Documentation
Configure which files and directories to delete in your `initConfig`:

```javascript
grunt.initConfig({
  // ... other configs

  clean: {
    folder: "assets/js/",
    folderTwo: ["assetsOne/js/", "assetsTwo/js/"]
  }

  // ... other configs
});
```

There's no need to specify `assets/js/**/*` since the task will automatically recursively delete whatever is in that path.

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][grunt].

## Release History
* 1/25/13 - v0.4.0 - Adding object of arrays and strings support, as well as grunt templating.
*
* 4/25/12 - v0.1.0 - Initial release.

## License
Copyright (c) 2012 Max Beatty
Licensed under the MIT license.

repository: omryn/alias

repo_name: omryn/alias


text:
#daily [![Build Status](https://secure.travis-ci.org/AndreasMadsen/daily.png)](http://travis-ci.org/AndreasMadsen/daily)

> daily - A LevelDB based logging system

## Installation

```sheel
npm install daily
```

## Example

**1. start a server**

Start a server, with default settings
(port: 10200, address: <IP_ADDRESS>, location: ./daily.db)

```
$ daily server
```

**2. create a client and log**

```javascript
var daily = require('daily');

// Open a connection to the daily server
var client = new daily.Client();

// By default the log-levels range from 1 to 5, where log level 1 will live
// the longest so this should be used for the most critical errors.
client.log(4, { userId: 105, action: 'user changed email' });

// Close the connection
client.close();
```

**3. read the logs**

Read logs over the last one hour (3600 seconds), you can read more with `--past seconds`.

```
$ daily read
```

## Documentation

### CLI tool

```
daily command [options]

 help    prints this message

 read    connects to server and read some log entries          : defaults
         -s --start timestamp   read starts at this time       : 0
         -e --end timestamp     read stops at this time        : now
         -l --levels start,end  range of log levels to read    : 1,9
         -p --past seconds      special case, read some        : 3600
                                seconds intro the past When no
                                options is set, -b is used.
         -c --colors            colors will always be used     : true
         -a --address ip:port   client will connect to         : <IP_ADDRESS>:10200

 server  start a daily server                                  : defaults
         -d --database path     filepath to the log database   : ./daily.db
         -a --address ip:port   server will listen to          : <IP_ADDRESS>:10200

read examples
  daily read --start 0          read all messages in the database
  daily read -c | less -R       make search and walkable in color
  daily read --levels 1,1       read only level 1 logs

server examples
  daily server -a <IP_ADDRESS>:0     start server on a random port
```

### Default port

By default the port that daily use is `10200` you can always specify it by
an argument or option but you can also set it using the `DAILY_PORT` environment.

```shell
export DAILY_PORT=5010
```

### client = new Client([port=10200], [address='<IP_ADDRESS>'], [callback])

Creates a client instance, the `new` keyword can be opmitted.

```javascript
var daily = require('daily');
var client = new daily.Client();
```

The client connects to the daily server on the given `port` and `address` using
one TCP socket or more. When the first connection is made the `connect` event
will emit and the `callback` will be called.

Please note that you don't need to to wait for the `connect` event, in order to
log or start a reader. The request will simply be delayed.

#### client.log(level, subject, [ when=Date.now() ], [ callback ])

Logs a object with `JSON.stringify(subject)` along with the log-level. By default
the log-level range from 1 to 5 where 1 is the most citical log.

Here is a simple example, when no `callback` any error will be emitted as an
`error` event on the `client` object. You can also specific the time of the
log manually, but its strongly recommended that you don't do that, as it will
likely be confusing later.

```javascript
client.log(4, { userId: 105, action: 'user changed email' });
```

#### client.reader([ start=null ], [ end=null ], [ levels=[1,9] ])

Read logs from `start` to `end`. Both `start` and `end` should be a timestamp
in milliseconds (like `Date.now()`). However they can also be `null`, this means
that will be no limit in the related direction.

* if `start` is `null` then logs from the begining of time will be send
* if `end` is `null` then logs to end of time will be send

The `levels` is an array of two values, there specifies range of levels there
will be send. Meaning only items there matches `levels[0] <= level <= levels[1]`
will be send from the daily server.

```javascript
var inspectpoint = require('inspectpoint');

// Read logs from the past hour there was logged with level 1, 2, 3 or 4
var reader = client.reader(Date.now() - 3600 * 1000, [1,4])
  .pipe(inspectpoint({ colors: true })) // runs util.inspect on each data object
  .pipe(process.stdout);
```

Please note that the `reader` object can emit an `error` event and supports the
`close` event.

#### client.close([callback])

This will close the client. Under the hood this means both the TCP socket there
logs data and the TCP sockets there reads data will be closed. However as
writeing logs is quite important the TCP socket there logs won't be closed
before all the logs are done. However it will prevent future `client.log()`
calles by throwing.

In effect this means that you can call `client.close()` right after `client.log()`
without worrying.

```javascript
client.close(function () {
  console.log('Client is closed, no more data can be writen or read');
});
```

#### client.on('connect')

The client as made a connection.

#### client.on('reconnect')

When the client breaks the connection and makes a successful reconnection
this event is emitted.

#### client.on('close')

The client is completly closed.

#### client.on('error')

An error occurred, this can either be related to a TCP connection or a
`client.log()` call there did not have a `callback`.

### server = new Server(where, [options])

Creates a new server instance, the `new` keyword can be opmitted.

```javascript
var path = require('path');
var daily = require('daily');

var server = daily.Server(path.resolve(__dirname, '../log.db'));
```

#### server.listen([port=10200], [address='<IP_ADDRESS>'], [callback])

Attach the server to a given port and address when the server is ready, the
`listening` event will be emitted and the `callback` called. If you want a
random port, use `0` as port argument.

```javascript
server.listen(0, '<IP_ADDRESS>', function () {
  var addr = server.address();
  console.log('daily server ready on ' + addr.address + ':' + addr.port);
});
```

#### server.address()

Returns the standard TCP address object for the underlying server. For default
settings the result will be:

```javascript
{
  'address', '<IP_ADDRESS>',
  'family', 'IPv4',
  'port': 10200
}
```

#### server.close([callback])

Close the server and all the connections currently active.

This is an example on a very simple error handling.

```javascript
server.once('error', function () {
  // Do a nice shutdown
  server.close(function () {
    process.exit(1);
  });

  // Give `server.close()` 2 sec to close otherwise its possible something is
  // very wrong and forceing a shutdown is the remaining option.
  setTimeout(function () {
    process.exit(1);
  }, 2000);
});
```

#### server.on('connection')

This is purely for debugging purposes, you should never need to handle the
TCP sockets your self. The server will do that internally.

#### server.on('listening')

Emits when the server is listening, to know on what port and address use
`server.address()`.

#### server.on('close')

Emits when the server is closed.

#### server.on('error')

Emits when an error ocure, normally the server won't close because of this. But
it is recomended that you call `server.close()`.

## Low-level modules

Behind this module is a couple of low-level modules that you might need if you
which create you own daily module.

* [daily-interface](https://github.com/AndreasMadsen/daily-interface) - The transport independent interface
* [daily-protocol](https://github.com/AndreasMadsen/daily-protocol) - The protocol encoder and decoder for network communcation
* [daily-storage](https://github.com/AndreasMadsen/daily-storage) - The LevelDB storage abstaction

##License

**The software is license under "MIT"**

> Copyright (c) 2013 Andreas Madsen
>
> 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.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.

repository: AndreasMadsen/daily

repo_name: AndreasMadsen/daily


text:
# Cutting a Deno release

**During this process `main` branch (or any other branch that you're creating
release from) should be frozen and no commits should land until the release is
cut.**

## Updating `deno_std`

1. Open a PR on the `deno_std` repo that bumps the version in `version.ts` and
   updates `Releases.md`

2. Before merging the PR, make sure that all tests pass when run using binary
   produced from bumping crates (point 3. from below).

3. Create a tag with the version number (_without_ `v` prefix).

## Updating the main repo

1. Create a PR that bumps versions of all crates in `extensions` and `runtime`
   directories.

To determine if you should bump a crate a minor version instead of a patch
version, check if you can answer any of the following questions with yes:

- Did any of the crates direct dependencies have a semver breaking change? For
  example did we update swc_ecmascript from 0.56.0 to 0.57.0, or did we update
  rusty_v8?
- Did the external interface of the crate change (ops or changes to
  `window.__bootstrap` in JS code)?

When in doubt always do a minor bump instead of a patch. In essentially every
release all crates will need a minor bump. Patch bumps are the exception, not
the norm.

2. Make sure CI pipeline passes.

3. Publish all bumped crates to `crates.io`

**Make sure that `cargo` is logged on with a user that has permissions to
publish those crates.**

This is done by running `cargo publish` in each crate, because of dependencies
between the crates, it must be done in specific order:

- `deno_core` - all crates depend on `deno_core` so it must always be published
  first
- `bench_util`
- crates in `extensions/` directory
  - `deno_net`, `deno_websocket` and `deno_fetch` depend on `deno_tls`, so the
    latter must be bumped and released first
  - `deno_fetch`, `deno_crypto`, `deno_timers` and `deno_webstorage` depend on
    `deno_web`, so the latter must be bumped and released first
  - `deno_url` depends on `deno_webidl`, so the latter must be bumped and
    released first
  - `deno_timers` depends on `deno_url`, so the latter must be bumped and
    released first
  - `deno_http` depends on `deno_websocket`, so the latter must be bumped and
    released first
- `runtime` - this crate depends on `deno_core` and all crates in `extensions/`
  directory

If there are any problems when you publish, that require you to change the code,
then after applying the fixes they should be commited and pushed to the PR.

4. Once all crates are published merge the PR.

5. Create a PR that bumps `cli` crate version and updates `Releases.md`.

6. Make sure CI pipeline passes.

7. Publish `cli` crate to `crates.io`

8. Merge the PR.

9. Create a tag with the version number (with `v` prefix).

10. Wait for CI pipeline on the created tag branch to pass.

The CI pipeline will create a release draft on GitHub
(https://github.com/denoland/deno/releases).

11. Upload Apple M1 build to the release draft & to dl.deno.land.

12. Publish the release on Github

13. Update the Deno version on the website by updating
    https://github.com/denoland/deno_website2/blob/main/versions.json.

14. Push a new tag to [`manual`](https://github.com/denoland/manual). The tag
    must match the tag from point 9; you don't need to create dedicated commit
    for that purpose, it's enough to tag the latest commit in that repo.

## Updating `deno_docker`

1. Open a PR on the `deno_docker` repo that bumps the Deno version in all
   Dockerfiles, the README and the example Dockerfile
2. Create a tag with the version number (_without_ `v` prefix).

repository: cknight/deno

repo_name: cknight/deno


text:
# Welcome to Kiwi!

We're building a BDD library that is exquisitely simple to setup and use,
and we'd love your help!

## Reporting Bugs

Kiwi currently uses two channels for reporting bugs:

 1. If Kiwi isn't working as you'd expect it to, but you're not sure whether
    you're using it correctly, please send a message to the
    [Kiwi Google group](https://groups.google.com/forum/#!forum/kiwi-bdd).

    Once your issue has been resolved, please consider contributing to the
    [Wiki](https://github.com/allending/Kiwi/wiki) to help people
    who might experience similar issues in the future.

 2. If you're sure that you're using Kiwi correctly, but Kiwi still does not
    behave as you'd expect it to, you may have found a bug. If no one
    has [already reported the issue](https://github.com/allending/Kiwi/issues?state=open),
    please [submit a new issue](https://github.com/allending/Kiwi/issues/new),
    and include any and all information maintainers might need to fix the problem.
    It's not easy to fix bugs, but detailed reports help!

## Pull Requests

Our work flow is a typical GitHub flow, where contributors fork the
[Kiwi repository](https://github.com/allending/Kiwi), make their changes on branch,
and submit a pull request.

Please include a description of your changes with your pull request.
All pull requests that involve changes to the source code should include
tests that prove the changes behave as stated in the pull request message.

repository: cchicken/Kiwi

repo_name: cchicken/Kiwi


text:
progrid.io
===
_Live multiplayer grid clicking game._

[![Build Status](https://travis-ci.org/pro-grid/pro-grid.png?branch=master)](https://travis-ci.org/pro-grid/pro-grid)
[![Code Climate](https://codeclimate.com/github/pro-grid/pro-grid.png)](https://codeclimate.com/github/pro-grid/pro-grid)
[![Coverage Status](https://coveralls.io/repos/pro-grid/pro-grid/badge.png)](https://coveralls.io/r/pro-grid/pro-grid)

[Google+](https://plus.google.com/+ProgridIoofficial)
[Facebook](https://www.facebook.com/ProGrid)
[Twitter](https://twitter.com/Pro_Grid)

![ProGrid](http://cdn.progrid.io/progrid-logo-360.png)

Goal
---
Our goal is to create an application which explores the interaction between users.
The experiment is run with two blind variables:
 1.
 2. You do not know how many other people there are (if sample sizes are large enough).

Method
---
This will be accomplished by creating a screen filled with MxM squares and starting with a blank webpage.
Through updating the color in each square using websockets and node.js we wish to save the file as an ongoing project. Each user will be assigned a random color on entry, and this can be changed upon refresh. This enables you to realize who is messing with your stuff and possibly create "color bias" through the application. Clicking on an already colored square will remove anyones color to white, this would be the invisible method of interaction "anonymous cleansing" where it could be anyone.
Eventually screenshots will be taken every minute for a whole month, then .gif or .mp4's can be produced with video images over an entire month. This will create interactive videos and can be coupled with statistics such as how many concurrent users over a period exist, which colors were the most popular, etc.

Audience
---
We wish to target a mainstream audience that desires mindless clicking and time-wasting. You may love to make pixel art, you may love to click every damn square. Do what you want. We want your love. Interaction drives this application known as "pro-grid".

Possible Adaptations
---
 - _Invert Command_ - Simply flip the colors of each square with a press of a button (or a hidden hotkey would be sweet)
 - _Randomized Square Real Estate_ - Each user gets z% of the grid and is distributed randomly for control. Refreshing would change the seed but this would promote more random art and less totalitarian trolling
 - _Image buffering_ - Upload a 16x16 image and be able to place it into squares for all to see.
 - _3D Implementation_ - Each cube is represented by a 16x16x16 space and has lighting/rendering effects. Videos can be produced of renders from multiple perspective angles.
 - _N_ - ability to change number of colors and specific colors to mix things up

Building The Project
---
### General Dependencies
This project requires the [Node.js](http://nodejs.org/) runtime as well as [Ruby](https://www.ruby-lang.org/en/). Given those dependencies are met, this project assumes you have [Compass](http://compass-style.org/install/), [Grunt](http://gruntjs.com/), and [Bower](http://bower.io/) installed globally on your computer.
### Mac
To install Compass, Grunt, and Bower you may run:
```bash
gem install compass
npm -g install grunt-cli bower
```
In your project directory run:
```bash
npm install
bower install
```
Now all your dependencies are installed and good to go! It just works™. Now build the project and run the web server.
```bash
grunt build
grunt web
```
Visit [http://localhost:9001](http://localhost:9001) to see your grid.

### Windows
 - Ruby: http://rubyinstaller.org/
 - Git: http://git-scm.com/downloads
 - Node.js: http://nodejs.org/download/
 - Create a folder to contain this (preferably in your GitHub folder)
 - Open a command window in that folder (Shift + Right Click folder)

Fork pro-grid: https://github.com/ridhoq/pro-grid
If you need help understanding visit: https://help.github.com/articles/fork-a-repo

```bash
gem install compass
npm install -g bower
npm install -g grunt-cli
npm install
bower install
grunt build
grunt web
```
Open the app at [http://localhost:9001](http://localhost:9001)

### Linux
Install RVM and Ruby: https://rvm.io/rvm/install
```bash
# Example for Ubuntu 13.10:
\curl -sSL https://get.rvm.io | bash -s stable
# Verify that RVM is a bash function:
# restart your terminal
type rvm | head -n 1
# See https://rvm.io/integration/gnome-terminal if you get
# "RVM is not a function"
rvm install 2.1.0
rvm use 2.1.0
# Verify that Ruby is installed
ruby -v
gem install compass
```
Install Node.js: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
```bash
# Example for Ubuntu 13.10:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
```
Fork pro-grid: https://github.com/pro-grid/pro-grid
If you need help understanding visit: https://help.github.com/articles/fork-a-repo
```bash
git clone git@github.com:[your_github_username]/pro-grid.git
git remote add upstream git@github.com:pro-grid/pro-grid.git
git fetch upstream
```
Install Grunt and Bower:
```bash
sudo npm install -g grunt-cli
sudo npm install -g bower
sudo npm install
bower install
```
Build the project and run the web server
```bash
grunt build
grunt web
```
Visit http://localhost:9001/

Team
---

Person | Role
--- | ---
Austin Pray | Lead Javascript Snob
Darren Cattle | Web Development God
Ridwan Hoq | Repo Mule
You | Open Sauce Software Contributer
Kyle Flottman | #socialmedia


text:
Python Mediawiki API
====================

A very simple and direct wrapper around the Mediawiki API

Introduction
------------

This library provides a very simple convenience wrapper around the `Mediawiki API <http://www.mediawiki.org/wiki/API>`_. It is meant to closely mirror the interface provided by `mw.Api <http://www.mediawiki.org/wiki/ResourceLoader/Default_modules#mediaWiki.Api>`_

Features
--------

The library allows you to call Mediawiki APIs without having to deal without dealing with network calls. It also has authentication support and a few convenience methods.

Non Features
------------

This is the anti-`mwclient <http://sourceforge.net/projects/mwclient/>`_. It does not add another layer for you to understand over the well `documented <http://en.wikipedia.org/w/api.php>`_ Mediawiki API, and it never will :)

Documentation
-------------
    MWApi

    class MWApi
     |  Class representing a single API Session, with a single authenticated user.
     |
     |  Useful Attributes:
     |  tokens              - Contains an edittoken & watchtoken (if populateTokens() has been called)
     |  is_authenticated    - Boolean indicating if the MWApi is sending authenticated requests
     |
     |  Methods defined here:
     |
     |  __init__(self, host, api_path='/w/api.php')
     |      Create a MWApi instance
     |
     |      Arguments:
     |      host        - Host to which to connect to. Must include http:// or https:// and no trailing slash
     |      api_path    - Url to api.php on the host. Must start with /
     |
     |  get(self, **params)
     |      Makes an API request with the GET method
     |
     |      Arguments:
     |      params - Parameters to send to the API. Varies depending on the action to be performed.
     |
     |  login(self, username, password)
     |      Authenticates with the given credentials and logs in the user for the session.
     |      All further requests sent from this MWApi object will be signed as said user.
     |
     |      Arguments:
     |      username - The username of the user to be authenticated
     |      password - The password of the user to be authenticated
     |
     |      Throws:
     |      Throws an exception with (Message, Response) if Authentication fails
     |
     |      Note:
     |      Passwords are sent as plaintext. This is a limitation of the Mediawiki API.
     |      Use a https host if you want your password to be secure
     |
     |  populateTokens(self)
     |      Populates the `tokens` attribute of the object with `edittoken` and `watchtoken`.
     |      Requires that authentication has been performed already with `login()`
     |
     |  post(self, **params)
     |      Makes an API request with the POST method
     |
     |      Arguments:
     |      params - Parameters to send to the API. Varies depending on the action to be performed.
     |
     |  _request(self, method, params)
     |      Makes a request to the API and returns a dictionary containing the results
     |
     |      Arguments:
     |      method - GET or POST, depending on which API is being called
     |      params - Parameters to send to the API. Varies depending on the action to be performed.
     |

Contact
-------

Support requests and flames can be sent to me via several means.

Email<EMAIL_ADDRESS>Twitter: @yuvipanda. IRC: yuvipanda on FreeNode

You can file bugs `on Github <https://github.com/yuvipanda/python-mwapi/issues>`_.

repository: halfak/python-mwapi

repo_name: halfak/python-mwapi