Suppose I have blocking process blocking_process
:
import os
os.system('rm -fr /tmp/pipe; mkfifo /tmp/pipe')
print len(open('/tmp/pipe').read())
On Linux, I might check what is it blocking on by doing:
$ strace -p $(pgrep -f blocking_process)
Suppose I have blocking process blocking_process
:
import os
os.system('rm -fr /tmp/pipe; mkfifo /tmp/pipe')
print len(open('/tmp/pipe').read())
On Linux, I might check what is it blocking on by doing:
$ strace -p $(pgrep -f blocking_process)
#!sh | |
function newline() { printf "$@\n"; } | |
function color() { | |
output="\e[$1m" | |
shift | |
[ -n "$1" ] && output="$output$@\e[00m" | |
printf "$output" | |
} | |
function reset() { color "00"; } |
def parse_with(parser): | |
def decor(func): | |
def __get__(self, instance, owner=None): | |
return self.__class__(instance, owner) | |
def __call__(self, *args, **kwargs): | |
params = parser.parse_args() | |
if self.instance: | |
return func(self.instance, params, *args, **kwargs) | |
return func(params, *args, **kwargs) | |
def __init__(self, instance=None, owner=None): |
web: ./compileror $PORT |
from os import environ | |
from sqlalchemy import create_engine | |
e = create_engine(environ['DATABASE_URL'], | |
connect_args={"application_name": "foo"}) | |
e.connect() |
11 Sep, email from Parallels: Upgrade Notification: Top reasons to upgrade to the new Parallels Desktop 9 for Mac!
19 Sep, email from Parallels: Urgent Service Notification for Parallels Desktop 7 for Mac Users
19 Sep, tweet from me: "Urgent Service Notification for Parallels Desktop 7 for Mac Users". @ParallelsMac, your marketing is disgustingly aggressive. Stop.
19 Sep, tweet from me: @ParallelsMac If my previous message wasn't clear: I doubt I will ever choose to give you money again, ever, just because of your marketing.
19 Sep, tweet from Parallels: @aknin Message received. We want to make sure all our customers are aware, so there are no surprises if they move to Mavericks.
I hereby claim:
To claim this, I am signing this object:
I posted this internally at Google, someone asked me to post it externally. To be frank, I almost didn't write it because it seemed so obvious. But isn't that the point? What's obvious to you might not be to others. So I'm happy to oblige.
Maybe this is obvious, maybe this is so generic that it's useless, but I feel it has to be written somewhere.
The time you spend on communicating something (writing a doc, an email, a bug, a comment, ...) should be proportional to the "distance" of the person receiving the message.
Distance varies on three axes I can think of:
#!/usr/local/opt/playground/bin/python | |
""" | |
Helper tool to process the UK Land Registry data | |
https://www.gov.uk/government/publications/land-registry-data/public-data | |
""" | |
import numpy | |
import functools | |
import multiprocessing |