Skip to content

Instantly share code, notes, and snippets.


Abe Kazemzadeh abecode

View GitHub Profile
abecode /
Last active Apr 21, 2016
reading ENVI from header (hdr) and openflight (flt) files
import matplotlib.pyplot as plt
import scipy.misc
import as envi
# in
img ='FBI_TET1_20160226T205533_20160226T205613_L1B_C_EL-02984_LWIR.hdr',
#show images in viewer
# plt.imshow(img.asarray().squeeze()) # color
View gist:e7f0c9ab4e284d3fc9b7
#!/usr/bin/env python
# imports and basic notebook setup
from cStringIO import StringIO
import numpy as np
import scipy.ndimage as nd
import PIL.Image
import sys
from IPython.display import clear_output, Image, display
from google.protobuf import text_format
View gist:ba31e14ff4d5915ff877
# needs zoo for "rollapply"
# needs e1071 for Hamming window
# load data
th <- read.csv2('app_status_report_hourly.csv', header=F, sep=',', col.names=c('time','count'))
# normalize the data by the maximum
View gist:4562764
# install and load additional packages
# read in data
dt <- read.delim("movieReports/20130109_to_20120113.tsv",header=TRUE,sep="\t",comment.char="",quote="",na.strings="",fileEncoding="UTF-8")
# convert the tweet column from a factor (default) to a character string
View gist:4289867
# Read in data
timeSeriesElectionData <- read.table("twitterElectionTimeline_tsvWithHeader.txt",header=TRUE)
# Attach columns of data as variables in R environment
# open a pdf file for writing
# plot the sum of tweets about obama and romney, as a line, with no x-axis ticks, bla bla...
View quote from William Garden
Our yachts are toy boats, the glint on a lovely brief bubble of time. A boat's importance as an escape from reality, as a change of pace, as a theme for reflection and as an art form gives it worth or value.
--William Garden