View example.py
from PySide.QtCore import Slot, QTranslator, QLocale, Signal, QSettings | |
from PySide.QtGui import QApplication, QSystemTrayIcon, QMenu, QIcon, QMainWindow | |
from PySide import QtCore, QtGui | |
class Ui_MainWindow(object): | |
def setupUi(self, MainWindow): | |
MainWindow.setObjectName("MainWindow") | |
MainWindow.resize(800, 600) | |
self.centralwidget = QtGui.QWidget(MainWindow) | |
self.centralwidget.setObjectName("centralwidget") |
View gist:4133268
E.EEEE/home/nvbn/work/totemi/ENV/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-11-23 03:10:14.395323) while time zone support is active. | |
RuntimeWarning) | |
/home/nvbn/work/totemi/ENV/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-11-23 03:10:14.399392) while time zone support is active. | |
RuntimeWarning) | |
E/home/nvbn/work/totemi/ENV/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-11-23 03:10:14.537171) while time zone support is active. | |
RuntimeWarning) | |
/home/nvbn/work/totemi/ENV/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-11-23 03:10:14.539207) while time zone support is active. | |
RuntimeWarning) | |
E/home/nvbn/work/totemi/ENV/local/lib/python2.7/site-pack |
View gist:5074535
➜ /tmp python ppastats.py nvbn-rm ppa quantal i386 | |
everpad 2.5.3-0~quantal 1922 | |
tailme 0.2-1~quantal 3 | |
vkvideo 9-0~quantal 155 | |
➜ /tmp python ppastats.py nvbn-rm ppa quantal amd64 | |
everpad 2.5.3-0~quantal 3826 | |
tailme 0.2-1~quantal 13 | |
vkvideo 9-0~quantal 173 | |
➜ /tmp python ppastats.py nvbn-rm ppa precise amd64 | |
everpad 2.5.3-0~precise 2825 |
View gist:5830627
# -*- coding: utf-8 -*- | |
from random import randint | |
class Claim(object): | |
STATE_START = 0 | |
STATE_ANALYZE = 1 | |
STATE_PROCESSING = 2 | |
STATE_CLARIFY = 3 | |
STATE_CLOSE = 4 |
View gist:7151773
# | |
# The MySQL database server configuration file. | |
# | |
# You can copy this to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. |
View indicator.ino
#define LEDS 32 | |
#define ROWS 8 | |
#define IMG 64 | |
#define COLORS 3 | |
#define BLACK 1 | |
#define RED 2 | |
#define GREEN 3 | |
#define BLUE 5 |
View order_migrations.py
from argparse import ArgumentParser | |
from contextlib import contextmanager | |
from subprocess import Popen, PIPE | |
import sys | |
import os | |
import re | |
def git(*args): | |
resp = Popen(['git'] + list(args), stdout=PIPE, stderr=PIPE) |
View gist:32dbb935b8c533f7bbaa
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332498] ata6.00: exception Emask 0x10 SAct 0x0 SErr 0x90202 action 0xe frozen | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332511] ata6.00: irq_stat 0x00400000, PHY RDY changed | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332521] ata6: SError: { RecovComm Persist PHYRdyChg 10B8B } | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332527] ata6.00: failed command: FLUSH CACHE | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332541] ata6.00: cmd e7/00:00:00:00:00/00:00:00:00:00/a0 tag 1 | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332541] res 40/00:04:e8:8e:df/00:00:0a:00:00/40 Emask 0x10 (ATA bus error) | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332548] ata6.00: status: { DRDY } | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332558] ata6: hard resetting link | |
Jul 30 02:17:52 nvbn-desktop kernel: [ 354.955509] ata6: SATA link up 6.0 Gbps (SStatus 133 SControl 300) | |
Jul 30 02:17:52 nvbn-desktop kernel: [ 354.963561] ata6.00: configured for UDMA/133 |
View main.py
from uasyncio.core import get_event_loop | |
from ssd1306 import get_display | |
from ultrasonic import get_ultrasonic | |
from utils import get_gyro, alts | |
def main(): | |
display = get_display(pinout={'sda': 'Y10', | |
'scl': 'Y9'}, | |
height=64, |
View bf_in_clojure.clj
(ns bf.core) | |
(defn bf> | |
[[stack current]] | |
(let [new-current (inc current)] | |
[(if (>= new-current (count stack)) | |
(conj stack 0) | |
stack) | |
new-current])) |
OlderNewer