text:
# ぶんぽう (Grammar)

## XはYです

You can say things like "I am a musician" or "My major is Japanese" by using the pattern **XはYです**. For example:

> 学生です。*(I am) a student.*

> 本語です。*(My major) is Japanese.*

You'll notice that there are no subjects in these sentences like in English. That's because Japanese speakers tend to omit them when it's clear who or what they are talking about.

An example of a sentence with a subject:

> ジュリアンヌさんは学生です。*Julianne is a student.*

The は in these sentences is what's referred to as a **particle** and is pronounced "wa". Particles attach themselves to phrases and indicate how the phrases relate to the rest of the sentence.

## Question Sentences

To turn a sentence into a question, simply add か to the end of it. Note that it is not customary to write a question mark.

> ジュリアンヌさんは学生ですか。 *Is Julianne a student?*

There are sometimes "question words" that these types of sentences might contain. The question word for "what" has two pronunciations: なん and なに. なん is used right before です or a counter. なに is used before a particle.

## nounのnoun

The particle の is used to connect two nouns. It can act as the possessive or be used to make a noun more specific.

Example of being the possessive:

> ジュリアンヌさんの本  *Julianne's book*

Example of making a noun more specific:

> 大学の先生 *A college professor*

## これ　それ　あれ　どれ

これ, それ, あれ, and どれ are used to talk about things we don't know the name of. They are similar to "this" and "that" in English.

**これ** refers to a thing that is close to you:

> これはかばんです。*This is a bag.*

**それ** refers to a thing that is close to the person you're speaking to:

> それはたけしさんのさいふです。*That is Takeshi's wallet.*

**あれ** refers to something the is not close to the listener or the speaker:

> あれはジュリアンヌのじてんしゃです。*That is Julianne's bike over there.*

**どれ** means "which". When using it, が must be the following particle in question sentences.

> どれがジュリアンヌさんの自転車ですか。*Which one is Julianne's bike?*

## この　その　あの　どの　+　noun

この, その, あの, and どの are more specific than これ, それ, あれ, and どれ. Use these when you know what something is. Again, in question sentences you must use が as the following particle.

> このかばんは高いですね。　*This bag is expensive.*

> そのかばんが高いですか。　*Is that bag expensive?*

> あのかばんは高いですね。　*That bag over there is expensive.*

> どのかばんが高いですか。　*Which bag is expensive?*

## ここ　そこ　あそこ　どこ

These words represent places.

**ここ** basically means "here"; some place near the speaker:

> ジュリアンヌさんの自転車はここです。　*Julianne's bike is here.*

**そこ** means "there"; some place close to the listener:

> ジュリアンヌさんの自転車はそこです。　*Julianne's bike is there.*

**あそこ** essentially means "over there"; somewhere away from both the speaker and the listener:

> ジュリアンヌさんの家はあそこです。　*Julianne's house is over there.*

**どこ** means "where":

> ジュリアンヌさんの家はどこですか。　*Where is Julianne's house?*

## だれのnoun

The pattern **だれの\<noun>** is used to ask who something belongs to.

> これはだれのかばんですか。　*Whose bag is this?*

## noun も

The particle も essentially means "too". You use it to specify that something shares some property with a previously-mentioned thing.

> このかばんは高いです。　This bag is expensive.

> そのかばんも高いです。　That bag is *also* expensive.

## Negating Statements

To negate a statement, simply replace the ending です with じゃないです.

> これはジュリアンヌさんのくつじゃないです。　These are not Julianne's shoes.

Note that this does *not* work with adjectives.

Another way of doing this is by using じゃありません, which is more formal. じゃ is a contraction of では, which is even more formal and more appropriate for writing.

> ジュリアンヌさんは学生じゃありません。　Julianne is not a student.

> ジュリアンヌさんは学生ではありません。　Julianne is not a student.

## ~ね・~よ

You will often hear statements end with an extra ね or よ thrown in. Whether you hear these depends on how the speaker feels about the interaction with the listener.

Adding ね is equivalent to adding "right"? to the end of a sentence:

> これは肉じゃないですね。　This is not meat, right?

Adding よ is similar to adding "I tell you" or "I assure you" to the end of a statement. It's used to assure the listener of what has been said.

> それは肉じゃないですよ。　Let me assure you, that is not meat.

## Verb Conjugation: ru-verbs and u-verbs

Verbs in Japanese conjugate, or change form. Here we learn three forms:

1. Dictionary Form
2. Present Tense Affirmative
3. Present Tense Negative

There are two kinds of verbs that follow regular conjugation patterns:

1. ru-verbs
2. u-verbs

A ru-verb is a verb that ends with る. They are usually created by adding a る to the base of the word to form the dictionary form. Note that some verbs ending with る may actually be u-verbs that just happen to end with る. To conjugate a ru-verb, simply replace the る with ます or ません.

An u-verb is a verb whose dictionary form consists of the word's base and the suffix "-u" (く, む, ぬ, etc.). To conjugate an u-verb, you replace the "-u" character with an "-i" character and add the suffix ます or ません.

Examples of conjugating a ru-verb and an u-verb are listed below.

|                     	| ru-verb    	| u-verb     	|
|:-------------------:	|------------	|------------	|
|      verb base      	| たべ       	| ik         	|
|   dictionary form   	| たべる     	| いく       	|
| present affirmative 	| たべます   	| いきます   	|
|   present negative  	| たべません 	| いきません 	|
|         stem        	| たべ       	| いき       	|

It is important to remember which class each verb belongs to, especially for verbs ending with る. They may be irregular verbs, or ru-verbs, or u-verbs that happen to end with the consonant "r". Usually, if you see the vowels "a", "u", or "o" right before the final る, then it is an u-verb. If you see an "i" or "e" before the final る, then it is usually a ru-verb. There are exceptions to this rule, like かえる.

### Irregular Verbs

There are some verbs that do not follow standard conjugation rules. These are called _irregular verbs_. Two examples of this are する and くる:

|   dictionary form   	| する     	| くる     	|
|:-------------------:	|----------	|----------	|
| present affirmative 	| します   	| きます   	|
|   present negative  	| しません 	| きません 	|
|         stem        	| し       	| き       	|

These verbs are also used to form compound verbs, like べんきょうする.

## Verb Types and "Present Tense"

The "present tense" of an "action verb" either means:

1. The person regularly engages in the activity.
2. The person will, or is planning to, perform the action in the future.

For example, a habitual action would be described as follows:

> 私はよくテレビをみます。　*I often watch television.*

And a future action would be:

> 私はあしたきょうとに行きます。　*I will go to Kyoto tomorrow.*

## Particles

Nouns used in sentences generally must be followed by particles, which indicate the relations that the nouns bear to the verbs.

For example, four particles are を, で, に, and へ.

### を

The particle を indicates "direct objects", the kind of things that are directly involved in, or affected by, the event. It is pronounced "o".

> おんがくをききます。　*I listen to music.*

### で

で indicates where the event described by the verb takes place.

> としょかんで本をよみます。　*I will read books at the library.*

### に

に has many meanings, but we'll just cover two here:

1. the goal toward which things move
2. the time at which an event takes place

For example, as a goal of movement:

> 私は今日がっこうに行きません。　*I will not go to school today.*

And for specific times (the first に):

> 日曜日にきょうとに行きます。　*I will go to Kyoto on Sunday.*

Approximate time references can be made by substituting ごろ or ごろに for に.

> 十一時ごろねます。　*I will go to bed at about eleven.*

Note that you do not typically use に for relative times, such as "tomorrow" or "yesterday". You also do not use it with the word for "weekend" or for parts of the day ("in the morning", "at night", etc.). You do use it for days of the week and numerical time expressions.

### へ
へ also indicates goal of movement. It can replace に in those cases. Pronounced "e".

> 私はうちへかえります。　*I will return home.*

## Extending Invitations

You can use ません to extend an invitation. Just use the present tense negative verb plus the question particle.

> 昼ご飯を食べませんか。　*Would you like to have lunch (with me)?*

Note that you cannot use the affirmative form of a verb for this.

## Word Order

Japanese sentences are fairly flexible in the arrangement of elements that appear in them. They are mostly made of several noun-particle sequences followed by a verb or an adjective, which is followed by a sentence-final particle like か, ね, or よ. Among the noun-particle sequences, their order is mostly free.

## Frequency Adverbs

You can add a frequency adverb like まいにち, よく, or ときどき to describe how often you do something.

> 私はときどききっさてんに行きます。　*I sometimes go to the cafe.*

When describing how _infrequently_ you do sometime, you need to conclude with ません.

> 私はぜんぜんテレビを見ません。　*I do not watch television at all.*

## Xがあります/います

Xがあります means "there is/are X". This is only used for nonliving things. For living things, use Xがいます.

The particle が introduces item X. You can use this pattern to say that something is in a certain location.

> あそこにぎんこうがあります。　*There's a bank over there.*

Note that this pattern calls for the particle に instead of で for place descriptions.

You can use あります to say you have or own something:

> テレビがありません。　*I don't have a TV.*

You can also use it to say that an event will take place:

> 金曜日にクラスがあります。　*There will be class on Friday.*

## Describing Where Things Are

You can describe the location of an item relative to another item by using **XはYの\<place>です**:

> あのデパートの前です。

You can also use location words together with a verb to describe an event that occurs in a place:

> 私は学校の前でメアリーさんをまちました。　*I waited for Mary in front of the school.*

**NOTE**: both とんり and よこ mean "side-by-side" or "next to". となり is used when both things are of the same category (two people, two buildings, etc.). よこ is used when the items are distinct.

## Past Tense of です

The past tense of です looks like the following:

|               	| affirmative 	| negative          	|
|:-------------:	|-------------	|-------------------	|
| present tense 	| ~です       	| ~じゃないです     	|
|   past tense  	| ~でした     	| ~じゃなかったです 	|

## Past Tense of Verbs

The past tense of verbs looks like the following:

|               	| affirmative 	| negative          	|
|:-------------:	|-------------	|-------------------	|
| present tense 	| ~ます       	| ~ません     	|
|   past tense  	| ~ました     	| ~ませんでした 	|

## Time Durations

The duration of an activity is expresses with a bare noun, like 一時間. The noun is not followed by any particle.

> 私はここで山田さんを一時間まちました。　*I waited for Yamada here for an hour.*

For approximate time measurements, add ぐらい after ~時間.

## Quantity

If you want to add quantity words like たくさん to the direct object of a sentence, you can place it before the noun or after the particle を.

## と

The particle と has two meanings/functions. One is to connect two nouns A and B:

> 日本語と英語を話します。　*I speak Japanese and English.*

The other meaning of と is "together with". It describes with whom you do something.

> メアリーさんはスーさんと韓国に行きます。　*Mary will go to Korea with Sue.*

repository: LeftySolara/knowledge

repo_name: LeftySolara/knowledge


