Moved to tdhopper.com.
# stap -g pygil.stp <pid> <minlocktime-in-mus> | |
global init = 0 | |
global gpid = $1 | |
global lock_start = 0 | |
global mintime = $2 | |
# may need to be libpython on some systems | |
probe process("/usr/bin/python-dbg").function("PyThread_acquire_lock") | |
{ | |
if (init == 0) { |
[pytest] | |
python_paths = src/bolts src/spouts | |
testpaths = src/tests |
#!/usr/bin/env python | |
''' | |
Little script to set timestamps based on filenames for files uploaded to | |
Dropbox by CameraSync. | |
:author: Dan Blanchard | |
:date: September, 2013 | |
''' | |
from __future__ import print_function, unicode_literals |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description=""" | |
I never freaking remember argparse syntax and the docs are so all over the place | |
that I need this for an example. |
#!/usr/bin/env python | |
from bs4 import BeautifulSoup | |
from twilio.rest import TwilioRestClient | |
import json | |
import os | |
import re | |
import requests | |
url = 'https://postmates.com/los-angeles' |
vcl 4.0; | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "80"; | |
} | |
sub vcl_recv { | |
unset req.http.callback; |
For ETS's SKLL project, we found out the hard way that Travis-CI's support for numpy and scipy is pretty abysmal. There are pre-installed versions of numpy for some versions of Python, but those are seriously out of date, and scipy is not there are at all. The two most popular approaches for working around this are to (1) build everything from scratch, or (2) use apt-get to install more recent (but still out of date) versions of numpy and scipy. Both of these approaches lead to longer build times, and with the second approach, you still don't have the most recent versions of anything. To circumvent these issues, we've switched to using Miniconda (Anaconda's lightweight cousin) to install everything.
A template for installing a simple Python package that relies on numpy and scipy using Miniconda is provided below. Since it's a common s
If you want to use travis_retry
from within your own shell script files then you first have to make the travis_retry
shell function available by sourcing the travis_retry.sh
file, otherwise you just get a "command not found" error. See example.sh
for a full example.
Note that the original function as found in the travis-ci/travis-build repository was slightly modified to allow it to be used in a shell context where set -e
is enabled.
For reference, a tweet by Travis CI saying that you should copy the travis_retry
code as I've done here:
https://twitter.com/plexus/status/499194992632811520
We have a setup that I assume is quite common: A publicly accessible Nimbus running Storm UI. The worker
nodes can only be accessed from the Nimbus (via the LAN). All the nodes have internal DNS names (i.e.
node.lan.example.com
), which is set in the configuration files; they use these DNS names to reach each
other. The Nimbus has an external DNS name (storm.example.com
) for public access. The Nimbus's UI is
behind an Nginx proxy, which provides HTTP Auth and HTTPS.
Because of this setup, the logviewer links in the UI do not work. In order to fix this, we employ an elaborate hack shown in the conf file below. It uses ngx_http_substitutions_filter_module to rewrite content returned by the Storm UI and some complicated URL rewrite tricks to proxy the workers' logviewers through through the Nimbus.