Skip to content

Instantly share code, notes, and snippets.

Guillaume Duquesnay duquesnay

Block or report user

Report or block duquesnay

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
@duquesnay
duquesnay / python dynamic module url load
Last active Nov 17, 2017
Dynamic build module from URL
View python dynamic module url load
def load_module(url):
import urllib.request
from os.path import splitext, basename
from types import ModuleType
u = urllib.request.urlopen(url)
sourcename = url.split('/')[-1]
modulename = splitext(basename(sourcename))[0]
sourcecode = u.read().decode('utf-8')
code = compile(sourcecode, url, 'exec')
@duquesnay
duquesnay / pi_qemu.sh
Created Mar 7, 2017 — forked from JasonGhent/pi_qemu.sh
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
View pi_qemu.sh
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest
You can’t perform that action at this time.