text:
# Project: Quiz Game

## Description

This is a small multiple choice quiz game. The user will be presented with a welcome screen and instructions on how to play the game. User clicks the start button to begin the game, a countdown timer is initialized and displayed on screen. User is presented with a series of questions with 4 multiple choice options. User will select/click an answer choice and the next question and answer set will be presented. When all questions have been answered, or the timer has run out, user score is calculated and user can enter their name and be added to the list of persisted scores.

User will be shown leader board modal with the option
at game end or by clicking on the 'Highscores' link in the navbar. Use will have ability to close leader board modal and clearing currently saved users and scores.

- Visit the project page:
  https://ehoversten.github.io/quiz_game/

## Technologies:

* HTML 5
* CSS 3
* CSS Animations
* JavaScript

## Usage:

![Game Start Image](./assets/img/game_start.png)

![Question Image](./assets/img/question.png)

![User Form Image](./assets/img/user_form.png)

![Game Leaderboard Image](./assets/img/leaderboard.png)

## Instructions

To try out the quiz game simple follow the link: https://ehoversten.github.io/quiz_game/

Want to upload your own question set?

* Create a new question file (in the project directory "./assets/js")
```javascript
touch question_set.js
```

* Create your own JavaScript Question Object Array by follow the object structure below.

Example structure of Question Set Object Array
```javascript
var questions = [
    {
        title: "Question #1 Title",
        choices: ["choice_1", "choice_2", "choice_3", "choice_4"],
        answer: "choice_1"
    },
    {
        title: "Question #2 Title",
        choices: ["choice_1", "choice_2", "choice_3", "choice_4"],
        answer: "choice_3"
    },
    ///etc.
];
```

* Update the file path to your new question_set file in the HTML code (index.html)

```html
<script src="./assets/js/<FILE_NAME>.js"></script>
```

## Maintainer

- Erik Hoversten

## License:

Licensed under the MIT license.


text:
# Changelog
All notable changes to this project will be documented in this file.

# 2019-02-26
- Let user set buffer size
- Updates to ilmn2hail plugin
- Update to htslib 1.9
- Support Dragen-style gVCF format
- Various small bug fixes

