This file contains hidden or 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
Installing collected packages: lxml | |
Running setup.py install for lxml | |
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' | |
warnings.warn(msg) | |
Building lxml version 3.3.3. | |
Building without Cython. | |
Using build configuration of libxslt 1.1.28 | |
Building against libxml2/libxslt in the following directory: //anaconda/lib | |
... | |
clang: error: linker command failed with exit code 1 (use -v to see invocation) |
This file contains hidden or 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
#include <sys/time.h> | |
/* will return current time in second format */ | |
double get_seconds() { | |
struct timeval tim; | |
gettimeofday(&tim, NULL); | |
double t1=tim.tv_sec+(tim.tv_usec/1000000.0); | |
return t1; | |
} |
This file contains hidden or 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 modules for CGI handling | |
import cgi, cgitb | |
# Create instance of FieldStorage | |
form = cgi.FieldStorage() | |
print "Content-type:text/html\r\n\r\n" | |
print "# of data fields: %s" % len(form) |
This file contains hidden or 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
openssl x509 -outform der -in res/raw/cert.pem -out res/raw/cert.der |
This file contains hidden or 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
a = [1,2,3] | |
i = iter(a) | |
i.next() |
This file contains hidden or 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
select users.username, users.location from users where users.user_id in( | |
select tweet_mentions.target_user_id from tweet_mentions where tweet_mentions.target_user_id in ( | |
select users.user_id from users,tweets where tweets.user_id=users.user_id and tweet_text like '%Cancer%' and users.location in ('NY') | |
) | |
union select users.user_id from users,tweets where tweets.user_id=users.user_id and tweet_text like '%cancer%' and users.location in ('NY') and users.followers_count > 1000); |
This file contains hidden or 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
def approach1(size): | |
diagonal = 0 | |
current = 1 | |
for i in range(1, size+1): | |
current += i | |
diagonal += current | |
# decrease the sum if it is the first odd turn | |
if i%2 != 0: | |
diagonal -= 1 | |
current += i |
This file contains hidden or 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 | |
############ constants | |
apps = ["/Applications/Adobe Reader.app/Contents/MacOS/AdobReader", | |
"/Applications/Preview.app/Contents/MacOS/Preview" | |
] | |
file_list = ["sample1.pdf"] | |
fuzz_output = "fuzzed.pdf" |
This file contains hidden or 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
def fibo_gen(): | |
a = 1 | |
b = 1 | |
while 1: | |
yield a | |
a, b = b, a+b | |
a = fibo_gen() | |
f = a.next() | |
count = 1 |
This file contains hidden or 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
def check_sudoku(grid): | |
###Your code here. | |
if isIllFormed(grid): | |
return None | |
elif isInvalid(grid): | |
return False | |
else: | |
return True | |
# return True if the grid is ill_formed |
NewerOlder