This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
PURPOSE: Parse a pile of 'spreadsheet' files downloaded from | |
Corning Credit Union eBranch. | |
FEAUTURES: - Parse and combine financial records from a list of raw | |
files, converting the data into convenient types. | |
- Plot stuff. | |
EXAMPLE USAGE: | |
import ccu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/dallan/pandas-danielballan/pandas/__init__.py in <module>() | |
23 | |
24 # let init-time option registration happen | |
---> 25 import pandas.core.config_init | |
26 | |
27 from pandas.core.api import * | |
/home/dallan/pandas-danielballan/pandas/core/config_init.py in <module>() | |
2 from pandas.core.config import (is_int, is_bool, is_text, is_float, | |
3 is_instance_factory,is_one_of_factory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [4]: def forgiveness(x): | |
try: | |
x.plugins.append(1) | |
except AttributeError: | |
x.plugins = [1] | |
...: | |
In [5]: def permission(x): | |
if not hasattr(x, 'plugins'): | |
x.plugins = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import re | |
from dateutil.parser import parse | |
import email | |
import html2text | |
import MySQLdb | |
from itertools import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [27]: df.to_sql('bar', engine, index=False) | |
--------------------------------------------------------------------------- | |
StatementError Traceback (most recent call last) | |
<ipython-input-27-7476a9ea602a> in <module>() | |
----> 1 df.to_sql('bar', engine, index=False) | |
/Users/danielallan/Documents/Repos/pandas-danielballan/pandas/core/generic.py in to_sql(self, name, con, flavor, if_exists, index, index_label) | |
940 sql.to_sql( | |
941 self, name, con, flavor=flavor, if_exists=if_exists, index=index, | |
--> 942 index_label=index_label) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is Dan Allan's setting of Professor Robert Leheny's plotting style preferences. | |
# Updated October 2014 | |
# | |
# Invoke in Python matplotlib like so: | |
# | |
# import matplotlib as mpl | |
# | |
# mpl.style.use('https://gist.github.com/danielballan/be066529de85e87a5fe7/raw') | |
# | |
# This feature is only available in matplotlib version 1.4 or higher. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright 2014 Dan Allan | |
Read the data from a Zetasizer output file and return the intensity as | |
as a function of frequency in a spreadsheet-like object (pandas DataFrame) | |
that can exported to any convenient format. | |
This is only lightly tested. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import (absolute_import, division, print_function, | |
unicode_literals) | |
import six | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import matplotlib.path as mpath | |
import matplotlib.patches as mpatches | |
from IPython.html import widgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
running install | |
running bdist_egg | |
running egg_info | |
creating PIMS.egg-info | |
writing PIMS.egg-info\PKG-INFO | |
writing top-level names to PIMS.egg-info\top_level.txt | |
writing dependency_links to PIMS.egg-info\dependency_links.txt | |
writing manifest file 'PIMS.egg-info\SOURCES.txt' | |
reading manifest file 'PIMS.egg-info\SOURCES.txt' | |
writing manifest file 'PIMS.egg-info\SOURCES.txt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Daniel B. Allan | |
# August 2014 | |
# Robert L. Leheny Lab, JHU Dept. of Physics & Astronomy | |
""" | |
Capture an image from a NI frame grabber. | |
Adapted from code posted by Oliver W. at | |
http://stackoverflow.com/questions/17095359 |
OlderNewer