Container-based network simulation¶
The “make test” framework provides a good way to test individual features. However, when testing several features at once - or validating nontrivial configurations - it may prove difficult or impossible to use the unit-test framework.
This note explains how to set up lxc/lxd, and a 5-container testbed to test a split-tunnel nat + ikev2 + ipsec + ipv6 prefix-delegation scenario.
OS / Distro test results¶
This setup has been tested on an Ubuntu 18.04 LTS system. If you’re feeling adventurous, the same scenario also worked on a recent Ubuntu 20.04 “preview” daily build.
Other distros may work fine, or not at all.
Proxy Server¶
If you need to use a proxy server e.g. from a lab system, you’ll probably need to set HTTP_PROXY, HTTPS_PROXY, http_proxy and https_proxy in /etc/environment. Directly setting variables in the environment doesn’t work. The lxd snap daemon needs the proxy settings, not the user interface.
Something like so:
HTTP_PROXY=http://my.proxy.server:8080
HTTPS_PROXY=http://my.proxy.server:4333
http_proxy=http://my.proxy.server:8080
https_proxy=http://my.proxy.server:4333
Install and configure lxd¶
Install the lxd snap. The lxd snap is up to date, as opposed to the results of “sudo apt-get install lxd”.
# snap install lxd
# lxd init
“lxd init” asks several questions. With the exception of the storage pool, take the defaults. To match the configs shown below, create a storage pool named “vpp.” Storage pools of type “zfs” and “files” have been tested successfully.
zfs is more space-efficient. “lxc copy” is infinitely faster with zfs. The path for the zfs storage pool is under /var. Do not replace it with a symbolic link, unless you want to rebuild all of your containers from scratch. Ask me how I know that.
Create three network segments¶
Aka, linux bridges.
# lxc network create dora
# lxc network create internet
# lxc network create swan
We’ll explain the test topology in a bit. Stay tuned.
Set up the default container profile¶
Execute “lxc profile edit default”, and install the following configuration. Note that the “shared” directory should mount your vpp workspaces. With that trick, you can edit code from any of the containers, run vpp without installing it, etc.
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
eth1:
name: eth1
nictype: bridged
parent: internet
type: nic
eth2:
name: eth2
nictype: bridged
parent: dora
type: nic
eth3:
name: eth3
nictype: bridged
parent: swan
type: nic
root:
path: /
pool: vpp
type: disk
shared:
path: /scratch
source: /scratch
type: disk
name: default
Set up the network configurations¶
Edit the fake “internet” backbone:
# lxc network edit internet
Install the ip addresses shown below, to avoid having to rebuild the vpp and host configuration:
config:
ipv4.address: <IP_ADDRESS>/24
ipv4.dhcp.ranges: <IP_ADDRESS>-<IP_ADDRESS>
ipv4.nat: "true"
ipv6.address: none
ipv6.nat: "false"
description: ""
name: internet
type: bridge
used_by:
managed: true
status: Created
locations:
- none
Repeat the process with the “dora” and “swan” networks, using these configurations:
dora network configuration¶
config:
ipv4.address: <IP_ADDRESS>/24
ipv4.dhcp.ranges: <IP_ADDRESS>-<IP_ADDRESS>
ipv4.nat: "true"
ipv6.address: none
ipv6.nat: "false"
description: ""
name: dora
type: bridge
used_by:
managed: true
status: Created
locations:
- none
swan network configuration¶
config:
ipv4.address: <IP_ADDRESS>/24
ipv4.dhcp.ranges: <IP_ADDRESS>-<IP_ADDRESS>
ipv4.nat: "true"
ipv6.address: none
ipv6.nat: "false"
description: ""
name: swan
type: bridge
used_by:
managed: true
status: Created
locations:
- none
Create a “master” container image¶
The master container image should be set up so that you can build vpp, ssh into the container, edit source code, run gdb, etc.
Make sure that e.g. public key auth ssh works.
# lxd launch ubuntu:18.04 dora
<spew>
# lxc exec dora bash
dora# cd /scratch/my-vpp-workspace
dora# apt-get install make ssh
dora# make install-dep
dora# exit
# lxc stop dora
Mark the container image privileged. If you forget this step, you’ll trip over a netlink error (-11) aka EAGAIN when you try to roll in the vpp configurations.
# lxc config set dora security.privileged "true"
Duplicate the “master” container image¶
To avoid having to configure N containers, be sure that the master container image is fully set up before you help it have children:
# lxc copy dora dorahost
# lxc copy dora swan
# lxc copy dora swanhost
# lxc copy dora dhcpserver # optional, to test ipv6 prefix delegation
Install handy script¶
See below for a handly script which executes lxc commands across the current set of running containers. I call it “lxc-foreach,” feel free to call the script Ishmael if you like.
Examples:
$ lxc-foreach start
<issues "lxc start" for each container in the list>
After a few seconds, use this one to open an ssh connection to each container. The ssh command parses the output of “lxc info,” which displays container ip addresses.
$ lxc-foreach ssh
Here’s the script:
#!/bin/bash
set -u
export containers="dora dorahost swan swanhost dhcpserver"
if [ x$1 = "x" ] ; then
echo missing command
exit 1
fi
if [ $1 = "ssh" ] ; then
for c in $containers
do
inet=`lxc info $c | grep eth0 | grep -v inet6 | head -1 | cut -f 3`
if [ x$inet = "x" ] ; then
echo $c not started
else
gnome-terminal --command "/usr/bin/ssh $inet"
fi
done
exit 0
fi
for c in $containers
do
echo lxc $1 $c
lxc $1 $c
done
exit 0
Test topology¶
Finally, we’re ready to describe a test topology. First, a picture:
===+======== management lan/bridge lxdbr0 (dhcp) ===========+===
| | |
| | |
| | |
v | v
eth0 | eth0
+------+ eth1 eth1 +------+
| dora | <IP_ADDRESS> <= internet bridge => <IP_ADDRESS> | swan |
+------+ +------+
eth2 / bvi0 <IP_ADDRESS> | <IP_ADDRESS> eth3 / bvi0
| | |
| ("dora" bridge) | ("swan" bridge) |
| | |
v | v
eth2 <IP_ADDRESS> | eth3 <IP_ADDRESS>
+----------+ | +----------+
| dorahost | | | dorahost |
+----------+ | +----------+
eth0 (management lan) <========+========> eth0 (management lan)
Test topology discussion¶
This topology is suitable for testing almost any tunnel encap/decap scenario. The two containers “dorahost” and “swanhost” are end-stations connected to two vpp instances running on “dora” and “swan”.
We leverage the Linux end-station network stacks to generate traffic of all sorts.
The so-called “internet” bridge models the public internet. The “dora” and “swan” bridges connect vpp instances to local hosts
End station configs¶
The end-station Linux configurations set up the eth2 and eth3 ip addresses shown above, and add tunnel routes to the opposite end-station networks.
dorahost configuration¶
ifconfig eth2 <IP_ADDRESS>/24 up
route add -net <IP_ADDRESS>/24 gw <IP_ADDRESS>
swanhost configuration¶
sudo ifconfig eth3 <IP_ADDRESS>/24 up
sudo route add -net <IP_ADDRESS>/24 gw <IP_ADDRESS>
VPP configs¶
Split nat44 / ikev2 + ipsec tunneling, with ipv6 prefix delegation in the “dora” config.
dora configuration¶
set term pag off
comment { "internet" }
create host-interface name eth1
set int ip address host-eth1 <IP_ADDRESS>/24
set int ip6 table host-eth1 0
set int state host-eth1 up
comment { default route via swan }
ip route add <IP_ADDRESS>/0 via <IP_ADDRESS>
comment { "dora-private-net" }
create host-interface name eth2
bvi create instance 0
set int l2 bridge bvi0 1 bvi
set int ip address bvi0 <IP_ADDRESS>/24
set int state bvi0 up
set int l2 bridge host-eth2 1
set int state host-eth2 up
nat44 add interface address host-eth1
set interface nat44 in host-eth2 out host-eth1
nat44 add identity mapping external host-eth1 udp 500
nat44 add identity mapping external host-eth1 udp 4500
comment { nat44 untranslated subnet <IP_ADDRESS>/24 }
comment { responder profile }
ikev2 profile add swan
ikev2 profile set swan udp-encap
ikev2 profile set swan auth rsa-sig cert-file /scratch/setups/doracert.pem
set ikev2 local key /scratch/setups/swankey.pem
ikev2 profile set swan id local fqdn swan.barachs.net
ikev2 profile set swan id remote fqdn broiler2.barachs.net
ikev2 profile set swan traffic-selector remote ip-range <IP_ADDRESS> - <IP_ADDRESS> port-range 0 - 65535 protocol 0
ikev2 profile set swan traffic-selector local ip-range <IP_ADDRESS> - <IP_ADDRESS> port-range 0 - 65535 protocol 0
create ipip tunnel src <IP_ADDRESS> dst <IP_ADDRESS>
ikev2 profile set swan tunnel ipip0
comment { ipv6 prefix delegation }
ip6 nd address autoconfig host-eth1 default-route
dhcp6 client host-eth1
dhcp6 pd client host-eth1 prefix group hgw
set ip6 address bvi0 prefix group hgw ::2/56
ip6 nd address autoconfig bvi0 default-route
ip6 nd bvi0 ra-interval 5 3 ra-lifetime 180
set int mtu packet 1390 ipip0
set int unnum ipip0 use host-eth1
ip route add <IP_ADDRESS>/24 via ipip0
swan configuration¶
set term pag off
comment { "internet" }
create host-interface name eth1
comment { set dhcp client intfc host-eth1 hostname swan }
set int ip address host-eth1 <IP_ADDRESS>/24
set int state host-eth1 up
comment { default route via "internet gateway" }
comment { ip route add <IP_ADDRESS>/0 via <IP_ADDRESS> }
comment { "swan-private-net" }
create host-interface name eth3
bvi create instance 0
set int l2 bridge bvi0 1 bvi
set int ip address bvi0 <IP_ADDRESS>/24
set int state bvi0 up
set int l2 bridge host-eth3 1
set int state host-eth3 up
nat44 add interface address host-eth1
set interface nat44 in bvi0 out host-eth1
nat44 add identity mapping external host-eth1 udp 500
nat44 add identity mapping external host-eth1 udp 4500
comment { nat44 untranslated subnet <IP_ADDRESS>/24 }
comment { initiator profile }
ikev2 profile add dora
ikev2 profile set dora udp-encap
ikev2 profile set dora auth rsa-sig cert-file /scratch/setups/swancert.pem
set ikev2 local key /scratch/setups/dorakey.pem
ikev2 profile set dora id local fqdn broiler2.barachs.net
ikev2 profile set dora id remote fqdn swan.barachs.net
ikev2 profile set dora traffic-selector remote ip-range <IP_ADDRESS> - <IP_ADDRESS> port-range 0 - 65535 protocol 0
ikev2 profile set dora traffic-selector local ip-range <IP_ADDRESS> - <IP_ADDRESS> port-range 0 - 65535 protocol 0
ikev2 profile set dora responder host-eth1 <IP_ADDRESS>
ikev2 profile set dora ike-crypto-alg aes-cbc 256 ike-integ-alg sha1-96 ike-dh modp-2048
ikev2 profile set dora esp-crypto-alg aes-cbc 256 esp-integ-alg sha1-96 esp-dh ecp-256
ikev2 profile set dora sa-lifetime 3600 10 5 0
create ipip tunnel src <IP_ADDRESS> dst <IP_ADDRESS>
ikev2 profile set dora tunnel ipip0
ikev2 initiate sa-init dora
set int mtu packet 1390 ipip0
set int unnum ipip0 use host-eth1
ip route add <IP_ADDRESS>/24 via ipip0
IKEv2 certificate setup¶
In both of the vpp configurations, you’ll see “/scratch/setups/xxx.pem” mentioned. These certificates are used in the ikev2 key exchange.
Here’s how to generate the certificates:
openssl req -x509 -nodes -newkey rsa:4096 -keyout dorakey.pem -out doracert.pem -days 3560
openssl x509 -text -noout -in doracert.pem
openssl req -x509 -nodes -newkey rsa:4096 -keyout swankey.pem -out swancert.pem -days 3560
openssl x509 -text -noout -in swancert.pem
Make sure that the “dora” and “swan” configurations point to the certificates.
DHCPv6 server setup¶
If you need an ipv6 dhcp server to test ipv6 prefix delegation, create the “dhcpserver” container as shown above.
Install the “isc-dhcp-server” Debian package:
sudo apt-get install isc-dhcp-server
/etc/dhcp/dhcpd6.conf¶
Edit the dhcpv6 configuration and add an ipv6 subnet with prefix delegation. For example:
subnet6 2001:db01:0:1::/64 {
range6 2001:db01:0:1::1 2001:db01:0:1::9;
prefix6 2001:db01:0:100:: 2001:db01:0:200::/56;
}
Add an ipv6 address on eth1, which is connected to the “internet” bridge, and start the dhcp server. I use the following trivial bash script, which runs the dhcp6 server in the foreground and produces dhcp traffic spew:
#!/bin/bash
ifconfig eth1 inet6 add 2001:db01:0:1::10/64 || true
dhcpd -6 -d -cf /etc/dhcp/dhcpd6.conf
The “|| true” bit keeps going if eth1 already has the indicated ipv6 address.
Container / Host Interoperation¶
Host / container interoperation is highly desirable. If the host and a set of containers don’t run the same distro and distro version, it’s reasonably likely that the glibc versions won’t match. That, in turn, makes vpp binaries built in one environment fail in the other.
Trying to install multiple versions of glibc - especially at the host level - often ends very badly and is not recommended. It’s not just glibc, either. The dynamic loader ld-linux-xxx-so.2 is glibc version specific.
Fortunately, it’s reasonable easy to build lxd container images based on specific Ubuntu or Debian versions.
Create a custom root filesystem image¶
First, install the “debootstrap” tool:
sudo apt-get install debootstrap
Make a temp directory, and use debootstrap to populate it. In this example, we create an Ubuntu 20.04 (focal fossa) base image:
# mkdir /tmp/myroot
# debootstrap focal /tmp/myroot http://archive.ubuntu.com/ubuntu
To tinker with the base image (if desired):
# chroot /tmp/myroot
<add packages, etc.>
# exit
Make a compressed tarball of the base image:
# tar zcf /tmp/rootfs.tar.gz -C /tmp/myroot .
Create a “metadata.yaml” file which describes the base image:
architecture: "x86_64"
# To get current date in Unix time, use `date +%s` command
creation_date:<PHONE_NUMBER>
properties:
architecture: "x86_64"
description: "My custom Focal Fossa image"
os: "Ubuntu"
release: "focal"
Make a compressed tarball of metadata.yaml:
# tar zcf metadata.tar.gz metadata.yaml
Import the image into lxc / lxd:
$ lxc image import metadata.tar.gz rootfd.tar.gz --alias focal-base
Create a container which uses the customized base image:¶
$ lxc launch focal-base focaltest
$ lxc exec focaltest bash
The next several steps should be executed in the container, in the bash shell spun up by “lxc exec…”
Configure container networking¶
In the container, create /etc/netplan/50-cloud-init.yaml:
network:
version: 2
ethernets:
eth0:
dhcp4: true
Use “cat > /etc/netplan/50-cloud-init.yaml”, and cut-‘n-paste if your favorite text editor is AWOL.
Apply the configuration:
# netplan apply
At this point, eth0 should have an ip address, and you should see a default route with “route -n”.
Configure apt¶
Again, in the container, set up /etc/apt/sources.list via cut-‘n-paste from a recently update “focal fossa” host. Something like so:
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ focal universe
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
“apt-get update” and “apt-install” should produce reasonable results. Suggest “apt-get install make git”.
At this point, you can use the “/scratch” sharepoint (or similar) to execute “make install-dep install-ext-deps” to set up the container with the vpp toolchain; proceed as desired.


