text:
# Talixo map

UI Component which represents map

## How to install

Package is available as `@talixo/map` in NPM registry, so you can use it in your project
using `npm install @talixo/map --save` or `yarn add @talixo/map`.

## Requirements

Your package should additionally have some extra dependencies:

- `@talixo/shared: ^1.0.0-alpha.35`
- `lodash: ^4.17.10`
- `prop-types: ^15.6.1`
- `react: ^16.2.0`
- `react-google-maps: 9.4.5`
- `recompose: 0.26.0`

These packages are required by `@talixo/map`, but you have to install them manually,
to avoid having different versions of these in your application.

## Supported props

### Map

You've got few ways to authorize your Google Maps API:

- Load Google Maps JS SDK by yourself
- Pass `apiKey` or `clientId` to this component
- Pass `allowDevelopmentApi` property, to load Google Maps JS SDK without credentials

Property name       | Type      | Required | Default | Description
--------------------|-----------|----------|:-------:|----------------------------------------
className           | string    | no       | n/a     | additional class name passed to wrapper
apiKey              | string    | no       | n/a     | Your API Key from Google Maps
clientId            | string    | no       | n/a     | Your Client ID from Google Maps
allowDevelopmentApi | string    | no       | `false` | Should load missing Google Maps API SDK without credentials?
zoom                | number    | no       | `6`     | zoom
center              | Location  | no       | n/a     | centered position
interactive         | boolean   | no       | `true`  | enable to move and zoom map
options             | object    | no       | n/a     | MapOptions passed to Map object

### Directions

Property name | Type                | Required | Default | Description
--------------|---------------------|----------|:-------:|------------------------------------------------
startPoint    | Location            | yes      | n/a     | start point of directions
endPoint      | Location            | yes      | n/a     | end point of directions
via           | Location|Location[] | no       | n/a     | either single waypoint or list of waypoints
onLoad        | function            | no       | n/a     | handler after successfully loaded directions
onError       | function            | no       | n/a     | handler after error while loading new directions

### Marker

Property name | Type      | Required | Default       | Description
--------------|-----------|----------|:-------------:|------------------------------------------------
position      | Location  | yes      | n/a           | start point of directions
info          | nodes     | no       | n/a           | info window content
open          | boolean   | no       | is controlled | should the info window be opened?
onClick       | function  | no       | n/a           | handler on click on marker
onClose       | function  | no       | n/a           | handler on click on close button in info window

## Property shapes

### Location

Property name | Type      | Required | Default       | Description
--------------|-----------|----------|:-------------:|------------------------------------------------
lat           | number    | yes      | n/a           | geo-point latitude
lng           | number    | yes      | n/a           | geo-point longitude

## Changelog

- **0.1.0** - initial version

repository: PublicInMotionGmbH/ui-kit

repo_name: PublicInMotionGmbH/ui-kit


text:
# Developer Guide

[TOC]

## Code Review

This project uses Gerrit for code review:
https://gerrit-review.googlesource.com/
which uses the ["git push" workflow][1] with server
https://gerrit.googlesource.com/k8s-gerrit. You will need a
[generated cookie][2].

[1]: https://gerrit-review.googlesource.com/Documentation/user-upload.html#_git_push
[2]: https://gerrit.googlesource.com/new-password

Gerrit depends on "Change-Id" annotations in your commit message.
If you try to push a commit without one, it will explain how to
install the proper git-hook:

```
curl -Lo `git rev-parse --git-dir`/hooks/commit-msg \
    https://gerrit-review.googlesource.com/tools/hooks/commit-msg
chmod +x `git rev-parse --git-dir`/hooks/commit-msg
```

