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
# This code is horrible but you wanted the computation to be done in a single | |
# generator expression. Cheers! | |
import json | |
import sys | |
def resize(grid): | |
for line in grid: | |
line.extend(['.'] * 3) | |
header = [['.'] * 10] * 3 |
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
[ | |
[".", ".", ".", ".", ".", ".", "."], | |
[".", ".", ".", ".", ".", ".", "."], | |
[".", ".", "O", ".", ".", ".", "."], | |
[".", ".", "X", "O", "X", "X", "."], | |
[".", ".", "X", "X", "O", "O", "X"], | |
[".", ".", "O", "X", "X", "O", "X"] | |
] |
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
[ | |
["X", "O", ".", ".", ".", ".", ".", "O", "X"], | |
["X", "O", ".", ".", ".", ".", ".", "O", "X"], | |
["O", ".", ".", ".", ".", ".", ".", "O", "X"], | |
[".", ".", ".", ".", "X", "X", ".", "X", "O"], | |
[".", ".", ".", "X", "O", "O", "X", ".", "."], | |
[".", ".", ".", ".", "X", "O", "X", ".", "."], | |
[".", "O", "X", ".", ".", ".", ".", ".", "."], | |
["O", "X", "O", ".", ".", ".", ".", ".", "."], | |
[".", "O", "X", "X", ".", ".", ".", ".", "."] |
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
66.249.71.47 - - [04/Sep/2011:04:53:52 +0000] "POST /act/site/clienterror HTTP/1.1" 200 36 "http://www.thumbtack.com/ma/malden/dog-walking/dog-walking-and-pet-care-services" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" | |
66.249.72.198 - - [25/Sep/2011:04:27:50 +0000] "POST /act/site/clienterror HTTP/1.1" 200 36 "http://www.thumbtack.com/ca/solana-beach/wedding-photographers/photography-cary-pennington-photography" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" | |
66.249.72.207 - - [04/Oct/2011:09:53:08 +0000] "POST /act/site/clienterror HTTP/1.1" 200 36 "http://www.thumbtack.com/tx/san-antonio/painting/residential-commercial-construction-services" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" |
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
$ dig -x 66.249.71.47 +short | |
crawl-66-249-71-47.googlebot.com. | |
$ dig crawl-66-249-71-47.googlebot.com. +short | |
66.249.71.47 |
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
eric ~/.vim $ pwd | |
/Users/eric/.vim | |
eric ~/.vim $ ls bundle | |
syntastic vim-fugitive | |
eric ~/.vim $ mvim --version | |
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 15 2010 22:03:01) | |
MacOS X (unix) version | |
Compiled by Bjorn Winckler <bjorn.winckler@gmail.com> |
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
_id: 4db78bfe40d675666e120000 | |
type: 'request/view' | |
time: 2011-04-27T03:22:38Z | |
http: # Information about the HTTP request: | |
method: 'GET' | |
ip: '50.23.214.120' | |
url: '/request/N6coXG' # The actual URL that was requested | |
endpoint: '/request' # The request handler that got the request | |
referrer: null |
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
<?php | |
track_http_event('request/view', array( | |
'request' => array( | |
'id' => $request->id, | |
'owning_user_id' => $request->owner()->id | |
) | |
)); |
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
_id: 4db8bc0940d6754d71220000 # A database-assigned unique ID | |
type: 'email/send' # The type of event that occurred | |
time: 2011-04-27T02:43:15Z # When the event happened | |
email: # Information about the email: | |
id: 'r1nyJw' # A unique identifier for the message | |
message: 'new request' # The type of email that was sent | |
receiving_user: | |
id: 'fLHPtl' # The ID of the user who got the message | |
email: 'eric@thumbtack.com' # The email address the message was sent to |
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 datetime import datetime | |
>>> int32_max = (2 ** 31) - 1 | |
>>> # year 2038 problem: | |
... datetime.utcfromtimestamp(int32_max) | |
datetime.datetime(2038, 1, 19, 3, 14, 7) | |
>>> # but minute resolution gets us much further: | |
... datetime.utcfromtimestamp(int32_max * 60) | |
datetime.datetime(6053, 1, 23, 2, 7) |