text:
In this example, you will find multiple input formats that simba3d can read in
order to specify the pairwise interaction matrix.

# Introduction

There are two main input format types for data matricies to input into SIMBA3D.

There is a dense matrix representation which is inputed as an array of row
arrays. This is not ideal since the data is often sparse and it is symmetric
for inter cromosomal data.

There is also a sparse representation which is inputed as three separate
arrays which store the row index, column index, and value. The sparse input
format is very useful for single cell, and it is closer to raw data formats.

We support both types of inputs for convience.

# json, mat, npy, and csv

There are almost as many formats for passing data as there are data sets. Some
data formats are binaries which require knowing how to read the header of the
file in order to read the data. Matlab's .mat file is a binary. Python's .npy
files are binaries as well. On the other hands, json is a plain text format
that can be read using just about any code language. A csv (comma separate
value) consists of data values separated by one or more delimiters (usually
a comma and an end line character).

We suggest json or csv as a default format to passing in data into SIMBA3D, so that
users are not restricted to use python or matlab for data manipulations. If you
choose to use mat or npy files as inputs, then anyone who wants to use
your data will be required to use python or matlab if they want to reprocess it.
If you use json or csv, then most people will be able to read it without much
assistance.

The csv format is probably more familiar to biologist and statisticians. It is
less flexible than json though.

The sections below go into further details.

# Considerations for Future Format Support

npy and npz formats may not be supported in future versions because the binaries
are not compatible between python 2 and python 3. This is a huge problem if you
have multiple systems sharing a workload, or if you decide to upgrade to python
3 since python 2 is no longer supported. For these reasons, the native python
data formats are no longer recommended for storing chromosome reconstruction
data with SIMBA3D. There are no plans to actively disable them, but if they
happen to break, it will be a low priority.

If you choose to use the matlab binary, then please note that matlab is
proprietary software, and they could choose to change the binary format in
future releases of matlab so that they cannot be read by the python scipy.io
package. As a result, SIMBA3D might not be able to read such a file.

# Sparse Matrix Input Formats for SIMABA3D

The "sparse_pairwise_contact_matrix" and "sparse_population_contact_matrix"
input file can read various formats.

The sparse representation consists of three arrays called "row_index",
"column_index", and "count". The three arrays must have the same length. We also
need the row_dimension and the column_dimension specified as integers. For
intochromosomal data, we only need the upper triangular (or lower triangular)
part.

For those of you who are familiar with matlab, you can just create a mat file
containing these 5 items and SIMBA3D will be able to read that as a sparse
matrix input.

The default input for SIMBA3D is a json file containing these five keys. This
is chosen for the default because it is human readable and does not center
around a proprietary binary format.

Both the mat and json formats have an advantage that additional information
can be easily tagged along with the data.

# Dense Matrix Input Formats for SIMABA3D

The "pairwise_contact_matrix" and "population_contact_matrix" input file can
read various formats. The data can be stored as either a npy, npz, matlab, or
json file.

For .mat, simply create a matrix and name the variable either
"pairwise_contact_matrix" or "population_contact_matrix".

For .json, simply create a nested array (an array containing an ordered list
of arrays corresponding the the rows of a matrix) and name the variable either
"pairwise_contact_matrix" or "population_contact_matrix".

For .csv, simply create a comma separated data matrix with column entries
separated by commas and row entries separate by end line characters.

# Experiment

Within the data_inputs directory there are various input formats which can
be read by SIMBA3D. In the tasks sub-directory there are corresponding tasks
which load each corresponding format type. You can run them with the following
command.