# 2018-10-15
- Hail integration (https://github.com/hail-is/hail): we provide ilmn2hail, a bcftools plugin to convert gvcfgenotyper output into Hail-compatible VCF.
- Jupyter notebook illustrating a basic exploratory analysis of gvcfgenotyper output in Hail
- Warn if the user tries to merge more gvcf files than open file handles available
- Various updates to FAQ and documentation

# 2018-07-01
- Bugfix release: fixed a null pointer, past-end-of-array writing, INFO/GC for multi-allelic sites, rounding of Phred scores

# 2018-05-03
- Computing INFO/DP_MEDIAN, INFO/DP_HIST_ALL and INFO/HOM which are similar to their counterparts in the gnomAD vcf
- Small updates to documentation and FAQ

# 2018-04-03
- updated to htslib-1.7
- more rigorous error checking of input GVCFs

## [Unreleased] - 2018-03-13
- removed deprecated `CMakeLists.txt`
- removed curl dependency

# 2018-03-02
- added Fisher's exact test for strand bias (INFO/FS)
- added INFO/GQ_MEDIAN and INFO/GQX_MEDIAN to output
- updated to htslib-1.7
- improved some error messages when non-GVCFs are provided as input

# 2018-02-07
- first public release

## [Unreleased] - 2017-12-20
- replaced CMake with good old Make

## [Unreleased] - 2017-11-01
- updated to htslib-1.6
- first version that produces multi-allelic output

## [Unreleased] - 2017-10-27
- heavily modified mnp_split function such that it will correctly handle (all?) multi-allelic MNPs
- introduced the Genotype class which stores and manipulates our canonical FORMAT fields (currently GQ,DP,DPF,AD,PL)
- buffers now store a fixed number of base pairs, not  number of variants
- added -r argument to set regions
- substantial performance improvements via better buffer memory management
- added handling of hemizygous genotypes
- fixed a bug that caused the buffers to become out of sync across chromosomes
- fixed a small memory leak in GVCFReader closing its bcf_sr_reader
- removed unneccessary vt code

## [0.0.0] - 2017-09-12
- first working release

repository: pythseq/gvcfgenotyper

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: pythseq/gvcfgenotyper


text:
# Simple Calculator
##### Created: 24th of April 2018

__Description:__

A simple calculator. User is allowed to add, subtract and divide numbers to the value of
999999999. Clearing display showing 0 on start is also possible. When te user reaches highest displayed
 number an info is exposed.

__Data structure:__

* App.js - main application file. Due to limited application structure no other files are needed.
* App.test.js - main testing file.

__CSS:__

Used outer `App.css` file to stylize the App.

__Author:__

[Radosław Rocławski](https://github.com/RadekRo)

__License:__

Copyright © 2018 by Radosław Rocławski.

This application is created under the MIT Licence.

license: MIT

repository: RadekRo/simple-calculator-react-app

gha_language: JavaScript

repo_name: RadekRo/simple-calculator-react-app


text:
# vlan-fabric
A "vlan-fabric" is a collection of L2 network devices that will share common VLAN configurations.  The `vlan-fabric` service for Sandbox describes the devices that make up the fabric, and how they are connected together.  Then NSO will ensure that the devices are configured as required.  Here is an example of a fabric configuration.

```
vlan-fabric dmz02
 switch-pair dmz-sw02
  layer3 true
  primary   dmz-sw02-1
  secondary dmz-sw02-2
  !
  vpc-peerlink id 1
  vpc-peerlink interface 1/1
  vpc-peerlink interface 1/2
  !
  fabric-trunk 2
   interface 1/11
 !
 switch nfv-sw01
  fabric-trunk 2
   interface 0/1
```

In a fabric a `switch-pair` represents a pair of Cisco NX-OS devices that will be configured in a VPC relationship.  You simply need to specify which device is primary and secondary, and the ports that make up the peerlink.

A `switch-pair` can be configured with `layer3 true` (the default is `layer3 false`).  This indicates that within this fabric, this pair of devices would be configured with SVIs for networks, including HSRP and OSPF for routing.

A `switch` would be an independent switch, or either IOS or NX-OS model.

For both `switch-pairs` and `switches`, the `fabric-trunks` identify interswitch links that connect to other devices in the fabric.  The service will setup LACP port-channels made up of the identified interfaces, and configure them to be dot1q trunks.

A `vlan-fabric` can also include Cisco UCS and VMware networks.  You'd add them to a fabric like this.

```
vlan-fabric dmz02
 fabric-interconnect ucsfi01
  vnic-template-trunks org sandbox vnic-template esxi-vnic

 vmware-dvs vcenter myvcenter datacenter sandbox dvs mydvs
```

In this case, the service will configure VLANs within UCS and then add them to the specified `vnic-templates`.  It will also create new VMware port-groups on the `dvs` specified.

For a more complete example of `vlan-fabric` configurations, you can look at [sample-vlan-fabrics.cfg](samples/sample-vlan-fabrics.cfg) or [sample-vlan-fabrics.xml](samples/sample-vlan-fabrics.xml)

# vlan-tenant
A `vlan-fabric` is simply a defintion of the network devices that make up a part of the network, but to create vlans and networks on the fabric a `vlan-tenant` is used.

The `vlan-tenant` describes a set of `networks` (or VLANs) that make up a single layer-3 environment.  Here is an exmaple of a `vlan-tenant` configuration.

```
vlan-tenant admin
 fabric internal
 static-routes <IP_ADDRESS>/0
  gateway <IP_ADDRESS>
 !
 network admin-main
  vlanid  11
  network <IP_ADDRESS>/23
  connections switch admin-vsw
   interface 0/3
    mode access
 !
 network admin-small
  vlanid  12
  network <IP_ADDRESS>/24
```

Notice how the `vlan-tenant` exists on a `fabric` - this is the linkage that determines which switches and other devices these networks will be created on.

A VRF will be configured for the  `vlan-tenant` (if at least one network is configured for `layer3-on-fabric true`).  You can add static routes to the VRF as part of the tenant configuration.

You can add as many `network` objects to the tenant as you desire.  Each `network` will need a `vlanid` and `network` (or prefix) specified.  The service will then create this VLAN on all devices in the fabric.

If there are any physical network connections into a network needed, you can specify them with `connections`.

For a more complete example of `vlan-tenant` configurations, you can look at [sample-vlan-tenants.cfg](samples/sample-vlan-tenants.cfg) or [sample-vlan-tenants.xml](samples/sample-vlan-tenants.xml)

repository: rrojasc/sandbox-nso

repo_name: rrojasc/sandbox-nso


text:
# akan-name-evaluator
This app can show your destined "akan"  name using only your date of birth.

Akan name generator
#### This application turns your date of birth into a beautiful akan name,4/152019
#### By Mohamed Hashi
## Description
This shows you a beaufiful interface in which it is easy to turn your name in to a akan name it also has a calm colour green which is easier on the eyes * This is a great place
* go to google chrome
* paste in this url "https://crash340.github.io/akan-name-avaluator"
* and voila ,Welcome to my project
make sure you only press one button when selecting the gender
## bugs
press enter twice  after picking and clicking your gender to get the destined akan name
## Technologies Used
I used html and css and javascript to construct the whole project
## Support and contact details
My Email is<EMAIL_ADDRESS>if you run in to any issues
## License
I used the mit licence which is open source


text:
---
layout: post
title: DevOps Manchester—Auto Trader… From Continuous Integration to Continuous Delivery
image: autotrader.png
comments: true
categories:
- devops
- manchester
- devopsmanchester
- continuous-delivery
- continuous-integration
- autotrader
---
I presented about Continuous Delivery activities at Auto Trader at last night’s [DevOps Manchester](http://www.devopsmanchester.co.uk/post/98877426391/devops-manchester-tues-21st-oct-2014) meet up on Tuesday 22nd October at Auto Trader’s new First St offices in Manchester, alongside Jim Davies who talked about Moneysupermarket’s copy/paste datacenter. Here are the slides.

<script async class="speakerdeck-embed" data-id="518b7d103c1901324b660ed537686a9d" data-ratio="1.77777777777778" src="//speakerdeck.com/assets/embed.js"></script>

Topics covered:

* Background
* This time last year
* Continuous Delivery
* Deployment
* Monitoring
* Self Contained Applications
* RPM Builders
* Yum Repo Indexing
* The Future

Links:

* [ShellCheck](http://www.shellcheck.net/)
* [Bash Unofficial Strict Mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/)
* [Scaling Spotify](https://dl.dropboxusercontent.com/u/1018963/Articles/SpotifyScaling.pdf)
* [Redline RPM](https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCMQFjAA&url=http%3A%2F%2Fredline-rpm.org%2F&ei=e2xHVLfVEoit7gbziIGIBQ&usg=AFQjCNFOMvKhRtsNrAmGIkedyj90qj1J7Q&sig2=S6pGHIgayoLMp027l9xJVg)

gha_language: CSS

gha_license_id: MIT


text:
# stub

This program generates function stubs for Java classes.

## Usage

The program takes in `javap` style function signatures via stdin and prints
corresponding stubs to stdout, e.g.

```console
$ javap Order
Compiled from "Order.java"
public class Order {
  static final boolean $assertionsDisabled;
  public Order(java.lang.String, boolean, double, double, Trader, java.lang.String);
  public java.lang.String getProduct();
  public boolean isBuy();
  public double getAmount();
  public Trader getTrader();
  public void close();
  public boolean isClosed();
  public double getPrice();
  public java.lang.String getID();
  public void adjustAmount(double);
  public java.lang.String toString();
  static {};
}

$ javap Order | stub > Order.stubs.java
```

## Why

I have to learn Java for University, and my lecturer likes to provide us with
some compiled JavaDoc HTML files as documentation for our assignments.

I've gotten into the habit of stubbing out all of the functions in a given
class and writing up some brief test cases before actually implementing
anything. The stubs are very simple

```java
public String someFunction(String someParam, int anotherParam) {
    assert false : "TODO: Implement someFunction";
    return null;
}
```

but copy-pasting this skeleton and changing the assertion message, and the
return value 20+ times gets very repetitive and I end up making mistakes.

repository: dylan-lom/stub

branch_name: refs/heads/main

repo_name: dylan-lom/stub


text:
I miss the old "create event" in Google Calendar, so I wanted to make something like that, and ultimately plug it in to Alfred (which is why it's written in Python 2.7, because [alfred-workflow](https://github.com/deanishe/alfred-workflow) uses system python only).

The parsing is only as good as dateparser can produce (so-so), and my terrible date parsing code too.

# in use

    python gcollinder.py "party 23:41 23rd feb in the place"
    <some gnarly google calendar URL in return"

or with no arguments, it will read one line in. (so you can not worry about quoting and frens)

# installing strange python packages. (I no longer get my eggs from the cheese shop)

I used [pipenv](https://github.com/pypa/pipenv) to do virtualenvs which are apparently a good idea? The follow is what I done did.

```bash
laptop:tmp% git clone https://github.com/barn/python-gcal-creator.git && cd python-gcal-creator
Cloning into 'python-gcal-creator'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 15 (delta 4), reused 10 (delta 2), pack-reused 0
Unpacking objects: 100% (15/15), 17.18 KiB | 733.00 KiB/s, done.

laptop:python-gcal-creator% pipenv install
Installing dependencies from Pipfile.lock (70c7ae)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:03
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

laptop:python-gcal-creator% pipenv shell
Launching subshell in virtual environment…
 . /Users/bea/.virtualenvs/python-gcal-creator-1-ryXFoa/bin/activate

laptop:python-gcal-creator%  . /Users/bea/.virtualenvs/python-gcal-creator-1-ryXFoa/bin/activate

laptop:python-gcal-creator% python gcollinder.py 'party at 11am tomorrow'
https://calendar.google.com/calendar/render?action=TEMPLATE&text=party+&dates=20200226T211517%2F20200226T214517&location=&trp=True
```

repository: barn/python-gcal-creator

repo_name: barn/python-gcal-creator


text:
# JLBoost.jl

This is a 100%-Julia implementation of Gradient Boosting Regresssion Trees (GBRT) based heavily on the algorithms published in the XGBoost, LightGBM and Catboost papers. GBRT is also referred to as Gradient Boosting Decision Tree (GBDT).

## Limitations for now
* Currently, `Union{T, Missing}` feature type is not supported, but are *planned*.
* Currently, only the single-valued models are supported. Multivariate-target models support are *planned*.
* Currently, only the numeric and boolean features are supported. Categorical support are *planned*.

## Objectives
* A full-featured & batteries included Gradient Boosting Regression Tree library
* Play nice with the Julia ecosystem e.g. Tables.jl, DataFrames.jl and CategoricalArrays.jl
* 100%-Julia
* Fit models on large data

* Easy to manipulate the tree after fitting; play with tree pruning and adjustments
* "Easy" to deploy

## Quick-start

### Fit model on `DataFrame`

#### Binary Classification
We fit the model by predicting one of the iris Species. To fit a model on a `DataFrame` you need to specify the column and the features default to all columns other than the target.

````julia
using JLBoost, RDatasets
iris = dataset("datasets", "iris")

iris[!, :is_setosa] = iris[!, :Species] .== "setosa"
target = :is_setosa

features = setdiff(names(iris), [:Species, :is_setosa])

# fit one tree
# ?jlboost for more details
xgtreemodel = jlboost(iris, target)
````

````
JLBoostTreeModel(AbstractJLBoostTree[eta = 1.0 (tree weight)

   -- PetalLength <= 1.9
     ---- weight = 2.0

   -- PetalLength > 1.9
     ---- weight = -2.0
], LogitLogLoss(), :is_setosa)
````

The returned model contains a vector of trees and the loss function and target

````julia
typeof(trees(xgtreemodel))
````

````
Array{AbstractJLBoostTree,1}
````

````julia
typeof(xgtreemodel.loss)
````

````
LogitLogLoss
````

````julia
typeof(xgtreemodel.target)
````

````
Symbol
````

You can control parameters like  `max_depth` and `nrounds`
````julia
xgtreemodel2 = jlboost(iris, target; nrounds = 2, max_depth = 2)
````

````
JLBoostTreeModel(AbstractJLBoostTree[eta = 1.0 (tree weight)

   -- PetalLength <= 1.9
     ---- weight = 2.0

   -- PetalLength > 1.9
     ---- weight = -2.0
, eta = 1.0 (tree weight)

   -- PetalLength <= 1.9
     -- SepalLength <= 4.8
       ---- weight = 1.1353352832366135

     -- SepalLength > 4.8
       ---- weight = 1.1353352832366155

   -- PetalLength > 1.9
     -- SepalLength <= 7.9
       ---- weight = -1.1353352832366106

     -- SepalLength > 7.9
       ---- weight = -1.1353352832366106
], LogitLogLoss(), :is_setosa)
````

Convenience `predict` function is provided. It can be used to score a tree or a vector of trees
````julia
iris.pred1 = predict(xgtreemodel, iris)
iris.pred2 = predict(xgtreemodel2, iris)
iris.pred1_plus_2 = predict(vcat(xgtreemodel, xgtreemodel2), iris)
````

````
150-element Array{Float64,1}:
  5.135335283236616
  5.135335283236616
  5.135335283236613
  5.135335283236613
  5.135335283236616
  5.135335283236616
  5.135335283236613
  5.135335283236616
  5.135335283236613
  5.135335283236616
  ⋮
 -5.135335283236611
 -5.135335283236611
 -5.135335283236611
 -5.135335283236611
 -5.135335283236611
 -5.135335283236611
 -5.135335283236611
 -5.135335283236611
 -5.135335283236611
````

There are also convenience functions for computing the AUC and gini
````julia
AUC(-iris.pred1, iris.is_setosa)
````

````
0.6666666666666667
````

````julia
gini(-iris.pred1, iris.is_setosa)
````

````
0.3333333333333335
````

As a convenience feature, you can adjust the `eta` weight of each tree by multiplying it by a factor e.g.

```Julia
new_tree = 0.3 * trees(xgtreemodel)[1] # weight the first tree by 30%
unique(predict(new_tree, iris) ./ predict(trees(xgtreemodel)[1], iris)) # 0.3
```

#### MLJ.jl

There is integration with the MLJ.jl modelling framework

````julia
using MLJ, MLJBase, JLBoostmlj
X, y = unpack(iris, x->!(x in [:is_setosa, :Species]), ==(:is_setosa))

model = JLBoostClassifier()
````

````
JLBoostClassifier(loss = LogitLogLoss(),
                  nrounds = 1,
                  subsample = 1.0,
                  eta = 1.0,
                  max_depth = 6,
                  min_child_weight = 1.0,
                  lambda = 0.0,
                  gamma = 0.0,
                  colsample_bytree = 1,) @ 7…50
````

````julia
mljmodel = fit(model, 1, X, y)
````

````
Choosing a split on SepalLength
Choosing a split on SepalWidth
Choosing a split on PetalLength
Choosing a split on PetalWidth
Choosing a split on pred1
Choosing a split on pred2
Choosing a split on pred1_plus_2
(feature = :PetalLength, split_at = 1.9, cutpt = 50, gain =<PHONE_NUMBER>3333
334, lweight = 2.0, rweight = -2.0)
Choosing a split on SepalLength
Choosing a split on SepalWidth
Choosing a split on PetalLength
Choosing a split on PetalWidth
Choosing a split on pred1
Choosing a split on pred2
Choosing a split on pred1_plus_2
Choosing a split on SepalLength
Choosing a split on SepalWidth
Choosing a split on PetalLength
Choosing a split on PetalWidth
Choosing a split on pred1
Choosing a split on pred2
Choosing a split on pred1_plus_2
(fitresult = (treemodel = JLBoostTreeModel(AbstractJLBoostTree[eta = 1.0 (t
ree weight)

   -- PetalLength <= 1.9
     ---- weight = 2.0

   -- PetalLength > 1.9
     ---- weight = -2.0
], LogitLogLoss(), :__y__),
              target_levels = Bool[0, 1],),
 cache = nothing,
 report = (AUC = 0.16666666666666669,
           feature_importance = 1×4 DataFrame
│ Row │ feature     │ Quality_Gain │ Coverage │ Frequency │
│     │ Symbol      │ Float64      │ Float64  │ Float64   │
├─────┼─────────────┼──────────────┼──────────┼───────────┤
│ 1   │ PetalLength │ 1.0          │ 1.0      │ 1.0       │,),)
````

````julia
predict(model, mljmodel.fitresult, X)
````

````
150-element Array{UnivariateFinite{Bool,UInt32,Float64},1}:
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 UnivariateFinite(false=>0.881, true=>0.119)
 ⋮
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
 UnivariateFinite(false=>0.119, true=>0.881)
````

#### Feature Importances
One can obtain the feature importance using the `feature_importance` function

````julia
feature_importance(xgtreemodel, iris)
````

````
1×4 DataFrame
│ Row │ feature     │ Quality_Gain │ Coverage │ Frequency │
│     │ Symbol      │ Float64      │ Float64  │ Float64   │
├─────┼─────────────┼──────────────┼──────────┼───────────┤
│ 1   │ PetalLength │ 1.0          │ 1.0      │ 1.0       │
````

#### Tables.jl integration

Any Tables.jl compatible tabular data structure. So you can use any column accessible table with JLBoost. However, you are advised to define the following methods for `df` as the generic implementation in this package may not be efficient

````julia

nrow(df) # returns the number of rows
ncol(df)
view(df, rows, cols)
````

#### Regression Model
By default `JLBoost.jl` defines it's own `LogitLogLoss` type for  binary classification problems. You may replace the `loss` function-type from the `LossFunctions.jl` `SupervisedLoss` type. E.g for regression models you can choose the leaast squares loss called `L2DistLoss()`

````julia
using DataFrames
using JLBoost
df = DataFrame(x = rand(100) * 100)

df[!, :y] = 2*df.x .+ rand(100)

target = :y
features = [:x]
warm_start = fill(0.0, nrow(df))

using LossFunctions: L2DistLoss
loss = L2DistLoss()
jlboost(df, target, features, warm_start, loss; max_depth=2) # default max_depth = 6
````

````
JLBoostTreeModel(AbstractJLBoostTree[eta = 1.0 (tree weight)

   -- x <= 49.341880371655655
     -- x <= 21.852283847629337
       ---- weight = 22.34869127268281

     -- x > 21.852283847629337
       ---- weight = 71.31545601878567

   -- x > 49.341880371655655
     -- x <= 73.7394674334855
       ---- weight =<PHONE_NUMBER>7280167

     -- x > 73.7394674334855
       ---- weight =<PHONE_NUMBER>952014
], LossFunctions.LPDistLoss{2}(), :y)
````

### Save & Load models
You save the models using the `JLBoost.save` and load it with the `load` function

````julia
JLBoost.save(xgtreemodel, "model.jlb")
````

````
testing save
````

````julia
JLBoost.save(trees(xgtreemodel), "model_tree.jlb")
````

````
testing save
````

````julia
JLBoost.load("model.jlb")
JLBoost.load("model_tree.jlb")
````

````
Tree 1
eta = 1.0 (tree weight)

   -- PetalLength <= 1.9
     ---- weight = 2.0

   -- PetalLength > 1.9
     ---- weight = -2.0
````

### Fit model on `JDF.JDFFile` - enabling larger-than-RAM model fit
Sometimes, you may want to fit a model on a dataset that is too large to fit into RAM. You can convert the dataset to [JDF format](https://github.com/xiaodaigh/JDF.jl) and then use `JDF.JDFFile` functionalities to fit the models. The interface `jlbosst` for `DataFrame` and `JDFFiLe` are the same.

The key advantage of fitting a model using `JDF.JDFFile` is that not all the data need to be loaded into memory. This is because `JDF` can load the columns one at a time. Hence this will enable larger models to be trained on a single computer.

````julia
using JLBoost, RDatasets, JDF
iris = dataset("datasets", "iris")

iris[!, :is_setosa] = iris[!, :Species] .== "setosa"
target = :is_setosa

features = setdiff(names(iris), [:Species, :is_setosa])

savejdf("iris.jdf", iris)
irisdisk = JDFFile("iris.jdf")

# fit using on disk JDF format
xgtree1 = jlboost(irisdisk, target, features)
xgtree2 = jlboost(iris, target, features; nrounds = 2, max_depth = 2)

# predict using on disk JDF format
iris.pred1 = predict(xgtree1, irisdisk)
iris.pred2 = predict(xgtree2, irisdisk)

# AUC
AUC(-predict(xgtree1, irisdisk), irisdisk[!, :is_setosa])

# gini
gini(-predict(xgtree1, irisdisk), irisdisk[!, :is_setosa])

# clean up
rm("iris.jdf", force=true, recursive=true)
````

## Notes

Currently has a CPU implementation of the `xgboost` binary boosting algorithm as described in the original paper. I am trying to implement the algorithms in the original `xgboost` paper. I want to implement the algorithms mentioned in LigthGBM and Catboost and to port them to GPUs.

There is a similar project called [JuML.jl](https://github.com/Statfactory/JuML.jl).


text:
# Basic info and Installation process of WorldAndroidRadio

### About this Project
This is an Open source Universal Radio Project. We added Seventy one Radio channels from six countries. It is our goal to add all available radio channels from all over the world. As it's an Open source Android application, anyone will be able to add their favorite channels on this application.

### Installation Steps
#### 1. Open Published_APK folder
#### 2. Install worldradio.apk file on your android device (you can also use it via an emulator on your pc)

### How to Play
#### 1. Open the Application
#### 2. Select Country from Country list
#### 3. Select Radio Channel from Channel list
#### 4. Enjoy the Radio programmes

gha_language: C#


text:
# QSLFramework

QSLFramework is an open source project for shader-based OpenGL programming,which provides a collection of to functions to load textures,models and so on. The project is hosted on Github.
https://github.com/SilangQuan/QSLFrameWork

##Features
- Support variety of texture formats: BMP, GIF, JPEG, PCX, PNG,  TGA, TIFF etc.
- Support variety of model formats: 3DS, OBJ, MDL, STL, PLY etc.
- Supports cross-platform compilation.
- Open source.

##Dependent libraries
SDL v2.01
assimp v3.0.1270
glew v1.10
SDL_image v2.0

##How to run(Ubuntu)
cd QSLFrameWork
mkdir build
cd build
cmake ..
make
./main

##Samples
![1][1]

![2][2]

![3][3]

  [1]: http://img.blog.csdn.net/20140316152539828
  [2]: http://img.blog.csdn.net/20140316152603453
  [3]: http://img.blog.csdn.net/20140316152636437

repository: sdcarterchen/QSLFrameWork

repo_name: sdcarterchen/QSLFrameWork


text:
---
title: The Report Item is Rendered with an Incorrect Font on the First Render in Azure
description: When viewing a report that is rendered in Azure environment the font is replaced with a default one on the first instance
type: troubleshooting
page_title: The first instance of a report item is with different font than the rest
slug: font-is-incorrect-on-first-render-azure
position:
tags: Azure, Fonts, Report Viewer
ticketid: 1562648
res_type: kb
---

## Environment

			Product
			Progress® Telerik® Reporting

			Project Type
			ASP.NET Core

## Description

When viewing a report that is rendered in Azure environment, the font is replaced on the first instance of that report item/section with the default font for the OS. The rest of the report is rendered with the custom font as expected. The same report renders correctly(including the first instance) locally.

Our reporting engine requires the fonts to either be installed in the hosting environment or to be referenced through the use of the [privateFonts element]({%slug telerikreporting/using-reports-in-applications/export-and-configure/configure-the-report-engine/privatefonts-element%}).

Installing a font on an Azure app service can sometimes be not an easy task so people end up using the `privateFonts` variant.

This turns out to also be tricky because the `wwwroot` folder gets [duplicated in Azure Web apps](https://stackoverflow.com/questions/50747590/azure-web-app-wwwroot-duplicates-on-publish) and if the font is in there, that could mess up the path where the reporting engine looks for to find the font.

## Steps to Reproduce

Host a .NET Core web application project on Azure, then use it to render a report that display text with custom font.

## Solution

>note __Known issue with Azure App Services:__ The required .NET API for handling private fonts is making GDI calls that are blocked in Azure App Services. Our recommendation is to use Cloud Service plan. More details can be found in [Custom Fonts not working on Azure App Service](https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4398).

- Ensure that the fonts are present in the `wwwroot` folder of the project(which is the root folder of the app when it is run in Azure App service)

	````JavaScript
"telerikReporting": {
		"privateFonts": [{
			"fontFamily": "ubuntu",
			"path": "Ubuntu-R.ttf",
		}]
	}
````

- Invoke the `UseStaticFiles` method at the end of the `Configure` method in `Startup.cs`/`Program.cs` to resolve the wwwroot duplicate problem.

	````CSharp
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
	{
		....
		app.UseStaticFiles();
	}
````

## See Also

* [Azure Web App wwwroot duplicates on publish](https://stackoverflow.com/questions/50747590/azure-web-app-wwwroot-duplicates-on-publish)
* [Fonts Requirements]({%slug telerikreporting/designing-reports/rendering-and-paging/fonts-requirements%})
* [privateFonts Element Overview]({%slug telerikreporting/using-reports-in-applications/export-and-configure/configure-the-report-engine/privatefonts-element%})
* [First Few Report Items Have an Incorrect Font]({%slug inconsistent-font-of-the-first-few-report-items%})
* [Custom Fonts not working on Azure App Service](https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4398)
* [Problems When Rendering Teleik Reports in Azure]({%slug azure-reporting-problems%})

repository: telerik/reporting-docs

repo_name: telerik/reporting-docs


text:
# Contribution Guidelines
Getting well enough oriented to contribute to an open source project can be challenging.
- If this is your first time here, we recommend searching [Issues](https://github.com/atlasd-geo/atlasd/issues?q=is%3Aopen+is%3Atoycontribution+) for the toycontribution tag.
- The toycontribution tag marks activities designed to help get you started.
- Once you've completed one, come back here to dive in.

## Issues
Issues can be assigned the labels below. If you make a new repo, please copy these all of these labels except for `toycontribution`; `toycontribution` is reserved for the Atlasd Parent Repo.

#### `no code`
Use to mark an issue that can be potentially be resolved without any code.

#### `documentation`
Use to mark any issue that is related to documentation.

#### `proposal`
Use to propose changes to process or code.

#### `enhancement`
Use to mark proposals that have been agreed are an improvement on process or code.

#### `help wanted`
Use to mark issues that need more people to resolve.

#### `question`
Use to mark general questions.

#### `duplicate`
Use to mark a duplicate before closing.

#### `toycontribution`
Use to mark an activity intended to help first time users get started.

#### `good first issue`
Use to mark an issue that doesn't require significant knowledge of process or code, but which is intended for actual use.

#### `easy`
Use to mark an issue that should be resolved easily.

#### `medium`
Use to mark an issue that should be moderately challenging to resolve.

#### `hard`
Use to mark an issue that should be hard to resolve.

#### `ultra`
Use to mark an issue that would be a big undertaking. Big ideas and requests are suited for the ultra tag.

#### `mega`
Use to mark an issue that would be a massive undertaking. Not only should these be big ideas, but big ideas that require deep knowledge that goes beyond that commonly used in day-to-day development.

#### `bug`
Use to mark a bug in process or code.

## Repository Requirements
We expect every repository in this project to adhere to the following. If you are unclear about any of the below, please review [atlasd-client](https://github.com/atlasd-geo/atlasd-client) as an example repository.

### Utilities
The following utilities must be included with the repository.
1. **CLI to run the application**
2. **CLI to run test suites**
3. **Documentation application**
4. **Dockerfile or other means of containerization**

### Contributing
Each repository must contain its own contributing file. Use a [Contributing.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) as a template if you are unclear where to begin.

### README
The README file for every repository should contain the following:
1. A `Run` section, describing how to run the software.
2. A `Test` section, describing how to run the test suites.
3. A `Docs` section, describing how to run the documentation application.
4. A `Container` section, describing how to run a containerized version of the software.
5. A `Quick Start Activity` describing an activity users should use to get familiar with the project. Instead of writing up the Quick Start Activity in the README, we recommend writing the activity as an Issue with the `toycontribution` tag and then linking to the issue.
6. A link to the `Contributing `file.

## Git Workflow
We encourage [CI](https://www.youtube.com/watch?v=Xl62gQpAl1w) under the following parameters.

### Branches
All repositories in this project should keep branches to a minimum. We encourage the use of only `main` and `dev` branches for main repos. `main` should be used for stable release, `dev` should be used for all else. PRs should be submitted to `dev`. The use of feature branches is encouraged for individual workflows, but utlimately feature branches should not be added to the repositories on GitHub.

### Review of PRs
Contributors in a position to review PRs, should abide by the following rules:
1. **Duty to Respond:** as long as the PR is not completely irrelevant, we urge you to issue a response.
2. **Strict Merging:** *never* merge a pull request that does not pass all tests.
3. **Response by Resolution:** if the solution to a faulty PR is trivial, feel empowered to make the changes yourself. But, do let the contributor know what you changed.

## Recommended Tools and Technologies
When contributing to an existing repository or starting a new one, you will ultimately have to pick the right tool for the job. That said, we recommend selecting from the tools and technologies below. If you do use the below, please adhere to any provided style guides.

Further recommendations may be specified in documentation associated with each of the tools.

### Text Editors
[**VSCode**](https://code.visualstudio.com/)
- Tools and Best Practices: WIP.

### General Purpose Languages
[**TypeScript**](https://www.typescriptlang.org/)
- Use of plain Javascript is discouraged.
- Suggested for use with [React.js](https://reactjs.org/) frontends and [Express.js](https://expressjs.com/) backends.
- [Style Guide](https://github.com/atlasd-geo/atlasd/tree/main/languages/Typescript)
- [With React](https://github.com/atlasd-geo/atlasd/tree/main/languages/Typescript/With%20React)

[**Python**](https://www.python.org/)
- Use for backend development.
- Style Guide: WIP.

[**Haskell**](https://www.haskell.org/)
- Use for backend development, particularly with highly concurrent systems.
- Use to target [WebAssembly](https://webassembly.org/) for high performance frontend components.
- Style Guide: WIP.

[**Rust**](https://www.rust-lang.org/)
- Use for backend development.
- Style Guide: WIP.

[**C++**](https://www.cplusplus.com/)
- Use for backend development.
- Use to target [WebAssembly](https://webassembly.org/) for high performance frontend components.
- Style Guide: WIP.

### Frontend Technologies
[**React/React Native**](https://reactjs.org/)
- Use for most frontend development.
- [TypeScript With React](https://github.com/atlasd-geo/atlasd/tree/main/languages/Typescript/With%20React)

[**Electron**](https://www.electronjs.org/)
- Use with React for any desktop application development.

[**WebAssembly**](https://webassembly.org/)
- Use for experimentation with high-performance features.
- Use with Haskell or C++.

### Backend Technologies
[**Node.js**](https://nodejs.org/en/)
- Use for general purpose backend.

[**Express.js**](https://expressjs.com/)
- Use with Node.js for general purpose backend.

[**Flask**](https://flask.palletsprojects.com/en/2.0.x/)
- Use for general purpose backend.

[**Fast API**](https://fastapi.tiangolo.com/)
- Use for general purpose backend.

[**Yesod**](https://www.yesodweb.com/)
- Use for highly concurrent backends (or if you want functional street cred).

[**Rocket**](https://rocket.rs/)
- Use for general purpose backend.

[**CppCMS**](http://cppcms.com/wikipp/en/page/main)
- Use for high-performance backend.

### Data
[**Fauna**](https://docs.fauna.com/fauna/current/)
- Go to BAAS.
- FQL is great!

[**RabbitMQ**](https://www.rabbitmq.com/)
- Go to message broker.

[**Redis**](https://redis.io/)
- Alternative message broker.

[**MQTT**](https://mqtt.org/)
- IoT message broker.

[**MongoDB**](https://www.mongodb.com/)
- Use whenever a database distinct from the central DB is necessary.

### Auth
[**Auth0**](https://auth0.com/)
- Go to SSO and identity provider.

### Hosting Services
- WIP

repository: atlasd-geo/atlasd

path: /Contribution Guidelines.md

filename: Contribution Guidelines.md

repo_name: atlasd-geo/atlasd


text:
Overview
--------

The code formatting standard in this project is based on the [Oracle/Sun Code Convention](http://www.oracle.com/technetwork/java/codeconventions-150003.pdf) and [Google Java Style](http://google-styleguide.googlecode.com/svn/trunk/javaguide.html).

Guideline
-------

The coding style is consistent with most of the open source projects with the following callout:

1. Naming Conventions
    * Variables are camel case beginning with a lowercase letter, e.g. `fooBar`
    * Constant variables are declared as static final and should be all uppercase ASCII letters delimited by underscore ("_"), e.g. `FOO_BAR`

1. Import statement
    * Do not use 'star' imports, e.g. `import java.io.*`;
    * Import order: `java`, `org`, `com`, `gobblin`.

1. Indentation
    * Two spaces should be used as the unit of indentation;
    * Tabs must expand to spaces and the tab width should be set to two;
    * Line length: lines should not exceed 120 characters;

1. White space
    * Blank lines should be provided to improve readability:
        * Between the local variables in a method and its first statement
        * Between methods
    * Blank spaces should be used in the following circumstances:
        * A keyword followed by a parenthesis should be separated by a space (e.g. `while (true) {`)
        * A binary operators except . should be separated from their operands by spaces (e.g. `a + b`);

1. Comments:
    * Implementation comments: Block comments (`/* ... */`), end-of-line comments (`//...`) can be used to illustrate a particular implementation;
    * Documentation comments (`/** ... */`) should be used to describe Java classes, interfaces, methods;

1. Compound statements are lists of statements enclosed in curly braces and should be formatted according to the following conventions:
    * The enclosed statements should be indented one more level than the enclosing statement
    * The opening brace should be on the same line as the enclosing statement (e.g. the 'if' clause)
    * The closing brace should be on a line by itself indented to match the enclosing statement
    * Braces are used around all statements, even single statements, when they are part of a control structure, such as if-else or for statements. This makes it easier to add statements without accidentally introducing bugs due to forgetting to add braces.

Code Style Template File
-------------------------
* Eclipse
    * Download the [codetyle-eclipse.xml](files/codestyle-eclipse.xml), Import the file through Preferences > Java > Code Style > Formatter
    * Download the [prefs-eclipse.epf](files/prefs-eclipse.epf), Import the file File > Import > General > Preferences
* IntelliJ
    * Download the [codestyle-intellij-gobblin.xml](files/codestyle-intellij-gobblin.xml), Copy the file to the appropriate codestyles directory for your installation. This is typically `~/.INTELLIJ_VERSION/config/codestyles` on Linux (or `$HOME/Library/Preferences/INTELLIJ_VERSION/codestyles` on Mac). The specific INTELLIJ_VERSION identifier will depend on your version; examples are IntelliJIdeal3, IdeaC15 etc.
    * Restart the IDE
    * Go to File > Settings > Code Style > General > Scheme to select the new style (LinkedIn Gobblin Style)

repository: Will-Lo/incubator-gobblin

gha_language: Java

repo_name: Will-Lo/incubator-gobblin


text:
## okta-admin apps deletegroupassignment

Removes a group assignment from an application.

### Synopsis

Removes a group assignment from an application.

```
okta-admin apps deletegroupassignment <appId> <groupId> [flags]
```

### Options

```
  -h, --help   help for deletegroupassignment
```

### SEE ALSO

* [okta-admin apps](okta-admin_apps.md)	 - Provides operations to manage applications and/or assignments to users or groups for your organization.

###### Auto generated by spf13/cobra on 4-Jun-2021

repository: gammastudios/okta-admin

repo_name: gammastudios/okta-admin


text:
---
title: Segmentation of nuclei in histological sections
contact:
  name: Magdalena Matusiak
  email: mmatusia at stanford.edu
keywords: segmentation
---

Automatic segmentation of nuclei is a the key step in digital histology. While the problem has been extensively studied, there is no well-established open-source library/network. A successful project might become an essential element of many scientific workflows.


text:
---
title: Writing tests
next: running-tests.html
prev: defining-tests.html
---

In each test, you can use many test assertions.

`ut_assert(expr)`

:
Check that `expr` evaluates to truth (i.e. anything non-zero).

### Pointers

`ut_assert_null(ptr)`

:   Check that `ptr` is `NULL` pointer.

`ut_assert_not_null(ptr)`

:   Check that `ptr` points somewhere to memory and is not `NULL`.

### Basic values

`ut_assert_equal_int(expected, actual)`

:   Check equality of two integers. The first argument should be the expected
    value. While swapping the arguments makes no difference in whether or not
    the assertion succeeds, the order is important for error message.

`ut_assert_equal_uint(expected, actual)`

:   Check equality of two unsigned integers.

`ut_assert_equal_char(expected, actual)`

:   Check equality of two `char`s.

`ut_assert_equal_string(expected, actual)`

:   Check that both arguments are either `NULL` or contain the same string.
    The character data is compared, not memory addresses.

## Memory management

If your test needs to allocate memory, open a file or anything like that, it
may become difficult to free the resource when the test finishes. To simplify
this, there is a function that gives a pointer to the library to be released
after the test is done, no matter if successfully or not.

`ut_take_memory(ptr, free_function)`

:
Give `ptr` to the library. After the current test finishes, it will be
    freed with the supplied function. The type of `free_function` should be
    `void (*) (void *)`, that is it should accept a single pointer (the one
    given to `ut_take_memory` and should not return anything. Standard `free`
    has this interface.

## Custom assertions

You may find yourself in a situation where you need to write your own
assertion. There is support for doing that.

`ut_assert_func(expr, fmt, ...)`

:   Verify that `expr` evaluates to true. The error message is determined by
    the `fmt` argument, which is a `printf`-like formatting string.

    Please note that is is in fact a macro, that wraps a function and gives it
    current file name and line number to further enhance error message.

If your assertion can not be easily delegated to `ut_assert_func`, you can use
following macros to build your assertion from scratch. Please note that each
assertion should call exactly one of `ut_pass` and `ut_fail`.

`ut_pass()`

:   Marks the assertion as passed. This is again a macro that wraps a function
    and passes it additional arguments.

`ut_fail(int line)`

:   Mark the assertion as failed. This macro also prints a header with
    information about which test this assertion is in as well as file and line
    number. File name is determined by the current test, line number must be
    supplied in an argument.

`ut_message(msg, ...)`

:   This macro is a helper for failed assertions. It enables you to print
    detailed information about why the assertion failed. Since there is an
    empty line after the message, you should only call this once.

### Example

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.C}
struct pair {
    int x;
    char *str;
};

/* Verify that the struct contains the same number
 * as string and as a real integer. */
void my_assert(struct pair *p)
{
    int str_value = atoi(p->str);

    ut_assert_func(p->x == str_value,
        "Struct data is not consistent\n"
        "{ x=%d; str=\"%s\" }",
        p->x, p->str);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

repository: lubomir/libutest

extension: markdown

repo_name: lubomir/libutest


text:
# Cake.GitPackager
Cake AddIn which copies files based on Git log.

## Example usage
```cs
#addin Cake.GitPackager

GitPackager(
    "C:\project\sample",
    new Dictionary<string, string>()
        {
            { @"src\Views\", @"C:\project\sample\Views\" }
        },
    "1.0.0",
    null
);
```

Cake build will copy all changes happened at *C:\project\sample\src\Views* folder to *C:\project\sample\Views* folder since the changeset tagged with *1.0.0* tag. *C:\project\sample* is a Git repository.


text:
# How to Build Better Habits in 4 Simple Steps

The process of building a habit can be divided into four simple steps: cue, craving, response, and reward.

The cue triggers your brain to initiate a behavior.

Cravings are the motivational force behind every habit. What you crave is not the habit itself, but the change in state it delivers.

The response is the actual habit you perform, which can take the form of a thought or an action.

Finally, the response delivers a reward. Rewards are the end goal of every habit.

If a behavior is insufficient in any of the four stages, it will not become a habit.

In summary, the cue triggers a craving, which motivates a response, which provides a reward, which satisfies the craving and, ultimately, becomes associated with the cue. Together, these four steps form a neurological feedback loop, known as the habit loop.

We can split these four steps into two phases: the problem phase and the solution phase.

We need to transform these four steps into a practical framework that we can use to design good habits and eliminate bad ones. The framework is called "the Four Laws of Behavior Change" by the author.

How to create a good habit:

- Make it obvious.
- Make it attractive.
- Make it easy.
- Make it satisfying.

How to break a bad habit:

- Make it invisible.
- Make it unattractive.
- Make it difficult.
- Make it unsatisfying.

The key to creating good habits and breaking bad ones is to understand these fundamental laws and how to alter them to your specifications.


text:
# Simple Chat

The "Simple Chat" application powered from GatsbyJS, NodeJS, MongooseJS and socket.io allow user to create "public" and "private" rooms, with privacy in mind.

Which means, we never save your messages on our server, only active chat members who can read your messages during your active session. Thanks to socket.io enables real-time, bidirectional and event-based communication.

[![Simple Chat Preview](https://simple-chat.kurtobando.com/preview.png "Simple Chat Preview")](https://simple-chat.kurtobando.com/preview.png "Simple Chat Preview")

Have doubts? Check Source Code

Client [github.com/kurtobando/simple-chat](https://github.com/kurtobando/simple-chat)

Server API [github.com/kurtobando/simple-chat-api](https://github.com/kurtobando/simple-chat-api)

## Demo
Visit [simple-chat.kurtobando.com](https://simple-chat.kurtobando.com)

## Installation

Simple Chat requires [Node.js](https://nodejs.org/) v14+ to run, and [gatsby-cli](https://www.gatsbyjs.com/docs/reference/gatsby-cli/) installed globally

### Development
For development environment, create `.env.development`
```
GATSBY_API_BASE_URL=REPLACE_URL_FROM_SIMPLE_CHAT_SERVER_API
GATSBY_HOTJAR_ID=XXXXXXX
GATSBY_HOTJAR_VERSION=X
GATSBY_GOOGLE_ANALYTICS_ID=UA-XXXXXXXXX-X
GATSBY_SITE_URL=http://localhost
GATSBY_SITE_TITLE=Simple Chat
GATSBY_SITE_DESCRIPTION=A simple chat application powered from GatsbyJS, NodeJS, Mongoose and socket.io
GATSBY_SITE_IMAGE_PREVIEW=http://localhost/preview.png
```
Then.
```sh
npm install
gatsby develop
```
### Production
For production environment. Create `.env.production`
```
GATSBY_API_BASE_URL=REPLACE_URL_FROM_SIMPLE_CHAT_SERVER_API
GATSBY_HOTJAR_ID=XXXXXXX
GATSBY_HOTJAR_VERSION=X
GATSBY_GOOGLE_ANALYTICS_ID=UA-XXXXXXXXX-X
GATSBY_SITE_URL=http://localhost
GATSBY_SITE_TITLE=Simple Chat
GATSBY_SITE_DESCRIPTION=A simple chat application powered from GatsbyJS, NodeJS, Mongoose and socket.io
GATSBY_SITE_IMAGE_PREVIEW=http://localhost/preview.png
```
Then.
```sh
npm install
gatsby build
```

## License
MIT

repository: kurtobando/simple-chat

repo_name: kurtobando/simple-chat


text:
# cli-app

Example CLI Apps

## C

### nodeinfo

Simple C app that outputs information similar to `uname`

./examples/nodeinfo

### systeminfo

Simple C App that outputs information similar to `uname` and `uptime` in JSON

./examples/systeminfo

## C++

TBD

## Python

### converter

Simple Python CLI that converts JSON to YAML and back again.

./examples/converter

## Go

### go-nodeinfo

Simple Go app that outputs information similar to `uname`

./examples/go-nodeinfo


text:
pgapp
=====

This code is a front end for epgsql that adds a pool (poolboy, for the
moment), and code to isolate crashes in the epgsql library: if your
database goes down, you probably don't want the rest of the
application to fail as well.

Build and start the application with Make:

    - Copy and/or rename the file `pgapp.config.sample` into `pgapp.config`
    - Enter your configuration data in `pgapp.config`
    - Run:

        ~:$ make
        ~:$ make run

    - To test it, just run:

        > pgapp:equery(a_pool_name, "select current_date", []).

      where `a_pool_name` is the name of one of the pools in your `pgapp.config` file.

API use:
    - Simple pool:

        application:ensure_all_started(pgapp).
        pgapp:connect([{size, 10}, {database, "mydb"}, {username, "foo"}, {password, "bar"}]).
        pgapp:equery("select current_date", []),
        pgapp:with_transaction(fun(Conn) ->
                                     pgapp:squery(Conn, "update ..."),
                                     pgapp:squery(Conn, "delete from ..."),
                                     pgapp:equery(Conn, "select ? from ?", ["*", Table])
                               end).

    - Multi pool:

        application:ensure_all_started(pgapp).
        pgapp:connect(a_pool_name, [{size, 10}, {database, "mydb"}, {username, "foo"}, {password, "bar"}]).
        pgapp:equery(a_pool_name, "select current_date", []).

The equery and squery API's are the same as those of epgsql: https://github.com/epgsql/epgsql

**Note**: It is still experimental, and is likely to break.  The API
is not stable!

See [Changelog].

repository: lukyanov/pgapp

repo_name: lukyanov/pgapp


text:
# xBan project [![Current Version](https://img.shields.io/badge/version-0.2.1-green.svg)](https://github.com/peterhs73/xBan/releases) [![](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)

xBan offers a completely offline kanban work-flow. It allows edits, drag and drop tiles and boards, and saves as yaml format. All operations are done locally. xBan can also convert valid dictionary formatted yaml file into a kanban board.

![xBan GUI](https://media.giphy.com/media/4IAFWoA2C6HKPNb4xg/giphy.gif)

Some of the color schemes are inspired by Quip.

## Quickstart

To install xBan directly from github release (version 0.2.1):

    python -m pip install<EMAIL_ADDRESS>
To render xban file:

	xban render file_path

To create a xban compatible file (and open the file):

	xban create new_file

### Development

Clone xBan to local:

	git clone https://github.com/peterhs73/xBan.git

Under the xBan directory, run installation in edit mode:

	pip install -e .

Run the tests:

	tox

## Features

A xBan project consists of a title section, a description section and an individual board. Each board has a title and its own tiles. Selected features:

- Drag and drop tiles and boards
- Add/delete tiles and boards
- Change tile color

## References

- [Change Log](https://github.com/peterhs73/xBan/blob/master/CHANGELOG.md)
- [Releases](https://github.com/peterhs73/xBan/releases)

repository: NiccolasR/xBan

repo_name: NiccolasR/xBan


text:
# REFLEX-COMMON Build Container
[Packer](https://www.packer.io/) allows us to create reproducible build environments for REFLEX-COMMON.

## Requirements
* Internet connection
* [Docker](https://docs.docker.com/engine/installation/) installation
* [Packer](https://www.packer.io/docs/installation.html) installation

## Container Build Template
The `pm-reflex-common-builder.json.template` defines how the build container should be built. This template
will be rendered by the `create.pm-reflex-common-builder.sh` script.

### Builders Section
This section defines what type of container we would like to build. For now, we are only building
Docker containers but in the future we may want to expand to others
(e.g. [EC2](https://www.packer.io/docs/builders/amazon.html)).

### Provisioners Section
This section defines what to do inside the container in order to support building the REFLEX-COMMON platform.

### Post-Processors Section
This section defines what to do with the container after it has been built. For now, we are simply
uploading and tagging it in the **local Docker registry** on whichever system it's being built on.

## Create Build Environment
### Local Development
The `create.pm-reflex-common-builder.sh` script will create a container and make it available to
the locally installed Docker environment. Once a container is created there should not be any need
to run it again **unless** the build dependencies change. By default, the container will be tagged
as *latest*.

#### Container creation
1. Clone the REFLEX-COMMON repository
2. Go to the `build/packer` directory
3. Run `create.pm-reflex-common-builder.sh`
4. Verify that the image is available locally

        $ docker images
        REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
        pm-reflex-common-builder      latest              66bf8e483cdd        About an hour ago   443.3 MB
        <...>

### Official Releases
**TODO**

* Setup a central Docker registry to store official images
* Tie container creation into official release process/scripts and tag containers with the
release version
* Update build scripts to reflect container tag that matches the release version

repository: theromis/mlpiper

repo_name: theromis/mlpiper


text:
# Keypirinha Plugin: EasySearch

This is EasySearch, a plugin for the
[Keypirinha](http://keypirinha.com) launcher.

This plugin provides a easiest and flexible way to search the internet, just like WebSearch package but even simpler.

| ![EasySearch demo](./images/demo.gif "EasySearch demo") |
| :-: |
| *EasySearch demo* |

## Install

There are two ways to install:

1. Using **[PackageControl](https://github.com/ueffel/Keypirinha-PackageControl)**:

    - Invoke Keypirinha and type `install package`.
    - Click enter.
    - Now search for package `Keypirinha-EasySearch`.
    - Again press enter.

2. Manual:

    Download the latest plugin file from [here](https://github.com/bantya/Keypirinha-EasySearch/releases/latest).

    Once the `EasySearch.keypirinha-package` file is downloaded, move it to the `InstalledPackage` folder located at:

    - `Keypirinha\portable\Profile\InstalledPackages` in **Portable mode**
    - **Or** `%APPDATA%\Keypirinha\InstalledPackages` in **Installed mode** (the
    final path would look like
    `C:\Users\%USERNAME%\AppData\Roaming\Keypirinha\InstalledPackages`)

**NOTE:** You may have to manually restart Keypirinha to see the package activated.

## Configuration

1. Open the EasySearch config file.

| ![Keypirinha configuration menu](./images/config.jpg "Keypirinha configuration menu") |
| :-: |
| *EasySearch configuration menu* |

2. Add the desired web search URLs.

- The syntax for the URL entry should be:

    ```
    [distinct keyword] = [Search Engine name] [Search Engine URL with %s as a search term]

    e.g.

    g = Google https://www.google.com/search?q={q}
    php = PHP.net http://php.net/manual-lookup.php?pattern={q}
    gh = Github https://github.com/search?utf8=✓&q={q}
    ```

- All the fields in the above syntax are REQUIRED.

| ![EasySearch configuration files](./images/files.png "EasySearch configuration files") |
| :-: |
| *EasySearch configuration files* |

## Usage

Invoke Keypirinha and put the search engine keyword and the search term.

- The syntax for the usage should be:

    ```
    [keyword] [Search term (can contain spaces)]

    e.g.

    g  keypirinha launcher  -> searches 'keypirinha launcher' on google
    gh  bantya/Keypirinha-EasySearch  -> searches 'bantya/Keypirinha-EasySearch' on github
    ```

| ![Keypirinha usage](./images/usage.jpg "Keypirinha usage") |
| :-: |
| *EasySearch usage* |

## What's new ?

### https for non-https URL

If the URL protocol is just `http`, then along with it an `https` URL is also generated.

| ![EasySearch https URL suggestion](./images/https.jpg "EasySearch https URL suggestion") |
| :-: |
| *EasySearch https URL suggestion* |

### Actions

Starting from `v2.0.0`, following actions are available for any generated URL.

| ![EasySearch actions](./images/actions.jpg "EasySearch actions") |
| :-: |
| *EasySearch actions* |

- **Copy link**: Copy the URL to the clipboard.
- **Open**: Open the URL in the browser.
- **Private mode**: Open the URL in new browser window.
- **New windows**: Open the URL in the private mode.

## Change Log

Please check the [CHANGELOG](./CHANGELOG.md) file.

## License

This package is distributed under the terms of the MIT license.

## Credits

_Waiting for the first name_.

## Contribute

This is how to contribute:
1. Check for open issues or open a fresh issue to start a discussion around a
   feature idea or a bug.
2. Fork this repository on GitHub to start making your changes to the **dev**
   branch.
3. Send a pull request.
4. Add yourself to the *Contributors* section below (or create it if needed)!

## And what?

Thanks to all.

repository: bantya/Keypirinha-EasySearch

gha_language: Python

repo_name: bantya/Keypirinha-EasySearch


text:
# placeIn-placeOn

## A group of Swift UIView extensions that simplify frame-based positioning of a UIView within or around another UIView.
*The placeIn... methods help with positioning within another UIView.*

*The placeOn... methods help with positioning around another UIView.*

*You can use them both in conjuction.*

Tired of doing something like this every time you need to position a UIView in, say, the bottom-right of another UIView?
~~~~
let firstWidth = firstView.frame.width
let secondWidth = secondView.bounds.width
secondView.frame.origin.x = firstView.frame.origin.x + firstWidth - secondWidth

let firstHeight = firstView.frame.height
let secondHeight = secondView.bounds.height
secondView.frame.origin.y = firstView.frame.origin.y + firstHeight - secondHeight
~~~~

Now you can do it in one line like this:
~~~~
secondView.placeInBottomRight(of: firstView)
~~~~

Or if you want to center in the super view:
~~~~
secondView.placeInCenterOfSuperView()
~~~~

You can even provide an offset (constant):
~~~~
secondView.placeInCenterOfSuperView((offsetX: 20, offsetY: -5)
~~~~

Use placeIn... PlaceOn... methods in conjuction like here (placing one UIView centered just above the other):
~~~~
secondView.placeInMidX(of: firstView)
secondView.placeOnTop(of: firstView)
~~~~

There are many more placeIn... placeOn... methods.

The extensions are provided alongside an Xcode project with some interesting examples.
Any feedback is welcome.

repository: Jonathan-Hoche/placeIn-placeOn

repo_name: Jonathan-Hoche/placeIn-placeOn


text:
---
id: 42
title: "Mock Free Example, Part 1: Project Intro"
date: 2011-06-07T07:42:22+00:00
author: Arlo
layout: post
guid: http://arlobelshee.com/?p=42
permalink: /mock-free-example-part-1-project-intro/
tt_tweeted:
  - http://twitter.com/arlobelshee/status/78114082674327552
tt_tweeted_date:
  - 2011-06-07 15:00:23
category: techies
tags:
  - design
  - example
  - no mocks
  - tdd
---
Previously, I presented [mocks as nuclear weapons](http://arlobelshee.com/essay/how-i-learned-to-stop-worrying-and-love-the-mock "How I Learned to Stop Worrying and Love the Mock"). Unsurprisingly, commenters wanted examples. I exist to serve.

This series will discuss a partly-completed project that I have lying around. The project isn't perfect. But it will serve to discuss some of the ideas. Since it's only partly complete, some ideas visible in this stage that would likely become much more subtle with another few days' work. Or so I hope.

It's also a full project. The ideas blend into each other at the edges. I am not creating an example to demonstrate an idea; I'm showing how those ideas interact with each other in the wild. This will make the examples more difficult to follow. Sorry. I'll do my level best to guide you to the areas that I find interesting (whether positive, negative, or simply unfinished).

<!--more-->This post introduces the project. Future posts will examine some of the ideas in it, such as:

  * Designing libraries for substitutability---[Simulators](http://arlobelshee.com/post/mock-free-example-part-2-simulators "Mock Free Example, part 2: Simulators").
  * Data flow pipelines, my most favoritest pattern ever.
  * UI doubles --- like test doubles, but useful.
  * Asynchronicity for the win.
  * (Probably) [Simulators, redux](http://arlobelshee.com/post/simulating-the-file-system "Simulating the File System").
  * Extending your language to improve testability.
  * Default non-nullability.
  * Test class per responsibility.

But those are potentially interesting, so you have to wait for all of them.

### Project synopsis

I need to print my 4th Edition D&D characters. I am picky about format. In particular, I want to print the entire character to cards---not just the powers. I found a design template on the web; I want my cards to look like that.

### The complications

The character file contains only the dynamic data. All of the rules are available via a web service (The D&D Compendium), which requires authentication. This web service delivers HTML, with semi-structured data. I'll need to correct various common patterns of error in the data.

The character file contains partial computations for a bunch of things that I want to show on my cards. These computations are typically stored in text. I'll need to find them, parse them, combine the results with more parsed text from the web service, compute the resulting calculation, and print it on the card.

I need to be able to inject cards that aren't in the character file (such as my personality traits notes). I'll also need to allow per-character modification of any of the auto-gen cards. I need to hand-tweak cards to take into account house rules, new rules, and other special cases.

To achieve the above, I've created a config file for each character. Thus, my card printer is actually more of a WYSIWYG config file editor with print capability. Change the config file; see the resulting set of cards. This user interaction is actually the valuable part of the domain. Of course, the printing is high-precision. So the WYSISYG experience has to have perfec tfidelity, regardless of printer.

This is actually the second system. The first was in Python. it was hacked out in a weekend. It was reasonably well designed, but untested. Several parts were very useful, so I transliterated them into C# and included them in my initial project. So I start with instant legacy code. This legacy has a middling debt level. So I've got an area with high legacy, moderate debt (high value, moderate testability problems).

### Project restatement

Build a print layout tool for 4th Edition D&D. The user uses the tool to define a custom layout, with WYSISYG functionality. When happy, he prints the result. The printed result always looks exactly like the one on the screen.

### Technical details

The code is at <https://github.com/arlobelshee/PrintChar>. It is a 4 project C# solution. It is not very well organized yet. It is the result of about 20 hours' work, so the design has not emerged fully. Still, some parts of the design are just starting to emerge. We'll talk about several of these in later posts in the series.

Also, I intentionally used this project to learn about the new async libraries in .Net 4.0. I'd used the concepts before in other languages (mostly futures and continuations). However, I used them everywhere in this project, just to see where they were useful. Reflecting, I am surprised at some of the places they turned out to be a good idea. I'd still not use them quite so much in my next project.

Finally, I really, really, recommend that you use real tooling to play with this project. I assume Visual Studio, ReSharper, and Expression Blend. I do some things to really take advantage of those tools. Two of the blog posts in this series will focus on how I take advantage of strong tooling to eliminate sources of trouble.

To restate more firmly: I do not view a project as the sum of its code. Rather, it is the view of that code through the tooling that it is designed to take advantage of. By targeting my code towards my tools, I can get a lot of value with a lot less code.

I want to show how my design choices play out in real projects, so I'm using a real project to discuss them. That means that it is large, messy, and has requirements that will make it more difficult for some of you to navigate. For that difficulty, I am sorry. I could distill it to its essence. However, then it looks like answers to toy problems. People have difficulty seeing how it would apply in a real system. In this series, I intend to fail in the other direction.

gha_language: HTML


text:
# ConnectivityLiveData
Android LiveData that wraps a connection listener

Usage in a `Fragment`:

    ConnectivityLiveData(context).observe(viewLifecycleOwner, Observer { connectionState ->
        when (connectionState) {
            CONNECTED -> {
                // Connected to the Internet
            }
            DISCONNECTED -> {
                // Disconnected from the Internet. This is anything, but flight mode.
            }
            FLIGHT_MODE -> {
                // Device is in flight mode, but also disconnected of course.
            }
        }
    })

repository: darwind/ConnectivityLiveData

repo_name: darwind/ConnectivityLiveData


text:
## EBNF grammar

```ebnf
(* Sum types *)

sum-type                  = "choice(" identifier "," { variant }+ ");" ;
variant                   = "variant(" identifier ")"
                          | "variant(" identifier "," type ")"
                          | "variantMany(" identifier "," { field }+ ")" ;

variant-tag               = "variantTag(" expr ")" ;

match                     = "match(" expr ")" "{" { of compound-statement }+ "}" [ otherwise ] ;
matches                   = "matches(" expr "," identifier ")" ;

try                       = "try(" expr "," ok-type-1 "," ok-type-2 "," err-type ");" ;

of                        = "of(" identifier ")"
                          | "of(" identifier "," identifier ")"
                          | "ofMany(" identifier ", (" { identifier }+  "))" ;
of-mut                    = "ofMut(" identifier ")"
                          | "ofMut(" identifier "," identifier ")"
                          | "ofManyMut(" identifier ", (" { identifier }+  "))" ;

otherwise                 = "otherwise" compound-statement ;

(* Product types *)

product-type              = "record(" identifier "," { field }+ ");" ;
field                     = "field(" identifier "," type ")" ;

(* Sum types introspection *)

sum-introspect            = "POICA_CHOICE_INTROSPECT(" identifier "," { variant }+ ")" ;

variant-kind              = "POICA_VARIANT_KIND(" variant ")" ;
variant-name              = "POICA_VARIANT_NAME(" variant ")" ;

overload-on-variant       = "POICA_OVERLOAD_ON_VARIANT(" identifier "," aux-data "," variant ")" ;

(* Product types introspection *)

product-introspect        = "POICA_RECORD_INTROSPECT(" identifier "," { field }+ ")" ;

field-type                = "POICA_FIELD_TYPE(" field ")" ;
product-field-types-seq   = "POICA_RECORD_FIELD_TYPES_SEQ(" { field }+ ")" ;
product-field-types-tuple = "POICA_RECORD_FIELD_TYPES_TUPLE(" { field }+ ")" ;

field-name                = "POICA_FIELD_NAME(" field ")" ;
product-field-names-seq   = "POICA_RECORD_FIELD_NAMES_SEQ(" { field }+ ")" ;
product-field-names-tuple = "POICA_RECORD_FIELD_NAMES_TUPLE(" { field }+ ")" ;

(* Built-in ADTs *)

def-maybe-type            = "DefMaybe(" type ");" ;
maybe-type                = "Maybe(" type ")" ;
vconstr-just              = "Just(" type ")" ;
vconstr-nothing           = "Nothing(" type ")" ;
is-just                   = "isJust(" type ")" ;
is-nothing                = "isNothing(" type ")" ;

def-either-type           = "DefEither(" left-type "," right-type ");" ;
either-type               = "Either(" left-type "," right-type  ")" ;
vconstr-left              = "Left(" left-type "," right-type ")" ;
vconstr-right             = "Right(" left-type "," right-type ")" ;
is-left                   = "isLeft(" left-type "," right-type ")" ;
is-right                  = "isRight(" left-type "," right-type ")" ;

def-pair-type             = "DefPair(" fst-type "," snd-type ");" ;
pair-type                 = "Pair(" fst-type "," snd-type  ")" ;

def-res-type              = "DefRes(" ok-type "," err-type ");" ;
res-type                  = "Res(" ok-type "," err-type  ")" ;
vconstr-ok                = "Ok(" ok-type "," err-type ")" ;
vconstr-err               = "Err(" ok-type "," err-type ")" ;
is-ok                     = "isOk(" ok-type "," err-type ")" ;
is-err                    = "isErr(" ok-type "," err-type ")" ;

(* Miscellaneous *)

obj                       = "obj(" value "," value-type ")" ;

unit-type                 = "Unit" ;
unit-value                = "unit" ;

monomorphise              = "P(" ( identifier | identifier { "," identifier }+ ) ")"
force-semicolon           = "POICA_FORCE_SEMICOLON"
```

## Semantics

### `choice`

Expands to:

```c
typedef struct <sum-name> {
    // Omitted...
} <sum-name>;

<value-constructors>
```

`<value constructors>` are pure functions that construct variants of `<sum-name>`. Their signatures depend on a kind of a variant:

```
variant(<variant-name>)
--->
inline static <sum-name> <variant-name>(void) { ... }
```

```
variant(<variant-name>, <type>)
--->
inline static <sum-name> <variant-name>(<type>) { ... }
```

```
variantMany(<variant-name>, field(<f1>, <F1>) ... field(<fm>, <Fm>))
--->
inline static <sum-name> <variant-name>(F1, ..., Fm) { ... }
```

### `variant`, `variantMany`

Expands to:

```
variant(<variant-name>)
--->
((POICA_VARIANT_KIND_EMPTY)(<variant-name>))
```

```
variant(<variant-name>, <type>)
--->
((POICA_VARIANT_KIND_SINGLE)(<variant-name>)(<type>))
```

```
variantMany(<variant-name>, field(<f1>, <F1>) ... field(<fm>, <Fm>))
--->
((POICA_VARIANT_KIND_MANY)(<variant-name>)( ((<f1>)(<F1>)) ... ((<fm>)(<Fm>)) ))
```

### `variantTag`

Expands to the value of an anonymous [plain C enumeration], designating a unique (among the variants of the sum type of `<expr>`) tag in `<expr>`.

This macro can be used to compare two variants, ignoring the inner data (see [`examples/compare_variants.c`](https://github.com/Hirrolot/poica/blob/master/examples/compare_variants.c)).

[plain C enumeration]: https://en.cppreference.com/w/c/language/enum

### `match`

Tests `<expr>` of a sum type for all variants of `<sum-type>`, one after another, starting from the first. If correspondence is found, executes `<compound-statement>` specified after the corresponding [`of`](#of), and then goes to the first statement after `match`.

If not all the variants are specified in `match`, a compiler should generate a warning. This is called _exhaustiveness checking_ (or _case analysis_).

### `matches`

Tests whether `<expr>` of a sum type corresponds to `<variant-type>`. Expands to a boolean expression.

### `try`

Expands to:

```c
match(<expr>) {
    of(Err(<ok-type-1>, <err-type>), err) {
        return Err(<ok-type-2>, <err-type>)(*err);
    }
    otherwise {}
}
```

This macro is used to concisely pass an error upwards a program stack, or, if the result is successful, do nothing.

### `of`, `ofMany`

There are again several forms of this macro, each corresponds to a kind of a variant:

 - For `variant(<variant-name>)` use `of(<variant-name>)`.

 - For `variant(<variant-name>, <type>)` use `of(<variant-name>, <var>)`. `<var>` is of type `const <type> *` and is accessible in `<compound-statement>`.

 - For `variantMany(<variant-name>, field(<f1>, <F1>) ... field(<fm>, <Fm>))` use `ofMany(<variant-name>, (<f1>, ..., <fm>))`. `<f1>`, ..., `<fm>` are of types `const F1 *`, ..., `const Fm *`, respectively, and are accessible in `<compound-statement>`.

There exist mutable versions - `ofMut` and `ofManyMut`. The difference is that the mutable versions provide `T *` instead of `const T *` to `<compound-statement>`s.

### `otherwise`

Handles the rest of variants of a sum type, if the previous ones have been failed. [`match`](#match) with `otherwise` is by definition handles all variants, so exhaustiveness checking will succeed.

### `record`

Expands to:

```c
typedef struct <product-type> {
    <F1> <f1>;
    ///
    <Fm> <fm>;
} <product-type>;
```

### `field`

Expands to:

```
((<f1>)(<Fm>))
```

### `POICA_CHOICE_INTROSPECT`

Expands to:

```
<variant1>
...
<variantN>
```

And `<variant1>`, ..., `<variantN>` will then expand according to the [rules that variants expand](#variant-variantmany).

### `POICA_VARIAND_KIND`, `POICA_VARIANT_NAME`

`POICA_VARIANT_KIND` expands to either `POICA_VARIANT_KIND_EMPTY`, `POICA_VARIANT_KIND_SINGLE`, or `POICA_VARIANT_KIND_MANY`, depending on a kind of a passed variant (see [the expansion rules of `variant`](#variant)).

`POICA_VARIANT_NAME` expands to the name of a variant.

### `POICA_OVERLOAD_ON_VARIANT`

The order of parameters:

 1) `<macro-name>` is a prefix of three user-provided macros.
 2) Any auxiliary data.
 3) A [variant](#variant), depending on which, `POICA_OVERLOAD_ON_VARIANT` expands to invocations of different user-provided macros

```
variant(<variant-name>)
--->
<macro-name>VARIANT_KIND_EMPTY(aux-data, <variant-name>)
```

```
variant(<variant-name>, <type>)
--->
<macro-name>VARIANT_KIND_SINGLE(aux-data, <variant-name>, <type>)
```

```
variantMany(<variant-name>, field(<f1>, <F1>) ... field(<fm>, <Fm>))
--->
<macro-name>VARIANT_KIND_MANY(aux-data, <variant-name>, field(<f1>, <F1>) ... field(<fm>, <Fm>))
```

### `POICA_RECORD_INTROSPECT`

Expands to:

```
<field1>
...
<fieldN>
```

And `<field1>`, ..., `<fieldN>` will then expand according to the [rules that fields expand](#field);

### `POICA_FIELD_TYPE`, `POICA_FIELD_NAME`

`POICA_FIELD_TYPE` expands to the type of a passed field, and `POICA_FIELD_NAME` expands to a name of a passed field.

### `POICA_RECORD_FIELD_TYPES_SEQ`, `POICA_RECORD_FIELD_TYPES_TUPLE`

`POICA_RECORD_FIELD_TYPES_SEQ` expands to:

```
(<F1>) ... (<Fm>)
```

`POICA_RECORD_FIELD_TYPES_TUPLE` expands to:

```
(<F1>, ..., <Fm>)
```

### `POICA_RECORD_FIELD_NAMES_SEQ`, `POICA_RECORD_FIELD_NAMES_TUPLE`

`POICA_RECORD_FIELD_NAMES_SEQ` expands to:

```
(<f1>) ... (<fm>)
```

`POICA_RECORD_FIELD_NAMES_TUPLE` expands to:

```
(<f1>, ..., <fm>)
```

### `Maybe`

`DefMaybe` expands to:

```c
choice(
    P(Maybe, <type>),
    variant(P(Just, <type>), <type>)
    variant(P(Nothing, <type>))
);

inline static bool P(isJust, <type>)(P(Maybe, <type>) maybe) { ... }
inline static bool P(isNothing, <type>)(P(Maybe, <type>) maybe) { ... }
```

 - `P(Maybe, <type>)` expands to a name of a monomorphized `Maybe` type.
 - `P(isNothing, <type>)` and `P(Nothing, <type>)` expand to names of value constructors. The first one accepts a value of type `<type>`, the latter constructs an empty `Maybe`.
 - `P(isJust, <type>)` and `P(isNothing, <type>)` expand to names of functions that test whether the provided `Maybe` is `P(Just, <type>)` or `P(Nothing, <type>)`, respectively.

### `Either`

`DefEither` expands to:

```c
choice(
    P(Either, <left-type>, <right-type>),
    variant(P(Left, <left-type>, <right-type>), <left-type>)
    variant(P(Right, <left-type>, <right-type>), <right-type>)
);

inline static bool P(isLeft, <left-type>, <right-type>)(P(Either, <left-type>, <right-type>) either) { ... }
inline static bool P(isRight, <left-type>, <right-type>)(P(Either, <left-type>, <right-type>) either) { ... }
```

 - `P(Either, <left-type>, <right-type>)` expands to a name of a monomorphized `Either` type.
 - `P(Left, <left-type>, <right-type>)` and `P(Right, <left-type>, <right-type>)` expand to names of value constructors. They accept values of `<left-type>` and `<right-type>` and construct the appropriate variants of `Either`, respectively.
 - `P(isLeft, <left-type>, <right-type>)` and `P(isRight, <left-type>, <right-type>)` expand to names of functions that test whether the provided `Either` is `P(Left, <left-type>, <right-type>)` or `P(Right, <left-type>, <right-type>)`, respectively.

### `Pair`

`DefPair` expands to:

```c
record(
    P(Pair, <fst-type>, <snd-type>)
    field(fst, <fst-type>)
    field(snd, <snd-type>)
);
```

 - `P(Pair, <fst-type>, <snd-type>)` expands to a name of a monomorphized `Pair` type.

### `Res`

`DefRes` expands to:

```c
choice(
    P(Res, <ok-type>, <err-type>),
    variant(P(Ok, <ok-type>, <err-type>), <ok-type>)
    variant(P(Err, <ok-type>, <err-type>), <err-type>)
);

inline static bool isOk(<ok-type>, <right-type>)(P(Res, <ok-type>, <err-type>) res) { ... }
inline static bool isErr(<ok-type>, <right-type>)(P(Res, <ok-type>, <err-type>) res) { ... }
```

 - `P(Res, <ok-type>, <err-type>)` expands to a name of a monomorphized `Res` type.
 - `P(Ok, <ok-type>, <err-type>)` and `P(Err, <ok-type>, <err-type>)` expand to names of value constructors. They accept values of `<ok-type>` and `<err-type>` and construct the appropriate variants of `Res`, respectively.
 - `P(isOk, <ok-type>, <err-type>)` and `P(isErr, <ok-type>, <err-type>)` expand to names of functions that test whether the provided `Res` is `P(Ok, <ok-type>, <err-type>)` or `P(Err, <ok-type>, <err-type>)`, respectively.

### `obj`
Expands to a pointer to an [unnamed object] (`value-type *`) that is equal to `value`. `obj` is used to imitate recursive data structures, like trees.

[unnamed object]: https://en.cppreference.com/w/c/language/compound_literal

### `Unit`, `unit`

`Unit` is a [unit type], i.e. a type that allows the only one value, `unit`, which is defined as follows:

```c
static const Unit unit;
```

[unit type]: https://en.wikipedia.org/wiki/Unit_type

### `P`

Concatenates all the provided identifiers, thereby producing a name of a monomorphised software entity. Example:

```
P(a, b, c) ==> abc
```

Note that even if we provide different types, this macro may produce the same identifier: `P(a, aa)` is the same as `P(aa, a)`. However, this behavior occurs almost never, and a compiler must generate a compilation error.

Another edge-case is that `P` doesn't handle special characters and whitespaces, for example, `int *`, `int (*fnPtr)(int, int)` and so on. Instead you can use `typedef`s:

```c
typedef int (*fnPtr)(int, int);
P(fnPtr, abc) ==> fnPtrabc
```

### `POICA_FORCE_SEMICOLON`

`POICA_FORCE_SEMICOLON` forces a user to put a semicolon after itself. One of its use cases is a semicolon after a data type definition:

```c
DefMyDataType(...);
```

See [`examples/generic_linked_list.c`](https://github.com/Hirrolot/poica/blob/master/examples/generic_linked_list.c) as an example.

## Cautions

 - Make sure that expressions of a sum type, passed to macros, produce no side effects and/or performs heavy computations. You'd better first place `<expr>` into a variable, and then pass this variable into `match` and other similar macros:

```c
MySumType var = <expr>;
match(var) { ... }
```

Do **NOT** do this:

```c
match(<cpu-bound-or-io-expr>) { ... }
```

 - All the generic types inherit the edge-cases of [`P`](#p).


text:
# Rack::JQueryUI::Themes #

NO LONGER IN DEVELOPMENT, obvs.

[jQuery-UI](http://jqueryui.com/) ***themes*** CDN script tags and fallback in one neat package.

### Build status ###

Master branch:
[![Build Status](https://travis-ci.org/yb66/rack-jquery_ui-themes.png?branch=master)](https://travis-ci.org/yb66/rack-jquery_ui-themes)

### Why? ###

I get tired of copy and pasting and downloading and moving… jQuery files and script tags etc. This does it for me (along with https://github.com/yb66/rack-jquery), and keeps version management nice 'n' easy.

### See also ###

[Rack::JQuery](https://github.com/yb66/rack-jquery)
[Rack::JQueryUI](https://github.com/yb66/rack-jquery_ui)

They're not dependencies, but if you're going to use this then I bet you'll be interested in using them.

### What's with the plural ###

Rack::JQueryUI::Theme doesn't sound right to me, as it's accessing the _Themes_ service/files. I doubt you'll ever instantiate a instance of the class yourself, and the computer doesn't mind, so let it go.

### Usage ###

Have a look in the examples directory, but here's a snippet.

* Install it (see below)
* `require 'rack/jquery_ui/themes'`.
* Put this in your middleware stack: `use Rack::JQueryUI::Themes, :theme => "vader"`
* Put this in the head of your layout (the example is Haml but you can use whatever you like)

    %head
      = Rack::JQueryUI::Themes.cdn env, :organisation => :microsoft

Now you have the script tags to Microsoft's CDN in the head (you can also use Media Temple or Microsoft, see the docs).

It also adds in a bit of javascript that will load in a locally kept version of jQuery, just incase the CDN is unreachable. The script will use the "/js/jquery-ui/1.10.3/themes/:THEME/jquery-ui.min.css" path (or, instead of 1.10.3, whatever is in {Rack::JQueryUI::JQUERY_UI_VERSION}), where `:THEME` is the name of the theme you specified, the default being `smoothness`.

That was easy.

### Note ###

You have to have loaded jQuery _before_ using the CDN helper, as Rack::jQueryUI::Themes relies on it. I've already mentioned [Rack::JQuery](https://github.com/yb66/rack-jquery) which you can use to do this, or load the script however you like. Just remember that it needs to be there.

### Version numbers ###

This library uses [semver](http://semver.org/) to version the **library**. That means the library version is ***not*** an indicator of quality but a way to manage changes. The version of jQuery-UI can be found in the lib/rack/jquery_ui/themes/version.rb file, or via the {Rack::JQueryUI::JQUERY_UI_VERSION} constant.

### Installation ###

Add this line to your application's Gemfile:

    gem 'rack-jquery_ui-themes'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rack-jquery_ui-themes

### Contributing ###

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

### Licence ###

See the LICENCE.txt file.


text:
# docsify-demo-box-react

> write React jsx demo in [docsify](https://docsify.js.org/#/) with instant preview and `jsfiddle` integration

Your sample code can be rendered on the page instantly, so the people who read your document can see the preview immediately.
If he/she expands the demo box, the source code and description are shown there.
Click the button `Try in Jsfiddle`, `jsfiddle.net` will be open with the code of this sample.

[Doc](https://njleonzhang.github.io/docsify-demo-box-react/)

This plugin is for React. For Vue, please use [docsify-demo-box-vue](https://njleonzhang.github.io/docsify-demo-box-vue)

## Showcase

These projects are using `docsify-demo-box-react`. Pull requests welcome :blush:

| Project | Description |
|---|---|
| [soui-react](https://github.com/sodalife/soui-react/) | Soda UI Components for React |

repository: NanaG/docsify-immutable-js

repo_name: NanaG/docsify-immutable-js


text:
# Changlelog

## 3.0.2
- Added Default trait implementation for Config struct
- Documentation corrections

## 3.0.1
- Minor documentation corrections

## 3.0.0
- Core code made idependent of `chrono` crate, `chrono` feature is added to disable support for that crate
- Added support for returning results in `time` crate format

## 2.1.0
- New configuration API, which allows to set instance config without making it mutable

## 2.0.0
- Use tokio 1.0

## 1.0.3
- Proper IPv6 release
- Small documentation improvements

## 1.0.2
- ToServerAddrs is implmented for (String, u16)
- Fixed error handling cases related to socket handling

## 1.0.1
- Minor fix,corrected README

## 1.0.0
- New unified API with extending addressing support
- Methods to set default bind address

## 0.3.2
- Fix under/overflow on timestamps before 1970

## 0.3.1
- Fixed versions in documentation

## 0.3.0
- Method to set timeout, small fixes

## 0.2.0
- Added optional asynchronous API

## 0.1.0
- Initial release

repository: dobaksz/rsntp

gha_language: Rust

gha_license_id: NOASSERTION

repo_name: dobaksz/rsntp


text:
# jeo - lightweight geo library for the jvm

## Building

Building the jeo library requires [Apache Maven](http://maven.apache.org).

    git clone https://github.com/jeo/jeo.git
    cd jeo
    mvn install

repository: planetfederal/jeo

repo_name: planetfederal/jeo


text:
---
id: hydra-command-line-flags
title: Hydra's command line flags
---

Hydra is using the command line for two things:
- Controlling Hydra
- Configuring your application (See [Override Grammar](override_grammar/basic.md))

Arguments prefixed by - or -- control Hydra; the rest are used to configure the application.

Information about Hydra:
- **--hydra-help**: Shows Hydra specific flags
- **--version**: Show Hydra's version and exit

Information provided by the Hydra app:
- **--help,-h**: Shows the application's help. This can be [customized](configure_hydra/app_help.md).

Debugging assistance:
- **--cfg,-c**: Show config instead of running. Takes as parameter one of `job`, `hydra` or `all`.
- **--resolve**: Used in conjunction with the `--cfg` flag; resolve interpolations in the config before printing it.
- **--package,-p**: Used in conjunction with --cfg to select a specific config package to show.
- **--info,-i**: Print Hydra information. This includes installed plugins, Config Search Path, Defaults List, generated config and more.

Running Hydra applications:
- **--run,-r**: Run is the default mode and is not normally needed.
- **--multirun,-m**: Run multiple jobs with the configured launcher and sweeper. See [Multi-run](/tutorials/basic/running_your_app/2_multirun.md).

- **--config-path,-cp**: Overrides the `config_path` specified in `hydra.main()`. The `config_path` is absolute or relative to the Python file declaring `@hydra.main()`.
- **--config-name,-cn**: Overrides the `config_name` specified in `hydra.main()`.
- **--config-dir,-cd**: Adds an additional config directory to the [config search path](search_path.md).
This is useful for installed apps that want to allow their users to provide additional configs.

Misc:
- **--shell-completion,-sc**: Install or Uninstall [shell tab completion](/tutorials/basic/running_your_app/6_tab_completion.md).

repository: facebookresearch/hydra

repo_name: facebookresearch/hydra


text:
# Walk

_A Craft-aware variant of the `array_walk()` method, plus some console commands for extra convenience, to easily apply Craft service/helper/Task methods to a collection of elements._

by [Michael Rog](https://topshelfcraft.com)

### TL;DR.

Maybe you want to do it with an easy [console command](#walk-console-commands).

Or, maybe you want to do it in [one line of PHP](#walk-php-usage), in a custom plugin.

And you want to do this with several sets of elements, and with several different bulk actions, without needing to write new code every time.

**Walk** gives you methods to apply any Craft service method, helper method, or Task to each element in a list.

* * *

### Installation

Drop the `walk` directory into your Craft plugins directory, visit the _Settings_ page of the CP, and click to _Install_ the **Walk** plugin.

### Walk a what?

Applying a method to every item in a list is known as "walking" an array. In fact, PHP provides a method — [`array_walk()`](http://php.net/manual/en/function.array-walk.php) — to do just that.

However, PHP's [`array_walk`](http://php.net/manual/en/function.array-walk.php) method isn't aware of how Craft's _services_ and _helpers_ are set up, and it doesn't know anything about Elements.

So, where PHP's `array_walk` is useful for applying a _PHP_ method to each item in an array, this plugin provides a _Craft-aware_ walk function — `craftyArrayWalk()` — to run a _Craft_ service method, helper method, or Task on each item in a list.

### Yes! This will save me _minutes_! How do I start?

First, you need to have a _callable_ in mind. A _callable_ is the method/task that will be run on each item in the list.

**A callable is specified by its name as a string.** With this plugin, a _callable_ can be:

- a Craft service method: `'service.method'`
- a helper method from the Craft namespace: `'SomeHelper::method'`
- a Craft task: `'DoSomethingTask'` _(more on this [later](#walk-tasks-info)...)_
- any public static method in the root namespace: `'SomeClass::method'`
- any accessible custom function: `'myCustomMethod'`
- any native PHP function, e.g. `'strtolower'`

Second, you need a list of stuff (an _array_).

Then, just call the `craftyArrayWalk()` method, like this:

```php
$success = WalkHelper::craftyArrayWalk($elements, $callable);
```

It works pretty much just like the native `array_walk` method:
- The _callable_ is run once for each item in the array.
- For each step, the _item_ is passed as the first parameter to the method.
- The array _index_ is passed as the second parameter to the method.
- The array item is passed _by reference_, meaning if you change the variable inside the method, it will be changed in the source array.
- `craftyArrayWalk()` returns a boolean: `true` if successful, `false` if there was an issue.

You can also provide extra some custom data if needed, by adding a third parameter, like this:

```php
$success = WalkHelper::craftyArrayWalk($elements, $callable, $userdata);
```

The `$userdata` will be passed as the third parameter to the _callable_ method on each step.

So, in technical terms, a _callable_ method has the following signature:
```php
public function myMethod( $element [, $index [, $userdata ]] )
```

### I need an example.

Let's start with an example of PHP's native `array_walk`:

You could do this:
```php
$myArray = ["Michael", "Aaron", "Andrew", "Brad", "Brandon"]

foreach ($myArray as $key => $value)
{
    $myArray[$key] = strtolower($value);
}
```
But this is way prettier:
```php
array_walk($myArray, 'strtolower');
```

These two examples accomplish the same thing: Afterwards, each string item in the array will have been transformed to lowercase.

**Now let's look at a _Crafty_ example.**

You could do this:
```php
$myEntries = craft()->elements->getCriteria(ElementType::Entry)->find();

foreach ($myEntries as $entry)
{
    craft()->entries->saveEntry($entry);
}
```
But this is tighter:
```php
WalkHelper::craftyArrayWalk($myEntries, 'entries.saveEntry');
```

In both examples, each Entry in the criteria will be re-saved.

### Nifty... but I don't want to write any PHP. What about some **_console commands_**?

That's actually why I wrote this plugin: I needed a fast, convenient way to do a bunch of indexing/re-saving, preferably from the CLI, without having to write a new custom command for each task/criteria combo.

So, without further ado, I give you... the `walk` _CLI command_.

```shell
php yiic walk [list] [callable] --[options]=blah --asTask
```

So, let's break that down:

- `[list]` is either an element type identifier (`assets`, `entries`, etc.), or an element _IDs_ identifier (`assetIds`, `entryIds`, etc.).
- `[callable]` is the method/task you want to run on each item, as described [above](#walk-callable-formats).
- There are several supported `[options]`, described [below](#walk-command-options).
- The special (optional) `--asTask` option... I'll get to that [later](#walk-tasks-info).
- The order of options is unimportant.

If you want to re-save all your blog entries...
```shell
php yiic walk entries --section=blog --limit=null entries.save
```

If you have a custom service method, and you want to run it once on each user:
```shell
php yiic walk users --limit=null myService.myMethod
```

What if your custom method takes an element _ID_ rather than an element _model_?
```
php yiic walk entryIds SomeHelper:methodThatOperatesOnAnId
```
Tada!

### Command options

The following Element Criteria attributes can be set via CLI option:
- `id`
- `limit` (by default, `7`)
- `title`
- `slug`
- `relatedTo`
- `source`
- `sourceId`
- `kind`
- `filename`
- `folderId`
- `size`
- `group`
- `groupId`
- `authorGroup`
- `authorGroupId`
- `authorId`
- `locale`
- `section`
- `status`
- `completed`
- `isPaid`
- `isUnPaid`
- `orderStatusId`

### You said something about _Tasks_...?

Say you have a lot of elements... or your callable methods are performance-intensive... or you need things to keep running even if your CLI connection is closed... or you just prefer to schedule things one-at-a-time using Tasks...

There are a few ways **Walk** might help.

#### 1. Schedule callables as Tasks using the CLI

You can use the special `--asTask` [command option](#walk-command-options) to schedule each walk step as a Task:

```shell
php yiic walk entries entries.saveEntry --asTask

php yiic walk entryIds MyHelper::myMethod --asTask
```

This will still invoke the callable once for each element or ID in the criteria, but it will do so from inside a Task
— i.e. one request per element/step.

This is nice if you want to keep track of the queue progress, or if you want to be able to conveniently re-run any steps that fail due to an error.

In the Control Panel sidebar (or [Task Manager](https://github.com/boboldehampsink/taskmanager)), these show up as `CallOnElement` and `CallOnId` tasks.

#### 2. Use a Task as a _callable_ from the CLI

You can also use any Task (from Craft or any installed plugin) as a callable in its own right:

```shell
php yiic walk assetIds ModifyMyAssetTask
```

This example would schedule a `ModifyMyAsset` task for each element or ID in the criteria.

The specified task should expect to receive an `id` setting containing the element ID.

#### 3. Use a Task as a _callable_ via the PHP methods

```php
WalkHelper::spawnTasks('ModifyMyAsset', $elementsOrIds, $settings = [], $idParam = 'id')
```

The `spawnTasks` method can be used to schedule one instance of a specified task per element or ID in the provided set.

The task is specified by class name, without the "Task" suffix, just as if you were using `craft()->tasks->createTask()`.

You can supply an array of extra settings in the `$settings` argument, which will be applied to each task.

The specified task should expect to receive an `id` setting containing the element ID. Alternatively, you can also change the name of the setting that will receive the ID of the element, using the `$idParam` argument.

### Can I use this stuff with _any_ array? Does it _have_ to be elements/IDs?

The console commands are designed to perform bulk actions on sets of Elements or IDs.

However, if you're feeling clever, you can use the `craftyArrayWalk()` helper method, **with any array**.

For example, if you have an array of email addresses, and a `processEmailAddress` service method that takes an email address as its first argument...

```php
$success = WalkHelper::craftyArrayWalk($emailAddresses, 'myService.processEmailAddress');
```

Or if you have that same list of email addresses and a custom _ProcessEmailAddressTask_ that expects an email address in the `emailAddress` setting...

```php
WalkHelper::spawnTasks('ProcessEmailAddress', $emailAddresses, $settings = [], $idParam = 'emailAddress')
```

If you want to make your own console command that walks through some other set (i.e. not Elements or Element IDs), just check out the source code of the _WalkCommand_. You'll find it pretty easy to copy/paste your way to success!

### What if I want to get a _count_ of elements in a criteria, without actually _doing_ anything to them?

Okay, why not. You can use the `walk count` command for that. Make sure to specify the Element Type using an option, or as an inline argument:

```shell
php yiic walk count entries --section=blog

php yiic walk count --type=assets --size=">42M"
```

### This is great! I still have questions.

Ask a question on [StackExchange](http://craftcms.stackexchange.com/), and ping me with a URL via email or Slack.

### What are the system requirements?

Craft 2.5+ and PHP 7.0+

### I found a bug.

Please open a GitHub Issue, submit a PR to the `dev` branch, or just email me.

* * *

#### Contributors:

  - Plugin development: [Michael Rog](http://michaelrog.com) / @michaelrog
  - Icon: [Margot Nadot](http://margotnadot.com/), via [The Noun Project](https://thenounproject.com/search/?q=walking&i=79275)

repository: aaronwaldon/Walk

repo_name: aaronwaldon/Walk