Skip to content

Instantly share code, notes, and snippets.

View sivy's full-sized avatar

Steve Ivy sivy

View GitHub Profile
from maya import cmds # wrong
class TabController(object):
def __init__(self, parent):
self.main_ui = parent
def build_ui(self):
# construct UI
raise NotImplementedError()
class Thing(object):
__run = True
run = True
def check_run(self):
print "run: %s" % self.run
print "__run: %s" % self.__run
thing = Thing()
from pymel.core.general import itemFilter
types = maya.gimmeAllObjectTypes()
defaultNamedObjects = []
for t in types:
objs = listFilter(byName=t.name+'*')
if objs:
defaultNamedObjects += objs
CREATE TABLE user_accounts (
id VARCHAR(25) NOT NULL,
-- ... snip
PRIMARY KEY (id),
)
CREATE TABLE user_blogsettings (
id INTEGER NOT NULL AUTO_INCREMENT,
user_id VARCHAR(128),
-- ... snip
@sivy
sivy / test_sqlalchemy_relationship.py
Created August 9, 2013 16:07
Test case for error described in http://www.monkinetic.com/2013/08/07/sqlalchemy-property-exists-on-mapper. IN this case, the error does not occur.
import sys
import os
sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('markbox'))
print sys.path
# from markbox.models import UserBlogSettings
from sqlalchemy import create_engine
# __init__.py
from apps.home.views import home
app.register_blueprint(home)
@sivy
sivy / using_link.html
Created May 29, 2013 18:38
A snippet showing how to use the `link:` meta tag in Markbox templates
Proposed payload object
- payload
- total_score: int
- relevant_questions: array
- style
- reading_level: int (not currently returned)
- sentiment: int (not currently returned)
- formality: int (not currently returned)
- editorial_level: int (not currently returned)
- phrase
Proposed payload object
- payload
- total_score: int
- relevant_questions: array
- style
- reading_level: int (not currently returned)
- sentiment: int (not currently returned)
- formality: int (not currently returned)
- editorial_level: int (not currently returned)
- phrase
@sivy
sivy / gist:4533309
Created January 14, 2013 20:51
it's topics/mobile all the way down.
Last login: Mon Jan 14 13:45:11 on ttys002
argent:main sivy$ curl -I http://www.engadget.com/
HTTP/1.1 301 Moved Permanently
Date: Mon, 14 Jan 2013 20:50:22 GMT
Server: Apache/2.2
Location: http://www.engadget.com/topics/mobile/
Content-Type: text/html; charset=iso-8859-1
argent:main sivy$ curl -I http://www.engadget.com/topics/mobile/
HTTP/1.1 301 Moved Permanently