text:
---
permalink: getting-started-with-glusterfs-considerations-and-installation/
audit_date:
title: Get started with GlusterFS - considerations and installation
type: article
created_date: '2014-08-14'
created_by: Marcin Stangel
last_modified_date: '2016-01-15'
last_modified_by: Stephanie Fillmon
product: Cloud Servers
product_url: cloud-servers
---

Before you start to use GlusterFS, you have to make a fundamental decision: what type of volumes do you need for your environment. The following methods are used most often to achieve different results:

		Volume type
		Description

		Replicated
		This type of volume provides file replication across multiple bricks. It is the best choice for environments where high availability and high reliability are critical, and when you want to self-mount the volume on every node, such as with a web server document root (the GlusterFS nodes are their own clients).

		Files are copied to each brick in the volume, similar to a RAID-1. However, you can have 3 or more bricks or an odd number of bricks; usable space is the size of one brick, and all files written to one brick are replicated to all others. This type works well if you are going to self-mount the GlusterFS volume, for example as the web server document root (/var/www) or similar where all files must reside on that node. The value passed to replica is the same number of nodes in the volume.

		In type of volume, files are distributed across replicated bricks in the volume. You can use this type of volume in environments where the requirement is to scale storage and have high availability. Volumes of this type also offer improved read performance in most environments, and are the most common type of volumes used when clients are external to the GlusterFS nodes themselves.

		Distributed-Replicated
		Somewhat like a RAID-10, an even number of bricks must be used; usable space is the size of the combined bricks passed to the replica value. For example, if there are 4 bricks of 20 GB and you pass replica 2 to the creation, your files are distributed to 2 nodes (40 GB) and replicated to 2 nodes. With 6 bricks of 20 GB and replica 3, your files are distributed to 3 nodes (60 GB) and replicated to 3 nodes, but if you used replica 2, they are would distributed to 2 nodes (40 GB) and replicated to 4 nodes in pairs. This distribution and replication woul be used when your clients are external to the cluster, not local self-mounts.

All the fundamental work in this document is the same except for the one step where the volume is created with the **replica** keyword. Using striped-based volumes is not covered.

### Prerequisites

- Two or more servers with separate storage
- A private network between servers

### Build setup

The build described in this document uses the following setup. Using Cloud Block Storage devices is no different than using VMware vDisks, SAN/DAS LUNs, iSCSI, and so on.

- Four I/O optimized Rackspace Cloud server images with a 20 GB /dev/xvde partition ready to use for each brick
- One Cloud Private Network on <IP_ADDRESS>/24 for GlusterFS communication
- GlusterFS 3.5.0 installed from the vendor package repository

### Preparing the servers

Perform the following configuration and installations to prepare the servers.

1. Configure **`/etc/hosts`** and **`iptables/`**
2. Install base toolsets
3. Install GlusterFS software
4. Connect GlusterFS nodes

#### Configure /etc/hosts and iptables/

Instead of using DNS, prepare **`/etc/hosts`** on every server and ensure that the servers can communicate with each other. All servers have the name glusterN as a host name, so use glusN for the private communication layer between servers.

    # vi /etc/hosts
	<IP_ADDRESS>  glus1
	<IP_ADDRESS>  glus2
	<IP_ADDRESS>  glus3
	<IP_ADDRESS>  glus4

	# ping -c2 glus1; ping -c2 glus2;  ping -c2 glus3;  ping -c2 glus4

**Red Hat**

    # vi /etc/sysconfig/iptables
    -A INPUT -s <IP_ADDRESS>/24 -j ACCEPT

    # service iptables restart

**Granular setup for iptables**

The preceding generic iptables rule opens all ports to the subnet. If a more granular setup is required, use the following values:

- **111** - portmap/rpcbind
- **24007** - GlusterFS Daemon
- **24008** - GlusterFS Management
- **38465** to **38467** - Required for GlusterFS NFS service
- **24009** to **+X** - GlusterFS versions earlier than 3.4
- **49152** to **+X** - GlusterFS versions 3.4 and later

Each brick for every volume on the host requires its own port. For every new brick, one new port will be used starting at **24009** for GlusterFS versions earlier than 3.4 and **49152** for version 3.4 and later.

For example, if you have one volume with two bricks, you must open 24009-24010 or 49152-49153.

#### Install packages

Run the commands in this section to perform the following steps:

1.	Install the basic packages for partitioning, LVM2 and XFS
2.	Install the GlusterFS repository and GlusterFS packages
3.	Disable automatic updates of Gluster packages

Some of the required packages might already be installed on the cluster nodes.

**YUM/RPM**

    yum -y install parted lvm2 xfsprogs
    wget -P /etc/yum.repos.d
    http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo
    yum -y install glusterfs glusterfs-fuse glusterfs-server

**Ubuntu**

The default Ubuntu repository has glusterfs 3.4.2 installed. Use the following code to install 3.5.1:

    apt-get install lvm2 xfsprogs python-software-properties
    add-apt-repository ppa:semiosis/ubuntu-glusterfs-3.5
    apt-get update
    apt-get install glusterfs-server

Use the following commands to ensure that the gluster* packages are filtered out of automatic updates. Upgrades while it's running can crash the bricks (on at least the upgrade from 3.5.0 to 3.5.1).

    grep ^exclude /etc/yum.conf
    exclude=kernel* gluster*

**Ubuntu**

    apt-mark hold glusterfs*

#### Prepare the bricks

Run the commands in this section to perform the following steps:

1.	Partition block devices
2.	Create LVM foundation
3.	Prepare volume bricks

The underlying bricks are a standard file system and mount point. However, be sure to mount each brick in such a way so as to discourage any use from changing to the directory and writing to the underlying bricks themselves.

The bricks must be unique per node, and there should be a directory within the mount point to use in volume creation. Attempting to create a replicated volume by using the top-level of the mount points results in an error with instructions to use a subdirectory.

**All nodes**

    parted -s -- /dev/xvde mktable gpt
    parted -s -- /dev/xvde mkpart primary 2048s 100%
    parted -s -- /dev/xvde set 1 lvm on
    partx -a /dev/xvde
    pvcreate /dev/xvde1
    vgcreate vgglus1 /dev/xvde1
    lvcreate -l 100%VG -n gbrick1 vgglus1
    mkfs.xfs -i size=512 /dev/vgglus1/gbrick1
    echo '/dev/vgglus1/gbrick1 /var/lib/gvol0 xfs inode64,nobarrier 0 0' >> /etc/fstab
    mkdir /var/lib/gvol0
    mount /var/lib/gvol0

-  glus1

        mkdir /var/lib/gvol0/brick1

-  glus2

        mkdir /var/lib/gvol0/brick2

-  glus3

        mkdir /var/lib/gvol0/brick3

-  glus4

        mkdir /var/lib/gvol0/brick4

### Set up GlusterFS

Use the steps below to run the GlusterFS setup.

#### Start the glusterfsd daemon

The daemon can also be restarted at run time:

**Red Hat**

    service glusterd start
    chkconfig glusterd on

### Build a peer group

A peer group is known as a *trusted storage pool* in GlusterFS.

-  glus1

       gluster peer probe glus2
       gluster peer probe glus3
       gluster peer probe glus4
       gluster peer status

-  glus2

       gluster peer probe glus1
       gluster peer probe glus3
       gluster peer probe glus4
       gluster peer status1

-  glus3

       gluster peer probe glus1
       gluster peer probe glus2
       gluster peer probe glus4
       gluster peer status

-  glus4
       gluster peer probe glus1
       gluster peer probe glus2
       gluster peer probe glus3
       gluster peer status

Now you can verify the status of your node and the gluster server pool:

    [root@gluster1 ~]# gluster pool list
    UUID	                				Hostname	State
    734aea4c-fc4f-4971-ba3d-37bd5d9c35b8	glus4   	Connected
    d5c9e064-c06f-44d9-bf60-bae5fc881e16	glus3   	Connected
    57027f23-bdf2-4a95-8eb6-ff9f936dc31e	glus2   	Connected
    e64c5148-8942-4065-9654-169e20ed6f20	localhost	Connected

### Create the volume

By default, glusterd NFS allows global read/write during volume creation, so you should set up basic authorization restrictions to only the private subnet. glusterd automatically starts NFSd on each server and exports the volume through it from each of the nodes. The reason for this behavior is that to use the native client (FUSE) for mounting the volume on clients, the clients have to run exactly the same version of GlusterFS packages. If the versions are different, there might be differences in the hashing algorithms used by servers and clients, and the clients won't be able to connect.

#### Replicated volume

This example creates replication to all four nodes; each node contains a copy of all data and the size of the volume is the size of a single brick. Note that the output shows `1 x 4 = 4`.

**One node only**:

     gluster volume create gvol0 replica 4 transport tcp \
     glus1:/var/lib/gvol0/brick1 \
     glus2:/var/lib/gvol0/brick2 \
     glus3:/var/lib/gvol0/brick3 \
     glus4:/var/lib/gvol0/brick4
     gluster volume set gvol0 auth.allow 192.168.3.*
     gluster volume set gvol0 nfs.disable off
     gluster volume set gvol0 nfs.addr-namelookup off
     gluster volume set gvol0 nfs.export-volumes on
     gluster volume set gvol0 nfs.rpc-auth-allow 192.168.3.*
     gluster volume start gvol0

    [root@gluster1 ~]# gluster volume info gvol0
    Volume Name: gvol0
    Type: Replicate
    Volume ID: 65ece3b3-a4dc-43f8-9b0f-9f39c7202640
    Status: Started
    Number of Bricks: 1 x 4 = 4
    Transport-type: tcp
    Bricks:
    Brick1: glus1:/var/lib/gvol0/brick1
    Brick2: glus2:/var/lib/gvol0/brick2
    Brick3: glus3:/var/lib/gvol0/brick3
    Brick4: glus4:/var/lib/gvol0/brick4
    Options Reconfigured:
    nfs.rpc-auth-allow: 192.168.3.*
    nfs.export-volumes: on
    nfs.addr-namelookup: off
    nfs.disable: off
    auth.allow: 192.168.3.*

#### Distributed-Replicated volume

This example creates distributed replication to 2x2 nodes; each pair of nodes contains the data and the size of the volume is the size of two bricks. Note that the output shows `2 x 2 = 4`.

### Delete the volume