Persian
JSONPlaceholder
Persian Fake Online REST / GraphQL API for Testing and Prototyping
Based on JSONPlaceholder
Persian Fake Online REST / GraphQL API for Testing and Prototyping
Based on JSONPlaceholder
fetch('https://jsonplaceholder.ir/users/1')
.then(response => response.json())
.then(json => console.log(json))
This is a free online REST / GraphQL API that returns Persian data (RTL data). You can use whenever you need some fake data.
All HTTP methods, GET, POST, PUT, PATCH and DELETE and also GraphQL
Returns Persian (Right to Left) fake data as JSON file format
It’s free and made with love for Iranian developers
PersianJSONPlaceholder comes with a set of 6 common resources:
All HTTP methods are supported.
All of the requests are available in https://jsonplaceholder.ir/graphql with different queries, get needed params for each one.
// For example:get all data for one topic
let queryAllPosts = "{ posts { title body } }"
let queryAllComments = "{ comments { name email } }"
let queryAllAlbums = "{ albums { userId title } }"
let queryAllPhotos = "{ photos { title url } }"
let queryAllTodos = "{ todos { title completed } }"
let queryAllUsers = "{ users { username email } }"
// For example:get specific data by id
let queryOnePost = "{ post(id:2) { title body } }"
let queryOneComment = "{ comment(id:3) { name email } }"
let queryOneAlbum = "{ album(id:4) { userId title } }"
let queryOnePhoto = "{ photo(id:5) { title url } }"
let queryOneTodo = "{ todo(id:6) { title completed } }"
let queryOneUser = "{ user(id:7) { username email } }"
// and ...
// Fetch data as JSON file format
const request = require('request');
request({
method: 'POST',
url: 'https://jsonplaceholder.ir/graphql',
json: {
"query": queryOnePhoto
}
}, (err, res, data) => {
console.log(data)
})
// Or use request package to fetch data as JSON file format
fetch('https://jsonplaceholder.ir/graphql', {
method: 'POST',
body: JSON.stringify(queryOneUser),
headers: {
"Content-type": "application/json; charset=UTF-8"
}
})
.then(response => response.json())
.then(json => console.log(json))


