Skip to content

Instantly share code, notes, and snippets.

@stsievert
stsievert / after_commenting_out
Created October 16, 2014 22:00
myo-python errors
> ipython script.py
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/Users/scott/Developer/gesture/gesture_mac/python/script.py in <module>()
1
2 import myo
----> 3 myo.init()
4
5 from myo.six import print_
@stsievert
stsievert / macvim-latex-box.md
Last active August 29, 2015 14:10
MacVim and latex-box

Description

I ran into the issue where MacVim could not compile latex files using latex-box under OSX Yosemite. This only occured when opening MacVim the most natural way (at least for me): using Spotlight or double clicking. Opening with the terminal (using mvim etc) gave me no compile errors. There's a related [Github issue].

Fix

To fix this issue, I created a simple Automator workflow that acted as an application and would run mvim on a file received as input. This application

@stsievert
stsievert / cell_tower-save.pickle
Created February 27, 2015 16:12
HW1 for EE5393: Circuits, Computation and Biology
cnumpy.core.multiarray
_reconstruct
p0
(cnumpy
ndarray
p1
(I0
tp2
S'b'
p3
@stsievert
stsievert / .vimrc
Created May 23, 2015 22:23
vim configuration
" REQUIRED INSTALL:
" > brew install macvim --with-cscope --with-lua --HEAD
" lua not required but HEAD required for breakindent
"
" QUICK REFACTOR
" * hover over word, press `*`
" * use :%s//newName/g to replace all occurences
" MARKDOWN PREVIEW
" * <leader>md to open up safari and view it live
" ULTISNIPS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / Rasterize2.ipynb
Created March 12, 2013 15:22
An IPython notebook.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / Rasterize3.ipynb
Created March 12, 2013 16:00
An IPython notebook.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / Rasterize4.ipnb
Created March 12, 2013 21:35
Another .ipynb...
{
"metadata": {
"name": "Rasterize"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@stsievert
stsievert / Iterative Hard Thresholding
Created March 18, 2013 16:52
Using iterative hard thresholding to recreate a signal. dtw and idwt can easily be replaced with fft and ifft.
clear all
close all
clc
% Load in an image
I = double(imread('~/Desktop/not-used-frequently/pictures_for_project/lenna.jpg'));
I2 = mean(I,3);
I3 = imresize(I2,[512,512]);
% Take Measurements (pixels)
sz = size(I3);
@stsievert
stsievert / iptest results
Created March 21, 2013 20:29
Trying to install ipython's qtconsole.
> iptest
**********************************************************************
IPython test group: IPython.config
..............................................
----------------------------------------------------------------------
Ran 46 tests in 0.054s
OK
**********************************************************************
IPython test group: IPython.core