text:
+++
title = "Hazel types"
+++

The structure of Hazel packets is usually defined by the application, however there are some data types predefined by Hazel. This section goes over these basic building blocks, which are [Integers](#integers), [Packed Integers](#packed-integers), [Strings/Byte arrays](#strings-and-byte-arrays), and [Messages](#messages).

Reading and Writing packets is implemented in Hazel in the MessageReader and MessageWriter class respectively.

# Integers

The most common datatype in packets are integers. Multiple sizes are in use, ranging from a single 8-bit byte to 64-bit integers.
Integers are encoded in Little Endian byte order. This means that the least significant byte is put into the network first.

Floating points are encoded in a similar manner: the internal representation of a floating point, which is in IEEE 754 Single Precision format, is written as bytes onto the network.

# Packed Integers

Next to their normal 4-byte format, Hazel can also encode 32-bit integers in a usually more compact format called Packed Integers.
In this format, the most significant bit is used to indicate if another byte should be read, while the other 7 bits contain the actual value of the integer.

The following piece of C# code is used to read packed integers, the code to write them is similar:

The following piece of code is used by Hazel to [write](https://github.com/willardf/Hazel-Networking/blob/98d9f5d2c8664b19707907d1a7ca4863ec3e396a/Hazel/MessageWriter.cs#L302) and [read](https://github.com/willardf/Hazel-Networking/blob/98d9f5d2c8664b19707907d1a7ca4863ec3e396a/Hazel/MessageReader.cs#L393) packed integers, comments added for readability:

```cs
// Taken from Hazel source code, class MessageWriter.cs, licensed under MIT
// Comments added by AUWiki for readability
public void WritePacked(uint value)
{
    do
    {
        // Get the 8 lowest bits of the value
        byte b = (byte)(value & 0xFF);

        // Every value that's larger than 0x80 will need another byte, so set the continuation bit
        if (value >= 0x80)
        {
            b |= 0x80;
        }

        this.Write(b);

        // Because we've written the 7 least significant bits, we remove them from our value
        value >>= 7;
    } while (value > 0); // Continue until entire number is written
}
```

```cs
// Taken from Hazel source code, class MessageReader.cs, licensed under MIT
// Comments added by AUWiki for readability
public uint ReadPackedUInt32()
{
    bool readMore = true;
    int shift = 0; // Amount of bits each new byte will need to be bitshifted by.
    uint output = 0; // Final value

    // This true if a continuation bit was read in the last cycle, if true read another byte. Its initial value is true, so at least one byte is always read.
    while (readMore)
    {
        if (this.BytesRemaining < 1) throw new InvalidDataException($"Read length is longer than message length.");

        byte b = this.ReadByte();
        // Check if the continuation bit is set on this byte
        if (b >= 0x80)
        {
            readMore = true;
            // Remove the continuation bit from the byte
            b ^= 0x80;
        }
        else
        {
            readMore = false;
        }

        // Add the contents of this byte to the output
        output |= (uint)(b << shift);
        // The next byte will need to be shifted 7 bits further
        shift += 7;
    }

    return output;
}
```

Packed Integers allow integers of a wide varying size to be written in an on average more compact notation. The downside is that more bytes are used compared to encoding a fixed size integer if such a wide range of numbers is not possible.

There is also an signed integer variant, but its use in new designs cannot be recommended: due to how two's complement numbers work, the highest bit of a 32-bit number would be set if the number is negative, which means that all negative numbers would be encoded in 5 bytes, which is less efficient than when a 32-bit number was encoded directly.

# Strings and byte arrays

Strings and byte arrays usually consist of a packed 32-bit integer encoding the length of the following string/byte array in bytes, followed by the actual data of the string/byte array. It is expected that strings are valid UTF-8. It is also possible to read a certain amount of bytes without a length indicator, if this is constant or communicated in a different way.

# Messages

Messages are used in Hazel to introduce a level of nesting in packets. They have a length and a tag, which makes them useful for encoding for example, RPC numbers, system numbers and much more.

They start with an unsigned 16-bit integer that encodes the length of the data, then a byte that gives the tag of the message. The actual message then follows. Note that bytes used for the tag (and the length) are not included in the length of the message.


text:
# PRIVACY POLICY
## ABOUT THE APP
This app is a free game and must be used as is. This page describe the app needs and its functions.

## ABOUT DATA USAGE
This app doesn't collect, store or share any of your data.

## NEEDED INFORMATION AND PERMISSIONS
This app doesn't needs any of your information, in future I want to implement a Score based on Google Play, it will need your Google Account authorization, but nothing will be stored in our servers, just at Google servers. It will require the External Read/Write Permissions for store settings.

## SECURITY
As this app doesn't collect, store or share your data, it has no security leak.

license: MIT

repository: SalemLockwood/Flyther

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: SalemLockwood/Flyther


text:
+++
date = "2015-04-09T10:17:18+08:00"
tags = ["x", "y"]
title = "Installation Guide"
+++

Meteor is an ultra-simple environment for building modern web
applications.<!--more-->
## Quick Start

Install Meteor:

    curl https://install.meteor.com | /bin/sh

Create a project:

    meteor create try-meteor

Run it:

    cd try-meteor
    meteor

Deploy it to the world, for free:

    meteor deploy try-meteor.meteor.com

repository: sawima/kimablog

repo_name: sawima/kimablog


text:
---
title: "Call for volunteers for organizing regional communities"
excerpt: "Godot communities keep growing steadily around the world. As a result, in the past years, many local groups related to Godot usage and development have started to appear in different continents, countries and cities.
We now start a Regional Communities team to connect those groups together and give them better visibility on official Godot platforms."
categories: ["news"]
author: Juan Linietsky
image: /storage/app/uploads/public/5e1/0a0/456/5e10a04563669518301236.png
date: 2020-02-26 15:08:03
---

Godot communities keep growing steadily around the world. As a result, in the past years, many local groups related to Godot usage and development have started to appear in different continents, countries and cities.

Each of them usually has their own model and activities, but often suffer of visibility problems, as it is difficult for Godot users in those regions to know such groups exist and what they do.

## Connecting the communities

After much discussion, we decided it could be useful for them if we could keep track of what they do and publicize their existence and activities in our official channels. This way, nearby users can find about those groups and engage in their activities, or use other groups as models to create their own if none exists.

Additionally, having a better idea of where Godot communities are can make sure the project can help them in a more "official" way, from encouraging and helping them to participate in local gamedev events, to creating materials they can use for workshops and talks.

## Regional Communities team

Unfortunately, Godot as a project does not currently have enough experience or resources to be able to do this task, and the project management is too busy coordinating the engine development itself. Because of this, we came up with the idea to do a call for volunteers, hoping some experienced organizers may be willing to take on this task.

The plan is to form a **Regional Communities** team that can work together on these tasks. There are no rules on how this team will assign responsibilities to its members. As most things in Godot development, it will be up to the volunteers to discuss, agree and organize.

The Regional Communities team would be composed of organizers of regional communities, and any other contributor interested in helping with the meta-organization of all Godot communities.

To clarify, we'd like all existing regional communities organizers to join the Regional Communities team, if only to share information about your own community. And then we'd want some of the team members to help with any infrastructure, web development and communication work needed to make regional communities visible and efficient.

## Tasks

Our initial idea for tasks in the Regional Communities team would be:

* Reach out to all Godot communities around the world.
* Work with the admins to create a more centralized flow of information of what is going on. If activities happen in those communities, use our social networks to promote them.
* Work on a local map of communities and representatives, similar [to this one](https://www.gamedevmap.com/), that we can put in our [community page](https://godotengine.org/community).
* Make the [user groups](https://godotengine.org/community/user-groups/) page a more fancy portal, and help fill missing content.
* Investigate video game development events around the world, large or small. Some may require asking people from different regions. Contact the event organizers to propose them Godot talks, then see who from our community would be willing to speak at each event.
* Help local communities organize Godot events, game jams, workshops, etc.
* Help communities share materials they created for use by other communities.

## Volunteer profile

The project expects to find volunteers matching the following profile as best as possible:

* Always being nice, able to listen and able to express your views politely.
* Significant experience communicating with others, good social interaction skills and being a polite person.
* Having a significant understanding of the game development communities in general.
* Having some experience assisting game development events.

## Joining the team

To get the team started, we created a `#godotengine-regional` IRC channel on Freenode, where we invite everyone interested in this new Regional Communities team.

For those not already familiar with IRC, we suggest using the open source [Matrix](https://matrix.org/) communication platform (and its [Riot.im](https://riot.im) cross-platform client app) which is bridged with Freenode IRC, and lets you have persistent logs even when you're offline. Once connected on Matrix, you can join the bridged channel which is named `#freenode_#godotengine-regional:matrix.org`.

Eventually some motivated members of the Regional Communities team could look into ways to also bridge this channel with the official Discord server, to lower the entry barrier for all community managers.

From there, we can brainstorm together on additional tools that might be relevant to efficiently handle the team's tasks.

See you around in the Regional Communities channel!

repository: godotengine/godot-website

gha_language: HTML

gha_license_id: MIT

repo_name: godotengine/godot-website


text:
# Example: Basic

> How to use mp3-mediarecorder in a vanilla JS app

This example uses the UMD builds of `mp3-mediarecorder`.

## Run

To run this example serve this folder using any static http server, for example [serve](https://github.com/zeit/serve).

```shell
serve examples/basic
```


text:
# Kubernetes On Premise Cluster Implementation (Installation by Ansible).

Edit variables file according to your environment and network.
```
vim env_variables.yml
```

Edit hosts file with server IPs according to roles.
```
vim hosts.yml
```

Test connection to servers.
```
ansible all -m ping
```

Apply installation by Ansible.
```
ansible-playbook play/install.yml
```

# Kubernetes On Premise Cluster Implementation (Manual Installation).

Note: Our cluster consists of 6 nodes, 3 masters and 3 minions for Kubernetes.
Of the three master nodes, we divided into 1 master for Keepalived/GlusterFS and 2 slaves.

# keepalived
## Install Keepalived to balance K8s (Only Kubernetes masters nodes).

### In all K8s master nodes.
```
yum install keepalived -y (Todos os nós do Keepalived)
```

### Only in the master Keepalived node (One of the K8s masters).

vim  /etc/keepalived/keepalived.conf
```
! Configuration File for keepalived
global_defs {
  router_id LVS_DEVEL
}

vrrp_script check_apiserver {
  script "/etc/keepalived/check_apiserver.sh"
  interval 3
  weight -2
  fall 10
  rise 2
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 101
    authentication {
        auth_type PASS
        auth_pass pass@123
    }
    virtual_ipaddress {
        <IP_ADDRESS>
    }
    track_script {
        check_apiserver
    }
}
```

### Only in the slave Keepalived nodes (two of the K8s masters).
vim  /etc/keepalived/keepalived.conf
```
! Configuration File for keepalived
global_defs {
  router_id LVS_DEVEL
}

vrrp_script check_apiserver {
  script "/etc/keepalived/check_apiserver.sh"
  interval 3
  weight -2
  fall 10
  rise 2
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 51
    priority 100
    authentication {
        auth_type PASS
        auth_pass pass@123
    }
    virtual_ipaddress {
        <IP_ADDRESS>
    }
    track_script {
        check_apiserver
    }
}
```

### All Keepalived nodes (K8s masters).
vim /etc/keepalived/check_apiserver.sh
```
#!/bin/sh

errorExit() {
    echo "*** $*" 1>&2
    exit 1
}

curl --silent --max-time 2 --insecure https://localhost:6443/ -o /dev/null || errorExit "Error GET https://localhost:6443/"
if ip addr | grep -q <IP_ADDRESS>; then
    curl --silent --max-time 2 --insecure https://<IP_ADDRESS>:6443/ -o /dev/null || errorExit "Error GET https://<IP_ADDRESS>:6443/"
fi
```
```
chmod +x /etc/keepalived/check_apiserver.sh
```
```
systemctl restart keepalived
systemctl enable keepalived
```

# GlusterFS
## Installing GlusterFS for data replication (All K8s nodes).

Manually configure / etc / hosts for instances to communicate by name.
If possible, have specific IPs for GlusterFS communication.

Creating partition, VGs, LVs with full use of space.
```
pvcreate /dev/sdb1
vgcreate csmb_vg /dev/sdb1
lvcreate –l +100%FREE –n csmb_lv  csmb_vg
```

Formatting with xfs, create a directory for the mount point, mount and add to the fstab.
```
mkfs.xfs /dev/csmb_vg/csmb_lv
mkdir -p /gluster/csmb –p
mkdir -p /gluster/volume1
mount /dev/csmb_vg/csmb_lv /gluster/csmb/
echo “/dev/csmb_vg/csmb_lv   /gluster/csmb      xfs     defaults        0 0” >>/etc/fstab
```

GlusterFS instalation
```
yum install epel-release
yum install lvm2 system-storage-manager sg3_utils
yum install centos-release-gluster -y
yum –enablerepo=centos-gluster*-test install glusterfs-server
yum install glusterfs glusterfs-cli glusterfs-libs glusterfs-server glusterfs-fuse glusterfs-geo-replication
```

start and enable the gluster service.
```
systemctl start  glusterd.service
systemctl enable  glusterd.service
```

### In just one of us who will play the role of master.

Creating Pool(EX: master1 used as GlusteFS master).
```
gluster peer probe master2
gluster peer probe master3
gluster peer probe agent1
gluster peer probe agent2
gluster peer probe agent3
```

Creating the volumes
```
gluster --mode=script volume create volume1 replica 6 transport tcp master1:/gluster/volume1 agent1:/gluster/volume10agent2:/gluster/volume1 agent3:/gluster/volume1 master2:/gluster/volume1 master3:/gluster/volume1
```

### Mounting the file system (All K8s nodes).

Replace node1 by the name of each node.
```
mkdir /data

echo “node1:volume1  /data   glusterfs    default    0   0” >>/etc/fstab
mount -a
```

# Kubernetes
## Install and Set Up kubectl (All Kubernetes master nodes).

```
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/bin/kubectl

```

## Install kubeadm (All Kubernetes master nodes).

Ensure iptables tooling does not use the nftables backend
```
update-alternatives --set iptables /usr/sbin/iptables-legacy
```

Installing kubeadm, kubelet and kubectl
```
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF

# Set SELinux in permissive mode (effectively disabling it)
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

systemctl enable --now kubelet
```

Ensure net.bridge.bridge-nf-call-iptables is set to 1
```
cat <<EOF >  /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system
```

## Init Cluster HA (Only Kubernetes master1 node).

Initialize the control plane:
```
sudo kubeadm init --control-plane-endpoint "LOAD_BALANCER_DNS:LOAD_BALANCER_PORT" --upload-certs
```

Follow installation steps printed on the terminal.
```
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
```

Apply the CNI plugin of your choice.

Ex:
```
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
```

## Add more masternodes on cluster(Other two Kubernetes master nodes).

Master1 step output, Ex:
```
  kubeadm join <IP_ADDRESS>:6443 --token gbjbfk.ah6at0g95tytysnc \
    --discovery-token-ca-cert-hash sha256:555e6a732000a9c940a11d10b1390ae9afc613891a0c2dcd0da5c59db4259f63 \
    --control-plane --certificate-key cf662a43f18020fad29e228c2142cc08144785997b091ff01d8a82540c2a9075
```
Note: The command "kubeadm config images pull --v = 5" can be used to download images previously.

Review certificate if necessary "kubeadm init phase upload-certs --upload-certs", certificate valid for 2 hours.

## Add slave nodes on cluster:

Master1 step output, Ex:
```
kubeadm join <IP_ADDRESS>:6443 --token gbjbfk.ah6at0g95tytysnc \
    --discovery-token-ca-cert-hash sha256:555e6a732000a9c940a11d10b1390ae9afc613891a0c2dcd0da5c59db4259f63
```
Note: The command "kubeadm config images pull --v = 5" can be used to download images previously.

Review connection string on kubernetes masters for slaves "kubeadm token create --print-join-command".

## Deploying the Dashboard UI (Validating)
https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#deploying-the-dashboard-ui

```
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml
```

## Enable master to schedule pods (optional).
```
kubectl taint nodes --all node-role.kubernetes.io/master-
```

#######################################################
## References

Setup GlusterFS
 *     https://stato.blog.br/wordpress/
 * replicacao-de-dados-com-glusterfs/

Setup load balancer (keepalived)
 *     https://medium.com/velotio-perspectives/demystifying-high-availability-in-kubernetes-using-kubeadm-3d83ed8c458b

Installing kubeadm
 *     https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/

Init Cluster HA
 *     https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/

Installing kubectl
 *     https://kubernetes.io/docs/tasks/tools/install-kubectl/

Plug-in CNI
 *     https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network

# Roadmaps

  - [X] Review configure firewall - /play/install-system-utilities.yaml
  - [X] Review GlusterFS "Creating Pool" and "Creating the volumes" - /play/glusterfs/3-configure_glusterfs_volumes.yaml
  - [X] Review README.md
  - [X] Add VMs in cluster

repository: andrepatete/kubernetes-ansible

repo_name: andrepatete/kubernetes-ansible


text:
# Examples (WIP)

Here are a few examples of known complex kernels and how to do them. Or how to use kernels in a certain context

## Kernel Ridge Regression

Make a simple example of kernel ridge regression

## Gaussian Process Regression

Make a simple example of gaussian process regression

## Deep Kernel Learning

Put a Flux neural net in front of the kernel
cf. Wilson paper

## Kernel Selection

Create a large collection of kernels and optimize the weights
cf AISTATS 2018 paper

gha_language: Julia


text:
# Wage Trust Data Analysis Workflow Demo

### What is it?
This repo provides a demo for standard data analysis workflow. It includes the following two containers:
1. A PostgreSQL database
2. Build-in modules for serving RDA(Awards) testings as app.

### Project organisation documents
- Database relationship diagram:
    - https://app.dbdesigner.net
- Workflow design:

### How do I use it?
#### Preparation
0. If you have not already set up your docker environment to use the PwC proxy, please do so now. If you have not made any edits to `~/.docker/config.json`, simply do:
```
$ mv pwc_config.json ~/.docker/config.json
```
or if you have local edits you wish to preserve, simply append the proxy information to your `config.json` file. For windows users, I am not sure where the file is located as I do not have a windows machine to experiment with.
1. Collect all relevant data and save them to the google drive under '/Data/raw'.
    - Link to data location
2. The data under '/Data/support/' is the support data such as public holidays. Please keep it as it is.
3. Make your machine ready. Please make sure you already have:
    - PwC github account
    - git installed
    - docker installed
    - ensure you have the Data folder structure:
```
+--workflow_demo
  +--Data
    +--output
    +--raw
    +--support
```

#### Step-by-Step
1.Clone this repo to your local machine
- Use the terminal to move into where you want to save the repo locally.
```
$ git clone {ssh from github repo}
```

2.Copy '/Data' from the google drive to the /Data folder locally.

3.Build the containers via:
```
$ ./docker-build.sh
```

4.Run them via

```
$ docker-compose up -d
```
5.Dump all the data in '/Data/support/' and '/Data/raw' to the postgresql database. Note that, the table with 'spt_' prefix is the support data, while the raw data is initialed with 'raw_'.
- Two python scripts: dump_raw_data.py & dump_support_data.py are provided as reference. You could run them to dump the data.
- Or choose your own way to dump the data to your local database.
- It is suggested that you use the prefix 'cln_' for the standard outputs, which is used to make sure all outputs of data cleansing steps follow the predefined format. You don't need to share those tables since the team member will have the same data after running your code.
- cd into the data_preperation folder and then
```
python3 dump_raw_data.py
```

6.If you prefer using sql to process the data, you could access the database via:
- Host: <IP_ADDRESS>, port: 9876
- Database: postgres
- Username: postgres
- Password: docker
- Open dbeaver and check within the schema that this has been created

7.Open juypter lab by using the terminal to cd to the data_preperation folder withimn the repo.
```
$ jupyter lab
```

8.Open "data_preperation.ipynb" file and run step by step to generate results which save back into the database:

9.Connect tableau to your database container.
- Open tableau and select connect to a PostgreSQL server with the following details:
    - Server: <IP_ADDRESS>
    - Port: 9876
    - Database: postgres
    - Authentication: Username and Password
    - Username: postgres
    - Password: docker
- Then select "Sign In"


text:
# The Clojure Toolbox

This is the source code for <https://www.clojure-toolbox.com>.

## Building

Project listing is stored in `projects.yml` in YAML format.

Build the new index page with `./script/generate.rb`.

Deploy with `./upload.sh` (if you have permissions to the S3 bucket).

## License

Copyright © 2015 James Reeves

Released under the MIT license.

gha_language: CSS


text:
> [Go to French version](/fr/Règlements/Décrets,%20ordonnances%20et%20règlements%20statutaires/86/1067.md)

# Regulations Respecting the Licensing of Customs Brokers

**SOR/86-1067**

Enabling authorities:
- [CUSTOMS ACT](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(2nd%20Supp.).md)

Date registered: 6 November 1986

----------

Whereas, pursuant to subsection 164(3) of the [Customs Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(2nd%20Supp.).md)[*], a copy of proposed Regulations respecting the licensing of customs brokers, substantially in the form annexed hereto, was published in the Canada Gazette Part I on May 10, 1986 and a reasonable opportunity was thereby afforded to interested persons to make representations to the Minister of National Revenue with respect thereto;

*: S.C. 1986, c. 1

Therefore, Her Excellency the Governor General in Council, on the recommendation of the Minister of National Revenue, pursuant to subsection 9(5), paragraph 164(1)(j) and subsection 166(1) of the [Customs Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(2nd%20Supp.).md)[*], is pleased hereby to make the annexed Regulations respecting the licensing of customs brokers, effective on the coming into force of subsection 9(5), paragraph 164(1)(j) and subsection 166(1) of the [Customs Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(2nd%20Supp.).md)[*].

## Short Title

**1** These Regulations may be cited as the Customs Brokers Licensing Regulations.

## Interpretation

**2** In these Regulations,

***Act*** means the [Customs Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(2nd%20Supp.).md); (*Loi*)

***chief officer of customs***, with respect to a customs broker, means the manager of a local customs office or customs offices that serve the area in which the broker transacts business, or proposes to transact business, as a customs broker; (*agent en chef des douanes*)

***licence*** means a licence to transact business as a customs broker issued pursuant to section 9 of the Act. (*agrément*)

## Prescribed Qualifications for Customs Brokers

**3**

- **(1)** An individual is qualified under these Regulations if the individual
	- **(a)** is a citizen or permanent resident of Canada;
	- **(b)** is of good character;
	- **(c)** is at least 18 years of age;
	- **(d)** has sufficient financial resources to conduct his business in a responsible manner; and
	- **(e)** has a sufficient knowledge of the laws and procedures relating to importations and exportations determined in accordance with section 4.

- **(2)** A partnership is qualified under these Regulations if the partnership
	- **(a)** in the case of a partnership composed of individuals,
		- **(i)** is composed of individuals each of whom meets the qualifications prescribed in paragraphs (1)(a) to (c),
		- **(ii)** has sufficient financial resources to conduct its business in a responsible manner, and
		- **(iii)** has at least one partner who has a sufficient knowledge of the laws and procedures relating to importations and exportations, determined in accordance with section 4; and
	- **(b)** in the case of a partnership composed of corporations,
		- **(i)** is composed of corporations each of which meets the qualifications prescribed in paragraphs (3)(a) to (c),
		- **(ii)** has sufficient financial resources to conduct its business in a responsible manner, and
		- **(iii)** has at least one partner that meets the qualification prescribed in paragraph (3)(d).

- **(3)** A corporation is qualified under these Regulations if
	- **(a)** the corporation
		- **(i)** is incorporated in Canada,
		- **(ii)** is of good reputation, and
		- **(iii)** has sufficient financial resources to conduct its business in a responsible manner;
	- **(b)** all of the directors of the corporation are of good character;
	- **(c)** a majority of the directors of the corporation are citizens or permanent residents of Canada; and
	- **(d)** at least one officer of the corporation has a sufficient knowledge of the laws and procedures relating to importations and exportations, determined in accordance with section 4.

**4**

- **(1)** Subject to subsection (2), a sufficient knowledge of the laws and procedures relating to importations and exportations is established, for the purposes of paragraph 3(1)(e), subparagraphs 3(2)(a)(iii) and (b)(iii) and paragraph 3(3)(d), if the individual, partner or officer has written the Customs Brokers Professional Examination, given under section 15, and attained a grade of at least 60 per cent on it
	- **(a)** not more than one year before the day on which the application for a licence was made; or
	- **(b)** more than one year before the day on which the application for a licence was made if the individual, partner or officer transacted business as a customs broker, whether on their own behalf or on behalf of a licensee, from within one year after the day on which the examination was written until not more than one year before the day on which the application for a licence was made.

- **(2)** For the purposes of paragraph 3(1)(e), subparagraphs 3(2)(a)(iii) and (b)(iii) and paragraph 3(3)(d), a sufficient knowledge of the laws and procedures relating to importations and exportations is established, if the individual, partner or officer
	- **(a)** prior to the coming into force of these Regulations, met the requirement under the Custom-House Brokers Licensing Regulations of having a sufficient knowledge of the law relating to customs matters to discharge the obligations of a customs broker; and
	- **(b)** transacted business as a customs broker, whether on his own behalf or on behalf of a person to whom a licence was issued under subsection 118(1) of the former [Customs Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(2nd%20Supp.).md), being chapter C-40 of the Revised Statutes of Canada, 1970, until not more than six months before the date of the application for a licence.
> SOR/2002-149, s. 1; SOR/2006-151, s. 1.

**5** [Repealed, SOR/2006-151, s. 2]

**6** [Repealed, SOR/2006-151, s. 2]

## Application for Licence

**7** An application for a licence must be made in the prescribed form and be submitted to the chief officer of customs for the area in which the applicant proposes to transact business as a customs broker.
> SOR/2002-149, s. 2.

**8**

- **(1)** On receipt of an application for a licence and before a licence is issued, the chief officer of customs to whom the application is made shall display, for a period of two weeks in the customs office managed by him, a public notice of the application, setting out
	- **(a)** where the applicant is an individual, the applicant’s full name and address and the business name to be used;
	- **(b)** where the applicant is a partnership composed of individuals,
		- **(i)** the full name and address of each partner,
		- **(ii)** the name of each partner who meets the knowledge requirement determined in accordance with section 4, and
		- **(iii)** the business name to be used;
	- **(c)** where the applicant is a partnership composed of corporations
		- **(i)** the legal name of each partner,
		- **(ii)** the head office address of each partner,
		- **(iii)** the name and address of each officer and director of each partner,
		- **(iv)** the names of the officers of each partner who meet the knowledge requirement determined in accordance with section 4, and
		- **(v)** the business name to be used; and
	- **(d)** where the applicant is a corporation,
		- **(i)** the legal name of the corporation,
		- **(ii)** the head office address of the corporation,
		- **(iii)** the name and address of each officer or director,
		- **(iv)** the name of each officer who meets the knowledge requirement determined in accordance with section 4, and
		- **(v)** the business name to be used if other than the legal name of the corporation.
	- **(e)** [Repealed, SOR/2002-149, s. 3]
	- **(f) and (g)** [Repealed, SOR/2006-151, s. 3]

- **(2)** The notice referred to in subsection (1) shall invite written comments or information from the public regarding the application.
> SOR/2002-149, s. 3; SOR/2006-151, s. 3.

**9** [Repealed, SOR/2002-149, s. 4]

## Security

**10**

- **(1)** Before a licence is issued or renewed, the customs broker shall, in respect of the licence to be issued or renewed, deposit security with the chief officer of customs in the amount of $50,000 to protect the Canada Customs and Revenue Agency against loss while the licence or renewal thereof is in effect.

- **(2)** The security deposited under subsection (1) shall be in the form of
	- **(a)** cash;
	- **(b)** a certified cheque;
	- **(c)** a transferable bond issued by the Government of Canada; or
	- **(d)** a bond issued by
		- **(i)** a company that is registered and holds a certificate of registry to carry on the fidelity or surety class of insurance business and that is approved by the President of the Treasury Board as a company whose bonds may be accepted by the Government of Canada,
		- **(ii)** a member of the Canadian Payments Association referred to in section 4 of the Canadian Payments Association Act,
		- **(iii)** a corporation that accepts deposits insured by the Canada Deposit Insurance Corporation or the Régie de l’assurance-dépôts du Québec to the maximum amounts permitted by the statutes under which those institutions were established,
		- **(iv)** a credit union as defined in subsection 137(6) of the [Income Tax Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(5th%20Supp.).md), or
		- **(v)** a corporation that accepts deposits from the public, if repayment of the deposits is guaranteed by Her Majesty in right of a province.
> SOR/90-121, s. 1; SOR/91-274, Part V; SOR/2001-197, s. 6; SOR/2002-149, s. 10.

## Fees

**11**

- **(1)** A fee of $600 must be paid before a licence is issued.

- **(2)** A renewal fee of $600 must be paid before a licence is renewed.

- **(3)** A renewal fee must be refunded if, prior to the 15th day of February preceding the day on which the licence will expire, the customs broker withdraws the request for renewal by notice in writing to the chief officer of customs.
> SOR/92-186, s. 1; SOR/2006-151, s. 4(E).

## Duration

**12** A licence, including a licence that has been renewed, expires on the 31st day of March next following the date on which the licence or its renewal is expressed to be effective.

## Terms and Conditions

**13** A licence authorizes the holder to transact business as a customs broker
- **(a)** at the customs office specified in the licence, if the holder maintains at least one business office in the area served by that customs office;
- **(b)** at any customs office specified by the Minister;
- **(c)** at any customs office through a customs broker qualified under these Regulations whose licence specifies that customs office; and
- **(d)** at any customs office, by electronic means in accordance with the technical requirements, specifications and procedures for electronic data interchange that are set out in the Electronic Commerce Client Requirements Document established by the Agency, as amended from time to time, if the holder maintains at least one business office in Canada.
> SOR/98-236, s. 1; SOR/2002-149, ss. 5, 11; SOR/2006-151, s. 5.

## Transaction of Business as a Customs Broker

**14** Every customs broker shall
- **(a)** display prominently at each business office at which he transacts business as a customs broker
	- **(i)** where the customs broker is a partnership or a corporation, a sign bearing the name under which the partnership or corporation is authorized to transact business as a customs broker, and
	- **(ii)** the licence or a copy thereof;
- **(b)** immediately notify in writing the chief officer of customs of any change
	- **(i)** in the address of a business office at which he transacts business as a customs broker,
	- **(ii)** in the legal or business name of the partnership or the corporation, where the customs broker is a partnership or a corporation,
	- **(iii)** in the membership of the partnership, where the customs broker is a partnership,
	- **(iv)** in the officers or directors of the corporation, where the customs broker is a corporation,
	- **(v)** [Repealed, SOR/2002-149, s. 6]
	- **(vi)** in the ownership of the business or corporation, where the customs broker is an individual or corporation, and
	- **(vii)** in the individuals meeting the knowledge requirement determined in accordance with section 4;
- **(c)** furnish to the importer or exporter, in respect of each transaction made on their behalf, a copy of the customs accounting documents bearing the customs accounting number and official customs stamp, or a copy of the information transmitted by electronic means to the Agency; and
- **(d)** promptly account to a client importer or exporter for funds received
	- **(i)** for the client from the Receiver General for Canada, and
	- **(ii)** from the client in excess of the duties or other charges payable in respect of the client’s business with the Canada Customs and Revenue Agency.
> SOR/90-121, s. 2(F); SOR/98-236, s. 2; SOR/2002-149, ss. 6, 10, 11; SOR/2006-151, s. 6.

## Examinations

**15**

- **(1)** The Customs Brokers Professional Examination shall be given at least once a year at any time that the Minister or a person designated by the Minister for the purpose of section 9 of the Act directs.

- **(2)** Notice of the time and place of an examination shall be posted in the office of the chief officer of customs not less than 60 days before the date of the examination.
> SOR/2002-149, s. 7; SOR/2006-151, s. 7.

**16** Every individual proposing to write the examination must
- **(a)** file an application in the prescribed form with the chief officer of customs at the nearest customs office at least 30 days prior to the date set for the examination; and
- **(b)** at the time the application is made, pay a fee of $200.
> SOR/2002-149, s. 8; SOR/2006-151, s. 8.

## Records

**17**

- **(1)** Every customs broker shall keep the following information:
	- **(a)** records and books of account indicating all financial transactions made while transacting business as a customs broker;
	- **(b)** a copy of each customs accounting document made while transacting business as a customs broker and copies of all supporting documents, and a copy of the information transmitted by electronic means to the Canada Customs and Revenue Agency while transacting business as a customs broker;
	- **(c)** copies of all correspondence, bills, accounts, statements and other papers received or prepared by the customs broker that relate to the transaction of business as a customs broker; and
	- **(d)** separately, all of the records, books of account and copies referred to in paragraphs (a) to (c) relating to business transacted under paragraph 13(1)(c).

- **(2)** Every customs broker shall retain the information for a period of six years after the importation of the goods to which the information relates.

- **(3)** The information required by subsection (1) shall be kept in such a manner as to enable an officer to perform detailed audits and to obtain or verify the information.

- **(4)** The information required by subsection (1) shall be kept for the period prescribed by subsection (2)
	- **(a)** in an original document;
	- **(b)** in a copy made by means of any photographic, microphotographic or image-processing process that is in accordance with National Standard of Canada CAN/CGSB-72.11-93, Microfilm and Electronic Images as Documentary Evidence, published by the Canadian General Standards Board in November 1993, as amended from time to time; or
	- **(c)** on machine-sensible data media if the media can be related back to the supporting source documents and are supported by a system capable of producing accessible and readable copy.
> SOR/98-236, s. 3; SOR/2002-149, ss. 9, 11.

## Cancellation or Suspension

**18**

- **(1)** The Minister or a person designated by the Minister for the purposes of section 9 of the Act may suspend or cancel the licence of a customs broker if the customs broker
	- **(a)** contravened the provisions of an Act of Parliament or a regulation made thereunder relating to the importation or exportation of goods;
	- **(b)** acted to defraud Her Majesty or a client;
	- **(c)** suggested a plan for the evasion of any duties or other debts due to Her Majesty in right of Canada that involves the contravention of the provisions of an Act of Parliament or a regulation made thereunder;
	- **(d)** failed to comply with these Regulations;
	- **(e)** became insolvent or bankrupt;
	- **(f)** engaged in any dishonest conduct while transacting business as a customs broker;
	- **(g)** ceased to carry on business as a customs broker or failed to carry out his duties and responsibilities as a customs broker in a competent manner; or
	- **(h)** is no longer qualified under these Regulations.

- **(2)** Before a licence is cancelled or suspended the Minister or a person designated by him for the purposes of section 9 of the Act shall cause to be given to the customs broker
	- **(a)** 30 days notice of the proposed cancellation or suspension;
	- **(b)** reasonable information concerning any allegations with respect to any of the grounds referred to in paragraphs (1)(a) to (h) on which the Minister proposes to cancel or suspend the licence; and
	- **(c)** a reasonable opportunity to respond and make representations as to why the licence should not be cancelled or suspended.
> SOR/90-121, s. 3.

## Surrender of Licence

**19** Every customs broker shall forthwith surrender his licence to the chief officer of customs at the customs office specified in the licence if
- **(a)** the licence has been cancelled; or
- **(b)** the customs broker has ceased to transact business as a customs broker.

### **SCHEDULE**
[Repealed, SOR/98-236, s. 4]

repository: TravisMadill/CanadianLaws

path: /en/Regulations/Statutory Orders and Regulations/86/1067.md

repo_name: TravisMadill/CanadianLaws


text:
# BNN_order_statistics
I use normal distribution order statistics to replace batch normalizations in binary neural networks. I show that this avoids some BatchNorm problems, with little cost.

The FormulasForRenorm file contains the full explanation of the method, with a demonstration on a CNN classifier.
The second notebook is there to demonstrate the beneficial effects of this method on an autoencoder.


text:
---
layout: page
title: ttraveller7's Project Portfolio Page
---

### Project: MyCRM

MyCRM is a desktop application for managing client contacts, repair job statuses, and product information that has been optimised for use via a Command Line Interface (CLI) while maintaining the benefits of a Graphical User Interface (GUI). If you type quickly, MyCRM can complete customer relationship management tasks faster than traditional GUI applications.

Given below are my contributions to the project.

* **New Feature**: Added the ability to add products.
    * What it does: Allows the user to insert new products.
    * Justification: This feature increases usefulness of MyCrm, allowing users to refer to the details a product and
      reuse its information in future jobs.

* **New Feature**: Added the ability to delete products.
    * What it does: Allows the user to remove an existing product.
    * Justification: This feature enables users to delete and remove any of their created products, for example when
      a product is less popular in repair jobs.

* **New Feature**: Added an edit product command
    * What it does: Allows the user to edit an existing product.
    * Justification: This feature allows users to change certain fields of a product without removing it.
    * Highlights: All product fields except *product name* are optional. This allows the user to store product information
      in multiple short commands instead of one long command. <br>For example, the user can key in an `addProduct` command to
      create a product with *product name*, and then issue several `editProduct` commands to fill in *other fields*.

* **New Feature**: Added a list product command.
    * What it does: Allows the user to view all products in MyCrm.
    * Justification: Enables users view all existing products.

* **New Feature**: Created a new appearance theme and added the ability to change theme.
    * What it does: Allows the user to change the theme of appearance of MyCrm.
    * Justification: Allows the user to switch to his/her preferred theme.
    * Highlights:
      * A new theme, [light](https://github.com/AY2122S1-CS2103-T14-3/tp/blob/master/src/main/resources/view/LightTheme.css),
      is created as a stylesheet with new colorscheme and font family.
      * To change the current theme, the user can either use `themeCommand` or choose from the theme menu
      * When the user exits MyCrm, the most recent theme will be stored. The same theme will be loaded to GUI next time
        the user opens the app.

* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2021-09-17&tabOpen=true&tabAuthor=TTraveller7&tabRepo=AY2122S1-CS2103-T14-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code~other&authorshipIsBinaryFileTypeChecked=false&tabType=authorship)

* **Enhancements to existing features**:
    * Modified GUI layout: split the list pane to two columns (Pull requests
      [#82](https://github.com/AY2122S1-CS2103-T14-3/tp/pull/82)).
    * Adjusted attributes of Ui components; make GUI response with different commands reasonably (Pull requests
      [#65](https://github.com/AY2122S1-CS2103-T14-3/tp/pull/65))
    * Wrote tests for products commands, product components and theme command.

* **Documentation**:
    * Updated README of team repository [#37](https://github.com/AY2122S1-CS2103-T14-3/tp/pull/37)
    * User Guide: Added documentation for the features `addProduct`, `deleteProduct`, `listProduct`, `editProduct`,
          `findProduct`, and `theme`.
    * Developer Guide:
        * Added use cases and test instructions for the features `addProduct`, `deleteProduct`, `listProduct`, `editProduct`,
          `findProduct`, and `theme`.
        * Added implementation details for the features `addProduct` and `editProduct`.
        * Updated documentation of UI components [#116](https://github.com/AY2122S1-CS2103-T14-3/tp/pull/116).

* **Community**:
    * Reported bugs and suggestions for other teams. e.g.
      [125](https://github.com/AY2122S1-CS2103T-T17-4/tp/issues/125), [128](https://github.com/AY2122S1-CS2103T-T17-4/tp/issues/128),
      [129](https://github.com/AY2122S1-CS2103T-T17-4/tp/issues/129), [123](https://github.com/AY2122S1-CS2103T-T17-4/tp/issues/123),
      [124](https://github.com/AY2122S1-CS2103T-T17-4/tp/issues/124), [127](https://github.com/AY2122S1-CS2103T-T17-4/tp/issues/127).

gha_language: Java

gha_license_id: NOASSERTION


text:
# Base Rollup

A small starter kit to create data projects or static web projects from scratch.

At first, the script allows you to choose between a static or data project. The difference is that the data project has built-in d3, nothing more. Then select the name of your project folder, and you will have little scaffolding ready to work.

The starter kit is ready to work with a reduced version of d3 based on importing only the [necessary modules](https://github.com/jorgeatgu/base-rollup-d3/blob/master/src/js/d3.js).

## How to use

Download the script, and simply run it

```
bash init.sh
```

## DEMO

[![asciicast](https://asciinema.org/a/170142.png)](https://asciinema.org/a/306571)

## Getting Started

```
yarn install
```

```
yarn serve
```

## Plugins

**Linters**: eslint[ JavaScript ] & Stylelint[ CSS ]
**Minifiy**: teser[ JavaScript ] & CSSnano[ CSS ]
**Server**: Browsersync
**Lint-staged**: lint CSS files with Stylelint and JS files with Eslint before push to repository

## Script to init

The script create a structure like this:

```

├─ src/
│  ├─ css/
│  ├─ img/
│  └─ js/
│
├─ css/
├─ js/
├─ img/
├─ .gitignore
├─ .eslintrc
├─ .stylelintrc
├─ .prettierrc.json
├─ index.html
├─ rollup.config.js
└─ package.json
```

## License

[MIT](LICENSE) © Jorge Aznar

repository: jorgeatgu/base-rollup

repo_name: jorgeatgu/base-rollup


text:
![Cortex Heatmap](/docs/Cortex-heatmap.png)
# Loom Viewer

Loom is

* `.loom`, an efficient file format for large omics datasets
* `loompy`, a Python library for creating and working with data in `.loom` format.
* `loom-viewer`, a web app for browsing large single-cell RNA-seq datasets

This repository is the loom-viewer part. Read more about .loom and loompy [here](https://github.com/linnarsson-lab/loompy).

## Installation

You can choose between installation through PyPi, or build `loom-viewer` from source.

### Installing through pip

1. Install the Python 3.x version of [Anaconda](https://www.continuum.io/downloads).

**Note: loompy and loom-viewer only work with Python 3**

2. Open a terminal.

Windows users: open `Programs > Anaconda 3 > Anaconda Promp`.

3. Install Loom with the following command:

```bash
pip install loompy
pip install loom-viewer
```

Tip: Loom is under development and updated often. To ensure you have the latest version, do this:

```bash
pip install -U loom-viewer
```

### Installing from source

1. Install the Python 3.x version of [Anaconda](https://www.continuum.io/downloads).

**Note: loompy and loom-viewer only work with Python 3**

2. If you haven't already, install [`loompy`](https://github.com/linnarsson-lab/loompy), either from source or through PyPI:

```bash
pip install loompy
```
3. Install depedencies:
  - [node.js](https://nodejs.org/en/)
  - npm ( ubuntu: ```sudo apt-get install npm```)
  - webpack ( ubuntu: ```sudo apt-get install webpack```)

4. Clone this repository with git

```
git clone https://github.com/linnarsson-lab/loom-viewer.git
```

5. Navigate to the newly created `loom-viewer` folder, and install all required node packages:

```bash
npm install
```

6. Run the build script. On Mac/Linux:

```bash
./build
```

On Windows:
```powershell
build
```

To build the production version, type:

```bash
./build prod
```

Tip: when developing, you only modified the Python code, and want to skip building the client side, type:

```bash
./build_egg
```

### The Loom CLI tool

After installation, you should have access to the `loom` CLI from the terminal (*"Anaconda Prompt"* on Windows). Test if everything works correctly by typing:

```bash
loom version
```

To learn more about the loom tool, type:

```bash
loom --help
```

For help with individual commands, just type:

```bash
loom [command] --help
```

### Getting started with the viewer

To open the Loom Viewer locally, type in `loom` without any extra flags:

```bash
loom
```

This will start a local server, and automatically open `localhost:8003` in your default browser. Since this is the first time running the tool, it will fail to find any datasets, showing an empty list and an error message about fetch being broken on Safari (we are working on that one).

Close the server for now (CTRL+C on Linux/Windows, CMD+C on Mac).

To view our Loom files, we have to go through the following steps:

1. Store the Loom files in a directory where the viewer can find it
  a. (optional) To see heatmap tiles, generate them with `loom tile <loom filename>`
  b. (optional) To quickly access gene expression data, pre-expand the rows with `loom expand -r <loom filename>`
2. Start the loom server, or if it is already running, refresh the page

#### Where the server looks for Loom files

The first time you run `loom`, a `loom-datasets` folder will be created in your home folder. This is where the `loom-viewer` server looks for Loom files by default.

You can explicitly point the loom CLI to a different path with `loom --dataset-path <your path here>`

The dataset folder is organised in *projects*. These are sub-folders in the root dataset folder. Folders represent individual projects. The Loom files are stored in these project folders: (all other files are ignored)

```bash
~/
├─ loom-datasets/
.  ├─ # Project 1 (folder)
   │  ├─ # dataset1.loom (loom file)
   │  └─ # dataset2.loom (loom file)
   └─ # Project 2 (folder)
      ├─ # dataset3.loom (loom file)
      └─ # dataset4.loom (loom file)
```

Either create a Loom file with [`loompy`](https://github.com/linnarsson-lab/loompy), or download one from a loom viewer hosted on-line.

For this example, we will use the `Cortex.loom` data set, containing data from [one of our papers](http://science.sciencemag.org/content/347/6226/1138). First, go to Linnarsson Lab's [loom.linnarssonlab.org](http://loom.linnarssonlab.org/), and search for `Cortex.loom`:

![Cortex](/docs/Dataset%20List%20Cortex.png)

If you want, you can open it now and browse it on-line!

On the right you can see a cloud icon [that links to the original loom file](http://loom.linnarssonlab.org/clone/Published/Cortex.loom). Right-click and save the file to an appropriately labeled project folder in the `loom-datasets` folder:

```bash
~/
├─ loom-datasets/
.  ├─ Linnarsson Lab
   .  └─ Cortex.loom
```

Once we start a local loom server (see below) and open `localhost:8003`, the resulting view should be a single project, `Linnarsson Lab`, with a single loom file, `Cortex.loom`. Opening it should give the same results as the on-line versoin.

### Generating heatmap tiles with `loom tile`

By default, the server generates and caches the metadata, attributes, and individual rows and columns as they are requested (see below).

However, to view a heat map of the entire data matrix, the associated image tiles must be pre-generated from the Loom file *(the reason we do not do this on-the-fly is that generating tiles requires iterating over all the data in a Loom file. For bigger files is so slow that it would freeze the system if done while running a server)*.

**Note: try to avoid running a server at the same time you generate tiles, as this can lead to unexpected HDF5 behaviour due to multiple programs accessing the same file at once.**

Tile generation is done through the `loom tile` command. For a list of possible flags, type `loom tile --help`:

```
usage: loom tile [-h] [--project [PROJECT [PROJECT ...]]] [-A] [-t]
                 [file [file ...]]

positional arguments:
  file                  Loom file(s) to expand. Expands all files matching the
                        provided file names. To avoid this, use an absolute
                        path to specify a single file.

optional arguments:
  -h, --help            show this help message and exit
  --project [PROJECT [PROJECT ...]]
                        Project(s) for which to expand all files.
  -A, --all             Expand all loom files.
  -t, --truncate        Remove previously expanded tiles if present (False by
                        default)
```

Note that the `loom tile` command will automatically search _all_ projects for _all_ matching file names, and generate tiles for each. Using unique file names is encouraged!

Examples:

```bash
# Generate tiles for all files named `Cortex.loom` or `Cortex_allgenes.loom
loom tile Cortex.loom Cortex_allgenes.loom

# Generate tiles for `/home/me/loom-datasets/Published/Cortex.loom`
# on Windows, this would be something like:
# loom tile C:\Users\Job van der Zwan\loom-datasets\Published\Cortex.loom
loom tile /home/me/loom-datasets/Published/Cortex.loom

# Generate tiles for all files in the `Published` project:
loom tile --project Published
```

**Note: the tiles are _not_ automatically updated when changing data in a loom file, meaning the viewer may show the old data! To fix this, re-do this step with the added -t flag:**

```bash
# -t for "truncate", telling loom to overwrite the old files
loom tile -t [filenames and project folders]
```

Because generation can be slow for larger Loom files, the command checks if the relevant `<filename>.loom.tile` subfolder exists, skipping generation if it does. This means that if the tile command is aborted without finishing, the remaining tiles will not be added when running `loom tile` again! To override this, run: `loom tile -t <filename.loom>`. Alternatively, delete the subfolder in question.

### Pre-generating/updating JSON files for metadata, attributes and rows with `loom expand`

Similar to pre-generating image tiles, is possible to pre-generate all metadata, like attributes and gene rows, for a Loom file. This step used to be mandatory, but now the server generates the required JSOn on the fly.

There are two situations in which this is still relevant.

First, if you change data in a loom file, previously generated JSON files for that data becomes outdated. Currently the loom server cannot detect this change, so the JSON files have to manually be updated.

Second, because opening and closing an HDF5 connection gets slower as file-size increases, this may still be useful when serving very large loom files on-line.

For either of these scenarios we use the `loom expand` command.

```
usage: loom expand [-h] [--project [PROJECT [PROJECT ...]]] [-A] [-C] [-t]
                   [-m] [-a] [-r] [-c]
                   [file [file ...]]

positional arguments:
  file                  Loom file(s) to expand. Expands all files matching the
                        provided file names. To avoid this, use an absolute
                        path to specify a single file. When combined with
                        --clear it clears all expanded files instead.

optional arguments:
  -h, --help            show this help message and exit
  --project [PROJECT [PROJECT ...]]
                        Project(s) for which to expand all files (or clear
                        expansion with --clear).
  -A, --all             Expand all loom files (or clear expansion with
                        --clear).
  -C, --clear           Remove previously expanded files.
  -t, --truncate        Replace previously expanded files if present (False by
                        default). Only does something in combination with
                        expansion (-m, -a, -r or -c).
  -m, --metadata        Expand metadata (False by default)
  -a, --attributes      Expand attributes (False by default)
  -r, --rows            Expand rows (False by default)
  -c, --cols            Expand columns (False by default)
```

It is nearly identical to the `loom tile` command, except that we also need to specify whether we want to generate JSON files for metadata, attributes, rows and/or columns.

Examples:
```bash
# Generate JSON for metadata, attributes and rows
# for all files named `Cortex.loom` or `Cortex_allgenes.loom,
# and overwrite ay previous JSON files encountered
loom expand -mart Cortex.loom Cortex_allgenes.loom

# Generate attributes JSON files for /home/me/loom-datasets/Published/Cortex.loom
# on Windows, this would be something like:
# loom expand -a C:\Users\Job van der Zwan\loom-datasets\Published\Cortex.loom
loom expand -a /home/me/loom-datasets/Published/Cortex.loom

# Generate row JSON files  for all files in the `Published` project:
loom expans -r --project Published
```
## FAQ

### The website is stuck with the message that fetch is broken on Safari, but I am not using Safari

The loom server cannot find any loom files, but the website mistakenly thinks it failed to fetch the list of loom files (which (for now) is guaranteed to happen on Safari anyway, hence the warning message).

See above for where and how to store your loom files so that the server can find them.

If this did not solve your problem, open an issue.

### There are no heatmap tiles in the viewer

If you have not done so yet, generate the tiles for the heatmap first with `loom tile <filename.loom>`. See above for more details.

If you _have_ done so but something went wrong, you can try again with `loom tile -t <filename.loom>`.

### Generating tiles fails with `ERROR - module 'scipy.misc' has no attribute 'toimage'`

It is likely that you are missing the required image library. This can happen if you use MiniConda, which has fewer default packages. Try installing it with `conda install pillow`.

### Why is pre-generation required for serving the metadata or viewing heatmap tiles data

There are two reasons for this:

First, h5py can not safely cope with multiple people accessing the same Loom file simultanously. This is not a problem when exploring loom files locally (unless you open the same loom file in multiple tabs), but when using the `loom-viewer` as a server to set up a website for sharing loom-files, two or more people opening the same loom files will cause the server to crash.

Second, loading the genes from the loom file and converting it to either JSON or a PNG is a fairly slow process. The viewer is mainly intended to explore and share finished loom files that do not change, making it wasteful to do this work multiple times. Serving pre-generated static files is thousands of times faster.

This limits the usefulness as an off-line viewer somewhat for now, but we have plans to make the server capable of detecting when you changed something in a loom file, and automatically update the data in question. This would make this process easier, but for now you have to manually trigger an update to the generated JSON files and image tiles when changing data in the a loom file.

repository: linnarsson-lab/loom-viewer

gha_language: JavaScript

repo_name: linnarsson-lab/loom-viewer


text:
## **Notes for developers**

When running on MacOS, you might need to set up the following env variable before starting `airflow scheduler/webserver`

```
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
```

**Conformance and unit tests were run for**
- macOS 11.4
  - Python 3.8.6
- Ubuntu 18.04
  - Python 3.6.8
  - Python 3.7.9
  - Python 3.8.10
- Ubuntu 20.04
  - Python 3.6.8
  - Python 3.7.9
  - Python 3.8.10

*For Ubuntu the Python versions were selected based on latest available binary release at the time of testing.

**To run conformance tests in Docker container**
```
cd tests
./run_conformance_tests_docker.sh $UBUNTU_VERSION $PYTHON_VERSION $CWL_AIRFLOW_VERSION $REPO_URL $SUITE
```
**To run unit tests in Docker container**
```
cd tests
./run_unit_tests_docker.sh $UBUNTU_VERSION $PYTHON_VERSION $CWL_AIRFLOW_VERSION
```

**To build rellocatable version in Docker container**
```
cd ./packaging/portable/linux
./pack_linux_docker.sh
```

repository: Barski-lab/cwl-airflow

gha_language: Python

repo_name: Barski-lab/cwl-airflow


text:
---
layout: post
title: "Road User Detection in Videos"
date: 2019-03-28 15:28:07
categories: arXiv_CV
tags: arXiv_CV Object_Detection Detection
author: Hughes Perreault, Guillaume-Alexandre Bilodeau, Nicolas Saunier, Pierre Gravel
mathjax: true
---

* content
{:toc}

##### Abstract
Successive frames of a video are highly redundant, and the most popular object detection methods do not take advantage of this fact. Using multiple consecutive frames can improve detection of small objects or difficult examples and can improve speed and detection consistency in a video sequence, for instance by interpolating features between frames. In this work, a novel approach is introduced to perform online video object detection using two consecutive frames of video sequences involving road users. Two new models, RetinaNet-Double and RetinaNet-Flow, are proposed, based respectively on the concatenation of a target frame with a preceding frame, and the concatenation of the optical flow with the target frame. The models are trained and evaluated on three public datasets. Experiments show that using a preceding frame improves performance over single frame detectors, but using explicit optical flow usually does not.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1903.12049](http://arxiv.org/abs/1903.12049)

##### PDF
[http://arxiv.org/pdf/1903.12049](http://arxiv.org/pdf/1903.12049)


text:
## Correct following assuptions before moving to prod

Points to remember while deploying

# Contributed Liquidity

1. Update time fro 5 mins to 30 days => done
2. set router

# Proxima Faucet

1. update commented withdraw time limit => done

# Governance

1. Update voting period ===> done

# Team Token Vesting

1. Update vesting day value fromm 5 mins to 1 days => done

=======================================================================================================

## Steps

1. Get PXA token and PxaVault address.
2. Update migration file of PxaTeamTokenVesting for PXA token address, and deploy ProximaTeamTokenVesting.
3. Update Migration file of ProximaCore for PXA token and ProximaTeamTokenVesting address and deploy proxima core contracts.
   ==================== UPDATE INIT HASH CODE IN UNISWAP LIBRARY==================
4. Update migration file of Proxima Periphery for Pxa Token, factory, reward vault, cLiquidity addresses . and deploy proxima periphery
5. Update migration file of TokenTransferRepo ad update Pxa token, Pxa vault, cLiquidity, reward vault, team token, faucet, bootstrap addresses. and deploy the TokenTransferRepo
   ==========================check for correct number of tokens tranfered manually==============
6. Update migration of exempted pair repo for factory and router address . and deploy exempted pairs

external -

1. manually start goverance in router smart contract

=========================================================================================================

## Cost estimation (Folder wise)

1. Team token vesting : 0.14772096 BNB
2. Proxima -core : 0.2215995 BNB
3. Proxima -Periphery : 0.06790506 BNB
4. Token Transfer Automation : 0.00307412 BNB
5. Execmpted Pair Automation : 2.307412 BNB

===========================================================================================================

repository: Hakaishin-Birusu/Proxima-DEX

branch_name: refs/heads/main

repo_name: Hakaishin-Birusu/Proxima-DEX


text:
---
layout: post
last_modified_at: 2021-03-29
title: Sight Words reading practice 106
youtubeId: ZqbleO0pBn0
---

<h4> In this video, you will learn the following sightwords and spellings. You will have an opportunitiy to repeat the spelling. #MemorizeSpelling #SightWordsSpelling</h4>

1 - Vehicle

2 - Observe

3 - Flight

4 - Facility

5 - Understanding

6 - Average

7 - Emerge

8 - Advantage

9 - Quick

10 - Leadership

11 - Earn

{% include youtubePlayer.html id=page.youtubeId %}

[Next]({{ site.baseurl }}{% link  split3/_posts/2020-03-08-Math multiplications part 12.md%})

path: /split3/_posts/2020-01-04-Sight words reading practice 106.md


text:
# Ray Against Plane

Testing a ray against a plane is surprisingly easy. Remember, any point on the ray can be represented by a time t, such that:

```
point(t) = plane.position + plane.normal * t
^ the (t) above means point at time t
```

Also, recall we can test if a point is on a plane if it fits this equation:

```
DOT(point, plane.normal) = plane.distance
```

A ray and a plane collide if a point exists that satisfies both of these equations! Let's start out with the formula for point on plane:

```
DOT(point, plane.normal) = plane.distance
```

In this formula the point is unknown. But we know that the point must also be on the ray at some time t. So, let's substitute the unknown point for the point on ray formula.

```
DOT(ray.position + ray.normal * t, plane.normal) = plane.distance
```

At this point, the only unknown in the above equation is t. Let's start re-arranging the equation so t is on the left side by its-self. We can distribute the dot product operation:

```
DOT(ray.position, plane.normal) + DOT(ray.normal * t, plane.normal) = plane.distance
```

Now, we can subtract the first dot product from each side.

```
DOT(ray.normal * t, plane.normal) = plane.distance - DOT(ray.position, plane.normal);
```

Finally, we can divide each side by ray.normal DOT plane.normal.

```
t = (plane.distance - DOT(ray.position, plane.normal) / DOT(ray.normal, plane.normal)
```

That's it! We now have T! The above might be a bit confusing, let's take a look at it as just math. In the below formula __pos__ is the position of the ray, __dir__ is the normal of the ray. __norm__ is the normal of the plane and __dist__ is the distance of the plane. __t__ is of course t. t__dir__ means t * dir.

* First we have the formula for a plane
* $$unknownPoint \cdot norm = dist$$
*
* Next, we substitute the point on ray formula for the unknown point
* $$(pos + t\mathbf d\mathbf i \mathbf r) \cdot norm = dist$$
*
* Distribute the dot product
* $$pos \cdot norm + t\mathbf d\mathbf i\mathbf r \cdot norm = dist$$
*
* Subtract pos dot norm from both sides
* $$t\mathbf d\mathbf i\mathbf r \cdot norm = dist - pos \cdot nrom$$
*
* Divide both sides by dir dot norm
* $$t = \frac{dist - pos \cdot nrom}{dir \cdot norm}$$

A few things to keep in mind.

If the ray is parallel to the plane $$dir \cdot norm$$ will be 0 and there is no intersection.

An intersection is only valid if the ray is in front of the plane.That is, if the direction of the ray is opposite of the planes normal. This is true if $$dir \cdot norm < 0$$.

If the value of t is out of range (that is, if t is negative), then there is no intersection.

## The Algorithm

```cs
// Returns t if collision happened, -1 if it didnt
float Raycast(Ray ray, Plane plane) {
    float nd = Vector3.Dot(ray.Normal, plane.Normal);
    float pn = Vector3.Dot(ray.Position, plane.Normal);

    if (nd >= 0f) {
        return -1;
    }

    t = (plane.Distance - pn) / nd;

    if (t >= 0f) {
      return t;
    }
    return -1;
}
```

## On Your Own

Add the following function to the ```Collisions``` class:

```cs
// TODO: Implement ONLY THIS ONE method:
public static bool Raycast(Ray ray, Plane plane, out float t)

// I've implemented the blow methods for you.
// Nothing to do past this point

// Conveniance method, returns t without an out param
// If no collision happened, will return -1
public static float Raycast(Ray ray, Plane plane) {
    float t = -1;
    if (!Raycast(ray, plane, out t)) {
        return -1;
    }
    return t;
}

// Conveniance method, returns the point of intersection
public static bool Raycast(Ray ray, Plane plane, out Point p) {
    float t = -1;
    bool result = Raycast(ray, plane, out t);
    p = new Point(ray.Position.ToVector() + ray.Normal * t);
    return result;
}
```

And provide an implementation for it!

### Unit Test

You can [Download](../Samples/Raycast.rar) the samples for this chapter to see if your result looks like the unit test.

This unit test will render a plane on screen, and several rays. If any rays intersect the Plane they will render red, otherwise blue. The point of intersection is renderd as a green dot

The constructor of the unit test will spit out errors if the test results are not what are expected.

![UNIT](raycast_plane_sample.PNG)

```cs
using OpenTK.Graphics.OpenGL;
using Math_Implementation;
using CollisionDetectionSelector.Primitives;

namespace CollisionDetectionSelector.Samples {
    class RaycastPlane : Application {
        public Plane test = new Plane(new Vector3(1f, 1f, 0f), 1f);

        public Ray[] rays = new Ray[] {
            new Ray(new Point(0f, 0f, 0f), new Vector3(0f, -1f, 0f)),
            new Ray(new Point(0.5f, 0.5f, 0f), new Vector3(-1f, -1f, 0f)),
            new Ray(new Point(1f, 1f, 0f), new Vector3(1f, 1f, 0f)),
            new Ray(new Point(1f, 1f, -3f), new Vector3(0f, 0f, 1f)),
            new Ray(new Point(2f, 2f, 3f), new Vector3(0f, -1f, 0f)),
            new Ray(new Point(3f, 3f, 3f), new Vector3(-3f, -3f, -3f)),
            new Ray(new Point(1f, 1f, 3f), new Vector3(-2f, -3f, 1f)),
        };

        public override void Intialize(int width, int height) {
            GL.Enable(EnableCap.DepthTest);
            GL.PointSize(5f);
            GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill);

            bool[] results = new bool[] {
                false, false, false, false, true, true, true
            };

            float t;
            for (int i = 0; i < results.Length; ++i) {
                if (Collisions.Raycast(rays[i], test, out t) != results[i]) {
                    LogError("Expected ray at index: " + i + " to " +
                        (results[i] ? "intersect" : "not intersect") +
                        " the plane");
                }
            }
        }

        public override void Render() {
            base.Render();
            DrawOrigin();

            GL.Color3(1f, 1f, 1f);
            test.Render(5f);

            float t;
            foreach (Ray ray in rays) {
                if (Collisions.Raycast(ray, test, out t)) {
                    Point colPoint = new Point();
                    Collisions.Raycast(ray, test, out colPoint);
                    GL.Color3(0f, 1f, 0f);
                    colPoint.Render();
                    GL.Color3(1f, 0f, 0f);
                }
                else {
                    GL.Color3(0f, 0f, 1f);
                }
                ray.Render();
            }
        }

        private void Log(string s) {
            System.Console.WriteLine(s);
        }
    }
}
```

license: Unlicense


text:
---
title: "Helm templating"
---

Check [Production ready tutorial]({{< ref "tutorials/production-ready.md" >}}). It Uses Helm as the template engine to render multiple apps based on a single generic app chart.


text:
---
date: 2012-12-12T00:00:00
draft: true
title: "Snoonet Updates"
type: "post"
---

# Email Support

We have set up an e-mail for those in need of support if they are having connection issues, or need any type of support outside of the chat network. Any suggestions or requests for any thing Snoonet are **highly encouraged** as well. This can be done by contacting us at {{< email "support" >}} - Be sure to include your nickname in the e-mail!

# Keeping in Touch

We will be announcing things as we work on them via wallops (/mode yournick +w) for those interested, and discussing things in #snoonet - Recently we changed the default connect mode so users may opt in to these messages, rather than having to opt-out for things they are not concerned with.

# Webchat

Snooonet webchat will be greatly updated. Much more stable and integrated more with the reddit lifestyle you know and love. It should be easier for everybody to use. We have made sure that all your existing webchat links will still work as normal so no need to worry about that.

This will now pave the way for subreddit mods to embed or customize Snoonet webchat for their own communities. You may link to your IRC channel (chat room) with `{{< webchat_plain >}}/yourchannelhere`

# SSL/Fingerprint Information

Due to recent changes in the Snoonet network infrastructure, our servers now use a single, self-signed certificate for all secure (SSL) connections. For our security-conscious clients, the below fingerprints may be used to verify the identity of a Snoonet server:

`99:5B:AC:FE:E6:A4:22:8F:51:2D:21:63:4B:5F:05:4D:E1:61:8D:6B`

The reason for self-signing is to offer encryption and security for those who seek it while handle issues with our paid/valid certificate to work with the IRCds. Our staff has been working very hard to **make things the way the need to be** after the unfortunate events with the .com to .org address change.

repository: snoonetIRC/website

gha_language: SCSS

repo_name: snoonetIRC/website


text:
# OAuth
```javascript
import url from 'url'
import patreonAPI, { oauth as patreonOAuth } from 'patreon'

const CLIENT_ID = 'pppp'
const CLIENT_SECRET = 'pppp'
const patreonOAuthClient = patreonOAuth(CLIENT_ID, CLIENT_SECRET)

const redirectURL = 'http://mypatreonapp.com/oauth/redirect'

function handleOAuthRedirectRequest(request, response) {
    const oauthGrantCode = url.parse(request.url, true).query.code

    patreonOAuthClient.getTokens(oauthGrantCode, redirectURL, (tokensError, { access_token }) => {
        const patreonAPIClient = patreonAPI(access_token)

        patreonAPIClient(`/current_user`, (currentUserError, apiResponse) => {
            if (currentUserError) {
                console.error(currentUserError)
                response.end(currentUserError)
            }

            response.end(apiResponse);
        })
    })
})
```
Patreon is building an OAuth provider service — the technology that lets you log in to Medium with Twitter, log in to Disqus with Google+, and even log in to Patreon with Facebook. Below, you’ll find a technical process document that explains how to begin integrating with us. This document assumes technical competency in HTTP protocols and URL structure, and administrative access & developer control of the server that you wish to integrate with Patreon.

## Step 1 - Registering Your Client
To set up, you must first register your client application with us. Please visit the [Clients & API Keys](https://www.patreon.com/platform/documentation/clients) page to register one.
## Step 2 - Making the Log In Button
> Request [2]

```
GET www.patreon.com/oauth2/authorize
	?response_type=code
	&client_id=<your client id>
	&redirect_uri=<one of your redirect_uris that you provided in step 0>
	&scope=<optional list of requested scopes>
	&state=<optional string>

```

Once your client is registered, you should create a “Log in with Patreon” and/or “Link your Patreon account” button on your site which directs users to the following URL:

### HTTP Request
`GET www.patreon.com/oauth2/authorize`

### Query Parameters
Parameter | Description
--------- | -----------
response_type **_Required_** | Defaults to `code`
client_id **_Required_** |   Your client id
redirect_uri **_Required_** | one of your `redirect_uri`s that you provided in step 1
scope | This optional parameter will default to `users pledges-to-me my-campaign`, which fetches user profile information, pledges to your creator, and your creator info.
state | This optional parameter will be transparently appended as a query parameter when redirecting to your `redirect_uri`. This should be used as CSRF, and can be used as session/user identification as well. E.g. `https://www.patreon.com/oauth2/authorize?response_type=code&client_id=123&redirect_uri=https://www.mysite.com/custom-uri&state=their_session_id`. On this page, users will be asked if they wish to grant your client access to their account info. When they grant or deny access, __they will be redirected to the provided redirect_uri (so long as it is pre-registered with us)__.

## Step 3 - Handling OAuth Redirect
> Request [3]

```
GET https://www.mysite.com/custom-uri
    ?code=<single use code>
    &state=<string>
```
When the link in [Step 2](#step-2-making-the-log-in-button) redirects to the provided `redirect_uri`, e.g. https://www.mysite.com/custom-uri, it will bring extra HTTP query parameters as follows (assuming the user granted your client access):

## Step 4 - Validating Receipt of the OAuth Token

> Request [4]

```
POST api.patreon.com/oauth2/token
	?code=<single use code, as passed in to GET route [2]>
	&grant_type=authorization_code
	&client_id=<your client id>
	&client_secret=<your client secret>
	&redirect_uri=<redirect_uri>
```
Your server should handle GET requests in [Step 3](#step-3-handling-oauth-redirect) by performing the following request on the server, not as a redirect

> which will return a JSON response of:

```json
{
	"access_token": <single use token>,
	"refresh_token": <single use token>,
	"expires_in": <token lifetime duration>,
	"scope": <token scopes>,
	"token_type": "Bearer"
}
```
>to be stored on your server, one pair per user.

Remember! - this step happens on your server.

## Step 5 - Using the OAuth Token
You may use the received `access_token` to make [API](#api) calls. For example, a typical first usage of the new `access_token` would be to [fetch the user's profile info](#fetch-your-own-profile-and-campaign-info), and either merge that into their existing account on your site, or make a new account for them. You could then use their pledge level to show or hide certain parts of your site.

Remember! - this step happens on your server.

## Step 6 - Resolving the OAuth Redirect
To reiterate, requests [4] and [5] should be performed by your server (synchronously or asynchronously) in response to receiving the GET request in request [3].

Once your calls are complete, you will have the user’s profile info and pledge level for your creator.

If requests [4] and [5] were performed synchronously, then you can return a HTTP 302 for their GET in request [3], redirecting to a page with appropriate success dialogs & profile information. If the requests in requests [4] and [5] are being performed asynchronously, your response to request [3] should probably contain AJAX code that will notify the user once requests [4] and [5] are completed.
## Step 7 - Keeping up to date
```php
<?php
require_once('vendor/patreon/patreon/src/patreon.php');
use Patreon\API;
use Patreon\OAuth;
// Get your current "Creator's Access Token" from https://www.patreon.com/platform/documentation/clients
$access_token = null;
// Get your "Creator's Refesh Token" from https://www.patreon.com/platform/documentation/clients
$refresh_token = null;
$api_client = new Patreon\API($access_token);

// If the token doesn't work, get a newer one
if ($campaign_response['errors']) {
    // Make an OAuth client
    // Get your Client ID and Secret from https://www.patreon.com/platform/documentation/clients
    $client_id = null;
    $client_secret = null;
    $oauth_client = new Patreon\OAuth($client_id, $client_secret);
    // Get a fresher access token
    $tokens = $oauth_client->refresh_token($refresh_token, null);
    if ($tokens['access_token']) {
        $access_token = $tokens['access_token'];
        echo "Got a new access_token! Please overwrite the old one in this script with: " . $access_token . " and try again.";
    } else {
        echo "Can't recover from access failure\n";
        print_r($tokens);
    }
    return;
}
?>
```
> Request [7]

```
POST api.patreon.com/oauth2/token
	?grant_type=refresh_token
	&refresh_token=<the user‘s refresh_token>
	&client_id=<your client id>
	&client_secret=<your client secret>
```

> which will return a JSON response of:

```json
{
	"access_token": <single use token>,
	"refresh_token": <single use token>,
	"expires_in": <token lifetime duration>,
	"scope": <token scopes>,
	"token_type": "Bearer"
}
```
> and you should store this information just as before.

Tokens are valid for up to one month after they are issued. During this period, you may refresh a user’s information using the API calls from step 4. If you wish to get up-to-date information after the token has expired, a new token may be issued to be used for the following month. To refresh a token,

repository: james-gould/platform-documentation

repo_name: james-gould/platform-documentation


text:
---
layout: post
title: "Daily Digest #334"
type: digest
tags:
    - daily
    - development

description: ""
publish: true
---

- [Demystifying JOIN Algorithms](http://blog.felipe.rs/2019/01/29/demystifying-join-algorithms/)
- [ValueSemantics—A Gem for Making Value Classes](https://www.rubypigeon.com/posts/value-semantics-gem-for-making-value-classes/)
- [RSpec mocks and stubs in plain English](https://www.codewithjason.com/rspec-mocks-stubs-plain-english/)
- [Tools for Introspection](https://larahogan.me/blog/team-introspection/)
- [ImmortalDB -- 🔩 A relentless key-value store for the browser](https://github.com/gruns/ImmortalDB)
- [Defining the tracking practices that will be blocked in Firefox](https://blog.mozilla.org/security/2019/01/28/defining-the-tracking-practices-that-will-be-blocked-in-firefox/)


text:
# netDiag
Network diagnostic collection system for helpdesk and network operators - Better info creates better results...hopefully

To just use reporting function, you only need flask container and mongo.  If you want to be able to run remote commands and the report remotely, you will need RabbitMQ and the webscoket server container.

To build the clients wsClient and client, go into client dir and tyoe:

pyinstaller client.py --clean -F

pyinstaller wsClient.py --clean -F

This will build binaries for whatever system you are on at build time.

repository: cbabs/netDiag

repo_name: cbabs/netDiag


text:
<!--
Copyright 2018-present Open Networking Foundation

SPDX-License-Identifier: Apache-2.0
-->

# Stratum-enabled Mininet

We provide a Docker image that can execute a Mininet emulated network using
`stratum_bmv2` as the default switch.

## Build image

To build this image, from the Stratum project root:

    tools/mininet/build-stratum-bmv2-container.sh

## Obtain image from Docker Hub

Alternatively, you can obtain the image from Docker Hub:

    docker pull opennetworking/mn-stratum

This image is updated daily and built from the main branch of Stratum.

## Run container

To run the container:

    docker run --privileged --rm -it opennetworking/mn-stratum [MININET ARGS]

After running this command, you should see the mininet CLI (`mininet>`).

It is important to run this container in privileged mode (`--privileged`) so
mininet can modify the network interfaces and properties to emulate the desired
topology.

The image defines as entry point the mininet executable configured to use
`stratum_bmv2` as the default switch. Options to the docker run command
(`[MININET ARGS]`) are passed as parameters to the mininet process. For more
information on the supported mininet options, please check the official mininet
documentation.

For example, to run a linear topology with 3 switches:

    docker run --privileged --rm -it opennetworking/mn-stratum --topo linear,3

### gRPC server ports

Each switch is bound to a different gRPC port, starting from 50001 and
increasing. To connect an external client (e.g. an SDN controller) to the
switches, you have to publish the corresponding ports.

For example, when running a topology with 3 switches:

     docker run --privileged --rm -it -p 50001-50003:50001-50003 opennetworking/mn-stratum --topo linear,3

### Logs and other temporary files

To allow easier access to logs and other files, we suggest sharing the
`/tmp` directory inside the container on the host system using the docker run
`-v` option, for example:

    docker run ... -v /tmp/mn-stratum:/tmp ... opennetworking/mn-stratum ...

By using this option, during the container execution, a number of files related
to the execution of `stratum_bmv2` will be available under `/tmp/mn-stratum` in the
host system. Files are contained in a directory named after the switch name used in
Mininet,e.g. s1, s2, etc.

Example of these files are:

* `s1/stratum_bmv2.log`: contains the stratum_bmv2 log for switch `s1`;
* `s1/chassis-config.txt`: the chassis config file used at switch startup;
* `s1/grpc-port.txt`: the gRPC port associated to this switch;
* `s1/onos-netcfg.json`: sample configuration file to connect the switch to the ONOS
   SDN controller;

### Bash alias

A convenient way to quickly start the mn-stratum container is to create an alias
in your bash profile file (`.bashrc`, `.bash_aliases`, or `.bash_profile`) .

repository: stratum/stratum

repo_name: stratum/stratum


text:
CODE RETREAT
============

[![Travis CI](https://travis-ci.org/sotoseattle/CodeRetreat.svg)](https://travis-ci.org/sotoseattle/CodeRetreat.svg)
[![Coverage Status](https://img.shields.io/coveralls/sotoseattle/CodeRetreat.svg)](https://coveralls.io/r/sotoseattle/CodeRetreat)

Last Saturday 15, Nov I participated in the Global day of Code Retreat 2014. Although I could only join for half a day, it was an intense learning experience from which I benefited much.

This code is an exercise to apply what I learned in terms of 4 Principles of Simple Design. The code is an implementation of the Game Of Life. These notes are my reflections on the process for my own sake.

Table of Contents
-----------------

- [Learning to Fly](#learning-to-fly)
- [Gravity Pull](#gravity-pull)
- [Writing Test Miss-conception](#writing-test-miss-conception)
- [Advance, Retreat, Pivot, Repeat, Somersault, WTF](#advance,-retreat,-pivot,-repeat,-somersault,-wtf)
- [Emergence](#emergence)
- [Close, but no cigar!](#close,-but-no-cigar!)
- [Disclaimer](#disclaimer)
- [Author](#author)
- [License](#license)

### Learning to Fly

First and foremost I am not only starting every iteration writing the tests, but trying to write them from the most general point of view, avoiding referring to implementation details. This is extremely difficult for two reasons:

1. Unconsciously I ask a testing question / requirement already having an implicit idea of how to answer it. Visualizing how things should work, even if only in the end point (as seen by customer or objects), does not happen in a vacuum. As soon as one starts to think about it, the mind starts to consider alternatives: data structures, algorithms, etc, from past experience. I want to keep the questions as open-ended as possible, so later on the code can answer as it sees fit, from the trenches in the battlefield and not directed by an armchair admiral.
2. If the testing question / requirement is too general, too abstract, too high altitude, it ends up encompassing way too much functionality, which requires to implement too many things in too many places in order to pass the test. Therefore I need to get down from the high chair and make more concrete, low level requirements. But this in turn, (i.e. calling a specific intermediary method in my test) is already steering and making me think of concrete implementation details!

There is great tension between these forces, between flying high without getting lost in space, and flying low and hitting the rooftops.

### Gravity Pull

Another difficulty I have seen. By passing tests and only passing them, without regard for the overall design from the get go, I tend to find myself thinking in a tunnel, with a narrow scope of the problem (pass the test). Like doing white-board challenges, way too close to what I am writing in the white-board, unable to see and play with the whole picture.

This narrowing is like a gravitational pull. Happens without being aware. The way to solve it is through the refactoring phase. Then I step back, or fly to high altitude again to look at the code in its entirety, check how the pieces work together, and try to give them a more consistent and natural feel.

### Writing Test Miss-conception

Initially I though that the tests were going to be written in stone, once written they would remain essentially the same (not considering small refactorings to input/output as we add features). I was wrong. I have found myself refactoring tests as much as code. What I though should belong to Cell ended up in a Location object, and that forces the test itself to change places. Tests were written, deleted, moved, and refactored continuously. Tests become Code.

### Advance, Retreat, Pivot, Repeat, Somersault, WTF

Imagine the situation: you have a test to pass so you start coding to find out that you are going to need some intermediate methods. What do you do, retreat and write test for these intermediate methods? Or plunge ahead and implement them to pass the original? Which means you will need to write tests for that interim method a posterior? I have found that the process is not clear cut or linear and that you need to keep a loose attitude about it, making compromises, keeping agile the writing of your test and methods.

The same happens if, in the middle of the process, you want to explore a line of thought. You may want to play in the sandbox and not write a test a priori about something that may not be used or whose utility is more about writing an idea into code so a better one emerges or it clarifies a whole concept.

### Emergence

My biggest pleasure in this exercise, and what I wanted to evaluate in the first place, was the ability of the process to allow good code to emerge.

I started only considering living cells that live and die because of the proximity of other cells. The ley being that I did not consider locations where new cells would emerge. Through the iterations I ended extracting the Location from the Cell, so the cell attends only to its biological imperatives and the location encapsulates all the geographical functionality (coordinates). This allowed to have a minimal controller of the game that only keeps track of living cells. Later on I added a new class, a Chart that can visualize a group of locations, the locations of the living cells.

Now, for the fun part. Given this code, the result of the aforementioned process. Where I have taken good care to keep things encapsulated, apart, to each his own according to his responsibilities and capabilities. How hard will it be to add the functionality of certain locations becoming populated by new cells due to proximity of other living cells?

### Close, but no cigar!

Well, no. It didn't save me the pain of a big refactoring.

Once I had to consider spawning locations the whole design fell to pieces. I was tracking living cells and the Cell class had responsibility over knowing its neighbors. Now that I needed to find a way to encompass both, tracking already living cells and looking for fertile locations where new cells could come to life, I saw that keeping track of and analyzing locations could achieve the both things better.

I could see 3 ways to go about it:

1. Topologically, we only consider locations, like a field potential where alive is 100%, dead is 0%, and spawning is in-between.
2. Biologically, with a graph made of cells, which I traverse to decide if I create new ones.
3. Topo for spawning locations and bio for living cells. May make the most natural sense, since spawning locations and living cells are different things, but I cannot see that is worth the extra level of complexity. A more complex setting could make me choose this route.

This high level understanding of the design could have been taken head-on from the start, saving me the extra miles walked down the cell path, to only retrace and re-code as location based.

At the same time, this process allowed me to never get stuck because of the complexity of the problem. You always advance, even if it means taking 2 steps forward and one back. If time is not a constraint this way feels natural and it flows.

Another benefit is that you can always relay on the test previously written. This is an immense aid and a boost to the confidence that the new route (big refactoring) works.

A final benefit is that the continuous refactoring to make its language more natural, makes you end up with a minimized code and a deep understanding of what everything does.

### Disclaimer

This work is left unfinished. The GOL class should have a method 'play', a way to set the initial state of living cells from a text file (for example), and a way to visualize the evolution of the game in a fixed referenced window. The chart class itself, which visualizes the board, is messy and would benefit from refactoring.

Absolutely more tests are needed. I still need to work on really covering all possible scenarios for each class. I started strong but I have the feeling that I dropped the ball a bit by the end.

Other refactorings are possible and I may come back to it later on to perfect it, or to even add new features as per the Code Retreat mods and ideas.

## Author

- Javier Soto

## License

The MIT License

Copyright (c) 2014 Javier Soto

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

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

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

repository: sotoseattle/CodeRetreat

repo_name: sotoseattle/CodeRetreat


text:
![Banner](./readme_banner.png)

`weathercast` is a light-weight weather forecasting web application powered by the [OpenWeather API](https://openweathermap.org/api). It allows users to query for weather data on virtually any particular city around globe.

## Installation

[A live deployment of `weathercast` is available on GitHub Pages.](https://francislangit.github.io/weathercast/) Otherwise, for those that would like to locally use and/or edit the repository, follow the steps below:

1. Clone the repository with `git clone https://github.com/FrancisLangit/weathercast/` or download it as a `.zip` file.
2. Navigate to where the repository is saved on your local machine.
3. Use [`npm install`](https://docs.npmjs.com/cli/v7/commands/npm-install) to install the application's dependencies.
4. Open up `dist/index.html` on your preferred web browser to view and use the application.

## Usage

![GIF demonstrating usage of the web application](./readme_usage_gif.gif)

Users enter a search query of a city they'd like a weather forecast of. If the city exists, `weathercast` displays a wide array of weather data about the location queried. One is also given the ability to change the temperature scale displayed from Celsius to Fahrenheit and vice versa using the button on the top-right hand corner of the UI.

## Contributing

Feel free to submit an issue should a bug be found when utilizing the  application. One is also welcome to forward a pull request should they  seek to introduce a change.

## License

[MIT License](https://github.com/FrancisLangit/weathercast/blob/main/LICENSE)

repository: FrancisLangit/weathercast

repo_name: FrancisLangit/weathercast


text:
---
title: "Sollozo"
permalink: /sollozo
custom_date: "200930"
---

# Sollozo

![Sollozo by jProgr](/assets/images/sollozo.jpg)

[Sollozo](https://www.deviantart.com/jprogr/art/Sollozo-698170898).

Computer graphics: Photography, Pixelmator, Camera RAW, Photoshop. 170811.

## Notes

- First published at DeviantArt.com.
- [Creative Commons](https://creativecommons.org/licenses/by/3.0/).