I hereby claim:
- I am doctaphred on github.
- I am doctaphred (https://keybase.io/doctaphred) on keybase.
- I have a public key whose fingerprint is A2A1 4E61 BBA9 06CB EE09 A712 84BE D09B 5EF5 A533
To claim this, I am signing this object:
q="\nprint('q='+repr(q)+q)" | |
print('q='+repr(q)+q) |
""" | |
$ python -i simple_profiler.py | |
>>> mark() | |
2015-09-23 20:49:30.993140: Starting profiler [default] | |
>>> mark('before crazy stuff') | |
2015-09-23 20:49:34.855766: Profiler [default], mark #1 (before crazy stuff): took 3.862e+00s | |
>>> mark('after crazy stuff') | |
2015-09-23 20:49:40.047713: Profiler [default], mark #2 (after crazy stuff): took 5.192e+00s | |
>>> mark() | |
2015-09-23 20:49:46.805728: Profiler [default], mark #3: took 6.758e+00s |
I hereby claim:
To claim this, I am signing this object:
So yesterday we had a fun time as soon as we pushed some code that uses pyopenssl: our deploy build started crashing from an IOError in a call to open(filename, 'w')
—in ply.lex
, of all places.
Why on earth are we using ply?
Turns out pyopenssl depends on cryptography, which depends on cffi, which depends on pycparser, which depends on ply.
Why on earth is ply writing out to disk?
Turns out ply attempts to write out intermediate results as an optimization to avoid redundant work.
Why don't we see these files on our dev machines?
ply also cleans up its intermediate result files immediately after it runs; fswatch . | grep lextab.py
confirms that the writes are happening locally.
( | |
script=$(curl -fsSL <INSERT URL HERE>); | |
checksum=$(echo "$script" | shasum -pa256 | cut -c-64); | |
test $checksum = <INSERT CHECKSUM HERE> || exit 1; | |
sh -c "$script"; | |
) |
magic = lambda x: x() | |
class word: | |
def __init__(self, current, prev=None): | |
self.current = current | |
self.prev = prev | |
def __getattr__(self, name): | |
return self.__class__(name, self) |
from datetime import datetime | |
import os | |
import sys | |
import time | |
import zmq | |
port = int(sys.argv[1]) | |
n = int(sys.argv[2]) |
#!/bin/sh -euvx | |
# -e If non interactive then exit immediately if a command fails. | |
# -u Treat unset variables as an error when substituting. | |
# -v Print shell input lines as they are read. | |
# -x Print commands and their arguments as they are executed. |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
Information from https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file : | |
Use any character in the current code page for a name, including Unicode | |
characters and characters in the extended character set (128–255), except | |
for the following: | |
- The following reserved characters: | |
< (less than) | |
> (greater than) |