Skip to content

Instantly share code, notes, and snippets.

View drj11's full-sized avatar

David Jones drj11

View GitHub Profile
@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 / 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 / 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()
@drj11
drj11 / srds.md
Created August 9, 2016 09:41
SRDS

SRDS - SECTION A

2016-08-09 David Jones

1) Achievements

Delivey of Refinery platform on AWS. This is underway. A basic version works and it continues to be refined.

Contributed to planning of CGT.

@drj11
drj11 / colourtext.md
Last active July 28, 2016 09:41
My notes on text for presentations

2016-07-27

Observing a presentation that was mostly text on a white background, displayed on a projector.

  • black on white - good
  • green on white - terrible
  • blue on white - legible, but difficult to distinguish from black
  • light blue on white - ok
  • cyan on white - mostly terrible
  • red on white - ok