This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask.ext.restful import Resource | |
from flask import Response | |
from ctypes import CDLL | |
gotest = CDLL("gotest.so") | |
class api2(Resource): | |
def get(self): | |
return gotest.GetValWithConcurrency() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Original example reformatted from: | |
http://blog.3dkris.com/2011/08/python-in-maya-how-to-make-commands.html | |
python_inside_maya discussion: | |
https://groups.google.com/d/topic/python_inside_maya/xfuCYBO6aLg/discussion | |
""" | |
import maya.cmds as cmds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin python | |
import time | |
import subprocess | |
def main(): | |
p = subprocess.Popen(["python", "child.py"], bufsize=0, stdin=subprocess.PIPE) | |
for i in xrange(10): | |
p.stdin.write("Parent command: %d\n" % i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide import QtCore, QtGui, QtWebKit | |
from threading import current_thread | |
class MainWindow(QtGui.QMainWindow): | |
def __init__(self): | |
super(MainWindow, self).__init__() | |
container = QtGui.QWidget(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/justinfx/gofileseq" | |
"testing" | |
) | |
func BenchmarkGoSeq10(b *testing.B) { | |
var res fileseq.FileSequences | |
var err error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Re: https://groups.google.com/d/topic/python_inside_maya/ISwX-LOAcnc/discussion | |
""" | |
class ObjProcessor(object): | |
def __init__(self, filename): | |
self.filename = filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
A small script to convert a .cix (codeintel schema) file into | |
a python stub module, for use in auto-completion. | |
https://community.activestate.com/faq/codeintel-cix-schema | |
Requires jinja2 for the output template format | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from PySide import QtCore, QtGui, QtWebKit | |
class TransWindow(QtGui.QDialog): | |
""" | |
Example of a partially transparent browser window | |
Base on screenshot: http://goo.gl/UiULPU | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/justinfx/imagick/imagick" | |
"runtime" | |
) | |
const ( | |
WIDTH = 320 | |
HEIGHT = 240 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
import datetime | |
from collections import defaultdict | |
from PySide import QtCore, QtGui | |
class WidgetLeakWatcher(QtCore.QObject): | |
""" | |
Monitor the growth or existance of widgets in | |
the application, at intervals. |