Skip to content

Instantly share code, notes, and snippets.

Theo McCaie tam203

Block or report user

Report or block tam203

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tam203
tam203 / offsetmap-part.py
Created Feb 28, 2019
__getitem__ from offsetmap.py for Medium article https://medium.com/p/a394fa48b671/
View offsetmap-part.py
def __getitem__(self, path):
origpath = path
if '/' in path:
prefix, item = path.rsplit('/',1)
else:
prefix = ''
item = path
if self._chunk_re.match(item):
offset = self._get_offset(prefix)
@tam203
tam203 / offsetmap.py
Created Feb 28, 2019
offsetmap.py full - for Medium article https://medium.com/p/a394fa48b671
View offsetmap.py
import s3fs
import re
import json
class OffSetS3Map(s3fs.S3Map):
def __init__(self, *args, temp_chunk_path=None, **kwargs):
self.temp_chunk_path = temp_chunk_path
self._offsets = {}
s3fs.S3Map.__init__(self, *args, **kwargs)
View mogreps_cube.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View version1
import urllib
import time
import RPi.GPIO as GPIO
GPIO.cleanup()
GPIO.setmode(GPIO.BCM)
GPIO.setup(7,GPIO.OUT)
pinNumbers = [4,17,22,23,24]
for i in pinNumbers:
GPIO.setup(i,GPIO.OUT)
You can’t perform that action at this time.