Skip to content

Instantly share code, notes, and snippets.

View drj11's full-sized avatar

David Jones drj11

View GitHub Profile
@drj11
drj11 / why.md
Last active April 18, 2017 15:34
A day debugging

Why Doesn't my webserver work?

What ports are being listened on?

netstat --listen --inet # warning IPv4 only

netstat --numeric --listen --tcp

netstat -peanut
@drj11
drj11 / statement.md
Created April 5, 2017 10:22
sheffield job

My CV is available online at https://github.com/drj11/cv

Open Source has created an incredibly valuable ecosystem. So far, this ecosystem is software tools for professional programmers. I'm keen to see Open Source create value in the scientific community.

Life sciences are being revolutionised by a tsunami of data, personal omics being just one example. Using this data to deliver valuable services to society (without being crushed under the tsunami!) will involve computation and computing skills.

@drj11
drj11 / bcbio.md
Last active March 2, 2017 17:04
bcbio

bcbio for Dummies

(like me)

download template. This creates a directory (in the example below, the directory is my_dummy_dir), in which you will find a .yaml file.

bcbio_nextgen.py -w template illumina-rnaseq my_dummy_dir

(where is this documented?)

@drj11
drj11 / speed.md
Last active February 27, 2017 14:51

A short experiment on copying big files

File size is 1412908312

According to https://www.kernel.org/doc/Documentation/sysctl/vm.txt

/bin/echo 3 | sudo tee /proc/sys/vm/drop_caches

is used to remove file data and metadata from (kernel) RAM. We'll use it so we can get timings for copying a file cold,

conda iceberg rapid

module load apps/python/conda conda create --name aws . activate aws

to install awscli I had to

conda install -c bioconda awscli

@drj11
drj11 / accent.md
Last active February 22, 2017 16:42
English words with accents.

a-acute: guaraná

a-dots: jäger, hälleflinta, ländler, schwärmerei

a-grave: déjà vu (phrase, alas)

a-hat: pâté, râle

a-ring: Ångström, ås

@drj11
drj11 / mess.py
Created December 21, 2016 16:51
My buggy hypothesis example
from hypothesis import given
from hypothesis.strategies import floats
@given(floats())
def test_divide(p, q):
if q == 0: return
assert p / q == p * (1 / q)
if __name__ == '__main__':
test_divide()

Amazon Lightsail: Amazon are going after the low-end server market with a consolidated product. Primarily targetted at users of other VPS hosting services like Dreamcloud. Not useful for us yet. We'll keep an eye out.

AWS Research Cloud Program: Useful. Am signing up. There's a bundle of goodies, but in particular free network traffic for downloads to JISC (so all UK universities), and invoiced billing instead of credit card.

Refinery Groups: Anyone can create a group, they are the owner and can then add members to that group.

@drj11
drj11 / sharing.py
Created November 3, 2016 14:01
structure sharing
a=[1]
b=['b']
c=['c']
b.append(a)
c.append(a)
print(b)
print(c)
b[1].append('xyz')
print(b)
print(c)
@drj11
drj11 / binding.py
Created November 3, 2016 13:50
A closure example
def p():
v = [0]
def x():
print(v)
x()
v = [7]
x()
p()