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 asyncore | |
import socket | |
import threading | |
class ChatServer(asyncore.dispatcher): | |
def __init__(self, host, port): | |
asyncore.dispatcher.__init__(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
""" | |
Workaround for https://github.com/DamnWidget/anaconda_go/issues/9 | |
""" | |
import re | |
import sublime, sublime_plugin | |
class GoImportsOnSave(sublime_plugin.EventListener): | |
""" | |
Run goimports against Go language syntax documents, on save. | |
For use in combination with the GoImports SublimeText plugin package. |
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
""" | |
A decorator to wrap Qt slots, in Maya, so that exceptions are reported to Script Editor | |
Ref: https://groups.google.com/d/topic/python_inside_maya/xv7DCiocDZA/discussion | |
[email protected] | |
""" | |
#... | |
import sys |
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
""" | |
Example of using a proxy model to apply custom | |
filtering to a QFileSystemModel | |
RE: https://groups.google.com/d/topic/python_inside_maya/a2QM_KvgfeI/discussion | |
Justin Israel | |
[email protected] | |
""" | |
from PySide import QtCore, QtGui |
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
""" | |
https://groups.google.com/d/topic/python_inside_maya/eZOCjK2jewY/discussion | |
How to create a QListWidget, and toggle the background color of items | |
when they are double clicked | |
""" | |
from PySide import QtCore, QtGui | |
class List(QtGui.QDialog): |
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
""" | |
Re: https://groups.google.com/d/topic/python_inside_maya/ndjexeQrZs8/discussion | |
Example of an approach to generating a unique name for a Maya object. | |
Author: Justin Israel ([email protected]) | |
""" | |
def uniqueNamePattern(base="object", padding=1): | |
""" |
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
/* | |
Example of taking an OpenColorIO ColorData and converting | |
it into a stdlib Image. Then encoding to jpeg format. | |
Ref: https://github.com/justinfx/opencolorigo/issues/1 | |
Author: Justin Israel ([email protected]) | |
*/ | |
package main |
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 ( | |
"bytes" | |
"fmt" | |
"image" | |
"image/gif" | |
"net/http" | |
"github.com/gin-gonic/gin" |
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
// Testing reported mem leak at: https://github.com/gographics/imagick/issues/72 | |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"runtime" |
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
""" | |
Simplified version of original forum post: | |
http://tech-artists.org/forum/showthread.php?4547-Passing-uchar-pointer-with-PySide-in-Maya | |
""" | |
import ctypes | |
import maya.OpenMaya as om | |
from PySide import QtCore, QtGui | |
# Build a test MImage |