Skip to content

Instantly share code, notes, and snippets.

View fish2000's full-sized avatar
👉
My Python work is on the Mars helicopter, and ubiquitous on earth, and more!!!!

Alexander Böhn fish2000

👉
My Python work is on the Mars helicopter, and ubiquitous on earth, and more!!!!
  • Objects in Space and Time, LLC
  • Baltimore, MD
  • 06:23 (UTC -05:00)
  • X @fish2000
View GitHub Profile
@fish2000
fish2000 / .bash_prompt.sh
Last active January 30, 2019 07:40 — forked from miki725/.bash_prompt.sh
Custom bash prompt display: «virtualenv»:HOST-NAME:current_working_dir[git-branch •]$
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch of the current git/mercurial repository
# * the return value of the previous command
#
# USAGE:
@fish2000
fish2000 / multiple_dispatch.py
Last active November 20, 2018 20:25 — forked from wolfv/multiple_dispatch.py
A Taste Of Julia / C++ in Python – simple Python multiple dispatch from type hints
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# multiple_dispatch.py
#
# My version:
# https://gist.github.com/fish2000/1af4b852d20b7568a9b9c90fe2346b6d
#
# Forked from the originall by @wolfv:
# https://gist.github.com/wolfv/73f56e4a9cac84eea6a796fde3213456
"""
An example of minimum requirements to make MultiValueField-MultiWidget for Django forms.
"""
import pickle
from django.http import HttpResponse
from django import forms
from django.template import Context, Template
from django.views.decorators.csrf import csrf_exempt
@fish2000
fish2000 / timelapse.py
Created July 15, 2012 02:32 — forked from lrvick/timelapse.py
Simple script to run a timelapse on a canon camera from a raspberry pi with an attached HD44780 display
from hd44780 import HD44780
import ctypes
from time import sleep
class CameraFilePath(ctypes.Structure):
_fields_ = [('name', (ctypes.c_char * 128)),
('folder', (ctypes.c_char * 1024))]
gp = ctypes.CDLL('libgphoto2.so.2')
@fish2000
fish2000 / DefineSpecsAsModules.coffee
Created July 14, 2012 19:31
Mixing Require.js, Jasmine, Sinon.js and Backbone.
## ItemView.coffee in the specs/coffee folder ##
define ["ItemView"], (ItemView) ->
###
Specs for ItemView
###
describe "Item View", ->
###
Common setup and teardown