text:
# Text Mining

[![Build Status](https://travis-ci.com/Allegheny-Mozilla-Fellows/textMining.svg?branch=master)](https://travis-ci.com/Allegheny-Mozilla-Fellows/textMining)
[![codecov](https://codecov.io/gh/Allegheny-Mozilla-Fellows/textMining/branch/master/graph/badge.svg)](https://codecov.io/gh/Allegheny-Mozilla-Fellows/textMining)
[![Built with spaCy](https://img.shields.io/badge/built%20with-spaCy-09a3d5.svg)](https://spacy.io)
[![Built with Streamlit](https://img.shields.io/badge/built%20with-Streamlit-09a3d5.svg)](https://www.streamlit.io/)

An automated text-mining tool written in Python to measure the technical
responsibility of students in computer science courses, being used to analyze
students' reflection documents and five questions survey based on Natural language
processing in the Department of Computer Science at Allegheny College.

## Installation

You can clone the repository by running the following command:

```bash
git clone git@github.com:Allegheny-Mozilla-Fellows/textMining.git
```

`cd` into the project root folder

```bash
cd textMining
```

This program uses [Pipenv](https://github.com/pypa/pipenv) for dependency management.

- If needed, install and upgrade the `pipenv` with `pip`:

  ```bash
  pip install pipenv --user
  ```

- To create virtual environment and use the program:

  ```bash
  pipenv install
  ```

textMining relies on `en_core_web_sm` and `en_core_web_md`, English models trained on
written web text (blogs, news, comments), that includes vocabulary, vectors,
syntax and entities.

To install the pre-trained model, you can run this following command:

```bash
pipenv run python -m spacy download en_core_web_sm
pipenv run python -m spacy download en_core_web_md
```

## Web Interface

textMining is mainly developed on its web interface with [Streamlit](https://www.streamlit.io)
in order to provide fast text analysis and visualizations.

Local URL: http://localhost:8501
Network URL: http://xxx.xxx.x.x:8501
```

the web app will be opened in your browser like this:

![browser](resources/images/landing_page.png)

### Data Retreiving

There are currently two ways to import text data for analysis: through local
file system or AWS DynamoDB.

#### Local File System

You can type in the path(s) to the directorie(s) that hold reflection markdown
documents. You are welcome to try the tool with the sample documents we
provided in `resources`.

#### AWS

Retreiving reflection documents from AWS is a feature intergrated with the use
of [GatorGrader](https://github.com/GatorEducator/gatorgrader) where student's
reflection markdown documents are being collected and stored inside the a
pre-configured DynamoDB database. In order to use this feature, you will need
to have some credential tokens stored as environment variables:

```bash
export GATOR_ENDPOINT=<Your Endpoint>
export GATOR_API_KEY=<Your API Key>
export AWS_ACCESS_KEY_ID=<Your Access Key ID>
export AWS_SECRET_ACCESS_KEY=<Your Secret Access Key>
```

It is likely that you already have these ready when using textMining in
conjunction with GatorGrader, since these would already be exported when
setting up the AWS services. You can view more about setting up an AWS services
with GatorGrader [here](https://github.com/enpuyou/script-api-lambda-dynamodb)

Once the documents are successfully imported, you can then navigate through
the select box in the sidebar to view the analysis:

![select box](resources/images/select_box.png)

##### Reflection Documents

We are using markdown for the student reflection documents, due to the fact that
its organized structure allows us to parse and perform analysis easily. With that
said, there are few requirements for the reflection document before it could be
seamlessly processed and analyzed with our tool. A
[template](resources/reflection_template.md) is provided here. Note that the
headers with the assignment's and student's ID/name are required. TextMining is
set default to take the first header as assignment and the second header as student.

You can also check out the
[sample json report](resources/sample_json_report/report%201.json) to see the
format of json reports textMining gathers from AWS.

### Analysis

![frequency](resources/images/frequency.png)
![sentiment](resources/images/sentiment.png)
![similarity](resources/images/similarity.png)
![topic](resources/images/topic.png)

## Contribute

In order to contribute code or documentation to the project, we encourage you to
install the development dependencies with `pipenv` as follows:

```bash
pipenv install --dev --skip-lock
```

If you want to add a new feature, please ensure that it is
accompanied by high coverage test cases and that you do not break any of the
existing test cases or features.

You can follow these steps to make a branch and add a new feature if you are
already a collaborator on the project. First, you should type the following
command, substituting the name of your feature for the word `feature-name`.

```bash
git checkout -b feature-name
git checkout master
git push -u origin feature-name
```

You can also create a fork of the repository and make contributions on your own
fork. You might want to configure an upstream remote repository for your fork of
textMining, so that you can sync changes from the main project back
into your fork. textMining is configured to use `TravisCI` to test and create
builds for every commit and pull requests. You may want to set up `TravisCI` on
your own fork to enable continuous integration for your development process.

You should open a pull request on the GitHub repository for the new branch or
the fork that you have created once you are ready to merge them into the
master branch of the main project. This pull request should describe the changes
that it will make to the project.

We expect your Pull Respect is passing the build. We hope your code is tested
and well documented. You can run the test suites locally as follows:

```bash
pipenv run pytest
```

It might also be helpful for you to run this following command to see the test
coverage and lines that are missing test:

```bash
pipenv run pytest --cov-config pytest.cov --cov --cov-report term-missing
```

Besides, you are also welcome to report issues, including both feature
requests and bug reports. Feedback is greatly appreciated.

repository: enpuyou/textMining

repo_name: enpuyou/textMining


text:
## HCZ Material theme for Discord4J

This Jekyll theme is used for the official Discord4J website. It has been adapted from: https://github.com/codeasashu/hcz-jekyll-blog

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: CSS

license_type: permissive


text:
Contributing Guidelines:

1.Fork and Clone the repository and add AirCanvas/MyCanvas as remote upstream.

2.Create new branch for features.

3.Strictly follow the commit conventions mentioned here: http://karma-runner.github.io/latest/dev/git-commit-msg.html

4.Pull latest changes from upstream before pushing your code or creating a new feature branch.

5.Send a PR to  AirCanvas/MyCanvas for review and merging

NOTE: Never push directly to main repository (upstream). Only push to your forked repo (origin) and send a pull request to the main repository

branch_name: refs/heads/main

gha_license_id: MIT


text:
# Minimal CI/CD system

![logos2](https://i.imgur.com/gaWOGpY.jpg)

### traefik

https://github.com/containous/traefik

Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. Traefik integrates with your existing infrastructure components (Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, ...) and configures itself automatically and dynamically. Pointing Traefik at your orchestrator should be the only configuration step you need.

### gitea

https://github.com/go-gitea/gitea

Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.

### drone

https://github.com/drone/drone

Drone is a Continuous Delivery system built on container technology. Drone uses a simple YAML configuration file, a superset of docker-compose, to define and execute Pipelines inside Docker containers.

### registry-ui

https://github.com/Joxit/docker-registry-ui

This project aims to provide a simple and complete user interface for your private docker registry. You have the choice between two versions, the standard interface and the static interface.

In the standard interface, there is no default registry, you need to add your own within the UI. You can manage more than one registry server. All registries will be stored in the local storage of your browser. No configuration is needed when you launch the UI.

## Getting Started


text:
![enter image description here](https://cdn.pixabay.com/photo/2015/04/19/08/32/marguerite-729510__340.jpg)
# Who Am I?
My Name is : **Romaysaa Hossam Hassan**

## Test Title
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s

## Test Title 2

```
num = 407
# prime numbers are greater than 1
if num > 1:
    for i in range(2,num):
       if (num % i) == 0:
           print(num,"is not a prime number")
           print(i,"times",num//i,"is",num)
           break
   else:
       print(num,"is a prime number")

        print(num,"is not a prime number")
```
## license
[MIT](https://opensource.org/licenses/MIT)


text:
# StructuredData.Transform
Extensible Library for transforming structured Data

Available as a package on [Nuget](https://www.nuget.org/packages/StructuredData.Transform/)

##Usage
  StructuredData.Transform provides data agnostic functions which can be extended, using MEF, to tranform any structured data.

* Install one (or more) of the implementation packages (e.g. StructuredData.Transform.JsonPatch)
* Call one of the extension methods on StructuredDataTransform

[e.g. "SourceFilePath.json".TransformFile("ResultFilePath.jsonpatch") or "SourceFilePath.json".TransformFile("ResultFilePath.json", "jsonPatch")]

This library uses [Media Type Map](https://www.nuget.org/packages/MediaTypeMap/) to obtain the mimetype from the extension of the source file and, when the transform method is not explictly provided uses the extension of the result file.

Available implementations are imported via MEF and the correct implementation selected at runtime using file extensions or the supplied parameters.

##Extending

Developers can write their own transforms by implementing and exporting ITransformStructuredData

 [Export(typeof(ITransformStructuredData))]
 [ExportMetadata("MimeType", "text/xml")]
 [ExportMetadata("Method", "xdt")]


text:
[![CircleCI](https://circleci.com/gh/inwc3/JMPQ3.svg?style=svg)](https://circleci.com/gh/inwc3/JMPQ3) [![Jit](https://jitpack.io/v/inwc3/JMPQ3.svg)](https://jitpack.io/#inwc3/JMPQ3) [![Coverage Status](https://coveralls.io/repos/github/inwc3/JMPQ3/badge.svg?branch=master)](https://coveralls.io/github/inwc3/JMPQ3?branch=master) [![codebeat badge](https://codebeat.co/badges/5ccfd060-8d57-4a51-9c6b-2688482f857e)](https://codebeat.co/projects/github-com-inwc3-jmpq3-master)
# JMPQ3
**Note: Since Version `1.9.0` jmpq3 requires Java 11 or higher**

## What?
JMPQ3 is a small java library for accessing and modifying mpq (MoPaQ) archives. Common file endings are .mpq, .w3m, .w3x.

MoPaQ is Blizzard's old, proprietary archive format for storing gamedata (replaced with CASC).

You can find more info and an excellent graphical editor here http://www.zezula.net/en/mpq/main.html

## Get it
*currently only warcraft 3 maps and mpqs are confirmed supported. Mpqs from other games (WoW, starcraft) might cause problems.*

It is recommended to use jitpack with a dependency manager like gradle.

See https://jitpack.io/#inwc3/JMPQ3/

Gradle Example:
```gradle
dependencies {
    compile 'com.github.inwc3:JMPQ3:1.7.14'
}
allprojects {
    repositories {
	maven { url 'https://jitpack.io' }
    }
}
```
You can still download the jar directly if you prefer
https://github.com/inwc3/JMPQ3/releases

## How to use
Quick API Overview:

Jmpq provides the OpenOptions `READ_ONLY` which should be selfexplanatory and `FORCE_V0` which forces the mpq to be opened like warcraft3 would open it, ignoring optional data from later specifications for compatability.
```java
// Automatically rebuilds mpq after use if not in readonly mode
try (JMpqEditor e = new JMpqEditor(new File("my.mpq"), MPQOpenOption.FORCE_V0)){
        e.hasFile("filename"); //Checks if the file exists
        e.extractFile("filename", new File("target location")); //Extracts a specific file out of the mpq to the target location
        if (e.isCanWrite()) {
            e.deleteFile("filename"); //Deletes a specific file out of the mpq
            e.insertFile("filename", new File("file to add"), true); //Inserts a specific into the mpq from the target location
            e.extractAllFiles(new File("target folder")); //Extracts all files inside the mpq to the target folder. If a proper listfile exists,
            e.getFileNames(); //Get the listfile as java HashSet<String>
        }
    }

}
```

### Known issues:
* Unsupported decompression algorithms: sparse and bzip2
* Only supported compression is zlib/zopfli
* JMPQ doesn't build a valid (attributes) file for now. (which seems to be fine for warcraft3)

gha_language: Java


text:
---
layout: post
title: "CSS Background shorthand coming to mobile WebKit browsers"
description: ""
article:
  written_on: 2013-02-01
  updated_on: 2013-02-01
authors:
  - petele
tags:
  - mobile
  - nuts_and_bolts
  - graphics
  - css
  - announcements
permalink: /2013/02/CSS-Background-shorthand-coming-to-mobile-WebKit-browsers
---
Earlier this year, WebKit [updated the behavior](https://bugs.webkit.org/show_bug.cgi?id=27577) of the CSS `background` shorthand property.  With this change, the `background` shorthand property will reset the `background-size` to its default value of `auto auto` if it’s not set in the shorthand declaration.  This change brings Chrome and other WebKit browsers in compliance with the specification and matches the behavior of Firefox, Opera and Internet Explorer.

With Chrome for Android moving forward to current revisions on WebKit, this change is now rolling out in Android.  Because this was a fix to webkit, sites that tested in multiple browsers are likely not affected.

### Old way of doing things

{% highlight CSS %}
// background-size is reset to auto auto by the background shorthand
.foo {
  background-size: 50px 40px;
  background: url(foo.png) no-repeat;
}
{% endhighlight %}

The `background` shorthand property does not contain any size property and will therefore reset the `background-size` to its default value of `auto auto`.

### Correct way to specifying image size

{% highlight CSS %}
// background-size is specified after background
.fooA {
  background: url(foo.png) no-repeat;
  background-size: 50px 40px;
}

// background-size is specified inline after position
.fooB {
  background: url(foo.png) 0% / 50px 40px no-repeat;
}
{% endhighlight %}

In `fooB`, specifying a `background-size` in the `background` shorthand requires the `position` (0%) be specified first, followed by a forward slash then the `background-size` (50px 40px). |

### Fixes for existing code

There are several options that will provide an easy fix for this:

* Use `background-image` instead of the `background` shorthand property.
* Set the `background-size` last, with a higher specificity than any other CSS rules that set `background` on that element, and don’t forget to check and `:hover` rules.
* Apply the `!important` property to `background-size`.
* Move the sizing information to the `background` shorthand property.

### Bonus: background image offsets

In addition to this change, there’s now greater flexibility in positioning the image within the background.  In the past, you could only specify the image position relative from the top left corner, now you can specify an offset from the edges of the container.  For example setting `background-position: right 5px bottom 5px;` the image will be positioned 5px from the right edge and 5px from the bottom.  Check out this [sample on JSBin](http://jsbin.com/ixogup/1/edit)

branch_name: refs/heads/development


text:
### [CVE-2020-16901](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-16901)
![](https://img.shields.io/static/v1?label=Product&message=Windows%2010%20Version%201909%20for%2032-bit%20Systems&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=Windows%2010%20Version%201909%20for%20ARM64-based%20Systems&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=Windows%2010%20Version%201909%20for%20x64-based%20Systems&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=Windows%20Server%2C%20version%201909%20(Server%20Core%20installation)&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Information%20Disclosure&color=brighgreen)

### Description

An information disclosure vulnerability exists when the Windows kernel improperly initializes objects in memory.To exploit this vulnerability, an authenticated attacker could run a specially crafted application, aka 'Windows Kernel Information Disclosure Vulnerability'. This CVE ID is unique from CVE-2020-16938.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/developer3000S/PoC-in-GitHub
- https://github.com/hectorgie/PoC-in-GitHub
- https://github.com/nomi-sec/PoC-in-GitHub
- https://github.com/soosmile/POC

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
---

layout: post

title:       "XStream - Object references"
description: "To deal with duplicate and circular references, XStream is using XPath to allow serialized objects to be treated as graphs instead of simple trees."

categories: [java]
tags:       [xstream]

---

[XStream] is a simple java library to serialize objects to XML and back again.

But how does [XStream] deals with duplicate and circular references?
By default is using XPath to allow serialized objects to be treated as graphs instead of simple trees (typical XML usage).

The objects:

```java
public class Contact {

  private String name;

  private List<Address> addresses;

  public Contact(String name, Address... addresses) {
    this.name = name;
    this.addresses = new ArrayList<Address>(Arrays.asList(addresses));
  }

  public Contact(String name, List<Address> addresses) {
    this.name = name;
    this.addresses = addresses;
  }

  // ... other constructors and methods
}
```

```java
public class Address {

  private String street;
  private String city;

  public Address(String street, String city) {
    this.street = street;
    this.city = city;
  }

  // ... other constructors and methods
}
```

The test code:

```java
public static void main(String[] args) {

  XStream xStream = new XStream(new DomDriver());

  xStream.alias("contact", Contact.class);
  xStream.alias("address", Address.class);

  Address address = new Address("My Street", "Bucharest");

  Contact contact = new Contact("Cristian Sulea", address, address);

  xStream.toXML(contact, System.out);
}
```

## XPath Relative

If we execute the test code, [XStream]'s uses its default mode called `XPATH_RELATIVE_REFERENCES` based on the W3C XPath specification:

```xml
<contact>
  <name>Cristian Sulea</name>
  <addresses>
    <address>
      <street>My Street</street>
      <city>Bucharest</city>
    </address>
    <address reference="../address" />
  </addresses>
</contact>
```

The explicit call is:

```java
xStream.setMode(XStream.XPATH_RELATIVE_REFERENCES);
```

## XPath Absolute

There is also an absolute mode which is easy to use and understand:

```java
xStream.setMode(XStream.XPATH_ABSOLUTE_REFERENCES);
```

In this case the resulting XML is:

```xml
<contact>
<name>Cristian Sulea</name>
  <addresses>
    <address>
      <street>My Street</street>
      <city>Bucharest</city>
    </address>
    <address reference="/contact/addresses/address"/>
  </addresses>
</contact>
```

## Single Node Selectors

In some cases where the XML is used later on or is generated by someone else, the XPath selectors can be forced	to select always a single node instead of a node list where the first element is taken.

Therefore two more modes exist:

```java
xStream.setMode(XStream.SINGLE_NODE_XPATH_ABSOLUTE_REFERENCES);
```

with resulting XML

```xml
<contact>
  <name>Cristian Sulea</name>
  <addresses>
    <address>
      <street>My Street</street>
      <city>Bucharest</city>
    </address>
    <address reference="/contact[1]/addresses[1]/address[1]" />
  </addresses>
</contact>
```

and

```java
xStream.setMode(XStream.SINGLE_NODE_XPATH_RELATIVE_REFERENCES);
```

with resulting XML

```xml
<contact>
  <name>Cristian Sulea</name>
  <addresses>
    <address>
      <street>My Street</street>
      <city>Bucharest</city>
    </address>
    <address reference="../address[1]" />
  </addresses>
</contact>
```

## Id Mode

XStream has another mode which makes it is easier to read/write by a human being:

```java
xStream.setMode(XStream.SINGLE_NODE_XPATH_RELATIVE_REFERENCES);
```

The result is a XML which generates an `id` attribute for each new object marshaled, and whenever it finds back or cross-references, it uses a `reference` attribute to so it doesn't copy the entire object:

```xml
<contact id="1">
  <name>Cristian Sulea</name>
  <addresses id="2">
    <address id="3">
      <street>My Street</street>
      <city>Bucharest</city>
    </address>
    <address reference="3" />
  </addresses>
</contact>
```

## NO References

For some uses of XStream we do not desire any kind of back or cross references like a graph, but a simple tree.
Remember that in such scenarios it's impossible to represent a graph cycle (no tree contains such structure).

```java
xStream.setMode(XStream.NO_REFERENCES);
```

In the resulting XML every reference shall be serialized:

```xml
<contact>
  <name>Cristian Sulea</name>
  <addresses>
    <address>
      <street>My Street</street>
      <city>Bucharest</city>
    </address>
    <address>
      <street>My Street</street>
      <city>Bucharest</city>
    </address>
  </addresses>
</contact>
```

[XStream]: http://xstream.codehaus.org

repository: cristian-sulea/cristian-sulea-net

repo_name: cristian-sulea/cristian-sulea-net


text:
# File naming convention #
The filename should be the same as the function name followed by `.m`. Use
lowercase with words separated by underscores: e.g. `adjacency_matrix.m`

## Exceptions ##
File I/O functions should be `readEXT` and `writeEXT` where `EXT is replaced
with the file extension. If the extension is ambiguous then it should be
`readEXT_program` and `writeEXT_program`, where `program` is replaced by the
short name of the program that generated that file.

# Function headers #
Each file contains a single exposed function and should contain a standard
header containing description of the function, the function prototype and
description of inputs/outputs. For example in `centroid.m`:

    function [C,vol] = centroid(V,F,varargin)
      % CENTROID Compute the centroid of a closed polyhedron bounded by (V,F)
      %
      % C = centroid(V,F)
      % [C,vol] = centroid(V,F,'ParameterName',ParameterValue, ...)
      %
      % Inputs:
      %   V  #V by 3 list of mesh vertex positions
      %   F  #F by 3 list of triangle mesh indices
      %   Optional:
      %     'Robust' followed by whether to use more robust but costlier method
      %       for nearly closed input. {false}
      % Outputs:
      %   C  3-vector of centroid location
      %   vol  total volume of polyhedron
      %
      ... % contents of function
    end

repository: alecjacobson/gptoolbox

gha_language: MATLAB

repo_name: alecjacobson/gptoolbox


text:
# Gimli.js

An implementation of [Gimli][gimli] in typescript with compilation to javascript in CommonJS.

## Currently implented functions

* Core Permutation
* Hash
* Cipher

## TODO

* PRNG

Based on the [zig][zig] implementation by [daurnimator][daurnimator].

[gimli]: https://gimli.cr.yp.to
[zig]: https://github.com/ziglang/zig
[daurnimator]: https://github.com/daurnimator

gha_language: TypeScript


text:
---
title: Templates Structure
page_title: Templates Structure
description: Templates Structure
slug: radtoolbar-template-parts
tags: required,parts
published: True
position: 1
---

# Templates Structure

Like most controls, the __RadToolBar__ also allows you to template it in order to change the control from the inside. Except for templating the whole control, you can template only parts of it. This topic will make you familiar with the structure of the RadToolBar's templates.

>tip For more information about templating and how to modify the default templates of the RadControls you can read the [Editing Control Templates]({%styling-apperance-editing-control-templates%}) on this matter.

## RadToolBar Template Structure

![RadToolBar Template Structure](images/RadToolBar_TemplateStructure.PNG)

* __RootElement__: Is of type __Grid__ and hosts the __RadToolBar's__ template.
	* __PART_DropdownButton__: The button responsible for open/close the __Overflow__ area.
	* __PopupGrid__: Is of type __Grid__ and host the dropdown __Popup__ element.
		* __PART_Overflow__: This element is of type __Popup__ and holds the __Overflow__ panel and is responsible for all the pop-up management.
			* __PART_OverflowPanel__: This element is of type __RadToolBarOverflowPanel__ and serves as a place holder for all items not fitted in __Strip__ panel.
	* __[Grid]__: This element holds the Grip element of the RadToolBar.
		* __[GripOrnamentH]__: This element is of type __Grid__ and represent the horizontal visualization of the grip area.
			* __[Path]__
			* __[Path]__
		* __[GripOrnamentV]__: This element is of type __Grid__ and represent the vertical visualization of the grip area.
			* __[Path]__
			* __[Path]__
	* __PART_StripPanel__: This element is of type __RadToolBarPanel__ and serves as a place holder for all visible items.

## RadToolBarTray Template Structure

![RadToolBarTray Template Structure](images/RadToolBarTray_TemplateStructure.PNG)

* __[Border]__: This element holds the ItemPresenter.
	* __PART_ItemsPresenter__: This element is of type __ItemPresenter__ which visualize every specified __RadToolBar__.

## See Also

* [Getting Started]({%slug radtoolbar-getting-started%})
* [ToolBarTray Overview]({%slug radtoolbartray-overview%})

gha_license_id: NOASSERTION


text:
# GroupProject-2Class15_3
Incremental Development project

## Communication Plan

## Group Rules

---

## Communication Schedule

| Day | How | The topic of discussion |
| --- | :-: | ----------------------- |
|     |     |                         |

## Communication Channels

how often will we get in touch on each channel, and what we will discuss there:

- **Slack Messaging**:
- **Slack Video Calls**:
- **Issues**:
- **Pull Requests**:

## Availability


text:
## Parking situation of airplanes at airport

Indicator provided by: [JAXA](https://global.jaxa.jp/) based on data provided by [JAXA](https://global.jaxa.jp/) and [ESA](https://esa.int)

During the urban lockdown or stay at home requests periods, human activities including movement are rapidly decreasing. This occasion might be affected to airlines operations i.e. many flights have been canceled.

### Change in the number of airplane at parking areas in airports

Using combined data from PALSAR-2 which is L-band SAR mounted on JAXA's ALOS-2 and C-band SAR mounted on European Sentinel-1, the temporal changes of the parking situation at airports have been captured that might be correlated with operation of airlines. In general, artificial targets such as buildings, cars, airplanes are brighter like a “point target” than natural targets such as bare lands, ocean, forest areas in SAR image.

Figure 1 shows a color composited image at Tokyo International Airport, Haneda by PALSAR-2 acquired on Nov. 28, 2019 assigned as red color, Mar. 19, 2020 as green, and May 14, 2020 as blue, respectively. For example, white colored areas such as buildings indicate no brightness changes during the period, individual red, green, or blue colored pixels in parking areas of the airport indicate airplanes at that time, cyan colored areas that show airplanes on March and May 2020 in Fig. 1.

![](data/trilateral/JP01-E8_Fig1.png)

*Figure 1 A multi-temporal, color-composite PALSAR-2 image at Tokyo International Airport, Haneda acquired on Nov. 2019 as red, Mar. 2020 as green, and May 2020 as blue*

Figure 2 is an animation of time series Sentinel-1 image at Tokyo International Airport, Haneda from January 10 to June 2, 2020. Brighter pixels in parking areas of the airport might be corresponding to airplanes at individual acquisition date.

![](data/trilateral/JP01-E13b_Animation.gif)

*Figure 2 Sentinel-1 animation at Tokyo International Airport, Haneda from January to June 2020*

repository: Dalbee/eodash

repo_name: Dalbee/eodash


text:
## rehype-join-line

[rehype](https://github.com/rehypejs/rehype) plugin to resolve line breaks in chinese paragraphs.

## What happened?

This is a legacy issue of HTML, you can see more discussion [here](https://stackoverflow.com/questions/8550112/prevent-browser-converting-n-between-lines-into-space-for-chinese-characters).
In short, English needs to add spaces when wrapping paragraphs, but the Chinese characters will be split:

```html
<p>
This is
an example
</p>

// In English, it will be rendered ->
<p>This is an example</p>
```

```html
<p>
这是
一个示例
</p>

// In Chinese, it will be rendered ->
<p>这是 一个示例</p>
```

As we can see, there is no need for **spaces** in Chinese paragraphs.

In Markdown or Markdown renderer, this problem also exists. This plug-in is to help `rehype` solve this problem.

## How to use?

### Install

Run `npm install rehype-join-line`.

### Usage

```js
const rehype = require('rehype');
const rehypeJoinLine = require('rehype-join-line');

rehype()
  .use(rehypeJoinLine)
  .process(/* some html */);
```

### Use in Next.js

```js
// in next.config.js
const withMDX = require('@next/mdx')({
  extension: /\.(md|mdx)?$/,
  options: {
    rehypePlugins: [require('rehype-join-line')],
  },
})

module.exports = withMDX({
  // next config
})
```

### How to work?

In Chinese: Please **wrap after Chinese punctuation**, all excess white space will be removed automatically.

In English: No impact.

E.g.

  ```
  // before
  你好，
  这个世界

  // it will be rendered ->
  <p>你好， 这个世界</p>

  // after
  你好，
  这个世界

  // it will be rendered ->
  <p>你好，这个世界</p>
  ```

### LICENSE

Licensed under the [MIT LICENSE.](./LICENSE)

repository: unix/rehype-join-line

gha_language: JavaScript

repo_name: unix/rehype-join-line


text:
---
layout: post
title:  "Community perceptions affecting uptake & retention on antiretroviral therapy by PLHIV: a qualitative study among residents of an urban informal settlement in Kenya"
date:   2019-11-28 05:16:28 +0300
author: ['Rose Patricia Oluoch ,','David Mutinda ,','Mohammed Karama ,', 'Joseph Oundo ,', 'Zipporah Nganga']
tags: ['HIV infection', 'retention in ART', 'adherence counseling ' , 'psychosocial and communication
barriers ', 'Responded satisfaction']
categories: ['Vol 32, No 1 (2019)']

---
# INTRODUCTION
Lack of HIV treatment and loss of follow up measures is associated with high mortality
among persons living with HIV (PLHIV) in sub-Saharan Africa. Especially in resource-limited
populations. Respondents diagnosed with HIV through a home-based testing and counseling
program in an informal settlement in Kenya, were referred to health facilities of their choice for
antiretroviral therapy (ART). This qualitative study explored the community’s experiences and
perceptions on factors associated with ART uptake and retention.
# METHODOLOGY
Using convenient purposive sampling, we recruited 46 adults (21 women and 25 men)
among them HIV infected and non-infected residents of the Kibera informal settlement in Nairobi,
Kenya. Using a standardized discussion guide, six focus group discussions of 6-9 individuals
were conducted. Discussions were recorded verbatim and complimented by tape recording to
ensure accuracy. Transcription was done and coding done using a Priori codes. Thematic content
analysis was done using Atlas 3.0. Availability of many health facilities offering HIV services in Kibera informal settlement
facilitated access to and uptake of ART. Respondents preparation procedures that prevented
same-day ART enrolment were often perceived as denial of treatment.
“They talk too much of treatment and when you go you are turned away” Said one
respondent. Reported perceived poor staff attitude, Rudeness, Judgmental behaviours and
Delays, were often perceived as lack of respect for Participants were reported to hinder retention
in ART services.
“He will look at your physical appearance, put your card aside and ask his colleague
whether tea is ready” Participants disliked adherence counseling with written commitments after
missed appointments and often felt that these measures too reflected lack of respect by health
care providers. They wanted to cancel treatment because they said we had to commit ourselves by
signing....”
# CONCLUSION
Individuals diagnosed with HIV generally accessed HIV treatment facilities following
referral after HBTC. Participants perceived some standard treatment procedures. Reckoning
Staff behavior and Communication as barriers hindering retention on ART. Supportive
interpersonal relationship strategies between Respondents, providers and innovative patient-
centered treatment plans and adherence counseling models should be adopted in treatment
programs. This will promote uptake and retention of ART in communities.

### [Click to VIEW PDF]({{site.url}}/assets/184955-470519-1-SM.pdf)

repository: NORMANBARASA/Journal

extension: markdown

repo_name: NORMANBARASA/Journal


text:
# PDC-ADC-in-OPNET
The PRI MAC protocol is implemented in OPNET 14.5. The work on PRI MAC has been published in

F. Tong, M. Ni, L. Shu, J. Pan, `A Pipelined-Forwarding, Routing-Integrated and Effectively-Identifying MAC for Large-Scale WSN`, IEEE Global Communications Conference (GLOBECOM), pp. 225–230, Dec. 2013. (http://dx.doi.org/10.1109/GLOCOM.2013.6831075)

The code has also been utilized for the modeling and analysis of linear sensor networks, which have been published in

F. Tong, L. Zheng, M. Ahmadi, M. Ni, J. Pan, `Modeling and Analyzing Duty-Cycling, Pipelined-Scheduling MACs for Linear Sensor Networks`, IEEE Transactions on Vehicular Technology (TVT), 65(4):2608–2620, Apr. 2016. (http://dx.doi.org/10.1109/TVT.2015.2426708)

Fei Tong, S. He, J. Pan, “Modeling and Analysis for Data Collection in Duty-Cycled Linear Sensor Networks with Pipelined-Forwarding Feature”, IEEE Internet of Things Journal, 6(6):9489-9502, Dec. 2019.

and

F. Tong, L. Zheng, M. Ahmadi, M. Ni, J. Pan, `Modeling Duty-cycling MAC Protocols with Pipelined Scheduling for Linear Sensor Networks`, IEEE/CIC International Conference on Communications in China (ICCC), pp. 813–817, Oct. 2014. (http://dx.doi.org/10.1109/ICCChina.2014.7008388)

## How to use the code
Load `ProjectCode/WSN_MAC.project/WSN_MAC.prj` in OPNET 14.5

repository: LOVE-QQ/PDC-ADC-in-OPNET

repo_name: LOVE-QQ/PDC-ADC-in-OPNET


text:
ProofScript
=====================

**ProofScript** is the language component of [ProofPeer](http://proofpeer.net).
It is used for
* mathematical formalisations,
* programming,
* technical publishing, blogging & commenting.

Check out the [Wiki](https://github.com/proofpeer/proofpeer-proofscript/wiki) for more information.

repository: proofpeer/proofpeer-proofscript

repo_name: proofpeer/proofpeer-proofscript


text:
Name: Simple Buffer Overflow

Description: The user will be presented with a C program that takes input using gets(). Their objective will be to overflow the buffer so that they will overwrite the data contained by the variable named "keyRequest".
The "keyRequest" variable will then be sent to a server via a socket. The server will then check to see if the keyRequest is correct. If it is correct, the key will be transmitted back to the user.
Otherwise, the message "Nope." will be displayed. The correct password is "MOSS".

NOTE: Server code is also included in the repository. This will be running on the server during the even itself. ALSO, we will need to edit the buff.c source code to match the hostname and the port of the server.

Key: aSByZWFsbHkgaG9wZSBsaWZlIGdldHMgZWFzaWVyLi4u

Solution: One way to solve this would be to use a scripting language to overflow the buffer. Example solutions:

For 32 bit: python -c 'print "A"*80 + "MOSS"' | ./buff
For 64 bit: python -c 'print "A"*88 + "MOSS"' | ./buff

To compile: We have to disable the overflow protection. During testing I had compiled using the following command:
 gcc -Wall -fno-stack-protector -D_FORTIFY_SOURCE=0 buff.c -o buff

 listener.c
 gcc -Wall -D_FORTIFY_SOURCE=0 listener.c -o listener

 Note: You may want to use -g compiler flag to debug the code.


text:
# GameOfLife
My rendition of John Conway's Game of Life. Cells are considered either dead(displayed as white)  or alive(displayed as black). Every cell has 8 neighbors. The new value of a cell is based on its current value as well as the value of its neighbors.

![](gameOfLife.gif);

# Dependencies
I wrote this program in Processing 3 with no external libraries.

# Usage
Clone or download my code. From you computer you can play the game by opening one of the .pde files and pressing the play button in the Processing environment. You can also the export the application as a double-clickable executible on Mac or PC by pressing File/Export Application in the Processing environment.

# Explanation
Individual cells are represented by through the Cell class. Cells are kept in a 2D-Array called cells. The length of the 2D-Array cells is dependent on a specified size. The larger the size, the more pixel space each individual Cell object will take up and the less total Cells will be required to fill up the screen.
```processing
size = 10;
  cols = width/size;
  rows = height/size;
  cells = new Cell[cols][rows];
```
As an argument each cell takes in an x and y value and a boolean that indicates whether or not it is alive. The x and y variables indicate the x and y index of the Cell in cells. The x and y variables are also used to calculate the x and y position of the Cell. The neighbors array stores the indices of the neighboring Cells.
```processing
class Cell{
  PVector pos;
  int x;
  int y;
  boolean alive;
  boolean newState;
  PVector[] neighbors;
  Cell(int x, int y, boolean alive){
    pos  = new PVector(x * size, y * size);
    this.x = x;
    this.y = y;
    this.alive = alive;
    neighbors = new PVector[8];
    initializeNeighbors();

  }
```
The initializeNeighbors method is what is used to populate the neighbors array for each Cell. Three local variables are used in this method. The first is index which represents the index of the neighbors array that we need to modify. Index starts at zero and will increment everytime an element in neighbors has been defined. We also must use tempX and tempY in order to find the x and y value of each neighboring Cell and then put those values into a new PVector in neighbors.
```processing
void initializeNeighbors(){
    int index = 0;
    int tempX;
    int tempY;
 ```
 The neighboring Cells we are looking at are to the left, right, up, down and diagonals of the original Cell. So therfore each of the x and y indcies of each neighboring Cell can be represented as a for-loop from y - 1 to y + 1 nested inside of a for-loop from x - 1 to x + 1.
 ```processing
    for(int a = x - 1; a <= x +1; a++){
      for(int b = y - 1; b <= y + 1; b++){
 ```
 However this doesn't properly account for edge cases. For example if the x value of the original Cell is 0, then some of the neighboring cells will have an x-coordinate of -1 which doesn't exist. To account for this, I wrote an if-statement that re-routes non-exisitent values to "wraparound the screen" for example changing tempX = -1 (the neighbor of 0 to the left) to tempX = Cols - 1(the rightmost x position). If no edge case exists then tempX and tempY are simply set to the itereable in the loops(a and b respectively).
 ```processing
      if(a == -1){
        tempX = cols - 1;
      }else if(a == cols){
        tempX = 0;
      }else{
        tempX = a;
      }
      if(b == -1){
        tempY = rows - 1;
      }else if(b == rows){
        tempY = 0;
      }else{
        tempY = b;
      }
 ```
 Finally because a Cell can't be a neighbor with itself, neighbors will only be added to when the values of a and b are not equal to x and y.
 ```processing
   if(!(a == x && b == y)){
     neighbors[index] = new PVector(tempX,tempY);
     index++;
   }
 ```
The update method in Cell first determines how many of a Cell's neighboring Cells are alive by iterating through neighbors.
```processing
void update(){
    int numOfAliveNeighbors = 0;
    for(PVector p:neighbors){
      if(cells[(int)p.x][(int)p.y].alive == true){
        numOfAliveNeighbors++;
      }
    }
 ```
 Based on Conway's rules for the Game of Life. The Cell will calculate whether it will be dead or alive the next frame. This value is stored not in alive but a seperate variable called newState. The reason a new temporary variable must be used is because since the new value of alive depends on other Cells, we can't have some Cells update their values before others.
 ```processing
 if(alive == true){
      if(numOfAliveNeighbors < 2){
        newState = false;
      }else if(numOfAliveNeighbors > 3){
        newState = false;
      }else{
        newState = alive;
      }
    }else{
      if(numOfAliveNeighbors == 3){
        newState = true;
      }else{
        newState = alive;
      }
    }
 ```
 A seperate method called change is used to finally update alive to be equal to newState.
 ```processing
   void change(){
      alive = newState;
    }
 ```
 The cells 2D-Array is controlled in a seperate class called GOL(for Game of Life). When GOL is initialized it will initialize each Cell in cells with a random alive value.
 ```processing
 class GOL{

  GOL(){
    for(int x = 0; x < cols; x++){
     for(int y = 0; y < rows; y++){
        boolean alive;
        if(Math.random() > 0.50){
          alive = true;
        }else{
          alive = false;
        }
        cells[x][y] = new Cell(x,y,alive);
      }
    }

  }
  ```
  GOL has two methods, one which displays cells by calling the display method in Cell. And another which updates cells, which calls the update method in Cell for every Cell in cells, followed by the change method.
  ```processing
  void update(){
    for(int x = 0; x < cols; x++){
      for(int y = 0; y < rows; y++){
        cells[x][y].update();
      }
    }
    for(int x = 0; x < cols; x++){
      for(int y = 0; y < rows; y++){
        cells[x][y].change();
      }
    }
  }
  ```
  After the only GOL object(called gol) is created, the main draw loop of this program consists of running the display method of GOL followed by the update method of GOL.
  ```processing
   gol = new GOL();
}

void draw(){
    gol.display();
    gol.update();
}
  ```


text:
exclude:true
class: module-header ethereum/exercises.etherscan
---
class:tallpic, center
# Exploring the blockchain with Etherscan

![logo-etherscan](../media/logo-etherscan.png)
https://etherscan.io/

---
# View Transactions

![Review transaction](../media/metamask-send-token-etherscan.png)

???
ref: https://rinkeby.etherscan.io/tx/0xc52b66cd7fdd5f2289be4f04a324908056703e7046bdece9677d3a7e6ccf26d7

---
exclude:true
class: module-header ethereum/exercises.github-signup
---
# Signing up for Github

---
# Selecting a username

* Consider length, last name, ease of use, professionalism

http://github.com/<username>/<projectname>

---
# Verifying your email

If you do not verify your email address, you will not be able to:

* Create or fork repositories
* Create issues or pull requests
* Comment on issues, pull requests, or commits
* Authorize OAuth App applications
* Generate personal access tokens
* Receive email notifications

https://help.github.com/articles/verifying-your-email-address/

---
# Publishing your user page

http(s)://<username>.github.io

???
https://help.github.com/articles/user-organization-and-project-pages/

---
# Authentication setup
Connection methods:
* SSH
* HTTPS

???
ref: https://help.github.com/articles/which-remote-url-should-i-use/

---
# Connecting to GitHub with SSH

Using the SSH protocol, you can connect and authenticate to remote servers and services.
With SSH keys, you can connect to GitHub without supplying your username or password at each visit.

???
ref: https://help.github.com/articles/connecting-to-github-with-ssh/

---
# Setting up SSH access

* [Checking for existing SSH keys on your system](https://help.github.com/articles/checking-for-existing-ssh-keys)
 * Before you generate an SSH key, you can check to see if you have any existing SSH keys.
```shell
$ ls -al ~/.ssh
```
* [Generating a new SSH key and adding it to the ssh-agent](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
 * After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.
* [Adding a new SSH key to your GitHub account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account)
 * To configure your GitHub account to use your new (or existing) SSH key, you'll also need to add it to your GitHub account.
* [Testing your SSH connection](https://help.github.com/articles/testing-your-ssh-connection)
 * After you've set up your SSH key and added it to your GitHub account, you can test your connection.
* [Working with SSH key passphrases](https://help.github.com/articles/working-with-ssh-key-passphrases)
 * You can secure your SSH keys and configure an authentication agent so that you won't have to reenter your passphrase every time you use your SSH keys.
???
ref: https://help.github.com/articles/connecting-to-github-with-ssh/

---
# Cloning with HTTPS

The https:// clone URLs are available on all repositories, public and private. These URLs work everywhere--even if you are behind a firewall or proxy. In certain cases, if you'd rather use SSH, you might be able to use SSH over the HTTPS port.

When you git clone, git fetch, git pull, or git push to a remote repository using HTTPS URLs on the command line, you'll be asked for your GitHub username and password.

If you have enabled two-factor authentication, or if you are accessing an organization that uses SAML single sign-on, you must provide a personal access token instead of entering your password for HTTPS Git.
???
ref: https://help.github.com/articles/which-remote-url-should-i-use/

---
# Cloning with SSH

SSH URLs provide access to a Git repository via SSH, a secure protocol. To use these URLs, you must generate an SSH keypair on your computer and add the public key to your GitHub account. For information on setting up an SSH keypair, see "Generating an SSH key."

When you git clone, git fetch, git pull, or git push to a remote repository using SSH URLs, you'll be prompted for a password and must provide your SSH key passphrase.

If you are accessing an organization that uses SAML single sign-on, you won't be able to clone with SSH. Instead, clone with the HTTPS URL.
???
ref: https://help.github.com/articles/which-remote-url-should-i-use/

---
exclude:true
class: module-header ethereum/platform.bitcoin
---
class:tallpic
# Bitcoin

![bitcoin][bitcoin-logo]
[bitcoin-logo]: ../media/bitcoin_logo.png "Bitcoin"

---
name: bitcoin-whitepaper
exclude: true

# Bitcoin Whitepaper

???

"It might make sense just to get some in case it catches on. If enough people think the same way, that becomes a self fulfilling prophecy."
Satoshi Nakamoto, 1/17/2009 - http://nakamotoinstitute.org/crash-course/

---
# Specification

There's more to Bitcoin these days than the whitepaper.

The reference implementation is considered the de-facto specification, while the network protocol is often accurately captured in
https://en.bitcoin.it/wiki/Protocol_documentation

???
ref: https://en.bitcoin.it/wiki/Protocol_documentation

---
# Bitcoin Network Clients: "Nodes"

Software running as a bitcoin network client is called a "node", and only if it participates in searching for new valid blocks is it a miner.

A bitcoin client is the end-user software that facilitates private key generation and security, payment sending on behalf of a private key, and optionally provides:

* Useful information about the state of the network and transactions.
* Information related to the private keys under its management.
* Syndication of network events to other peer clients.

???
ref: https://en.bitcoin.it/wiki/Clients

---
# Bitcoin Core

The reference implementation of Bitcoin network clients is called Bitcoin Core.
Originally published by Satoshi, it was rebranded "Bitcoin Core" to disambiguate it from the network. Also known as the Satoshi client.
It currently has a team of maintainers, with Wladimir J. van der Laan leading the release process.

???
ref: https://en.wikipedia.org/wiki/Bitcoin_Core

---
# Bitcoin Core Implementations

Original Satoshi clients
 * Private clients pre-release
 * 0.1.0 (2009-01-09) (which supported only Windows 2000 / Windows NT and Windows XP)
 * 0.1.5 (2009-02-04)
Community client implementations
 * 0.2.0 (2009-12-17) (starts to support Linux, adoption rises)
 * 0.3.0 (2010-07-06) (Windows32, Linux, MacOS X support)
 * 0.16.0 (2018-02-26) (Latest as of 2019-01)

Many other community built clients also exist.

???
ref: https://en.bitcoin.it/wiki/Original_Bitcoin_client
ref: https://en.bitcoin.it/wiki/Bitcoind#History_of_official_bitcoind_.28and_predecessor.29_releases

---
# Full nodes

A full node is a program that fully validates transactions and blocks. Almost all full nodes also help the network by accepting transactions and blocks from other full nodes, validating those transactions and blocks, and then relaying them to further full nodes.

Most full nodes also serve lightweight clients by allowing them to transmit their transactions to the network and by notifying them when a transaction affects their wallet. If not enough nodes perform this function, clients won’t be able to connect through the peer-to-peer network—they’ll have to use centralized services instead.

???
ref: https://bitcoin.org/en/full-node

---
# Running a bitcoin full node - requirements

Recommended starting specs for a node:
* Desktop or laptop hardware running recent versions of Windows, Mac OS X, or Linux.
* 200 gigabytes of free disk space, accessible at a minimum read/write speed of 100 MB/s.
* 2 gigabytes of memory (RAM)
* A broadband Internet connection with upload speeds of at least 400 kilobits (50 kilobytes) per second
* An unmetered connection, a connection with high upload limits, or a connection you regularly monitor to ensure it doesn’t exceed its upload limits. It’s common for full nodes on high-speed connections to use 200 gigabytes upload or more a month. Download usage is around 20 gigabytes a month, plus around an additional 195 gigabytes the first time you start your node.
* 6 hours a day that your full node can be left running. (You can do other things with your computer while running a full node.) More hours would be better, and best of all would be if you can run your node continuously.

???
ref: https://bitcoin.org/en/download
ref: https://bitcoin.org/en/full-node#minimum-requirements

---
# Running a bitcoin full node - risks

* Legal: Bitcoin use is prohibited or restricted in some areas.
* Bandwidth limits: Some Internet plans will charge an additional amount for any excess upload bandwidth used that isn’t included in the plan. Worse, some providers may terminate your connection without warning because of overuse.
* Anti-virus: Several people have placed parts of known computer viruses in the Bitcoin block chain. This block chain data can’t infect your computer, but some anti-virus programs quarantine the data anyway, making it more difficult to run Bitcoin Core. This problem mostly affects computers running Windows.
* Attack target: Bitcoin Core powers the Bitcoin peer-to-peer network, so people who want to disrupt the network may attack Bitcoin Core users in ways that will affect other things you do with your computer, such as an attack that limits your available download bandwidth.

---
# Initial block download

Initial block download refers to the process where nodes synchronize themselves to the network by downloading blocks that are new to them. This will happen when a node is far behind the tip of the best block chain. In the process of IBD, a node does not accept incoming transactions nor request mempool transactions.

If you are trying to set up a new node following the instructions below, you will go through the IBD process at the first run, and it may take a considerable amount of time since a new node has to download the entire block chain (which is roughly 195 gigabytes now). During the download, there could be a high usage for the network and CPU (since the node has to verify the blocks downloaded), and the client will take up an increasing amount of storage space (reduce storage provides more details on reducing storage).

Before the node finishes IBD, you will not be able to see a new transaction related to your account until the client has caught up to the block containing that transaction. So your wallet may not count new payments/spendings into the balance.

???
ref: https://bitcoin.org/en/full-node#initial-block-downloadibd

---
# Wallet Security

Understand how secure the private key managed by your software is, because it's yours.
Nodes are considered "hot" wallets, as they are on a computer, ready for use and connected to the network.

???
ref: https://bitcoin.org/en/secure-your-wallet

question: Is a bitcoin client wallet on your computer more or less secure than a wallet at an exchange?

---
# BIP

[Bitcoin Improvement Proposals](https://github.com/bitcoin/bips)
![BIP process](../media/bip-process.png)

"We intend BIPs to be the primary mechanisms for proposing new features, for collecting community input on an issue, and for documenting the design decisions that have gone into Bitcoin. The BIP author is responsible for building consensus within the community and documenting dissenting opinions."

???
ref: https://en.bitcoin.it/wiki/Bitcoin_Improvement_Proposals
ref: https://en.bitcoin.it/w/images/en/e/ea/BIP_Workflow.png
ref: https://en.bitcoin.it/wiki/BIP_0001
ref: https://github.com/bitcoin/bips/blob/master/bip-0002.mediawiki BIP2 - Proposal workflow

But maybe this isn't the most important part of what makes a system like Bitcoin like a DAO

---
# BIP Types

There are three kinds of BIP:
* Standards
* Informational
* Process

???

* A Standards Track BIP describes any change that affects most or all Bitcoin implementations, such as a change to the network protocol, a change in block or transaction validity rules, or any change or addition that affects the interoperability of applications using Bitcoin. Standards Track BIPs consist of two parts, a design document and a reference implementation.
* An Informational BIP describes a Bitcoin design issue, or provides general guidelines or information to the Bitcoin community, but does not propose a new feature. Informational BIPs do not necessarily represent a Bitcoin community consensus or recommendation, so users and implementors are free to ignore Informational BIPs or follow their advice.
* A Process BIP describes a process surrounding Bitcoin, or proposes a change to (or an event in) a process. Process BIPs are like Standards Track BIPs but apply to areas other than the Bitcoin protocol itself. They may propose an implementation, but not to Bitcoin's codebase; they often require community consensus; unlike Informational BIPs, they are more than recommendations, and users are typically not free to ignore them. Examples include procedures, guidelines, changes to the decision-making process, and changes to the tools or environment used in Bitcoin development. Any meta-BIP is also considered a Process BIP.

---
exclude:true
# Bitcoin as a DAC

Does the Bitcoin project count as a Decentralized, Autonomous, Corporation?

???
question: In what ways is the Bitcoin project like a Decentralized Autonomous Corporation?

---
# Joining the network

The Bitcoin client has a number of sources that it uses to locate the network on initial startup. In order of importance:

1. The primary mechanism, if the client has ever run on this machine before and its database is intact, is to look at its database. It tracks every node it has seen on the network, how long ago it last saw it, and its IP address.
2. The client can use DNS to locate a list of nodes connected to the network. One such seed is bitseed.xf2.org. The client will resolve this and get a list of Bitcoin nodes.
3. The client has a list of semi-permanent nodes compiled into it.
4. The client can connect to a well-known IRC network, irc.lfnet.org, and find other nodes that way. (This method has been removed as of version 0.8.2)
5. It takes IP addresses from the commandline (-addnode).

???
question: How does a bitcoin node know how to connect to the network? (Peer discovery)

ref: https://bitcoin.stackexchange.com/questions/2027/how-does-the-bitcoin-client-make-the-initial-connection-to-the-bitcoin-network

---
# Hashing algorithm: hashcash

Bitcoin mining uses the hashcash Proof-of-Work algorithm.

Hashcash was proposed in 1997 by Adam Back and described more formally in Back's paper "Hashcash - A Denial of Service Counter-Measure"

Parameters:
* service string
* nonce
* counter

???
ref: https://en.bitcoin.it/wiki/Block_hashing_algorithm
ref: https://en.wikipedia.org/wiki/Hashcash
ref: http://www.hashcash.org/papers/hashcash.pdf

---
# Bitcoin block header

| Field | Purpose | Updated when... | Size (Bytes) |
|---|---|---|---|
| Version | Block version number | You upgrade the software and it specifies a new version | 4 |
| hashPrevBlock | 256-bit hash of the previous block header | A new block comes in | 32 |
| hashMerkleRoot | 256-bit hash based on all of the transactions in the block | A transaction is accepted | 32 |
| Time | Current timestamp as seconds since 1970-01-01T00:00 UTC | Every few seconds | 4 |
| Bits | Current target in compact format | The difficulty is adjusted | 4 |
| Nonce | 32-bit number (starts at 0) | A hash is tried (increments) | 4 |

???
ref: https://en.bitcoin.it/wiki/Block_hashing_algorithm

---
# Bitcoin block body

The body of the block contains the transactions. These are hashed only indirectly through the Merkle root. Because transactions aren't hashed directly, hashing a block with 1 transaction takes exactly the same amount of effort as hashing a block with 10,000 transactions.

???
ref: https://en.bitcoin.it/wiki/Block_hashing_algorithm

---
# Further reading

* https://bitcoin.org/
 * https://bitcoin.org/en/faq

---

exclude:true
class: module-header ethereum/topic.blockchain-intro
---
class: middle, center, invert
# Blockchain

???
Not since the Web itself has a technology promised broader and more fundamental revolution than blockchain technology. A blockchain is a peer-to-peer distributed ledger forged by consensus, combined with a system for “smart contracts” and other assistive technologies. Together these can be used to build a new generation of transactional applications that establishes trust, accountability and transparency at their core, while streamlining business processes and legal constraints.

Think of it as an operating system for marketplaces, data-sharing networks, micro-currencies, and decentralized digital communities. It has the potential to vastly reduce the cost and complexity of getting things done in the real world.

Only an Open Source, collaborative software development approach can ensure the transparency, longevity, interoperability and support required to bring blockchain technologies forward to mainstream commercial adoption.

---
exclude: true
<video width="100%" height="" controls fullscreen>
  <source src="../media/iftf_blockchain_intro.mp4" type="video/mp4">
This browser does not support the video tag.
</video>

---
# DAC proposal

???
Daniel Larimer first proposed the concept of a "Decentralized Organized Company" in an article published on September 7, 2013.[10] https://letstalkbitcoin.com/is-bitcoin-overpaying-for-false-security#.Ui-p9WTFT7s

The DAC quote:

Think of a crypto-currency as shares in a Decentralized Autonomous Corporation (DAC) where the source code defines the bylaws. The goal of the DAC is to earn a profit for the shareholders by performing valuable services for the free market. With this goal in mind set out to maximize shareholder value at every stage as you design the bylaws that govern operation of the DAC.

The DAC only has one way that it can acquire the services it requires to operate and that is to pay for them with shares in the decentralized company. One service that is required is transaction validation, another is security against double-spend attacks by private (for-profit) criminals. Another service that is required is a viral marketing campaign. Other services include but are not limited to privacy for the customers and defense against traffic filtering.

The goal of a for-profit DAC is to maximize value and minimize costs. In this case, we only want the DAC to pay for useful security, but no more than necessary to maximize shareholder value.

---
exclude:true
# Autonomous Thinking Systems

---
exclude: true
# (Non-currency) Data centric blockchains
???
    Private blockchains
    Hyperledger
    IBM
---
# Ethereum

???
    Value + Data + Code
---
# Decentralized Applications (dApps)

---
# Solidity

???
Solidity for smart contract development

Turing complete
https://en.wikipedia.org/wiki/Turing_completeness

    Development
        Dapps
        Mechanism design
    Smart contracts
        Standards - ERC20, ERC721
    The DAO
        The purpose
        The hack
    Challenges
        Mining cost / env impact
        Proof of Stake (PoS) a solution?

---
# Hyperledger

???
Launched in 2016

Hyperledger is an open source collaborative effort created to advance cross-industry blockchain technologies. It is a global collaboration led by IBM, hosted by The Linux Foundation, including leaders in finance, banking, Internet of Things, supply chains, manufacturing and Technology.

https://www.hyperledger.org/

---
# Cryptoeconomics

???
It's hard!

Cryptoeconomics is a practical science that focuses on the design and characterization of these protocols.

Incentivization is at the core of economics: action + value

https://blockgeeks.com/guides/what-is-cryptoeconomics/
---
exclude:true
# Economics
???
Auctions - Vickery
---
# Trust

???
http://ncase.me/trust/
---
# Game Theory

???
    Game theory is "the study of mathematical models of conflict and cooperation between intelligent rational decision-makers". Game theory is mainly used in economics, political science, and psychology, as well as in logic and computer science.

    Decision making & voting
---
# Behavioral Economics

---
class:center,middle
# Industries
---
exclude: true
# Commerce
        Online commerce! Virtual catalogs!
        Remember Paypal?
---
# Finance

???
Streamlined settlement, improved liquidity, increased transparency and new products/markets

---
# Healthcare

???
    Unite disparate processes, increase data flow and liquidity, reduce costs and improve patient experience and outcomes

    Health records
---
# Supply Chain

???
    Track parts and service provenance, ensure authenticity of goods, block counterfeits, reduce conflicts

    Provenance

    Romain outbreaks!
---
# Entertainment

???
        Crowdfunding
        Puzzles
        Video games
---
# Politics & Governance

???
    Problems: Diebold
    Experiements with Agora, Democracy Earth, etc
---
# Funding

???
        Startup funding models
        ICOs
---
# Jobs

* Protocol engineer
* Platform developer
* dApp developer
--

* Auditors
* Information Security
* Penetration Testers
--

* Economist - Sociologist & Math
* Game Theorist - Poli Sci & Math
* Behavioral Economist - Psychology & Math
---
# Jobs cont.

* Front end developer
* Network engineer
* System administrator
--

* Designers
* Content writers & editors
* Media specialists
--

* Researchers
* Entrepreneurs
* Teachers & Trainers
---
# Healthcare: Proof of authenticity

???
https://www.ethnews.com/pfizer-and-genentech-turn-to-ethereum-blockchain

Major pharmaceutical conglomerates Pfizer and Genentech, together constituting a market cap greater than $300 billion, recently announced the MediLedger blockchain platform, powered by JP Morgan's enterprise-focused, Ethereum-based Quorum, designed to keep counterfeit goods out of medical supply chains.
---
# Healthcare: Drug Tracking

???
https://www.ethnews.com/intel-will-oversee-simulated-blockchain-pilot-to-address-opioid-crisis

This spring, tech manufacturer Intel will lead several partner firms, including Johnson & Johnson, in testing a simulated version of a blockchain platform designed to track drugs across the supply chain.
---
# Healthcare: Record reconciliation

???
https://www.ethnews.com/humana-other-healthcare-firms-to-launch-blockchain-pilot-for-data-sharing

On April 2, Humana, MultiPlan, Quest Diagnostics, UnitedHealth Group's Optum, and UnitedHealthcare announced their intention to launch the trial, which aims to explore an alternative to the current data storage system.

Today, a variety of healthcare entities each maintain their own copies of healthcare provider data, and reconciling the different versions of these records can be a complicated, time-consuming, and expensive process. According to the joint press release, attempts to harmonize records currently cost the healthcare industry some $2.1 billion per year.

The participating companies hope the pilot will lead to solutions that will improve patients' "access to care" in addition to saving healthcare providers money and equipping them with the most current and accurate data available.
---
exclude:true

* Javascript
* Python
* Java, Go...
* Networking protocols
* Hyperledger
* Ethereum

---
class: center, middle
# Open questions

???
What is suitable for blockchain scale?

Solving old problems vs engaging new opportunities

Value volatility

Efficiency vs security trade-off re-evaluation

What new opportunities will these functions create that we haven't thought of yet?

---
exclude:true
class: module-header ethereum/topic.consensus
---
class: center, middle, invert
# Consensus

???

# The Problem

The consensus problem requires agreement among a number of processes (or agents) for a single data value. Some of the processes (agents) may fail or be unreliable in other ways, so consensus protocols must be fault tolerant or resilient. The processes must somehow put forth their candidate values, communicate with one another, and agree on a single consensus value.

ref: https://en.wikipedia.org/wiki/Consensus_(computer_science)

---
# Data security: ACID

* Atomicity - Transactions are often composed of multiple statements. Atomicity guarantees that each transaction is treated as a single "unit", which either succeeds completely, or fails completely.
* Consistency - ensures that a transaction can only bring the database from one valid state to another, maintaining database invariants: any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof.
* Transactions - are often executed concurrently (e.g., reading and writing to multiple tables at the same time). Isolation ensures that concurrent execution of transactions leaves the database in the same state that would have been obtained if the transactions were executed sequentially.
* Durability guarantees that once a transaction has been committed, it will remain committed even in the case of a system failure (e.g., power outage or crash)

???

ref: https://en.wikipedia.org/wiki/ACID_(computer_science)

---
class:tallpic
# Centralized data stores

![DB replication](../media/database-replication.jpg)

---
# Database replication

Log based replication replays transactions recorded on the master node at each slave node.
Other forms may directly update the state of the db to match the master.

Eventual consistency means all databases will eventually reach agreement on the state of the data.

Slaves implicitly trust the master. Affect the master, affect all slaves.

---
# PAXOS

Paxos is a family of protocols for solving consensus in a network of unreliable processors (that is, processors that may fail). Consensus is the process of agreeing on one result among a group of participants. This problem becomes difficult when the participants or their communication medium may experience failures.

The Paxos protocol was first published in 1989 and named after a fictional legislative consensus system used on the Paxos island in Greece. It was later published as a journal article in 1998.

???
ref: https://en.wikipedia.org/wiki/Paxos_(computer_science)

---
# RAFT

Raft is a consensus algorithm designed as an alternative to Paxos. It was meant to be more understandable than Paxos by means of separation of logic, but it is also formally proven safe and offers some additional features. Raft offers a generic way to distribute a state machine across a cluster of computing systems, ensuring that each node in the cluster agrees upon the same series of state transitions.

Raft achieves consensus via an elected leader. A server in a raft cluster is either a leader or a follower, and can be a candidate in the precise case of an election (leader unavailable). The leader is responsible for log replication to the followers. It regularly informs the followers of its existence by sending a heartbeat message. Each follower has a timeout (typically between 150 and 300 ms) in which it expects the heartbeat from the leader. The timeout is reset on receiving the heartbeat. If no heartbeat is received the follower changes its status to candidate and starts a leader election.

???
ref: https://en.wikipedia.org/wiki/Raft_(computer_science)

---
# Eventual Consistency

Eventual consistency is a consistency model used in distributed computing to achieve high availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value. Eventual consistency, also called optimistic replication, is widely deployed in distributed systems, and has origins in early mobile computing projects. A system that has achieved eventual consistency is often said to have converged, or achieved replica convergence.

???
ref: https://en.wikipedia.org/wiki/Eventual_consistency

---
# BASE

* Basically Available
* Soft state
* Eventual consistency

---
# CAP Theorem

States that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees:

* Consistency: Every read receives the most recent write or an error
* Availability: Every request receives a (non-error) response – without the guarantee that it contains the most recent write
* Partition tolerance: The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes

Database systems designed with traditional ACID guarantees in mind such as RDBMS choose consistency over availability, whereas systems designed around the BASE philosophy, common in the NoSQL movement for example, choose availability over consistency.

???
Formulated by Eric Brewer

"ACID and BASE represent two design philosophies at opposite ends of the consistency-availability spectrum. The ACID properties focus on consistency and are the traditional approach of databases. My colleagues and I created BASE in the late 1990s to capture the emerging design approaches for high availability and to make explicit both the choice and the spectrum."

ref: https://en.wikipedia.org/wiki/CAP_theorem
ref: https://en.wikipedia.org/wiki/Eric_Brewer_(scientist)
ref: https://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed

---
# Decentralized networks

* Who to trust?
* Who to believe when a conflict arises?

---
exclude: true
# git repositories as decentralized databases

???
git repositories as decentralized databases

---
class: middle, center
# Byzantine failure

???
A process that experiences a Byzantine failure may send contradictory or conflicting data to other processes, or it may sleep and then resume activity after a lengthy delay. Of the two types of failures, Byzantine failures are far more disruptive.
ref: https://en.wikipedia.org/wiki/Consensus_(computer_science)

ref: https://en.wikipedia.org/wiki/Byzantine_fault

---
# Byzantine Generals problem

<video width="100%" height="" controls>
  <source src="../media/byzantine-generals-problem.mp4" type="video/mp4">
This browser does not support the video tag.
</video>

???
ref: https://www.youtube.com/watch?v=_MwqAaVweJ8
ref: https://blockgeeks.com/guides/blockchain-consensus/
ref: https://en.wikipedia.org/wiki/Two_Generals%27_Problem

---
class: middle, center, invert
# How would you approach solving it?

---
# Distributed Consensus mechanisms

* Proof of Work (PoW)
* Proof of Stake (PoS)
* Delegated Proof of Stake (DPoS)

* Proof of Elapsed Time (PoET)
* Proof of Authority (PoA)
* Proof of Capacity
* Proof of Activity
* Proof of Burn
* Proof of Importance

???
ref: https://medium.com/the-daily-bit/9-types-of-consensus-mechanisms-that-you-didnt-know-about-49ec365179da

---
# Proof of Work

###Challenge-response

###Solution-verification

???
Proof-of-work is essentially one-CPU-one-vote.

The concept was invented by Cynthia Dwork and Moni Naor as presented in a 1993 journal article.

The term "Proof of Work" or POW was first coined and formalized in a 1999 paper by Markus Jakobsson and Ari Juels titled,
"Proofs of work and bread pudding protocols"  - http://www.hashcash.org/papers/bread-pudding.pdf

 A proof-of-work (PoW) system (or protocol, or function) is an economic measure to deter denial of service attacks and other service abuses such as spam on a network by requiring some work from the service requester, usually meaning processing time by a computer. The concept was invented by Cynthia Dwork and Moni Naor as presented in a 1993 journal article. The term "Proof of Work" or POW was first coined and formalized in a 1999 paper by Markus Jakobsson and Ari Juels. An early example of the proof-of-work system used to give value to a currency is the shell money of the Solomon Islands.

ref: https://en.wikipedia.org/wiki/Proof-of-work_system
ref: https://medium.com/@julianrmartinez43/understanding-proof-of-work-part-1-586d7ee6b014

---
# Longest chain

A principle for determining how to proceed with incomplete knowledge about the state of the network.

Relativity and technological constraints prevent us from doing instant communication across the globe, so two nodes can not be expected to pick the same chain as the active one. This is no problem: the mining mechanism makes sure that the chance two nodes disagree about blocks in the past decreases exponentially as they are older.

The active chain is one path from genesis block at the top to some leaf node at the bottom of the block tree. Every such path is a valid choice, but nodes are expected to pick the one with the most "work" in it they know about (where work is loosely defined as the sum of the difficulties).

The rules in practice are this: when a new block arrives, and it extends the previous active chain, we just append it to the active chain. If not, it depends on whether the branch it extends now has more work than the currently active branch. If not, we store the block and stop. If it does have more work, we do a so called "reorganisation": deactivating blocks from the old branch, and activating blocks from the new branch.

Ethereum determines the longest chain based on the total difficulty, which is embedded in the block header. Ties are broken randomly.

Total difficulty is the simple sum of block difficulty values without explicitly counting uncles. Difficulty is computed based on parent difficulty and timestamp, block timestamp, and block number, again without reference to uncles.

All of these except tiebreaking are consensus-critical, and so can be expected to be the same across all clients.

???
ref: https://bitcoin.stackexchange.com/questions/5540/what-does-the-term-longest-chain-mean
ref: https://ethereum.stackexchange.com/questions/13378/what-is-the-exact-longest-chain-rule-implemented-in-the-ethereum-homestead-p
---
# How PoW + Longest chain solves the Byzantine Generals problem

1. The Generals agree the first plan received by all Generals will be accepted as the plan
2. A General solves the PoW problem, creating a block that is broadcast to the network so that all Generals receive it
3. Following receipt of this block, each General verifies and works on solving the next PoW problem, incorporating the prior solution into it, so that their plan adds on to the previous resolution
4. Each time a General solves a PoW problem, a block is generated and the chain begins to grow. In time, any General working on a different solution will switch over to the longest chain. This is the one most Generals are contributing to and therefore has the greatest chance of success
5. As the Generals know roughly how long a PoW solution takes to solve, after a set amount of time they will know if enough of the other Generals are also working on the same chain

???
PoW solves the Byzantine Generals Problem as it achieves a majority agreement without any central authority, in spite of the presence of unknown/potentially untrustworthy parties and despite the network not being instantaneous. It empowers the distributed and un-coordinated Generals to come to an agreement.

Through this process, the Generals can arrive at a consensus of when to attack, can estimate their chances of successfully doing so, and can prevent multiple different signals to attack being sent simultaneously.

PoW also prevents malicious actors, such as a traitorous General, from sabotaging the network by tampering with historic messages. Bitcoin, for example, stores the hash signature of the previous block in every new block. Any change to an earlier block would therefore require all successive blocks to also be changed. This would take an excessively large amount of computing power, and therefore the ledger is secure from alterations.

ref: https://www.radixdlt.com/post/what-is-proof-of-work

---
# Proof-of-Stake (PoS)

In PoS-based networks the creator of the next block is chosen via various combinations of random selection and wealth or age (i.e., the stake).

Proof of stake must have a way of defining the next valid block in any blockchain. Selection by account balance would result in (undesirable) centralization, as the single richest member would have a permanent advantage. Instead, several different methods of selection have been devised.

Unlike in proof-of-work systems, there is little cost to working on several chains.

???
ref: https://cryptoeconomics.study/overview.html#further-suggestions
ref: https://en.wikipedia.org/wiki/Proof-of-stake

---
# Delegated Proof-of-Stake (DPoS)

Various projects are using delegated proof-of-stake, or DPoS. The system uses a limited number of nodes to propose and validate blocks to the blockchain. This is meant to keep transaction processing fast, rather than using several hundred or several thousand nodes. EOS uses a limited number of block validators, 21, whose reputation may or may not drop, allowing back-up validators to replace former nodes.

---
# Proof-of-Authority (PoA)

Parity supports a PoA consensus engine to be used with Ethereum Virtual Machine (EVM) based chains. PoA is a replacement for PoW, which can be used for both public and private chain setups. There is no mining involved to secure the network with PoA, and relies on trusted ‘Validators’ to ensure that valid transactions are added to blocks, processed and executed by the EVM faithfully.

Because mining does not occur on our proposed public test net, malicious actors are prevented from acquiring testnet Ether, solving the spam attack that Ropsten is currently facing.

There is no difference in the way that contracts are executed compared to PoW chains, so developers can test their contracts and user interfaces before deploying to the mainnet in a more reliable and convenient environment.

More information about PoA can be found at: https://github.com/ethcore/parity/wiki/Proof-of-Authority-Chains

???
q: How are transactions validated in a PoA network?
q: How does PoA differ from PoW?

ref: https://github.com/ethcore/parity/wiki/Proof-of-Authority-Chains
ref: https://en.wikipedia.org/wiki/Proof-of-authority
ref: https://kovan-testnet.github.io/website/proposal/

---
exclude: true
# Proof of Autonomy (POA...)

ref: https://forum.poa.network/t/proof-of-autonomy/1743

---
exclude: true
# PoET - Proof of Elapsed Time

PoET uses new secure CPU instruction, which is more and more available in new processors like Intel builds. With these instructions, PoET ensures a safe and random selection of a so-called  “leader”. This can be compared with Bitcoin mining, in which the miners compete for a one-time access to write the blockchain. Other than Bitcoin’s proof algorithm, PoET doesn’t need specialized mining hardware.

To become a leader, every “validator” – which equals to a node or a miner – needs to use the secure CPU instruction to request a wait time. The validator with the shortest wait time will be elected as a leader. Like every good mining, algorithm PoET works like a lottery with the price to get write access to the blockchain.

???

Barf. Reliance on a proprietary protocol to pick a fair leader, and a clear mechanism for cheating by enabling a mechanism for a back door to operate by shortcutting and being picked leader. No thanks.

---
exclude: true
# GHOST

Greedy Heaviest Observed Subtree

ref: https://www.cryptocompare.com/coins/guides/what-is-the-ghost-protocol-for-ethereum/
ref: https://blog.ethereum.org/2015/08/01/introducing-casper-friendly-ghost/
ref: https://coincentral.com/what-is-casper-the-friendly-haunting-of-ethereum/

---
exclude: true
# Casper

"The Casper protocol is a PoS algorithm for Ethereum. A validator deposits a stake into a smart contract.  He then runs a node to participate in the consensus algorithm to propose new blocks to the chain.  This keeps the network running.  Casper the Friendly Finality Gadget (CFFG) finalizes the blocks to the chain. Validators receive rewards for behaving correctly, but the system slashes deposits of a validator acts badly."

"Casper provides accountability by detecting violations, knowing which validators violated the rules, and punishing those violators. It also provides a safe process for new validators to enter the system and existing validators to leave the system. Security defenses are integral to Casper."

"Casper exists as an independent module and lives on top of a proposal mechanism. For Ethereum, the current underlying proposal mechanism is PoW.  The first iteration of Casper will sit on top of Ethereum’s existing PoW consensus mechanism. This will make it a hybrid PoW/PoS system. The underlying PoW mechanism lends itself to upgrad to something else in the future. Some form of round-robin approach may replace the PoW component."

“Accountable safety” and “plausible liveness” define two fundamental properties of Casper.

???
ref: https://github.com/ethereum/research/blob/master/papers/casper-basics/casper_basics.pdf
ref: https://coincentral.com/what-is-casper-the-friendly-haunting-of-ethereum/

---
exclude: true
# Accountable Safety
Accountable safety prevents two conflicting checkpoints from being finalized unless at least 1/3 of validators violate the rules.

---
exclude: true
# Plausible liveness
Plausible liveness guarantees that it will always be possible to finalize a new checkpoint without any validator violating any rules if at least 2/3 of validators follow the protocol.

---
exclude:true
class: module-header ethereum/topic.cryptoeconomics
---
# Cryptoeconomics

???
It's hard!

Cryptoeconomics is a practical science that focuses on the design and characterization of these protocols.

Incentivization is at the core of economics: action + value

ref: https://blockgeeks.com/guides/what-is-cryptoeconomics/
ref: https://cryptoeconomics.study/
ref: https://github.com/jpantunes/awesome-cryptoeconomics

---
# William Vickery

Vickrey was the first to use the tools of game theory to explain the dynamics of auctions. In his seminal paper, Vickrey derived several auction equilibria, and provided an early revenue-equivalence result. The revenue equivalence theorem remains the centrepiece of modern auction theory. The Vickrey auction is named after him.

???
https://en.wikipedia.org/wiki/William_Vickrey

Deceased, was on his way to a Georgism or "Single Tax" convention he had helped found 20 years ago.

https://en.wikipedia.org/wiki/Georgism

Vickrey was the first to use the tools of game theory to explain the dynamics of auctions.[3] In his seminal paper, Vickrey derived several auction equilibria, and provided an early revenue-equivalence result. The revenue equivalence theorem remains the centrepiece of modern auction theory. The Vickrey auction is named after him.[3]

Vickrey worked on congestion pricing, the notion that roads and other services should be priced so that users see the costs that arise from the service being fully used when there is still demand. Congestion pricing gives a signal to users to adjust their behavior or to investors to expand the service in order to remove the constraint. The theory was later partially put into action in London.

---
# Trust

???
http://ncase.me/trust/
---
# Game Theory

???
    Game theory is "the study of mathematical models of conflict and cooperation between intelligent rational decision-makers". Game theory is mainly used in economics, political science, and psychology, as well as in logic and computer science.

    Decision making & voting
---
# Behavioral Economics

---
# Incentive Centered Design

Incentive-centered design (ICD) is the science of designing a system or institution according to the alignment of individual and user incentives with the goals of the system. Using incentive-centered design, system designers can observe systematic and predictable tendencies in users in response to motivators to provide or manage incentives to induce a greater amount and more valuable participation. ICD is often considered when designing a system to induce desirable behaviors from users, such as participation and cooperation. It draws from principles in various areas such as economics, psychology, sociology, design, and engineering. ICD has been gaining attention in research communities due to the role it can play in helping systems benefit their users and ultimately achieve better results.

???
https://en.wikipedia.org/wiki/Incentive-centered_design

In 1996, the Nobel Prize in Economics was awarded to William Vickrey and James Mirrlees for their work in "The economic theory of incentives under asymmetric information", which was a core issue addressed by the theory of mechanism design. The theory of mechanism design was an antecedent to incentive-centered design, and in October 15, 2007, Roger Myerson, Leonid Hurwicz and Eric Maskin received the Nobel Prize in Economics from the Royal Swedish Academy of Sciences for their contributions to that theory.[3] Leonid Hurwicz was the founder of the theory of mechanism design, which is a branch in economics that deals with game theory. In mechanism design, designers try to satisfy design goals in specific sets of games by setting outcome functions and message space of the game. The idea of designing "mechanisms", or sets of institutional participation rules, in order to achieve the designer's goals for a system, is a core concept for ICD.

In 2001, the STIET program (Socio-Technical Infrastructure for Electronic Transactions) received a grant to fund for doctoral fellowships and a multidisciplinary program for the University of Michigan. The program aimed to train, research, and outreach to modern information systems through an incentive-centered design approach. The participants in the program composed of doctoral students and also faculty members of the universities. In 2004, Paul Resnick, one of the four faculty members in the STIET research group of Michigan coined the phrase "Incentive-centered Design" to describe the type of work they did. In 2007, Wayne State University joined the University of Michigan to focus the program on Incentive-centered Design, and the STIET program received a five-year renewal grant that allowed for research in incentive-centered design.[4]

---
# Models of human behavior

---
# Homo Reciprocans

???
https://en.wikipedia.org/wiki/Homo_reciprocans

Homo reciprocans, or reciprocating human, is the concept in some economic theories of humans as cooperative actors who are motivated by improving their environment. This concept stands in contrast to the idea of homo economicus, which states the opposite theory that human beings are exclusively motivated by self-interest.

---
# Homo Economicus

???
https://en.wikipedia.org/wiki/Homo_economicus

In economics, homo economicus, or economic man, is the concept in many economic theories portraying humans as consistently rational and narrowly self-interested agents who usually pursue their subjectively-defined ends optimally.

Generally, homo economicus attempts to maximize utility as a consumer and profit as a producer.

---
# Homo Sociologicus

???
https://en.wikipedia.org/wiki/Homo_economicus#Homo_sociologicus

Hirsch et al. say that homo sociologicus is largely a tabula rasa upon which societies and cultures write values and goals; unlike economicus, sociologicus acts not to pursue selfish interests but to fulfill social roles (though the fulfillment of social roles may have a selfish rationale-— e.g. politicians or socialites). This "individual" may appear to be all society and no individual.

---
# Homo Biologicus

???
https://en.wikipedia.org/wiki/Charles_Elworthy_(scientist)  (Redirected from Homo biologicus)

Homo biologicus is linked to, but extends, the economic Homo economicus model, which describes man as a rational and self-interested being. The core hypothesis is derived from evolutionary psychology, and proposes that human psychological processes were shaped by natural and sexual selection to solve evolutionarily relevant problems.

---
# Behavioral Economics
Thinking, Fast & Slow

???
See Daniel Kahnman

---
# Cognitive Science
![cogsci] (../media/Cognitive_Science_Hexagon.svg)

???
https://en.wikipedia.org/wiki/Cognitive_science

Cognitive science is the interdisciplinary, scientific study of the mind and its processes.[2] It examines the nature, the tasks, and the functions of cognition (in a broad sense). Cognitive scientists study intelligence and behavior, with a focus on how nervous systems represent, process, and transform information.

---
exclude:true
class: module-header ethereum/topic.how-to-get-crypto
---
class: splash invert
name: HOW-TO-GET-CRYPTO-START
# Cryptocurrency:
## How to get yours

???
ref: https://github.com/ethereum/wiki/wiki/Getting-Ether

---
# Options
* Buying
 * Directly from a person
 * Purchasing from an exchange (exchange for fiat)
* Trading
 * Exchanging one currency for another
* Earning
 * Participate in the network: "mining"
 * Get paid in crypto: "working"
* Accepting
 * Selling goods & services

---
# Buying in person

* Finding people who will sell
* Considerations
 * Risk - reputation matters
 * Trust - like any craigslist exchange (see video)
 * Transaction will link your wallet addresses

---
# Purchasing from an exchange

* Finding an exchange for purchase
 * Coinbase
* Considerations
 * Setting up your account
  * KYC
 * Timeliness
 * Wallet ownership

---
# Trading

* Finding an exchange for trade

---
# Earning by mining

* Getting set up to mine
 * Hardware
 * Electricity
 * Bandwidth

* Considerations
 * ROI
 * Efficiency
 * Proof type

---
# Earning by working

* Finding work
 * Consider open bounties!
  * https://gitcoin.co/
 * Support automated services
  * https://filecoin.io/

* Considerations
 * Volatility
  * Arrangement of value and timing of payment
 * Trust
  * Can you see it?

---
# Selling for crypto - Accepting

* Offering to accept payment in crypto
 * Which ones?
 * At what rate?

* Considerations
 * Market volatility

---

repository: DappDevs/DeckBuilder

repo_name: DappDevs/DeckBuilder


text:
# LambDynamicLights changelog

## 1.0.0

 - Initial release.
 - Added dynamic lighting to the game.

## 1.1.0

 - Added item frame dynamic lighting.
 - Added API.
 - Added more options.
   - Added entities dynamic lighting toggle.
   - Added block entities dynamic lighting toggle.
 - Added block entity dynamic lighting.
   - Allow dynamic lighting for block entities without block states.
   - Should not be used in cases where block states can be used.
 - Added compatibility with [Lil Tater Reloaded](https://github.com/Yoghurt4C/LilTaterReloaded).
   - Lil taters will light up the area if they hold an item emitting light.
 - Fixed light not moving when light source was moving too slow.
 - Fixed lighting errors with Sodium.

## 1.2.0

 - Added water-sensitive check for items and light sources.
   - Added data item tag `#lambdynlights:water_sensitive` which lists every item which can't light up in the water.
   - Added an option to enable/disable the feature
 - Updated [SpruceUI] to 1.5.6 to fix latest snapshots issues.
 - Added "early/WIP" compatibility with [Canvas Renderer].
   - Added a warning message about performance issues.
 - Fixed a crash with [Sodium] rc7 with smooth lighting set to HIGH.

### 1.2.1

 - Added TNT dynamic lighting.
 - Added lighting options for TNT and Creepers.
 - Added luminance value to Fire charge item.
 - Updated [SpruceUI] to 1.5.8
 - Fixed player dynamic lighting not getting tracked when changing dimensions.

### 1.2.2

 - Changed video options dynamic lighting button to redirect to LambDynamicLights settings.
 - Fixed random crash.

## 1.3.0

 - Added Simplified Chinese translations.
 - Added German translations.
 - Added Mexican Spanish translations ([#13](https://github.com/LambdAurora/LambDynamicLights/pull/13)).
 - Added Polish translations ([#15](https://github.com/LambdAurora/LambDynamicLights/pull/15)).
 - Added Russian translations ([#9](https://github.com/LambdAurora/LambDynamicLights/pull/9)).
 - Added spectral arrow as item emitting light ([#17](https://github.com/LambdAurora/LambDynamicLights/pull/17)).
 - Added dynamic lighting on glowing entities ([#17](https://github.com/LambdAurora/LambDynamicLights/pull/17)).
 - Updated to Minecraft 1.16.2
 - Updated [SpruceUI] to 1.6.2.
 - Fixed dynamic lighting update issues at chunk borders ([#12](https://github.com/LambdAurora/LambDynamicLights/issues/12)).
 - Fixed water-sensitive items lighting up in water on dedicated servers. ([#3](https://github.com/LambdAurora/LambDynamicLights/issues/3))
    - Added new JSON API to add item luminance and water-sensitivity through resource packs.
    - Added `DynamicLightHandler#isWaterSensitive` to make some entities water-sensitive like the blaze.
 - Fixed incompatibility with future [Sodium] versions. ([#6](https://github.com/LambdAurora/LambDynamicLights/issues/6))

### 1.3.1

 - Fixed entity lighting issue with [Sodium] 0.1.0. ([#23](https://github.com/LambdAurora/LambDynamicLights/issues/23))

### 1.3.2

 - Added entity lighting capabilities to minecarts.
 - Added `DynamicLightsInitializer` and `dynamiclights` entrypoint.
 - Added Brazilian Portuguese translations.
 - Added Estonian translations.
 - Added Hindi translations.
 - Added Turkish translations.
 - Updated French translations.
 - Fixed memory leak in dynamic light source tracking. ([#30](https://github.com/LambdAurora/LambDynamicLights/issues/30))

### 1.3.3

 - Added Italian translations ([#40](https://github.com/LambdAurora/LambDynamicLights/pull/40)).
 - Optimized dynamic lighting update methods.
 - Fixed crash when leaving world with some minimaps mods. ([#37](https://github.com/LambdAurora/LambDynamicLights/issues/37), [#41](https://github.com/LambdAurora/LambDynamicLights/issues/41))
 - Fixed crash with Immersive Portals ([#39](https://github.com/LambdAurora/LambDynamicLights/issues/39)).
 - Updated [SpruceUI], and Fabric API dependencies.

### 1.3.4

 - Fix ghost dynamic light source ([#47](https://github.com/LambdAurora/LambDynamicLights/issues/47)).
 - Fix missing background in settings screen.
 - Updated [SpruceUI].

[SpruceUI]: https://github.com/LambdAurora/SpruceUI "SpruceUI page"
[Sodium]: https://modrinth.com/mod/sodium "Sodium Modrinth page"
[Canvas Renderer]: https://www.curseforge.com/minecraft/mc-mods/canvas-renderer "Canvas Renderer CurseForge page"