Skip to content

Instantly share code, notes, and snippets.

Craig Younkins cyounkins

  • Pittsburgh, PA
Block or report user

Report or block cyounkins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5148174
import time
import zmq
context = zmq.Context()
# Socket to talk to server
print "Connecting to hello world server."
socket = context.socket(zmq.PULL)
socket.bind ("tcp://")
View gist:4550985
echo "" > moo.txt
scp moo.txt user@host:~/.cshrc
rm moo.txt
View gist:4034431
import gevent.monkey
import time
import pymongo
connection = pymongo.Connection(use_greenlets=True)
def task():
collection = connection.autoref.all_cars
View gist:2975165
File "/home/user/autoref/dynamic/autoref/lib/inventory_processors/", line 55, in run
File "/home/user/autoref/virtual_env/lib/python2.6/site-packages/celery/task/", line 64, in __call__
self.options, **options)
File "/home/user/autoref/virtual_env/lib/python2.6/site-packages/celery/app/task/", line 445, in apply_async
return self.apply(args, kwargs, task_id=task_id, **options)
File "/home/user/autoref/virtual_env/lib/python2.6/site-packages/celery/app/task/", line 601, in apply
request=request, propagate=throw)
File "/home/user/autoref/virtual_env/lib/python2.6/site-packages/celery/execute/", line 248, in eager_trace_task
uuid, args, kwargs, request)
View Sample Output cursor.execute(('SELECT cache_key FROM %s WHERE cache_key = %%s and expires > %%s' % self._table), [key, connection.ops.value_to_db_datetime(now)]) cursor.execute(('DELETE FROM %s WHERE expires < %%s' % self._table), [connection.ops.value_to_db_datetime(now)]) cursor.execute(('SELECT COUNT(*) FROM %s' % self._table)) cursor.execute(('SELECT cache_key FROM %s ORDER BY cache_key LIMIT 1 OFFSET %%s' % self._table), [(num / self._cull_frequency)])
You can’t perform that action at this time.