After you ensure that no clients (either local or remote) are mounting the volume, you can stop the volume and delete it as follows:

    gluster volume stop gvol0
    gluster volume delete gvol0

#### Clearing bricks

If bricks are used in a volume and they need to be removed, you can use the following methods.

GlusterFS set an attribute on the brick subdirectories. Clear this attribute, and then the bricks can be reused.

-  glus1:

      setfattr -x trusted.glusterfs.volume-id /var/lib/gvol0/brick1/
      setfattr -x trusted.gfid /var/lib/gvol0/brick1
      rm -rf /var/lib/gvol0/brick1/.glusterfs

-  glus2:

      setfattr -x trusted.glusterfs.volume-id /var/lib/gvol0/brick2/
      setfattr -x trusted.gfid /var/lib/gvol0/brick2
      rm -rf /var/lib/gvol0/brick2/.glusterfs

-  glus3:

      setfattr -x trusted.glusterfs.volume-id /var/lib/gvol0/brick3/
      setfattr -x trusted.gfid /var/lib/gvol0/brick2
      rm -rf /var/lib/gvol0/brick3/.glusterfs

-  glus4:

      setfattr -x trusted.glusterfs.volume-id /var/lib/gvol0/brick4/
      setfattr -x trusted.gfid /var/lib/gvol0/brick2
      rm -rf /var/lib/gvol0/brick4/.glusterfs

Alternatively, you can delete the subdirectories and then re-create them.

-  glus1

      rm -rf /var/lib/gvol0/brick1
      mkdir /var/lib/gvol0/brick1

-  glus2:

      rm -rf /var/lib/gvol0/brick2
      mkdir /var/lib/gvol0/brick2

-  glus3:

      rm -rf /var/lib/gvol0/brick3
      mkdir /var/lib/gvol0/brick3

-  glus4:

      rm -rf /var/lib/gvol0/brick4
      mkdir /var/lib/gvol0/brick4

### Add bricks

You can add more bricks to a running volume, as follows:

    gluster add-brick gvol0 gluster5:/var/lib/gvol0/brick5

The `add-brick` command can also be used to change the layout of your volume; for example, to change a two-node Distributed volume into a four-node Distributed-Replicated volume.  New files will be automatically created on the new nodes, but the old ones will not get moved.

    gluster volume add-brick gvol0 replica 2 \
    gluster5:/var/lib/gvol0/brick5 ;
    gluster6:/var/lib/gvol0/brick6
    gluster rebalance gvol0 start
    gluster rebalance gvol0 status

    ## If needed (something didn't work right)
    gluster rebalance gvol0 stop

### Volume options

To view configured volume options, run the following command:

    gluster volume info gvol0

Following is example output:

    Volume Name: gvol0
    Type: Replicate
    Volume ID: bcbfc645-ebf9-4f83-b9f0-2a36d0b1f6e3
    Status: Started
    Number of Bricks: 1 x 4 = 4
    Transport-type: tcp
    Bricks:
    Brick1: glus1:/var/lib/gvol0/brick1
    Brick2: glus2:/var/lib/gvol0/brick2
    Brick3: glus3:/var/lib/gvol0/brick3
    Brick4: glus4:/var/lib/gvol0/brick4
    Options Reconfigured:
    performance.cache-size:<PHONE_NUMBER>
    performance.io-thread-count: 64
    cluster.choose-local: on
    nfs.rpc-auth-allow: 192.168.3.*
    nfs.export-volumes: on
    nfs.addr-namelookup: off
    nfs.disable: off
    auth.allow: 192.168.3.*

To set an option for a volume, use the **set** keyword, as follows:

    gluster volume set gvol0 performance.write-behind off
    volume set: success

To clear an option to a volume back to the default, use the **reset** keyword as follows:

    gluster volume reset gvol0 performance.read-ahead
    volume reset: success: reset volume successful

### Client mounts

From a client perspective, the GlusterFS volume can be mounted in the following ways:

- FUSE client
- NFS client

#### FUSE client

The FUSE client allows the mount to happen with a GlusterFS "round robin" style connection. In **/etc/fstab**, the name of one node is used; however, internal mechanisms allow that node to fail, and the clients will roll over to other connected nodes in the trusted storage pool. The performance is slightly slower than the NFS method based on tests, but not drastically so. The gain is automatic HA client failover, which is typically worth the effect on performance.

**RPM**:

    wget -P /etc/yum.repos.d
    http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo
    yum -y install glusterfs glusterfs-fuse

**Ubuntu**:

glusterfs-client 3.4.2 works with glusterfs-server 3.5.1, but for the most recent version, use the following code:

    add-apt-repository ppa:semiosis/ubuntu-glusterfs-3.5
    apt-get update
    apt-get install glusterfs-client

**Common**:

    vi /etc/hosts
    <IP_ADDRESS>  glus1
    <IP_ADDRESS>  glus2
    <IP_ADDRESS>  glus3
    <IP_ADDRESS>  glus4

    modprobe fuse
    echo 'glus1:/gvol0 /mnt/gluster/gvol0 glusterfs defaults_netdev 0 0' >> /etc/fstab
    mkdir -p /mnt/gluster/gvol0
    mount /mnt/gluster/gvol0

#### NFS client

The standard Linux NFSv3 client tools are used to mount one of the GlusterFS nodes. The performance is typically a little better than when using the FUSE client. However, the disadvantage of using this client is that the connection is 1-to-1. If the GlusterFS node fails, the client will not round-robin out to another node. A different solution must be added, such as HAProxy/keepalived or a load balancer,  to provide a floating IP proxy.

**RPM based**:

    yum -y install rpcbind nfs-utils
    service rpcbind restart; chkconfig rpcbind on
    service nfslock restart; chkconfig on

**Ubuntu**:

    apt-get install nfs-common

**Common:**

    echo 'glus1:/repvol1 /mnt/gluster/gvol0 nfs rsize=4096,wsize=4096,hard,intr 0 0' >> /etc/fstab
    mkdir -p /mnt/gluster/gvol0
    mount /mnt/gluster/gvol0

### References

- http://www.sohailriaz.com/glusterfs-howto-on-centos-6-x/
- http://kaivanov.blogspot.com/2012/07/deploying-glusterfs.html
- http://joejulian.name/blog/glusterfs-path-or-a-prefix-of-it-is-already-part-of-a-volume/
- http://www.jamescoyle.net/how-to/457-glusterfs-firewall-rules

###Next Article

[GlusterFS Troubleshooting](/how-to/glusterfs-troubleshooting)

repository: OSSSP/rackspace-how-to

repo_name: OSSSP/rackspace-how-to


text:
# Delving Media Library

Utilities for media manipulation

## LICENSE

This project is licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html)

## CHANGELOG

### 23.03.2013 - 1.0-SNAPSHOT

- initial release

repository: delving/media-lib

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: delving/media-lib


text:
## What ?
This repository is holding configurations related to creation of ElasticSearch Filebeat BOSH release

## Why ?
To provide latest version of ElasticSearch Filebeat in the context of BOSH release

## How ?
In order to complete the task which should provide latest version of ElasticSearch Filebeat
there are a few conditions that should be satisfied:
1. You have to have a configured local BOSH client
2. A file called `private.yml` under directory `config` with the following structure:
    ```
    ---
    blobstore:
      options:
         access_key_id: <access-key-id-required-to-push-new-blob-to-its-s3-bucket>
         secret_access_key: <secret-access-key-required-to-push-new-blob-to-its-s3-bucket>
   ```
3. Check which is the latest available version
4. Export required AWS credentials which will give access to blobstore in the current working directory:
    ```
   export AWS_ACCESS_KEY_ID=<value>
   export AWS_SECRET_ACCESS_KEY=<value>
   export AWS_DEFAULT_REGION=<value>
   ```

Once all of the above steps are completed we could execute `upgrade-blob.sh <VERSION>` script which will download the version of filebeat blob which we pass as input.

The script will also replace the old blob version with the new one and will copy it into blobs directory.

After that it will execute `bosh upload-blobs` which will send the new version to remote blobstore and immediately after that will update the files(`packaging` & `spec`) inside `packages/filebeat`

license: MIT

repository: bosh-rebels/filebeat-boshrelease

gha_license_id: MIT

repo_name: bosh-rebels/filebeat-boshrelease


text:
# ComicReaderApp_MVI_Coroutine_RxKotlin
Comic reader app 📘. Learning MVVM / MVI with RxKotlin, Retrofit, Kotlin Coroutines

# Project features 🚀
This project brings to the table set of best practices, tools, and solutions:

