Woelcke Autark T5 Crosser Off Road

800 mile range
50 gallons water
Locking differential
~$3000 to ship to Halifax
7.5 foot width
Can navigate through 3 feet of water

Share

rethinkDB

This post will describe installation and interaction with rethinkDB using Javascript/Node.js. Ultimately I want to hook rethinkDB to Shiny. I am working on Debian/Jessie. Currently (August, 2017) rethinkDB will not install on Stretch.

Installation

1
2
3
4
#echo "deb http://download.rethinkdb.com/apt `lsb_release -cs` main" | tee /etc/apt/sources.list.d/rethinkdb.list
#wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | apt-key add -
#apt-get update
#apt-get install rethinkdb

Start the server with the command “rethinkdb” at a terminal prompt. By default administrative tools are available at localhost:8080/.

Client driver installation

cd to the working directory then install a node project

1
2
3
4
5
mbc@dc7700s: cd ./syncd/prog/shiny/music
mbc@dc7700s:~/syncd/prog/shiny/music$ npm init
mbc@dc7700s:~/syncd/prog/shiny/music$ npm install rethinkdb --save
mbc@dc7700s:~/syncd/prog/shiny/music$ node
>r = require('rethinkdb')

Set the conn variable and interact with the database

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mbc@dc7700s:~/syncd/prog/shiny/music$ node
>r = require('rethinkdb')
>var connection = null;
r.connect( {host: 'localhost', port: 28015}, function(err, conn) {
if (err) throw err;
connection = conn;
})


>r.db('shiny').table('music').run(connection, function(err, cursor) {
if (err) throw err;
cursor.toArray(function(err, result) {
if (err) throw err;
console.log(JSON.stringify(result, null, 2));
});
});

Insert

1
2
3
4
5
6
7
8
r.db('shiny').table('music').insert([{artist:'Boston', 
songs: [ {title:'song1',genre:'rock',url:'https://www.youtube.com/watch?v=SSR6ZzjDZ94'},
{title:'song2',genre:'rock',url:'https://www.youtube.com/watch?v=SSR6ZzjDZ94'}]
}]).run(connection, function(err, result) {
if (err) throw err;
console.log(JSON.stringify(result, null, 2));
})

Update

1
2
3
4
5
6
7
8
9
r.db('shiny').table('music').
filter(r.row("artist").eq("Boston")).
update({songs:

[ {title:'song1',genre:'rock',url:'https://www.youtube.com/watch?v=SSR6ZzjDZ94'},
{title:'song2',genre:'rock',url:'https://www.youtube.com/watch?v=SSR6ZzjDZ94'},
{title:'song3',genre:'rock',url:'https://www.youtube.com/watch?v=SSR6ZzjDZ94'}]}).run(connection, function(err, result) {
if (err) throw err;
console.log(JSON.stringify(result, null, 2));})

Show all

1
2
3
r.db('shiny').table('music').distinct().run(connection, function(err, result) {
if (err) throw err;
console.log(JSON.stringify(result, null, 2));})

Delete all

1
2
3
r.db('shiny').table('music').delete().run(connection, function(err, result) {
if (err) throw err;
console.log(JSON.stringify(result, null, 2));})

Launch script

The ‘launch.browser’ option to runApp() deals with the random port assigned by Shiny.

music.sh
1
2
3
4
5
#!/bin/bash
rethinkdb -d /home/mbc/shiny/music/rethinkdb_data/ &

R -e "shiny::runApp(appDir='/home/mbc/shiny/music', launch.browser=TRUE)"

Share

Fermi's Paradox

Aestivation: Aliens are hibernating until the average temperature of the universe cools a bit more which will make their information processing more efficient.

Share

Behavioral Genetics

Five laws from JayMan

Direct evidence for transport of RNA from the mouse brain to the germline and offspring

Worm Parents Pass on Behaviors Epigenetically to Offspring

Heredity and behaviour in dog breeds

Share

Coefficient of Relationship

i.b.d.: identical by descent

Consider relatives A and B

What is the probability that for any gene the alleles are i.b.d.?

|Probability|# identical|
|————————|
|$c_2$|both|
|$c_1$|one|
|$c_0$|neither|

$c_2 + c_1 + c_0 = 1$

$a= 1 + \delta a + e$

From Haldan and Jayacar(1962) tables of r (coefficient of relationship) are presented.

f: coefficient of relationship or of inbreeding; the probability that if A has produced a gamete carrying a rare gene, the first tested gamete of B will carry the same gene.

$\phi$ is for sex linked genes in gametes

For diploid genotypes F and $\Phi$ are used

|Relation|Symbol|Converse|f|F|$\phi_{11}$|$\phi_{12}$|$\phi_{21}$|$\phi_{22}$|$\Phi$|
|—-|
|Degree 1|
|Parent||Child|$\frac{1}{4}$|0|0|$\frac{1}{2}$|$\frac{1}{2}$|$\frac{1}{4}$|0|
|Degree 2|
|Mother’s Parent||Daughter’s Child|$\frac{1}{8}$|0|$\frac{1}{2}$|$\frac{1}{4}$|$\frac{1}{4}$|$\frac{1}{8}$|0|
|Father’s Parent||Son’s Child|$\frac{1}{8}$|0|0|0|0|$\frac{1}{4}$|0|
|Maternal half sib|W|S|$\frac{1}{8}$|0|$\frac{1}{2}$|$\frac{1}{4}$|$\frac{1}{4}$|$\frac{1}{8}$|0|
|Paternal half sib|H|S|$\frac{1}{8}$|0|0|0|0|$\frac{1}{4}$|0|
|Full sib|M|S|$\frac{1}{4}$|$\frac{1}{4}$|$\frac{1}{2}$|$\frac{1}{4}$|$\frac{1}{4}$|$\frac{3}{8}$|$\frac{1}{2}$|

Share

Overpopulation

Consider all the afflictions of Mother Earth - CO2 production, monoculture, resource extraction (oil, strip mining), pollution, deforestation, species extinction, etc. There is a single root cause: overpopulation. Why aren’t we talking about overpopulation instead of increasing automobile fuel efficiency by 1%? Or building windmills? Because the overpopulation problems isn’t amongst western european populations. It’s in China, India, and sub-saharan Africa. Close the borders and prevent North America from being used as the overpopulation pressure relief valve by third world countries, China, India.

A high-density population causes a loss of humanity, community and solidarity
by Konrad Lorenz in Managerism

If a population is too dense with overcrowding, then disinterest, disengagement and unfriendly behavior becomes widespread. This can be witnessed daily at rail stations, airports, shopping centers, stadiums and mega-events. Excessive social contact causes people to become unnaturally disinterested in each other. Close proximity can trigger aggression, and breeds mass behavior and indifference. Translated for the present day, this means that social media like Facebook and similar, while appearing to promote friendship and solidarity, actually encourage more disconnected and superficial communication. The lesson to be learned is that lasting solutions are to be found in a world of communities which are overseeable: human-scale, local and controllable – and not national or global.

White men can now tell black woman to stop having so many babies.

The population of India compared to other countries:

Share

Religion

Wealthy widows, the Catholic church, and individualism.

Share

Trees

Crown shyness

Urban Tree Database

i-Tree

NY Census

Share