text:
---
title: "Comparison of Banking Systems - Part 1"
layout: post
mathjax: true
excerpt: "A rough mathematical model of the comparison between Islamic Banking System and Traditional Banking System"
---

The purpose of this project is to come up with a very basic an rough mathematical model of the Islamic Banking system and the Traditional banking system. The idea is to compare and see the differences, similarities and how they may affect an entity involved in these systems.
**Full Disclosure:** The model is very basic an is designed in such a way that it could be understood by someone with a bit of basic calculus knowledge and experience. The models are based on the simple concepts of profit and loss. Nothing major. I am not a scholar of Islamic Finance hence my knowledge in this is very shallow. I have just used common assumptions and variables when modeling these. Feel free to correct me where I have gone wrong (check my contact page if need be).

## Some concepts of the two systems
For our purposes, we will only consider the scenario of a bank giving out a "loan" to a business and how the business and the bank benefits from each other.
In **Islamic Banking (Finance)**, the concept of _interest_ is non-existent. It operates on sharing profits and losses. That is, if a client **C** wanted to start a business but does not have enough capital, then they may request for some amount of initial capital **C0** from an Islamic Bank **I**. The policy for _I_ is that instead of charging interest on _C0_ on _C_, _I_ would share some percentage of the profit/loss gained by _C_ over a period of time. This is to say that the amount _C0_ will be repaid to _I_ as well some amount of profit gained by _C_ for a limited period of time. This amount may be a percentage _p_.
In **Traditional Banking**, the bank **T** gives out a loan to _C_. And as a method of repayment, _T_ charges an interest (mostly compound interest) with rate _i_ on the initial capital _C0_. The client _C_ has to repay the total amount with interest regardless of whether _C_ makes any profit or not.

## Variables
- The earning of Islamic Bank, **I**
- The earning of Traditional Bank, **T**
- The earning of client, **C**
- Initial capital given by _I_ and _T_ to _C_, **C0**
- Percentage profit/loss shared by _I_ and _C_, **p**
- Interest rate of _T_, **i**
- A time period, **t**

## Assumptions
- The earning _C_ is ideal and grows exponentially over time (assuming the business grows and opens new branches).
- To have a "fair" earning rate for both _I_ and _T_, the values of _p_ and _i_ are equal, i.e. _p_=_i_.

## The Models
### Model of C's growth
Using the above assumptions, it can be concluded that _C_ is a function of _t_ and can be modelled as

$$ C(t) = C_{0}\text{exp}(\alpha t) $$

where, $$\alpha$$ is a constant.

The profit made by the client at any given time $$t$$ can be derived to be the following:

$$ C'(t) = C_{0}\alpha\text{exp}(\alpha t) $$

And the following is my reasoning.
The total revenue at any given time $$t$$ is $$C(t)$$. Hence the revenue in the next time period is $$C(t + \Delta t)$$. Then it follows that the profit gained in time $$\Delta t$$ is $$C(t + \Delta t)-C(t)$$. Hence the rate of profit gained is the profit divied by $$\Delta t$$. Therefore if we take the limit as $$\Delta t \to \infty$$ we obtain the following expression:

$$ \lim_{\Delta t \to \infty} = \frac{C(t + \Delta t) - C(t)}{\Delta t} = C'(t) $$

### Model of I's earning
Based on the concept above, it can be concluded that $$I$$ is a function of $$t$$ and depends on the function $$C'(t)$$ and the constant $$p$$. Hence our model becomes:

$$ I(t) = pC'(t) $$

$$ I(t) = pC_{0}\alpha\text{exp}(\alpha t) $$

And the rate at which this profit increases is the function $$I'(t) = pC_{0}\alpha^{2}\text{exp}(\alpha t)$$
From this we can deduce the _net profit_ of the client can be given by:

$$ C^\ast = C(t) - I(t) $$

$$ C^\ast = (1-p) C_{0}\alpha\text{exp}(\alpha t) $$

### Model of T's earning
Traditional banks use mostly compound interest when they give out loans to businesses. Hence the following can be deduced:

$$ T(t) = C_{0}{(1+i)}^{t} - C_{0} $$

Similarly the rate of increase in T's profit is simply the function $$T'(t) = \ln(1+i)C_{0}{(1+i)}^{t}$$
From the previous expressions, we can derive that C's _net profit_ my be given by the expression:

$$ C^{\ast\ast} = C_{0}\alpha\text{exp}(\alpha t) - C_{0}{(1+i)}^{t} + C_{0} $$

## Parameter values
- $$C_{0} = 100,000$$ for the initial capital
- $$p = i = 0.10$$ as the profit and interest rates
- $$\alpha = 0.9$$ for best case
- $$\alpha = 0.2$$ for intermediate case
- $$\alpha = 0.05$$ for worst case
- $$t = 10$$ with values from $$[0,10]$$ with 1 step increment