OPENBOX THEME
An openbox theme will define the look of the border + the title bar + the right click menu…
To install a theme, often we just have to copy its folder to a specific theme folder.
To change Openbox theme, we use obconf.
Mistral Theme
At the beginning of my Openbox experience, I used the default theme of Crunchbang and it still is pretty good. Now I am using a theme call Mistral.
The author has posted it here:
http://phobi4n.deviantart.com/art/Mistral-Openbox-543910044
This is one of the some rare Openbox themes that I can recommend, others are often very spartan and have very few sense of modern look.
In this case of Mistral, the theme is contained in a folder, but Openbox themes also come with .obt extension and can be installed using Obconf. You also can extracted that .obt package to a folder using any of compression tool.
After having the theme folder, please move it into one of these directories below. They are where Openbox will look for its theme:
- System-wide themes are installed in: /usr/share/themes.
- User-specific themes are in: ~/.local/share/themes or in ~/.themes.
Themes will be instantly registered into Obconf for you to use.
Open Obconf by typing the command obconf into terminal. Select Mistral theme.
I have to say that although it is easy, at the beginning I struggled to know all of these (I could not find any instruction for this anywhere). Hope all the articles on this website will save you some time!


|
Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
#include <task.h>
Public Member Functions | |
| virtual void | spawn (task &first, task *&next)=0 |
| For internal use only. More... | |
| virtual void | wait_for_all (task &parent, task *child)=0 |
| For internal use only. More... | |
| virtual void | spawn_root_and_wait (task &first, task *&next)=0 |
| For internal use only. More... | |
| virtual | ~scheduler ()=0 |
| Pure virtual destructor;. More... | |
| virtual void | enqueue (task &t, void *reserved)=0 |
| For internal use only. More... | |
Additional Inherited Members | |
| Private Member Functions inherited from tbb::internal::no_copy | |
| no_copy () | |
| Allow default construction. More... | |
|
pure virtual |
For internal use only.
Implemented in tbb::internal::generic_scheduler.
For internal use only.
Implemented in tbb::internal::generic_scheduler.
|
pure virtual |
For internal use only.
Implemented in tbb::internal::generic_scheduler.
For internal use only.
Implemented in tbb::internal::custom_scheduler< SchedulerTraits >.