Before you create your local commit (which you'll push to Gerrit)
you will need to set your email to match your Gerrit account:

```
git config --local --add user.email<EMAIL_ADDRESS>```

Normally you will create code reviews by pushing for master:

```
git push origin HEAD:refs/for/master
```

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
title: 'Jest Basic'
slug: jest-basic
date: 2019-06-21
language: english
category: Programming
tags:
  - Test
  - Jest
published: true
description: 'I wrote this post to learn how to use Jest.'
---

# Jest Basic

Jest is a JavaScript unit testing framework built by Facebook.

# Directory Structure

The directory structure for testing would looks something like the following.

```
- myProgram.js
- __tests__
   - myProgram-test.js
```

# Basic Syntax

Each test file looks something like this:

```javascript
const MathModule = require('../myMath') // 1

describe('my math module', () => {
  // 2
  it('adds two numbers', () => {
    // 3
    // Your testing code goes here
  })
})
```

- `describe` defines a set of tests.
- `it` defines a single test.

You can run the test with `jest` command.

```
$ jest
```

# Assertions

```javascript
expect(value).toBe(something)
```

## Useful matchers

- `toBe`: compare 2 values using `===` operator.

```javascript
expect(2).toBe(2) // OK
```

- `toEqual`: recursively compares two values.

```javascript
expect({}).toEqual({}) // OK
```

- `toContain`: makes sure the array has the given item.

```javascript
expect([1, 2, 3]).toContain(1) // OK
```

- `toThrow`: checks if the given function throws an error.

```javascript
expect(() => {
  undefined()
}).toThrow() // OK
```

- `not`: useful to inverse the expectation.

```javascript
expect(2).not.toBe(4) // OK
```

You can see other matchers [here](https://jestjs.io/docs/en/api).

# Async tests

JavaScript relies on callbacks in many cases and Jest supports testing asynchronous code.

```javascript
describe('my async module', () => {
  it('supports promises', () => {
    return new Promise((resolve) => {
      setTimeout(resolve, 1000);
    })
  });

  it('supports async/await', async () => {
    await saveUser({...});
  });
});
```

# LifeCycle

If you need to add some setup/teardown logic, use `beforeEach`/`afterEach` and `beforeAll`/`afterAll`:

```javascript
describe('my math module', () => {
  beforeAll(() => {
    console.log('This is executed before the test suite')
  })

  beforeEach(() => {
    console.log('This is executed before each testcase')
  })

  it('adds two numbers', () => {
    expect(() => {
      undefined()
    }).toThrow()
  })
})
```

# Create mock functions

`jest.fn` creates a mock function.

```javascript
const add = jest.fn() //=> returns an empty function

const num = jest.fn(() => 3) //=> returns 3
```

# Jest commands

## Run one file

```bash
$ ./node_modules/.bin/jest --watch
```

press `p` and put the file.

```
src/components/__tests__/main/index.js
```

- [javascript - Run only ONE test with Jest - Stack Overflow](https://stackoverflow.com/questions/44446626/run-only-one-test-with-jest)

## Run all tests

```bash
$ ./node_modules/.bin/jest
```

## Create Coverage Report

```bash
$ ./node_modules/.bin/jest --coverage
```

## Display individual test results

```bash
$ ./node_modules/.bin/jest --verbose
```

# Test with Enzyme

`Enzyme` is a JavaScript Testing utility for React that makes it easier to test your React Components' output.

## Set up

```bash
npm install --save-dev enzyme enzyme-adapter-react-16 react-test-renderer
```

create `src/setupTests.js` file.
If you don't create this file, you have to define the code below in each test file.

```javascript
import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'

configure({ adapter: new Adapter() })
```

You also have to create `.babelrc` and paste the code below.

```javascript
{
  "presets": [
    [
      "@babel/preset-env",
      {
        "modules": "commonjs"
      }
    ],
    "@babel/preset-react"
  ]
}
```

## Shallow()

if you want to test the `<App />` component, you can extend our `App.test.js` file by adding the following.
The `shallow()` will test the provided component and ignores any child components that may be present in the component tree thereafter. if we had a `<Header />` and `<Footer />` component within `<App />` for example, they would be ignored in this test.

```javascript
import React from 'react'
import { shallow } from 'enzyme'
import App from './App'

describe('First React component test with Enzyme', () => {
  it('renders without crashing', () => {
    shallow(<App />)
  })
})
```

## Find nodes

You can find a class called `headerComponet` from shallow copied `Header` like the code below.

```javascript
describe('Header Component', () => {
  it('should render without errors', () => {
    const component = shallow(<Header />)
    const wrapper = component.find('.headerComponent')

    expect(wrapper.length).toBe(1)
  })
})
```

## Debug components

You can use `debug()` like the code below.

```javascript
configure({ adapter: new Adapter() })

describe('It should render without errors', () => {
  it('should render without errors', () => {
    const component = shallow(<Header />)
    const wrapper = component.find('.headerComponent')

    console.log(component.debug())
  })
})
```

The output would be something like this.

```javascript
<header className="headerComponent">
  <h1>Header!!</h1>
</header>
```

## beforeEach and setUp function

The code below is referenced from [here](https://github.com/K-Sato1995/jest-react-practice/blob/master/src/components/__tests__/Footer/index.js)

```javascript
import React from 'react'
import { shallow } from 'enzyme'
import Footer from '../../Footer'
import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'

configure({ adapter: new Adapter() })

// props = {} means that the empty {} would be passed to props if nothing is passed to props.

const setUp = (props = {}) => {
  const component = shallow(<Footer {...props} />)
  return component
}

describe('Footer Component', () => {
  let component

  beforeEach(() => {
    component = setUp()
  })

  it('should render without errors', () => {
    const wrapper = component.find('.footerComponent')
    expect(wrapper.length).toBe(1)
  })
})
```

## Simulate events

You can simulate events using `simulate` like the code below.

```javascript
describe('Button Component', () => {
  it('should simulate click event', () => {
    const component = setUp()
    expect(component.find('.click-0').length).toBe(0)
    // simulate click event and increment the number!!!
    component.find('a').simulate('click')
    expect(component.find('.clicks-1').length).toBe(1)
  })
})
```

More about this topic, check [here](https://airbnb.io/enzyme/docs/api/ReactWrapper/simulate.html).

# References

- [jest + React test example created by me](https://github.com/K-Sato1995/jest-react-practice)
- [jestbasics](http://frantic.im/jestbasics/)
- [Jest](https://jestjs.io/docs/en/getting-started.html)
- [Enzyme](https://airbnb.io/enzyme/)
- [Testing in React with Jest and Enzyme: An Introduction](https://medium.com/@rossbulat/testing-in-react-with-jest-and-enzyme-an-introduction-99ce047dfcf8)
- [React Unit Testing Using Enzyme and Jest | Toptal](https://www.toptal.com/react/tdd-react-unit-testing-enzyme-jest)
- [Jest + React Video turtorial](https://www.youtube.com/watch?v=tYMLXpOJtng)

license: MIT

gha_language: TypeScript

gha_license_id: MIT


text:
# Softcover

[![Coverage Status](https://coveralls.io/repos/softcover/softcover/badge.svg)](https://coveralls.io/github/softcover/softcover)

Softcover is an ebook typesetting system for technical authors. This is the main gem, `softcover`, which depends on `polytexnic` to convert Markdown or PolyTeX input to HTML and LaTeX, and thence to EPUB, MOBI, and PDF. Authors can use Softcover to publish and optionally sell the resulting ebooks (as well as associated digital goods such as screencasts) on the [Softcover publishing platform](http://www.softcover.io/).

For more details about Softcover, see [*The Softcover Book*](http://manual.softcover.io/book).

## Installation

    $ gem install softcover

On some systems, you may need to add an extra option to handle SSL correctly:

    $ gem install softcover -- --with-cppflags=-I/usr/local/opt/openssl/include

Then install the dependencies as described [here](http://manual.softcover.io/book/getting_started#sec-installing_softcover).

## Usage

Run

    $ softcover help

for a list of supported commands.

## Adding a precompiled binary

We would like Softcover to support as many systems as possible. If you needed to compile your own `tralics` binary ([see here](https://github.com/softcover/tralics)) and would like to contribute it back to the project, please send an email to<EMAIL_ADDRESS>with the `tralics` binary attached and with the result of running the following command:

    $ ruby -e 'puts RUBY_PLATFORM'

## Contributing

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

### Local Development

1. Check out the fork
2. Add new feature
3. Install it locally with `bundle exec rake install`

Once your changes are implemented, please update the documentation in the [Softcover manual](https://github.com/softcover/softcover_book) and make another pull request there.


text:
# Library Help Bot

## Purpose of the application

This is the implementation of Library Management System (LMS). LMSs are used in libraries to track the different items in the library. The system contains all information about books, magazines, audio/video materials, as well as people allowed to check out the materials or those in charge of the management. LMS is implemented as a Telegram bot.

## How it works
[![How it work picture](https://github.com/LibrinnoTeam/LibraryHelpBot/blob/master/howitworks.png?raw=true)](https://github.com/LibrinnoTeam/LibraryHelpBot)

1.  Bot package sends request to Telegram via API and as a response it gets messages from users exploiting the bot.
2.  Bot analyzes the response and sends commands to the controller which executes the command and makes according changes in the database.

## Dependencies
* wheel
* python-telegram-bot
* pytest
* flask
* PyMySQL
* PySocks

## Installation

### Requirements
* python3
* pip3
* git
## Preparing
1.  Install all libraries stated in the requirements.txt by typing the command below in command line.
    ```sh
    pip3 install -r requirements.txt
    ```
2.  Install MariaDB from official site
3.  Downlaod the repository from Github
First way is to download zip archive and then unzip it to the work directory.
Second way is to clone repository to the work directory via
    ```sh
    git clone https://github.com/LibrinnoTeam/LibraryHelpBot.git
    ```
4.  Change password in database-schema.sql
5.  Execute database-schema.sql in MariaDB
    ```sh
    source path/to/work/directory/AdminSite/database-schema.sql
    ```
6.  Create file configs.py in work directory
    ```sh
    token                     = '*' # Token for telegram bot
    library_login_database    = 'admin_library' # login for library user MariaDB
    library_password_database = '*'
    library_database          = 'library' #May be change

    admin_user_login = 'admin'
    admin_user_pass = '*'

    host = 'localhost' #May be change
    port = '8080' #May be change

    inet_addr = 'localhost' #May be change

    debug = False

    telegram_alias = 'compet_bot' #May be change
    ```

## Running
1.  To run the application with default parameters just typing the command below in command line.
   ```sh
    python3 main.py
    ```
2.  General view of the command that starts a bot
    ```sh
    python3 main.py -t -c --log_file=<filelog> --database=<filedb> --cleanup_database
```
>   Argument -t means that the command runs the tests
Argument -c means that the application will write logs into console
Argument --log_file= means that the application will write logs into file with name in parameter
Argument --database= means that the application will use bd in file with name in parameter
> Argument --cleanup_database means that the application will drop tables in database

repository: AndreyChertckov/LibraryHelpBot

repo_name: AndreyChertckov/LibraryHelpBot


text:
# cjwt

`cjwt` (see jwt) is a simple cli that allows you to view the contents of a JWT.

## Usage

```bash
cjwt [filepath] | [stdin]
```

Simply specify a file path or pipe the JWT through stdin.
This tool is trivial.
And this continues the test.

repository: aricart/cjwt

repo_name: aricart/cjwt


text:
##DESCRIPTION
##  Algebra problem: true or false for inequality
##ENDDESCRIPTION

##KEYWORDS('algebra', 'inequality', 'fraction')

## DBsubject('Algebra')
## DBchapter('Fundamentals')
## DBsection('Real Numbers')
## Date('6/3/2002')
## Author('')
## Institution('')
## TitleText1('Precalculus')
## EditionText1('3')
## AuthorText1('Stewart, Redlin, Watson')
## Section1('1.1')
## Problem1('22')

########################################################################

DOCUMENT();

loadMacros(
   "PGstandard.pl",     # Standard macros for PG language
   "MathObjects.pl",
   "PGML.pl",
   #"source.pl",        # allows code to be displayed on certain sites.
   #"PGcourse.pl",      # Customization file for the course
);

# Print problem number and point value (weight) for the problem
TEXT(beginproblem());

# Show which answers are correct and which ones are incorrect
$showPartialCorrectAnswers = 1;

##############################################################
#
#  Setup
#
#
Context("Numeric");
Context()->flags->set(
  tolerance => 0.1,
  tolType => "relative",
);

$pi = Real("pi");
$ansA = Real(99.0);
$ansB = Real(1.24);
$ansC = Real(99.0);
$ansD = Real(0.886);
$ansE = Real(1.77);

##############################################################
#
#  Text
#
#

Context()->texStrings;
BEGIN_PGML
A mass [`m = 50.0`] grams is being lowered a distance of [`h = 2.00 \ m`] using a pulley of mass [`M = 5.00 \ kg`] and radius [`R = 0.500 \ m`]. Assume the string holding the mass (see [`Fig. \ 5`]) to be massless.
A\) What is the total energy of the system (take zero of potential energy at the ground level) just as the mass is beginning to descend and is located [`h`] above the ground level?

[___________]{Compute($ansA)->cmp()}[`J`]

B\) What is [`\omega`] for the disk at A when [`m`] is at [`h/2`]?

[___________]{Compute($ansB)->cmp()}[`rad/s`]

C\) What is the total energy of the system at A when [`m`] is at [`h/2`]?

[___________]{Compute($ansC)->cmp()}[`J`]

D\) What is the final velocity of [`m`] as it is about to hit the ground?

[____________]{Compute($ansD)->cmp()}[`m/s`]

E\) What is the angular velocity of the pulley when the mass is about to hit the ground?

[____________]{Compute($ansE)->cmp()}[`rad/s`]
END_PGML

BEGIN_TEXT
$BR
$BR
$BR
\{ image( "hw9-f5.png", width=>400, height=>600,
tex_size=>700, extra_html_tags=>'alt="Figure 4 for problem 4, HW9."' ) \}

END_TEXT

ENDDOCUMENT();

repository: Simon-Initiative/proving-ground

gha_language: HTML

repo_name: Simon-Initiative/proving-ground


text:
nmote-oembed
=====================================

Java 1.7 client for oEmbed protocol.

oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.

See http://oembed.com

Features
--------

* Auto discovery for any website supporting oEmbed
* Out-of-box support for YouTube, Viddler, Flickr, IFTTT, ...
* Support for vendor extensions
* Support for embedly and noembed oEmbed proxy services
* Favicon, pingback and webmention extraction
* BSD style license

Usage
-----

Get oEmbed info from YouTube URL:

```java
		OEmbedProvider ep = new DefaultOEmbedProvider();
		OEmbed e = ep.resolve("https://www.youtube.com/watch?v=V_Qo4a_3IeQ");
		System.out.println(e);
```

produces:
```
BasicOEmbed[
	"height":344,
	"html":"<iframe width=\"459\" height=\"344\" src=\"https://www.youtube.com/embed/V_Qo4a_3IeQ?feature=oembed\" frameborder=\"0\" allowfullscreen></iframe>",
	"title":"LEGO train crash high speed Eurostar and ICE 3 on 9V double track",
	"type":"video",
	"version":"1.0",
	"width":459,
	"author_name":"LEGO9vtrainfan",
	"author_url":"https://www.youtube.com/user/LEGO9vtrainfan",
	"favicon_url":"https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico",
	"provider_name":"YouTube",
	"provider_url":"https://www.youtube.com/",
	"thumbnail_height":360,
	"thumbnail_url":"https://i.ytimg.com/vi/V_Qo4a_3IeQ/hqdefault.jpg",
	"thumbnail_width":480
]
```

Add to Your's Project
---------------------

If you use maven for dependency management, add following snippet to pom.xml:

```xml
	<dependencies>
		...

		<dependency>
			<groupId>com.nmote.oembed</groupId>
			<artifactId>nmote-oembed</artifactId>
			<version>0.9</version>
		</dependency>

	</dependencies>
```

Changes
-------

* 0.9 Updated deps and added support for facebook videos.

* 0.8 Replaced Apaches HTTP client with Square's OkHttp. Much saner API.

Building
--------
To produce nmote-oembed.jar you will need apache maven installed. Run:

> mvn clean package

Author Contact and Support
--------------------------

For further information please contact
Vjekoslav Nesek<EMAIL_ADDRESS>

repository: iegoshin/nmote-oembed

repo_name: iegoshin/nmote-oembed


text:
# DynamoDB.jl

TL;DR: Julia interface to AWS DynamoDB using [AWSCore.jl](https://github.com/samoconnor/AWSCore.jl)

## Fork details

This code is a fork of [Conning/DynamoDB.jl](https://github.com/Conning/DynamoDB.jl)
which applies Julia 0.5 compatibility updates to the original codebase,
[dls/DynamoDB](https://github.com/dls/DynamoDB.jl), which now appears stale.

This fork replaces the use of [JuliaCloud/AWS.jl](https://github.com/JuliaCloud/AWS.jl)
with [samoconnor/AWSCore.jl](https://github.com/samoconnor/AWSCore.jl) whose
master branch is fully compatible with Julia 0.5.

## Installation and testing

You will require the `master` branch of [samoconnor/AWSCore.jl](https://github.com/samoconnor/AWSCore.jl).
Configuration of AWS credentials is achieved according to the documentation for
`aws_config` in `AWSCore.jl`. Tests can be run in the usual way, though online
testing of DynamoDB requires you to create a DynamoDB table with name `JULIA_TESTING`
a primary key `id` of string type, and a secondary index `order` of number type.

# Original documentation

Linux, OSX: [![Build Status](https://travis-ci.org/dls/DynamoDB.jl.svg?branch=master)](https://travis-ci.org/dls/DynamoDB.jl)

Windows: [![Build status](https://ci.appveyor.com/api/projects/status/qwlfcnnx0i1cti11?svg=true)](https://ci.appveyor.com/project/dls/dynamodb-jl)

(Windows support will be a while -- it's an issue loading the crypto shared object)

[![codecov.io](http://codecov.io/github/dls/DynamoDB.jl/coverage.svg?branch=master)](http://codecov.io/github/dls/DynamoDB.jl?branch=master)

Pure julia DynamoDB
bindings. [DynamoDB](https://aws.amazon.com/dynamodb/details/) is a
proprietary NoSQL database offered by amazon which provides very [cost
effective](https://aws.amazon.com/dynamodb/pricing/), typed,
javascriptish document storage.

New or prospective users should be warned that while DynamoDB provides
fairly expressive row-level operations (conditional writes, atomic
increment, etc), it does have a learning curve for those used to
regular databases due to its **complete lack of aggregate
functions**... this is the cost of scaling if you will, since these
become expensive as your data grows.

# Beta notice

This library was released on October 30th, 2015. Although I've tried
my best to avoid it, It no-doubt contains bugs, and should not (yet)
be used for mission critical work. Or at least not without you reading
this and strongly considering some end-to-end tests.

# Example

```julia
using DynamoDB

type DynamoExample
     id
     order
     int_to_update
end

const table = dynamo_table(DynamoExample, "JULIA_TESTING", :id, :order; env=env)

put_item(table, DynamoExample("string-based-id", 1, 10))
put_item(table, DynamoExample("string-based-id", 2, 100))
put_item(table, DynamoExample("string-based-id2", 1, 1000))

@show get_item(table, "string-based-id", 1).int_to_update # --> 10

update_item(table, "string-based-id", 1,
            set(attr("int_to_update"), attr("int_to_update") + 1)) # increments int_to_update

@show get_item(table, "string-based-id", 1).int_to_update # --> 11

update_item(table, "string-based-id", 1,
            set(attr("int_to_update"), attr("int_to_update") + 1),
            conditions=attr("int_to_update") == 10) # will fail to increment -- int_to_upate is 11

query(table, "string-based-id", between(attr("order"), 0, 10)) # gets us those first two elements
```

See the [integration
test](https://github.com/dls/DynamoDB.jl/blob/master/test/integration_tests.jl)
for more examples.

gha_language: Julia


text:
# PyChat
A Python chat application

### Prerequisites
This version of the code runs successfully on Windows 10 and Ubuntu-18.04. Should also compile on other variants of linux and Windows. Other operating systems are currently not supported.

### How to use:
* Download all files. You'll also need Python 3 interpreter installed. (Download Python 3 from [here](https://www.python.org/downloads/))
* Fire up server:

```python
python3 server.py
```

* Fire up client/s:

```python
python3 client.py
```

Once a server is running, it will accept clients which can send and receive messages simultaneously. Command-line style.

### Example:

#### Server-side:
```
$ py server.py
> Accepted new connection from <IP_ADDRESS>:41202 username: tester1
> Accepted new connection from <IP_ADDRESS>:41203 username: tester2
> Received message from tester1: Hello
> Received message from tester2: How are you?
```

#### client 1:
```
$ py client.py
> Username: tester1
> tester1 >> Hello
> tester1 >>
> tester2 > How are you?
>
```

#### client 2:
```
$ py client.py
> Username: tester2
> tester2 >>
> tester1 > Hello
> How are you?
> tester2 >>
```

repository: NoySegal/PyChat

repo_name: NoySegal/PyChat


text:
# Lily's architecture

Since I want Lily to be really flexible is actual architecture is not just an
straightforward Voice -> Stt -> Nlu -> Tts, but rather is more complex, but
at the same time I think it makes a lot of sense.

Lily having multiple signals has been inspired by the Kalliope project
(another assistant), woudln't have it if Kalliope didn't exist.

## Client/Server

Recently, Lily has been transformed into a client/server architecture, with the
clients being called satellites and the server being called... server, it doesn't
have any special name.

Client and Server communicate through MQTT, and most of the heavy lifting is
done in the server while the client can be pretty dumb (it only executes some
commands received from the server and performs hotword check and VAD analysis if
using voice commands).

It is planned that the client will announce what it can and can't do
through the 'capabilities' system, and the server and it's plugins might exploit
those to perform actions and interact with the user. Those 'capabilities' are be
optional protocols and are be independent from each other, this way a client
is not restrained on form, functionalities or complexity. Other than the basic
communication with the server everything will be considered a capability: Voice
interaction, text interaction, showing images, etc.

### Capabilities
*voice*: A client with this capbility can send voice audio to be detected by
Speech Recognition, and can receive voice. It also can receive other audio.

### Reasoning behind the current architecture

There's already the Hermes protocol, should we use it? Hermes basically
transforms a voice assistant into a set of microservices working together, while
it makes some sense when you think about scalability (specially with local
Speech Recognition and Speech Synthesis) and makes the overall build more
customizable, however it makes deployment much more difficult(think about
making sure that the process is executing and is not dead because of an error),
and on Android/iOS targets we would need a different direction completely, there's
also a potential bigger overhead since there's packing and transmission of data
across processes to do, and the OS putting to sleep waking up processes
(AFAIK calling the OS is a sure fire way of hurting performance).

So should we use the Hermes protocol? (since there are components out there
ready?) No. Lily's objective is more akin to that of Google Now and Siri in that
they will do more than just voice, this means we will have to deviate from the Snips Hermes
protocol,though i might follow it were it makes sense. Also, since I think that
being offline capable at all times is important, I envision one having multiple
Lilys that at times might synchronize (like having one on your phone and
another on your house), something which AFAIK Hermes doesn't support,

## Core

Since Lily's primary objective is to do some actions when some signals are
received (whether they are voice or otherwise), the core is actually a system
mapping signals and parameters to those signals to actions and parameters to
those actions. A set of signals, and actions called by those signals is called a
'skill'.

In this case voice is just another signal.

## Signals

As we said voice is another signal (called 'order') , though to be fair is kind
of a special signal as, both, 'order' and 'event' (a signal which is used to
signal all kind of things happening from code: start active listening, error ...),
are treated differently in the code, specially 'event' which is used in other signals
and other parts. For the time being the only way to add new signals is by own Rust code.

A skill having multiple signals will activate all of it's actions whenever any
of the signals are activated.

## Actions

Actions are anything that react to some signal being sent. A skill hacing multiple
actions will make all of them to activate whenver any signal is activated.

repository: sheosi/lily

gha_language: Rust

repo_name: sheosi/lily


text:
---
title: Authorship of Kratos files
keywords:
tags: [Authorship-of-Kratos-files.md]
sidebar: kratos_for_developers
summary:
---

The following guidelines defined by the **Technical committee** describe the practices related with the authorship of the files edited by the developers.

- We believe that **someone who contributed a new code feature is the author of that**.

- Anyone modifying/correcting/improving a given feature is understood to be doing for the Kratos's good and wouldn't be considered as author  **unless the original author/s agree about ADDING him as a new author**.
Note that "obvious re-factorings" should NOT be considered as contributions.

- In the case in which the original author is not any longer active then someone __doing significant modifications__ can ADD himself to the list of authors, taking over the responsability of the maintenance of the given file.

repository: KratosMultiphysics/Kratos

gha_license_id: NOASSERTION

repo_name: KratosMultiphysics/Kratos


text:
# DetectOrCreate

Rails 2.3.9 introduces a change which makes find_or_create_by unusable
with a hash as an argument. This gem gives similar functionality, with
the added ability to overwrite the existing record that is found.

## Installation

Add this line to your application's Gemfile:

    gem 'detect_or_create'

Add after the Rails::Initializer block:

    require 'detect_or_create'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install detect_or_create

## Usage

Find user with email<EMAIL_ADDRESS>or create a new user with that
email and additional attributes:

```
User.detect_or_create(:by => { :email =><EMAIL_ADDRESS>},
                      :with => { :name => "User", :active => true })

```

Just including the `by` argument will also work if you don't need
additional attributes.

```
User.detect_or_create(:by => { :email =><EMAIL_ADDRESS>})
```

You can also modify what was found:

```
User.detect_or_create(:by => { :email =><EMAIL_ADDRESS>},
                      :with => { :name => "Domain User 1",
                                 :email =><EMAIL_ADDRESS>                      :overwrite_existing => true)
```

## Run specs

    $ rspec spec/detect_or_create_spec.rb

## Contributing

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


text:
# mqtt-supervisor
Python based service checker that dispatches status events to an MQTT broker.

Configuration is set by a YAML file in which you can define any number of services to supervise. Software supports:
* MQTT quality of service (QOS)
* TLS/SSL-Certificates
* MQTT user/password authentication

There are three types of service supervision types available right now:

* **CommandReturnService:** Run a command and check its return value.
* **CommandContentService:** Run a command and either take its output as value of check the output via Regular
Expression.
* **LinuxNetstatService:** Check `/proc/net/tcp` or `/proc/net/tcp6` for certain ports / hosts listing. Works on Linux
only.

(c) 2016 Maximilian Kalus (www.auxnet.de)

repository: mkalus/mqtt-supervisor

repo_name: mkalus/mqtt-supervisor


text:
---
schema: pacelf
title: Mass treatment to eliminate filariasis in Papua New Guinea
organization: Bockarie, M.J., Tisch, D.J., Kastens, W., Alexander, N.D.E., Dimber, Z., Bockarie, F., Ibam, E., Alpers, M.P., Kazura, J.W.
notes: Background  The global initiative to eradicate bancroftian filariasis currently relies on mass treatment with four to six annual doses of antifilarial drugs. The goal is to reduce the reservoir of microfilariae in the blood to a level that is insufficient to maintain transmission by the mosquito vector.
access: Restricted

resources:
- name: Mass treatment to eliminate filariasis in Papua New Guinea
  url: '/docs/Papua_New_GuineaBockarie_et_al_2002a_NEJM_PNG_MDA_LF.txt'
  format: Electronic/Hardcopy
  access: Restricted
  pages: 1841-1848

category: Scientific Papers
access: Restricted
journal: New England Journal of Medicine
publisher: N/A
language: English
hardcopy_location: WHO DPS Fiji;JCU WHOCC Ichimori collection;
work_location: Papua New Guinea
year: 2002
decade: 2000
PacELF_ID: 537
---

repository: DanielBaird/jkan

repo_name: DanielBaird/jkan


text:
# persistWifiSetting

WiFiManager wrapper for ESP32 to be used with Arduino IDE.

This wrapper leverages the [Preferences](https://github.com/espressif/arduino-esp32/blob/master/libraries/Preferences/src/Preferences.h
) library from ESP32 to keep custom attributes in non-volatile memory:

- mqttServer
- mqttPort
- mqttUsername
- mqttPassword
- mqttTopic

At this time, there seems to be a bug in [wifiManager.getWiFiPass()](https://github.com/flavio-fernandes/WiFiManager/blob/87009dc443923721f5449e363e9aaac02da819f9/WiFiManager.h#L282)
which makes it impossible to know what is the SSID password configured. In order to work around that, the current implementation uses an extra custom field to have the password
provided (twice). ¯\\_(ツ)_/¯

Main steps:

- [Install ESP32 board in IDE](https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/)
- [Install WiFiManager](https://github.com/tzapu/WiFiManager). Right now, ESP32 is only supported in the [development branch](https://github.com/tzapu/WiFiManager/tree/development).
This wrapper was tested against git commit [87009dc443923721f5449e363e9aaac02da819f9](https://github.com/flavio-fernandes/WiFiManager/tree/87009dc443923721f5449e363e9aaac02da819f9).
- Copy [wifiConfig.h](https://github.com/flavio-fernandes/persistWifiSetting/blob/master/wifiConfig.h) and [wifiConfig.ino](https://github.com/flavio-fernandes/persistWifiSetting/blob/master/wifiConfig.ino) into your project
- Call `wifiConfig_init()` and `wifiConfig_get()` as shown below

In order to start the webserver portal, look at [NV_CLEAR_BUTTON_CHECK](https://github.com/flavio-fernandes/persistWifiSetting/blob/master/wifiConfig.h#L8-L12).
By default, the portal will use the ip address `http://<IP_ADDRESS>` and the SSID will be `ESP32_<UNIQUE_ID>`.

```
#include <WiFi.h>
#include "wifiConfig.h"

void setup() {
  wifiConfig_init();
  const WifiConfigData& cnf = wifiConfig_get();

  WiFi.mode(WIFI_STA);
  WiFi.begin(cnf.wifiSsid.c_str(), cnf.wifiPass.c_str());
}

void loop() {
  // do something amazing here...
}
```

repository: flavio-fernandes/persistWifiSetting

repo_name: flavio-fernandes/persistWifiSetting


text:
# Manifest Image Resizer Action

This action was designed to help generate images that you can use as icons in your manifest.json file when creating a PWA( progressive web app)

## How to use it
- Create a repository and upload an image in the root directory (ie the image shouldn't be enclosed in a folder).

- Click on the actions tab

- Click on `Set up a workflow yourself`

- And paste this:

        name: MY WorkFlow
        on: push

        jobs:
           create_images:
                runs-on: ubuntu-latest
                steps:

               - name: Checkout repository
                  uses: actions/checkout@v2

               - name: Send image to archive
                  uses: actions/upload-artifact@v1
                  with:
                    name: archive
                    path: .

                - name: manifest-image-resizer action
                  uses: sammychinedu2ky/manifest-image-resizer@master
                  with:
                    filename: upload.png #name of image you uploaded and also ensure you attatch the image extension(ie png,jpg,ico etc)

### The generated images would be saved in the artifact section with the name "generated-images". And that's it

#### You can as well check my site to generate easily both the manifest and standard icons by clicking [here](http://manifest-gen.netlify.com/)

gha_language: JavaScript


text:
@s
# h1 text
## h2 text
### h3 text
#### h4 text
##### h5 text
###### h6 text

this is H1
==========

@s
this is H2
----------

The only restrictions are that block-level HTML elements — e.g.
,
,
,
, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra \(unwanted\)
 tags around HTML block-level tags.

@s
\*literal asterisks\*

@s
## backslash escapes

    \   backslash
    `   backtick
    *   asterisk
    _   underscore
    {}  curly braces
    []  square brackets
    ()  parentheses
    #   hash mark
    +   plus sign
    -   minus sign (hyphen)
    .   dot
    !   exclamation mark

@s

Foo

@s
*emphasis*

*emphasis*

@s
## header

* text
*

@s
<
&

http://images.google.com/images?num=30&q=larry\+bird

4 < 5

@s
"  \n"  =>

> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
>
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
> id sem consectetuer libero luctus adipiscing.

@s
> This is the first level of quoting.
>
> > This is nested blockquote.
>
> Back to the first level.

@s
> ## This is a header.
>
> 1.   This is the first list item.
> 2.   This is the second list item.
>
> Here's some example code:
>
>     return shell_exec\("echo $input | $markdown_script"\);

@s
*   Red
*   Green
*   Blue

@s
+   Red
+   Green
+   Blue

-   Red
-   Green
-   Blue

@s
1.  Bird
2.  McHale
3.  Parish

1.  Bird
1.  McHale
1.  Parish

@s
3. Bird
1. McHale
8. Parish

@s
*   Bird

*   Magic

@s
1.  This is a list item with two paragraphs. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit. Aliquam hendrerit
    mi posuere lectus.

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet
    vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
    sit amet velit.

2.  Suspendisse id sem consectetuer libero luctus adipiscing.

@s
*   This is a list item with two paragraphs.

    This is the second paragraph in the list item. You're
only required to indent the first line. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit.

*   Another item in the same list.

@s
blockquote within a list item, the blockquote’s > delimiters need to be indented:

*   A list item with a blockquote:

    > This is a blockquote
    > inside a list item.

@s
*   A list item with a code block:

@s
This is a normal paragraph:

    This is a code block.

@s

This is a normal paragraph:

This is a code block.

@s
Here is an example of AppleScript:

    tell application "Foo"
        beep
    end tell

@s

Here is an example of AppleScript:

tell application "Foo"
    beep
end tell

@s

        © 2004 Foo Corporation

@s

<div class="footer">
    &copy; 2004 Foo Corporation
</div>

@s
Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block.

@s
## to be implemented

    * * *

    ***

    *****

    - - -

    ---------------------------------------

@s
This is [an example](http://example.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.

@s

This is
an example inline link.

This link has no
title attribute.

@s
## to be implemented

    This is [an example][id] reference-style link.
    This is [an example] [id] reference-style link.

    [id]: http://example.com/  "Optional Title Here"

@s
    [foo]: http://example.com/  "Optional Title Here"
    [foo]: http://example.com/  'Optional Title Here'
    [foo]: http://example.com/  (Optional Title Here)

    [id]: http://example.com/longish/path/to/resource/here
        "Optional Title Here"

@s
    [Google][]

    [Google]: http://google.com/

@s
*single asterisks*

_single underscores_

**double asterisks**

__double underscores__

@s
single asterisks

single underscores

double asterisks

double underscores

@s
un*frigging*believable

@s
\*this text is surrounded by literal asterisks\*

@s
Use the `printf()` function.

Use the printf() function.

``There is a literal backtick (`) here.``

There is a literal backtick (`) here.

@s
A single backtick in a code span: `` ` ``

A backtick-delimited string in a code span: `` `foo` ``

A single backtick in a code span: `

A backtick-delimited string in a code span: `foo`

@s
Please don't use any `<blink>` tags.

Please don't use any <blink> tags.

@s
`—` is the decimal-encoded equivalent of `—`.

&#8212; is the decimal-encoded
equivalent of &mdash;.

@s
inline images:

![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")

@s
reference images:

## to be implemented

    ![Alt text][id]

    [id]: url/to/image  "Optional title attribute"

@s
<http://example.com/>

http://example.com/

@s
<EMAIL_ADDRESS>
address@exa
mple.com

@s
## to be implemented

    a / b;
    // comment
    var c = a / 5;
    ////////
    /^\s+|\s+$/.test("   hello, world!   ");
    a/b/c

repository: MichaelHu/markdown

repo_name: MichaelHu/markdown


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

### 0.2.1 - 2021-07-12

#### 🛠 Internals

- Migrate to Beemo tooling. (#154) ([0cd2a6f](https://github.com/milesj/boost/commit/0cd2a6f)), closes [#154](https://github.com/milesj/boost/issues/154)

**Note:** Version bump only for package boost-theme-test-public

## 0.2.0 - 2020-11-29

#### 🚀 Updates

- Add `info` and `notice` theme color styles. (#120) ([5bc42d8](https://github.com/milesj/boost/commit/5bc42d8)), closes [#120](https://github.com/milesj/boost/issues/120)

**Note:** Version bump only for package boost-theme-test-public

## 0.1.0 - 2020-07-14

#### 🚀 Updates

- Enable terminal themes. (#90) ([aa4d462](https://github.com/milesj/boost/commit/aa4d462)), closes [#90](https://github.com/milesj/boost/issues/90)

#### 📦 Dependencies

- Update final peer dependencies. ([405b8ff](https://github.com/milesj/boost/commit/405b8ff))

**Note:** Version bump only for package boost-theme-test-public

repository: milesj/boost

repo_name: milesj/boost


text:
# ebwt2InDel

### Overview

ebwt2InDel is the new version of ebwt2snp (https://github.com/nicolaprezza/ebwt2snp). The new version detect also InDels and works directly on the input BWT, without building the LCP and GSA arrays. This is about 8 times more space-efficient (but slightly slower) than version 1.

The **ebwt2InDel** suite can be used to discover SNPs/indels inside one or between two sets of reads (fasta/fastq) *without* aligning them to  a reference genome (alignment-free, **reference-free**) by just analyzing the Burrows-Wheeler Transform of the dataset. The output is a fasta file (in KisSNP2 format) where sequences are the contexts surrounding the identified SNPs/indels. The suite finds its main use in applications where no reference genome is known (alignment-free, reference-free variation discovery), but could also lead to the discovery of variations not detected by standard alignment-based tools (which suffer from issues such as low-quality reference, alignment-dependent biases, and difficulty of aligning fragments containing gaps or inversions). Examples of use include:

- **Genotyping**: given a read set of an individual, find Heterozygous sites.
- **Metagenomics**: given a read set containing DNA sequenced from many individuals (possibly of unknown species and unknown number), find differences between their genomes. For example, when run on a bacteria sample, the tool can be used to isolate fragments covering antibiotic-resistent genes (since not all bacteria will be resistent, this event will appear as a SNP/INDEL and will be detected by the tool).
- **Rare-variant discovery**: given the reads sequenced from different cells of an individual, output fragments covering low-frequency variants (e.g. cancer-driving mutations).
- **Pairwise variant discovery**: find differences between the reads sequenced from two individuals.

### Modes

**ebwt2InDel** supports three modes:

1. Analyze one dataset. This mode finds SNPs/INDELs within a single read collection (e.g. genotyping, metagenomics, or rare-variant discovery).
~~~~
ebwt2InDel -1 collection.ebwt -o output.snp
~~~~

2. Analyze two datasets. This mode finds SNPs/INDELs between two read collections. The difference with the previous mode is that differences within the same dataset are not reported.
~~~~
ebwt2InDel -1 collection1.ebwt -2 collection2.ebwt -o output.snp
~~~~

3. Analyze two datasets merged in a single BWT. This mode operates as the previous one, but the input is provided differently: one BWT of the two merged collections, plus the binary Document Array telling which suffix belongs to which collection. This is twice as fast as the previous mode, because only one BWT is navigated (thus the number of cache misses is halved). The document array is a simple ASCII file filled with "0" and "1".
~~~~
ebwt2InDel -1 merged_collection.ebwt -d DA.txt -o output.snp
~~~~

### Pipelines

**IMPORTANT**: the DNA fragments of the input read set must contain only symbols 'A', 'C', 'G', 'T'. It is suggested either to filter out reads containing unknown characters 'N', or to remove them, or to replace them with random nucleotides.

First, the BWT of the input dataset(s) must be built. To achieve this, you can use https://github.com/felipelouza/egsa, https://github.com/giovannarosone/BCR_LCP_GSA, or https://github.com/felipelouza/egap. Then, **ebwt2InDel** can be run on the computed BWT(s) using one of the three modes above described.

Upon termination of **ebwt2InDel**,  the tool **filter_snp** can be used to filter the .snp file generated by ebwt2InDel so to keep only SNP/indels covered by at least m reads. Increasing m improves precision (but decreases sensitivity), and it is suggested when the input dataset is high-covered (e.g. a value m = 5 is suggested for coverages >= 25x).

If a reference is available, a VCF file can be generated from the output calls with the following pipeline:

- **seqtk** seq -F 'I' calls.snp > calls.fastq (convert the .snp file to fastq with fake base qualities)
- **bwa mem**: to align calls.fastq to the reference genome
- **sam2vcf** converts the ".sam" file produced by the previous step into a ".vcf" file containing the variations.

We call **snp2vcf** the pipeline **seqtk -> bwa-mem -> sam2vcf**.

Finally, If also a ground-truth VCF file is available, one can validate the above VCF file using the executable **vcf_vs_vcf**.

### Publications

- *Nicola Prezza, Nadia Pisanti, Marinella Sciortino and Giovanna Rosone: Detecting mutations by eBWT. WABI 2018. Leibniz International Proceedings in Informatics, LIPIcs , 2018, 113, art. no. 3, Schloss Dagstuhl--Leibniz-Zentrum für Informatik.
- Nicola Prezza, Nadia Pisanti, Marinella Sciortino, and Giovanna Rosone, 2019. SNPs detection by eBWT positional clustering. Algorithms for Molecular Biology, 14(1), p.3.
- Nicola Prezza, Nadia Pisanti, Marinella Sciortino, Giovanna Rosone: Variable-order reference-free variant discovery with the Burrows-Wheeler Transform. BMC Bioinform (2020), 21-S(8): 260, 10.1186/s12859-020-03586-3.*

A pre-print version can be found here: https://arxiv.org/abs/1805.01876.

### Funding

Supported by the project Italian MIUR-SIR CMACBioSeq ("Combinatorial methods for analysis and compression of biological sequences") grant n.~RBSI146R5L, PI: Giovanna Rosone. Link: http://pages.di.unipi.it/rosone/CMACBioSeq.html

### Install

~~~~
#download BCR (for BWT computation)
git clone https://github.com/giovannarosone/BCR\_LCP\_GSA

#build ebwt2InDel
cd ebwt2InDel
mkdir build
cd build
cmake ..
make

#build BCR
cd ../../BCR\_LCP\_GSA
make
~~~~

### Run - one sample

Enter the folder with the fasta file _reads.fasta_ . We assume that executables 'BCR\_LCP\_GSA', 'ebwt2InDel' are global.

~~~~
#Step 1: remove reads containing 'N', or replace 'N' with random nucleotides
#Step 2: optional, but considerably increases sensitivity of the tool. Insert in reads.fasta also the reverse-complement of the reads.

#Build the BWT of the sets of reads (using 1GB of RAM)
BCR\_LCP\_GSA reads.fasta reads.fasta.bwt 1024

#Call SNPs (do this in the same folder containing all other files)
ebwt2InDel -1 reads.fasta.bwt -o output.snp

#File output.snp now contains identified SNPs/indels.

#Filter only events supported by at least 5 reads
filter_snp output.snp 5 > output.5.snp

~~~~

### One sample - parallel mode (experimental)

One sample can also be analyzed using multithreading. The idea is to sort the input fasta file by context (using HARC). After that, the sorted fasta can be broken into pieces, each of which can be analyzed separately.

We provide a script, **pebwt2InDel**, that executes automatically the parallel pipeline.

**Required pre-installed software:**:
HARC (https://github.com/shubhamchandak94/HARC)
BCR_LCP_GSA (https://github.com/giovannarosone/BCR_LCP_GSA)

**Usage**
~~~~
pebwt2InDel.sh input_fasta threads RAM read_len output_directory/ harc_folder/
~~~~

**NOTES**:
- use absolute paths ending with /
- "read_len" must be shorter than or equal to the length of most reads; remainders are lost!
- RAM is the RAM used by BCR (in MB)
- RAM: at most n bytes, where n is the total number of nucleotides.
- Disk usage: in addition to the input and output (snp file), the process uses 4n additional Bytes on disk.

### Run - two samples

Enter the folder with the two fasta files _reads1.fasta_  and _reads2.fasta_ (i.e. the reads of the two samples). We assume that executables 'BCR\_LCP\_GSA', 'ebwt2InDel' are global.

~~~~
#Step 1: remove reads containing 'N', or replace 'N' with random nucleotides
#Step 2: optional, but considerably increases sensitivity of the tool. Insert in reads1.fasta also the reverse-complement of the reads. Repeat with reads2.fasta

#Build the BWT of the sets of reads
BCR\_LCP\_GSA reads1.fasta reads1.fasta.bwt 1024
BCR\_LCP\_GSA reads2.fasta reads2.fasta.bwt 1024

#Call SNPs (do this in the same folder containing all other files)
ebwt2InDel -1 reads1.fasta.bwt -2 reads2.fasta.bwt -o output.snp

#Filter only events supported by at least 5 reads
filter_snp output.snp 5 > output.5.snp

~~~~


text:
# Contributing to oci-cloudnative

*Copyright © 2019, Oracle and/or its affiliates. All rights reserved.*

Pull requests can be made under
[The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html)
(OCA).

Before submitting a code contribution please discuss it with us by creating a
new issue.

For pull requests to be accepted into oci-cloudnative, the bottom of
your commit message must have the following line using your name and
e-mail address as it appears in the OCA Signatories list.

```text
Signed-off-by: Your Name<EMAIL_ADDRESS>```

This can be automatically added to pull requests by committing with:

```text
git commit --signoff
````

Only pull requests from committers that can be verified as having signed the OCA can be accepted.

repository: oracle-quickstart/oci-cloudnative

repo_name: oracle-quickstart/oci-cloudnative


text:
---
title: Medium | Partition Labels 673
tags:
  - common
  - tricky
categories:
  - Leetcode
  - Two Pointers
date: 2020-09-01 20:56:24
---

A string `S` of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts.

[Leetcode](https://leetcode.com/problems/partition-labels/)

<!--more-->

**Example 1:**

```
Input: S = "ababcbacadefegdehijhklij"
Output: [9,7,8]
Explanation:
The partition is "ababcbaca", "defegde", "hijhklij".
This is a partition so that each letter appears in at most one part.
A partition like "ababcbacadefegde", "hijhklij" is incorrect, because it splits S into less parts.
```

**Note:**

- `S` will have length in range `[1, 500]`.
- `S` will consist of lowercase English letters (`'a'` to `'z'`) only.

**Follow up:**

[Maximum Number of Non-Overlapping Substrings](https://leetcode.com/problems/maximum-number-of-non-overlapping-substrings/)

---

#### Standard solution

We keep two pointers to track the last occurrence of each char and update the `last` pointer.

```java
class Solution {
    public List<Integer> partitionLabels(String S) {
        int n = S.length();
        int[] max = new int[26];
        for (int i = 0; i < n; i++) {
            char c = S.charAt(i);
            max[c - 'a'] = i;
        }
        List<Integer> res = new ArrayList<>();
        int end = 0;
        int start = 0;
        for (int i = 0; i < n; i++) {
            end = Math.max(end, max[S.charAt(i) - 'a']);
            if (i == end) {
                res.add(end - start + 1);
                end = start = i + 1;
            }
        }
        return res;
    }
}
```

T: O(n)			S: O(1)

repository: weiranfu/leetcode-with-me

branch_name: refs/heads/main

gha_language: Python

repo_name: weiranfu/leetcode-with-me


text:
---
layout: default
permalink: docs/conditionals.html
---

# Conditionals

Conditionals provide control flow to a language which is otherwise static, providing conditional imports, mixins, functions, and more. The examples below are simply examples, and not recommended :)

## if / else if / else

The `if` conditional works as you would expect, simply accepting an expression, evaluating the following block when `true`. Along with `if` are the typical `else if` and `else` tokens, acting as fallbacks.

The example below would conditionally overload the `padding` property, swapping it for `margin`.

```stylus
overload-padding = true

if overload-padding
  padding(y, x)
    margin y x

body
  padding 5px 10px
```

Another example:

```stylus
box(x, y, margin = false)
  padding y x
  if margin
    margin y x

body
  box(5px, 10px, true)
```
Another `box()` helper:

```stylus
box(x, y, margin-only = false)
  if margin-only
    margin y x
  else
    padding y x
```

## unless

For users familiar with the Ruby programming language, we have the `unless` conditional. It’s basically the opposite of `if`—essentially `if (!(expr))`.

In the example below, if `disable-padding-override` is `undefined` or `false`, `padding` will be overridden, displaying `margin` instead. But if it’s `true`, `padding` will continue outputting `padding 5px 10px` as expected.

```stylus
disable-padding-override = true

unless disable-padding-override is defined and disable-padding-override
  padding(x, y)
    margin y x

body
  padding 5px 10px
```

## Postfix Conditionals

Stylus supports postfix conditionals. This means that `if` and `unless` act as operators; they evaluate the left-hand operand when the right-hand expression is truthy.

For example let's define `negative()` to perform some basic type checking. Below we use block-style conditionals:

```stylus
negative(n)
  unless n is a 'unit'
    error('invalid number')
  if n < 0
    yes
  else
    no
```

Next, we utilize postfix conditionals to keep our function terse.

```stylus
negative(n)
  error('invalid number') unless n is a 'unit'
  return yes if n < 0
  no
```

Of course, we could take this further.  For example, we could write `n < 0 ? yes : no`, or simply stick with booleans: `n < 0`.

Postfix conditionals may be applied to most single-line statements. For example, `@import`, `@charset`, mixins—and of course, properties as shown below:

```stylus
pad(types = margin padding, n = 5px)
  padding unit(n, px) if padding in types
  margin unit(n, px) if margin in types

body
  pad()

body
  pad(margin)

body
  apply-mixins = true
  pad(padding, 10) if apply-mixins
```

yielding:

```css
body {
  padding: 5px;
  margin: 5px;
}
body {
  margin: 5px;
}
body {
  padding: 10px;
}
```

repository: stylus/stylus

branch_name: refs/heads/dev

repo_name: stylus/stylus


text:
Logic Bank governs SQLAlchemy
update transaction logic - multi-table derivations, constraints,
and actions such as sending mail or messages. Logic consists of both:

* **Rules - 40X** more concise
using a spreadsheet-like paradigm, and

* **Python - control and extensibility,**
using standard tools and techniques

> The example described below is a _typical_ example of multi-table logic.
>
> You may find it helpful to begin with [this Tutorial, using a basic example](../../wiki/Tutorial).
>
>
> **Update - Jan 26, 2021:** checkout [**ApiLogicServer**](https://github.com/valhuber/ApiLogicServer#readme) - create a complete JSON:API for your database, with LogicBank, and a basic web app

This readme contains:

1. [Background](#background)
    * [Why](#why---simple-cocktail-napkin-spec-explodes-into-massive-legacy-code) - problems addressed
    * [What](#what---declare-spreadsheet-like-rules---40x-more-concise) - what are spreadsheet-like rules
    * [How](#how---usage-and-operation-overview) - usage / operation overview
    * [Logic Execution](#logic-execution-add-order---watch-react-chain) - sample transaction execution, reuse and scalability
    * [Instant Web App](#an-agile-perspective) - built using [Flask App Builder Quickstart](https://github.com/valhuber/fab-quick-start/wiki)
1. [Install Instructions](#installation) - of Python and Logic Bank, with verify and run instructions
1. [Project Information](#project-information)

# Background

## Why - Simple Cocktail-Napkin Spec Explodes into Massive Legacy Code

If you've coded backend database logic - multi-table derivations and constraints -
you know how much work it is, and how tedious.  Whether you code it in
triggers and stored procedures, in ORM events, or UI controllers, it's a lot:
typically nearly half the effort for a database project.

It's also incredibly repetitive - you often get the feeling you're doing the same thing over and over.

And you're right.  It's because backend logic follows patterns of "what" is supposed to happen.
And your code is the "how".  Suddenly, a simple cocktail napkin specification explodes into a massive amount of legacy code:

Logic Bank was designed to make the cocktail napkin spec _executable_.

## What - Declare Spreadsheet-like Rules - 40X More Concise
Logic Bank introduces rules that are 40X more concise than legacy code.
The 5 rules below (lines 40-49) express the same logic as 200 lines of code [**(see them here)**](examples/nw/logic/legacy).  That's because rules are all about "what"
-- spreadsheet-like expressions that automate the tedious "how":

### Standard Python - Declare, Extend, Manage
Logic Bank is fully integrated with Python:
* **Declare** rules in Python as shown above (more details in How, below)
* **Extend** rules with Python (rule on line 51 invokes the Python function on line 32)
* **Manage** logic using your existing IDE (PyCharm, VSCode etc for code completion, debugging, etc),
and source control tools and procedures

### Technology Evaluation
40X is... _large_ - do these results hold in practice?
See [here](../../wiki#technology-evaluation) for
additional background, and real world experience.

## How - Usage and Operation Overview

Logic Bank operates as shown above:

 1. **Declare and Activate** (see example above):

    a. Create a ```declare_logic``` function (above, line 12),
    and declare your rules using ```Rule.``` (e.g., with IDE code completion)

    b. After opening your database, call ```activate```
    to register your rules, and establish Logic Bank as
    a listener for SQLAlchemy ```before_flush``` events

 2. Your application operates as usual: makes calls on `SQLAlchemy` for inserts, updates and deletes
    and issues `session.commit()`

    - By bundling transaction logic into SQLAlchemy data access, your logic
  is automatically shared, whether for hand-written code (Flask apps, APIs)
  or via generators such as Flask AppBuilder

 3. The **Logic Bank** engine handles SQLAlchemy `before_flush` events on
`Mapped Tables`, so executes when you issue ```session.commit()```

 4. The logic engine operates much like a spreadsheet:
    - **watch** for changes at the attribute level
    - **react** by running rules that referenced changed attributes, which can
    - **chain** to still other attributes that refer to
_those_ changes.  Note these might be in different tables,
providing automation for _multi-table logic_

Logic does not apply to updates outside SQLAlchemy,
nor to SQLAlchemy batch updates or unmapped sql updates.

Let's see how logic operates on a typical, multi-table transaction.

### Logic Execution: Add Order - Watch, React, Chain

The `add_order` example illustrates how
__Watch / React / Chain__ operates to
check the Credit Limit as each OrderDetail is inserted:

1.  The `OrderDetail.UnitPrice` (copy, line 49) references Product, so inserts cause it to be copied

2.  `Amount` (formula, line 48) watches `UnitPrice`, so its new value recomputes `Amount`

3.  `AmountTotal` (sum, line 46) watches `Amount`, so `AmountTotal` is adjusted (more on adjustment, below)

4.  `Balance` (sum, line 43) watches `AmountTotal`, so it is adjusted

5.  And the Credit Limit constraint (line 40) is checked (exceptions are raised if constraints are violated, and the transaction is rolled back)

All of the dependency management to see which attributes have changed,
logic ordering, the SQL commands to read and adjust rows, and the chaining
are fully automated by the engine, based solely on the rules above.

### Spreadsheet-like Automatic Reuse
Just as a spreadsheet reacts
to inserts, updates and deletes to a summed column,
rules automate _adding_, _deleting_ and _updating_ orders.
This is how 5 rules represent the same logic as 200 lines of code.

Check out more examples:
* [**Ship Order**](../../wiki/Ship-Order) illustrates *cascade*, another form of multi-table logic
* [**Banking**](../../wiki/Sample-Project---Banking) is a complex transaction using the command pattern

### Scalability: Automatic Prune / Optimize logic
Scalability requires more than clustering - SQLs must be pruned
and optimized.  For example, the balance rule:
* is **pruned** if only a non-referenced column is altered (e.g., Shipping Address)
* is **optimized** into a 1-row _adjustment_ update instead of an
expensive SQL aggregate

For more on how logic automates and optimizes multi-table transactions,
[click here](../../wiki#scalability-automatic-pruning-and-optimization).

## An Agile Perspective
The core tenant of agile is

    Working software, driving collaboration, for rapid iterations

Here's how rules can help.

#### Working Software _Now_
The examples above illustrate how just a few rules can replace
[pages of code](examples/nw/logic/legacy).

#### Collaboration: Running Screens - Automatic Basic Web App

Certainly business users are more easily able to
read rules than code.  But still, rules are
pretty abstract.

Business users relate best to actual working pages -
_their_ interpretation of working software.
The [fab-quick-start](https://github.com/valhuber/fab-quick-start/wiki)
project enables you to build a basic web app in minutes.

This project has already generated such an app, which you can run
once you've finished the Installation process, below.

#### Iteration - Automatic Ordering
Rules are _self-ordering_ - they recognize their interdependencies,
and order their execution and database access (pruning, adjustments etc)
accordingly.  This means:

* order is independent - you can state the rules in any order
and get the same result

* maintenance is simple - just make changes, additions and deletions,
the engine will reorganize execution order and database access, automatically

# Installation
First, follow the instructions to verify / install Python, then install Logic Bank.

### Python Installation

The first section below verifies whether your Python environment is current.
The following section explains how to install a current Python environment.

#### Verify Pre-reqs: Python 3.8, virtualenv, pip3
Ensure you have these pre-reqs:
```
python --version
# requires 3.8 or higher (Relies on `from __future__ import annotations`, so requires Python 3.8)

pip --version
# version 19.2.3 or higher... you might be using pip3

pyenv --version
# 1.2.19 or higher
```
#### Install Python (if required)
If you are missing any, install them as described here.  Skip this step if your pre-reqs are fine.

To install Python:

* Python3.8

   * Run the windows installer
      * Be sure to specify "add Python to Path"
   * On mac/Unix, consider [using homebrew](https://brew.sh/), as described
[here](https://opensource.com/article/19/5/python-3-default-mac#what-to-do)

* virtualenv - see [here](https://www.google.com/url?q=https%3A%2F%2Fpackaging.python.org%2Fguides%2Finstalling-using-pip-and-virtual-environments%2F%23creating-a-virtual-environment&sa=D&sntz=1&usg=AFQjCNEu-ZbYfqRMjNQ0D0DqU1mhFpDYmw)  (e.g.,  `pip install virtualenv`)
   * on PC, see [these instructions](https://pypi.org/project/pyenv-win/)

* An IDE - optional - any will do (I've used [PyCharm](https://www.jetbrains.com/pycharm/download) and [VSCode](https://code.visualstudio.com), install notes [here](https://github.com/valhuber/fab-quick-start/wiki/IDE-Setup)), though different install / generate / run instructions apply for running programs.

Issues?  [Try here](https://github.com/valhuber/fab-quick-start/wiki/Mac-Python-Install-Issues).

### Install LogicBank
This procedure installs the Logic Bank source code, including
examples you can explore.

> To use Logic Bank in your own project: `pip install LogicBank`

In your IDE or Command Line:

```
# optionally fork, and then (WARNING - remove hyphens if you download the zip)
git clone https://github.com/valhuber/LogicBank.git
cd LogicBank
# windows: python -m venv venv
virtualenv venv
# For windows: .\venv\Scripts\activate
source venv/bin/activate
pip install -r requirements.txt
```
> **Warning -** if you just download the zip, *be sure* to remove the hyphen from the name.

> **Warning -** if you use an IDE, be sure to activate the virtual environment, and verify you are running a proper version of Python.

### Verify and Run

#### Run the `nw/tests`
Run the `nw/tests` programs under your IDE or the
command line; start with `test_add_order` and `test_upd_order_shipped,`
and see the [walk-throughs here](../../wiki/home#logic-execution-watch-react-chain).
The tests use ```unittest``` - you can run them as follows:

```
cd examples/nw/tests
python -m unittest test_add_order.py
python test_add_order.py  # or, run it like this

python -m unittest discover -p "test*.py"  # run all tests
```

> Note: the console **log** depicts logic execution
>
> Log lines are long - consider copying them to a text
> editor to view with / without word wrap
>
> Or, run in an IDE - they look [like this](../../wiki/home#debugging-standard-debugger-logic-logging).

#### Optional - Run `basic_web_app`
Flask App Builder is based on SQLAlchemy, so it can integrate  Logic Bank as
[described here](../../wiki/Flask-App-Builder-Integration).  The project contains a
pre-built sample you can run:

```
cd LogicBank
cd examples/nw/basic_web_app
python run.py
```
You then start the app (use **new window**) with
[`http://<IP_ADDRESS>:8080`](http://<IP_ADDRESS>:8080), or try

* [`http://<IP_ADDRESS>:5000/`](http://<IP_ADDRESS>:5000/)
* [`http://<IP_ADDRESS>:8080/`](http://<IP_ADDRESS>:8080/)

> **Login** (upper right): user = admin, password = p

You can
1. Navigate to Order 11011 (a _multi-page_ web app)
    * Click **Menu > Customer List**
    * Click the **magnifying glass** for the first customer
    * Click the **List Order tab**
    * Click the **magnifying glass* for Order **11011**
2. Click Edit so you can make changes
3. Change the Shipped Date
4. Click save
5. Verify logic enforcement
    * The web app has been [configured](../../wiki/Flask-App-Builder-Integration) to activate the rules
    * The logic for this update [is interesting](../../wiki/Ship-Order) -
    check out the console log

## Next Steps

### Run the Tutorial

First, run the [**10 minute Tutorial**](../../wiki/Tutorial).
You will see how to create, run and debug a rule in a simple, running example.

### Explore Sample Transactions

Then, check out the [**Examples**](../../wiki/Examples) - note the **navigation bar** on the right.  Key samples:
* [**Ship Order**](../../wiki/Ship-Order) illustrates *cascade*, another form of multi-table logic
* [**Allocation**](../../wiki/Sample-Project---Allocation) illustrates *extensibility*,
providing a reusable pattern for a *provider* to allocate
to a set of *recipients*
* [**Banking**](../../wiki/Sample-Project---Banking) is a complex transaction using the command pattern
* [**Referential Integrity**](../../wiki/Referential-Integrity) illustrates referential integrity support

A good way to proceed is to
* Clear the log
* Run the test
* Review the log, and the rules that drove the processing

### Articles
There a few articles that provide some orientation to Logic Bank:
* [Extensible Rules](https://dzone.com/articles/logic-bank-now-extensible-drive-95-automation-even) - defining new rule types, using Python
* [Declarative](https://dzone.com/articles/agile-design-automation-how-are-rules-different-fr) - exploring _multi-statement_ declarative technology
* [Automate Business Logic With Logic Bank](https://dzone.com/articles/automate-business-logic-with-logic-bank) - general introduction, discussions of extensibility, manageability and scalability
* [Agile Design Automation With Logic Bank](https://dzone.com/articles/logical-data-indendence) - focuses on automation, design flexibility and agile iterations

### See also the [LogicBankExamples](https://github.com/valhuber/LogicBankExamples) project

The `Logic Bank Examples` [(setup instructions here)](../../wiki/Sample-Project---Setup)
contains the same examples, but _not_ the `logic_bank` engine source code.
It uses the logic engine via `pip install`, as you would for your own projects:

```
pip install logicbank
```
> This is **not required here**, and requires the same
> pre-reqs noted above

# Project Information

#### What's in the project
Logic Bank consists of:

* Several test database systems - `nw,`  `banking`,
  `referential_integrity` and `payment_allocation`;
these contain

    * [Databases](examples/nw/db) sqlite (no install required) and models

    * [Test folders](examples/nw/tests) that run key transactions - just run the scripts
(note the logs)

    * [Flask AppBuilder apps](examples/nw/basic_web_app) (as described above)

    * [Logic](examples/nw/logic) - rules (and for `nw`,
    the manual `legacy` code for contrast to rules)

* The `nw` sample illustrates comparisons of Business logic, both
[by code](examples/nw/logic/legacy) and by rules (shown above).

* The `logic_bank` engine source code

#### Status: Running, Under Development
Functionally complete, 9/29/2020, tested for 2 databases.

Incubation - ready to explore and provide feedback
on general value, and features.

#### Internals

To explore:

* Click [here](../../wiki/Explore-Logic-Bank)
    for install / operations procedures

* Click [here](../../wiki/Logic-Walkthrough) for a
    short overview of internal logic execution

#### Acknowledgements
There are many to thank:
* Tyler Band, for testing and the Banking example
* Max Tardiveau, for testing
* Nishanth Shyamsundar, for PC testing
* Michael Holleran, for collaboration
* Mike Bayer, for suggestions on leveraging Python typing
* Achim Götz, for reporting an issue in FAB Quick Start use of Logic Base
* Gloria, for many reviews... and golden patience

repository: abeusher/LogicBank

repo_name: abeusher/LogicBank


text:
Deploying
=========

(only for those who have access to the production server)

    # Staging
    ansible-playbook -i ansible/hosts-deploy ansible/deploy/playbook.yml --limit=staging --extra="project_version=develop" --ask-vault-pass

    # Production
    ansible-playbook -i ansible/hosts-deploy ansible/deploy/playbook.yml --limit=production --extra="project_version=[VERSION]" --ask-vault-pass

gha_language: PHP


text:
# Ansible Scalable and Load Balanced (SLB) Tomcat

An ansible playbook to deploy on Amazon AWS a scalable set of instances of Apache Tomcat 7 container proxied via a “load-balancing purpose” instance driven by HAProxy, as a bonus I  Nagios3 on all the instance, so even an example of infrastructure monitoring is given.

So the ansible playbook will launch:

* 2 EC2 micro instances tagged as *tomcat*
    * Security Group with port 8080 and 22
    * Tomcat 7 installed via apt

* 1 EC2 micro instances tagged as *harpoxy*
    * Security Group with port 80, 8888, 1936 and 22
    * HAProxt and Socat installed via apt
    * the instance will proxy and balance (using Round-Robin strategy) from port 8888 to the Tomcat instances
    * an HAproxy amdin interface is available on port 1936

## Prerequisites
* [Ansible](http://docs.ansible.com/intro_installation.html)
* an account on [Amazon AWS](http://aws.amazon.com/) and a corresponding IAM role

## Configuration

###1. AWS Credentials
Export system env variables for Amazon AWS IAM role credentials like the following:

	export ANSIBLE_HOST_KEY_CHECKING=False
	export AWS_ACCESS_KEY_ID='AK123'
	export AWS_SECRET_ACCESS_KEY='abc123'

or put the previous commands in a file (e.g. secret_iam.env) and launch form terminal:

 	source secret_iam.env

###2. AWS regions, vpc, subnets

Fill the configuration file under ec2/var/main.yml

    keypair: <<your keipair name>>
    region: us-east-1
    instance_type: t2.micro
    image: ami-9eaa1cf6 # Ubuntu Server 14.04 LTS (HVM), SSD Volume Type
    tag_ec2_current: launched
    subnets:
    - subnet-fbe306d0
    vpc_id: vpc-9ed752fb

All the ec2 instances will be configured starting from this file.

## Running

Now you are able to launch the playbook

    ansible-playbook -i ec2.py --private-key=<path_to_your_aws-pem_key ec2-lauch.yml  -v

## Notes

* Templates and playbooks are massively compiled from variables yaml files. Remeber to check them before installing your inventory.

## Known Issues

* Launching the playbook for the first time may fail resulting in *AnsibleUndefinedVariable* for some values of ec2 tags (*ec2_tag_Name*). Running the same for a new attempt will succeed silently.


text:
[[breadcrumb /dnd/class/Rogue|Rogue]]

Some rogues enhance their fine-honed skills of stealth and agility with magic, learning tricks of enchantment and illusion. These rogues include pickpockets and burglars, but also pranksters, mischief-makers, and a significant number of adventurers.

||~ Level ||~ Proficiency
Bonus ||~ Sneak
Attack ||~ Features ||~ Cantrips
Known ||~ Spells
Known ||~ 1st ||~ 2nd ||~ 3rd ||~ 4th ||
|| 1st || +2 || 1d6 || Expertise, Sneak Attack, Thieves' Cant || -- || -- || -- || -- || -- || -- ||
|| 2nd || +2 || 1d6 || Cunning Action || -- || -- || -- || -- || -- || -- ||
|| 3rd || +2 || 2d6 || Spellcasting, Mage Hand Legerdemain || 3 || 3 || 2 || -- || -- || -- ||
|| 4th || +2 || 2d6 || Ability Score Improvement || 3 || 4 || 3 || -- || -- || -- ||
|| 5th || +3 || 3d6 || Uncanny Dodge || 3 || 4 || 3 || -- || -- || -- ||
|| 6th || +3 || 3d6 || Expertise || 3 || 4 || 3 || -- || -- || -- ||
|| 7th || +3 || 4d6 || Evasion || 3 || 5 || 4 || 2 || -- || -- ||
|| 8th || +3 || 4d6 || Ability Score Improvement || 3 || 6 || 4 || 2 || -- || -- ||
|| 9th || +4 || 5d6 || Magical Ambush || 3 || 6 || 4 || 2 || -- || -- ||
|| 10th || +4 || 5d6 || Ability Score Improvement || 4 || 7 || 4 || 3 || -- || -- ||
|| 11th || +4 || 6d6 || Reliable Talent || 4 || 8 || 4 || 3 || -- || -- ||
|| 12th || +4 || 6d6 || Ability Score Improvement || 4 || 8 || 4 || 3 || -- || -- ||
|| 13th || +5 || 7d6 || Versatile Trickster || 4 || 9 || 4 || 3 || 2 || -- ||
|| 14th || +5 || 7d6 || Blindsense || 4 || 10 || 4 || 3 || 2 || -- ||
|| 15th || +5 || 8d6 || Slippery Mind || 4 || 10 || 4 || 3 || 2 || -- ||
|| 16th || +5 || 8d6 || Ability Score Improvement || 4 || 11 || 4 || 3 || 3 || -- ||
|| 17th || +6 || 9d6 || Spell Thief || 4 || 11 || 4 || 3 || 3 || -- ||
|| 18th || +6 || 9d6 || Elusive || 4 || 11 || 4 || 3 || 3 || -- ||
|| 19th || +6 || 10d6 || Ability Score Improvement || 4 || 12 || 4 || 3 || 3 || 1 ||
|| 20th || +6 || 10d6 || Stroke of Luck || 4 || 13 || 4 || 3 || 3 || 1 ||

## Spellcasting

When you reach 3rd level, you gain the ability to cast spells. See chapter 10 for the general rules of spellcasting and chapter 11 for the wizard spell list.

**Cantrips.** You learn three cantrips: *[[[spell:mage hand]]]* and two other cantrips of your choice from the [wizard spell list](/dnd/class_spell_list/wizard/true). You learn another wizard cantrip of your choice at 10th level.

**Spell Slots.** The Arcane Trickster Spellcasting table shows how many spell slots you have to cast your spells of 1st level and higher. To cast one of these spells, you must expend a slot of the spell's level or higher. You regain all expended spell slots when you finish a long rest.

For example, if you know the 1st-level spell _[[[spell:charm person]]]_ and have a 1st-level and a 2nd-level spell slot available, you can cast _[[[spell:charm person]]]_ using either slot.

**Spells Known of 1st-Level and Higher.** You know three 1st-level [wizard spells](/dnd/class_spell_list/wizard/true) of your choice, two of which you must choose from the enchantment and illusion spells on the [wizard spell list](/dnd/class_spell_list/wizard/true).

The Spells Known column of the Arcane Trickster Spellcasting table shows when you learn more wizard spells of 1st level or higher. Each of these spells must be an enchantment or illusion spell of your choice, and must be of a level for which you have spell slots. For instance, when you reach 7th level in this class, you can learn one new spell of 1st or 2nd level.

The spells you learn at 8th, 14th, and 20th level can come from any school of magic.

Whenever you gain a level in this class, you can replace one of the wizard spells you know with another spell of your choice from the wizard spell list. The new spell must be of a level for which you have spell slots, and it must be an enchantment or illusion spell, unless you're replacing the spell you gained at 8th, 14th, or 20th level.

**Spellcasting Ability.** Intelligence is your spellcasting ability for your wizard spells, since you learn your spells through dedicated study and memorization. You use your Intelligence whenever a spell refers to your spellcasting ability. In addition, you use your Intelligence modifier when setting the saving throw DC for a wizard spell you cast and when making an attack roll with one.

* Spell save DC = 8 + your proficiency bonus + your Intelligence modifier
* Spell attack modifier = your proficiency bonus + your Intelligence modifier

## Mage Hand Legerdemain

Starting at 3rd level, when you cast *[[[spell:mage hand]]]*, you can make the spectral hand [[[general:conditions#invisible|invisible]]], and you can perform the following additional tasks with it:

* You can stow one object the hand is holding in a container worn or carried by another creature.
* You can retrieve an object in a container worn or carried by another creature.
* You can use thieves' tools to pick locks and disarm traps at range.

You can perform one of these tasks without being noticed by a creature if you succeed on a Dexterity (Sleight of Hand) check contested by the creature's Wisdom (Perception) check.

In addition, you can use the bonus action granted by your Cunning Action to control the hand.

## Magical Ambush

Starting at 9th level, if you are hidden from a creature when you cast a spell on it, the creature has disadvantage on any saving throw it makes against the spell this turn.

## Versatile Trickster

At 13th level, you gain the ability to distract targets with your *[[[spell:mage hand]]]*. As a bonus action on your turn, you can designate a creature within 5 feet of the spectral hand created by the spell.

## Spell Thief

At 17th level, you gain the ability to magically steal the knowledge of how to cast a spell from another spellcaster.

Immediately after a creature casts a spell that targets you or includes you in its area of effect, you can use your reaction to force the creature to make a saving throw with its spellcasting ability modifier. The DC equals your spell save DC. On a failed save, you negate the spell's effect against you, and you steal the knowledge of the spell if it is at least 1st level and of a level you can cast (it doesn't need to be a wizard spell). For the next 8 hours, you know the spell and can cast it using your spell slots. The creature can't cast that spell until the 8 hours have passed.

Once you use this feature, you can't use it again until you finish a long rest.

----

*Source: Player's Handbook, p. 97*


text:
Panorific
=========

**An immersive, intuitive, motion-based way to explore high-quality panoramas and photos on an iOS device. Panorific is implemented in Swift.**

## Usage

1. If you're not using Storyboards skip this step. Drag a UIViewController from the Object Library onto the Storyboard and change its class to `PanorificViewController` in the Identity Inspector.
2. In the presenting view controller's prepareForSegue function, set the image property of the appearing PanorificViewController.
``` Swift
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        if segue.identifier == "ShowPanorificSegue" {
            let destination = segue.destinationViewController as PanorificViewController
            destination.image = UIImage(named: "BreathtakingImage")
        }
    }
```

## Contact

Naji Dmeiri

- http://najidmeiri.com
- http://github.com/ndmeiri

## License

Panorific is available under the MIT License. See the LICENSE file for more info.

repository: mejasonwang/Panorific

repo_name: mejasonwang/Panorific


text:
# Zafira UI

## Requirements
* NPM  v6.0.0+
* Node v8.9.4+

## Installation
Go to the project directory and install dependencies
```
npm cache clean --force
npm i
```

## Build

**NOTE**: The build artifacts will be stored in the `dist/` directory.

### Development

For local development specify correct **ZAFIRA_WS_URL** and execute:
```
ZAFIRA_WS_URL=https://localhost:8080/zafira-ws npm start
```
Application will be available by the URL: http://localhost:3000, it will automatically reload if you change any of the source files.

### Production

For production deployment execute:
```
npm run build
```
The following environement variables may be specified:
* **ZAFIRA_UI_BASE** - UI bath path (default is /app/)
* **ZAFIRA_UI_VERSION** - version of UI build

### Startup variables
* **ZAFIRA_WS_URL** - URL of API server

repository: aravindanath/zafira-ui

repo_name: aravindanath/zafira-ui


text:
# Version Tool

![Version Tool](../resources/Logos/Version-Tool.svg)

## Semantic Versioning

Applications and packages should be released using the [semantic versioning schema](https://semver.org/).
It consists of a major release number, a minor release number, a patch number and sometimes a revision number.
These numbers are separated by dots which leads to versions such as 1.2.3.
Here, 1 is the major release, 2 the minor release and 3 the patch number.

Each of the numbers is incremented by some rules. The major version is only increased if the app's API fundamentally changes so that breaking changes are introduced.
The minor number is bumped if new features are added but the API is still compatible.
The patch number is incremented if bugfixes are added which do not break the application.

## Use Case

The version number of an application should be incremented to show what kind of changes have happened but also to make sure that testers can overwrite already installed versions on a device.
If the version number is not incremented or even lowered, testers first need to deinstall apps on devices such as Android, UWP and iOS and can only install the new version of the app after that.
This means that in a setup where a continuos integration pipeline creates installer files, the version should be incremented automatically.
Developers can determine the major and minor version.
The patch number can be incremented automatically.

Since Unity stores the app's version number in the project settings, changing the version number is a change that needs to be added to the source control.
This means that the version number cannot be stored explicitly in the Unity project itself since calculating and applying a version number contributes another entry in the source control's history.
The versioning tool allows developers to add placeholder variables to the version string in Unity's project settings.
They can then define the major and minor version using Git tags, e.g. v1.2.
When building the installer files of the app, the versioning tool automatically calculates the version number from the available information in Git and writes it into the built application.

## Usage

The version tool allows you to add placeholders in the project's version string.
You can add any number of placeholders and you can combine them with other text.

To edit your project's version number go to "Edit > Project Settings..." in the top menu of Unity's editor.
After that, select the "Player" tab in the opened window.
At the top, there is a field version.
Enter the version schema with the placeholders here.

The following placeholders are available:

| Placeholder | Meaning | Example Value |
| --- | --- | --- |
| `$gitVersion` | Gets the version which consists of a major, minor and patch number based on Git tags. | 1.2.3 |
| `$gitBranch` | Gets the current branch name | develop |
| `$appVersion` | Gets the version from the environment variable `APP_VERSION`. If the variable is not set, it behaves like `$gitVersion`. | 1.2.3 |

In order to calculate the correct version numbers, tag your application's releases with Git tags.
The tags must have the form `v1.2`, so start them with a "v", followed by the major and minor version number.

The version is automatically applied to a built application.
This means that the version number is not available in the Unity editor but only in the compiled application package.

The version number is currently applied to installation files for the following platforms:

| Platform | Used Format |
| --- | --- |
| Standalone | Uses the version string that was set in the player settings and where the placeholders are replaced |
| UWP | Uses a version number format with four numbers: <IP_ADDRESS>. The first three numbers are reconstructed from the `$appVersion` placeholder. The last number is always 0 as it is reserved by the Windows Store. |
| Android | Uses one single number. It is calculated from the total number of commits that have been made on the currently checked out branch. |

Some CI systems do not allow Unity to start other processes so that Git cannot be executed.
In these cases, you can use the `$appVersion` placeholder and you can set the environment variables to bypass the Git execution.

For UWP, the number can be overwritten by setting the environment variable `APP_VERSION`.
If it is non-empty, the value of the variable is used.
Otherwise, Git is executed to calculate the version.

For Android, the number can also be overwritten by setting the environment variable `ANDROID_APP_VERSION`.
If this variable is set, it is parsed to an integer and applied to the Android version.
In case that the variable is not set or the value cannot be parsed to an integer, the version tool tries to fetch the number of commits on the branch using Git.

## Recommended Setup

It is recommended to follow the [gitflow workflow](https://www.atlassian.com/de/git/tutorials/comparing-workflows/gitflow-workflow).
You should use a main branch which contains stable releases, a develop branch which works towards the next release and feature branches for individual features.

To get correct version numbers, tag releases on the master branch in the form `v1.0`.
Hence, start the tag with a `v`, followed by the major and minor release number.

The given way of calculating versions is not able to give each commit on every branch a unique version.
If two features are developed in parallel, they share the same version numbers since their number of commits since the last tag can be identical.
Therefore, it is recommended to produce versioned builds from the main branch.
On the master branch, each version is unique since branches that are merged into master are put into a sequential order again.

If you want to provide preview builds, you can provide builds from the develop branch but you should label them as preview to indicate that their versions are not final and might change on the master branch.

Some CI runner do not allow Unity to access Git.
In this case, you can use the environment variable `APP_VERSION` to calculate the version as part of the CI script.
To also pre-calculate the Android version, set the `ANDROID_APP_VERSION` environment variable.
The version tool then uses the values of these environment variables.

To calculate the version of the application in the same way as the version tool, use the following Linux bash script:

```
#! /bin/bash

DESCRIBE=`git describe --tags --long --match v[0-9]\*`

VERSION=`echo $DESCRIBE | awk '{split($0,a,"-"); print a[1]}'`
BUILD=`echo $DESCRIBE | awk '{split($0,a,"-"); print a[2]}'`

if [[ "${DESCRIBE}" =~ ^[A-Fa-f0-9]+$ ]]; then
    VERSION="0.0.0"
    BUILD=`git rev-list HEAD --count`
    BUILD=${DESCRIBE}
fi

if [ "${BUILD}" = "" ]; then
    BUILD='0'
fi

echo ${VERSION:1}.${BUILD}
```

Assuming that the script is called `get_version.sh`, you can set the environment variable using:

```
APP_VERSION=`./ci/get_version.sh`
```

## Testing
You can test the data that the versioning tool reads from Git using the menu at the top in the Unity editor:
The available entries are:

| Menu Entry | Output | Example Output |
| --- | --- | --- |
| i5 Toolkit > Build Versioning > Get Semantic Version | Gets the major and minor version from Git tags and the patch version from the number of commits since the last git tag. The calculated version is output as a log message | 1.2.3 |
| i5 Toolkit > Build Versioning > Get Git Branch | Logs the name of the currently checked out Git branch in the console | develop |
| i5 Toolkit > Build Versioning > Get Total Commits on Branch | Counts the total number of commits that are tracked on the currently checked out branch and logs them in the console. | Total number of commits on branch: 42 |

gha_language: C#


text:
---
# Display name
name: Sahar Ghannay

# Username (this should match the folder name)
authors:
- sahar

# Is this the primary user of the site?
superuser: true

# Role/position
role: Associate Professor at LISN, CNRS

# Organizations/Affiliations
organizations:
- name: Université Paris-Saclay
  url: "https://www.limsi.fr/en/"

# Short bio (displayed in user profile at end of posts)
bio: Her main research interests are continuous representations learning and their application to natural language processing and speech recognition tasks, semantic information extraction form spoken and writen language and dialog system.

interests:
- Artificial Intelligence
- Representation learning
- Natural /Spoken language processing
- Information extraction
- Dialog system

education:
  courses:
  - course: PhD in Computer Science
    institution: Le Mans university
    year: 2017
  - course: MS in in Computer Science
    institution: Le Mans university
    year: 2013
  - course: BS in in Computer Science
    institution: Le Mans university
    year: 2011

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form<EMAIL_ADDRESS>or "#contact" for contact widget.
social:
- icon: envelope
  icon_pack: fas
  link: '#contact'  # For a direct email link, use<EMAIL_ADDRESS>- icon: twitter
  icon_pack: fab
  link: https://twitter.com/Sahar_ghannay
- icon: linkedin
  icon_pack: fab
  link: https://www.linkedin.com/in/sahar-ghannay-614a7830/
- icon: google-scholar
  icon_pack: ai
  link: https://scholar.google.com/citations?user=pkYn1SoAAAAJ&hl=fr
- icon: github
  icon_pack: fab
  link: https://github.com/saharghannay
- icon: orcid
  icon_pack : fab
  link: https://orcid.org/0000-0002-7531-2522
# Link to a PDF of your resume/CV from the About widget.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# - icon: cv
#   icon_pack: ai
#   link: files/cv.pdf

# Enter email to display Gravatar (if Gravatar enabled in Config)
email<EMAIL_ADDRESS>
# Organizational groups that you belong to (for People widget)
#   Set this to `[]` or comment out if you are not using People widget.
user_groups:
- Researchers
- Visitors
---

Sahar Ghannay is an associate professor at  Université Paris-Saclay, in the CNRS, [LISN](https://www.limsi.fr/en/) research center, since September 2018.

She received a PhD in Computer Science from Le Mans University on Septembre 2017.  Her thesis work is part of the ANR [VERA](https://anr.fr/Project-ANR-12-BS02-0006) (AdVanced ERror Analysis for speech recognition) project.
During her PhD, she spent a few months as a visiting researcher at Apple within the Siri Speech team.

 As a postdoctoral researcher at [LIUM](https://lium.univ-lemans.fr), she worked on neural end-to-end systems for the detection of named entities, speech understanding, as  part of the Chist-Era [M2CR](https://projets-lium.univ-lemans.fr/m2cr/) (Multimodal Multilingual Continuous Representation for Human Language Understanding) project.

Her main research interests are continuous representations learning and their application to natural language processing and speech recognition tasks, semantic information extraction form spoken and writen language and dialog system.

repository: saharghannay/academic-kickstart

repo_name: saharghannay/academic-kickstart