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/python | |
import re, urllib, urllib2 | |
class Spreadsheet(object): | |
def __init__(self, key): | |
super(Spreadsheet, self).__init__() | |
self.key = key | |
class Client(object): |
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
from collections import defaultdict | |
tasks = defaultdict(list) | |
for line in open('day7.txt'): | |
components = line.split(' ') | |
dep, task = components[1], components[7] | |
tasks[task].append(dep) | |
if dep not in tasks: tasks[dep] = [] | |
result = '' |
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
# Remove 64-bit build architecture from Pods targets | |
post_install do |installer| | |
installer.project.targets.each do |target| | |
target.build_configurations.each do |configuration| | |
target.build_settings(configuration.name).delete 'ARCHS' | |
end | |
end | |
end |
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
------------------------------------------------------------ | |
/Users/cameron/Documents/Development/oyster-api/venv/bin/pip run on Fri Nov 8 13:57:35 2013 | |
Downloading/unpacking git+git://github.com/oysterbooks/oyster-django-tastypie.git@f7ffbf38c5d68edc10845b3be8f798e54d1ec62b (from -r requirements/base.txt (line 74)) | |
Cloning git://github.com/oysterbooks/oyster-django-tastypie.git (to f7ffbf38c5d68edc10845b3be8f798e54d1ec62b) to /var/folders/xc/kd8mgzfd5d9c4215hfm69pph0000gn/T/pip-I_X9Jx-build | |
Found command 'git' at '/usr/local/bin/git' | |
Running command /usr/local/bin/git clone -q git://github.com/oysterbooks/oyster-django-tastypie.git /var/folders/xc/kd8mgzfd5d9c4215hfm69pph0000gn/T/pip-I_X9Jx-build | |
Running command /usr/local/bin/git show-ref | |
f7ffbf38c5d68edc10845b3be8f798e54d1ec62b refs/heads/master |
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/python | |
""" | |
Plot the frequency of the given words in the commit messages of a git repository. | |
Usage: python word_frequency.py git_dir word1 [word2...] | |
Example: python word_frequency.py /path/to/repo/.git fix add remove | |
""" | |
import sys | |
import datetime |
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/python | |
from Foundation import * | |
def MIMETypeForFileAtPath(path): | |
url = NSURL.fileURLWithPath_(path) | |
request = NSURLRequest.requestWithURL_(url) | |
data, response, error = NSURLConnection.sendSynchronousRequest_returningResponse_error_(request, None, None) | |
return response.MIMEType() |
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
#!/bin/sh | |
# Usage: | |
# xcopen [projfile|dirname] | |
# | |
# The argument is optional. If an argument is specified and its extension | |
# is 'xcodeproj', it is treated as a project file. Otherwise, it is treated | |
# as the directory name. If no argument is specified, the directory name is | |
# set to '.' (the current working directory). If a project file is specified, | |
# it is opened. Otherwise, the first project file in the specified directory |
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
# | |
# uncrustify config file for objective-c and objective-c++ | |
# | |
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs | |
output_tab_size = 4 # new tab size | |
indent_columns = output_tab_size | |
indent_label = 2 # pos: absolute col, neg: relative column | |
indent_align_assign = FALSE |
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
# | |
# uncrustify config file for objective-c and objective-c++ | |
# | |
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs | |
output_tab_size = 4 # new tab size | |
indent_columns = output_tab_size | |
indent_label = 2 # pos: absolute col, neg: relative column | |
indent_align_assign = FALSE |
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
foo |
NewerOlder