{amplifier-post-mod-cluster.png width=373}
The AMPLIFIER section has one of these for each {_channel}. It contains a {Amplifier_post_mod_select mod select} {_parameter} that chooses a post modulation that applies after mod 1 and mod 2 are added together, and a {Amplifier_post_mod_depth mod depth} parameter that controls how much to vary the volume.
The mod select parameter gives you eight {_lever} and {_pedal} choices, the optional {_ribbon} controller, pitch, velocity, the optional pressure sensor, or either {_sweep} control signal for tremolo.
The mod depth scales the post modulation around a value of one {_unit}, rather than zero. That is, if the depth is turned off (the default), you always get 100% of the nominal volume. If it is set to 100%, the post mod can vary the volume from zero to 100%. If it is set to 50%, it can vary the volume from 50% to 100%. If it is set to a negative value, it can vary from 100% down to some lesser value.
The rectangular box is actually a graph of the response, and varies when the two parameters are adjusted. See the mod depth parameter for details on how to interpret these graphs.


synchronized
Some coding standards prohibit the use of the synchronized modifier, in favor of synchronized statements.


Overview
Texas A&M Career Closet is a quasi-student organization that is supported by the foundation for former students and the career center at A&M. Their purpose is simple, to provide a suit rental service to the thousands of students who are searching for jobs the first time in their lives and don't own a suit to wear to the interview. This project documents how we developed a new responsive website for them.
PROBLEM
In their existing website, a student needs to schedule an appointment, visit the office physically during allotted time slot to rent a suit and return it within the due date. Currently, they have a static website that shows basic information about their business and a link to schedule appointments that routes to a third party website.
1. There was a lack of an availability check which was an important user task
2. The External Website did not allow for custom administration
3. The External calendar did not filter out days that were Holidays
There were several other issues such as branding compliance and improved layout etc. The biggest task with this website was that of redesigning the information architecture and managing the taxonomy. The entire structure was reorganized to simplify the flow.
Personas
USER Personas
Design Personas
Traits
Professional but not haughty.
Courteous but not intrusive.
Friendly and not hostile.
Funny and not indifferent.
Firm but not aggressive.
As a part of the project I created the Design Persona and mascot(above). It is simple friendly penguin in a top hat and monocle that greets visitors with messages like "Top of the morning to you ol' chap, could I perhaps interest you in a cup of tea?" We followed Mr. Aaron Walter's principles of 'Designing for Emotion' throughout the project
PROCESS
Mockups
I started out the design process for the website by creating some high fidelity prototypes, The priority was speed and I used templates to put together the mockups
1. The Home Screen
2. The Availability
3. The Appointment
4. Mascot Engagement
We presented these mockups to the users for feedback and started working on the functional prototype
Prototype
1. The Home Screen
2. The Availability
3. Mobile View
4. The Appointment