## Results
The code for the model can be found [here](https://github.com/AriqAhmer/random-projects/tree/main/models). There are three Jupyter Notebooks (Python Codes) for the best, intermediate and worst cases.

### Growth of C
The following graphs show the best, intermediate and worst case for the growth of _C_ (in that order)

![best growth of C](/assets/financial_model_results/best_growth_c.png)

![intermediate growth of C](/assets/financial_model_results/intermediate_growth_c.png)

![worst growth of C](/assets/financial_model_results/worst_growth_c.png)

### Profit of I vs T
These graphs compare the profits earned by _I_ and _T_ using the best, intermediate and worst case growth of _C_ (in that order)

![best profit I vs T](/assets/financial_model_results/best_profit_i_t.png)

![intermediate profit I vs T](/assets/financial_model_results/intermediate_profit_i_t.png)

![worst profit I vs T](/assets/financial_model_results/worst_profit_i_t.png)

### Profit of I and C
The following graphs compare how both I and C gain profits using the same order of cases as above

![best profit I vs C](/assets/financial_model_results/best_profit_i_c.png)

![intermediate profit I vs C](/assets/financial_model_results/intermediate_profit_i_c.png)

![worst profit I vs C](/assets/financial_model_results/worst_profit_i_c.png)

### Profit of T and C
The following graphs compare how T's and C's profits evolve over time using the same order of cases as above

![best profit T vs C](/assets/financial_model_results/best_profit_t_c.png)

![intermediate profit T vs C](/assets/financial_model_results/intermediate_profit_t_c.png)

![worst profit T vs C](/assets/financial_model_results/worst_profit_t_c.png)

## Discussion
In this best case scenario, where C's growth is very good, I and C manage to make profits. However, T makes less profit over the years as compared to I. This might be beneficial to the community as I will now be able to help out more businesses with more investments in each business.
In this intermediary scenario, where C's growth is quite good, I and C still manage to make profits. However, T manages to make more profit over the years than I. But the net profit of C declines over the years where at year ~3.5, C starts making losses.
In this worst case scenario, where C's growth is okay (almost linear), I and C still manage to make profits although the rate is slow. However, T makes more profit than I. This may be good for T but C loses out as its business model cannot cope with the interest rates over the years. Hence C makes losses from the very beginning and the business shuts down.

## Conclusion
Using a bit of "basic" mathematics, we are able to witness that the Islamic Banking system is better than the traditional banking system. This has been just a rough model. This is part 1. In part 2, I will try and model how these systems may affect the economic systems and balance of a country. Keep in mind that one can make the model as complex as they would like. This is just the tip of the iceberg and a proof of concept. Please feel free to correct me where I might have made mistakes and suggest on how this model can be improved further.

license: Unlicense


text:
# Anagramador

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/837a975a802f4fc1920d6114a23b73b1)](https://www.codacy.com/app/jtpdev/anagramador?utm_source=github.com&utm_medium=referral&utm_content=jtpdev/anagramador&utm_campaign=Badge_Grade)

Algorithm in Java to create anagrams.

It's so simple to use and understand.

You only need to instantiate the class [Anagramador](https://github.com/jtpdev/anagramador/blob/master/anagramador/src/main/java/com/harbor/anagramador/Anagramador.java) and get the fields of it.

To try it only, you can use the [Test](https://github.com/jtpdev/anagramador/blob/master/anagramador/src/test/java/com/harbor/anagramador/Test.java) class to test the [Anagramador](https://github.com/jtpdev/anagramador/blob/master/anagramador/src/main/java/com/harbor/anagramador/Anagramador.java) and your changes, if you had do.

license: MIT

repository: jtpdev/anagramador

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: jtpdev/anagramador


text:
---
author: Aijaz
comments: false
date: '2010-02-13 19:01:08'
layout: post
slug: why-should-i-use-cpan
status: publish
title: Why Should I Use CPAN?
categories:
- Computers
tags:
- CPAN
- Perl
- TaskForest
- Testing
---

I came across some comments made about an open source program that I had
written in perl.  The user was complaining about how he couldn't get it to
install.  The reason was that the program relies on other modules from the
archive of open source perl software known as [CPAN (Comprehensive Perl Archive Network)](http://www.cpan.org/), and one of them failed to install.
<!--more-->

This got me thinking about the benefits of using third-party libraries in our
own code.  Why should a program depend on so many external modules when it
could implement what it needs itself?

The answer, in one word, is "Testing."  A well-written piece of software isn't
considered complete if it doesn't have well-documented tests that exercise
every part of the program.

There are many common tasks that most programs perform - such as reading
configuration food, performing date arithmetic and writing to log files.
Every popular language has third-party libraries that perform these tasks
correctly and reliably.  If I were to try to duplicate them, it would almost
certainly result in inferior code; the mature libraries have had the benefits
of extensive testing as well as enhancements and fixes of bugs reported by
users.  Using third-party software allows me to focus on my program and what
makes it unique.

<!-- ai c /wp/camel.jpg /wp/camel-439x293.jpg 439 293 Perl can be a little stubborn, sometimes. -->

extension: markdown


text:
# DuoTone Dark Themes for VSCode

Based on the great [DuoTone Dark Theme for Atom](https://github.com/simurai/duotone-syntax) by [Simurai](https://github.com/simurai). Built for Visual Studio Code.

![](https://raw.githubusercontent.com/sallar/vscode-duotone-dark/master/screenshot.png)

## Installation

This extension is available for free in the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sallar.vscode-duotone-dark).

## Included Themes

![](https://github.com/simurai/duotone-dark-sea-syntax/raw/master/docs/screenshot.png)

![](https://github.com/simurai/duotone-dark-space-syntax/raw/master/docs/screenshot.png)

![](https://github.com/simurai/duotone-dark-forest-syntax/raw/master/docs/screenshot.png)

![](https://github.com/simurai/duotone-dark-sky-syntax/raw/master/docs/screenshot.png)

![](https://github.com/simurai/duotone-dark-earth-syntax/raw/master/docs/screenshot.png)

repository: nathanielw/vscode-duotone-dark

gha_license_id: MIT

repo_name: nathanielw/vscode-duotone-dark


text:
---
indicator: 15.a.1
layout: indicator
permalink: /15-a-1/
sdg_goal: '15'
data_non_statistical: false
goal_meta_link: 'https://unstats.un.org/sdgs/files/metadata-compilation/Metadata-Goal-15.pdf '
goal_meta_link_text: United Nations Sustainable Development Goals Metadata (PDF 4.0 MB)
graph_type: line
indicator_definition: >-
  Total ODA flows to developing countries quantify the public effort that donors
  provide to developing countries for biodiversity.
indicator_name: >-
  Official development assistance and public expenditure on conservation and
  sustainable use of biodiversity and ecosystems
indicator_sort_order: 15-aa-01
published: true
reporting_status: complete
target: >-
  Mobilize and significantly increase financial resources from all sources to
  conserve and sustainably use biodiversity and ecosystems
target_id: 15.a
graph_title: >-
  a) Total and b) Government c) Private d) GEF e) US Gov f) GER Gov g) WWF  h)
  Others Real Biodiversity Expenditure (in 2013 prices)
un_custodian_agency: Organisation for Economic Co-operation and Development (OECD)
un_designated_tier: 1/3
data_show_map: false
source_active_1: true
source_url_text_1: Link to source
source_active_2: false
source_url_text_2: Link to Source
source_active_3: false
source_url_3: Link to source
source_active_4: false
source_url_text_4: Link to source
source_active_5: false
source_url_text_5: Link to source
source_active_6: false
source_url_text_6: Link to source
title: Untitled
data_provider: MET
frequency: Annual
data_source: >-
  MET Development of a Baseline of Biodiversity Expenditure in Namibia 2014, p
  52
unit_of_measurement: a-h) Million N$ (2013 prices)
local_indicator_definition: >-
  a) Total and b) Government c) Private d) GEF e) US Gov f) GER Gov g) WWF  h)
  Others Real Biodiversity Expenditure (in 2013 prices)
global_indicator_definition: >-
  Official development assistance and public expenditure on conservation and
  sustainable use of biodiversity and ecosystems
---

repository: sustainabledevelopment-Namibia/data

gha_language: Shell

repo_name: sustainabledevelopment-Namibia/data


text:
+++
# Display name
name = "Yuri Pritykin"

# Username (this should match the folder name)
authors = ["pritykin"]

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

# Role/position
role = "Postdoctoral Research Associate"

# Organizations/Affiliations
#   Separate multiple entries with a comma, using the form: `[ {name="Org1", url=""}, {name="Org2", url=""} ]`.
organizations = [ { name = "Memorial Sloan Kettering Cancer Center", url = "https://www.mskcc.org/research/ski" } ]

# Short bio (displayed in user profile at end of posts)
bio = ""

# Enter email to display Gravatar (if Gravatar enabled in Config)
email = ""

