case insensitive, search recursively in present directory for "modules", and list file names only
grep -irl "modules" .
search recursively in present directory, for "mod" file name, with any extension, list files only
grep -rl mod.* .
# Data Without Borders: Final Project | |
# Multi-dimensional Scaling of Google Products in Relation to Goverment Takedown Requests | |
gov.requests = read.csv("/Users/evanemolo/Dropbox/_ITP/_Fall_2012/DWB/Final/datasets/Google transparency report - GOV REQUESTS.csv", header=TRUE, as.is=TRUE) | |
# Basic summary statistics | |
# Which countries are making the most removal requests? | |
rev(sort(table(gov.requests$Country))) | |
# How many Google products are targeted? |
unique.vals <- sort(unique(gov.requests$Product)) | |
blank.frame <- data.frame(product=unique.vals, counts=rep(0, length(unique.vals))) | |
unique.countries <- unique(gov.requests$Country) | |
results <- matrix(0, nrow=length(unique.countries), ncol=length(unique.vals)) | |
colnames(results) <- unique.vals | |
rownames(results) <- unique.countries | |
# You'll have to do this for each country | |
i <- 0 |
MyValues = [] #create an empty list | |
values = csv.reader(open('data.csv', 'rb'), delimiter=' ') | |
for row in values: | |
MyValues.append(row[5]) |
# Add this file to a directory called SublimeBlockCursor in the Packages directory. | |
import sublime | |
import sublime_plugin | |
class SublimeBlockCursor(sublime_plugin.EventListener): | |
def view_is_widget(view): | |
settings = view.settings() | |
return bool(settings.get('is_widget')) |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
{ | |
"statusbar_modified_time" : false, | |
"statusbar_modified_time_format" : "%A %b %d %H:%M:%S %Y", | |
"statusbar_file_size" : false, | |
"close_affected_buffers_when_deleting_even_if_dirty" : false, | |
"hide_open_with_entries_when_there_are_no_applicable" : false, |
# Import the data and TTR library: | |
#tweets = read.csv("http://jakeporway.com/teaching/data/tweets2009.csv", header=FALSE, as.is=TRUE) | |
tweets = read.csv("/Users/evanemolo/Dropbox/_ITP/_Fall_2012/DWB/HW/WK6/tweets2009.csv", as.is=TRUE, header=FALSE) | |
library(TTR) | |
# Assign a vector to the names() function to name the columns | |
names(tweets) = c("time", "seconds", "screen_name", "text") | |
# Let's search the tweets for "Iran" using grep() | |
iran.tweets = tweets[grep("iran", ignore.case=TRUE, tweets$text), ] | |
# Plot the time series for iran.tweets | |
iran.tweets.hist = hist(iran.tweets$seconds, breaks=100) |
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
# Example aliases |
[user] | |
name = Evan Emolo | |
email = i_am@evanemolo.com | |
[core] | |
excludesfile = ~/.gitignore | |
editor = sublime -n -w | |
[color] | |
branch = auto | |
diff = auto |