Skip to content

Instantly share code, notes, and snippets.

View helenst's full-sized avatar

Helen Sherwood-Taylor helenst

View GitHub Profile
@helenst
helenst / tar.diff
Created October 31, 2019 09:24
Include directory entries in tarfile and allow top level directory to be specified
diff --git a/python_client/src/wellcome_storage_service/downloader.py b/python_client/src/wellcome_storage_service/downloader.py
index 6a78c76b..fc10f56e 100644
--- a/python_client/src/wellcome_storage_service/downloader.py
+++ b/python_client/src/wellcome_storage_service/downloader.py
@@ -3,6 +3,7 @@
import abc
import os
import tarfile
+import time

Keybase proof

I hereby claim:

  • I am helenst on github.
  • I am helenst (https://keybase.io/helenst) on keybase.
  • I have a public key whose fingerprint is 2394 F27B 2D10 A1F8 E60C 537E 57E7 D157 176D 302D

To claim this, I am signing this object:

@helenst
helenst / compose.diff
Created November 29, 2017 10:35
Docker build issues
diff --git a/compose/dev/Makefile b/compose/dev/Makefile
index 1bd9b0d..ed8ec0d 100644
--- a/compose/dev/Makefile
+++ b/compose/dev/Makefile
@@ -11,14 +11,8 @@ VERSION = $(shell git describe --tags --always --dirty)
all: destroy bootstrap
docker-compose ps
-versionfile:
- @echo "\
@helenst
helenst / gist:6f8d3d0871980e1bf84bc29c6d53e3a6
Created August 9, 2017 13:21
Additional extract file test for Archivematica
def test_extract_file_aip_from_compressed_aip(self):
""" It should return an aip """
package = models.Package.objects.get(uuid='88deec53-c7dc-4828-865c-7356386e9399')
basedir = package.get_base_directory()
output_path, extract_path = package.extract_file(extract_path=self.tmp_dir)
assert output_path == os.path.join(self.tmp_dir, basedir)
assert os.path.join(output_path, 'manifest-md5.txt')
@helenst
helenst / adding.py
Last active November 13, 2015 09:00
Micropython adding game
import microbit
firstnum = microbit.random(4)
secondnum = microbit.random(5)
microbit.display.scroll('{} + {}'.format(firstnum, secondnum), 200)
def wait_for_pressed():
while 1:
buttona = microbit.button_a.is_pressed()
#!/usr/bin/env python
"""
Find the sets of characters used in RST section headers,
and replace with a standard sequcne
For input like
::
##########