# List (academic) interests or hobbies
interests = [
  "Computational biology",
  "Cancer immunology",
  "Regulation of gene expression",
#  "Statistics",
#  "Machine learning",
  "Functional genomics",
  "Single-cell technologies"
#  "Cancer",
#  "Epigenetics",
]

# 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"]

# List qualifications (such as academic degrees)
[[education.courses]]
  course = "PhD, Computer Science"
  institution = "Princeton University"
  year = 2014

[[education.courses]]
  course = "Candidate of Sc (PhD), Mathematics"
  institution = "Lomonosov Moscow State University"
  year = 2009

[[education.courses]]
  course = "Specialist (MSc), Mathematics"
  institution = "Lomonosov Moscow State University"
  year = 2007

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/widgets/#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"

[[social]]
  icon = "google-scholar"
  icon_pack = "ai"
  link = "https://scholar.google.com/citations?hl=en&user=Arx56RkJBrYC&view_op=list_works&sortby=pubdate"

[[social]]
  icon = "twitter"
  icon_pack = "fab"
  link = "https://twitter.com/PritykinScience"

[[social]]
  icon = "linkedin"
  icon_pack = "fab"
  link = "https://www.linkedin.com/in/yuri-pritykin-5b290993/"

[[social]]
  icon = "orcid"
  icon_pack = "ai"
  link = "https://orcid.org/0000-0001-6589-981X"

# [[social]]
#   icon = "github"
#   icon_pack = "fab"
#   link = "https://github.com/pritykin"

# 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.
# [[social]]
#   icon = "cv"
#   icon_pack = "ai"
#   link = "files/cv.pdf"

+++