-   100% [Kotlin](https://kotlinlang.org/)
-   Kotlin Coroutines with Flow
-   Functional & Reactive programming with [RxKotlin](https://github.com/ReactiveX/RxKotlin), [RxJava3](https://github.com/ReactiveX/RxJava)
-   Clean Architecture with MVI (Uni-directional data flow)
-   [Λrrow - Functional companion to Kotlin's Standard Library](https://arrow-kt.io/)
       - [Either](https://arrow-kt.io/docs/apidocs/arrow-core/arrow.core/-either/)
       - [Option](https://arrow-kt.io/docs/apidocs/arrow-core/arrow.core/-option/)
       - [parZip](https://arrow-kt.io/docs/fx/async/#parzip)
-   Modern architecture (Clean Architecture, Model-View-ViewModel)
-   Navigation, single-activity architecture with [Jetpack Navigation](https://developer.android.com/guide/navigation)
-   Initialize components at application startup with [AndroidX Startup](https://developer.android.com/topic/libraries/app-startup)
-   Cache local data with [Room Persistence Library](https://developer.android.com/topic/libraries/architecture/room)
-   Schedule tasks with [WorkManager](https://developer.android.com/topic/libraries/architecture/workmanager)
-   ViewModel, LiveData, Lifecycle, ... with [Android Jetpack](https://developer.android.com/jetpack)
-   Dependency injection [Koin](https://insert-koin.io/)
-   Material Design [Material Components for Android](https://github.com/material-components/material-components-android)
-   Kotlin Gradle DSL
-   Firebase: Firestore, Authentication, Storage, Analytics, Crashlytics
-   Gradle Kotlin DSL, Custom plugin

## Download APK

[Download latest debug APK here](https://nightly.link/hoc081098/ComicReaderApp_MVI_Coroutine_RxKotlin_Jetpack/workflows/build/master/app-debug.zip)

# Develop
- You must use **Android Studio Arctic Fox (2020.3.1)** (**note: Java 11 is now the minimum version required**)
- Clone: `git clone https://github.com/hoc081098/ComicReaderApp_MVI_Coroutine_RxKotlin.git`
- _Optional: **Delete `.idea` folder** if cannot open project_
- Open project by `Android Studio` and run as usual

# Screenshots

|                         |                         |                         |                         |
|        :---:            |          :---:          |        :---:            |          :---:          |
| ![](screenshots/1.jpeg) | ![](screenshots/2.jpeg) | ![](screenshots/3.jpeg) | ![](screenshots/4.jpeg) |
| ![](screenshots/5.jpeg) | ![](screenshots/6.jpeg) | ![](screenshots/7.jpeg) | ![](screenshots/8.jpeg) |
| ![](screenshots/9.jpeg) | ![](screenshots/10.png) | ![](screenshots/11.png) | ![](screenshots/12.png) |
| ![](screenshots/13.png) | ![](screenshots/14.png) | ![](screenshots/15.png) |                         |

# LOC

```sh
--------------------------------------------------------------------------------
 Language             Files        Lines        Blank      Comment         Code
--------------------------------------------------------------------------------
 Kotlin                 159        15144         1759          636        12749
 XML                     95         5182          465           80         4637
 JSON                     3          117            0            0          117
 Prolog                   7          116           16            0          100
 Markdown                 1           74           12            0           62
 Batch                    1           84           23            0           61
--------------------------------------------------------------------------------
 Total                  266        20717         2275          716        17726
--------------------------------------------------------------------------------
```

# Server and API

Clone this repository: https://github.com/hoc081098/comic_app_server_nodejs

# License

    MIT License

    Copyright (c) 2019-2021 Petrus Nguyễn Thái Học


text:
#CLImate Data for the Environment Services application Client (CLIDEsc)

**CliDEsc** is a web-based open source platform containing tools that allow end users to request data and products to be generated from the **CLIDE** ([CLImate Data for the Environment](http://www.bom.gov.au/climate/pacific/about-clide.shtml)) database.

[CLIDE](http://www.bom.gov.au/climate/pacific/about-clide.shtml) is a PostGRES database dedicated to the storage and management of hydroclimatic data. CLIDE has been originally developed by the Bureau of Meteorology.

Climate data analysis and visualisation tools ('services') in CliDEsc are developed in R and Python.
This repository contains the Python component of CLIDEsc, including a module that provides the interface to the CLIDE database, utilities function
to perform common tasks (e.g. calculate monthly statistics from daily or sub-daily data) and self-contained example python scripts that implement
climate services.

repository: nicolasfauchereau/clidesc

repo_name: nicolasfauchereau/clidesc


text:
---
date: '2018-05-14'
title: 'Production Engineering Fellow'
company: 'MLH & Facebook'
location: 'Boston, MA'
range: 'June 2021 - Present'
url: 'https://fellowship.mlh.io/programs/production-engineering'
---

- Selected from over 10,000 applicants for joint software and systems engineering program with Facebook
- Administered, configured, and upgraded Linux systems to efficiently build and manage a production Linux infrastructure with Bash scripting
- Set up VPS and CI/CD to monitor applications in production, considering memory management, latency, and response times

branch_name: refs/heads/main


text:
### Description:

*A description of the issue*

### Versions

Package version: `x.x.x`
Node version: `x.x.x`

### Affects:
- [] Windows
- [] Linux
- [] MacOS

### Examples

*Any examples of code which cause the issue and/or a stack trace would be helpful*

### Any other information

*Any other information which would eb helpful for finding the issue*

gha_language: JavaScript


text:
# Asynchronous Programming with Promises and Async/Await

This repo contains small exercises to get more accustom with two ways of dealing with asynchronous code in JavaScript: Promises and the new Async/Await syntax.

This repo contains four big chapters:

- [Chapter 0 - The Event Loop](#chapter-0---the-event-loop)
- [Chapter 1 - Callbacks](#chapter-1---callbacks)
- [Chapter 2 - Promises](#chapter-2---promises9)
- [Chapter 3 - Async/Await](#chapter-3---asyncawait)

Each chapter contains exercises and questions which will walk you threw the journey from callbacks to Promises and Async/Await.

## Chapter 0 - The Event Loop

Before everything, we need to talk about JavaScript's asynchronous model, or how does asynchronous programming work in JavaScript.

The most important question we will answer: **Is JavaScript an asynchronous programming language?**

### JavaScript as a language

We all heard about [EcmaScript](https://www.ecma-international.org/ecma-262/8.0/index.html) right (or in its other forms: *ES5*, *ES6*, *ES2015* etc.)? EcmaScript is the standard which describes how the language should look and work. This is a very big document which contains every tiny little detail about the language: how objects intereact, what functions they should contain and how they should work etc.. This official document is written so that future JavaScript engines know how to be built.

We all heard of JavaScript engines like: Chrome's [V8](https://developers.google.com/v8), Microsoft's [ChakraCore](https://github.com/Microsoft/ChakraCore) or Mozilla's [SpiderMonkey](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey). These engines all follow the [EcmaScript](https://www.ecma-international.org/ecma-262/8.0/index.html) standard.

A JavaScript engine has two important internal parts:

![JavaScript Engine](./assets/JS_engine.png)

- **Heap**: is the engine's memory where objects, functions etc. get allocated and managed
- **Call Stack**: because JavaScript is single threaded, it can do only one thing at a time. The call stack manages how functions get executed, in a *LIFO* kind of fashion.

For funsies, let's open the [EcmaScript standard](https://www.ecma-international.org/ecma-262/8.0/index.html) and search for a very common function like: `setTimeout`. It should be there, right?
No - we will not find that function in the document. Why you ask? The answer is pretty simple. JavaScript as a language, is a synchronous programming language. However, besides JavaScript engines there is another player we need to talk about, and that player is: **JavaScript Runtimes**.

A JavaScript runtime is a higher layer over the JavaScript engine which provides extra functionality like libraries, event loops etc. A few examples of runtimes are: Browsers (Chrome, Firefox etc.), NodeJS. A runtime may implement any engine it chooses. This is where the event loop is found, in the JavaScript runtime.

### What is the event loop?

The Event Loop is a runtime level implementation which offers asyncrhonous code running abilities:

![Event Loop Representation](./assets/JS_Runtime.png)

## Chapter 1 - Callbacks
**Callbacks** are the most *low level*ish way of handling asynchonous code. A callback is a function passed as an argument to another function. The power of this pattern kicks in when combined with an asynchronous function:

```javascript
function foo(callback) {
	setTimeout(() => {
		callback()
	}, 1000);
}
```

### Error handling
We can also use callbacks to handle errors:

```javascript
function hello(success, failure) {
	setTimeout(() => {
		const chance = Math.ceil(Math.random() * 2);

		if (chance == 2) {
			success()
		} else {
			failure();
		}
	});
}

const succ = () => console.log('yay!');
const failure = () => console.log('I should not play the Loto');

hello(succ, failure);
```

Solution example 2

	function all(callback, arr) {
	    let counter = 0;
	    arr.forEach(fn => fn(() => counter++));

	    const interval = setInterval(() => {
	      if (counter === arr.length) {
		   clearInterval(interval);
		   callback();
	      }
	    }, 250);
	}

	const fn1 = cb => setTimeout(() => {
	   cb();
	}, 1000);

	const fn2 = cb => setTimeout(() => {
	   cb();
	}, 1000);

	all(() => console.log('done'), [fn1, fn2]);

## Chapter 2 - Promises[[9]](https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules)

What will be the output and why?

```javascript
console.log('script start');

setTimeout(function() {
  console.log('setTimeout');
}, 0);

Promise.resolve().then(function() {
  console.log('promise1');
}).then(function() {
  console.log('promise2');
});

console.log('script end');
```

Explanation

With Promises there came a new way of executing async code called: **Microtask**. This new concept was needed because Promises can guarantee an order of execution even though they are asynchronous. This means that the event loop has another queue for scheduling these kind of microtasks. The main difference between a **task** and a **microtask** is that a task different actions can happen between them. After a task is run, the next task can only pushed to the call stack only if nothing else in mid-execution or the call stack is empty and ready to take in another task.

With **microtasks** however, they have a **priority** over tasks. If a microtask was queued, it will run before taking in any tasks. Even more, microtasks are processed as long as there are any on the microstack queue. This means that microstack processing can cause a block on the thread as long as you keep schedule them.

This can be better explained through these two examples:

#### Infinite task creating is non-blocking

```javascript
function createTask() {
	console.log('new task');
	setTimeout(createTask);
}

createTask(0);
```

#### Infinite microtask creaking blocks the main thread

```javascript
function createMicrotask() {
	console.log()
	Promise.resolve().then(createMicrotask);
}

createMicrotask();
```

### The Event Loop with Microtasks

![JavaScript Runtime Event Loop with Microtasks](./assets/JS_Runtime_with_Promises.png)

## Chapter 3 - Async/Await

This new syntax was first introduced in [ES2017[12]](https://www.ecma-international.org/ecma-262/8.0/#sec-async-function-definitions). We now have two main players for writting asyncrhonous functions:

- [`async function() {}`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
	this will create an `AsyncFunction` which returns a `Promise`.
- [`await`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
	the `await` keyword can only be used inside an `async function` (exceptions like [Chrome's DevTools](https://bugs.chromium.org/p/chromium/issues/detail?id=658558)).

### Error handling

```javascript
const fn = async () => Promise.reject('err');

async function foo() {
   try {
     fn();
   } catch(e) {
     console.log(e);
   }
}

foo();

// err
```
## Bibliography:
1. [Eloquent JavaScript - Chapter 11: Asynchronous Programming](https://eloquentjavascript.net/11_async.html)
2. [MDN - Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
3. [MDN - async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
4. [JSConf EU 2014 - Philip Roberts: What the heck is the event loop anyway?](https://www.youtube.com/watch?v=8aGhZQkoFbQ)
5. [Message Queue Wiki](https://en.wikipedia.org/wiki/Message_queue)
6. [MDN - Concurrency model and Event Loop](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop)
7. [Alexander Zlatkov - How JavaScript works: an overview of the engine, the runtime, and the call stack](https://blog.sessionstack.com/how-does-javascript-actually-work-part-1-b0bacc073cf)
8. [How JavaScript Works: Event Loop and the rist of Async Programming](https://blog.sessionstack.com/how-javascript-works-event-loop-and-the-rise-of-async-programming-5-ways-to-better-coding-with-2f077c4438b5)
9. [Jake Archibald - Tasks, microtasks, queues and schedules](https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/)
10. [Jake Archibald: In The Loop - JSConf.Asia 2018](https://www.youtube.com/watch?v=cCOL7MC4Pl0)
11. [Async/Await TC39](https://github.com/tc39/ecmascript-asyncawait)
12. [ECMAScript® 2017 Language Specification (ECMA-262, 8th edition, June 2017)](https://www.ecma-international.org/ecma-262/8.0/#sec-async-function-definitions)

repository: andrei-cacio/async-javascript

repo_name: andrei-cacio/async-javascript


text:
Project
================================================================================

## RIGHT NOW

* add “cancel” buttons to confirmation dialogs for memberships and supply links
* add “admin” checkbox for adding new members
* add delete buttons for various resources (where should they go?)

## UP NEXT

* clean up partials (move to appropriate folders)
* place orders
  user: selects company
  page: hides company select, displays item search + empty order form

  user: searches for item name, selects from autocomplete
  page: resets item seach form, prepends item entry to order form

  user: clicks "remove" on item in order form
  page: removes item

  user: submits order
  page: accepts order, displays confirmation, notifies supplier

  In raw HTML, we have an order form with separate fields each representing a single OrderItem...

## LATER

* rename `Company#users` to `Company#members`
* Routes: duplicate URLs with `as: ''`?
* [Override High Voltage controller][hv]
  * TODO shows landing page if no `current_user`
  * TODO shows dashboard if logged in
* implement garber-irish DOM-ready javascript

### Reevaluate design

* TODO company code validation rules
* TODO invoice number formatting rules
* TODO referential integrity, e.g., for when a user wants to remove an
       item which was referenced in previous orders (and is thus blocked)

### Orders Schema

Have a status: open, modified (pending confirmation), confirmed, delivered, flagged (for review)

* define cascading **tiers** of users to be notified of pending orders

|         | purchaser        | supplier                                        |
| ------- | ---------------- | ----------------------------------------------- |
| create  | yes (record who) | no                                              |
| read    | yes              | yes                                             |
| update  | update/dispute   | confirm/apply-discount/downsize/resolve-dispute |
| destroy | cancel           | no                                              |

#### Database Tables

1. Orders
   * `supplier`
   * `purchaser`
   * `placed_by`
   * `accepted_by`
   * `invoice_no`
   * `discount`
   * `discount_type`
   * `notes`
2. LineItems
   * `order`
   * `item`
   * `qty`
   * `price`
   * `total`
   * `comped`
   * `qty_disputed`

Meta-Work
================================================================================

## TODO UML Diagrams

### Resources

  * https://www.simple-talk.com/sql/sql-tools/automatically-creating-uml-database-diagrams-for-sql-server/
  * http://www.agiledata.org/essays/umlDataModelingProfile.html
  * http://zbz5.net/sequence-diagrams-vim-and-plantuml
  * http://agilemodeling.com/artifacts/crcModel.htm
  * http://agilemodeling.com/artifacts/classDiagram.htm

---

[hv]: https://github.com/thoughtbot/high_voltage#override

repository: Sihui/bodega

repo_name: Sihui/bodega


text:
# dart:convert

External links:

- [Converters and Codecs](https://www.dartlang.org/articles/converters-and-codecs/)

---

API Reference: [dart:convert library](https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-convert)

---

Encoders and decoders for converting between different data representations,
including JSON and UTF-8.

In addition to converters for common data representations, this library
provides support for implementing converters in a way which makes them easy to
chain and to use with streams.

The `dart:convert` library works in both web apps and command-line apps.
To use it:

    import 'dart:convert';

Two commonly used converters are the top-level instances of
[JsonCodec] and [Utf8Codec], named JSON and UTF8, respectively.

JSON is a simple text format for representing
structured objects and collections.
The JSON encoder/decoder transforms between strings and
object structures, such as lists and maps, using the JSON format.

UTF-8 is a common variable-width encoding that can represent
every character in the Unicode character set.
The UTF-8 encoder/decoder transforms between Strings and bytes.

Converters are often used with streams
to transform the data that comes through the stream
as it becomes available.
The following code uses two converters.
The first is a UTF-8 decoder, which converts the data from bytes to UTF-8
as it's read from a file,
The second is an instance of [LineSplitter],
which splits the data on newline boundaries.

    int lineNumber = 1;
    Stream<List<int>> stream = new File('quotes.txt').openRead();

    stream.transform(UTF8.decoder)
          .transform(const LineSplitter())
          .listen((line) {
            if (showLineNumbers) {
              stdout.write('${lineNumber++} ');
            }
            stdout.writeln(line);
          });

See the documentation for the [Codec] and [Converter] classes
for information about creating your own converters.

repository: dartlang-italia/dart-libraries-samples

repo_name: dartlang-italia/dart-libraries-samples


text:
# lcls-live

Tools for setting up the LCLS live model.

## EPICS proxy

This is to facilitate caching of EPICS values and offline usage. Basic usage:

```python
from LCLS.epics import epics_proxy
epics = epics_proxy('data/epics_cache.json')

val = epics.caget('some_pv_name')

vals = epics.caget_many(['pv', 'name', 'list'])
```

## LCLS devices

See examples

repository: Tubbz-alt/lcls-live

repo_name: Tubbz-alt/lcls-live


text:
## The WAX RNG Native Blockchain Service

- Is open source and is a blockchain-native service that developers can easily integrate into their dApps.
- Is based on the [Signidice algorithm](https://github.com/gluk256/misc/blob/master/rng4ethereum/signidice.md) and RSA verification. Signidice was chosen for its excellent randomization and non-gameablity characteristics, in addition to yielding a cleaner workflow for dApp developers and being provably fair. RSA verification ensures uniqueness of the signature and removes the ability for the results to be manipulated (if any other type of signing algorithm were used, it would allow many valid signatures for the same signing_value which could result in manipulation).
- Can easily be established as provably fair. The self-verifying WAX RNG Native Blockchain Service confirms that the RSA signature that comes back from the WAX RNG oracle is valid and authentic before being utilized by the dApp. When dApp customers can easily establish fairness, they have a higher degree of confidence in using the dApp.

For more information, check out the WAX [blog](https://wax.io/blog/how-the-wax-rng-smart-contract-solves-common-problems-for-dapp-developers).

### Building the smart contract and its unit tests

- Requirements
    - docker, installed and configured to run without sudo
    - make

- Build and test
    ```console

    # Build the smart contract
    make docker-build

    # Run tests
    npm install
    npm run test
    ```

### Register bandwidth payer

WAX RNG allows dapps to pay for their own bandwidth, which can prevent your dapp from losing service during times of high activity on the rng contract. In the future, WAX will reduce the free bandwidth available for dapps, so it is a good idea to migrate to this to ensure your dapp is always up with respect to random number generation.

1. create new permission name `paybw` and delegate it to `oracle.wax@rngops`

```bash
cleos set account permission payer111111 paybw '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"oracle.wax","permission":"rngops"},"weight":1}]}' -p payer111111
```

2. Allow `paybw` permission to call `boost.wax` `noop`

```bash
cleos set action permission payer111111 boost.wax noop paybw
```

3. Dapp register for bandwith payer

```bash
cleos push action orng.wax setbwpayer '["dapp11111111", "payer111111"]' -p dapp11111111
```

4. Payer accept to pay bandwidth

```bash
cleos push action orng.wax acceptbwpay '["dapp11111111", "payer111111", true]' -p payer111111
```

### Register for error messages log

WAX RNG support developer to record error message to smart contract. Dapp need to delegate permission for oracle.wax, and has RAM to pay for store error message.

1. create new permission name `ornglog` and delegate it to `oracle.wax@rngops`

```bash
cleos set account permission dapp11111111 ornglog '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"oracle.wax","permission":"rngops"},"weight":1}]}' -p dapp11111111
```

2. Allow `ornglog` permission to call `orng.wax` `dapperror`

```bash
cleos set action permission dapp11111111 orng.wax dapperror ornglog
```

3. Set error log size

Last N error message will be stored on smart contract table

```bash
cleos push action orng.wax seterrorsize '["dapp11111111", 10]' -p dapp11111111
```

4. Check for error message

Check table `errorlog.a` with scope is dapp contract name

```bash
cleos get table orng.wax dapp11111111 errorlog.a
```

### License
[MIT](https://github.com/worldwide-asset-exchange/wax-orng/blob/master/LICENSE)

repository: worldwide-asset-exchange/wax-orng

branch_name: refs/heads/develop

repo_name: worldwide-asset-exchange/wax-orng


text:
---
permalink: '/lost-at-sea/'
title:  'Lost at Sea'
type: Reflection
date: 2021-10-26
tags:
  - Life Updates
  - Capitalism
---

For over ten years, I've had some semblance of direction, stewarding the ship of my life towards achieving financial security. Not knowing where this might manifest, I followed every lead I could, searching for a paycheck like a drug dog sniffs luggage. Good work, [capitalism](/tags/capitalism).

Thirteen years of work and plenty of good luck have helped fill my coffers—food is on the table, rent is covered, and my future contains a decent degree of financial certainty. I'm extraordinarily grateful for this, as my circumstances have allowed me to take a break from my career as a freelance web developer while I pursue different passions.

Transitioning from the career I've had for over a decade has been disorienting, as I've found myself with a paradoxical sense of uncertainty in my newfound certainty.

My uncertainty reminds me of Chuck Noland, the protagonist played by Tom Hanks in the 2000 film [Cast Away](https://en.wikipedia.org/wiki/Cast_Away). In the movie, Noland becomes stranded on an island for four years following a plane crash. He maintains some degree of sanity by remembering his girlfriend, befriending a volleyball, and safeguarding a washed-up package he refuses to open. Upon his rescue, Noland learns that the world has moved on without him, assuming his death following the crash. His girlfriend is married and has a child, he no longer has his volleyball, and he delivers the safeguarded package to its intended recipient. [^1]

[^1]: For a quick overview of Cast Away and the ending, I recommend watching [this](https://www.youtube.com/watch?v=4dbAKmozCAI).

Stripped of what made life meaningful before and after the crash, Noland reaches a crossroads—unsure where to go and what to do.

With the driving force behind many actions in my life obviated, Noland's predicament resonates.

Having boundless enthusiasm and interests makes this transition easier. I'm grateful that I have so many areas where I enjoy spending time. Still, I struggle to avoid a state of ennui, lost on the stranded island of my brain as the motivations fueling my actions fade in and out of view.

{% include type/question.html, content: 'What propels me towards action?
Towards what end am I taking action, if any?
Do my actions need an "end"?' %}

All I can do is continue charting my path forward. I will use this time to explore different facets of my being, spend time with people I love, and continue learning and growing.

I'm excited to see where life takes me.

gha_language: SCSS


text:
---
title: Roslyn analyzers for sagas
summary: Details of the Roslyn analyzers that promote code quality in sagas.
component: Core
versions: '[7.7,)'
reviewed: 2022-03-04
---

Starting in NServiceBus version 7.7, [Roslyn analyzers](https://docs.microsoft.com/en-us/visualstudio/code-quality/roslyn-analyzers-overview) are packaged with the NServiceBus package that analyze the code in sagas and make suggestions for improvements, directly in the editor.

## Non-mapping expression used in ConfigureHowToFindSaga method

* **Rule ID**: NSB0003
* **Severity**: Warning, Error starting in NServiceBus version 8
* **Example message**: The ConfigureHowToFindSaga method should only contain mapping expressions (i.e. 'mapper.MapSaga().ToMessage<T>()') and not contain any other logic.

The `ConfigureHowToFindSaga` method is executed to determine the mappings between incoming messages and stored saga data. Arbitrary statements or calls to other methods, while they may be valid C#, are not valid in this method.

See [message correlation](/nservicebus/sagas/message-correlation.md) for details of how to map incoming messages to stored saga data.

## Saga mapping expressions can be simplified

* **Rule ID**: NSB0004, NSB0018
* **Severity**: Warning (NSB0004), Info (NSB0018)
* **Example message**: The saga mapping contains multiple .ToSaga(…) expressions which can be simplified using mapper.MapSaga(…).ToMessage<T>(…) syntax.

The original NServiceBus saga mapping API required repeating the `.ToSaga(…)` expressions for each call to `.ConfigureMapping(…)`.

The IDE will raise a diagnostic for mapping expressions like this:

snippet: SagaAnalyzerComplexMapping

The analyzer will also offer a code fix that will automatically rewrite the code to look like this:

snippet: SagaAnalyzerSimplifiedMapping

The simplified syntax removes duplication and reduces confusion since the `.ToSaga(…)` mappings in the old syntax must match in order to be valid.

The diagnostics NSB0004 and NSB0018 are the same, but with different severity in different contexts. When only one mapping expression exists, there is no duplication, so NSB0018 is presented at level Info. When two or more mapping expressions exist, duplication is now present, so NSB0004 is presented as a Warning.

## Saga can only define a single correlation property on the saga data

* **Rule ID**: NSB0005
* **Severity**: Error
* **Example message**: The saga can only map the correlation ID to one property on the saga data class.

When using the `.ConfigureMapping<T>(…).ToSaga(…)` mapping pattern, all of the `.ToSaga(…)` expressions must agree and point to the same property on the saga data class.

This was a runtime error in NServiceBus 7.6 and below, but the analyzer raises the error as more direct feedback at compile time.

Once all the `.ToSaga(…)` expressions agree, [NSB0004: Saga mapping expressions can be simplified](#saga-mapping-expressions-can-be-simplified) will be invoked, and the code fix can be used to simplify the saga mapping expression so that `.ToSaga(…)` mappings are not duplicated.

## Message that starts the saga does not have a message mapping

* **Rule ID**: NSB0006
* **Severity**: Warning, Error starting in NServiceBus version 8
* **Example message**: Saga MySaga implements `IAmStartedByMessages<MyMessage>` but does not provide a mapping for that message type. In the ConfigureHowToFindSaga method, after calling `mapper.MapSaga(saga => saga.CorrelationPropertyName)`, add `.ToMessage<MyMessage>(msg => msg.PropertyName)` to map a message property to the saga correlation ID, or `.ToMessageHeader<MyMessage>("HeaderName")` to map a header value that will contain the correlation ID.

A message type identified by `IAmStartedByMessages<TMessage>` means that that type of message can start the saga. Because there may not yet be any saga data when this message is received, a message identified in this way **must** have an associated message mapping in the `ConfigureHowToFindSaga()` method, otherwise it would be impossible to know if saga data had already been created.

The code fix will attempt to rewrite the `ConfigureHowToFindSaga()` method and generate the missing mapping. If the existing mapping expressions already identify a correlation id (i.e. `sagaData.OrderId`) and the message type being mapped has a property with a matching name (i.e. `message.OrderId`) then the mapping will automatically use that property name. Otherwise, the code fix will generate a mapping expression with placeholders to fill in.

## Saga data property is not writeable

* **Rule ID**: NSB0007
* **Severity**: Warning, Error starting in NServiceBus version 8
* **Example message**: Saga data property `MySagaData.MyProperty`does not have a public setter. This could interfere with loading saga data. Add a public setter.

Many saga persistence libraries use serialization and deserialization to store and load saga data, respectively. It's not always possible for serializers to set values unless the property is both marked as `public` and also has a `public` setter.

A saga data class is not a good place to employ specialized data access patterns to restrict write access to certain properties. Saga data classes should be considered as internal storage fully owned by the saga, and are best implemented as simple properties like `public string PropertyName { get; set; }` without any access modifiers.

## Saga message mappings are not needed for timeouts

* **Rule ID**: NSB0008
* **Severity**: Warning
* **Example message**: Message type `MyMessage` is mapped as `IHandleTimeouts<MyMessage>`, which do not require saga mapping because timeouts have the saga's Id embedded in the message. You can remove this mapping expression.

When sagas request timeouts, the delayed message is stamped with a header that includes the full saga ID. This enables the lookup of the correct saga data without requiring a mapping in the `ConfigureHowToFindSaga()` method. Removing the mapping will have no effect on the saga's ability to find the correct saga data when the timeout is processed, and it can be safely removed.

## A saga cannot use the Id property for a Correlation ID

* **Rule ID**: NSB0009
* **Severity**: Warning, Error starting in NServiceBus version 8
* **Example message**: A saga cannot map to the saga data's Id property, regardless of casing. Select a different property (such as OrderId, CustomerId) that relates all of the messages handled by this saga.

The `Id` property of a saga (defined by the required `IContainSagaData` interface) is reserved for use by the saga. It cannot be used as a correlation ID by mapping to it in the `ConfigureHowToFindSaga()` method.

In addition, some saga persistence libraries, such as [SQL Persistence](/persistence/sql/), store the saga's `Id` value in a column, and the column names are commonly case-insensitive. This means that other casings of `Id` (e.g. `ID`, `id`, or even `iD`) are also not allowed.

## Message types should not be used as saga data properties

* **Rule ID**: NSB0010
* **Severity**: Warning
* **Example message**: Using the message type `MyMessage` to store message contents in saga data is not recommended, as it creates unnecessary coupling between the structure of the message and the stored saga data, making both more difficult to evolve.

When a saga receives a message, it can be tempting to insert the whole message into the saga data.

However, this creates unintended coupling between the saga data and the message contract.

The saga data class is wholly owned and managed by the saga, and represents the internal stored state of that saga. It must be able to be stored to disk and reloaded perhaps minutes, hours, or even days/years later. I.e. it must be durable.

On the other hand, the message is more ephemeral. It only needs to be stable long enough to deal with any messages currently in-flight at the time a new version of a software system is released. Its ownership is different, and needs to be able to change over time.

By storing a message type inside the saga data, the ephemeral message structure must be locked down by the same rules as the saga data, making it harder for the saga and the other message endpoints it exchanges messages with to evolve.

## Correlation ID property must be a supported type

* **Rule ID**: NSB0011
* **Severity**: Error
* **Example message**: A saga correlation property must be one of the following types: string, Guid, long, ulong, int, uint, short, ushort

The correlation property represents the logical identity of the stored saga data. It needs to be something easily represented by nearly every saga persistence library. For example, `DateTime` is a bad correlation property type, because it is represented differently on different storage systems, such as between relational SQL tables and NoSQL databases, or even in different amounts of precision in fractions of a second that are stored between different relational database systems.

Prior to NServiceBus version 7.7, this check was a runtime error. In NServiceBus version 7.7 and above, the analyzer diagnostic raises this feedback at compile time.

## Saga data classes should inherit ContainSagaData

* **Rule ID**: NSB0012
* **Severity**: Warning
* **Example message**: It's easier to inherit the class ContainSagaData, which contains all the necessary properties to implement IContainSagaData, than to implement IContainSagaData directly.

The generic class constraints on `Saga<TSagaData>` require the saga data class to implement the `IContainSagaData` interface, which specifies properties required by the saga infrastructure. However, it is much easier to directly inherit `ContainSagaData`, which already specifies these properties.

A benefit to inheriting the `ContainSagaData` class is that in NServiceBus version 7 and above, the implemented properties are decorated with `[EditorBrowsable(EditorBrowsableState.Never)]`, which means that those properties that are _only_ needed by the saga infrastructure will not appear in IntelliSense. So it is less likely that one of these reserved properties will be used accidentally.

One exception comes when [using NHibernate's `[RowVersion]` attribute to control optimistic concurrency](/persistence/nhibernate/saga-concurrency.md#custom-behavior-explicit-version). This attribute is not compatible with derived classes. In this case the saga data class must implement `IContainSagaData` directly. For this scenario, the `NSB0012` diagnostic can be suppressed to remove the warning.

## Reply in Saga should be ReplyToOriginator

* **Rule ID**: NSB0013
* **Severity**: Info
* **Example message**: In a Saga, context.Reply() will reply to the sender of the immediate message, which isn't common. To reply to the message that started the saga, use the saga's ReplyToOriginator() method.

Using `context.Reply(…)` in a message handler is fairly common, but it is less common (and can be confusing) when used in a saga.

Calling `.Reply(…)` always replies to the immediate message. Imagine a saga is started by `Msg1`, which sends `DoSomething` to an external handler, and that handler replies with a `DoSomethingResponse`. If the saga calls `context.Reply(…)` within the handler for `DoSomethingResponse`, the reply will be sent to the handler that processed `DoSomething`.

More often, a reply in a saga should instead use `.ReplyToOriginator(…)`. In the example above, this will go to the endpoint that originally sent the `Msg1` to start the saga, which is most often the desired effect when used in a saga.

## Saga should not have intermediate base class

* **Rule ID**: NSB0014
* **Severity**: Warning
* **Example message**: A saga should not have an intermediate base class and should inherit directly from NServiceBus.Saga<TSagaData>.

Sagas should not use a base class (i.e. `MySaga : MyAbstractSaga<TSagaData>`) to provide shared functionality to multiple saga types. While this may work for sagas using [Learning Persistence](/persistence/learning/), some persistence libraries such as [SQL Persistence](/persistence/sql/) are unable to generate database scripts when sagas are constructed in this way.

A better way to provide shared functionality to multiple saga types and reduce code duplication is to use [extension methods](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods).

## Saga should not implement IHandleSagaNotFound

* **Rule ID**: NSB0015
* **Severity**: Warning, Error starting in NServiceBus version 8
* **Example message**: A saga should not implement IHandleSagaNotFound, as this catch-all handler will handle messages where *any* saga is not found. Implement IHandleSagaNotFound on a separate class instead.

A ["saga not found" handler](/nservicebus/sagas/saga-not-found.md) provides a way to deal with messages that are not allowed to start a saga but cannot find existing saga data.

"Saga not found" handlers operate on all saga messages within an endpoint, no matter which saga the message was originally bound for. So it is misleading to implement `IHandleSagaNotFound` on a saga because it creates the impression that it will only handle not found messages for that _specific_ saga, which is false.

Instead, implement `IHandleSagaNotFound` on an independent class.

## Correlation property must match message mapping expression type

* **Rule ID**: NSB0016
* **Severity**: Error
* **Example message**: When mapping a message to a saga, the member type on the message and the saga property must match. `MySagaData.CorrelationProperty` is of type `string` and `MyMessage.CorrelationProperty` is of type `int`.

When mapping incoming message properties to the saga's correlation property, these must be of the same type or they can't be compared.

When the correlation value can be expressed in different ways, it's best to represent the saga's correlation ID as a string. Individual message mapping expressions can format incoming values of other types into a string to match the saga's correlation value, such as this example where one message type contains the value as a `Guid`:

snippet: SagaAnalyzerToMessageStringExpressions

When using [nullable reference types](https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references), the nullability of the values also matters. A saga data class containing a nullable `string?` can accept a non-nullable `string` from a message, because the `string?` is more permissive than non-nullable `string`. However, the reverse is not true and will trigger the diagnostic.

## ToSaga mapping must point to a property

* **Rule ID**: NSB0017
* **Severity**: Error
* **Example message**: Mapping expressions for saga members must point to properties.

The "to saga" expression argument of the `MapSaga(…)` or `ToSaga(…)` methods must point directly to a property. Mapping to a field or to an expression is not valid.

Mapping directly to a property is **valid**:

snippet: SagaAnalyzerToSagaPropertyOk

Mapping to a field or an arbitrary expression is **invalid**:

snippet: SagaAnalyzerToSagaFieldNotOk

Mapping to an arbitrary expression is also **invalid**:

snippet: SagaAnalyzerToSagaExpressionNotOk

gha_language: C#

gha_license_id: NOASSERTION


text:
---
title: "Yamhill Street Vacant Property"
date: "2015-12-03"
cover: /assets/policing.png
logo: /assets/agency/gresham-pd-logo.png
author: "Officer James Leake"
agencyid: "gresham-pd"
agency: "Gresham Police Department"
categories:
  - "Policing"
tags:
  - "Abandoned Property"
  - "Chronic Nuisance"
  - "Homeless"
  - "Quality of Life"
  - "Transients"
subTitle: "Partnering with Code Enforcement and the landowners, NET was able to successfully address illegal camping on a vacant lot."
---

## ![Problem Icon](https://github.com/google/material-design-icons/raw/master/alert/1x_web/ic_error_outline_black_48dp.png "Problem") Problem

#### PROBLEMATIC BEHAVIOR OR ACTIVITY

In 2014, the Neighborhood Enforcement Team (NET) at Gresham PD received complaints about people camping on a property at SE Yamhill St. The property was a vacant lot with a large lake and tree area that the local transient population began living on. Code Enforcement helped NET find the owners contact information. The owners of each of the adjoining properties informed NET that they wanted the trespassers moved and they would press charges if necessary. NET notified the transients and many of them left. However, in the summer of 2015, the transient population in Gresham exploded. Many people returned to the property on SE Yamhill St and the debris, garbage and junk began to accumulate.

#### IMPACT ON THE COMMUNITY

NET continued to receive complaints from neighbors about the garbage and presence of transients on the property. The owners of the property were unhappy and were inclined to press trespassing charges. The quality of life for neighbors and the nearby community was impacted and people did not feel safe with such activity in their neighborhood.

## ![Solution Icon](https://github.com/google/material-design-icons/raw/master/action/1x_web/ic_lightbulb_outline_black_48dp.png "Solution") Solution

#### PROGRAM DESCRIPTION

NET contacted the property owners and was told that another person was buying the land. The new owner wanted a relationship with the Neighborhood Enforcement Team and asked NET to work with him to clean up the property. In November 2015, NET went to the property and notified all of the campers that they had 24 hours to vacate the premises, per the new owner or they would be arrested. Surprisingly, the transients complied. The new owner brought in heavy equipment and scooped up the garbage and had it hauled away. He brought in large equipment and had all the blackberry bushes removed so there was a clear line of sight from Yamhill St to the back of the property to the south. The owner also brought a barge out to the lake and collected all the trash that had been thrown over the bank into the lake. The new owner posted No Trespassing signs and re-enforced the fences around the property and the gate.

#### FUNDING

The owner of the property was responsible for all cleanup efforts.

## ![Outcome Icon](https://github.com/google/material-design-icons/raw/master/action/1x_web/ic_view_list_black_48dp.png "Outcome") Outcome

#### PROGRAM IMPACT

The before and after photos show the real story of the combined efforts of Code, NET and the property owner.

#### CRITICAL SUCCESS FACTORS

The cooperation of the new landowner and his willingness to partner with NET was critical to the success of this project.

#### LESSONS LEARNED

Solicit the assistance of your code enforcement team and get the landowners involved. The threat of arrest is not enough unless you have the support from the landowners.

#### ADDITIONAL DOCUMENTS

* [Yamhill Street Vacant Property Photos](./yamhill-vacant-prop-photos.pdf)

repository: alexpichel/okb

repo_name: alexpichel/okb


text:
# Changelog of `MusicManipulations`

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

This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

# 1.7.0

* New type `NamedNote`.

# 1.5.0
* Option `missingval` for `timeseries`.

# 1.4.0
* New function `repeat`.
* `combine` now works with `Vector{Vector{<:Note}}` as well.

# 1.3.0
* `translate, transpose, louden` now also work on single notes.

# 1.2.0
* New function `segment(notes)`.
* New option `segmented` in `timeseries`.

# 1.1.0
* New functions `timesort!` and `combine`.
# 1.0.0
Identical to 0.12.0.
# 0.12.0
* Removed the unicode symbols `▷, □, ◇`; it was a bad idea.
* Removed plotting functionality (`musescore / noteplotter`), and moved it to MusicVisualizations.jl

# 0.11.0
* new function `removepitches`
# 0.10.0
* The extention of `+` and `-` for `Notes` that was introduced in version 0.8 has now been reverted. Instead, dedicated unicode symbols are now used, `▷, □, ◇`, se the docstrings of `translate, transpose, louden`.
* `timeseries` now has more options regarding how to record the data: it is now also possible to provide a function `f` that operates on the array of notes directly.
* performance improvements for `timeseries`.
* New function `relpos` that gives relative positions of notes.

# 0.9.0
* Add a heuristic so that the default behavior of `noteplotter` does not add all pitches into the y-axis ticks and labels.

# 0.8.2
* Bugfix of `noteplotter`.

# 0.8
* new functions `estimate_delay` and `estimate_delay_recursive`.
* Implemented `+` and `-` for `Notes` and `Int`. The operations are identical to `translate`.
* new function `noteplotter`, that comes into scope after `using PyPlot`. this is a full-featured plotting function to plot notes on a time grid. See its docstring for details, as well as the official documentation.
* Renamed `allowedpitches` to `filterpiches`.
* Added in-place methods for `translate` and `transpose`.

# v0.7
Rework and big improvement of the function `timeseries`. Firstly, now bins with missing entries get the Julia value `missing` instead of 0. In addition, now one can also get the timeserises of the positions of the data, using the property `:position`. This returns the timing deviations with respect to the corresponding entry in `tvec`. These numbers are also known as *microtiming deviations* in the literature. Finally, the `grid` argument is now mandatory.
See the updated documentation string for more.

# v0.6.2
* Improve fake note removal functionality for notes loaded from the TD-50 (function `rm_hihatfake` in `drums.jl`)

# v0.6.0
* Move to musescore 3

# v0.5.0
* Preliminary scale identification method (not exported)

# v0.4.0
* added drumkey for Musescore (its actually the GM)

# v0.3.0
* Printing/saving a `midi` or `notes` struct into a score is now possible through MuseScore.

# v0.2.0
* It is now possible to quantize the duration of notes as well!

# v0.1.0 - Initial Release
Changelog is kept with respect to this release.

gha_language: Julia


text:
---
published: true
title: Treetop (parser)
tags: ruby parser
---
> Treetop is a Ruby library that allows you to create parsers easily by describing them using a Parsing Expression Grammar (PEG). - [A quick intro](http://thingsaaronmade.com/blog/a-quick-intro-to-writing-a-parser-using-treetop.html)

## [Home](https://github.com/cjheath/treetop) (still alive)

- performance are good [compared to other](http://blog.absurd.li/2011/02/02/parslet_and_its_friends.html)

### Doc / Tutorials
- [A quick intro](http://thingsaaronmade.com/blog/a-quick-intro-to-writing-a-parser-using-treetop.html)
- [Turning a parse tree into an abstract syntax tree (AST)](https://stackoverflow.com/questions/24209732/turning-a-treetop-parse-tree-into-an-abstract-syntax-tree-ast)
	- [filtering parse tree to get an ast](https://groups.google.com/g/treetop-dev/c/8tzdfWxGY0k/m/YBdQu-hHmVUJ)
	  - [Treetop's Confusing Behavior](https://www.flydata.com/blog/treetops-confusing-behaviors/)
      - [class vs module](https://groups.google.com/g/treetop-dev/c/8tzdfWxGY0k/m/lYpiLh7ZC2QJ)
    	- use rule ( subrule1 / subrule2 ) \<class object\> see [1](https://groups.google.com/g/treetop-dev/c/8tzdfWxGY0k/m/i618WdSTO9sJ)
  		- treetop will inject several definition so using module is more general and adviced, see [2](https://groups.google.com/g/treetop-dev/c/8tzdfWxGY0k/m/dqrimyfUFckJ)

{% highlight ruby %}
rule foo; 	a <A_In_Foo> / b <B_In_Foo>; end

rule a; 	something <A>;	end

rule b;	something_else <B>; end
{% endhighlight %}

In the case where "foo" matches "something_else", the SyntaxNode for "something_else"
will have two mixed-in modules (both "B" and "B_In_Foo"). Use parentheses around a list
of alternates if you want to mix in the same module regardless of which possibility is matched.

- [Treetop: Typical Errors](https://whitequark.org/blog/2011/09/08/treetop-typical-errors/)
	- **error reporting à la clang**
    - Matching whitespaces
    - prevent AST squashing: use 1..1
- [Doc](http://cjheath.github.io/treetop/index.html)
  - [Semantic Interpretation](http://cjheath.github.io/treetop/semantic_interpretation.html)
      - Methods Available on [Treetop::Runtime::SyntaxNode](https://github.com/cjheath/treetop/blob/master/lib/treetop/runtime/syntax_node.rb)
      	- **elements** elements of the matched sequence
      - labels: for subexpression, like citrus
  - [Syntactic Recognition](http://cjheath.github.io/treetop/syntactic_recognition.html)
      - c like comment grammar
  - [keywords](https://stackoverflow.com/questions/32373050/treetop-boolean-logic-operations/32490728#32490728)
  	  - [Striping spaces in a SQL parser](https://groups.google.com/g/treetop-dev/c/viXM1S-q5m8/m/qSUjBzStGcEJ)
      - keywords must not be immediately followed by a symbol character. I use negative lookahead for this.
      - The top rule consumes leading whitespace, then almost every rule consumes following whitespace (this is my policy). You should test your grammar with minimum and maximum whitespace.
  - [Advanced Techniques](http://cjheath.github.io/treetop/pitfalls_and_advanced_techniques.html)
      - Matching a Keyword But Not Words Prefixed Therewith

- Debugging
	- [using in ruby](http://cjheath.github.io/treetop/using_in_ruby.html)
      - parser options: start from a different rule / continue
      - debugging option
      - AST guideline
  	- [Advanced Grammar debugging](https://stackoverflow.com/a/6109101/51386)
  		- Generating grammar, and instrumenting code

- [google groups (2018)](https://groups.google.com/g/treetop-dev)
	- [custom data for syntax node](https://groups.google.com/g/treetop-dev/c/m60jgGU-HeU) =>  his is a significant weakness in the design of Treetop.
I made a custom proxy for the "input" and attached my Context
to it. You might get away with doing something [similar](https://github.com/cjheath/activefacts-cql/blob/master/lib/activefacts/cql/parser.rb#L203-L249)

- Ruby Conference 2007 Treetop: Syntactic Analysis with Ruby by Nathan Sobo

[![caption](https://img.youtube.com/vi/v5tTDZSIVrg/0.jpg)](https://www.youtube.com/watch?v=v5tTDZSIVrg)

### Some treetop example
- Clifford Heath [CQL](https://github.com/cjheath/activefacts-cql)
- my sql grammar POC [sql](https://github.com/yduf/sql-treetop)
- [A “grue”some look at Statemachine and Treetop](http://matthewkwilliams.com/index.php/2008/09/05/a-gruesome-look-at-statemachine-and-treetop/)

### [Alternatives](https://www.ruby-forum.com/t/which-library-to-write-a-parser/215786/11)
- [parslet](http://kschiess.github.io/parslet/)
	- [compared to other](http://blog.absurd.li/2011/02/02/parslet_and_its_friends.html)
    - [Get started](http://kschiess.github.io/parslet/get-started.html)
    - [Stack Traces in Parslet](http://blog.absurd.li/2011/01/11/stack_traces_in_parslet.html)
- [whittle ?](https://github.com/d11wtq/whittle)
	- [Whittle: the new, powerful, easy-to-use Parser on the ruby block (all ruby, all the time, based on the LALR(1) algorithm)](https://www.reddit.com/r/ruby/comments/msgn9/whittle_the_new_powerful_easytouse_parser_on_the/)
- [rexical](https://github.com/tenderlove/rexical/tree/master) / [racc](https://github.com/ruby/racc/wiki)
	- example [sql-parser](https://github.com/kissmetrics/sql-parser)
    	- [sqlite-parser (js)](https://github.com/codeschool/sqlite-parser)

- [Why you should not use (f)lex, yacc and bison (ANTLR)](https://tomassetti.me/why-you-should-not-use-flex-yacc-and-bison/)


text:
# Deep Learning Specialization on Coursera
# Introduction

I took this coursera course to help me break into the AI field. There are five courses in this [specialization][courses].

  - [Neural Networks and Deep Learning][course1]
  - [Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization][course2]
  - [Structuring Machine Learning Projects][course3]
  - [Convolutional Neural Networks][course4]
  - [Sequence Models][course5]

This repository includes the course lecture notes, quiz solutions and Jupyter notebooks for each programming exercise.

# Build Environment for Neural Networks and Deep Learning

  - I created a Test Environment on my local PC to verify I could get the same results as the Jupityer Notebooks (Python 3)
    - Running Python 3.7.4 64-bit | QT 5.9.6 | PyQt5 5.9.2 | Windows 10
     - Used Anaconda /Spyder Python 3.7 IDE
    - Numpy version 1.16.5
    - Tensorflow 2.1.0
    - With this same build environment, one could successfully run [Logistic Regrssion Example][LogisticRegressionPy] with test cases

### Lecture Notes
   - [Course1: Neural Networks and Deep Learning][course1]
        - [Week 1: Introduction to deep learning][course1_week1_lectures]
        - [Week 2: Neural Networks Basics][course1_week2_lectures]
        - [Week 3:Shallow neural networks][course1_week3_lectures]
        - [Week 4: Deep Neural Networks][course1_week4_lectures]
    - [Course 2: Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization][course2]
        - [Week 5: Practical aspects of Deep Learning][course2_week5_lectures]
        - [Week 6: Optimization algorithms][course2_week6_lectures]
        - [Week 7: Hyperparameter tuning, Batch Normalization and Programming Frameworks][course2_week7_lectures]
    - [Course 3: Structuring Machine Learning Projects][course3]
        - [Week 8: ML Strategy (1)][course3_week8_lectures]
        - [Week 9: ML Strategy (2)][course3_week9_lectures]
    - [Course 4: Convolutional Neural Networks][course4]
       - [Week 10: Foundations of Convolutional Neural Networks][course4_week10_lectures]
       -  [Week 11: Deep convolutional models: case studies][course4_week11_lectures]
       -  [Week 12: Object detection][course4_week12_lectures]
       -  [Week 13: Special applications: Face recognition & Neural style transfer][course4_week13_lectures]

### Quiz
   - [Course1: Neural Networks and Deep Learning][course1]
        - [Week 1: Introduction to deep learning][course1_week1_quiz]
        - [Week 2: Neural Networks Basics][course1_week2_quiz]
        - [Week 3:Shallow neural networks][course1_week3_quiz]
        - [Week 4: Deep Neural Networks][course1_week4_quiz]
    - [Course 2: Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization][course2]
        - [Week 5: Practical aspects of Deep Learning][course2_week5_quiz]
        - [Week 6: Optimization algorithms][course2_week6_quiz]
        - [Week 7: Hyperparameter tuning, Batch Normalization and Programming Frameworks][course2_week7_lectures]
    - [Course 3: Structuring Machine Learning Projects][course3]
        - [Week 8: ML Strategy (1)][course3_week8_quiz]
        - [Week 9: ML Strategy (2)][course3_week9_quiz]
    - [Course 4: Convolutional Neural Networks][course4]
       - [Week 10: Foundations of Convolutional Neural Networks][course4_week10_quiz]
       -  [Week 11: Deep convolutional models: case studies][course4_week11_quiz]
       -  [Week 12: Object detection][course4_week12_quiz]
       -  [Week 13: Special applications: Face recognition & Neural style transfer][course4_week13_quiz]

### Programming Assignments
   - [Course1: Neural Networks and Deep Learning][course1]
        - [Week 2: Neural Networks Basics: Logistic Regression][course1_log_reg]
        - [Week 2: Neural Networks Basics: Python Basics][course1_python_basics]
        - [Week 3:Shallow neural networks: Planar Data Classification][course1_planar_data]
        - [Week 4: Deep Neural Networks: Building Deep Neural Network][course1_dn_sbs]
        - [Week 4: Deep Neural Networks: Deep Neural Network: Application][course1_dn]
    - [Course 2: Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization][course2]
        - [Week 5: Practical aspects of Deep Learning: Gradient Check][course2_week5_gradientcheck]
        - [Week 5: Practical aspects of Deep Learning: Init][course2_week5_initialization]
        - [Week 5: Practical aspects of Deep Learning: Reg][course2_week5_reg]
        - [Week 6: Optimization algorithms: Optimization][course2_week6_opt]
        - [Week 7: Hyperparameter tuning, Batch Normalization and Programming Frameworks: TF][course2_week7_tf]
    - [Course 3: Structuring Machine Learning Projects][course3]
    - [Course 4: Convolutional Neural Networks][course4]
       - [Week 10: Foundations of Convolutional Neural Networks - Conv Neural Network][course4_conv]
       -  [Week 11: Deep convolutional models: case studies - Res Networks][course4_res_nw]
       -  [Week 12: Object detection- Autonomous Vehicles ][course4_autonomous]
       -  [Week 13: Special applications: Face recognition & Neural style transfer- Art Generation][course4_art_gen]
       -  [Week 13: Special applications: Face recognition & Neural style transfer- Face Recognition][course4_face_recog]

License
----

MIT

**Free Software, Hell Yeah!**

[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)

   [courses]: <https://www.coursera.org/specializations/deep-learning?#courses>
   [course1]: <https://www.coursera.org/learn/neural-networks-deep-learning?specialization=deep-learning>
   [course2]: <https://www.coursera.org/learn/deep-neural-network?specialization=deep-learning>
   [course3]: <https://www.coursera.org/learn/machine-learning-projects?specialization=deep-learning>
   [course4]: <https://www.coursera.org/learn/convolutional-neural-networks?specialization=deep-learning>
   [course5]: <https://www.coursera.org/learn/nlp-sequence-models>
   [course1_week1_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Lectures/Week1>
   [course1_week2_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Lectures/Week2>
   [course1_week3_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Lectures/Week3>
   [course1_week4_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Lectures/Week4>
   [course1_week1_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Quizzes/Week1>
   [course1_week2_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Quizzes/Week2>
   [course1_week3_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Quizzes/Week3>
   [course1_week4_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/NeuralNetworksandDeepLearning/Quizzes/Week4>

   [course1_log_reg]:<https://github.com/nmazzilli3/deeplearning.ai/blob/master/NeuralNetworksandDeepLearning/Programming_Assignments/Week2/Logistic_Regression/Logistic_Regression_with_a_Neural_Network_mindset_v6a.ipynb>
   [course1_python_basics]:<https://github.com/nmazzilli3/deeplearning.ai/blob/master/NeuralNetworksandDeepLearning/Programming_Assignments/Week2/Python_Basics/Python_Basics_With_Numpy_v3a.ipynb>
   [course1_planar_data]:<https://github.com/nmazzilli3/deeplearning.ai/blob/master/NeuralNetworksandDeepLearning/Programming_Assignments/Week3/Planar_data_classification_with_onehidden_layer_v6c.ipynb>
   [course1_dn]:<https://github.com/nmazzilli3/deeplearning.ai/blob/master/NeuralNetworksandDeepLearning/Programming_Assignments/Week4/Image_Classification/Deep%20Neural%20Network%20-%20Application%20v8.ipynb>
   [course1_dn_sbs]:<https://github.com/nmazzilli3/deeplearning.ai/blob/master/NeuralNetworksandDeepLearning/Programming_Assignments/Week4/Deep_Neural_Step_By_Step/Building_your_Deep_Neural_Network_Step_by_Step_v8a.ipynb>

   [course2_week5_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ImprovingDeepNN/Lectures/Week5>
   [course2_week6_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ImprovingDeepNN/Lectures/Week6>
   [course2_week7_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ImprovingDeepNN/Lectures/Week7>
   [course2_week5_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ImprovingDeepNN/Quizzes/Week5>
   [course2_week6_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ImprovingDeepNN/Quizzes/Week6>
   [course2_week7_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ImprovingDeepNN/Quizzes/Week7>
   [course2_week5_gradientcheck]: <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ImprovingDeepNN/Programming_Assignments/Week5/Gradient_Checking/Gradient%20Checking%20v1.ipynb>
   [course2_week5_initialization]: <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ImprovingDeepNN/Programming_Assignments/Week5/Initialization/Initialization.ipynb>
   [course2_week5_reg]: <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ImprovingDeepNN/Programming_Assignments/Week5/Regularization/Regularization_v2a.ipynb>
   [course2_week6_opt]: <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ImprovingDeepNN/Programming_Assignments/Week6/Optimization_methods_v1b.ipynb>
   [course2_week7_tf]: <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ImprovingDeepNN/Programming_Assignments/Week7/TensorFlow_Tutorial_v3b.ipynb>

   [course3_week8_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/Structuring_ML_Projects/Lectures/Week8>
   [course3_week9_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/Structuring_ML_Projects/Lectures/Week9>
   [course3_week8_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/Structuring_ML_Projects/Quizzes/Week8>
   [course3_week9_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/Structuring_ML_Projects/Quizzes/Week9>

   [LogisticRegressionPy]: <https://github.com/nmazzilli3/deeplearning.ai/blob/master/NeuralNetworksandDeepLearning/Programming_Assignments/Week2/Logistic_Regression/logistic_regression.py>

   [course4_week10_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Lectures/Week10>
   [course4_week11_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Lectures/Week11>
   [course4_week12_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Lectures/Week12>
   [course4_week13_lectures]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Lectures/Week13>
   [course4_week10_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Quizzes/Week10>
   [course4_week11_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Quizzes/Week11>
   [course4_week12_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Quizzes/Week12>
   [course4_week13_quiz]:  <https://github.com/nmazzilli3/deeplearning.ai/tree/master/ConvolutionalNeuralNetworks/Quizzes/Week13>

   [course4_conv]:  <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ConvolutionalNeuralNetworks/Programming_Assignments/Week10/Convolution_model_Application_v1a.ipynb>

   [course4_res_nw]:  <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ConvolutionalNeuralNetworks/Programming_Assignments/Week11/Residual_Networks/Residual_Networks_v2a.ipynb>

   [course4_autonomous]:  <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ConvolutionalNeuralNetworks/Programming_Assignments/Week12/Autonomous_driving_application_Car_detection_v3a.ipynb>

   [course4_art_gen]:  <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ConvolutionalNeuralNetworks/Programming_Assignments/Week13/ArtGeneration/Art_Generation_with_Neural_Style_Transfer_v3a.ipynb>

   [course4_face_recog]:  <https://github.com/nmazzilli3/deeplearning.ai/blob/master/ConvolutionalNeuralNetworks/Programming_Assignments/Week13/FaceRecog/Face_Recognition_v3a.ipynb>

   <>
   [git-repo-url]: <https://github.com/nmazzilli3/deeplearning.ai>


text:
---
layout: post
title: "Reading List 5"
---

**Gosh, it has been some weeks already that I've published my last reading list. A new issue now.**

- **[Progressive Reduction](http://layervault.tumblr.com/post/42361566927/progressive-reduction)** is a nice UI technique focussing on reduction.

- **[Before you file an issue, please read this before](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md)** I am really hoping this will be regarded more often.

- **[responsive-nav.js](https://github.com/viljamis/responsive-nav.js)** by Viljami Salminen  its an UX approach of offering a simple and good usable navigation on different devices. [Check the demo to get an idea](http://viljamis.com/responsive-nav/).

- Object Oriented JavaScript – **[What you need to know](http://javascriptissexy.com/oop-in-javascript-what-you-need-to-know/)**

- Say what you want about measuring FPS in Chrome but this is more important: **[Measure FPS on Chrome for Android](http://ariya.ofilabs.com/2013/03/frame-rate-hud-on-chrome-for-android.html)**. Why? Because it gives you a lot of insights on how your website renders on mobile browsers which are really different from Desktop ones.

- **['Suit'](https://github.com/necolas/suit/)** – a simple UI framework for modern browsers by Nicolas Gallagher.

- I held a talk about **Responsive Images** in Lille at [TakeOff Conference](http://takeoffconf.com/) in January. **[Here is the video on YouTube](http://www.youtube.com/watch?v=pPOeg5WAhgw)** and [my slides](http://slides.anselm-hannemann.com/respimg-takeoff/).


text:
---
layout: default
---

# 1997-04-04 - Re: Book Recommendation: "Supermen" (about Cray, Norris, CDC, etc.)

## Header Data

From<EMAIL_ADDRESS>(Lloyd E Briggs)

To<EMAIL_ADDRESS>Message Hash: 12a11ba850ab10d4a83f5444c0c0246dbeba7f5986a0941453852313de2efbba

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-04-04 21:19:45 UTC

Raw Date: Fri, 4 Apr 1997 13:19:45 -0800 (PST)

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Lloyd E Briggs)
Date: Fri, 4 Apr 1997 13:19:45 -0800 (PST)
To<EMAIL_ADDRESS>Subject: Re: Book Recommendation: "Supermen" (about Cray, Norris, CDC, etc.)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

I would like to be removed from this mailing list please

On Thu, 03 Apr 97 19:24:05 EST<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)
writes:
>"Timothy C. May"<EMAIL_ADDRESS>writes:
>> Next came the vaunted 6600, after almost not being funded to
>completion. It
>> waws the first true supercomputer. Cray had moved his team up to
>Chippewa
>  ^^^^???
>
>I used to play with a 6600. It had some interesting hardware features:
>* It used one's complement rather than two's complement to represent
>negative
>integers. (I.e. -x is the same as not x; a pattern of all 1's is
>'-0'.)
>* It had 60-bit words for both integers and single-precision reals.
>A 120-bit double precision was pretty slow.  A word could contain
>several instructions, but only an instruction on a word boundary
>could be a target of a branch.
>
>---
>
>Dr.Dimitri Vulis KOTM
>Brighton Beach Boardwalk BBS, Forest Hills, N.Y.: +1-718-261-2013,
>14.4Kbps
>

{% endraw %}
```

## Thread

+ Return to [April 1997](/archive/1997/04)

+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to<EMAIL_ADDRESS>(Lloyd E Briggs)](/authors/nolegz_at_juno_com_lloyd_e_briggs_)"
+ Return to "[Toto <toto@sk.sympatico.ca>](/authors/toto_toto_at_sk_sympatico_ca_)"

+ _Unknown thread root_
  + 1997-04-04 (Thu, 3 Apr 1997 17:22:34 -0800 (PST)) - [Re: Book Recommendation: "Supermen" (about Cray, Norris, CDC, etc.)](/archive/1997/04/396f9e8f949b3a692cb9ab4a017227e3776d7b9c859dbf422bd9530774aae7d4) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
    + 1997-04-04 (Fri, 4 Apr 1997 13:19:45 -0800 (PST)) - Re: Book Recommendation: "Supermen" (about Cray, Norris, CDC, etc.) -<EMAIL_ADDRESS>(Lloyd E Briggs)_
    + 1997-04-05 (Fri, 4 Apr 1997 17:05:42 -0800 (PST)) - [Re: Book Recommendation: "Supermen" (about Cray, Norris, CDC, etc.)](/archive/1997/04/f0f1d41150016844f2e68183c9793f27cffdde0d93a1132ecc0eee23a8b49875) - _Toto<EMAIL_ADDRESS>