This file contains hidden or 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
def parse_orgtable(s): | |
"""Parse an org-table (input as a multiline string) into a Pandas data frame.""" | |
# This didn't quite work, because spaces messed things up | |
#import cStringIO | |
#table = pd.read_table(cStringIO.StringIO(s),sep='|',skiprows=[1],skipinitialspace=True) | |
#table = table.drop(table.columns[[0,-1]],1) | |
# I suppose I could have simply run strip() on all of the resulting column names, since that was the problem | |
def parseline(l): | |
w = l.split('|')[1:-1] | |
return [wi.strip() for wi in w] |
This file contains hidden or 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
;; Prevent the cursor from blinking | |
(blink-cursor-mode 0) | |
;; Don't use messages that you don't read | |
(setq initial-scratch-message "") | |
(setq inhibit-startup-message t) | |
;; Don't let Emacs hurt your ears | |
(setq visible-bell t) | |
;; You need to set `inhibit-startup-echo-area-message' from the | |
;; customization interface: |
This file contains hidden or 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
def parseline(line,format): | |
"""\ | |
Given a line (a string actually) and a short string telling | |
how to format it, return a list of python objects that result. | |
The format string maps words (as split by line.split()) into | |
python code: | |
x -> Nothing; skip this word | |
s -> Return this word as a string | |
i -> Return this word as an int |
This file contains hidden or 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
{ | |
"metadata": { | |
"name": "Sympy Circuit Plot" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
class TableCell(object): | |
bg_colour = None | |
def __init__(self, value, header=False, bg_colour=None, text_colour=None): | |
self.value = value | |
self.header = header | |
self.bg_colour = bg_colour | |
self.text_colour = text_colour | |
def _make_css(self): |
This file contains hidden or 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 | |
# coding=utf-8 | |
# Python version of Zach Holman's "spark" | |
# https://github.com/holman/spark | |
# by Stefan van der Walt <[email protected]> | |
""" | |
USAGE: |