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
# needs zoo for "rollapply" | |
library(zoo) | |
# needs e1071 for Hamming window | |
library('e1071') | |
# load data | |
th <- read.csv2('app_status_report_hourly.csv', header=F, sep=',', col.names=c('time','count')) | |
# normalize the data by the maximum |
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/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 |
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
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 |
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
# Read in data | |
timeSeriesElectionData <- read.table("twitterElectionTimeline_tsvWithHeader.txt",header=TRUE) | |
# Attach columns of data as variables in R environment | |
attach(timeSeriesElectionData) | |
# open a pdf file for writing | |
pdf(file="electionTimeline.pdf",height=4,width=12) | |
# plot the sum of tweets about obama and romney, as a line, with no x-axis ticks, bla bla... |
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
# install and load additional packages | |
install.packages("zoo") | |
install.packages("chron") | |
library(zoo) | |
library(chron) | |
# 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 |
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
import matplotlib.pyplot as plt | |
import scipy.misc | |
import spectral.io.envi as envi | |
# in ftp.djamshidpour.com/SanFrancisco/d20160226T2055 | |
img = envi.open('FBI_TET1_20160226T205533_20160226T205613_L1B_C_EL-02984_LWIR.hdr', | |
'FBI_TET1_20160226T205533_20160226T205613_L1B_C_EL-02984_LWIR.flt') | |
#show images in viewer | |
# plt.imshow(img.asarray().squeeze()) # color |