Install the line_profiler
module:
[driti@ubuntu ]$ pip install line_profiler
Add the @profile
decorator and run:
[driti@ubuntu ]$ kernprof.py -l -v example.py
""" | |
The activation key for the ``UserProfile`` will be a | |
SHA1 hash, generated from a combination of the ``User``'s | |
email and a random salt. | |
""" | |
salt = hashlib.sha1(str(random.random())).hexdigest()[:5] | |
email = user.email | |
if isinstance(email, unicode): |
# Build Passes | |
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Passing&color=green" https://api.hipchat.com/v1/rooms/message?auth_token=AUTH_TOKEN_HERE&format=json | |
# Build Fails | |
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Failing&color=red¬ify=1" https://api.hipchat.com/v1/rooms/message?auth_token=AUTH_TOKEN_HERE&format=json |
Install the line_profiler
module:
[driti@ubuntu ]$ pip install line_profiler
Add the @profile
decorator and run:
[driti@ubuntu ]$ kernprof.py -l -v example.py
#!/bin/bash | |
# Set the ROOM_ID & AUTH_TOKEN variables below. | |
# Further instructions at https://www.hipchat.com/docs/apiv2/auth | |
ROOM_ID=XXX | |
AUTH_TOKEN=XXX | |
MESSAGE="Hello world!" | |
curl -H "Content-Type: application/json" \ |
$('.outdated-diff-comment-container').addClass('open'); |
I hereby claim:
To claim this, I am signing this object:
# http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them/748908#748908 | |
import sys | |
import os | |
import mmh3 | |
CHUNK_SIZE = 1024*1024 | |
def check_for_duplicates(paths): |
run on ubuntu 12.04
/etc/pcp/pmwebd/pmwebd.options
sudo service pmwebd restart
proc
pmda as root (add -A
flag): /etc/pcp/pmcd/pmcd.conf
sudo service pcp restart
hotproc.conf
in /var/lib/pcp/pmdas/proc
git log -S"validate=True" -- boto/s3/connection.py |