> simba3d -i tasks/*

You should call this command from the directory which contains this readme file
since the tasks use relative paths.

This will begin to reconstruct things using various input examples.

You should get 6 identical results with different computation times. Use the
following command to generate a report to compare the results.
> simba3d-result-disp -p formats -i ./*.json

# Conclusion

There are many option and considerations for how you choose to interface with
SIMAB3D.


text:
---
layout: post
title:  "Weeknotes E12"
date:   2018-08-08
excerpt: "Healthy Start applications get sifted"
tag: [Department of Health and Social Care]
comments: false
---

# Weeknotes E12
Hi, I’m Colin a product manager working at the Department of Health and Social Care. Each week I’m going to keep a running update of the work I’ve done & things I’ve learned along the way.

## My current priority:
> Helping to procure a team capable of delivering the Healthy Start private beta.

## Wednesday
- got the list of suppliers for Health Start beta!! Next up to sift them...
- Went to product people event.
- added to our list of health tech companies
- began write up of an email to send to head honchos about service register stuff. Basically asking them to tell me what services we actually own in the department.

## Thursday
- did a first stab at measures of success for our Product People events
- Health procurement chats. Acronym-tastic!
- lunch and learn about briefings, submissions and went back into the world of Parliamentary Questions.
- Fleming Fund assessment report seems to have been agreed. To be published...
- Job panel-related tasks and scoring. Always fun to see [the ever-brilliant Lisa](https://twitter.com/lisa_e_scott?lang=en) for a chat.
- booked the room and sorted out the date for the next Product People event

## Friday
- created a healthy start stakeholder map using the agile team onion. Very much influenced by [Emily Webber](https://emilywebber.co.uk/agile-team-onion-many-pizzas-really-take-feed-team/).
- we prioritised who to target next and sent out emails to lawyers and colleagues in other departments
- we have a rough plan to blog and show and tell for other stakeholders
- [Sadiq Kahn promotes Healthy Start!](https://www.london.gov.uk/what-we-do/business-and-economy/food/have-your-say-draft-london-food-strategy) Thanks Sadiq. I’m free for a chat anytime.
- [Blog published!](https://digitalhealth.blog.gov.uk/2018/08/03/health-product-people-what-does-a-good-supplier-look-like/) Some nifty updates about working with suppliers! Thanks to all the speakers.
- chat about flexible working being set up.
- Talking about our list of health tech companies with interested parties

## Monday
- Annual leave. Enjoying the sunny British coast and a few hours in Exeter.
- [Fleming Fund report](https://digitalhealth.blog.gov.uk/2018/08/06/fleming-fund-beta-service-assessment/) published!

## Tuesday
- getting access to systems for recruitment purposes. Got a feeling this might be more complicated then applying for jobs.
- sifting prospective suppliers for Healthy Start beta. My eyes hurt. I did them all. In one day. Brain melting.
- chasing various HR people. Repeatedly. This recruitment admin is as hard as I suspected it would be.

## What I've been reading
This list is now quite a few weeks old! Sorry, I have a list of intersting things I've read and I'm going to do a bumper edition next week to clear house!

1. [Citizens Advice go beyond branding things digital](https://wearecitizensadvice.org.uk/to-take-the-next-step-on-digital-we-dropped-the-word-digital-14b09ec2f25f) want to make the experience of using Citizens Advice as seamless, easy, and effective as possible.
2. Australian Gov suggesting it needs [more in-house digital expertise and to out-source less](https://www.themandarin.com.au/95019-aps-must-stop-outsourcing-senate-digital-transformation-report/).
3. Re-read this about [when to do research and the questions you should ask yourself](https://pds.blog.parliament.uk/2018/05/14/are-you-ready-for-user-research/) by excellent ex-colleague.
4. What makes [good digital leadership](https://medium.com/ontariodigital/unreasonably-aspirational-leadership-in-a-digital-age-8dda4d07e0). Like the advice to embrace the chaos.
5. A [way to calculate risk](https://medium.com/@timination/risk-driven-scheduling-e6538c61bc87) on dicey projects.
6. [How Facebook makes its money](https://medium.com/@azeem/facebooks-attention-machine-explained-7547b10cb710). Nice infographic.
7. Great post on the [importance of building peoples technical intuition](https://medium.com/@alixtrot/technical-intuition-instincts-in-a-digital-world-a6bfda669a91) and not just try to teach them code.
8. [1 year at NHS Digital](https://blog.mattedgar.com/2018/06/06/look-after-the-water-reflections-1-year-into-my-work-at-nhs-digital/). Good set of commitments.

## Shout out to others doing great stuff
Former colleagues in Parliament write updates on the work they are doing. They are fantastic and if you are interested in anything democracy related then check them out:
- [The People team](https://ukparliament.github.io/sprintnotes.people/)
- [The Outputs team](https://ukparliament.github.io/sprintnotes.outputs/)
- [The Data and Search team](https://ukparliament.github.io/weeknotes.data-search/)
- [Utilities team](https://medium.com/@gemmarogers1)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: post
title: Simpson's Paradox
excerpt: "In 1973, UC Berkeley was sued for discrimination against women in graduate school admissions. If we take a closer look at the admissions data, we find that this is a case of Simpson's Paradox."
comments: false
categories: articles
share: true
tags: [statistics]
---

In 1973, UC Berkeley was sued for discrimination against women in graduate school admissions. The data of percent acceptance indisputably show that, if a male applies to Berkeley, he is more likely to be admitted than a female that applies (44% vs. 35%).

{:.center}

On the basis of this data, one may propose the causal conclusion that Berkeley is biased against females. However, this is just an example of Simpson's Paradox, a non-intuitive phenomena where a correlation that is present in several groups is the opposite of what is found when the groups are amalgamated together. In this example, a _group_ refers to a department at the university.

If we partition the data by department, we reveal that, in 4/6 of the departments, a female applicant is more likely to be accepted than a male applicant-- the opposite conclusion of Berkeley being biased against females! This is the paradox in Simpson's paradox: in the aggregate data, Berkeley appears biased against female applicants; when the data is partitioned by department, it does not. In the remaining two departments, the disparity between men and women is not as drastic as the amalgamated data above.

The reason that Berkeley appears biased against female applicants in the aggregated data set is because of a lurking variable that had not been considered when the law suit was filed, namely the distribution of the applications of males and females to the different departments. Let us look at the number of males and females that apply to each particular department. We see that the least competitive departments A and B are heavily dominated by male applicants, while the most competitive departments E and F are dominated by female applicants.

The reason that a significantly higher percentage of male applicants are accepted than women in the aggregated data is that _females applied to more competitive departments than the males did_. Thus, as a whole, it _was_ more likely that a male applicant would be accepted to Berkeley. But, this is because, according to the data, a female was more likely to apply to a department that has a lower average acceptance rate.

The Simpson's Paradox elucidates the need to be skeptical of reported statistics that may be drastically dependent upon how the data is aggregated [1] and to be aware of lurking variables that may negate a conclusion about what _causes _the correlations observed in data. Several other examples, such as batting averages, kidney stone treatments, and birth weights, of a real-life Simpson's paradox can be found on the Wikipedia page [2] where this data was taken from.

[1] P. J. Bickel, E. A. Hammel, J. W. O'Connell. Sex Bias in Graduate Admissions: Data from Berkeley. Science 187, (4175). 1975. pp. 398-404.

[2] [http://en.wikipedia.org/wiki/Simpson's_paradox](http://en.wikipedia.org/wiki/Simpson's_paradox)


text:
# Mining Multi-View Information: A Strong Self-Supervised Framework for Depth-Based 3D Hand Pose and Mesh Estimation

```
@inproceedings{ugcn_cvpr22,
title = {Mining Multi-View Information: A Strong Self-Supervised Framework for Depth-Based 3D Hand Pose and Mesh Estimation},
author = {Ren, Pengfei and Sun, Haifeng and Hao, Jiachang and Wang, Jingyu and Qi, Qi and Liao, Jianxin},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
pages = {20555--20565},
year = {2022}
}
```

links
- [openaccess](http://openaccess.thecvf.com//content/CVPR2022/html/Ren_Mining_Multi-View_Information_A_Strong_Self-Supervised_Framework_for_Depth-Based_3D_CVPR_2022_paper.html)

gha_language: Jupyter Notebook

gha_license_id: MIT


text:
# Kubernetes Mutating Webhook example

This shows a basic implementation of a mutating webhook.

## Setup

*Note: This relies on TLS certificates to function correctly. Soon that will be added to this repo for a full end-to-end working example.*

This example utilizes a local kind cluster.

```bash
$ make build
$ make build-image-kind
$ make push-kind
$ make deploy
```

## Cleanup

```bash
$ make cleanup
```

branch_name: refs/heads/main


text:
# README #

This is the generic starter theme for Shopify themes built on Slate v1 for FutureShirts. Most themes are either direct descendents of a version of this theme, or share heavy amounts of code with this theme.

## Caveats ##

It's important to note that *Shopify no longer supports Slate v1*. So at some point, this will only be a legacy tool. Hopefully, there'll be a way to continue using their new toolset, but for the time being, this is much better than old ThemeKit, and it may be forked in order to enable updates.

I attempt to update this theme when I add a new feature to its descendents. I try also to leave most updates non-destructive, and somewhat backwards-compatible. That said, updating an old theme to a newer version of the starter will always be a __manual process__, but copying code is better than re-writing!

## Using Slate ##

Slate (v1) can be found [here](https://shopify.github.io/slate/docs/about). Yes, it's at end-of-support, but it's actually usable still and can't really be beat at the moment.

- It's based around Webpack, and can be extended that way, but also has the same learning curve
- It's out of date, so it can only use Babel 6.26.3 for the moment, which is a problem I know! Luckily babel docs are still there for ver 6
- It also has to use NPM v11, not 12+. So make sure you're using `nvm use 11.0` or something like that.
- It has some odd behavior with image assets in CSS, so I avoid that for the most part. You can use them in .liquid files, but I never have luck using them in css files. Probably better to keep them configurable on the customizer anyway.
- It also has trouble with local SSL, so I manually accept the certificates after using mkcert as they direct you to in the Docs.
- I have never had success splitting code chunks too much, it doesn't seem to like that, so your bundles will be quite large (> 450kb). I think this is because the script tag in the theme.liquid file doesn't want to load too dynamically. That said, it's still pretty fast

## Using my theme! ##
I've made some customizations that I think are worth it.

- Please use the /scripts/modules folder for creating bundled code tied to html blocks. Then use `data-module=module-name` to load the code on a page.

repository: evankford/futureshop

gha_language: Liquid

repo_name: evankford/futureshop


text:
# projects-bot

A Discord bot used for processing project showcase submissions in [The Coding Den](https://discord.gg/code).

**NOTE:** This is an internal tool. As a result, no support will be provided for using this bot outside its intended environment.

## Development notes

### Setting up the development environment

1. Install dependencies: `npm i`
2. Create environment configuration file: `cp .env.example .env`
3. Edit the configuration: `nano .env`
4. Start TSC in watch mode: `npm run watch`
5. Start the bot: `npm start`

### Sending pull requests to this repository

This project uses [JavaScript Standard Style](https://standardjs.com). Please format your code accordingly.

Pull requests are automatically validated by GitHub Actions, and builds are required to pass for merging to be possible. It may pay off to run TSC (`npm run build`) and ESLint (`npm test`) before pushing your commits.


text:
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Clone `nanoutils` from `npm` with version '...'
2. Move on to method '....'

**Expected behavior**
A clear and concise description of what you expected to happen.

**Examples**
If applicable, add examples of code to help explain your problem.

repository: nanoutils/nanoutils

gha_language: JavaScript

repo_name: nanoutils/nanoutils


text:
### [CVE-2021-46835](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-46835)
![](https://img.shields.io/static/v1?label=Product&message=WS7200-10&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Traffic%20Hijacking&color=brighgreen)

### Description

There is a traffic hijacking vulnerability in WS7200-10 <IP_ADDRESS>. Successful exploitation of this vulnerability can cause packets to be hijacked by attackers.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/karimhabush/cyberowl

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
---
title: AdvancedPath.arcTo - Android Graphics Utilities
---

[Android Graphics Utilities](../../index.html) / [it.czerwinski.android.graphics](../index.html) / [AdvancedPath](index.html) / [arcTo](./arc-to.html)

# arcTo

`open fun arcTo(cx: `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)` = 0f, cy: `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)` = 0f, radius: `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, startAngle: `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, sweepAngle: `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, forceMoveTo: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)

Appends the specified arc of a circle to the path as a new contour.

If the start of the path is different from the path's current last point,
an automatic `lineTo()` is added to connect the current contour to the
start of the arc.

If the path is empty, a `moveTo()` is added with the first point of the arc.

### Parameters

`cx` - The x-coordinate of the center of the circle.

`cy` - The x-coordinate of the center of the circle.

`radius` - The radius of the circle.

`startAngle` - Starting angle of the arc measured in degrees.

`sweepAngle` - Sweep angle of the arc measured in degrees.

`forceMoveTo` - Set to `true`, if a `moveTo()` should always be added before the arc,
    instead of a `lineTo()`.

gha_language: SCSS


text:
# play-pdf
Learning about pdf generation and playing with various tools

# Learning about Pdf
## How to Calculate page size in inches or centimetres?

Tool to compute:  **https://docupub.com/pdfresize/**

The size of a PDF **is the number of pixels**, and is generally defined by the CropBox or MediaBox setting for each page.
This provides a set of 4 number (x,y,width,height) to define how big the page is.
A common value is [0 0 595 842] for an **A4** page .

**Standard dpi is 72 dots per inch.**
So we can convert the CropBox and MediaBox to inches by dividing these numbers by **72**. This gives us (8.26 x 11.69 inch).

**There are 2.54 centimetres per inch**.
So multiplying by this we get 20.99 x 29.7cm  (20.99 = 8.26x2.54)  (29.7 = 11.69x2.54)

### Formula:
Pixel to Inches:  NumOfPixels / 72
Inches to Cm:     NumOfInches * 2.54
Cm to Pixels:     NumOfCm * 72

## Size Info
### Letter Portrait (wxh)
Pixels: 612   x 792 pixel
Inches: 8.5   x 11 inch
Centi:  21.59 x 27.94 cm
Mili:   215.9 x 279.4 mm

### A4 Portrait (wxh)
Pixels: 595   x 842 pixel
Inches: 8.26  x 11.69 inch
Centi:  20.99 x 29.7 cm
Mili:   209.9 x 297.04 mm

### A5 Portrait (wxh)
Pixels: 420   x 595 pixel
Inches: 5.83  x 8.26 inch
Centi:  14.82 x 20.99 cm
Mili:   148.2 x 209.9 mm

repository: vantt/play-pdf

repo_name: vantt/play-pdf


text:
# Trax Viewer

A track and model viewer for Wild Trax/Stunt Race FX.

## Building

Trax Viewer has only been run on Linux. I plan to add multi-platform support.

Compiling requires [zigmod](https://github.com/nektro/zigmod) and a
[Zig](https://ziglang.org/) compiler. As Zig is a growing language, Trax
Viewer is designed to compile on the latest development versions of Zig. You
will also need OpenGL 3.3, GLFW 3, and freeglut.

```sh
zigmod fetch # fetches dependencies and creates a deps.zig
zig build    # builds Trax Viewer at zig-out/bin/trax_viewer
# alternatively, run `zig build -Drelease-fast` for an optimized build with
# less safety checks
```

## Usage

Currently, Trax Viewer requires use of both the command line and a graphical
interface. Run Trax Viewer with the path to the ROM, and a window should appear
as well as a CLI. The available commands can be seen with `help`.

### Camera Controls

- Middle mouse button: Rotate camera
- Middle mouse button + left shift: Move camera up-down and left-right
- Scroll wheel: Move camera forward and backward

## License

Trax Viewer is available under the MIT License.


text:
# cv2-alerting-with-mp4s-jpegs
![alt text](https://github.com/blewett/cv2-alerting-with-mp4s-jpegs/blob/main/images/street3.jpeg?raw=true)

This system is built on the Open Computer Vision module – usually referred to as cv2. Install it, after installing python, with the
following:

pip install opencv-python

cv2 is the bit that contains all of the magic.

![alt text](https://github.com/blewett/cv2-alerting-with-mp4s-jpegs/blob/main/images/street.jpeg?raw=true)

There is a wide interest in using video cameras for monitoring.  There are many commercial systems on the market that do this.  Most of those systems have a monthly subscription fee.  The fees cover Internet storage of videos and images (usually jpeg or mp4 format) and some form of alerting system.  The alerting systems send text messages or an emails when motion occurs in front the one or more cameras and have a system for group storage of images from multiple cameras.  The system contained here does all of this and requires no subscription fees.  Further, this system is under the control of the user, rather than a commercial entity.  Monitoring can be setup on most any computer with an attached video camera.

Recording starts when motion is detected.  Recording stops when motion ends.  There are options for scaling and tweaking the detection.  There are options for group storage on a machine of your choice and the storage machine can be local or one of your choosing on the Internet.  Email and text may be sent via gmail – thank you google.

The following is a sample invocation of the system:

python3 camera_monitor.py -write-jpgs

This will result in jpeg images being written to the current directory when motion occurs in front of the camera.  The default is to create mp4 videos and the -write-jpgs option overrides that.  There are many options that the user can set to change the behavior of the system.  The system provided defaults for options work for most people and need not be set to use the system.  Of course, the user has the python code and can modify it as they wish.

The repository contains python files for capturing motion events and php code for uploading those captured images.  There is a doc file and a README-camera.txt file that explains how to setup and use the system across platforms.

Doug Blewett

<EMAIL_ADDRESS>


text:
---
layout: post
title: Spack for Package Development Part 2
permalink: /spack2
cat: cs
---

Second in this series, this post focuses on *getting stared with environments*.

In the [previous post about package development with Spack](/spack1), we discussed the following points:

* Creating a private spack repository
* Maintaining private packages
* Maintaining forks of upstream packages

In the following post(s), we'll discuss the following in greater detail:

* Managing environments for reproducibility
* Using environments for development
* Using environments for continuous integration
* Managing configurations for distributed and multi-platform development

{% include disclaimer.html %}

## Managing Environments

One of the most useful features of Spack is it's support for [environments](https://spack.readthedocs.io/en/latest/environments.html).
An environment is a file describing a package or set of packages you wish to install, along with all of the spack configuration options you wish to use (see documentation linked above for more information).
In the previous post, we used an example package `FloodSimulation` and a corresponding repository - we'll continue with this example here.

When managing a complex and mutable set of dependencies, reproducibility is *extremely* important.
Spack environments allow the development team to document ***every single option*** they used to install a particular package or set of packages.
For example, let's say `FloodSimulation` has a few more dependencies: [HiOp](https://github.com/LLNL/hiop), [MAGMA](https://icl.cs.utk.edu/projectsfiles/magma/doxygen/index.html), CUDA > 10.1, and [PETSc](https://gitlab.com/petsc/petsc).
Each of these packages has many configuration and installation options, and you may even want to use versions of these packages installed by your system administrator.

Our `FloodSimulation` package may have a `package.py` file that looks like this:

```python

from spack import *
import os

class FloodSimulation(CMakePackage):
    homepage = "https://github.com/your-username/flood-simulation"
    git = "https://github.com/your-username/flood-simulation.git"
    version('1.0.0', tag='v1.0.0')
    depends_on('petsc')
    depends_on('hiop')
    depends_on('cuda@10.1:', when='+cuda')
    depends_on('magma', when='+cuda')

    def cmake_args(self):
        args = []
        if '+cuda' in self.spec:
            args.append('-DFLOODSIMULATION_ENABLE_CUDA=ON')
        return args

```

Let us also assume you *need* to install with your fork of the PETSc and HiOp spack packages, and that you'd like to use the MAGMA and CUDA installations provided by your system administrator or package manager.
In this case, you might have an environment file like this:

```yaml

# example-env.yaml
spack:
  specs:
  - floodsimulation ^floodsimulationrepo.petsc ^floodsimulationrepo.hiop
  view: true
  packages:
    magma:
      externals:
      - spec<EMAIL_ADDRESS>        prefix: /path/to/magma
      buildable: false
    cuda:
      externals:
      - spec<EMAIL_ADDRESS>        prefix: /path/to/cuda
      buildable: false

```

Constructing your spack environment from this file is easy as:

```

$ spack env create my-environment ./example-env.yaml
$ spack install

$ # To locate your new installation:
$ spack location -i floodsimulation

```

This way, if another developer needs to reproduce your development environment, you may distribute the environment file to perfectly recreate your installation.
I reccommend tracking your environments in version control along with the rest of your private spack repository with the following example directory layout:

```

floodsimulationrepo
├── environments
│   └── example-env.yaml
├── packges
│   ├── ipopt
│   │   └── package.py
│   └── floodsimulation
│       └── package.py
└── repo.yaml

```

## Using Spack Environments

In my opinion, the three most significant use cases for spack environments are:

1. Reproducible environments for development
1. Reproducing finicky errors
1. Continuous integration/testing

### Reproducible Environments for Development

With a complex codebase, onboarding often requires significant resources for new developers.
Gettings started with a new codebase can be challanging, especially when building the software stack in the first place can take up to several days.
I have found distributing a spack environment which is known to instantiate your software stack on a particular development machine to be a mostly frictionless method of getting new developers started on a codebase.
With the example environment file above, we specify instructions to instatiate the `FloodSimulation` software stack on a particular machine with a couple pre-installed packages.
If you are developing on many platforms and you need developers up and running on all platforms with a short turnaround time, distributing spack environments will likely be a suitable solution.

Extending the example above, the following directory structure is a suitable way to maintain spack environments to instatiate the `FloodSimulation` stack on multiple platforms.
Let's assume you want developers up and running on two clusters, Jupiter and Saturn, as well as OSX for local development:

```

floodsimulationrepo
├── environments
│   ├── jupiter
│   │   └── env.yaml
│   ├── saturn
│   │   └── env.yaml
│   └── osx
│       └── env.yaml
├── packges
│   ├── ipopt
│   │   └── package.py
│   └── floodsimulation
│       └── package.py
└── repo.yaml

```

In this way, you may simply instruct a new developer to run the following to get started with local development on a Mac:

```console

$ # in the directory `floodsimulationrepo`:
$ spack env create local-development ./environments/osx/env.yaml
$ spack install

$ # Any time the developer logs in to develop locally:
$ spack env activate local-development

```

And when they need to get started developing on the institutional cluster Jupiter:

```console

$ spack env create remote-development ./environments/jupiter/env.yaml
$ spack install

```

#### An Aside on Spack Views

If you didn't notice earlier, our environment file contains the line:

```yaml
  view: true
```

This means that when you activate your spack environment (`spack env activate <environment name>`), spack will use a "view" by defaul.
A view is a single installation prefix into which all packages installed via the environment are symbolically linked.

By default, spack views are installed to:
```
$SPACK_ROOT/var/spack/environments/<environment name>/.spack-env/
```
and the environment file is installed to
```
$SPACK_ROOT/var/spack/environments/<environment name>/spack.yaml
```

If our new developer activates her spack environment like so:

```console

$ spack env activate local-development
$ ls $SPACK_ROOT/var/spack/environments/local-development/.spack-env/lib
libmagma.so libhiop.so ...

```

she will have access to all of her newly installed libraries in a single installation prefix, automatically added to her `LD_LIBRARY_PATH` and `DYLD_LIBRARY_PATH`.

[The Spack command reference on views](https://spack.readthedocs.io/en/latest/command_index.html?highlight=view#spack-view) contains further information on this topic.

#### Back to Using Environments

Now that we have a feel for creating, using, and distributing spack environments, how do we develop with them?

As we saw in the aside on views above, activating a spack environment with the view option enabled (which is the default) adds the view to the user's path, library path, etc.
Assuming `FloodSimulation` is a CMake project (as we specified in the example spack package above) and we have written clean enough CMake to find external libraries, the workflow for building `FloodSimulation` should be relatively straightforward:

```console

$ git clone https://github.com/your-username/flood-simulation.git
$ mkdir build install
$ cd build

$ # At this step, cmake should be able to find all of your libraries in the
$ # spack view:
$ cmake ../flood-simulation -DCMAKE_INSTALL_PREFIX=$PWD/../insatll

$ # If some libraries are not found, simply run `spack location -i package`
$ # to find the prefix for the package, and add it manually with ccmake:

$ # Assuming magma is the package cmake failed to find, run this command and
$ # copy the path:
$ spack location -i magma

$ # Manually add the path to the magma installtion to cmake:
$ ccmake

$ make install

```

From here, developers may continue the edit-build-test cycle for `FloodSimulation`, knowing they are using the correct set of dependencies.

Read on for discussion on additional uses for environments you should consider incorporating into your workflow.

[Previous in this Series](/spack1)

[Next in this Series](/spack3)

{% include footer.html %}


text:
# TSFeatures

This folder contains the code that executes the API called `tsfeatures` and `calendartsfeatures`. The main code executed by `tsfeatures` is located in `features/make_features.py`. It's a module wrapping the library [tsfeatures](https://github.com/Nixtla/tsfeatures) and [tsfresh](https://github.com/blue-yonder/tsfresh).

By the other hand, the main code executed by `calendartsfeatures` is `calendar/make_holidays.py`.

You can run the modules using:

- `python -m calendar.make_holidays [PARAMS]`.

# Test code locally

1. Build the image using `make init`.
2. Test tsforecast code using `make test_tsfeatures`.


text:
# discord-rpc
Discord RPC with web ui.
Starting the script:
Open a command prompt to the directory you have installed discord-rpc in
In that command prompt, Type the following:
npm install
node .
Then your done! You can access the rpc console at https://localhost:8080
Set [custom presets](https://github.com/WeLikeToCodeStuff/discord-rpc/wiki/How-to-add-a-custom-preset-(as-of-now))
## TODO
- [x] ~~Style site~~
- [X] ~~Add button support/rewrite app.js~~
- [ ] Add an easy way to add presets

repository: havesomtea/discord-rpc-romeo

repo_name: havesomtea/discord-rpc-romeo


text:
# Gluon

Gluon is a tool to manage interoperable interfaces across language and DLL boundaries. Using an interface definition, written in C#, Gluon generates and maintains a C++ class that implements the equivalent interface, as well as an equivalent C# wrapper class, or C++ PIMPL wrapper, and all of the interoperability code in between. The result is a clean public-facing API, available in either C# or C++, without the need to mire the developer in API layer plumbing.

# Compatibility
The Gluon binary depends on .Net Framework 4.5.2.

Gluon build targets depend on the Gluon runtime and [Sharpish](https://github.com/ETLang/Sharpish).

# Guide
Refer to the [API Documentation](https://codedocs.xyz/ETLang/Gluon/)

# License
 Sharpish is licensed under the MIT license.
 Copyright (c) 2020 Evan Lang

 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: ETLang/Gluon

gha_language: C#

repo_name: ETLang/Gluon


text:
---
layout: post
title: The Joel Test - Updated
guest_author:
  name: Imran Shakir
  url: https://github.com/ishakir
---

## Our List

- Do you maintain a prioritised backlog of user stories?
- Do you build on every commit?
- Do developers get feedback from the build as soon as failures occur?
- Are you confident enough to deliver if your build passes?
- Do you get feedback from actual users while developing new features?
- Do you have bug tracking and task management integrated with source control?
- Is your infrastructure fully automated?
- Do new candidates write code during their interview?
- Do you use the best tools money can buy?
- Do programmers have quiet working conditions + easy collaboration with everyone in the team?
- Is each team responsible for their own dev, test and ops?
- Do you fix bugs and technical debt before writing new code?


text:
# :round_pushpin::arrow_double_up::checkered_flag:Wall Jump

Followed: [An Introduction to Unity ML-Agents](https://towardsdatascience.com/an-introduction-to-unity-ml-agents-6238452fcf4c)

## The Wall Jump Environment

3 situations:

* **No wall**. The agent simply needs to go to the green tile.
* **Small wall**. The agent needs to learn to jump in order to reach the green tile.
* **Big wall**. The agent will not be able to jump as high as the wall is so it needs to push the white block in order to jump on it to be able to jump over the wall.

## Policies

* **SmallWallJump**. Learned during the no wall and low wall situations.
* **BigWallJump**. Learned during the high wall situations.

## Reward system

* **-0.005** for every step.
* **+1** if the agent reaches the green tile.
* **-0.01** if the agent falls.

Goal: mean reward of 0.8

## Action space

* **Forward Motion**: UP / DOWN / NO ACTION
* **Rotation**: ROTATE LEFT / ROTATE RIGHT / NO ACTION
* **Side Motion**: LEFT / RIGHT / NO ACTION
* **Jump**: JUMP / NO ACTION

## Training

1. Remove the brains from the agent.
2. Modify the total training steps for the two policies.
3. Set the training parameters in the WallJump.yaml file stored at config/ppo.
4. Start training (command line)

```command line
mlagents-learn config/ppo/WallJump.yaml --run-id=”WallJump_FirstTrain”
```

5. Run the Unity scene by  pressing the ▶ button at the top of the Editor.
6. Observe training with tensorboard

```command line
tensorboard --logdir results --port 6006
```

7. When the training is finished move the saved model files contained in /results to (Unity project folder)/Assets/ML-Agents/Examples/WallJump/TFModels.
8. Drag the .nn files to the corresponding Placeholders:
   * In Agent Behavior Parameters, SmallWallJump.nn to Model Placeholder.
   * SmallWallJump.nn file to No Wall Brain Placeholder.
   * SmallWallJump.nn file to Small Wall Brain Placeholder.
   * BigWallJump.nn file to No Wall Brain Placeholder.

path: /Unity ML Agents/README.md


text:
# rainbow-ride

Explaining Rainbow DQN with PyTorch

## What is Rainbow Ride?

Rainbow Ride is a collection of PyTorch implementations of DQN papers (DQN, DDQN, PER, Dueling, Distributional, NoisyNet, Rainbow). Each implementation contains both Python scripts (`.py`) and Jupyter Notebooks (`.ipynb`). The Jupyter notebook explains the code in the Python script files for those unfamiliar with PyTorch or DQN.

To accommodate those without GPU, we use the simplest possible environment: **CartPole**. Those who have a GPU might want to use **Pong** or other Atari 2600 game environments for a better comparison with the results shown in the DQN papers.

## Installation via Conda

First, install packages using the `environment.yml` file in root.

```
conda create env -f environment.yml
```

Then, find the appropriate version of `pytorch` and `torchvision` from [pytorch.org](https://pytorch.org/) and install it.

repository: seungjaeryanlee/rainbow-ride

repo_name: seungjaeryanlee/rainbow-ride


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [@anglr/rest](./rest.md) > [buildMiddlewares](./rest.buildmiddlewares.md)

## buildMiddlewares variable

Builds and returns array of middleware run functions

<b>Signature:</b>

```typescript
buildMiddlewares: BuildMiddlewaresFn
```


text:
---
layout: page
title: "About php.js"
date: 2012-09-26 17:18
comments: true
sharing: false
footer: true
alias:
- /pages/contact
---

php.js is a resource that offers community-built JavaScript alternatives to PHP functions.

**Why on earth would you port php to js?**

 - to see if we can
 - to learn JavaScript
 - to help others learn JavaScript
 - to see how a php scripts perform with V8 strapped on their backs
 - to profit from helpful functions like:
[strip_tags](http://phpjs.org/functions/strip_tags/),
[strtotime](http://phpjs.org/functions/strtotime/),
[md5](http://phpjs.org/functions/md5/),
[strftime](http://phpjs.org/functions/strftime/),
[number_format](http://phpjs.org/functions/number_format/),
[wordwrap](http://phpjs.org/functions/wordwrap/),
[vsprintf](http://phpjs.org/functions/vsprintf/), and
[date](http://phpjs.org/functions/date/), that are too high-level for JavaScript.

PHP is a language with many high-level functions and while they're not always
implemented as consistently as we'd like (mimicking their underlying C parts),
they do get many programming jobs done without the need for additional libraries
or abstractions.

We recognize JS has beautiful language features, and we encourage you to learn them.
Never let php.js be an excuse not to.

That said, we do think it's a challenge to port everything and decided to also port
low-level PHP functions like
[strpos](http://phpjs.org/functions/strpos/)
that have perfectly fine (and more performant!) JavaScript
counterparts ([String.indexOf](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/indexOf) in this case).

Besides the geeky-challenge of seeing how far we could come, porting ALL THE THINGS also
opens up php.js to other fun experiments such as realtime in-browser debugging/running of
PHP code, or running `.php` files with JavaScript engines such as V8.

php.js also is a reference for PHP developers wanting to see how
something can be done in JavaScript.

And so we see ourselves as this big resource and leave it up to the developer
to decide what makes sense to take from it.

And what not.

Going by [The McDonald's Theory](https://medium.com/what-i-learned-building/9216e1c9da7d)
we have plently of functions online that aren't perfect just yet.
If you know better ways, just send us a pull request : )

## Contributing

We use [GitHub](http://github.com/kvz/phpjs) for collaboration. Comments are for remarks only.
Please adhere to our [coding standards](http://nodeguide.com/style.html) before
sending a pull request.

## Licensing

php.js is licensed under the MIT licenses.

The MIT license allows you to use the library as you see fit (even in commercial projects) as long as you redistribute original the license with it. You're not obligated to share your improvements, but obviously that would be greatly appreciated and ensure you won't lose your changes after you upgrade.

	Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io)
	and Contributors (http://phpjs.org/authors)

	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: tonijurado/alae

extension: markdown

repo_name: tonijurado/alae


text:
---
hrs_structure:
  division: '1'
  volume: '6'
  title: '19'
  chapter: 327G
  section: 327G-6
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0327G-0006
    parent: HRS0327G
    name: 327G-6 Withdrawal of agent; rescission of withdrawal
weight: 31030
title: Withdrawal of agent; rescission of withdrawal
full_title: 327G-6 Withdrawal of agent; rescission of withdrawal
---
**[§327G-6] Withdrawal of agent; rescission of withdrawal.** (a) An agent may withdraw by giving notice to the principal, if the principal has capacity at the time. If the principal lacks capacity, the agent may withdraw by giving notice to the supervising health care provider or health care institution. The supervising health care provider or health care institution shall promptly record the withdrawal, including the date and time of the withdrawal, in the principal's medical record.

(b) An individual who has withdrawn under subsection (a) may rescind the withdrawal by executing and dating a written acceptance of the designation as agent after the date of the withdrawal. An individual who rescinds a withdrawal shall give notice and a copy of the written acceptance to the principal, if the principal has capacity at the time. If the principal lacks capacity, the individual who rescinds a withdrawal shall give notice and a copy of the written acceptance to the supervising health care provider or health care institution. The supervising health care provider or health care institution shall promptly record the rescission, including the date and time of the rescission, in the principal's medical record and make the written acceptance a part of the principal's medical record. [L 2004, c 224, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Sensors Monitor

![Demo stand](demo.jpg)

# Hardware

* Arduino Uno (or compatibility)
* LCD 2004 with I2C

# Visual Studio Project

You have to change code of `Sync` method in `MainForm.cs` file for your PC configuration. My CPU is Ryzen 2700 and graphic card is GeForce GTX 1660S.

# Arduino Project

See `ArduinoProject\ArduinoProject.ino`.

# Third party

* OpenHardwareLibrary - https://github.com/openhardwaremonitor/openhardwaremonitor
* App icon - thanks to [@woodyart](https://github.com/woodyart)

# Materials

* Arduino PC Monitor - https://www.hackster.io/zakrzu/arduino-pc-monitor-66c07a

repository: s-mokrushin/sensors-monitor

repo_name: s-mokrushin/sensors-monitor


text:
description: get_positional_index and get_index_from_end methods.

<meta itemprop="name" content="expression_impl.index" />
<meta itemprop="path" content="Stable" />

# Module: expression_impl.index

    View source on GitHub

get_positional_index and get_index_from_end methods.

The parent_index identifies the index of the parent of each element. These
methods take the parent_index to determine the relationship with respect to
other elements.

#### Given:

```
session: {
  event: {
    val: 111
  }
  event: {
    val: 121
    val: 122
  }
}

session: {
  event: {
    val: 10
    val: 7
  }
  event: {
    val: 1
  }
}
```

```
get_positional_index(expr, path.Path(["event","val"]), "val_index")
```

yields:

```
session: {
  event: {
    val: 111
    val_index: 0
  }
  event: {
    val: 121
    val: 122
    val_index: 0
    val_index: 1
  }
}

session: {
  event: {
    val: 10
    val: 7
    val_index: 0
    val_index: 1
  }
  event: {
    val: 1
    val_index: 0
  }
}
```

```
get_index_from_end(expr, path.Path(["event","val"]), "neg_val_index")
```
yields:

```
session: {
  event: {
    val: 111
    neg_val_index: -1
  }
  event: {
    val: 121
    val: 122
    neg_val_index: -2
    neg_val_index: -1
  }
}

session: {
  event: {
    val: 10
    val: 7
    neg_val_index: 2
    neg_val_index: -1
  }
  event: {
    val: 1
    neg_val_index: -1
  }
}
```

These methods are useful when you want to depend upon the index of a field.
For example, if you want to filter examples based upon their index, or
cogroup two fields by index, then first creating the index is useful.

Note that while the parent indices of these fields seem like overhead, they
are just references to the parent indices of other fields, and are therefore
take little memory or CPU.

## Functions

[`get_index_from_end(...)`](../expression_impl/index/get_index_from_end.md): Gets the number of steps from the end of the array.

[`get_positional_index(...)`](../expression_impl/index/get_positional_index.md): Gets the positional index.

gha_language: Python


text:
## Package for convert English number to Bangla and vice versa.

### Features

- Convert english number to bangla number
- Convert bangla number to english number
- Basic summation, subtraction numerical operation

### Installation

Go to terminal and run this command

```shell
composer require larabangla/lara-bangla-number
```

Wait for few minutes. Composer will automatically install this package for your project.

### Quick Usages

After installation, go to your laravel controller where to use it. And add this

```php
use larabangla\gonit;
```

Now you can use it by creating its object

```php
$data = array('১১','১২',15,'৭.৫৬','১,৫০৫');
$bn = new gonit();
$bangla_total = $bn->sum($data);
```

### Available function

| Function Name        |   Details    |
| -------------------- |  :---------- |
| convertToBN($array)  | Given parameter must be an array, which can contain number, string numeric value in it. [e.g. array(11, 2.256, '5.578', 78, 98, '1,205') Or, array(11, 2.256, 78, 98) Or, array('11', '2.256', '5.578', '1,205')|
| convertToEN($array)   |  Given parameter must be an array, which value must be string numeric. [e.g. array('১১', '১২', '৭.৫৬', '১,৫০৫') ]  |
| sum() |   It accept array as a parameter or you can pass multiple value separated by comma(,). By default it return result in bangla, you can pass last parameter value 'bn' or 'en' for your desire result language. [ **N:B:** you can only pass one array and it can not be multi-dimensional ] |
| sub() |   Same as sum() function |

### Examples

sum() / sub() function and their parameter:

```php

    sum(11, 2.256, '5.578', 78, 98, '1,205','bn');
    Or,
    sum('১১', '১২', 105, '১,৫০৫','en');
    Or,
    sum(11, 2.256, '৭.৫৬', '১,৫০৫');
    Or,
    sum([11, 2.256, '৭.৫৬', '১,৫০৫'],'en');
    Or,
    sum([11, 2.256, 56, 1205]);

```

### Credits

- [Mahmudul Hasan Zahid](https://github.com/mhzahid)

### License

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

repository: mhzahid/larabangla

gha_language: PHP

repo_name: mhzahid/larabangla


text:
# [Assemble Documentation](http://assemble.io/)

*The documentation for Assemble is currently in the process of a major revision! Before creating an issue related to a bug on the current site, please check to make sure that one does already exist. If you are interested in contributing to the next release of the site, please let us know.*

## Contributing

All contributions are welcome! The simplest way to show your support for this project is to **"star" it**. Please see [Contributing to Assemble](http://assemble.io/contributing) for more information.

## Authors

**Jon Schlinkert**

+ [http://twitter.com/jonschlinkert](http://twitter.com/jonschlinkert)
+ [http://github.com/jonschlinkert](http://github.com/jonschlinkert)

**Brian Woodward**

+ [http://twitter.com/doowb](http://twitter.com/doowb)
+ [http://github.com/doowb](http://github.com/doowb)

## Copyright and license
Copyright (c) 2015 Assemble
Released under the [MIT License](LICENSE-MIT).


text:
# Project Description

## The goal
Just to mark up the landing page by following the graphic designs.
Client asked to separate CSS files as well as to avoid the using of SVG sprite, because their URLs will be defined in CMS panel.

## Tools used
GIT / Gulp

live preview: https://rockfield.github.io/upwork/dorofeev/index.html

license: Unlicense

repository: PhilippBaranovskiy/upwork

repo_name: PhilippBaranovskiy/upwork


text:
---
layout: post
title: 'staying connected in times of disconnection'
date: '2017-08-13T11:13:00-04:00'
tags:
- 45
- connection
- charlie schaeffer
- sourdough
- worms
- vermicompost
- seeds
- gardening
- agriculture
- kombucha
---

this weekend (like many other weekends, and days, and weeks), white supremacists are on the loose ([particularly in charlottesville, virgina](https://www.nytimes.com/2017/08/13/us/charlottesville-protests-unite-the-right.html?hp&action=click&pgtype=Homepage&clickSource=story-heading&module=b-lede-package-region&region=top-news&WT.nav=top-news)). they are more on the loose lately because of [45's lack of desire to alienate portions of his base](https://www.nytimes.com/2017/08/13/opinion/trump-charlottesville-hate-stormer.html).

many folks i know are doing things in response. my response is to write quietly in my corner while i rest and prepare to focus and work hard this week. some may call this selling out. that's fine. it's what feels right to me.

the resting and prep stuff is all private, but the what i wanted to write about was this:

in times like these when there is so much that could tear us apart (including disagreements about which group(s) to thank for the "unite the right" rally being shutdown before it could start), i'm thinking about methods and tools for connecting us to each other.

i'm thinking of my friend charlie's artwork (which i've written about [here](http://interactioninstitute.org/feeling-orlando/) and [here](http://colabradio.mit.edu/connecting-and-weaving-then-now-and-in-the-future/)). i'm also thinking about four other very specific vehicles:

### 1. kombucha [scobys](https://en.wikipedia.org/wiki/SCOBY)

i've been making kombucha and giving up scoby children for several years now. i can think of at least five people who have scobys from me. in this way, i am connected to those folks and them to me.

### 2. sourdough starter

similar to above, i've given away some of my sourdough starter to probably five people. i got it from an academic advisor of mine, who got it from her father who got it from his father. the grandfather supposedly would keep some on his person at all times, even when he traveled... to keep it safe and the right temperature, and also to be able to make bread whenever he wanted. our guts (and everyone who has ever eaten bread from this starter) are connected in that way.

### 3. seeds i save

i try to save some seeds from everything i grow every year. it saves money for the next season and it lets me share seeds with folks in my community. i lost a big chunk of my collection in a recent move, but i've still got some heirloom tomatoes (gifted from some old italians in somerville), basil, arugula, and a few others.

### 4. worms

i have a worm compost bin and i've given worms to at least three people. in this way, our worm bins are parts of the same initial population. the creatures that help us turn our food waste into useful soil supplements are related.

---

so yea. i think the antidote to disconnection is connection. we can (and must) continue to connect. even in ways that don't seem so obvious.

<!-- hyperlink bank -->

**words / writing / post-processing**
447w / 16min / 8min


text:
# Valheim server on Azure Container Instances

Valheim server running in Azure Container Instances.

## Docker Image

* lloesche/valheim-server ([Docker Hub](https://hub.docker.com/r/lloesche/valheim-server), [GitHub](https://github.com/lloesche/valheim-server-docker))

## Reference Materials

* Azure Docs: [Tutorial: Create and deploy first Azure Resource Manager Bicep file](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/bicep-tutorial-create-first-bicep?tabs=azure-powershell)
* Azure Docs: [What is Azure Container Instances?](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-overview)
* Azure Docs: [Mount an Azure file share in Azure Container Instances](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files)

repository: tylerd/valheim-aci

repo_name: tylerd/valheim-aci


text:
# Single Responsibility

* a class should have only one reason to change
* if there are more reasons to change for a class, it has to be split in two classes

> _Every module, class or function in a computer program should have responsibility over a single part of that program's functionality, and it should encapsulate that part. All of that module, class or function's services should be narrowly aligned with that responsibility._ - Wikipedia

repository: abdullayevbahrom/oop-principles

repo_name: abdullayevbahrom/oop-principles


text:
---
title: OR1K Marocchino A Tomasulo Implementation
layout: post
date: 2019-10-21 15:37
categories: [ hardware, embedded, openrisc ]
---

*This is an ongoing series of posts on the Marocchino CPU, an open source out-of-order
[OpenRISC](https://openrisc.io) cpu.  In this series we are reviewing the
Marocchino and it's architecture.  If you haven't already I suggest you start of
by reading the intro in [Marocchino in Action]({% post_url 2019-06-11-or1k_marocchino %}).*

In the last article, *Marocchino Instruction Pipeline* we discussed the
architecture of the CPU.  In this article let's look at how Marocchino achieves
out-of-order execution using the [Tomasulo algorithm](https://en.wikipedia.org/wiki/Tomasulo_algorithm).

## Achieving Out-of-Order Execution

In a traditional pipelined CPU the goal is retire one instruction
per clock cycle.  Any pipeline stall means an execution clock cycle will be lost.
One method for reducing the affect of pipeline stalls is instruction parallelization.  In 1993
the Intel [Pentium](https://en.wikipedia.org/wiki/P5_(microarchitecture))
processor was one of the first consumer CPUs to achieve this with it's [dual U
and V integer pipelines](https://arstechnica.com/features/2004/07/pentium-1/).
The pentium U and V pipelines require [certain coding
techniques](http://oldhome.schmorp.de/doc/opt-pairing.html) to take full
advantage.  Achieving more parallelism requires more sophisticated data hazard
detection and instruction scheduling.  Introduced with the IBM System/360 in the
60's by Robert Tomasulo, the *Tomosulo Algorithm* provides the building blocks to
allow for multiple instruction execution parallelism.  Generally speaking no special programming is needed to
take advantage of instruction parallelism on a processor implementing Tomasulo
algorithm.

![Tomasulo's algorithm](/content/2019/Algorithme_de_Tomasulo.png)

Though the technique of out-of-order CPU execution with Tomasulo's algorithm had
been designed in the 60's it did not make its way into popular consumer hardware
until the [Pentium Pro](https://en.wikipedia.org/wiki/Pentium_Pro) in the 1995.
Further Pentium revisions such as the Pentium III, Pentium 4 and Core
architectures are based on this same architecture.  Understanding
this architecture is a key to understanding modern CPUs.

In this article we will point out comparisons between the Marocchino and Pentium pro
who's architecture can be seen in the below diagram.

![pentium pro diagram](/content/2019/pentium-pro.png)

The Marocchino implements the Tomasulo algorithm in a CPU that can be synthesized
and run on an FPGA.  Let's dive into the implementation by breaking down the
building blocks used in Tomasulo's algorithm and how they have been implemented in
Marocchino.

## Tomasulo Building blocks

Besides the basic CPU modules like Instruction Fetch, Decode and Register File,
the building blocks that are used in the Tomasulo algorithm are as follows:

 - [Reservation Station](https://en.wikipedia.org/wiki/Reservation_station) - A
   queue where decoded instructions are placed before they can be
   executed.  Instructions are placed in the queue with their decoded operation
   and available arguments.  If any arguments are not available the reservation
   station will wait until the arguments are available before executing.
 - Execution Units - The execution units include the Arithmetic
   Logic Unit (ALU), Memory Load/Store Unit or FPU is responsible for performing
   the instruction operation.
 - [Re-order Buffer](https://en.wikipedia.org/wiki/Re-order_buffer) (ROB) - A ring
   buffer which manages the order in which instructions are retired.  In Marocchino
   the implementation is slightly simplified and called the Order Control Buffer (OCB).
 - Instruction Ids - As an instruction is queued into the ROB, or OCB in Marocchino
   it is assigned an Instruction Id which is used to track the instruction in different
   components in Marocchino code this is called the `extaddr`.
 - Register Allocation Table (RAT) - A table used for data hazard resolution.
   The RAT table has one cell per OpenRISC general purpose register, 32 entries.
   Each RAT cell indicates if a register is busy being produced by a queued
   instruction and which instruction will produce it.
 - Common Data Bus - Execution units present their result to all reservation stations
   along with the register file.  Writing to the reservation station provides
   immediate resolution of data hazards.  The link between execution units,
   reservation stations and register file is referred to as the common data bus.

The below diagram shows how these components are arranged in the Marocchino processor.

![marocchino pipeline diagram](/content/2019/marocchino-pipeline-tomasulo.png)

### Resolving Data Hazards

As mentioned above the goal of a pipelined architecture is to retire one
instruction per clock cycle.
[Pipelining](https://en.wikipedia.org/wiki/Instruction_pipelining) helps achieve
this by splitting an instruction into pipeline stages i.e. Fetch, Decode,
Execute, Load/Store and Register Write Back.  If one instruction depends on the
results produced by a previous instruction will be a problem as register
write back of the previous instruction may not complete before registers are
read during the Decode phase of a instruction.  This and other types of dependencies
between pipeline stages are called
[hazards](https://en.wikipedia.org/wiki/Hazard_(computer_architecture)), and
they must be avoided.

The Tomasulo algorithm with its Reservation Stations, Register Allocation Tables
and other building blocks try to avoid hazards causing pipeline stalls.  Let's look
at a simple example to see how this is done.

 - instruction 1 - `b = a * 2`
 - instruction 2 - `x = a + b`
 - instruction 3 - `y = x / y`

Here we can see that `instruction 2` depends on `instruction 1` as the addition
of `a + b` cannot be performed until `b` is produced by `instruction 1`.

Let's assume that `instruction 1` is currently executing on the `MULTIPLY` unit.
The CPU decodes `instruction 2`, instead of detecting a data hazard and stalling
the pipeline `instruction 2` will be placed in the reservation station of the
`ADD` execution unit.  The RAT indicates that `b` is busy and being produced by
`insruction 1`.  This means `instruction 2` cannot execute right away.  Next, we
can look at `instruction 3` and place it onto the reservation station of the
`DIVIDE` execution unit.  As `instruction 3` has no hazards for `x` and `y` it
can proceed directly to execution, even before `instruction 2` is ready for
execution.

Note, if a required reservation station is full the pipeline will stall.

### Register Renaming

As mentioned above, execution units will present their output onto the common
data bus `wrbk_result` and the data will be written into reservation stations.
Writing the register to the reservation station may occur before writing
back to the register file.  This is what register renaming is, as the
register input does not come directly from the register file.

### Instruction Id

When an instruction is issued it may be registered in the RAT, OCB and Reservation
Station.  It is assigned an Instruction Id for tracking purposes.  In Marocchino
this is called the `extadr` and is `3` bits wide. It is generated by the simple
instruction ID generation logic.

The is implemented in [or1k_marocchino_oman.v](https://github.com/openrisc/or1k_marocchino/blob/master/rtl/verilog/or1k_marocchino_oman.v#L291) with the following counter
logic which generates a new `extadr` every time an instruction is decoded.

```verilog
  // extension to DEST, FLAG or CARRY
  // Zero value is reserved as "not used"
  localparam [DEST_EXTADR_WIDTH-1:0] EXTADR_MAX = ((1 << DEST_EXTADR_WIDTH) - 1);
  localparam [DEST_EXTADR_WIDTH-1:0] EXTADR_MIN = 1;
  // ---
  reg  [DEST_EXTADR_WIDTH-1:0] dcod_extadr_r;
  wire [DEST_EXTADR_WIDTH-1:0] extadr_adder;
  // ---
  assign extadr_adder = (dcod_extadr_r == EXTADR_MAX) ? EXTADR_MIN : (dcod_extadr_r + 1'b1);
  // ---
  always @(posedge cpu_clk) begin
    if (pipeline_flush_i)
      dcod_extadr_r <= {DEST_EXTADR_WIDTH{1'b0}};
    else if (padv_dcod_i)
      dcod_extadr_r <= fetch_valid_i ? extadr_adder : dcod_extadr_r;
  end // @clock
  // support in-1clk-unit forwarding
  assign dcod_extadr_o = dcod_extadr_r;
```

Every instruction that is queued by the order manager is designated
an `extadr`.  This allows components like the reservation station and RAT tables
to track when an instruction starts and completes executing.

The interactions between the `extadr` and other components are as follows.

During decode:

 - the ID generator generates the `extaddr` by incrementing a counter.
 - the OCB registers the `extaddr` along with other decoded instruction details
 - the RAT registers an `extaddr` for the decoded instruction to indicate which
   instruction will resolve a hazard.

During execution:

 - the OCB broadcasts the `extaddr` of the oldest instruction registered in a FIFO
   fashion.  This is to indicate which instruction is to be retired and ensures
   instructions are retired in order.
 - the RAT outputs the `extaddr` indicating which queued instruction will produce a register
 - the RAT receives an `extaddr` from the OCB output to clear allocation flags
 - the Reservation Station receives the `extaddr` with hazards to track when
   instructions have finished and results are available.

### Register Allocation Table

The register allocation table (RAT), sometimes called register alias table, keeps
track of which registers are currently in progress of being generated by pending
instructions.  This is used to derive and resolve hazards.

The outputs of the RAT cell are:

 - `rat_rd_extadr_o` - indicates which `extadr` instruction has been allocated to
                       generate this register.
                       This will be updated with `decod_extadr_i` when `padv_exec_i` goes high.
 - `rat_rd_alloc_o` - indicates that this register is currently allocated to an
                      instruction which is not yet complete.
                      This will be **set** when `padv_exec_i` goes high, `decod_rfd_we_i` is high,
                      and `dcod_rfd_adr_i` is equal to `GPR_ADR`.

![marocchino RAT Cell diagram](/content/2019/marocchino-ratcell.png)

The RAT table is made of 32 `rat_cell` modules;  one cell per register.  The
register which the cell is allocated to is stored within `GPR_ADR` in the rat
cell.

![marocchino RAT diagram](/content/2019/marocchino-rat.png)

Outputs of the RAT are registered to reservation stations.  The hazards are
derived with the following logic in [or1k_marocchino_oman.v](https://github.com/openrisc/or1k_marocchino/blob/master/rtl/verilog/or1k_marocchino_oman.v#L471).

The `omn2dec_hazard_d1a1_o` hazard means that the argument `a` of the decoded
instruction will be resolved when the instruction with `extadr` in `omn2dec_extadr_dxa1_o` is
retired.  The `2` in `d2`, `a2` and `b2` represent the 2nd register used in 64-bit
FPU instructions.

```verilog

  //  # relative operand A1
  assign omn2dec_hazard_d1a1_o = rat_rd1_alloc[dcod_rfa1_adr_i] & dcod_rfa1_req_i;
  assign omn2dec_hazard_d2a1_o = rat_rd2_alloc[dcod_rfa1_adr_i] & dcod_rfa1_req_i;
  assign omn2dec_extadr_dxa1_o = rat_extadr[dcod_rfa1_adr_i];
  //  # relative operand B1
  assign omn2dec_hazard_d1b1_o = rat_rd1_alloc[dcod_rfb1_adr_i] & dcod_rfb1_req_i;
  assign omn2dec_hazard_d2b1_o = rat_rd2_alloc[dcod_rfb1_adr_i] & dcod_rfb1_req_i;
  assign omn2dec_extadr_dxb1_o = rat_extadr[dcod_rfb1_adr_i];
  //  # relative operand A2
  assign omn2dec_hazard_d1a2_o = rat_rd1_alloc[dcod_rfa2_adr_i] & dcod_rfa2_req_i;
  assign omn2dec_hazard_d2a2_o = rat_rd2_alloc[dcod_rfa2_adr_i] & dcod_rfa2_req_i;
  assign omn2dec_extadr_dxa2_o = rat_extadr[dcod_rfa2_adr_i];
  //  # relative operand B2
  assign omn2dec_hazard_d1b2_o = rat_rd1_alloc[dcod_rfb2_adr_i] & dcod_rfb2_req_i;
  assign omn2dec_hazard_d2b2_o = rat_rd2_alloc[dcod_rfb2_adr_i] & dcod_rfb2_req_i;
  assign omn2dec_extadr_dxb2_o = rat_extadr[dcod_rfb2_adr_i];
```

### Reservation Stations

![marocchino reservation station diagram](/content/2019/marocchino-rsrvs.png)

The reservation station receives an instruction from the decode stage and queues
it until all hazards are resolved and the execution unit is free.

Each reservation station has one busy slot and one execution slot.  In the
Pentium Pro there were 20 reservation station slots, the Marocchino has 5 or 10
depending if you count the execution slots.

Reservation stations are populated when the pipeline advance `padv_rsrvs_i` signal comes.
An instruction may be forwarded directly to execution if there are no hazards
and the execution unit is free.

 - `busy_extadr_dxa_r` - is populated with data from `omn2dec_hazards_addrs_i`.  The `busy_extadr_dxa_r`
   register represents the `extadr` to look for which will resolve the A register hazard.
 - `busy_extadr_dxb_r` - same as 'A' but indicates which `extadr` will produce the B register.

 - `busy_hazard_dxa_r` - is populated with data from `omn2dec_hazards_flags_i`.  The `busy_hazard_dxa_r`
   register represents that there is an instruction executing that will produce register A
   which has not yet completed.
 - `busy_hazard_dxb_r` - same as 'A' but indicates that 'B' is not available yet.

 - `busy_op_any_r` - populated with `1` when `padv_rsrvs_i` goes high indicates that
   there is an operation queued.
 - `busy_op_r` - populated with `dcod_op_i`. Represents the operation pending in the queue.
 - `busy_rfa_r` - populated with data from `dcod_rfxx_i`. Represents the value of operand A pending in the queue.
 - `busy_rfb_r` - populated with data from `dcod_rfxx_i`. Represents the value of operand B pending in the queue.

The reservation station resolves hazards by watching and comparing `wrbk_extadr_i`
with the `busy_extadr_dxa_r` and `busy_extadr_dxb_r` registers.  If the two match
it means that the instruction producing register A or B has finished writing back
its results and the hazard can be cleared.

Writeback forwarding is handled via the following verilog multiplexer and register logic.
The first bit is used to register the decoded values `dcod_rf*` from the register
file otherwise we watch for inputs from the forwarding logic.  If there is a pending hazard
results are forwarded from the common data bus, otherwise results are maintained.

```verilog
  // BUSY stage operands A1 & B1
  always @(posedge cpu_clk) begin
    if (padv_rsrvs_i) begin
      busy_rfa1_r <= dcod_rfa1;
      busy_rfb1_r <= dcod_rfb1;
    end
    else begin
      busy_rfa1_r <= busy_rfa1;
      busy_rfb1_r <= busy_rfb1;
    end
  end // @clock

  // Forwarding
  //  operand A1
  assign busy_rfa1 =  busy_hazard_d1a1_r ? wrbk_result1_i :
                     (busy_hazard_d2a1_r ? wrbk_result2_i : busy_rfa1_r);
  //  operand B1
  assign busy_rfb1 =  busy_hazard_d1b1_r ? wrbk_result1_i :
                     (busy_hazard_d2b1_r ? wrbk_result2_i : busy_rfb1_r);
```

When all hazard flags are cleared the contents of `busy_op_r` , `busy_rfa_r` and
`busy_rfb_r` will be transferred to `exec_op_any_r`, `exec_op_r`, etc.  They
are presented on the outputs and the execution unit can take them and start processing.

The `unit_free_o` output signals the control unit that the reservation station
is free and can be issued another instruction.  The signal goes high when all hazards
are cleared and the busy state transfers to exec.

### Execution Units

In Marocchino the execution units (also referred to as functional units)
execute instructions which it receives from the reservation stations.

The execution units in Marocchino are:

 - `or1k_marocchino_int_1clk` - handles integer instructions which can complete
   in 1 clock cycle. This includes `SHIFT`, `ADD`, `AND`, `OR` etc.
 - `or1k_marocchino_int_div` - handles integer `DIVIDE` operations.
 - `or1k_marocchino_int_mul` - handles integer `MULTIPLY` operations.
 - `or1k_marocchino_lsu` - handles memory load store operations.  It interfaces
   with the data cache, MMU and memory bus.
 - `pfpu_marocchino_top` - handles floating point operations.  These include
   `ADD`, `MULTIPLY`, `CMP`, `I2F` etc.

Handshake signals between the reservation station and execution units are used
to issue operations to execution units.

![marocchino execution unit handshake diagram](/content/2019/marocchino-handshake.png)

The `taking_op_i` is the signal from the execution unit signalling it has
received the op and the reservation station will clear all `exec_*_o` output
signals.

### Order Control Buffer

![marocchino order control diagram](/content/2019/marocchino-ocb.png)

In the Marocchino the Order Control Buffer (OCB) is the in order retirement
unit.  It can retire a single instruction at a time.  The implementation is a 7
entry FIFO queue.  This is much less than the Pentium Pro which contains 40
slots.  The OCB receives a single instruction at time from the decoder and
broadcasts the oldest instruction for other components to see.  Instructions are
retired after execution write back is complete.

If the OCB output indicates a branch instruction or an exception, branch logic
is invoked.  Instead of waiting for write back to a register the write back logic
in the Marocchino will perform the branch operations.  This may include flushing
the OCB.  Special care is taken to handle branch delay slot instruction execution.

The OCB is different from a traditional Tomasulo Reorder Buffer (ROB) in that it
does not store any execution write back results.

Each OCB entry stores:

 - The Instruction ID `extaddr`
 - The type of instruction
 - The register destination addresses used for write back
 - Any Fetch and Decode exceptions

This can be seen as defined by the `ocbi` and `ocbi` wire buses in
[or1k_marocchino_oman.v](https://github.com/openrisc/or1k_marocchino/blob/master/rtl/verilog/or1k_marocchino_oman.v#L1007).

```verilog
  // --- OCB-Controls input ---
  wire  [OCBT_MSB:0] ocbi;
  assign ocbi =
    {
      // --- pipeline [C]ontrol flags ---
      dcod_extadr_r, // OCB-Controls entrance
      dcod_op_ls_i, // OCB-Controls entrance
      dcod_op_fpxx_cmp_i, // OCB-Controls entrance
      dcod_op_fpxx_arith_i, // OCB-Controls entrance
      dcod_op_mul_i, // OCB-Controls entrance
      dcod_op_div_i, // OCB-Controls entrance
      dcod_op_1clk_i, // OCB-Controls entrance
      dcod_op_jb_r, // OCB-Controls entrance
      dcod_op_push_wrbk_i, // OCB-Controls entrance
      // --- instruction [A]ttributes ---
      pc_decode_i, // OCB-Attributes entrance
      dcod_rfd2_adr_i, // OCB-Attributes entrance
      dcod_rfd2_we_i, // OCB-Attributes entrance
      dcod_rfd1_adr_i, // OCB-Attributes entrance
      dcod_rfd1_we_i, // OCB-Attributes entrance
      dcod_delay_slot_i, // OCB-Attributes entrance
      dcod_op_rfe_i, // OCB-Attributes entrance
      // Flag that istruction is restartable
      interrupts_en, // OCB-Attributes entrance
      // Combined IFETCH/DECODE an exception flag
      dcod_an_except_fd_i, // OCB-Attributes entrance
      // FETCH & DECODE exceptions
      dcod_fetch_except_ibus_err_r, // OCB-Attributes entrance
      dcod_fetch_except_ipagefault_r, // OCB-Attributes entrance
      dcod_fetch_except_itlb_miss_r, // OCB-Attributes entrance
      dcod_except_illegal_i, // OCB-Attributes entrance
      dcod_except_syscall_i, // OCB-Attributes entrance
      dcod_except_trap_i // OCB-Attributes entrance
    };

  // --- INSN OCB input ---
  wire [OCBT_MSB:0] ocbo;
```

### Common Data Bus

As discussed above the common data collects write back results from execution units
and routes them for write back.

This can be seen in the [or1k_marocchino_cpu.v](https://github.com/openrisc/or1k_marocchino/blob/master/rtl/verilog/or1k_marocchino_cpu.v#L1933)
as below.

```verilog
  // --- regular ---
  always @(wrbk_1clk_result       or wrbk_div_result or wrbk_mul_result or
           wrbk_fpxx_arith_res_hi or wrbk_lsu_result or wrbk_mfspr_result)
  begin
    wrbk_result1 = wrbk_1clk_result       | wrbk_div_result | wrbk_mul_result |
                   wrbk_fpxx_arith_res_hi | wrbk_lsu_result | wrbk_mfspr_result;
  end

  // --- FPU64 extention ---
  assign wrbk_result2 = wrbk_fpxx_arith_res_lo;

```

### Conclusion

Tomasulo's algorithm is still relevant today and used in many processors.
Marocchino provides an accessible implementation.  Marocchino is however, not
super-scalar, while Pentium Pro can decode up to 4 instructions at a time the Marocchino
can only decode 1 at a time.

Furthermore many improvements can be made to Marocchino to increase performance.  Including:

 - Full featured reorder buffer
 - Parallel instruction decoding
 - Speculative execution; [or should we?](https://meltdownattack.com/)
 - More reservation station slots

However, these come with a cost of size on the FPGA.  If you are interested in helping
out please feel free to contribute.

If anything in this article could be improved, more timing diagrams, typos or fixes
for diagrams please send [me a message on twitter](https://twitter.com/stffrdhrn).

## Further Reading and Sources
 - Intel architecture manuals
   - [Intel Architecture Software Developers Manual PDF](/content/2019/vol1ref24319002.pdf) see
      - section 2.1 brief history of the intel architecture
      - section 2.4 introduction to the P6 microarchitecture
   - [Pentium Pro Datasheet PDF](/content/2019/Intel_PentiumPro.pdf) see
      - section 2.2 The Pentium Pro Processor Pipeline
 - [University of Washington, Computer Architecture](https://courses.cs.washington.edu/courses/csep548/06au/lectures.html)
   - [Re-order buffer](https://courses.cs.washington.edu/courses/cse548/06wi/slides/reorderBuf.pdf) - source of Pentium Pro diagram
 - [UCSD, Graduate Computer Architecture](https://cseweb.ucsd.edu/classes/wi13/cse240a/)
 - [Intel Core 2](https://en.wikipedia.org/wiki/Intel_Core_(microarchitecture))
 - [Intel Pentium Pro](https://en.wikipedia.org/wiki/Pentium_Pro)

gha_language: C


text:
---
layout: post
title: "Stairs"
date: 2019-02-01
description:
image: /assets/images/sunny-stairs.jpg
author: Gigi
category: photography
tags:
 - Photography
 - Travel
---

Wherever we go, we encounter stairs. Steep ones and flat ones, both to wonderful places and to nowhere. They are everywhere, no matter where you are, no matter what you do. Up implies down. Difference implies hierarchy.  Stairs: Slippery when wet](/assets/images/icy-stairs.jpg#full)

> What do we have left once we abandon the lie?

> Chaos.

> A gaping pit waiting to swallow us all.

> Chaos isn't a pit.

> Chaos is a ladder.

> Many who try to climb it fail and never get to try again.

> The fall breaks them. And some are given a chance to climb, but they refuse. They cling to the realm or the gods or love.

> Illusions.

> Only the ladder is real.

> The climb is all there is.
>
> David Benioff & D. B. Weiss

My mind has been a bit chaotic the last few days. Traveling can be chaotic, as all travelers know. Especially if your ambitions are all over the place. I want to read more, I want to write more, I want to take more pictures. There are even more things I want to do more of, but I'm afraid that even without those additional "mores" it might already be too much. Too much of anything quickly invites chaos. Ambitions stop to matter in times of chaos, no matter how innocuous their beginnings. Stairs: Home to the hopeless](/assets/images/homeless-stairs.jpg#full)

We saw plenty of people at the bottom of stairs. Some may have fallen from great heights. Some may have started at zero and are still close to where they started. Some were robbed of any possibilities and had no chance to climb, no matter how eager they were.

Two guys were celebrating with pizza and coke next to us. The drink, not the powder, mind you. We had a brief conversation and I was curious what the reason for their celebration was. "It's the first day I'm out," one of the guys told me. He was about my age, so I asked how long he was "in", assuming that he was in jail for a couple of months or so. "15 years," is what he told me, still ecstatic about his regained freedom.

What can you say to a person who was incarcerated for half his life? I think "good luck" was all I was able to manage in the moment.

![Stairs: Home to the homeless](/assets/images/nosering-stairs.jpg#full)

From how high some of these souls fell is impossible to judge. In that sense, the bottom might be seen as nonjudgemental. Inequalities are hard to spot if everyone is at ground level.

One level lower, and all inequalities are ground to dust. Swallowed up by the earth. Digested by worms. In the end, walking the walk is all that counts. Up, and down, and up again. If you are lucky. At the end of the game, the king and the pawn go back in the same box.

![Stairway to heaven?](/assets/images/cemetery.jpg#full)

> Who was the fool,

> who the wise man,

> who the beggar or the emperor?

> Whether rich or poor, all are equal in death.
>
> Vierzeiliger oberdeutscher Totentanz

Not everyone who is at the bottom got there by accident. Nor is everyone miserable. Some are at the bottom because the bottom represents a new opportunity to climb again. "Reboot my life," to quote one woman we met.

Second chances. New beginnings. First steps. Every bottom has the potential to be a starting point for something great. Also, some things in life are best climbed together.

![Stairs: Hope to the hopeful](/assets/images/wedding-stairs.jpg#full)

> This is the predicament of man. All souls descend a ladder from heaven to the world. Then the ladders are taken away. Once they are in this world, they are called upon from heaven to rise, to come back. It is a call that goes out again and again. Each soul seeks the ladder in order to ascend above; but the ladder cannot be found. Most people make no effort to ascend, claiming, how can one rise to heaven without a ladder? However, there are souls which resolve to leap upwards without a ladder. So they jump and fall down.  Wise people think that since no ladder exists, there must be another way. We must face the challenge and act. Be what it may, one must leap until God, in His mercy, makes exultation come about.
>
> Abraham Joshua Heschel

404\. Ladder not found. If Led Zeppelin has taught us anything it is that there is no ladder to ascend above. There is a stairway to heaven, and stairways can be walked.

Not all stairs are serious business. After two months in the land of "mart carts" and escalators leading up to fitness centers and gyms, it is time to laugh at the absurdity of it all. Maybe this is all we have. Loving and laughing. Loving the chaos of life. Laughing in the face of death. After all, climbing stairs is more fun if you aren't taking it too seriously. No matter if you are going up or down.

> An escalator can never break, it can only become stairs. You would never see an "Escalator Temporarily Out Of Order" sign, just "Escalator Temporarily Stairs. Sorry for the convenience. We apologize for the fact that you can still get up there.
>
> Mitch Hedberg

![People standing on escalators!  And that is a testimony to human laziness!    Do you think the guy made the escalator so people—and they're made like stairs—just so people stand on it so you go up and down?  You're supposed to walk on 'em so you get there faster.  You know?  And then people stand on there.  So every time I'm on an escalator, I'm just like, "Excuse me, pardon me, excuse me, pardon me…."  You know?  That's my pet peeve, right there.  And I'm gonna do something about it, and I'm urging you to do something about it!  Write your congressman, get a group together, get together, and—I think we can do something about this. (Krist Novoselic)](/assets/images/escalator-stairs.jpg#full)


text:
# VxFlex-Python
Python script to manage DellEMC VxFlexOS functionality
## Details
The script in this repo was part of Project Rocket, an IaC Avengers' developed prototype that provides Dynamic QoS for Virtual Machines as they move around a vSphere cluster. You can learn more about the project as well as more details about what this repo provides in the following blog post:

http://anzpiper.blogspot.com/2019/12/configure-vxflex-scaleio-api-with-python.html

repository: cermegno/VxFlex-Python

repo_name: cermegno/VxFlex-Python


text:
---
layout:        concept
permalink:     "/concepts/http-header/Content-Security-Policy-Pin"
title:         "HTTP Header Field: Content-Security-Policy-Pin"
concept-name:  HTTP Header Field
concept-value: Content-Security-Policy-Pin
description: "The Content-Security-Policy-Pin header field is the mechanism for delivering a pinned policy that the user agent MUST enforce for any resource which is not delivered with a Content-Security-Policy header (as described in the \"Pin a policy to response\" algorithm)."
---

[The Content-Security-Policy-Pin header field is the mechanism for delivering a pinned policy that the user agent MUST enforce for any resource which is not delivered with a Content-Security-Policy header (as described in the "Pin a policy to response" algorithm).](http://www.w3.org/TR/csp-pinning/#content-security-policy-pin-header-field "Read documentation for HTTP Header Field "Content-Security-Policy-Pin"") (**[W3C TR http://www.w3.org/TR/csp-pinning: Content Security Policy Pinning](/specs/W3C/TR/csp-pinning "This document defines a new HTTP header that allows authors to instruct user agents to remember ("pin") and enforce a Content Security Policy for a set of hosts for a period of time.")**)

JSON

Return to list of all ( HTTP Header Fields | Web Concepts )

repository: dret/webconcepts

branch_name: refs/heads/gh-pages

gha_license_id: Unlicense

repo_name: dret/webconcepts


text:
# Music-Store-Rehearsal-Space
Clone and run the main method in Main.java

Narrative/scenarios document: https://docs.google.com/document/d/1clUWzP2B5oCUBiwhsKCfPovN4zQN43pQIjzBysRx-fs/edit

Sequence Diagram 1 (Morgan): https://drive.google.com/file/d/1gfzlaKgeMF1ayHRmIRy7fjLXDdbE_b0e/view?usp=sharing

Sequence Diagram 2 (Sean):  https://drive.google.com/file/d/1AMmt1AuU0Azyw4_MEtORvI-ShZ6HN8e0/view?usp=sharing

Sequence Diagram 3 (Emma): https://drive.google.com/file/d/1wpTe5Y6p-8oj2HvQjFnrGEhlDeGhwBVs/view?usp=sharing

Sequence Diagram 4 (Dani): https://drive.google.com/file/d/1vhPBoTNK0FUbMSMVsDlRywLsBCWq-Ni1/view?usp=sharing

State Diagram: https://drive.google.com/file/d/1YYNuBpuXux-i0tVVA3hhjCQBD7CsHh2n/view?usp=sharing

## Sprint One
Sprint goal: Develop a functional rental system for rooms and equipment where customers can create or cancel a rental

Link to class diagram: https://drive.google.com/file/d/16AYklGn8iEJZQSFaz-CMNDAx5lnp4YCY/view?usp=sharing

Sprint review/demo agenda: https://docs.google.com/document/d/1D5kuTSbh---QuTz7IXFx7Dpx_a1K1ldq0duYwH0ha3M/edit?usp=sharing

Sprint retrospective: https://docs.google.com/document/d/1R8s9SvEixdkvs95fgxC48-6VDp3U-D730fv54ISP8cY/edit?usp=sharing

## Sprint Two
Sprint goal: Have a Rental UI that can interact with renting rooms and leasing items, and we can also hire and pay functional employees and repair techs.

Link to class diagram: https://drive.google.com/file/d/1eApzCzlzqhEjJf8CRLRgbhmxXOLqydeL/view?usp=sharing

Sprint review/demo agenda: https://docs.google.com/document/d/1H3A3zAwCvpKL3tHtcX-XB9cz_P_IHj84nHr9fffXTTA/edit?usp=sharing

Sprint retrospective: https://docs.google.com/document/d/1zNwDEn4QRrMWhCU5g4xcWha4v3VM3vxSCOWSvdBGS_I/edit

## Sprint Three
Sprint goal: Finishing UIs for different use cases and users and more functionality for rentals

Link to class diagram: https://drive.google.com/file/d/1okZgdjYoQ3xhobRgUdCf9HKkcqBrxmHD/view?usp=sharing

Sprint review/demo agenda: https://docs.google.com/document/d/1bB8CRA6xRxuphmzuGiZsneeDt0HsoKVFYwXxwKOMlso/edit?usp=sharing

Sprint retrospective: https://docs.google.com/document/d/1Ooh5K5yaRVIjChZqYCYriE8_WmesemLdnsQOmfEq940/edit?usp=sharing


text:
# SQLAlchemy Homework

## Summary
**In this project I had to connect to a sqlite database and extract data for some analysis.  This involved using:**

*  SQLAlchemy ORM queries
*  Pandas
*  Matplotlib

**After the analysis, I created a weather app using Flask API based on the queries I developed for the analysis section previously.**

## Analysis

The first task was to analyze the last 12 months of precipitation from all stations (9 total) and load it into a DataFrame for plotting.

![precipitation graph](Images/prcp.png)

The second task was to analyze the temperature observations at each station and create a histogram from the data queried.

![histogram](Images/histogram.png)

## Climate App
After creating the queries and graphs, I designed a Flask API to display the query results.
* Flask root directory

  ![flask_root](Images/flask_root.png)

* Flask Precipitation
  ![flask_prcp](Images/flask_prcp.png)

* Flask Stations
  ![flask_stations](Images/flask_stations.png)

* Flask Start Date/ End Date
![flask_start_end](Images/flask_start_end.png)

## Bonus # 1

### Temperature Analysis 1
Here I had to analyze temperature data to determine if there was a meaninful difference between the temperatures during June and December in Hawaii.  After some querying and data manipulating I came up with some statistical data and performed a paired t-test.
![june_stats](Images/june_stats.png)
![dec_stats](Images/dec_stats.png)
![trip_avg](Images/trip_avg_temp.png)

**Conclusion**
*With a p-value < 0.05 the means between June and December are statistically significant. Therefore there is a meaningful difference between the temperatures of both months. June is definitely a warmer month to visit.*


text:
# Endogenous

Go back to the [[Economic_Glossary]]

Inside the economic model; the opposite of EXOGENOUS (see also GROWTH).


text:
[Docker][2] is a great solution for making software portable, and
in version 0.2, I've Dockerized twitter-subliminal.  The working directory will contain all of the usual binaries [available
from v0.1.0][4]:

* tse: message encryption
* tsd: message decryption
* tsr: reset all retweets
* tsp: performance testing for selecting block size
* tst: unit testing
* tsl: check rate limit status with Twitter API

You can also run these binaries directly.
```

There are two locations where the twitter-subliminal containers are published:

* https://hub.docker.com/r/jlospinoso/twitter-subliminal/
* https://quay.io/repository/jlospinoso/twitter-subliminal

Feedback
==
Please [post any issues or bugs][5] you find!