I am a postdoctoral researcher in [the Leslie lab](https://www.mskcc.org/research/ski/labs/christina-leslie) in [Computational and Systems Biology Program](https://www.mskcc.org/research/ski/programs/computational-biology) at [Memorial Sloan Kettering Cancer Center](https://www.mskcc.org/research/ski). My main interest and expertise is in using applied statistics, machine learning, and efficient computer algorithms to address fundamental questions in biology by integrative analysis and interpretation of multi-dimensional data.

#### Awards

* AACR---Bristol-Myers Squibb Immuno-oncology Research Fellowship (2019)
* Memorial Sloan Kettering---Parker Institute for Cancer Immunotherapy---Cycle for Survival Fund (2018)

repository: pritykin/hugo-academic-kickstart

repo_name: pritykin/hugo-academic-kickstart


text:
# ext_2G4_channel_multiatt

This is a channel model for ext_2G4_phy_v1

This is a non realistic channel model.
It models NxN independent paths each with a configurable attenuation
This attenuation can also be configured to change over time.

The default atennuation for all paths is set with the command line option
`-at=<attenuation>`.

A file can be used to set the attenuation for some/all of the individual paths.
This file is specified with the command line option `-file=<att_matrix_file>`

This file shall have one separate line per path like:

    `x y : {value|"<timed_attenuation_file>"}`

Where:

* x is the transmitter number, x = 0..N-1
* y is the receiver number     y != x
* N being the number of devices in the simulation
* value is a floating point value in dB
* `<timed_attenuation_file>` : is the path to a `<timed_attenuation_file>` as
  described below which applies to that path.
  Note that this file name shall be provided in between `""`
* Not all paths need to be provided. Those omited will default to the attenuation
  provided from the command line.

The file names can be either absolute or relative to `bin/`

For both files, `#` is treated as a comment mark (anything after a `#` is
discarded)
Empty lines are ignored

Note that the Phy assumes the channel to be pseudo-stationary, that is, that the
channel propagation conditions are static enough during a packet reception, that
is, that the coherence time of the channel is much bigger than the typical
packet length.
Therefore the channel model won't be called to reevaluate conditions during a
packet unless the devices which are transmitting change.

### The `<timed_attenuation_file>`:

This file contains 2 columns, the first column represents time in
microseconds (an integer value), and the second column the attenuation at that given time.
The times shall be in ascending order.

If the simulation time is found in the file, the channel will use the
corresponding attenuation value.

If the simulation time falls in between 2 times in the file, the channel
will interpolate linearly the attenuation.

If the simulation time is before the first time value in the file, the
channel will use the first atttenuation provided in the file.

If the simulation time is after the last time value in the file, the channel
will use the last attenuation provided in the file.

### The `-atextra=<extra_attenuation>` command line option:

You can provide an extra attenuation to be added to all paths, independently of
how their attenuation was originally calculated, with the `-atextra` command line
option.
This `extra_attenuation` value will just be added to all paths.

### An example:

`./bs_2G4_phy_v1 -D=3 -s=Hola -channel=multiatt -argschannel -at=40 -file=paths_att_file.txt`

`paths_att_file.txt`:
```
0 1 : 65
1 0 : 65
0 2 : "/myfolder/att_file.txt"
2 0 : "/myfolder/att_file.txt"
#Note that the paths from 1<->2 are not specified. They will default to the -at command line parameter
```

`att_file.txt`:
```
1000000    60
11000000  120
11000001   60
```

With this configuration, the radio traffic between device:

* device 0 and device 1 will have an attenuation of 65dB
* device 0 and device 2 will have an attenuation of
    * 60dB up to the first second
    * An increasing attenuation between 60->120 dB, between the first second and the 11th. At a rate of 6dB per second
    * A sudden reduction in the attenuation to 60 dB right after, which is maintained thereafter.


text:
//[shark-graph](../../../../index.md)/[shark](../../index.md)/[HeapObject](../index.md)/[HeapInstance](index.md)/[byteSize](byte-size.md)

# byteSize

[jvm]\
val [byteSize](byte-size.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)

## See also

jvm

| | |
|---|---|
| [shark.HeapObject.HeapClass](../-heap-class/instance-byte-size.md) |  |

repository: pushpalroy/leakcanary

repo_name: pushpalroy/leakcanary


text:
# **P**haserJS Arcade Controls

This is my attempt to make the perfect game mechanics. Essentially a combination of learnings from [Game Mechanic Explorer](https://gamemechanicexplorer.com/#platformer-1) and [this](http://www.emanueleferonato.com/2017/06/16/the-basics-behind-wall-jump-in-platform-games-html5-prototype-made-with-phaser-and-arcade-physics/) wonderful "wall jump" method by Emanuele Feronato. With some tweaks by myself.

### Live Demo

https://asadmemon.com/phaserjs-arcade-controls/

Controls: Arrow keys to move and space for jump.

### Features
- Walking with acceleration/de-acceleration.
- Variable jumping (pressing key for higher time results in higher jump)
- Wall jump/climbing.
- Wall sliding down (by holding key against the wall when coming down)

repository: asadm/phaserjs-arcade-controls

repo_name: asadm/phaserjs-arcade-controls


text:
# Highwind

## Description

Highwind is a dot.net core web api for issuing Java Web Tokens (jwt) in a windows domain.

The api utilises integrated windows authentication to authenticate incoming requests and returns a jwt for use in other applications.

This allows a non windows app (i.e. linux docker container with web app) to effectively authenticate a user seemlessly with integrated windows auth.

Swagger is available at '/swagger'.

This is a proof of concept project.

## Getting Started

### A. Restore Nuget packages.
```bash
dotnet restore
```

### B. Generate a public and private key (for RSA signed JWTs - otherwise check appsettings hmacSecretKey)

1. Generate keys
```bash
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
```
2. Convert these to XML format using a site like [RSA Key Converter](https://superdry.apphb.com/tools/online-rsa-key-converter). This is required for generating an instance of `RSA` - see `XmlHelper.cs`.
3. Place the results for the public and private keys into `public.key.xml` and `private.key.xml` in the root directory.
4. You can use [Xml Formatter](http://www.webtoolkitonline.com/xml-formatter.html)

### C. Configure `appsettings.json` as per environment.

Make sure to edit the "Cors:allowedOrigins" section to include the domain of your client app/s.

### D. Execute/Debug

```bash
dotnet run
```

## Deployment

### A. Publish

```bash
dotnet publish
```

### B. Execute
```bash
dotnet run highwind.dll
```

## Endpoints

Current version is 1.0.

### GET /v{version}/Token/auth?redirectURL

The main endpoint.

All clients need to hit this endpoint to authenticate a user via a GET redirect or GET ajax request.

This endpoint uses integrated windows authenticatoin to authenticate the incoming request and redirects to `redirectURL` following success or failure.

Upon success, it sets an http only cookie via a Set-Cookie header in the response.

If there is a failure, it will set the cookie to an invalid value which the client will need to handle.

#### Normal workflow
1. Client receives request from user - say access root / of website.
2. Client redirects to `highwind/v{version}/Token/auth?apiKey&redirectURL`
3. Highwind auths user and sets cookie in response and redirects back to `redirectURL`
4. Client handles cookie in middleware
5. See Highwind Test Client project for details. See also `EXAMPLE.MD`.

### POST /v{version}/Token/validate

A simple validation endpoint to test a jwt is valid by highwind's perspective.

Expects Body
{
    "token": "token-value",
    "audience": "audience-value"
}

## TODO
- Add client secret Handling - i.e. need DB with client id, client secret hash + audience.
- Mapping of client secret to audience - see previous point.

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## References

- [JWT RSA & HMAC + ASP.NET Core](https://piotrgankiewicz.com/2017/07/24/jwt-rsa-hmac-asp-net-core/)
- [JWT](https://jwt.io/introduction/)

## Author

MaiorSi

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# Models
## User
 - has_many :stories
 - has_many :characters
 - has_many :stories, through: :characters
 - :username (string)
 - :email (string)
 - :password_digest (string)

## Story
 - belongs_to :user
 - has_many :characters
 - has_many :users, through: :characters
 - :name (string)
 - :summary (text)
 - :story_outline (text)

## Characters
 - belongs_to :user
 - belongs_to :story
 - :name (string)
 - :species (string)
 - :role (string)
 - :level (integer)
 - :description (string)

# Stretch Goals
 - Create journal model to add to stories

# Nested Routes
 - '/users/:id/characters'
 - '/users/:id/stories'
 - '/stories/:id/characters'

branch_name: refs/heads/main


text:
# Challenge 21

## String Split, Join, and Slicing

Python has powerful string manipulation capabilities including string indexing,
splitting, joining, and slicing.

This challenge has you take in a string and output three other strings:
1. One with each space replaced by a dash
2. One with last 5 characters all in lowercase
3. One with the string backwards with every other character skipped

### Input Format

Only one line of input containing the string.

### Output Format

Print three lines each on its own line.

### Function Prototypes
    def split_join_slice(line):

    if __name__ == '__main__':
        line = input()
        split_join_slice(line)

### Sample Input
    Sammy Shark

### Sample Output
    Sammy-Shark
    shark
    kaSymS

gha_language: Python


text:
# Docker postgresql setup

### Pull (postgresql 9.6)

```sh
$ docker pull postgres:9.6
```

### Run

```sh
$ docker volume create pgdata
$ docker run -d -p 5432:5432 --name pgsql -it --rm -v pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=new1234! postgres:alpine
```

### Access

```sh
$ docker exec -it pgsql /bin/bash
...
psql -U postgres
create user comncore;
alter user comncore with password 'new1234!';

CREATE DATABASE "comncore"
  WITH OWNER "comncore"
  ENCODING 'UTF8'
  LC_COLLATE = 'C'
  LC_CTYPE = 'C'
  TEMPLATE template0;

GRANT ALL PRIVILEGES ON DATABASE comncore TO comncore;

\q
```

### pg_hba.conf

```
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file.  A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access.  Records take one of these forms:
#
# local      DATABASE  USER  METHOD  [OPTIONS]
# host       DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
# hostssl    DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
# hostnossl  DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
# plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", "replication", a
# database name, or a comma-separated list thereof. The "all"
# keyword does not match "replication". Access to replication
# must be enabled in a separate record (see example below).
#
# USER can be "all", a user name, a group name prefixed with "+", or a
# comma-separated list thereof.  In both the DATABASE and USER fields
# you can also write a file name prefixed with "@" to include names
# from a separate file.
#
# ADDRESS specifies the set of hosts the record matches.  It can be a
# host name, or it is made up of an IP address and a CIDR mask that is
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
# specifies the number of significant bits in the mask.  A host name
# that starts with a dot (.) matches a suffix of the actual host name.
# Alternatively, you can write an IP address and netmask in separate
# columns to specify the set of hosts.  Instead of a CIDR-address, you
# can write "samehost" to match any of the server's own IP addresses,
# or "samenet" to match any address in any subnet that the server is
# directly connected to.
#
# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
# "ident", "peer", "pam", "ldap", "radius" or "cert".  Note that
# "password" sends passwords in clear text; "md5" is preferred since
# it sends encrypted passwords.
#
# OPTIONS are a set of options for the authentication in the format
# NAME=VALUE.  The available options depend on the different
# authentication methods -- refer to the "Client Authentication"
# section in the documentation for a list of which options are
# available for which authentication methods.
#
# Database and user names containing spaces, commas, quotes and other
# special characters must be quoted.  Quoting one of the keywords
# "all", "sameuser", "samerole" or "replication" makes the name lose
# its special character, and just match a database or username with
# that name.
#
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal.  If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect.  You can
# use "pg_ctl reload" to do that.

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records.  In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.

# CAUTION: Configuring the system for local "trust" authentication
# allows any local user to connect as any PostgreSQL user, including
# the database superuser.  If you do not trust all your local users,
# use another authentication method.

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             <IP_ADDRESS>/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                trust
#host    replication     postgres        <IP_ADDRESS>/32            trust
#host    replication     postgres        ::1/128                 trust

host all all all md5
```

### Edit conf

```sh
$ docker cp pg_hba.conf pgsql:/var/lib/postgresql/data/pg_hba.conf
```


text:
# parcel-plugin-nim
Nim asset for Parcel

## Installation
`npm i --save-dev parcel-plugin-nim`

## Usage
This plugin allows [Parcel](https://parceljs.org/) to bundle [Nim](https://nim-lang.org/) programs as a web asset. To use, simply install the plugin (Parcel auto loads plugins listed in `package.json`). When Parcel detects a Nim file in the dependencies of an asset, Parcel will run the Nim compiler (which must be installed on your computer and accessible from the path). The Nim compiler will compile the file into JavaScript, which the plugin will provide back to Parcel. Parcel will then do any relevant JavaScript transformations and bundling.

Example:

`index.html`:
```html
<html>
  <body>
    <div id="root">Hello world</div>
    <script src="main.nim"></script>
  </body>
</html>
```

`main.nim`:
```nim
echo "Hello from Nim"
```

Then run `parcel index.html` or `./node_modules/.bin/parcel index.html`

## Tips
1. This plugin makes it easy for a JavaScript file to import functions from Nim, as well as allowing a Nim file to import functions from JavaScript. I also wrote [jsExport.nim](https://github.com/nepeckman/jsExport.nim), a macro which makes it easier to export functions from Nim to JavaScript.
2. It is recommended to only have one Nim entry point. Nim already bundles all generated JavaScript into a single file, so multiple Nim entry points could include multiple copies of Nim standard library functions.
3. If you run Parcel in watch mode (`parcel watch ...`), it will watch your web assets and auto refresh your browser when a change occurs. If you are running Nim off the devel branch (or using the nightly Nim compiler), Parcel will be able to watch all Nim files that your entry point depends on (as well as the entry point itself). If you are not using nightly Nim, only changes to the entry point will trigger a refresh.
4. When you run Parcel in production mode (`parcel build ...`), this plugin will add the `-d:release` flag to the nim compile command.

## Roadmap
This plugin is pretty simple, and doesn't need much functionality. There are some small improvements I'm considering, but I'm not sure what I will add. If there is functionality you need, feel free to raise an issue or submit a pull request.

repository: nepeckman/parcel-plugin-nim

gha_language: JavaScript

repo_name: nepeckman/parcel-plugin-nim


text:
---
layout: post
title: "SAP data extraction for external analysis"
excerpt: "What is SAP. Different modules like MM, PP, SD, FICO etc. SAP Connector. Pulling SAP data with .NET application"
date: 2018-04-04
tags: [tech, SAP]
categories: articles
comments: true
share: true
published: false
---

# Initial questions

1. Is it an existing system which we are trying to enhance, or it needs to be built from scratch?
2. If existing, how the data is being extracted now and any issue with current setup.
3. What is the scale of data? e.g. average data volume accumulated daily
4. Is data extraction required periodically, like a nightly-job? Or like a continuous stream of live data?
5. Any specific format for output data? Specific types, like XML/JSON etc?
6. What is the type of "Data pool" that was mentioned?
7. Any kind of archieving of data required?
8. The analytics system does it's own logging or additional logging required? If required, do we need 9. detailed logging or just basics?
9. What is the current server infrastructure being used (type of hardware, OS etc.)
10. What type of databases (if any) are being used within the set of applications (e.g. Oracle, SQL Server, MongoDB etc.)
11. If there are existing infrastructures for any application tech-stack(s) like Java, .NET, Node etc.

#### What is ERP

Enterprise Resource Planning...

#### What is SAP

* Initial understandings...
* System Application and Products
* SAP has it's own set of database/tables. The native data manipulation language is ABAP, a SAP specific language
* SAP table names are generally cryptic
* Apart from physical data tables, SAP also contains logocal tables like _pooled_ & _cluster_
* SAP Object types
  * **Transparent:** Main data, that can be fetched using SQL query
  * **Cluster:** Program & control data as dictionary, ABAP needed for fetching
  * **Pooled:** Program & control data from multiple pooled-table, ABAP needed for fetching

#### Some SAP modules

* MM - Material Management is one of the vital modules in SAP ERP software and MM application module supports the procurement and inventory functions occurring in day-to-day business operations.
* PP - Production Planning is the process of aligning demand with manufacturing capacity to create production and procurement schedules for finished products and component materials.
* SD - The SAP SD module is one of the primary ERP module developed by SAP. SAP service and distribution deals in better management of sales and customer distribution data and processes in organizations.
* FICO - The best configuration for internal as well as external accounting processes; represents FI (Financial Accounting) plus CO (Controlling). It is an important core module of ERP processes, wherein real time financial transactions are integrated with various parallel SAP modules for best results.

#### SAP data store

#### SAP Connector

* [Reference](https://docs.oracle.com/cd/E11882_01/owb.112/e10582/sap_integrate.htm#WBDOD90777)

#### Any APIs SAP expose?

#### References

* [PS: Introduction to SAP Integration for .NET Developers](https://app.pluralsight.com/library/courses/sap-integration-dotnet-developers/table-of-contents)
* [PS: SAP: Getting Started](https://app.pluralsight.com/library/courses/sap-getting-started/table-of-contents)
* [Oracle SAP Connector](https://docs.oracle.com/cd/E11882_01/owb.112/e10582/sap_integrate.htm)


text:
# DynamicImage Extensions

### What is this?

DynamicImage Extensions includes new layers and filters for [DynamicImage](https://github.com/roastedamoeba/dynamic-image).

### What's available?

DynamicImage Extensions includes the following layers and filters:

1. [ContentAwareResizeFilter](http://www.roastedamoeba.com/blog/archive/2010/12/03/content-aware-image-resizing-for-aspnet)
2. [PdfLayer](http://www.roastedamoeba.com/blog/archive/2010/11/04/creating-thumbnails-of-a-pdf-in-aspnet)
3. RenderedLayer
3. [WebsiteScreenshotLayer](http://www.roastedamoeba.com/blog/archive/2010/11/04/creating-website-thumbnail-images-in-aspnet)

### How do I use it?

The easiest way to get these extensions is to use [NuGet](http://www.nuget.org). Each layer / filter has its own NuGet package, with the relevant dependencies on DynamicImage in case you don't already have it referenced.

repository: CaptainCodeman/dynamic-image-extensions

repo_name: CaptainCodeman/dynamic-image-extensions


text:
# Policy-based FlexRay Scheduling
This is a scheduling approach for FlexRay. A virtual communication layer allows priority-based scheduling in the FlexRay static segment. See [Reference](#reference) for details.

## Requirements
- The integrated ILP approach requires [SAT4J](http://www.sat4j.org/).
- The FlexrayVerifier requires [Ptolemyplot](http://ptolemy.eecs.berkeley.edu/java/ptplot/) in version 5.7.1 for plotting
- The FlexrayVerifier furthermore requires the [Real-Time Calculus Toolbox](http://www.mpa.ethz.ch/Rtctoolbox/Overview)

## Issues
- Could use some tidying up

## Reference
Please refer to this project either via this repository or via the paper it was built for:

Philipp Mundhenk, Florian Sagstetter, Sebastian Steinhorst, Martin Lukasiewycz, Samarjit Chakraborty. "Policy-based Message Scheduling Using FlexRay". In: Proceedings of the 12th International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS 2014). India, pp. 19:1–19:10. DOI: 10.1145/2656075.2656094

### BibTeX:

@inproceedings{msslc:2014,

	doi = { 10.1145/2656075.2656094 },

	pages = { 19:1--19:10 },

	year = { 2014 },

	location = { India },

	booktitle = { Proceedings of the 12th International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS 2014) },

	author = { Philipp Mundhenk and Florian Sagstetter and Sebastian Steinhorst and Martin Lukasiewycz and Samarjit Chakraborty },

	title = { Policy-based Message Scheduling Using FlexRay },

}

##Support
This work has been created in TUM CREATE and was financially supported by the Singapore National Research Foundation under its Campus for Research Excellence and Technological Enterprise (CREATE) program.


text:
# FatToken
FatToken is the official governance token

# Quickstart

## Installation

```
npm install
```
## Configuration

Create a `.env` file with keys

```
MNEMONIC="..."
BSCSCAN_API_KEY="..."
```

## Compile

```
Truffle compile

```

## Deployment

### BINANCE SMART CHAIN

```
Truffle migrate --network bsc
Truffle migrate -- --network testnet
```

## Verify
The network parameter should correspond to a network defined in the Truffle config file, with the correct network id
```
truffle run verify FatToken --network bsc
```

repository: cryptopossum/FatToken

repo_name: cryptopossum/FatToken


text:
---
hrs_structure:
  division: '1'
  volume: '7'
  title: '20'
  chapter: '346'
  section: 346-152.5
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0346-0152_0005
    parent: HRS0346
    name: 346-152.5 Requirements for persons exempt pursuant to
weight: 8655
title: Requirements for persons exempt pursuant to
full_title: 346-152.5 Requirements for persons exempt pursuant to
---
**§346-152.5** **Requirements for persons exempt pursuant to section 346-152.** (a) To be eligible to provide child care for a child whose family receives a child care subsidy from the department, persons exempt pursuant to section 346-152 shall be required to agree to:

(1) A criminal history record check, a sex offender registry check, a child abuse record check, and an adult abuse perpetrator check in the same manner as a prospective applicant or licensed provider in accordance with section 346-154; provided that the criminal history record check shall be limited to a criminal history record check conducted through files maintained by the Hawaii criminal justice data center for the following relatives of the child who requires care: grandparents, great-grandparents, aunts, uncles, and siblings aged eighteen or older living in a separate residence;

(2) Completion of a pre-service or orientation training and ongoing training in health and safety topics; and

(3) Any monitoring inspection visits by the department or its designee to determine compliance with minimum health and safety standards at the location where child care is being provided for a child whose family receives a child care subsidy from the department, including investigations by the department when the department has received a report of health and safety concerns.

(b) For the purposes of this section, "adult abuse perpetrator check" means a search to determine whether an individual is known to the department as a perpetrator of abuse as defined in section 346-222, by means of a search of the individual's name and birth date in the department's adult protective services file. [L 2001, c 201, §1; am L 2012, c 41, §1; am L 2016, c 88, §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
## Animal farm novel by George Orwell
This dataset has 1000 parallel sentences in Luganda and English that have been extracted from the Animal farm novel by George Orwell.
The Luganda version of Animal Farm was obtained from the Department of African Languages at Makerere University while the English version
was downloaded from Project Gutenberg (http://gutenberg.net.au/ebooks01/0100011h.html).
Note that a single English sentence can have a Luganda translation with 2-4 sentences.

path: /Animal farm novel/README.md


text:
# Client Install
To get this working we need to do following steps.
Make sure you run in **Administrator Mode** when you start PowerShell.
You must download the IBM Spectrum Protect Backup-Archive Client version <IP_ADDRESS> or newer and extract the data.
The **.\TSMClient** directory most be in the same directory where you have the **ispinstall.ps1** script.

It is recommended that you modify the *ba_dsm.opt* file to fit your environment, and this is a early version of the script many function do you probably need to disable in the code to be able to get it working.

If you want to change the default values please open the install.ps1 file and go to line 13-15 and modify the default values.

# Install Backup-Archive Client
Only the basic are working at the moment. Please test the script and see if it is good enough for you.

# Install SQL Client
Not working yet

# Install Exchange Client
Not working yet

# Requests
If you find any bugs or want me to priorities any functionality please great a GitHub ticket.

# Wanna help?
If you want to help, please create a fork and commit when you are done.

# OEM or Resale?
You are allowed to include this part of your solution, but remember it's goes under the MIT license.
That mean basically you are not allowed to invoice your customer for this script.

# MIT License

Copyright (c) [2017] [Cristie Nordic AB]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


text:
# foreach-end
[![license](https://img.shields.io/github/license/paul-roman/foreach-end.svg?style=flat-square)](https://github.com/paul-roman/foreach-end/blob/master/LICENSE.md)
[![npm](https://img.shields.io/npm/dt/foreach-end.svg?style=flat-square)](https://www.npmjs.com/package/foreach-end)

This library allows you to iterate over arrays with a final operation that can be executed when all the others are completed.

### Changelog
#### 1.1.0 (05/04/2018)

- The function can now be used with promises

The `forEachEnd` method on `Array` object can be used in the same way as a standard `forEach` but with small API changes:
- A `done` function is provided inside the callback that need to be called when your individual task is performed
- A second callback is required by the method that will be executed at the end of the loop

```javascript
// CommonJS
require('foreach-end');
// ES6
import 'foreach-end';

[1, 2, 3, 4].forEachEnd((value, done) => {
	console.log(`${value} evaluated`);
	done();
}, () => {
	console.log('ended!');
});

/*
Output:
1 evaluated
2 evaluated
3 evaluated
4 evaluated
ended!
*/
```

You can still use `index` and `array` provided by standard API. Also the function is compatible with `Promises`!
```javascript
['a', 'b', 'c', 'd'].forEachEnd((value, done, index, array) => {
	console.log(`${index + 1} / ${array.length} => ${value} starting`);
	setTimeout(() => {
		console.log(`${value} evaluated`);
		done();
	}, 1000);
}).then(() => {
	console.log('ended!');
});

/*
Output:
1 / 4 => a starting
2 / 4 => b starting
3 / 4 => c starting
4 / 4 => d starting
a evaluated
b evaluated
c evaluated
d evaluated
ended!
*/
```

The library also comes with a Typescript definition extension for the `Array` interface, so if you're using TypeScript everything is fine!

repository: paul-roman/foreach-end

repo_name: paul-roman/foreach-end


text:
## Consequence

Consequence is a (if not *the*) core subject matter of logic. Aristotle's study of the syllogism instigated the task of categorising arguments into the logically good and the logically bad; the task remains an essential element of the study of logic. In a logically good argument, the conclusion follows validly from the premises; thus, the study of consequence and the study of validity are the same.

A History of The Consequence Relations
https://www.sciencedirect.com/science/article/pii/B9780444529374500010

1. Introduction
  1.1. Necessity and Counterexamples
  1.2. Formality and Structure
  1.3. A Priori and Giving Reasons
2. Aristotle [384 BCE-322 BCE]
3. Stoics [300 BCE–200 CE]
4. Medievals [476 CE–1453 CE]
  4.1. Conseguentiae Buridan and Pseudo-Scotus
  4.2. Self-Reference and Insolubilia
  4.3. Obligationes
5. Leibniz [1646–1716]
6. Kant [1724–1804]
7. Bolzano [1781–1848]
8. Boole [1815–1864]
9. Frege [1848–1925]
10. Russell [1872–1970]
11. Carnap [1891–1970]
12. Gentzen [1909–1945]
13. Tarski [1902–1983]
14. Gödel [1906–1978]
15. Modal Logics
16. Non-monotonic Options
17. The Substructural Landscape
18. Monism or Pluralism


text:
# BotVentic

Twitch-focused Discord bot

## Development status

Maintenance only. I will fix it if it breaks, but no updates beyond that. Pull requests for new features are still welcome.

## Features

- All Twitch emotes, global BTTV/FFZ emotes.
- Automatic conversions such as celsius to fahrenheit and vice-versa
- Twitch stream/channel information

## Getting Started

Either message the bot with "invite [Discord invite here]" or follow the instructions below to use your own account. To message the bot, you can [join the BotVentic Discord server](https://discord.gg/0gY7rLJr9tHxogD9).

- Clone & open solution in Visual Studio 2015
- Build the project
- Copy config.sample.json to the folder with the exe
- Edit config.json to include your bot account information

Requires [TwitchbotCommons.dll](https://i.3v.fi/TwitchbotCommons.dll) from ohbot at the moment.

repository: kyroskoh/BotVentic

repo_name: kyroskoh/BotVentic


text:
# challenges to productionizing

1. lack of value focus
2. lack of reproducibility
3. lack of domain data
4. overemphasis on test scores
5. difficulty of adoption
6. timelines

# Michelangelo from Uber

1. Manage data : generate feature and label data sets for training (and re-training) and feature-only data sets for predicting.
2. Train models
3. Evaluate models : store model config with (author, type, hyperparam, training & test data set, feature DSL, ROC, PR curve, learned param).
4. Deploy models : offline, online, library
5. Make predictions
6. Monitor predictions

* Shared Feature Store
* DSL to select, transform and combine features
* Automate Hyperparameter search
* Automation for Regular model retraining

[5]

# Hidden tech debt

## Complex models erode boundaries

1. Entanglement

ML systems mix signals together.

CACE principle: Changing Anything Changes Everything. CACE applies not only to input signals, but also to hyper-parameters, learning settings, sampling methods, convergence thresholds, data selection.

Mitigation : focus on detecting changes in prediction behavior as they occur.

2. Correction Cascade

Sometimes we create new Model B which is "Model A + small correction"

More expensive to analyze improvements to Model A

3. Undeclared Consumers

Model output being consumed without registration.  Can create hidden feedback loops

## Data dependencies cost more than code dependencies

1. Unstable data dependencies

2. Underutilized data dependencies

Legacy features, Bundled features, correlated features, epsilon features

Underutilized dependencies can be detected via exhaustive leave-one-feature-out evaluations. These should be run regularly to identify and remove unnecessary features.

3. Static analysis of data dependencies

Need automated feature management system as described in [McMahan, Ad Click prediction trenches], which enables data sources and features to be annotated.

## Feedback loops

1. Direct feedback loops

A model may directly influence the selection of its own future training data.

2. Hidden feedback loops

```
One example of this may be if two systems independently determine facets of a web page, such as one selecting products to show and another selecting related reviews. Improving one system may lead to changes in behavior in the other, as users begin click ing more or less on the other components in reaction to the changes.
```

## AntiPatterns

1. Glue code added for integrating generic packages.  Mitigation : Wrap black box packages into common API.
2. Pipeline jungles created for Data collection and feature extraction.
3. Dead experimental codepaths
4. Abstraction debt
5. Common smells : plain old data type, multiple language, prototype smell.

## Configuration Debt

* It should be easy to specify a configuration as a small change from a previous configuration.
* It should be hard to make manual errors, omissions, or oversights.
* It should be easy to see, visually, the difference in configuration between two models.
* It should be easy to automatically assert and verify basic facts about the configuration: number of features used, transitive closure of data dependencies, etc.
* It should be possible to detect unused or redundant settings.
* Configurations should undergo a full code review and be checked into a repository.

## Changes in external world

1. avoid use of fixed thresholds in ML system
2. monitoring : monitor prediction bias, enforce action limits, monitor upstream data.

## Areas of debt

1. Data testing debt
2. Reproduciblity debt
3. Process mgmt debt
4. Cultural debt

Ref [6]

# whats your ml test score

TODO

Monitor input data
Monitor output prediction

# Reference

1. Kreutzer. Can Neural machine translation be improved with user feedback. https://arxiv.org/abs/1804.05958
2. Breck. What’s your ML test score? A rubric for ML production systems.  https://ai.google/research/pubs/pub45742
3. Daniel Dahlmeier.  On the Challenges of Translating NLP Research into Commercial products. ACL 2017. http://www.aclweb.org/anthology/P17-2015
4. https://nishkalavallabhi.github.io/NLPProductionThoughts/
5. Michelangelo from Uber https://eng.uber.com/michelangelo/
6. Sculley. Hidden Technical Debt in Machine Learning Systems NIPS
7. https://www.reddit.com/r/MachineLearning/comments/c83emm/d_other_cautionary_papers_on_taking_ml_to/

repository: sanjosh/csdocs

repo_name: sanjosh/csdocs


text:
# Magnetron
Magnetron is a green energy survey chat bot created by Team Cynergy of [MediaLAB/DSS Amsterdam](https://digitalsocietyschool.org/).

For more information on the project, check out https://greenamsterdam.nl.
Specific information about Magnetron can be found at https://greenamsterdam.nl/blog/2018/04/13/magnetron/

Try it out at https://greenamsterdam.nl/survey

# Setup

## Requirements
* PHP (version 7.2 recommended)
* Apache (probably also works under nginx)
* MySQL (probably also works udner MariaDB)
* Tested on Ubuntu 18.04

## Install steps
1. Place the survey folder in the root directory of your website.
2. Run the Create_Table.sql file on a MySQL database.
3. Configure the db.inc.php accordingly with your database information.
4. Try it out!

# Credits
* Conversational Forms v0.9.83 - https://github.com/space10-community/conversational-form
* JS Cookie - https://github.com/js-cookie/js-cookie
* Bootstrap 4 for landing page - https://getbootstrap.com/
* The Noun Project for Robot icon - https://thenounproject.com/


text:
[![Ansible testing](https://github.com/stefanhorning/ansible-role-ubuntu-hetzner-cloud/workflows/Ansible%20testing/badge.svg)](https://github.com/stefanhorning/ansible-role-ubuntu-hetzner-cloud/actions?query=workflow%3A%22Ansible+testing%22)

# Hetzner Cloud Ubuntu baseline role

Ansible role for bootstrapping a Hetzner Ubuntu cloud image with useful tooling for that Cloud offering

[Hetzner](https://www.hetzner.de/cloud) provides super cheap cloud server instances. However the offering
is much more basic then other cloud providers suche as AWS, Digital Ocean etc.

The limitations are twofold:
1. Their provided Ubuntu images are quite basic, just havin a root user, which is used for SSH signin (no other users, more secure SSH config)
2. No Firewall product that let's you easily manage instance access through the Cloud offering itself (such as AWS seucrity groups or DO firewalls)

To leviate both of this shortcomings (and also install other essential tooling) this role exits.
It will do the following:

1. Setup a normal linux system user which then can be used for connecting (sudo enabled)
2. Disable root login and PW login for SSH
3. Installs UFW firewall and locks down all ports by default, only leaving SSH port open

Additionally this role provides those features:
1. Move SSH port is moved to a non default port
2. Upgrade all apt packages
3.

For providing parameters see below.

## Requirements

Ubuntu server bootet from Hetzner image. Probably anything newer then 18.04 is fine

## Role Variables

Overwritable role default variables:

- `hetzner_cloud_custom_user: ubuntu` - linux system user to setup (to not use root for everything, like ssh)
- `hetzner_cloud_update_apt: true` - run a full update upgrade, useful after brining up fresh instance
- `hetzner_cloud_ssh_port: 2222` - put SSH onto different port (prevent scanning), this is respected in Firewall settings
- `hetzner_cloud_open_ports: [{ name: http, port: 80 }]` - List of extra port to open (SSH will always be allowed, so you don't lock youself out)

For more see `defaults/main.yml` file.

## Dependencies

This role depends on no other roles.

## Example Playbook

Use role like this in your playbook, after installing this role:

```yaml
- name: Install server stuff
  gather_facts: false # important if your inventory settings already use final ssh user (hetzner_cloud_custom_user)
  hosts: cloud-servers
  vars:
    # vars for stefanhorning.ubuntu_hetzner_cloud role:
    hetzner_cloud_custom_user: ubuntu
    hetzner_cloud_update_apt: true
    hetzner_cloud_ssh_port: 2222
    hetzner_cloud_open_ports:
      - { name: http, port: 80 }
      - { name: https, port: 443 }
  roles:
    - stefanhorning.ubuntu_hetzner_cloud
  tasks:

    - name: Do other stuff
      ping:
```

## License

BSD

## Author Information
Stefan Horning


text:
# Headroom

Headroom enables you to set classes on certain elements based on the scroll position. Note that due to the auto-sizing iframe behavior it's only working in the external view.

In order to set classes on other dom elements use the `customClasses` property. An example usage is demonstrated in this demo.

repository: Goldinteractive/gold-features

repo_name: Goldinteractive/gold-features


text:
# Changelog

## 0.4.0 (2016-09-26)

*   Feature / BC break: The Client implement DuplexStreamInterface and behaves like a normal stream
    (#21, #22 by @clue)

    ```php
    // old (custom "message" event)
    $client->on('message', $callback);

    // new (default "data" event)
    $client->on('data', $callback);

    // old (applies to app send*() methods
    $client->sendClientInit(…);

    // new (now uses write*() prefix)
    $client->writeClientInit(…);

    // shared interfaces allow for interoperability with other components
    $client->pipe($logger);

    // allows advanced / custom messages through writable interface
    $client->write(array(…));

    // supports and reports back pressure to avoid buffer overflows
    $more = $client->write*(…);
    $client->pause();
    $client->resume();
    ```

*   Feature: Use default time zone and support sub-second accuracy for heartbeats
    (#20 by @clue)

## 0.3.1 (2016-09-24)

*   Feature: Support SocketClient v0.5 (while keeping BC)
    (#18 by @clue)

*   Maintenance: First class support for PHP 5.3 through PHP 7 and HHVM
    (#19 by @clue)

## 0.3.0 (2015-08-20)

*   Feature: Support newer "datastream" protocol
    ([#13](https://github.com/clue/php-quassel-react/pull/13), [#15](https://github.com/clue/php-quassel-react/pull/15))

*   Feature: Explicitly pass "legacy" protocol scheme to avoid probing protocol
    ([#16](https://github.com/clue/php-quassel-react/pull/16))

*   Improved documentation, more SOLID code base and updated dependencies.
    ([#11](https://github.com/clue/php-quassel-react/pull/11), [#14](https://github.com/clue/php-quassel-react/pull/14))

## 0.2.1 (2015-05-14)

*   Update clue/qdatastream to v0.5.0
    ([#12](https://github.com/clue/php-quassel-react/pull/12))

## 0.2.0 (2015-05-12)

*   Feature: Support sending buffer input, accessing its backlog and (dis)connecting networks
    ([#9](https://github.com/clue/php-quassel-react/pull/9))

*   Feature: Support sending heart beat requests and fix invalid heart beat timezone
    ([#10](https://github.com/clue/php-quassel-react/pull/10))

## 0.1.0 (2015-05-03)

*   First tagged release


text:
# Upgrade

## From 2.0.0

A new column has been added to the table `ecchronos.on_demand_repair_status`, this must be added before upgrading.

The command to add the column is shown below:
```
ALTER TABLE ecchronos.on_demand_repair_status ADD completed_time timestamp;
```

Note: Make sure that you create the column with the cql_type timestamp since its not possible to change cql_type on an existing column.

## From versions before 2.0.0

A new table has been introduced and must be present before upgrading.

The required table is shown below:
```
CREATE TABLE IF NOT EXISTS ecchronos.on_demand_repair_status (
    host_id uuid,
    job_id uuid,
    table_reference frozen<table_reference>,
    token_map_hash int,
    repaired_tokens frozen<set<frozen<token_range>>>,
    status text,
    completed_time timestamp,
    PRIMARY KEY(host_id, job_id))
    WITH default_time_to_live = 2592000
    AND gc_grace_seconds = 0;
```

An optional configuration parameter for remote routing has been introduced, the default value is true.

This can be configured in `conf/ecc.yml`:
```
cql:
  remoteRouting: false
```

repository: emolsson/ecchronos

repo_name: emolsson/ecchronos