text:
# [Grafika](https://lv.wikipedia.org/wiki/Grafika)
intaglio, drypoint, [etching](http://www.paintshopprotutorials.co.uk/html/etching_photo_effect_gimp_.html), mezzotint, engrave, woodcut, aquatint.

## Engrave
* [plug-in-engrave](https://docs.gimp.org/en/plug-in-engrave.html).
* [Speed Tutorial Gimp](https://www.youtube.com/watch?v=zkl4MOWPFD8).

## Woodcut
* [Gimp 2.9 - How to Make a Woodcut from a Photo](https://www.youtube.com/watch?v=15ovBTK5JVU).
* [Gimp 2.9 – How to Make a Wood Burning Portrait](https://www.youtube.com/watch?v=e9MsFAaZD8s).

## Set Image mode to indexed and less than 4 colors

license: MIT

repository: janis-rullis-media/media-edit

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: janis-rullis-media/media-edit


text:
---
title: ‘Gene discordance analysis using ASTRAL on HiPerGator'
date: 2020-05-09
permalink: /posts/2020/05/RunningASTRAL/
tags:
  - hipergator
  - species tree
  - astral
  - phylogenetics
  - linux
---

Really brief background
--------

[ASTRAL](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-018-2129-y) is a method used for inferrring species tree from an input of gene trees.
The algorithm takes into account discordance among genes, by using dynamic programming. It splits the input gene tree into set of quartets and then searches for a species tree that has maximum number of each of these quartet topologies, assigning support values to each. The algorithm is really fast (takes about 2-4seconds to run) as there are predetermined  partitions instead of searching for new ones. It is statistically consistent under multi-species coalescent.

ASTRAL III  is the faster version that reduces the run time as compared to the older versions [ASTRAL](https://academic.oup.com/bioinformatics/article/30/17/i541/200803) and [ASTRAL II](https://pubmed.ncbi.nlm.nih.gov/26072508/).
Both of these method can still be found on Hipergator. The ASTRAL III paper compares and contrasts the accuracy with ASTRAL II, results are presented in a [table](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-018-2129-y/tables/1).
and are worth glancing over even if you are not a method developer. The results in the table indicate improved quartet scores.
There is a new paper in bioRxiv on [ASTRAL-PRO](https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>4727v2) that deals with gene duplication and gene loss.
If you want to learn more gene discordance theory start [here](https://academic.oup.com/sysbio/article/46/3/523/1651369) and [here](https://www.cell.com/trends/ecology-evolution/fulltext/S0169-5347(09)00084-6?)

Using ASTRAL on Hipergator, interactively
---------
Astral uses unrooted gene trees as input, and gives a unrooted species tree as output. To be specific, the input gene trees must be in newick format, can have missing taxa, and/or polytomies.
After you log in to Hipergator, type

        module spider astral

This gives the version number of Astral, currently on hipergator, the latest version is astral/5.6.2. Let's load astral now. Note we can skip the previous step, and type "module load astral" and it will default to the latest version usually.
It is always a good idea to double check and make sure the version is correct especially when reporting the version in manuscripts.

        module load astral/5.6.2

Let's assume all of your gene trees are in a single file labeled INPUTGENETREES.tre (again note that it is in newick format). For a sample input file click [here](http://NatyaHans.github.io/files/sample6gene.tre). The file has 6 gene trees in  Newick format in a single file. You can concatenate your gene trees if they are in individual files with cat command. Let's assume the extension of your gene trees is .tre, so you can use the following command"

        cat *.tre > INPUTGENETREES.tre

For the simplest ASTRAL run, type the following command

        astral -i INPUTGENETREES.tre -o OUTTREE.tre 2 > out.log

-i is flag for input file name
-o is flag for output file name, user specified name
2 defines the format
out.log saves the detailed information about the run into a log file instead of printing it on the screen, user specified name

Submitting ASTRAL jobs on Hipergator
---------
Astral is written in java and installed on hipergator so for submitting a job, you have to allocate memory. Here is a sample submission [script](http://NatyaHans.github.io/files/slurm_astral.sh) with the breakdown provided below.

`echo Working directory is $SLURM_SUBMIT_DIR` : tells you the path of working directory

`cd $SLURM_SUBMIT_DIR`: changes it to the working directory

`echo There are $SLURM_CPUS_ON_NODE cores available.` : prints out the number of cores available

`export _JAVA_OPTIONS="-Xmx300M"` : allocates 300 mb memory for the job.

If you want to increase the memory replace 300M by 1g ( for 1 gb), and 2 g for 2gb etc..

The other two lines are described as above

      module load astral

      astral -i INPUTGENETREES.tre -o OUTPUTTREE.tre 2>out.log

Astral support values
--------
For understanding the support values in ASTRAL, click [here](http://eceweb.ucsd.edu/~smirarab/2016/04/15/localpp.html) for a note from one of the developer.

Branch lengths
--------
Since Astral is a coalescent based method, the branch length on the output species tree are in coalescence units thereby measuring the level of discordance among the gene trees. A ML tree obtained by other methods (such as RAxML) has branch lengths in terms of substitutions per site.

Multi locus bootstrapping using ASTRAL
--------

For more detailed notes [click](https://github.com/smirarab/ASTRAL/blob/master/README.md)


text:
# Task Allocation using Auctions
Dynamic decentralized task allocation algorithms for multi-agent systems using a greedy auction algorithm.

Master's research at The University of Texas at Austin in the research group of Efstathios Bakolas.

The paper resulting from these simulations has been published at the Modeling, Estimation and Control Conference (MECC 2021).

To cite this work:

Braquet, M. and Bakolas E., "Greedy Decentralized Auction-based Task Allocation for Multi-Agent Systems", *Modeling, Estimation and Control Conference (MECC)*, 2021.

* For the dynamic task allocation, run `OptimalControl_DTA.m`.
* For the sensitivity analysis of the parameters, run `optimalControlParametersAnalysis.m`.

#### 2D map of the dynamic task allocation (10 agents and 10 tasks) with associated reward, cost and utility

With communication limitation:

![Alt Text](https://martinbraquet.com/wp-content/uploads/Dynamic-Task-Agent-Allocation.gif)

Without communication limitation:

![Alt Text](https://martinbraquet.com/wp-content/uploads/Dynamic-Task-Agent-Allocation-noLimit.gif)

branch_name: refs/heads/main


text:
http://omriiii.github.io/potg/

# potg
Overwatch Play of the Game screenshot generator

*master-branch* - Salsa code

*gh-branch* - Distribution code

### TO DO
* Reuse gulp-uncss
* Use ng-style instead of inline styling
* Implament screen capping option -> Both all of screen and Gyazo "select" type.
* Change user's name to "Drag me"
* Add a font modifier and a color modifier and switch the "x-top" and "x-left"'s.
* Flip vk0 and consider changing the images of the heros to some other images with more potential

### Possibilites for later
* Add a loading animation thing
* Look into inset shadows for the player title (`.dos-string`) https://css-tricks.com/adding-stroke-to-web-text/
* Put two nested `ng-repeat`s where possible (left side of the menu)
* Advanced menu with: `font-size`, `color`, direct control of the caption offset and  `background` coordinates config maybe :0

repository: omriiii/potg

repo_name: omriiii/potg


text:
[![Zorium](./icons/zorium_logo.png)](https://zorium.zolmeister.com/)

## [Zorium](https://zorium.zolmeister.com/) - The CoffeeScript Web Framework

#### [zorium.zolmeister.com](https://zorium.zolmeister.com/)

(╯°□°)╯︵ ┻━┻
v2.0.0

### Features

  - First Class [RxJS Observables](https://github.com/Reactive-Extensions/RxJS)
  - Built for Isomorphism (server-side rendering)
  - Standardized [Best Practices](https://zorium.zolmeister.com/best-practices)
  - [Material Design Components](https://zorium.zolmeister.com/paper)
  - Production-ready [Seed Project](https://github.com/Zorium/zorium-seed)
  - It's just CoffeeScript, no magic

### Example

```coffee
z = require 'zorium'

class Icon
  render: ({children}) ->
    z '.icon', children

class AppComponent
  constructor: ->
    @state = z.state
      name: 'Zorium'

  render: =>
    {name} = @state.getValue()

    z '.zorium',
      z 'p.text',
        z Icon, 'fireworks'
        "The Future -#{name}"

z.render new AppComponent(), document.body
```

### Documentation

[zorium.zolmeister.com](https://zorium.zolmeister.com/)

### Installation

```bash
yarn add zorium
```

### Contribute

```bash
yarn install
yarn test
```

### Changelog
  - 1.x -> 2
    - [breaking] deprecate `z.ev()`
    - [breaking] deprecate `attributes` property for manually specifying attributes
    - [breaking] deprecate `z.router`
    - [breaking] upgrade to RxJS v5
    - [breaking] remove requestAnimationFrame and Promise polyfill
    - add support for rendering static classes as components
    - migrate backend from [virtual-dom](https://github.com/Matt-Esch/virtual-dom) to [dio.js](https://github.com/thysultan/dio.js)

repository: Zorium/zorium

gha_language: CoffeeScript

gha_license_id: MIT

repo_name: Zorium/zorium


text:
# GraphRicciCurvature
A Python library to compute Discrete Ricci curvature and Ricci flow on NetworkX graph.

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/saibalmars/GraphRicciCurvature/master?filepath=notebooks%2Ftutorial.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/saibalmars/GraphRicciCurvature/blob/master/notebooks/tutorial.ipynb)
[![Build Status](https://travis-ci.com/saibalmars/GraphRicciCurvature.svg?branch=master)](https://travis-ci.com/saibalmars/GraphRicciCurvature)
[![Documentation Status](https://readthedocs.org/projects/graphriccicurvature/badge/?version=latest)](https://graphriccicurvature.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://pepy.tech/badge/graphriccicurvature)](https://pepy.tech/project/graphriccicurvature)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

-----
This work computes the **Ollivier-Ricci Curvature**[Ni], **Ollivier-Ricci Flow**[Ni2,Ni3] and **Forman-Ricci Curvature**(or **Forman curvature**)[Sreejith].

Curvature is a geometric property to describe the local shape of an object. If we draw two parallel paths on a surface with positive curvature like a sphere, these two paths move closer to each other while for a negatively curved surface like a saddle, these two paths tend to be apart.

In [Ni], we observe that the edge Ricci curvature plays an important role in the graph structure. An edge with positive curvature represents an edge within a cluster, while a negatively curved edge tent to be a bridge within clusters. Also, negatively curved edges are highly related to graph connectivity, with negatively curved edges removed from a connected graph, the graph soon become disconnected.

Ricci flow is a process to uniformized the edge Ricci curvature of the graph. For a given graph, the Ricci flow gives a "Ricci flow metric" on each edge as edge weights, such that under these edge weights, the Ricci curvature of the graph is mostly equal everywhere. In [Ni3], this "Ricci flow metric" is shown to be able to detect communities.

Both Ricci curvature and Ricci flow metric can act as a graph fingerprint for graph classification. The different graph gives different edge Ricci curvature distributions and different Ricci flow metric.

Video demonstration of Ricci flow for community detection:

## Package Requirement

* [NetworkX](https://github.com/networkx/networkx) (Based Graph library)
* [NetworKit](https://github.com/kit-parco/networkit) >= 6.1 (Shortest path algorithm)
* [CVXPY](https://github.com/cvxgrp/cvxpy) (LP solver for Optimal transportation)
* [NumPy](https://github.com/numpy/numpy) (CVXPY support)
* [POT](https://github.com/rflamary/POT) (For approximate Optimal transportation distance)

## Installation

### Installing via pip

```bash
pip3 install [--user] GraphRicciCurvature
```

- From version 0.4.0, NetworKit is required to compute shortest path for density distribution. If the installation of NetworKit failed, please refer to [NetworKit' Installation instructions](https://github.com/networkit/networkit#installation-instructions).

### Upgrading via pip

To run with the latest code for the best performance, upgrade GraphRicciCurvature to the latest version with pip:
```bash
pip3 install [--user] --upgrade GraphRicciCurvature
```

## Getting Started
- Check the jupyter notebook tutorial on [nbviewer](https://nbviewer.jupyter.org/github/saibalmars/GraphRicciCurvature/blob/master/notebooks/tutorial.ipynb) or [github](notebooks/tutorial.ipynb) for a walk through for the basic usage of Ricci curvature, Ricci flow, and Ricci flow for community detection.
- Or you can run it in directly on [binder](https://mybinder.org/v2/gh/saibalmars/GraphRicciCurvature/master?filepath=notebooks%2Ftutorial.ipynb) (no account required) or [Google colab](https://colab.research.google.com/github/saibalmars/GraphRicciCurvature/blob/master/notebooks/tutorial.ipynb) (Faster but Google account required).
- Check the [Documentations](https://graphriccicurvature.readthedocs.io/en/latest/).
- **Try out [sample graphs](https://github.com/saibalmars/RicciFlow-SampleGraphs) with precomputed Ricci curvature/flow.**

## Simple Example

```python
import networkx as nx
from GraphRicciCurvature.OllivierRicci import OllivierRicci
from GraphRicciCurvature.FormanRicci import FormanRicci

print("\n- Import an example NetworkX karate club graph")
G = nx.karate_club_graph()

print("\n===== Compute the Ollivier-Ricci curvature of the given graph G =====")
# compute the Ollivier-Ricci curvature of the given graph G
orc = OllivierRicci(G, alpha=0.5, verbose="INFO")
orc.compute_ricci_curvature()
print("Karate Club Graph: The Ollivier-Ricci curvature of edge (0,1) is %f" % orc.G[0][1]["ricciCurvature"])

print("\n===== Compute the Forman-Ricci curvature of the given graph G =====")
frc = FormanRicci(G)
frc.compute_ricci_curvature()
print("Karate Club Graph: The Forman-Ricci curvature of edge (0,1) is %f" % frc.G[0][1]["formanCurvature"])

# -----------------------------------
print("\n=====  Compute Ricci flow metric - Optimal Transportation Distance =====")
G = nx.karate_club_graph()
orc_OTD = OllivierRicci(G, alpha=0.5, method="OTD", verbose="INFO")
orc_OTD.compute_ricci_flow(iterations=10)

```

More example in [example.py](example.py).

----
## Related Works

- Curvature Graph Network (ICLR2020)  [openreview](https://openreview.net/forum?id=BylEqnVFDB), [code](https://github.com/yeze16159/CurvGN)

## Reference

[Ni]: Ni, C.-C., Lin, Y.-Y., Gao, J., Gu, X., and Saucan, E. 2015. "Ricci curvature of the Internet topology" (Vol. 26, pp. 2758–2766). Presented at the 2015 IEEE Conference on Computer Communications (INFOCOM), IEEE. [arXiv](https://arxiv.org/abs/1501.04138)

[Ni2]: Ni, C.-C., Lin, Y.-Y., Gao, J., and Gu, X. 2018. "Network Alignment by Discrete Ollivier-Ricci Flow", Graph Drawing 2018, [arXiv](https://arxiv.org/abs/1809.00320)

[Ni3]: Ni, C.-C., Lin, Y.-Y., Luo, F. and Gao, J. 2019. "Community Detection on Networks with Ricci Flow", Scientific Reports, [arXiv](https://arxiv.org/abs/1907.03993)

[Sreejith]: Sreejith, R. P., Karthikeyan Mohanraj, Jürgen Jost, Emil Saucan, and Areejit Samal. 2016. “Forman Curvature for Complex Networks.” Journal of Statistical Mechanics: Theory and Experiment 2016 (6). IOP Publishing: 063206. [arxiv](https://arxiv.org/abs/1603.00386)

## Contact

Please contact [Chien-Chun Ni](http://www3.cs.stonybrook.edu/~chni/).

## Cite

If you use this code in your research, please considering cite our paper:

```
@article{ni2019community,
  title={Community detection on networks with ricci flow},
  author={Ni, Chien-Chun and Lin, Yu-Yao and Luo, Feng and Gao, Jie},
  journal={Scientific reports},
  volume={9},
  number={1},
  pages={1--12},
  year={2019},
  publisher={Nature Publishing Group}
}
```

repository: fusion-research/GraphRicciCurvature

repo_name: fusion-research/GraphRicciCurvature


text:
# Introduction

This repository contains scripts to build [Azure IoT Edge](https://github.com/azure/iotedge) on SUSE Linux.

The scripts were tested on Azure using the virtual machine image SUSE Linux Enterprise Server (SLES) 12 SP4 (Standard Support).

# Usage

The IP address below can be obtained from the output of `tail /etc/hosts`.

```
sudo zypper -n install git
git clone https://github.com/vjrantal/iotedge-suse-build.git && cd iotedge-suse-build
sudo ./prepare.sh
sudo systemctl start docker
sudo docker build -t vjrantal/iotedge-suse-build . --add-host=smt-azure.susecloud.net:<IP_ADDRESS>
sudo docker run --add-host=smt-azure.susecloud.net:<IP_ADDRESS> -it vjrantal/iotedge-suse-build
```

After steps above, the RPM packages are available at:

```
/iotedge/edgelet/hsm-sys/azure-iot-hsm-c/build/libiothsm-std-1.0.8-Linux.rpm
/root/rpmbuild/RPMS/x86_64/iotedge-1.0.8-0.1.dev.x86_64.rpm
```

Those packages can then be installed using `zypper`.

# Features tested

* Installation of the rpm packages with zypper succeeded

  * During installation, got a warning about packages being unsigned, but it was possible to ignore the warning:

  ```
  Signature verification failed [6-File is unsigned]
  ```

  * Package manager reported a problem about `shadow-utils`, which seems to have different package name on SUSE Linux, but it was possible to ignore this problem during installation:

  ```
  Problem: nothing provides shadow-utils needed by iotedge-1.0.8-0.1.dev.x86_64
  ```

* After installing packages, it was possible to run `sudo systemctl restart iotedge` to start IoT Edge

* It was possible to run `sudo systemctl enable iotedge` to make IoT Edge run after reboot and it was tested that this functionality worked

* IoT Edge runtime was able to start and connect to IoT Hub and deployment of the Marketplace module `Simulated Temperature Sensor` succeeded

* The `Simulated Temperature Sensor` was able to start and sending messages to IoT Hub worked

# Disclaimer

While this repository contains an example about how to build IoT Edge on SUSE Linux Enterprise Server 12 SP4, the author does not advice anything about the usage of the build results from licensing perspective.

At the time of writing this example, SUSE Linux was not in the list of [officially supported systems by Microsoft](https://docs.microsoft.com/en-us/azure/iot-edge/support).

repository: AshokPeddakotla-MSFT/iotedge-suse-build

repo_name: AshokPeddakotla-MSFT/iotedge-suse-build


text:
---
layout: base
title:  'Statistics of Gender in UD_Faroese-FarPaHC'
udver: '2'
---

## Treebank Statistics: UD_Faroese-FarPaHC: Features: `Gender`

This feature is universal.
It occurs with 1 different values: `Neut`.

19 tokens (0%) have a non-empty value of `Gender`.
2 types (0%) occur at least once with a non-empty value of `Gender`.
1 lemmas (17%) occur at least once with a non-empty value of `Gender`.
The feature is used with 1 part-of-speech tags: <tt>PRON</tt> (19; 0% instances).

### `PRON`

19 <tt>PRON</tt> tokens (0% of all `PRON` tokens) have a non-empty value of `Gender`.

The most frequent other feature values with which `PRON` and `Gender` co-occurred: <tt>Case</tt><tt>=Nom</tt> (19; 100%).

`PRON` tokens may have the following values of `Gender`:

* `Neut` (19; 100% of non-empty `Gender`): tað
* `EMPTY` (6034): hann, teir, eg, tað, tit, tí, tú, tykkum, honum, hansara

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

gha_language: HTML

repo_name: UniversalDependencies/docs


text:
---
layout: page
title: About
subtitle: Reading Club Rocks
permalink: /about/
---

Reading Club is an extrapolation of our [computational neuroscience reading club](https://github.com/neuronstar/spiking-neuron-models).

We have successfully organized several series of events. With more events to come, we are becoming more experienced with small reading groups.

Contact us on GitHub: [reading-club/reading-club.github.io](https://github.com/reading-club/reading-club.github.io/issues/new)


text:
---
Order: 30
Title: How to publish code coverage reports
---
This document describes known issues pushing code coverage reports during Cake.Recipe builds.

## Coveralls Reports

If your project target is `netcoreapp` or `netstandard` and you are not seeing coveralls reports.  You may be seeing a step in your build server logs like the the one below.

``` powershell
========================================
Upload-Coveralls-Report
========================================
No coverage statistics files.
```

OpenCover doesn't support the [portable debug type]((https://github.com/dotnet/core/blob/e6049bb60307d987e044c39a106e0d6cf98857a3/Documentation/diagnostics/portable_pdb.md)), which is the default of a .NET Core project. The resolution is to change or add a `DebugType` node in your `netcoreapp` test project and **all** projects it covers.  Acceptable options are `full` or `pdbonly`.  After adding one of the following xml tags to each project in your solution that tests, or is tested by a `netstandard` or `netcoreapp` project, OpenCover will produce a valid coverage file and upload to coveralls.

``` xml
  <PropertyGroup>
    <DebugType>full</DebugType>
  </PropertyGroup>
```
or
``` xml
  <PropertyGroup>
    <DebugType>pdbonly</DebugType>
  </PropertyGroup>
```

branch_name: refs/heads/develop

gha_language: C#


text:
# flareact/head

You can insert custom elements into your page's `<head>` tag by using the `flareact/head` component.

This is powered by [react-helmet](https://github.com/nfl/react-helmet/):

```js
import Head from "flareact/head";

export default function Index() {
  return (
    <div>
      <Head>
        <title>My page title</title>
      </Head>
      <h1>Hello, world.</h1>
    </div>
  );
}
```

repository: flareact/flareact

branch_name: refs/heads/canary

gha_language: JavaScript

repo_name: flareact/flareact


text:
---
_id: 5ef88bf1d58ae7003f7d0739
title: "Repository Pattern in ASP.NET Core – Ultimate Guide"
url: 'https://www.codewithmukesh.com/blog/repository-pattern-in-aspnet-core/'
category: articles
slug: 'repository-pattern-in-aspnet-core-ultimate-guide'
user_id: 5ece91c4f2bd8f0036781938
username: 'iammukeshm'
createdOn: '2020-06-29T12:24:17.169Z'
tags: [asp.net-core]
---

In this extensive guide, we will go through everything you will need to know about Repository Pattern in ASP.NET Core, Generic Repository Patterns, Unit of Work and related topics. We will build a project right from scratch where we implement a clean architecture to access data.

We will cover the following topics.
1. Repository Pattern?
2. Benefits
3. Generic Repository Pattern
4. Implementation in ASP.NET Core WebAPI along-with EFCore
5.Unit Of Work for Commiting Changes to the DB
and more..

repository: dotnetweekly/dnw-gatsby

repo_name: dotnetweekly/dnw-gatsby


text:
famous-animatedicon
==========

Animated icon for famo.us.

Proof of concept, do whatever you want with it.

![animatedicon](screenshot.gif)

### [View the demo here](https://rawgit.com/IjzerenHein/famous-animatedicon/master/examples/demo/index.html)

## Contact
- 	@IjzerenHein
- 	http://www.gloey.nl
-<EMAIL_ADDRESS>
© 2014 - Hein Rutjes

repository: wiltonlazary/famous-animatedIcon

repo_name: wiltonlazary/famous-animatedIcon


text:
# Counter sample

This sample will show you how to create a counter.

## Model

The model will be a simple record holding a value.

```fsharp
type Model =
  { Value: int
  }

  /// Static member giving back an init Model
  static member Initial =
    { Value = 0 }
```

## Actions

There are three actions for the counter:
* Add 1 to the current value.
* Substract 1 to the current value.
* Reset the value to 0.

```fsharp
type Actions =
  | Add
  | Sub
  | Reset
```

## Update

```fsharp
let update model action =
  match action with
  // Add 1 to the counter Value
  | Add ->
      { model with Value = model.Value + 1 }
  // Substract 1 to the counter Value
  | Sub ->
      { model with Value = model.Value - 1 }
  // Set the counter Value to 0
  | Reset ->
      { model with Value = 0 }
```

## View

For the view, we create an helper function `simpleButton` in order to make the final view cleaner and avoid to repeat ourself.

```fsharp
let voidLinkAction<'T> : Attribute<'T> = property "href" "javascript:void(0)"
let simpleButton txt action =
  div
    [ classy "column is-narrow" ]
    [ a
        [ classy "button"
          voidLinkAction<Actions>
          onMouseClick(fun _ ->
            action
          )
        ]
        [ text txt ]
    ]

let view model =
  div
    [ classy "columns is-vcentered" ]
    [
      div
        [ classy "column is-narrow"
          Style [ "width", "170px" ]
        ]
        [ text (sprintf "Counter value: %i" model.Value) ]
      simpleButton "+1" Add
      simpleButton "-1" Sub
      simpleButton "Reset" Reset
    ]
```

repository: fable-compiler/fable-arch

gha_language: F#

repo_name: fable-compiler/fable-arch


text:
# chrome.topSites - Basic

This sample demonstrates using the `chrome.topSites` API to get the user's most visited sites.

## Overview

The extension uses `chrome.topSites.get` to get the user's most visited sites, and then renders them in the popup.

## Running this extension

1. Clone this repository.
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
3. Click the extension's action icon.

repository: GoogleChrome/chrome-extensions-samples

repo_name: GoogleChrome/chrome-extensions-samples


text:
## Table of contents
* [General info](#general-info)
* [Technologies](#technologies)
* [Prerequisites](#prerequisites)
* [Setup](#setup)
* [Run](#run)

## General info
This script will create a new public Github repo by using a few variables and manual input of your API token for sanity reasons.

## Technologies
Project is created with:
* VSCodium
* Shell

## Prerequisites
* Your .pub ssh key tied to your Github account.
* Generated Github Personal Access Token.

## Setup
To run then project, clone this repo and make sure the .sh file is executable

```
$ cd create-repo/ && chmod +x gitcreate.sh
```

And replace these variables in the script:

```
VARIABLES
NEW_REPO_NAME="YOUR_NEW_REPO_NAME"
GIT_USER="YOUR_USER"
GIT_EMAIL="YOUR_EMAIL"
```
## Run
Start with:

```
$ ./gitcreate.sh
```

## TO DO
Make the script read sensitive data from an encrypted file.

repository: petroffsvetoslav/create-repo

gha_language: Shell

repo_name: petroffsvetoslav/create-repo


text:
---
layout: post
title: "Hyper-parameters tuning practices: learning rate, batch size, momentum, and weight decay"
# subtitle:
# image: /img/avatar-icon.jpg
tag: [practice, opt_practice]
# bigimg:
---

Tuning the hyper-parameters of a deep learning (DL) model by grid search or random search is computationally expensive and time consuming. This technical report gives several practical suggestions and steps to choose the optimal hyper-parameters.

Some prior knowledge to fully understand this technical report:
1. Overfitting/Underfitting
2. Learning Rate (LR)
3. Batch Size (BS)
4. Momentum
5. Weight Decay (WD)

# 1. Objective:
Review the approach to tune the hyper-parameters that significantly reduce training time and improves performance.

# 1-1. Where to find the clues to tune the hyper-parameters?
The test/validation loss is a good indicator of the network's convergence and should be examined for clues. In the report, the test/validation loss is used to provide insights on the training process and the final test accuracy is used for comparing performance.

# 2. The effect of the hyper-parameters
A well tuned machine learning model should be neither underfitting nor overfitting.

![Overfitting_underfitting](/img/post_img/2020-04-13-hyper-parameters-tuning-practices/overfitting_underfitting.png)

When the model is under capacity, it can't fit well the distribution of data. When the model is too complex, it can over fit the distribution of data and have low capacity in generalization.

In practice, we raise the complexity of model to fit the training data and use the regularization techniques to overcome the overfitting. Here is a table to summarize the effect of each hyper-parameter.

|  | Large value | Small value |
| :------ |:--- | :--- |
| Learning rate | Increase regularization
 Increase training speed
 Cause instability | Cause overfitting
| Batch size | Add less regularization | Add more regularization |
| Momentum | Closely related to LR ||
| Weight decay | Increase regularization
 Cause instability
| Decrease regularization |

### Attention:
The high level of the amount of regularization can help reduce the overfitting, but it could cause instability of model when passing the limitation. So we have to balance the amount of regularization.

General principle: reducing other form of regularization and regularizing with large learning rates makes training significantly more efficient.

# 3. How to find a good set of hyper-parameters with a given dataset and architecture?

1. Learning rate (LR): Perform a learning rate range test to find the maximum learning rate.
2. Total batch size (TBS): A large batch size works well but the magnitude is typically constrained by the GPU memory.
3. Momentum: Short runs with momentum values of 0.99, 0.97, 0.95, and 0.9 will quickly show the best value for momentum.
4. Weight decay (WD): This requires a grid search to determine the proper magnitude.

## 3-1. Learning rate test

In the LR range test, training starts with a small learning rate which is slowly increased linearly throughout a pre-training run. When starting with a small learning rate, the network begins to converge and, as the learning rate increases, it eventually becomes too large and causes the test/validation loss to increase and the accuracy to decrease. The learning rate at this extrema is the largest value.

There are several ways one can choose the minimum learning rate bound:

1. a factor of 3 or 4 less than the maximum bound
2. a factor of 10 or 20 less than the maximum bound if only one cycle is used,
3. by a short test of hundreds of iterations with a few initial learning rates and pick the largest one that allows convergence to begin without signs of overfitting.

## 3-2. Grid search for weight decay
When LR, BS, and Momentum are fixed, test 1e-3, 1e-4, 1e-5 and 0 as weight decay value and choose the best one.

# 4. Conclusion
This article summarizes:
1. The effect of LR, BS, Momentum, and WD
2. The steps to choose the four hyper-parameters

*If you wish to have more details and explanations with experiments, please read the technical report [1].*

# Ref:
[1] A disciplined approach to neural network hyper-parameters: Part 1 - learning rate, batch size, momentum, and weight decay


text:
Laravel Favorites Plugin
============

[![Build Status](https://travis-ci.org/sugar-agency/laravel-favorites.svg?branch=master)](https://travis-ci.org/sugar-agency/laravel-favorites)
[![Latest Stable Version](https://poser.pugx.org/sugar-agency/laravel-favorites/v/stable.svg)](https://packagist.org/packages/sugar-agency/laravel-favorites)
[![License](https://poser.pugx.org/sugar-agency/laravel-favorites/license.svg)](https://packagist.org/packages/sugar-agency/laravel-favorites)

Trait for Laravel Eloquent models to allow easy implementation of a "like" or "favorite" or "remember" feature.
Based heavily on rtconner/laravel-likeable.

## Composer Install

	composer require sugar/laravel-favorites

## Install and then run the migrations

```php
'providers' => [
	\Sugar\Favorites\FavoritesServiceProvider::class,
],
```

```bash
php artisan vendor:publish --provider="Sugar\Favorites\FavoritesServiceProvider"
php artisan migrate
```

#### Setup your models

```php
class Article extends \Illuminate\Database\Eloquent\Model {
	use \Sugar\Favorites\Likeable;
}
```

## Configuration file

After installation, the config file is located at *config/favorites.php*
You can :
* enable session fallback for likes
* define the lifetime (in minutes) for the command favorites:clean
* define if the command favorites:clean should delete only session likes

## Likeable Trait

#### Like model

```php
$article->like(); // like the article for current user / session
$article->like($myUserId, $false); // like the article for specific user
```

#### Unlike model

```php
$article->unlike(); // like the article for current user / session
$article->unlike($myUserId, $false); // unlike the article for specific user
```

#### Like count

```php
$article->likeCount; // get count of likes
$article->getLikeCountByDate('2012-01-30'); // Count likes for a specific date
$article->getLikeCountByDate('2012-01-30', '2016-01-30'); // Count likes for a date range
```

#### Check if Model is currently liked

```php
$article->liked(); // check if currently logged in user or session user liked the article
$article->liked($myUserId, $false);
```

#### Get collection of existing likes

```php
$article->likes; // Iterable Illuminate\Database\Eloquent\Collection of existing likes
```

#### Find only articles where user liked them
```php
Article::whereLikedBy()->get(); // for the current user / session
Article::whereLikedBy($myUserId, false)->get(); // for a specific user
```

## Command

#### Delete likes after a certain amount of time
Because someone's favorite could be 'outdated' and not representative anymore.
There is a command for that. The time after which a like is outdated can be set in the config, also you can define if it should only delete session likes
```sh
php artisan favorites:clean
```

## Helper class
In order to convert session likes to user likes (for example after a visitor registers on you site) you need to use the Helper class.
This workaround is nescessary because session id's are regenerated after login/logout.

```php
class AuthController extends Controller {
    use AuthenticatesAndRegistersUsers {
        login as traitlogin;
        register as traitregister;
    }
    use ThrottlesLogins;

    public function login(Request $request, \Sugar\Favorites\Helper $helper) {
        $session_id = $helper->sessionId();
        $return = $this->traitlogin($request);
        if(Auth::check()){
            $helper->convertSessionToUserLikes($session_id, Auth::user()->id);
        }
        return $return;
    }
    public function register(Request $request, \Sugar\Favorites\Helper $helper){
        $session_id = $helper->sessionId();
        $return = $this->traitregister($request);
        if(Auth::check()){
            $helper->convertSessionToUserLikes($session_id, Auth::user()->id);
        }
        return $return;
    }
    ...
}
```

## Credits
 - Gregory Claeyssens - http://sugar.gent
 - Robert Conner - http://smartersoftware.net

repository: OlegDemkiv/laravel-favorites

repo_name: OlegDemkiv/laravel-favorites


text:
# Ackley function

The Ackley function is defined as:
``f(x) = -a*exp(-b\sqrt{\frac{1}{d}\sum_{i=1}^d x_i^2}) - exp(\frac{1}{d} \sum_{i=1}^d cos(cx_i)) + a + exp(1)``
Usually the recommended values are: ``a =  20``, ``b = 0.2`` and ``c =  2\pi``

Let's see the 1D case.

```@example ackley
using Surrogates
using Plots
default()
```

Now, let's define the `Ackley` function:

```@example ackley
function ackley(x)
    a, b, c = 20.0, -0.2, 2.0*π
    len_recip = inv(length(x))
    sum_sqrs = zero(eltype(x))
    sum_cos = sum_sqrs
    for i in x
        sum_cos += cos(c*i)
        sum_sqrs += i^2
    end
    return (-a * exp(b * sqrt(len_recip*sum_sqrs)) -
            exp(len_recip*sum_cos) + a + 2.71)
end
```

```@example ackley
n = 100
lb = -32.768
ub = 32.768
x = sample(n, lb, ub, SobolSample())
y = ackley.(x)
xs = lb:0.001:ub
scatter(x, y, label="Sampled points", xlims=(lb, ub), ylims=(0,30), legend=:top)
plot!(xs, ackley.(xs), label="True function", legend=:top)
```

```@example ackley
my_rad = RadialBasis(x, y, lb, ub)
my_krig = Kriging(x, y, lb, ub)
my_loba = LobachevskySurrogate(x, y, lb, ub)
```

```@example ackley
scatter(x, y, label="Sampled points", xlims=(lb, ub), ylims=(0, 30), legend=:top)
plot!(xs, ackley.(xs), label="True function", legend=:top)
plot!(xs, my_rad.(xs), label="Polynomial expansion", legend=:top)
plot!(xs, my_krig.(xs), label="Lobachevsky", legend=:top)
plot!(xs, my_loba.(xs), label="Kriging", legend=:top)
```

The fit looks good. Let's now see if we are able to find the minimum value using
optimization methods:

```@example ackley
surrogate_optimize(ackley,DYCORS(),lb,ub,my_rad,UniformSample())
scatter(x, y, label="Sampled points", xlims=(lb, ub), ylims=(0, 30), legend=:top)
plot!(xs, ackley.(xs), label="True function", legend=:top)
plot!(xs, my_rad.(xs), label="Radial basis optimized", legend=:top)
```

The DYCORS methods successfully finds the minimum.


text:
# Awesome Telephony [![Awesome](https://awesome.re/badge.svg)](https://awesome.re)

> A curated list of internet telephony resources and software

## Contents

- [Service Providers](#internet-telephony-service-providers)
- [SIP Clients](#sip-clients)
- [SIP Servers](#pbx-servers)
- [Monitoring and Capturing](#monitoring-and-capturing)
- [Auditing](#auditing)
- [Containers](#containers)
- [Reading](#reading)

## Internet Telephony Service Providers

- [Twilio](https://www.twilio.com/)
- [Signalwire](https://signalwire.com/)
- [Voxbone](https://www.voxbone.com/)

## SIP Clients

- [microsip](https://www.microsip.org/) open source portable SIP softphone based on PJSIP stack for Windows OS
- [Telephone](https://github.com/64characters/Telephone) MacOS SIP client
- [baresip](https://github.com/baresip/baresip) modular SIP User-Agent with audio and video support
- [linphone-android](https://github.com/BelledonneCommunications/linphone-android) Linphone.org mirror for linphone-android
- [linphone-iphone](https://github.com/BelledonneCommunications/linphone-iphone) Mirror of linphone-iphone

## PBX Servers

- [Asterisk](https://github.com/asterisk/asterisk) Official Asterisk PBX repository
- [FreeSWITCH](https://github.com/signalwire/freeswitch) Software Defined Telecom Stack
- [Kamailio](https://github.com/kamailio/kamailio) Open Source SIP Server for large VoIP and real-time communication platforms
- [Routr](https://github.com/fonoster/routr) Routr: Next-generation SIP Server

## Monitoring and Capturing

- [homer](https://github.com/sipcapture/homer) 100% Open-Source SIP / VoIP Packet Capture & Monitoring
- [sngrep](https://github.com/irontec/sngrep) Ncurses SIP Messages flow viewer

## Auditing

- [asterisklint](https://github.com/ossobv/asterisklint) Asterisk PBX configuration syntax checker
- [sippts](https://github.com/Pepelux/sippts) Set of tools to audit SIP based VoIP Systems
- [Mr.SIP](https://github.com/meliht/Mr.SIP) SIP-Based Audit and Attack Tool
- [sipvicious](https://github.com/EnableSecurity/sipvicious) SIPVicious OSS is a set of security tools that can be used to audit SIP based VoIP systems.
- [soup](https://github.com/Jfaler/soup) SIP stress testing utility (call flooder)

## Containers

- [Asterisk Alpine](https://github.com/andrius/asterisk) Asterisk PBX in Docker on Alpine Linux.
- [docker-freepbx](https://github.com/tiredofit/docker-freepbx)  Dockerized FreePBX 15 w/Asterisk 17, Seperate MySQL Database support, and Data Persistence and UCP
- [freeswitch-container](https://github.com/BetterVoice/freeswitch-container) Dockerized FreeSWITCH instance

## Reading

- [Asterisk: The Definitive Guide, 5th Edition](https://www.oreilly.com/library/view/asterisk-the-definitive/9781492031598/?)
- [Practical Asterisk 1.4 and 1.6: From Beginner to Expert](http://the-asterisk-book.com/1.6/)
- [Hacking VoIP: Protocols, Attacks, and Countermeasures](https://www.goodreads.com/book/show/2453450.Hacking_VoIP)
- [RTP: Audio and Video for the Internet](https://www.goodreads.com/book/show/1807875.RTP)

## Contribute

Contributions welcome! Read the [contribution guidelines](contributing.md) first.

repository: simhaonline/awesome-telephony

repo_name: simhaonline/awesome-telephony


text:
# UnityLearningCar
An extremely simple evolutionary neural network that features little cars learning how to drive

Note that a folder called "Library", found in Unity projects, isn't in this repository. If you choose to use project, you'll need to copy that folder from another Unity project.

Interesting things to note:

1. I needs to be run in the editor; for whatever reason, the cars do not move at all in a compiled version of this program
2. They take a very long time to learn anything - I've never actually seen them complete the track
3. They often spin around in circles - the reason for this is that this is technically a way to increase the distance traveled
      In order to mitigate that, I changed the scoring method to be as follows: distance * displacement from the starting point, because a spinning car will have a very small displacement. It only helps a little bit.
4. No, this is not a proper NEAT algorithm at all. All learning is purely random luck based on copying the weights of the car with the highest score and then shifting them a little.

repository: rudra-sett/UnityLearningCar

repo_name: rudra-sett/UnityLearningCar


text:
## Peatio 2.5.0 (August 7, 2020) ##

### Overview ###

We are pleased to present Peatio Open Source 2.5.0.

This release notes is must-read for migrating from older versions.

### Breaking changes ###

- Rewrite deposit collection flow [\#2636](https://github.com/openware/peatio/pull/2636) ([mnaichuk](https://github.com/mnaichuk))

  * Remove amqp publish and add new deposit state

  * Remove amqp deposit workers (deposit_collection and deposit_collections_fees daemons)

  * Introduce SQL based deposit daemon

  * Add deposit collection flow documentation

  Documentation for [new deposit collection flow](https://github.com/openware/peatio/blob/master/docs/peatio/deposits_flow.md)

- Remove old Peatio admin panel [\#2523](https://github.com/openware/peatio/pull/2523) ([mnaichuk](https://github.com/mnaichuk))

### New Features ###

- Feature: PnL calculation for traders ([calj](https://github.com/calj))
  * Uses deposits, withdrawals, trades, adjustments and simple transfers
  * Supports multi-level conversions

  Increase time precision to milliseconds for deposits, withdrawals, trades and adjustments
  Documentation for [PNL calculation](https://github.com/openware/peatio/blob/master/docs/peatio/pnl_calculation.md)

- Move data from main database to archive database [\#2632](https://github.com/openware/peatio/pull/2632) ([mnaichuk](https://github.com/mnaichuk))

  * Add stored procedure execution from rake task

  * Delete old cancelled orders without trades

  * Add copy orders to the archive database

  * Close orders older than MAX_AGE

  Documentation list:
    1. [Order close job](https://github.com/openware/peatio/blob/master/docs/tasks/order_close.md)
    2. [Order archive job](https://github.com/openware/peatio/blob/master/docs/tasks/order_archive.md)
    3. [Order liabilities compact job](https://github.com/openware/peatio/blob/master/docs/tasks/order_liabilities_compact.md)

- AML integration [\#2589](https://github.com/openware/peatio/pull/2589) ([mnaichuk](https://github.com/mnaichuk))

  * Add AMLplugin system
  * Add AML functions for Beneficiary model
  * Store deposits source addresses
  * Add admin beneficiary api
  * Add refund model

- Add peatio electrum gem [\#2554](https://github.com/openware/peatio/pull/2554) ([calj](https://github.com/calj))

- Add wallet balances. Add cron job for wallet balances update ([mnaichuk](https://github.com/mnaichuk))

  Add CronJob for periodic call and save platform wallets balances to the DB. Balances are updated every minute.

### Enhancements ###

- Add possibility to import and export Operation::Accounts [\#2721](https://github.com/openware/peatio/pull/2721) ([dpatsora](https://github.com/dpatsora))
- Add export:configs Rake task \(\#2693\) [\#2706](https://github.com/openware/peatio/pull/2706) ([mnaichuk](https://github.com/mnaichuk))
- Optimize PnL main query [\#2688](https://github.com/openware/peatio/pull/2688) ([calj](https://github.com/calj))
- Trigger custom image build [\#2695](https://github.com/openware/peatio/pull/2695) ([josadcha](https://github.com/josadcha))
- Update CI to build images for branches matching {fix,integration}/\* [\#2677](https://github.com/openware/peatio/pull/2677) ([calj](https://github.com/calj))
- Update sassc & ffi dependencies [\#2673](https://github.com/openware/peatio/pull/2673) ([calj](https://github.com/calj))
- Add from\_addresses on deposit creation [\#2657](https://github.com/openware/peatio/pull/2657) ([mnaichuk](https://github.com/mnaichuk))
- Enhancement: Filter trade by type && expose received_amount ([chumaknadya](https://github.com/chumaknadya))
- Accounting: add member_id in platform revenues [\#2607](https://github.com/openware/peatio/pull/2607) ([calj](https://github.com/calj)
- Add jobs table [\#2649](https://github.com/openware/peatio/pull/2649) ([mnaichuk](https://github.com/mnaichuk))
- Add rake task for distribution [\#2631](https://github.com/openware/peatio/pull/2631) ([mnaichuk](https://github.com/mnaichuk))
- Expose maker & taker fee for order entity (#2627) ([vpetrusenko](https://github.com/vpetrusenko))
-  Add caching for the most used public endpoints [\#2625](https://github.com/openware/peatio/pull/2625) ([mnaichuk](https://github.com/mnaichuk))
- Add to Currency model description, homepage and price [\#2601](https://github.com/openware/peatio/pull/2601) ([mnaichuk](https://github.com/mnaichuk))
- Feature: Add ability to skip deposit collection on hot wallet [\#2613](https://github.com/openware/peatio/pull/2613) ([mnaichuk](https://github.com/mnaichuk))
- Enhancement: add pagination to POST management/accounts/balances [\#2603](https://github.com/openware/peatio/pull/2603) ([ec](https://github.com/ec))
- Bump peatio-electrum plugin to 2.6.1 [\#2592](https://github.com/openware/peatio/pull/2592) ([calj](https://github.com/calj))
- \[Snyk\] Security upgrade kaminari from 1.1.1 to 1.2.1 [\#2586](https://github.com/openware/peatio/pull/2586) ([snyk-bot](https://github.com/snyk-bot))
- Feature: Add ability to resend beneficiary pin [\#2591](https://github.com/openware/peatio/pull/2591) ([dpatsora](https://github.com/dpatsora))
- Enhancement: add management api to retrieve non-zero balances [\#2570](https://github.com/openware/peatio/pull/2570) ([ec](https://github.com/ec))
- Add ability to set user rate limit [\#2580](https://github.com/openware/peatio/pull/2580) ([Kohelbekker](https://github.com/Kohelbekker))
- Change Influxdb configuration names [\#2573](https://github.com/openware/peatio/pull/2573) ([mnaichuk](https://github.com/mnaichuk))
- \[Snyk\] Fix for 5 vulnerabilities [\#2563](https://github.com/openware/peatio/pull/2563) ([snyk-bot](https://github.com/snyk-bot))
- Improve market states for api [\#2572](https://github.com/openware/peatio/pull/2572) ([mnaichuk](https://github.com/mnaichuk))
- Add export rake task for engines [\#2571](https://github.com/openware/peatio/pull/2571) ([mnaichuk](https://github.com/mnaichuk))
- Feature: Add filters for currencies, markets and wallets [\#2567](https://github.com/openware/peatio/pull/2567) ([dpatsora](https://github.com/dpatsora))
- Improve orders and trades filtes. Add data field in engine admin API [\#2565](https://github.com/openware/peatio/pull/2565) ([mnaichuk](https://github.com/mnaichuk))
- Update irix version [\#2561](https://github.com/openware/peatio/pull/2561) ([mnaichuk](https://github.com/mnaichuk))
- Feature: Add Management API for beneficiaries [\#2559](https://github.com/openware/peatio/pull/2559) ([chumaknadya](https://github.com/chumaknadya))
- Misc improvements [\#2556](https://github.com/openware/peatio/pull/2556) ([calj](https://github.com/calj))
- Delete encrypt for market data. Update upstream daemon [\#2543](https://github.com/openware/peatio/pull/2543) ([mnaichuk](https://github.com/mnaichuk))
- Feature: Add user portfolio API module [\#2537](https://github.com/openware/peatio/pull/2537) ([mnaichuk](https://github.com/mnaichuk))

### Bug Fixes ###

- Update peatio-bitgo version. Change rid length for withdraw [\#2668](https://github.com/openware/peatio/pull/2668) ([mnaichuk](https://github.com/mnaichuk))
- Fix wallet balance parse in the daemons [\#2666](https://github.com/openware/peatio/pull/2666) ([mnaichuk](https://github.com/mnaichuk))
- Skip pending ERC-20 transaction in blockchain daemon [\#2659](https://github.com/openware/peatio/pull/2659) ([mnaichuk](https://github.com/mnaichuk))
- Remove inqury from TradingFee model ([mnaichuk](https://github.com/mnaichuk))
- Fix format function in TickersJob ([mnaichuk](https://github.com/mnaichuk))
- Remove date parsing in api/v2/public/version [\#2623](https://github.com/openware/peatio/pull/2623) ([calj](https://github.com/calj))
- Fix secret replace in deposit collection [\#2620](https://github.com/openware/peatio/pull/2620) ([mnaichuk](https://github.com/mnaichuk))
- Update configuration for database pool [\#2619](https://github.com/openware/peatio/pull/2619) ([mnaichuk](https://github.com/mnaichuk))
- Add symbolize keys to WalletService init. Update wallet templates [\#2616](https://github.com/openware/peatio/pull/2616) ([mnaichuk](https://github.com/mnaichuk))
- Fix versionning generation in CI [\#2604](https://github.com/openware/peatio/pull/2604) ([calj](https://github.com/calj))
- Fix: Bitgo address generation [\#2608](https://github.com/openware/peatio/pull/2608) ([chumaknadya](https://github.com/chumaknadya))
- Fix: Update error handling for trading\_fee api [\#2595](https://github.com/openware/peatio/pull/2595) ([mnaichuk](https://github.com/mnaichuk))
- Do not expose engine data in admin api [\#2584](https://github.com/openware/peatio/pull/2584) ([mnaichuk](https://github.com/mnaichuk))

- Fix: Avoid to use join in admin API for tables with a large amount of data. Change Kaminari usage in pagination [\#2602](https://github.com/openware/peatio/pull/2602) ([mnaichuk](https://github.com/mnaichuk))
- Fix market migration with existing data [\#2555](https://github.com/openware/peatio/pull/2555) ([mnaichuk](https://github.com/mnaichuk))


text:
# Snowflake4s
**A k-sortable unique ID generation lib using Scala.**

Snowflake4s can generate the roughly-sorted 64 bits ids as Long type written by Scala. The name of this lib was inspired by a project from Twitter called "Snowflake". So it's using the same encoded ID format as Twitter's Snowflake, but Snowflake4s providing the easier way to use Snowflake schema.

## Get Started
You should add the following dependency.
```sbtshell
resolvers +=
  "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots"

libraryDependencies += "io.github.flintersvn" %% "snowflake4s" % "0.1.0-SNAPSHOT"
```

Add manual config to `application.conf`:
```hocon
snowflake4s {
  twitter { # using Twitter's algorithm
    machine_id = 1 # from 0 to 31
    machine_id = ${?SNOWFLAKE4S_MACHINE_ID} # Set machine id from env

    worker_id = 1 # from 0 to 31
    worker_id = ${?SNOWFLAKE4S_WORKER_ID} # Set worker id from env

    # Default Epoch is October 18, 1989, 16:53:40 UTC
    # You can change to a different epoch by below setting
    # epoch = "2021-01-01T00:00:00Z"
  }
}
```

## How to use
to generate id:
```scala
val IdGenerator = Snowflake4s.generator

val id = IdGenerator.generate()
id.toBase62 // 52nlGCNq00n
id.toLong //<PHONE_NUMBER>643992065

// Revert info from saved Id

val id = Id.fromBase62("52nlGCNq00n")
println(id.workerId) // 5
```

You also could bulk generate 10 ids with the following snippet:
```scala
val IdGenerator = Snowflake4s.generator

val ids = IdGenerator.bulkGenerate(10)
```

## License
The Snowflake4s is released under version 2.0 of the Apache License.

## References
- Slide:
  - https://www.slideshare.net/nguyentungniit/distributed-unique-id-generation
- Twitter Snowflake
  - https://github.com/twitter/snowflake/tree/scala_28
  - https://blog.twitter.com/2010/announcing-snowflake
- K-ordered
  - http://www.geeksforgeeks.org/nearly-sorted-algorithm/

gha_language: Scala


text:
# http_interceptor

[![Pub](https://img.shields.io/pub/v/http_interceptor.svg)](https://pub.dev/packages/http_interceptor)
[![style: lints/recommended](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)
[![License: MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT)
[![codecov](https://codecov.io/gh/CodingAleCR/http_interceptor/branch/main/graph/badge.svg?token=hgsnPctaDz)](https://codecov.io/gh/CodingAleCR/http_interceptor)
[![Star on GitHub](https://img.shields.io/github/stars/codingalecr/http_interceptor.svg?style=flat&logo=github&colorB=deeppink&label=stars)](https://github.com/codingalecr/http_interceptor)

[![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-)

This is a plugin that lets you intercept the different requests and responses from Dart's http package. You can use to add headers, modify query params, or print a log of the response.

## Quick Reference

**Already using `http_interceptor`? Check out the [1.0.0 migration guide](./guides/migration_guide_1.0.0.md) for quick reference on the changes made and how to migrate your code.**

- [http_interceptor](#http_interceptor)
  - [Quick Reference](#quick-reference)
  - [Installation](#installation)
  - [Features](#features)
  - [Usage](#usage)
    - [Building your own interceptor](#building-your-own-interceptor)
    - [Using your interceptor](#using-your-interceptor)
      - [Using interceptors with Client](#using-interceptors-with-client)
      - [Using interceptors without Client](#using-interceptors-without-client)
    - [Retrying requests](#retrying-requests)
    - [Using self signed certificates](#using-self-signed-certificates)
    - [InterceptedClient](#interceptedclient)
    - [InterceptedHttp](#interceptedhttp)
  - [Roadmap](#roadmap)
  - [Troubleshooting](#troubleshooting)
  - [Contributions](#contributions)
    - [Contributors](#contributors)

## Installation

Include the package with the latest version available in your `pubspec.yaml`.

```dart
http_interceptor: <latest>
```

## Features

- 🚦 Intercept & change unstreamed requests and responses.
- ✨ Retrying requests when an error occurs or when the response does not match the desired (useful for handling custom error responses).
- 👓 `GET` requests with separated parameters.
- ⚡ Standard `bodyBytes` on `ResponseData` to encode or decode in the desired format.
- 🙌🏼 Array parameters on requests.
- 🖋 Supports self-signed certificates (except on Flutter Web).
- 🍦 Compatible with vanilla Dart projects or Flutter projects.
- 🎉 Null-safety.
- ⏲ Timeout configuration with duration and timeout functions.

## Usage

```dart
import 'package:http_interceptor/http_interceptor.dart';
```

### Building your own interceptor

In order to implement `http_interceptor` you need to implement the `InterceptorContract` and create your own interceptor. This abstract class has two methods: `interceptRequest`, which triggers before the http request is called; and `interceptResponse`, which triggers after the request is called, it has a response attached to it which the corresponding to said request. You could use this to do logging, adding headers, error handling, or many other cool stuff. It is important to note that after you proccess the request/response objects you need to return them so that `http` can continue the execute.

- Logging with interceptor:

```dart
class LoggerInterceptor extends InterceptorContract {
  @override
  Future<BaseRequest> interceptRequest({
    required BaseRequest request,
  }) async {
    print('----- Request -----');
    print(request.toString());
    print(request.headers.toString());
    return request;
  }

  @override
  Future<BaseResponse> interceptResponse({
    required BaseResponse response,
  }) async {
    log('----- Response -----');
    log('Code: ${response.statusCode}');
    if (response is Response) {
      log((response).body);
    }
    return response;
  }
}
```

- Changing headers with interceptor:

```dart
class WeatherApiInterceptor implements InterceptorContract {
  @override
  Future<BaseRequest> interceptRequest({required BaseRequest request}) async {
    try {
      request.url.queryParameters['appid'] = OPEN_WEATHER_API_KEY;
      request.url.queryParameters['units'] = 'metric';
      request.headers[HttpHeaders.contentTypeHeader] = "application/json";
    } catch (e) {
      print(e);
    }
    return request;
  }

  @override
  Future<BaseResponse> interceptResponse({required BaseResponse response}) async => response;
}
```

- You can also react to and modify specific types of requests and responses, such as `StreamedRequest`,`StreamedResponse`, or `MultipartRequest` :

```dart
class MultipartRequestInterceptor implements InterceptorContract {
  @override
  Future<BaseRequest> interceptRequest({required BaseRequest request}) async {
    if(request is MultipartRequest){
      request.fields['app_version'] = await PackageInfo.fromPlatform().version;
    }
    return request;
  }

  @override
  Future<BaseResponse> interceptResponse({required BaseResponse response}) async {
    if(response is StreamedResponse){
      response.stream.asBroadcastStream().listen((data){
        print(data);
      });
    }
    return response;
  }
}
```

### Using your interceptor

Now that you actually have your interceptor implemented, now you need to use it. There are two general ways in which you can use them: by using the `InterceptedHttp` to do separate connections for different requests or using a `InterceptedClient` for keeping a connection alive while making the different `http` calls. The ideal place to use them is in the service/provider class or the repository class (if you are not using services or providers); if you don't know about the repository pattern you can just google it and you'll know what I'm talking about. 😉

#### Using interceptors with Client

Normally, this approach is taken because of its ability to be tested and mocked.

Here is an example with a repository using the `InterceptedClient` class.

```dart
class WeatherRepository {
  Client client = InterceptedClient.build(interceptors: [
      WeatherApiInterceptor(),
  ]);

  Future<Map<String, dynamic>> fetchCityWeather(int id) async {
    var parsedWeather;
    try {
      final response =
          await client.get("$baseUrl/weather".toUri(), params: {'id': "$id"});
      if (response.statusCode == 200) {
        parsedWeather = json.decode(response.body);
      } else {
        throw Exception("Error while fetching. \n ${response.body}");
      }
    } catch (e) {
      print(e);
    }
    return parsedWeather;
  }

}
```

#### Using interceptors without Client

This is mostly the straight forward approach for a one-and-only call that you might need intercepted.

Here is an example with a repository using the `InterceptedHttp` class.

```dart
class WeatherRepository {

    Future<Map<String, dynamic>> fetchCityWeather(int id) async {
    var parsedWeather;
    try {
      final http = InterceptedHttp.build(interceptors: [
          WeatherApiInterceptor(),
      ]);
      final response =
          await http.get("$baseUrl/weather".toUri(), params: {'id': "$id"});
      if (response.statusCode == 200) {
        parsedWeather = json.decode(response.body);
      } else {
        return Future.error(
          "Error while fetching.",
          StackTrace.fromString("${response.body}"),
        );
      }
    } on SocketException {
      return Future.error('No Internet connection 😑');
    } on FormatException {
      return Future.error('Bad response format 👎');
    } on Exception {
      return Future.error('Unexpected error 😢');
    }

    return parsedWeather;
  }

}
```

### Retrying requests

Sometimes you need to retry a request due to different circumstances, an expired token is a really good example. Here's how you could potentially implement an expired token retry policy with `http_interceptor`.

```dart
class ExpiredTokenRetryPolicy extends RetryPolicy {
  @override
  Future<bool> shouldAttemptRetryOnResponse(BaseResponse response) async {
    if (response.statusCode == 401) {
      // Perform your token refresh here.

      return true;
    }

    return false;
  }
}
```

You can also set the maximum amount of retry attempts with `maxRetryAttempts` property or override the `shouldAttemptRetryOnException` if you want to retry the request after it failed with an exception.

### Using self signed certificates

You can achieve support for self-signed certificates by providing `InterceptedHttp` or `InterceptedClient` with the `client` parameter when using the `build` method on either of those, it should look something like this:

### InterceptedClient

```dart
Client client = InterceptedClient.build(
  interceptors: [
    WeatherApiInterceptor(),
  ],
  client: IOClient(
    HttpClient()
      ..badCertificateCallback = badCertificateCallback
      ..findProxy = findProxy,
  );
);
```

### InterceptedHttp

```dart
final http = InterceptedHttp.build(
  interceptors: [
    WeatherApiInterceptor(),
  ],
  client: IOClient(
    HttpClient()
      ..badCertificateCallback = badCertificateCallback
      ..findProxy = findProxy,
  );
);
```

_**Note:** It is important to know that since both HttpClient and IOClient are part of `dart:io` package, this will not be a feature that you can perform on Flutter Web (due to `BrowserClient` and browser limitations)._

## Roadmap

Check out our roadmap [here](https://doc.clickup.com/p/h/82gtq-119/f552a826792c049).

_We migrated our roadmap to better suit the needs for development since we use ClickUp as our task management tool._

## Troubleshooting

Open an issue and tell me, I will be happy to help you out as soon as I can.

## Contributions

Contributions are always welcomed and encouraged, we will always give you credit for your work on this section. If you are interested in maintaining the project on a regular basis drop me a line at [me@codingale.dev](mailto:me@codingale.dev).

### Contributors

Thanks to all the wonderful people contributing to improve this package. Check the [Emoji Key](https://github.com/kentcdodds/all-contributors#emoji-key) for reference on what means what!

Alejandro Ulate Fallas
💻 📖 ⚠ 🤔 🚧

Konstantin Serov
🤔

Virus1908
🤔 💻 ⚠

Wes Ehrlichman
🤔 💻 ⚠

Jan Lübeck
🤔 💻 ⚠

Lucas Alves
🤔 💻 ⚠

István Juhos
🤔 💻 ⚠

Scott Hyndman
🤔

Islam Akhrarov
🤔 ⚠ 💻

Meysam
📖

Martijn
⚠ 💻

MaciejZuk
🐛

Lukas Kurz
⚠ 🤔 💻

Glenn Ruysschaert
💻 ⚠

Erick
💻 ⚠

javiermrz
💻

nihar
🤔

gha_language: Dart


text:
[![Build Status](https://img.shields.io/pypi/v/ax-platform.svg)](https://pypi.org/project/ax-platform/)
[![Build Status](https://img.shields.io/pypi/pyversions/ax-platform.svg)](https://pypi.org/project/ax-platform/)
[![Build Status](https://img.shields.io/pypi/wheel/ax-platform.svg)](https://pypi.org/project/ax-platform/)
[![Build Status](https://travis-ci.com/facebook/Ax.svg?token=m8nxq4QpA9U383aZWDyF&branch=master)](https://travis-ci.com/facebook/Ax)
[![Build Status](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.md)

Ax is an accessible, general-purpose platform for understanding, managing,
deploying, and automating adaptive experiments.

Adaptive experimentation is the machine-learning guided process of iteratively
exploring a (possibly infinite) parameter space in order to identify optimal
configurations in a resource-efficient manner. Ax currently supports Bayesian
optimization and bandit optimization as exploration strategies. Bayesian
optimization in Ax is powered by [BoTorch](https://github.com/facebookexternal/botorch),
a modern library for Bayesian optimization research built on PyTorch.

For full documentation and tutorials, see the Ax website [TODO: add link].

## Installation

### Requirements

You need **Python 3.6 or later** to run Ax.

The required Python dependencies are:

* botorch
* jinja2
* pandas
* scipy
* simplejson
* sklearn
* plotly>=2.2.1,<3.0

### pip [PRIOR TO LAUNCH]

NOTE: Both BoTorch and Ax are currently private repositories.
This means that to download them, using `pip`, you need to make sure that
you have an [SSH key is registered with GitHub](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/).

1) Install numpy and cython, if you don't already have them, since they are
needed for parsing the `setup.py` files for Ax:

```
pip3 install cython numpy
```

2) Install PyTorch nightly build

See installation instructions via pip or conda [here](https://pytorch.org/get-started/locally/).

BoTorch uses advanced PyTorch features and thus currently requires PyTorch's
nightly build (the requirement upon beta release will be PyTorch 1.1).

*Recommendation for MacOS users*: install PyTorch before installing BoTorch
using the [Anaconda package manager](https://pytorch.org/get-started/locally/#anaconda-1)
to get up to an order-of-magnitude speed-up for Bayesian optimization. At the
moment, installing PyTorch from pip does not link against [MKL](https://github.com/intel/mkl-dnn),
a library that optimizes mathematical computation for Intel processors.

3) Download and install BoTorch from the [GitHub repo](https://github.com/pytorch/botorch):
```
pip3 install<EMAIL_ADDRESS>```

4) Download and install Ax from the [GitHub repo](https://github.com/facebook/Ax):
```
pip3 install<EMAIL_ADDRESS>```

### pip (post-launch; TODO: set up wheels)

Install Ax via pip:
```
pip3 install ax-platform
```

*Recommendation for MacOS users*: install PyTorch before Ax by using the
[Anaconda package manager](https://pytorch.org/get-started/locally/#anaconda-1)
to get up to an order-of-magnitude speed-up for Bayesian optimization. At the
moment, installing PyTorch from pip does not link against
[MKL](https://software.intel.com/en-us/mkl), a library that optimizes
mathematical computation for Intel processors.

### Optional Dependencies

Depending on your intended use of Ax, you may want to install Ax with optional
dependencies.

If using Ax in Jupyter notebooks:
```
pip3 install<EMAIL_ADDRESS>```

If storing Ax experiments via SQLAlchemy in MySQL or SQLite:
```
pip3 install<EMAIL_ADDRESS>```

Note that instead of installation from Git, you can also clone
a local version of the repo and then pip install with desired
flags from the root of the local repo, e.g.:
```
pip3 install -e .[mysql]
```

## Getting Started

To run a simple optimization loop in Ax (using the
[Booth response surface](https://www.sfu.ca/~ssurjano/booth.html) as the
artificial evaluation function):

```
>>> from ax import optimize
>>> optimize(
        parameters=[
          {
            "name": "x1",
            "type": "range",
            "bounds": [-10.0, 10.0],
          },
          {
            "name": "x2",
            "type": "range",
            "bounds": [-10.0, 10.0],
          },
        ],
        # Booth function
        evaluation_function=lambda p: p["x1"] + 2*p["x2"] - 7)**2 + (2*p["x1"] + p["x2"] - 5,
        minimize=True,
    )

{'x1': 1.02, 'x2': 2.97}  # global min is (1, 3)
```

## Join the Ax community

See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out. You will
also need to install the dependencies needed for development, which are listed
in `DEV_REQUIRES` in `setup.py`, as follows:

```
pip3 install<EMAIL_ADDRESS>```

## License

Ax is licensed under the [MIT license](LICENSE.md).

repository: MalkeshDalia/Ax

gha_language: Jupyter Notebook

repo_name: MalkeshDalia/Ax


text:
# notes

Locally when running with 'npm start' server is started and responsive at:
http://localhost:3000/hello/Marcus
http://localhost:3000/

We have to run it on port 80.

# Initial setup
```
npm install
```

# Project run
```
npm start
```

## Start project in cluster
```
npm start:cluster
```

## Swagger Docs Generation

```
npm run swagger
```

## Test

```
npm run test
```

### Test with coverage reports:

```
npm run test:coverage
```

The coverage report will be saved under ```./coverage``` folder.

## Generate Docs

```
npm run doc
```

The project documentation will be saved under ```./doc``` folder.

repository: macromania/node-azure

repo_name: macromania/node-azure


text:
couchbase-net-beersample
========================

The official "Beer Sample" example application using the Couchbase .NET SDK 2.0

NOTE: This is an older example that has been updated to work with Couchbase Server 5.0+. However a more complete example that demonstrates additional Couchbase Server features is the [Travel Sample](https://github.com/couchbaselabs/try-cb-dotnet).

*NOTE:* This is not an officially supported Couchbase project.

## Authentication

With Role Base Access Control introduced in Couchbase Server 5.0, it is necessary to authenticate the SDK with the cluster using a discrete username and password combination. The username and password can be added in the web.config under the "couchbase" section. If using a Couchbase Server version before RBAC was added, you must leave these values empty.

## Couchbase Server URI

The Couchbase Server URI can be updated in the web.config under the "couchbase" section and the default is to use "localhost".

## Views

This example uses a custom View definition to list all available beers and will need to be added manually. You can follow these steps to add the definition:

1. Navigate to the View definitions page in the cluster manager
2. Copy the _Beer_ design document to development
3. Add a new view to the _Beer_ design document called "all_beers"
4. Copy and paste the definition below into the new view definition
5. Publish the Beers design document, overwriting the existing one if prompted.

```javascript
function (doc, meta) {
  if (doc.type == "beer") {
    emit(meta.id, doc);
  }
}
```


text:
# PrimeInformationType

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**isPrime** | **Boolean** | Indicates whether the offer is an Amazon Prime offer. |
**isNationalPrime** | **Boolean** | Indicates whether the offer is an Amazon Prime offer throughout the entire marketplace where it is listed. |

repository: bellmit/spapi-java-client

repo_name: bellmit/spapi-java-client


text:
# Connect and log in to Bluemix.

```bash
bluemix login -u<EMAIL_ADDRESS>-o "AYX Association" -s dev
```

# Redeploy

```bash
bluemix app push ayxorg
```

# Access
Go to the [APP URL](https://ayxorg.mybluemix.net).

repository: aenon/ayxorg

repo_name: aenon/ayxorg


text:
---
title: Install an older version of an npm package
description: 'Learn how to install an older version of an npm package, something that might be useful to solve a compatibility problem'
authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais
section: Getting Started
---

You can install an old version of an npm package using the `@` syntax:

```bash
npm install <package>@<version>
```

Example:

```bash
npm install cowsay
```

installs version 1.3.1 (at the time of writing).

Install version 1.2.0 with:

```bash
npm install<EMAIL_ADDRESS>```

The same can be done with global packages:

```bash
npm install -g<EMAIL_ADDRESS>```

You might also be interested in listing all the previous version of a package. You can do it with `npm view <package> versions`:

```bash
❯ npm view cowsay versions

[ '1.0.0',
  '1.0.1',
  '1.0.2',
  '1.0.3',
  '1.1.0',
  '1.1.1',
  '1.1.2',
  '1.1.3',
  '1.1.4',
  '1.1.5',
  '1.1.6',
  '1.1.7',
  '1.1.8',
  '1.1.9',
  '1.2.0',
  '1.2.1',
  '1.3.0',
  '1.3.1' ]
```


text:
# Targa Image Maker for C++
A small and easy to use library for targa image making with C++.

## Usage
Download TgaImage.h and TgaImage.cpp and add them to you project.

### Simple example

Fully working example. Creates a blue image with a white square.
```cpp
#include "TgaImage.h"

int main()
{
  // Declare and initialize an image called myImage
  ti::TgaImage myImage(ti::TgaImage(128, 128));

  // Declare and initialize a new color called steelBlue
  auto steelBlue(ti::Color(70, 130, 180));

  // Fill the image with steelBlue
  myImage.fill(steelBlue);

  // Nested loop to draw a white square
  for (auto i = 32; i < 64; i++)
  {
    for (auto j = 64; j < 96; j++)
    {
      // Set pixel at (i, j) to white (r, g, b = 255, 255, 255)
      myImage.set(i, j, 255);
    }
  }

  // Save the image under the name myImage.tga
  myImage.save("myImage.tga");

return 0;
}
```

### Function description

Create an image with a width of 128 pixels and a height of 256 pixels.
```cpp
auto image(ti::TgaImage(128, 256));
```

Fill the entire image with grey. The values for red, green and blue will all be set to 128.
```cpp
image.fill(128);
```

Fill the entire image with red. The value for red will be set to 255, and the values for green and blue to 0.
```cpp
image.fill(255, 0, 0);
```

Define a color and fill the entire image with it.
```cpp
auto myColor(ti::Color(70,130,180));
image.fill(myColor);
```

Set the pixel att position (0, 16) to grey (the value 128).
```cpp
image.set(0, 16, 128);
```

Set the pixel att position (0, 16) to red. Red, green and blur are set to 255, 0, 0 respectivly.
```cpp
image.set(0, 16, 255, 0, 0);
```

Set the pixel att position (0, 16) to red. Here we define a color and use it to fill the image with.
```cpp
auto myColor(ti::Color(255,0,0));
image.set(0, 16, 255, 0, 0);
```

Save the image with the name myImage.tga at the location of the program.
```cpp
image.save("myImage.tga");
```

Save the image at F:\myImage.tga (on Windows).
```cpp
image.save("F:\\", "myImage.tga");
```

license: Unlicense

repository: deerel/TargaImageMakerForCpp

repo_name: deerel/TargaImageMakerForCpp


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 2.0.7 (2018-04-27)

### Added

- [#856](https://github.com/fluentmigrator/fluentmigrator/pull/865) New constructors to enable passing a custom expression convention set

## 2.0.6 (2018-04-24)

### Fixed

- [#859](https://github.com/fluentmigrator/fluentmigrator/issues/859): The pound sign is only recognized when it's only preceeded by whitespace

## 2.0.5 (2018-04-23)

### Added

- net452 build for the console runner to enable usage of the latest MySQL ADO.NET provider

### Changed

- Added more ADO.NET providers for the console
- The tools are in platform-specific sub-directories again (e.g. `tools/net452/x86/Migrate.exe`)

This has become necessary to enable a better out-of-the-box experience for the migration tool.

## 2.0.4 (2018-04-23)

Unlisted due to unintentional breaking change.

## 2.0.3 (2018-04-22)

### Fixed

- [#858](https://github.com/fluentmigrator/fluentmigrator/issues/858): Don't even try to set the command timeout for SQL Server CE

## 2.0.2 (2018-04-17)

### Fixed

- [#856](https://github.com/fluentmigrator/fluentmigrator/issues/856): Don't fail when an assembly couldn't be loaded
- [#848](https://github.com/fluentmigrator/fluentmigrator/pull/848): `MySql4ProcessorFactory` used the `MySql5Generator`

## 2.0.1 (2018-04-16)

### Fixed

- `FluentMigrator.Console` now contains the migration tool in the `tools/` directory

### Added

- Obsolete `FluentMigrator.Tools` package added as upgrade path

## 2.0.0 (2018-04-15)

### Breaking changes

- `IQuerySchema.DatabaseType` now returns `SqlServer2016`, etc... and not `SqlServer` any more
- Database specific code was moved into its own assemblies
- `IMigrationConventions` was renamed to `IMigrationRunnerConventions`
- `IMigrationContext` doesn't contain the `IMigrationConventions` any more
  - Expression conventions are now bundled in the new `IConventionSet`
- `ICanBeConventional` was removed during the overhaul of the expression convention system
- Strings are now Unicode by default. Use `NonUnicodeString` for ANSI strings
- `FluentMigrator.Tools` was split into the following packages
  - `FluentMigrator.Console`: The `Migrate.exe` tool
  - `FluentMigrator.MSBuild`: The MSBuild `Migrate` task

### Added

- Framework: .NET Standard 2.0 support
- Database:
  - SQL Anywhere 16 support
  - SQL Server 2016 support
  - MySQL:
    - `ALTER/DROP DEFAULT` value support
  - MySQL 5:
    - New dialect
    - `NVARCHAR` for `AsString`
  - SQL Server 2005
    - `WITH (ONLINE=ON/OFF)` support
    - 64 bit identity support
  - Redshift (Amazon, experimental)
  - Firebird
    - New provider option: `Force Quote=true` to enforce quotes
  - All supported databases
    - Streamlined table/index schema quoting
- Unique Constraints: Non-Distinct NULL support (SQL Server 2008 and SQL Anywhere 16)
- Types: DateTime2 support
- Dialect: SQLite foreign key support
- Insert/Update/Delete: DbNull support
- Expression:
  - IfDatabase: Predicate support
  - IfDatabase: Method delegation support
  - Index: Creation with non-key columns
  - Conventions: Default schema name support
  - `SetExistingRowsTo` supports `SystemMethods`
  - Passing arguments to embedded SQL scripts
- Runner:
  - TaskExecutor: HasMigrationsToApply support
  - Case insensitive arguments support
  - `StopOnError` flag

### Changed

- Project:
  - Moving database specific code from `FluentMigrator.Runner` to `FluentMigrator.Runner.<Database>`
  - Extension methods for - e.g. SqlServer - are now in `FluentMigrator.Extensions.SqlServer`
- Database:
  - MySQL: Now announcing SQL scripts
- Runner:
  - Better error messages
  - ListMigrations: showing `(not applied)` for unapplied migrations
  - Show `(BREAKING)` for migrations with breaking changes
  - MSBuild task is available as separate package (with custom .targets file)
  - Use provider default command timeout when no global timeout is set

### Deprecated

- Generic:
  - `IAnnouncer.Write`

### Removed

- Generic:
  - Deprecated functions
  - SchemaDump experiment
  - T4 experiment
- Framework:
  - .NET Framework 3.5 support
- Runner:
  - NAnt build task

### Fixed

- Runner:
  - Match `TagAttribute` by inheritance
- Processors (database specific processing of expressions):
  - Using the new `SqlBatchParser` to parse batches of SQL statements (`GO` statement support)
- Database:
  - Hana: Fixed syntax for dropping a primary key
  - Oracle: Table schema now added more consistently
- Tests:
  - Mark integration tests as ignored when no active processor could be found

repository: quesadaao/fluentmigrator

repo_name: quesadaao/fluentmigrator


text:
# Command line Validation

Better validation of an installation can occur with direct access to AKS using `kubectl` and `flux` commands.

__Validate the osdu-stamp Kustomization__

```bash
flux get kustomizations

## RESULTS ##
NAME          	READY	MESSAGE                                                        	REVISION                                     	SUSPENDED
flux-system   	True 	Applied revision: main/365784399be9b4de1b8d2e3fb8627dcd8a1ab44d	main/365784399be9b4de1b8d2e3fb8627dcd8a1ab44d	False
osdu-stamp    	True 	Applied revision: main/365784399be9b4de1b8d2e3fb8627dcd8a1ab44d	main/365784399be9b4de1b8d2e3fb8627dcd8a1ab44d	False
sealed-secrets	True 	Applied revision: main/365784399be9b4de1b8d2e3fb8627dcd8a1ab44d	main/365784399be9b4de1b8d2e3fb8627dcd8a1ab44d	False
```

__Validate the running osdu service pods__

```bash
kubectl get pods -n osdu-azure

## RESULTS ##
NAME                              READY   STATUS    RESTARTS   AGE
crs-catalog-7f68b94695-lkbrv      2/2     Running   0          50m
crs-catalog-7f68b94695-pkb5t      2/2     Running   0          50m
crs-conversion-86898c7f66-9bbnb   2/2     Running   0          38m
crs-conversion-86898c7f66-cftp2   2/2     Running   0          38m
dataset-64bc966f6d-tvbjp          2/2     Running   0          44m
dataset-64bc966f6d-z2qs2          2/2     Running   0          44m
default-59f89b9884-b6vps          1/1     Running   0          59m
entitlements-c74b67857-q8mz8      2/2     Running   0          50m
entitlements-c74b67857-tlgx5      2/2     Running   0          50m
file-5559d4495b-5nglb             2/2     Running   0          44m
file-5559d4495b-xzf5q             2/2     Running   0          44m
indexer-f5b7744dc-vfdcj           2/2     Running   0          47m
indexer-f5b7744dc-ww2c8           2/2     Running   0          46m
indexer-queue-8448965ffb-vts24    2/2     Running   0          42m
legal-7bd5ccc79c-6hn27            2/2     Running   0          50m
legal-7bd5ccc79c-vshzd            2/2     Running   0          50m
notification-db66d88f-6796p       2/2     Running   0          47m
notification-db66d88f-ccnr7       2/2     Running   0          47m
partition-6495dc7d-7djxn          2/2     Running   0          52m
partition-6495dc7d-wf587          2/2     Running   0          52m
register-5fdcb5bbcf-mwwmb         2/2     Running   0          47m
register-5fdcb5bbcf-vb6mk         2/2     Running   0          47m
schema-bd79f9777-8lvjr            2/2     Running   0          44m
schema-bd79f9777-jd8fw            2/2     Running   0          44m
search-98f6d5fb-khdhv             2/2     Running   0          45m
search-98f6d5fb-z2vt4             2/2     Running   0          45m
storage-74788f7c88-2l49d          2/2     Running   0          47m
storage-74788f7c88-llb6z          2/2     Running   0          47m
unit-ff6db89d5-9k2gn              2/2     Running   0          38m
unit-ff6db89d5-sxplz              2/2     Running   0          38m
wks-75bd49f596-86vrn              2/2     Running   0          42m
wks-75bd49f596-q89tp              2/2     Running   0          42m
workflow-785bbfb659-4zq58         2/2     Running   0          42m
workflow-785bbfb659-tqfpq         2/2     Running   0          42m
```

__Validate succesful helm chart reconciliation__

```bash
flux get helmreleases -A

## RESULTS ##
NAMESPACE   	NAME                	READY	MESSAGE                         	REVISION	SUSPENDED
airflow     	airflow-base        	True 	Release reconciliation succeeded	1.0.4   	False
default     	osdu-base           	True 	Release reconciliation succeeded	1.0.0   	False
dev-sample  	env-tool            	True 	Release reconciliation succeeded	0.0.1   	False
dev-sample  	token-service       	True 	Release reconciliation succeeded	0.11.0  	False
flux-system 	sealed-secrets      	True 	Release reconciliation succeeded	1.16.1  	False
istio-system	istio-base          	True 	Release reconciliation succeeded	1.1.0   	False
istio-system	istio-operator      	True 	Release reconciliation succeeded	1.7.0   	False
istio-system	osdu-istio          	True 	Release reconciliation succeeded	1.1.3   	False
osdu-azure  	crs-catalog         	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	crs-conversion      	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	dataset-service     	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	default-service     	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	entitlement-service 	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	file-service        	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	indexer-queue       	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	indexer-service     	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	legal-service       	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	notification-service	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	partition-service   	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	register-service    	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	schema-service      	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	search-service      	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	self-managed-base   	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	storage-service     	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	unit-service        	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	wks-service         	True 	Release reconciliation succeeded	0.11.0  	False
osdu-azure  	workflow-service    	True 	Release reconciliation succeeded	0.11.0  	False
```

## Common Issues

There appears to be timing problems with Flux that causes the helmrelease to at times not move to a completed state.  The services start, but the helmrelease never moves to a reconciled.  The following is a list of the services that are not completed.

The following command shows the status of the OSDU Services installation.

```bash
flux get helmreleases -A -n osdu-azure

## RESULTS ###
NAMESPACE   	NAME                	READY  	MESSAGE                                                                         	REVISION	SUSPENDED
<snip>
osdu-azure  	file-service        	False  	Helm upgrade failed: another operation (install/upgrade/rollback) is in progress	        	False
<snip>
```

This can be easily resolved by deleting the helmrelease and triggering a reconcile process on the kustomization.

```bash
flux delete helmrelease <service_name> -n osdu-azure
flux delete helmrelease <service_name> -n osdu-azure
flux reconcile kustomization osdu-stamp
```

repository: pkowalchuk/self-managed-osdu

repo_name: pkowalchuk/self-managed-osdu


text:
# Release notes of EMR V3.23.X

This topic describes the release notes of E-MapReduce V3.23.X, including the release date and updates.

## Release date

September 18, 2019

## Updates

|Component|Description|
|---------|-----------|
|Druid|-   Upgraded Druid to version 0.15.1.
-   Added the Router component.
-   Upgraded Fastjson to version 1.2.60. |
|Spark|-   Updated the code for Spark SQL Thrift Server to fix the issue where IsolatedClassLoader cannot load classes in certain cases.
-   Refactored the code related to Spark transactions to improve stability.
-   Fixed the issue where optimized row columnar \(ORC\) files cannot be read or written after the built-in Hive is upgraded to version 2.3.
-   Supports the MERGE INTO syntax.
-   Supports the SCAN and STREAM syntaxes.
-   Supports exactly-once semantics \(EOS\) for the Structured Streaming Kafka sink.
-   Upgraded Delta to version 0.4.0. |
|Hive|-   Removed Hive hooks configured in earlier versions of Hive.
-   Supports using multiple COUNT\(DISTINCT\) for hive.groupby.skew in data optimization.
-   Fixed the issue of data loss when joining tables with different bucket versions. |
|Flink|Upgraded Flink to version 1.8.2.|
|Bigboot|-   Upgraded the HDFS FsImage analysis tool.
-   Updated the JAR package for Object Storage Service \(OSS\) to fix the issue where the non-Daemon thread keeps alive after the main thread is terminated. |
|Kafka|-   Supports the DepolymentSet-Aware replication distribution strategy in Kafka.
-   Removed the Fastjson dependency. |
|HDFS|-   Optimized the deployment logic of the JAR package for SmartData OSS.
-   Updated the JAR package for SmartData OSS. |
|Flume|Upgraded Fastjson to version 1.2.60.|
|Tensorflow on Spark|This is a new component.|
|Has|Upgraded Fastjson to version 1.2.60.|
|Livy|Upgraded Fastjson to version 1.2.60.|

url: https://raw.githubusercontent.com/waitinfuture/emapreduce/58136c8b747a1e3f96f6473a3ff9077bca24f9c5/intl.en-US/Release version/Release notes/Release notes of EMR V3.23.X.md

repository: waitinfuture/emapreduce

filename: Release notes of EMR V3.23.X.md

repo_name: waitinfuture/emapreduce