Skip to content

Instantly share code, notes, and snippets.

View christabor's full-sized avatar
😅
I may be slow to respond.

Chris Tabor christabor

😅
I may be slow to respond.
View GitHub Profile
@aanastasiou
aanastasiou / flask_deform_simpleSort.py
Created May 11, 2012 12:21
Using Pylon's Deform with Flask
"""A very simple example to show what is required to get the excellent deform module from the Pylon's project to work with Flask.
DeForm is a Pylon's module capable of automatically creating HTML forms that conform to a schema of classes defined in Python through the Colander module. The transformation between Schema<-->Form data is handled by another module called Peppercorn. More information about how these three modules work together can be found at: http://docs.pylonsproject.org/projects/deform/en/latest/?awesome
Although DeForm is a Pylon's project, it can also operate as a stand-alone module. This Gist contains all the necessary changes to objects provided by Flask so that DeForm can serialize and deserialize data posted through a Flask.Request.
The basic thing that this gist is trying to demonstrate is how to derive from a Flask.Request object in order to change the data type of the Flask.Request.form object that stores the data posted by the client to the server. By default, Flask uses a MultiDict i
@goldsmith
goldsmith / python_mavericks_guide.sh
Last active June 3, 2020 12:18
When I upgraded my Mac to OS X Mavericks, a lot of utilities (like Python, virtualenv, Xcode) broke, and it was pretty stressful trying to get it all set back up. Hopefully this guide can spare you some of that pain.Note: I'm by no means a Linux or Mac expert, so please fork and let me know if anything is redundant, incorrect, or missing!
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.
@jasoncodes
jasoncodes / gist:1223731
Created September 17, 2011 07:45
Installing Ruby 1.9.3 with rbenv on OS X
# The latest version of this script is now available at
# https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh
VERSION=1.9.3-p286
brew update
brew install rbenv ruby-build rbenv-vars readline ctags
if [ -n "${ZSH_VERSION:-}" ]; then
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
else
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
@dansimau
dansimau / .gitignore
Created May 20, 2012 23:52 — forked from urschrei/mkflask.sh
Bootstrap a Flask project on Ubuntu Precise, with Puppet, Vagrant and Fabric. (For latest version, see https://github.com/dansimau/flask-bootstrap)
*~
*.pyc
.vagrant
venv
@christabor
christabor / Principles.md
Last active March 9, 2019 06:34
Bret Victor principles

Articles and their respective points

GLOBAL

  • Interactivity
  • Direct manipulation
  • Intuition
  • See the data, see the changes

===============================================================================

@brookskindle
brookskindle / xkcd style graphs in jupyter.ipynb
Created June 8, 2017 20:11
A simple demonstration on how to make xkcd-styled graphs in Jupyter using Python and Pandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GerHobbelt
GerHobbelt / README.md
Last active December 15, 2015 03:29
reference scans for the new D3.js scales+axis work-in-progress

Intent

Collection of references ('from a time when graphic skills did not mean hitting the Print button on an Excel Chart')

Origins

Scans originate from some classic books, owned by yours truly: