Skip to content

Instantly share code, notes, and snippets.

mazz / gist:6a74a085e8557f3b1c69
Created May 27, 2014
pika ampq pyramid error
View gist:6a74a085e8557f3b1c69
#function to get data from queue
def _get_tweets(size=10):
tweets = []
# Get ten messages and break out
count = 0
message_count = _queue_message_count()
print("size: " + str(size) + " message_count: " + str(message_count))
if message_count > 0:
View gist:0737c55e877a51d0582c
cd initpyr
./ -n foo -s
cd foo_env/foo
../bin/pserve development.ini
web browser:
user: admin
pass: admin

Keybase proof

I hereby claim:

  • I am mazz on github.
  • I am mazz ( on keybase.
  • I have a public key whose fingerprint is 81DA A3FA EF1C DDF3 B15A A6B4 A953 707A A850 34D5

To claim this, I am signing this object:

View gist:5274170
# These are installation specific values created when PyQt4 was configured.
_pkg_config = {
'pyqt_bin_dir': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin',
'pyqt_config_args': '',
'pyqt_mod_dir': '/Library/Python/2.7/site-packages/PyQt4',
'pyqt_modules': 'QtCore QtGui QtHelp QtMultimedia QtNetwork QtDBus QtDeclarative QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns phonon QtDesigner',
'pyqt_sip_dir': '/System/Library/Frameworks/Python.framework/Versions/2.7/share/sip/PyQt4',
'pyqt_sip_flags': '-x VendorID -t WS_MACX -x PyQt_NoPrintRangeBug -t Qt_4_8_4 -x Py_v3 -g',
'pyqt_version': 0x040a00,
'pyqt_version_str': '4.10',
View gist:5274321
[michael@varga (Fri Mar 29 19:14:18) /Library/Python/2.7/site-packages]% cd ~/Downloads/PyQt-mac-gpl-4.10
[michael@varga (Fri Mar 29 19:14:22) ~/Downloads/PyQt-mac-gpl-4.10]% make
/Developer/Tools/Qt/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I. -F/Library/Frameworks -D__APPLE__ -D__GNUC__ qpytextobject.h -o moc_qpytextobject.cpp
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -fPIC -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/System/Library/Frameworks/Pyt
mazz /
Created Aug 14, 2016 — forked from esperlu/
MySQL to Sqlite converter
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
mazz /
Created Aug 22, 2016 — forked from jwinder/
Sonic Pi tutorials concatenated

1 Welcome to Sonic Pi

Welcome friend :-)

Welcome to Sonic Pi. Hopefully you're as excited to get started making crazy sounds as I am to show you. It's going to be a really fun ride where you'll learn all about music, synthesis, programming, composition, performance and more.

But wait, how rude of me! Let me introduce myself - I'm

mazz / auto_dubstep.rb
Created Aug 22, 2016 — forked from xavriley/auto_dubstep.rb
Auto generating dubstep with Sonic Pi
View auto_dubstep.rb
# Combines ideas from my other gists
current_bpm = 140.0
use_bpm current_bpm
define :wob do
use_synth :dsaw
lowcut = note(:E1) # ~ 40Hz
highcut = note(:G8) # ~ 3000Hz
View gist:52a5838d37314f2365c878fa7e58e575
~/web/meru_env/meru (harvest_photos ✘)✭ ᐅ git push origin harvest_photos
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 584 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: env: python2: No such file or directory
To maz@localhost:/Library/git/meru.git
! [remote rejected] harvest_photos -> harvest_photos (pre-receive hook declined)
error: failed to push some refs to 'maz@localhost:/Library/git/meru.git'
mazz /
Created Nov 20, 2016
zeromq controller
from __future__ import print_function
import uuid
import time
import json
from six.moves import xrange
import zmq
from actors.worker import Worker
from multiprocessing import Process, Event
from pushpull.models import DBSession
You can’t perform that action at this time.