Simple MLA Citation
Author of the article:
Title of the article:
Publisher:
Date published:
Date accessed:
Print
Web
Format
Remove all


Physics with Matter-js
Introduction
(current)
Sandbox
More Resources!
About
Excellent Resources
Below are listed some excellent resources to learn more about Physics and Math. How excellent? You tell me!
Guided Course/Visualizations:
Mathigon
R2D3's visual introduction to machine learning
A structured physics lesson with interactive animations
Mathinsight.org
Math is fun
An interactive lesson of many math topics
Seeing Theory
Fourier Transforms
An assortment of explorable explanations
Simulations:
Eerily similar to what I've got here:
https://www.myphysicslab.com/
http://physics.bu.edu/~duffy/HTML5/
http://www.nowykurier.com/toys/gravity/gravity.html
http://minutelabs.io/
http://www.falstad.com/mathphysics.html
http://galileoandeinstein.physics.virginia.edu/more_stuff/Applets/home.html
https://learn.concord.org/
https://www.compadre.org/osp/webdocs/Tools.cfm?t=EJS
http://demonstrations.wolfram.com/
http://mathlets.org/courses/
http://www.personal.psu.edu/dpl14/applets.html
https://www.climateinteractive.org/tools/
http://demonstrations.wolfram.com/
http://physics.weber.edu/schroeder/html5/
Reference Websites:
All of Physics:
http://hyperphysics.phy-astr.gsu.edu/
Math:
http://hyperphysics.phy-astr.gsu.edu/hbase/hmat.html
Math:
http://tutorial.math.lamar.edu/
Math:
http://mathworld.wolfram.com/
Math: For any calculation:
http://mathworld.wolfram.com/
Math: For any graphing:
For any graphing: https://www.desmos.com/calculator
Reference Videos:
Map of Mathematics:
https://www.youtube.com/watch?v=OmJ-4B-mS-Y
Map of Physics:
https://www.youtube.com/watch?v=ZihywtixUYo&t=308s
Q&A:
http://math.stackexchange.com/
http://physics.stackexchange.com/
https://www.reddit.com/r/askscience/
For those stupid but not really questions:
https://www.reddit.com/r/eli5/
Youtube Channels/ Video Lessons:
https://www.youtube.com/user/1veritasium/
https://www.youtube.com/user/minutephysics/
https://www.youtube.com/user/Vsauce
https://www.youtube.com/user/numberphile
https://www.youtube.com/user/destinws2
https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw
https://www.khanacademy.org/
and your favorite MOOC platform


