This implements a nicer color scheme for matplotlib, along with some other styling tweaks.
To install:
cd ~/.matplotlib
cp matplotlibrc backup_matplotlibrc
git clone https://gist.github.com/adamgreenhall/5312535 newrc
cp newrc/matplotlibrc .
time | wind | |
---|---|---|
1:00 | 50 | |
2:00 | 52 | |
3:00 | 53 |
""" | |
tiny script to convert a pandas data frame into a JSON object | |
""" | |
import json as json | |
def df_to_json(df, filename=''): | |
x = df.reset_index().T.to_dict().values() | |
if filename: | |
with open(filename, 'w+') as f: f.write(json.dumps(x)) |
<form accept-charset="UTF-8" action="/pieces" class="simple_form form-horizontal" id="new_piece" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden"></div> <div class="input text optional piece_title"><label class="text optional" for="piece_title">Title</label><textarea class="text optional" id="piece_title" name="piece[title]"></textarea></div> | |
<div class="input string optional piece_cover_image field_with_hint"><label class="string optional" for="piece_cover_image">Cover image</label><input class="string optional" id="piece_cover_image" maxlength="255" name="piece[cover_image]" size="255" type="text"><span class="hint">url for image</span></div> | |
<div class="input integer optional piece_order"><label class="integer optional" for="piece_order">Order</label><input class="numeric integer optional" id="piece_order" name="piece[order]" step="1" type="number"></div> | |
<div class="input st |
This implements a nicer color scheme for matplotlib, along with some other styling tweaks.
To install:
cd ~/.matplotlib
cp matplotlibrc backup_matplotlibrc
git clone https://gist.github.com/adamgreenhall/5312535 newrc
cp newrc/matplotlibrc .