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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// `input` will be defined elsewhere, it's a means | |
// for us to capture the state of input from the player | |
var startScreen = (function(input) { | |
// the red component of rgb | |
var hue = 0; | |
// are we moving toward red or black? | |
var direction = 1; | |
var transitioning = false; |
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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/python");</script> |
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 copy import deepcopy | |
def invert(X): | |
""" | |
Invert a matrix X according to gauss-jordan elimination | |
In gauss-jordan elimination, we perform basic row operations to turn a matrix into | |
row-echelon form. If we concatenate an identity matrix to our input | |
matrix during this process, we will turn the identity matrix into our inverse. | |
X - input list of lists where each list is a matrix row | |
output - inverse of X | |
""" |
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 pyfbsdk import * | |
def getSelectedOrder(): | |
# selectionOrder selection order | |
# Get the current selection | |
lModelList = FBModelList() | |
pParent = None | |
pSelected = True | |
pSortSelectedOrder = True | |
FBGetSelectedModels( lModelList, pParent, pSelected, pSortSelectedOrder ) |
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 os | |
import sys | |
import pickle | |
import console | |
import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
STATE_FILE = '.dropbox_state' | |
class dropbox_state: |
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 sys | |
from PySide import QtGui, QtCore | |
class Example(QtGui.QWidget): | |
def __init__(self,): | |
super(Example, self).__init__() | |
self.initUI() |
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 | |
from shiboken import wrapInstance | |
import maya.OpenMayaUI as apiUI | |
import sys | |
def getMayaWindow(): | |
""" | |
Get the main Maya window as a QtGui.QMainWindow instance | |
@return: QtGui.QMainWindow instance of the top level Maya windows | |
""" |
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
''' | |
FBXWrapper | |
This module provides a python wrapper for every method exposed in the FBX plugin. | |
The arguments for the calls are the same as for the equivalent mel calls, however they can be passed with typical | |
python syntax, which is translated to mel-style flags and arguments under the hood. The actual flags and arguments | |
are documented here: | |
usage: |
OlderNewer