|
Drake
|
Provides Drake's assertion implementation.
This is intended to be used both within Drake and by other software. Drake's asserts can be armed and disarmed independently from the system-wide asserts.
#include <type_traits>
Macros | |
| #define | DRAKE_ASSERT(condition) |
DRAKE_ASSERT(condition) is similar to the built-in assert(condition) from the C++ system header <cassert>. More... | |
| #define | DRAKE_ASSERT_VOID(expression) |
Like DRAKE_ASSERT , except that the expression must be void-valued; this allows for guarding expensive assertion-checking subroutines using the same macros as stand-alone assertions. More... | |
| #define | DRAKE_DEMAND(condition) |
Evaluates condition and iff the value is false will trigger an assertion failure with a message showing at least the condition text, function name, file, and line. More... | |
| #define | DRAKE_UNREACHABLE() |
| Silences a "no return value" compiler warning by calling a function that always raises an exception or aborts (i.e., a function marked noreturn). More... | |
| #define DRAKE_ASSERT | ( | condition | ) |
DRAKE_ASSERT(condition)
is similar to the built-in assert(condition)
from the C++ system header <cassert>.
Unless Drake's assertions are disarmed by the pre-processor definitions listed below, DRAKE_ASSERT
will evaluate condition
and iff the value is false will trigger an assertion failure with a message showing at least the condition text, function name, file, and line.
By default, assertion failures will :abort() the program. However, when using the pydrake python bindings, assertion failures will instead throw a C++ exception that causes a python SystemExit exception.
Assertions are enabled or disabled using the following pre-processor macros:
DRAKE_ENABLE_ASSERTS
is defined, then DRAKE_ASSERT
is armed.DRAKE_DISABLE_ASSERTS
is defined, then DRAKE_ASSERT
is disarmed.This header will define exactly one of either DRAKE_ASSERT_IS_ARMED
or DRAKE_ASSERT_IS_DISARMED
to indicate whether DRAKE_ASSERT
is armed.
This header will define both constexpr bool drake::kDrakeAssertIsArmed
and constexpr bool drake::kDrakeAssertIsDisarmed
globals.
One difference versus the standard assert(condition)
is that the condition
within DRAKE_ASSERT
is always syntax-checked, even if Drake's assertions are disarmed.
Treat DRAKE_ASSERT
like a statement – it must always be used in block scope, and must always be followed by a semicolon.
| #define DRAKE_ASSERT_VOID | ( | expression | ) |
Like DRAKE_ASSERT
, except that the expression must be void-valued; this allows for guarding expensive assertion-checking subroutines using the same macros as stand-alone assertions.
| #define DRAKE_DEMAND | ( | condition | ) |
Evaluates condition
and iff the value is false will trigger an assertion failure with a message showing at least the condition text, function name, file, and line.
| #define DRAKE_UNREACHABLE | ( | ) |
Silences a "no return value" compiler warning by calling a function that always raises an exception or aborts (i.e., a function marked noreturn).
Only use this macro at a point where (1) a point in the code is truly unreachable, (2) the fact that it's unreachable is knowable from only reading the function itself (and not, e.g., some larger design invariant), and (3) there is a compiler warning if this macro were removed. The most common valid use is with a switch-case-return block where all cases are accounted for but the enclosing function is supposed to return a value. Do not use this macro as a "logic error" assertion; it should only be used to silence false positive warnings. When in doubt, throw an exception manually instead of using this macro.


{{ template "page-head" . }}
Login
get access to {{ .Project }}
Login
Something went wrong...
×
{{ template "page-js" . }}


| Home | Trees | Indices | Help |
|
|---|
|
|
OS routines for Mac, DOS, NT, or Posix depending on what system we're on.
This exports:
|
|||
|
error OS system call failed. |
|
|||
|
execl(file,
*args) Execute the executable file with argument list args, replacing the current process. |
|||
|
execle(file,
env,
*args) Execute the executable file with argument list args and environment env, replacing the current process. |
|||
|
execlp(file,
*args) Execute the executable file (which is searched for along $PATH) with argument list args, replacing the current process. |
|||
|
execlpe(file,
env,
*args) Execute the executable file (which is searched for along $PATH) with argument list args and environment env, replacing the current process. |
|||
|
execvp(file,
args) Execute the executable file (which is searched for along $PATH) with argument list args, replacing the current process. |
|||
|
execvpe(file,
args,
env) Execute the executable file (which is searched for along $PATH) with argument list args and environment env , replacing the current process. |
|||
|
getenv(key,
default=None) Get an environment variable, return None if it doesn't exist. |
|||
|
makedirs(path,
mode=0777) Super-mkdir; create a leaf directory and all intermediate ones. |
|||
|
removedirs(path) Super-rmdir; remove a leaf directory and empty all intermediate ones. |
|||
|
renames(old,
new) Super-rename; create directories as necessary and delete any left empty. |
|||
|
spawnl(mode,
file,
*args) Execute file with arguments from args in a subprocess. |
|||
|
spawnle(mode,
file,
env,
*args) Execute file with arguments from args in a subprocess with the supplied environment. |
|||
|
walk(top,
topdown=True,
onerror=None) Directory tree generator. |
|
|||
F_OK = 0
|
|||
O_APPEND = 8
|
|||
O_BINARY = 32768
|
|||
O_CREAT = 256
|
|||
O_EXCL = 1024
|
|||
O_NOINHERIT = 128
|
|||
O_RANDOM = 16
|
|||
O_RDONLY = 0
|
|||
O_RDWR = 2
|
|||
O_SEQUENTIAL = 32
|
|||
O_SHORT_LIVED = 4096
|
|||
O_TEMPORARY = 64
|
|||
O_TEXT = 16384
|
|||
O_TRUNC = 512
|
|||
O_WRONLY = 1
|
|||
P_DETACH = 4
|
|||
P_NOWAIT = 1
|
|||
P_NOWAITO = 3
|
|||
P_OVERLAY = 2
|
|||
P_WAIT = 0
|
|||
R_OK = 4
|
|||
TMP_MAX = 32767
|
|||
W_OK = 2
|
|||
X_OK = 1
|
|||
| abort | |||
| access | |||
altsep = '/'
|
|||
| chdir | |||
| chmod | |||
| close | |||
curdir = '.'
|
|||
defpath = '.;C:\\bin'
|
|||
devnull = 'nul'
|
|||
| dup | |||
| dup2 | |||
environ = {'TMP': 'E:\\DOCUME~1\\romany\\LOCALS~1\\Temp', 'COM...
|
|||
| execv | |||
| execve | |||
| fdopen | |||
| fstat | |||
| fsync | |||
| getcwd | |||
| getcwdu | |||
| getpid | |||
| isatty | |||
linesep = '\r\n'
|
|||
| listdir | |||
| lseek | |||
| lstat | |||
| mkdir | |||
name = 'nt'
|
|||
| open | |||
pardir = '..'
|
|||
pathsep = ';'
|
|||
| pipe | |||
| popen | |||
| popen2 | |||
| popen3 | |||
| popen4 | |||
| putenv | |||
| read | |||
| remove | |||
| rename | |||
| rmdir | |||
sep = '\\'
|
|||
| spawnv | |||
| spawnve | |||
| startfile | |||
| stat | |||
| stat_float_times | |||
| stat_result | |||
| statvfs_result | |||
| strerror | |||
| system | |||
| tempnam | |||
| times | |||
| tmpfile | |||
| tmpnam | |||
| umask | |||
| unlink | |||
| urandom | |||
| utime | |||
| waitpid | |||
| write |
|
Execute the executable file with argument list args, replacing the current process. |
Execute the executable file with argument list args and environment env, replacing the current process. |
Execute the executable file (which is searched for along $PATH) with argument list args, replacing the current process. |
Execute the executable file (which is searched for along $PATH) with argument list args and environment env, replacing the current process. |
Execute the executable file (which is searched for along $PATH) with argument list args, replacing the current process. args may be a list or tuple of strings. |
Execute the executable file (which is searched for along $PATH) with argument list args and environment env , replacing the current process. args may be a list or tuple of strings. |
Get an environment variable, return None if it doesn't exist. The optional second argument can specify an alternate default. |
Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. This is recursive. |
Super-rmdir; remove a leaf directory and empty all intermediate ones. Works like rmdir except that, if the leaf directory is successfully removed, directories corresponding to rightmost path segments will be pruned away until either the whole path is consumed or an error occurs. Errors during this latter phase are ignored -- they generally mean that a directory was not empty. |
Super-rename; create directories as necessary and delete any left empty. Works like rename, except creation of any intermediate directories needed to make the new pathname good is attempted first. After the rename, directories corresponding to rightmost path segments of the old name will be pruned way until either the whole path is consumed or a nonempty directory is found. Note: this function can fail with the new directory structure made if you lack permissions needed to unlink the leaf directory or file. |
Execute file with arguments from args in a subprocess. If mode == P_NOWAIT return the pid of the process. If mode == P_WAIT return the process's exit code if it exits normally; otherwise return -SIG, where SIG is the signal that killed it.
|
Execute file with arguments from args in a subprocess with the supplied environment. If mode == P_NOWAIT return the pid of the process. If mode == P_WAIT return the process's exit code if it exits normally; otherwise return -SIG, where SIG is the signal that killed it.
|
Directory tree generator. For each directory in the directory tree rooted at top (including top itself, but excluding '.' and '..'), yields a 3-tuple dirpath, dirnames, filenames dirpath is a string, the path to the directory. dirnames is a list of the names of the subdirectories in dirpath (excluding '.' and '..'). filenames is a list of the names of the non-directory files in dirpath. Note that the names in the lists are just names, with no path components. To get a full path (which begins with top) to a file or directory in dirpath, do os.path.join(dirpath, name). If optional arg 'topdown' is true or not specified, the triple for a directory is generated before the triples for any of its subdirectories (directories are generated top down). If topdown is false, the triple for a directory is generated after the triples for all of its subdirectories (directories are generated bottom up). When topdown is true, the caller can modify the dirnames list in-place (e.g., via del or slice assignment), and walk will only recurse into the subdirectories whose names remain in dirnames; this can be used to prune the search, or to impose a specific order of visiting. Modifying dirnames when topdown is false is ineffective, since the directories in dirnames have already been generated by the time dirnames itself is generated. By default errors from the os.listdir() call are ignored. If optional arg 'onerror' is specified, it should be a function; it will be called with one argument, an os.error instance. It can report the error to continue with the walk, or raise the exception to abort the walk. Note that the filename is available as the filename attribute of the exception object. Caution: if you pass a relative pathname for top, don't change the current working directory between resumptions of walk. walk never changes the current directory, and assumes that the client doesn't either. Example: from os.path import join, getsize for root, dirs, files in walk('python/Lib/email'): print root, "consumes", print sum([getsize(join(root, name)) for name in files]), print "bytes in", len(files), "non-directory files" if 'CVS' in dirs: dirs.remove('CVS') # don't visit CVS directories |
|
F_OK
|
O_APPEND
|
O_BINARY
|
O_CREAT
|
O_EXCL
|
O_NOINHERIT
|
O_RANDOM
|
O_RDONLY
|
O_RDWR
|
O_SEQUENTIAL
|
O_SHORT_LIVED
|
O_TEMPORARY
|
O_TEXT
|
O_TRUNC
|
O_WRONLY
|
P_DETACH
|
P_NOWAIT
|
P_NOWAITO
|
P_OVERLAY
|
P_WAIT
|
R_OK
|
TMP_MAX
|
W_OK
|
X_OK
|
abort
|
access
|
altsep
|
chdir
|
chmod
|
close
|
curdir
|
defpath
|
devnull
|
dup
|
dup2
|
environ
|
execv
|
execve
|
fdopen
|
fstat
|
fsync
|
getcwd
|
getcwdu
|
getpid
|
isatty
|
linesep
|
listdir
|
lseek
|
lstat
|
mkdir
|
name
|
open
|
pardir
|
pathsep
|
pipe
|
popen
|
popen2
|
popen3
|
popen4
|
putenv
|
read
|
remove
|
rename
|
rmdir
|
sep
|
spawnv
|
spawnve
|
startfile
|
stat
|
stat_float_times
|
stat_result
|
statvfs_result
|
strerror
|
system
|
tempnam
|
times
|
tmpfile
|
tmpnam
|
umask
|
unlink
|
urandom
|
utime
|
waitpid
|
write
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Thu Oct 19 08:14:25 2006 | http://epydoc.sourceforge.net |


Do you do this on a repeatable, reliable basis?
Why Continuous Delivery or Deployment?
Because it is modern?
Because it is popular?
Because everyone talks about it?
Because...
Earlier feedback to business
Faster development
Fewer merge conflicts
Lower deployment risk
Changes done faster
Continuous
Integration
vs
Delivery
vs
Deployment
Continuous Integration
Automated integration flow
Merge to main branch often (at least once a day)
Fixing failed flow has the highest priority
Unclear status
Not a "production ready" process
Continuous Integration
Are you doing CI today?
If not, so long and thanks for all the fish
Continuous Delivery
You're doing it when...
you are already doing continuous integration
your software is deployable throughout its life-cycle
your team prioritizes keeping the software deployable
anybody can get fast, automated feedback on the production readiness
you can perform push-button deployments
Continuous Delivery
Means that...
every commit to VCS that passed the flow can be deployed to production
pressing the button to deploy to production is the only manual action
Continuous Deployment
You're doing it when...
you are already doing continuous delivery
there are no buttons to push
Continuous Deployment
Means that...
every commit to VCS that passed the flow is deployed to production
there are no manual actions of any kind
CD
Tasks are reordered
Proactive approach
Cannot be "faked"
Benefits
Faster time-to-market
Building the right product
Improved productivity and efficiency
Reliable releases
Improved product quality
Visibility
Feedback
Benefits
Where are the case studies?
Successful CD implementations are not projects nor they have an end
Benefits
HP LaserJet Firmware
Overall development costs reduced by ~40%
Programs under development increased by ~140%
Development costs per program reduced by 78%
Resources driving innovation increased by 5x
Benefits
ARTstor: provisioning a new server from days to 15 minutes
Group Adeo: one week of development productivity gained, each month
jClouds: 33% increase in developer productivity.
Neustar: build frequency increased by a factor of 4x.
Orbitz: release cycles cut by more than 75%
Service-Flow: development time reduced by 50%
Problems
It's hard to get there
Very hard
Harder than you think
Requires changes on all levels
Technology
Architecture
Culture
Organization structure
...
Problems
Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations - M. Conway
What is CD?
What is CD?
It is vertical
It's not another process
It's not another layer
It does not belong to a single department
It spans the whole organization and the project vertically
It affects the whole SDLC
From business and requirements, through development and testing, all the way until operations and maintainance... is a single, continuous process without delays.
There can be no hand-offs
What is CD?
Single, repeatable, and reliable
The same artifacts
The same process
The same release
What is CD?
Fully automated
No manual steps (except clicking the "deploy to production" button)
Right tool for a task
What is CD?
Everything must be in VCS
Code
Configuration
Scripts
Database deltas
Documentation
Delivery flow
Everything related to a single project in single repository
What is CD?
Short feedback loops
Continuous != monthly != weekly
Continuous == (at least) daily
Fix of a delivery flow failure == priority
Time to fix the problem ∝ time it was detected
Delivery flow must be fast
What is CD?
No branching
Branches prevent CD
... unless they are short lived (a day or less)
What is CD?
Generates everything
Environments
Binaries
DB changes
Documentation
...
Dos & Don'ts
Do Not
form a CD team
task one department to create a CD flow
automate inside a CD tool
Do
form a multifunctional and autonomous team capable of delivering a service
include someone with CD experience inside the team
choose an easy target
trust the team
short iterations
How to start?
Do dos and don't do don'ts
Don't trust do-it-all processes and tools
A feature/story is done when it is ready for (or deployed to) production
It's a learning experience
The team will fail, learn from failure, improve, repeat