Skip to content

Instantly share code, notes, and snippets.

View serguei-k's full-sized avatar

Serguei Kalentchouk serguei-k

View GitHub Profile
@justinfx
justinfx / maya_script_editor.py
Last active March 8, 2024 18:33
An example of how to use multiprocessing from within Maya, by actually running it as a subprocess and communicating back the results.
"""
This code can be run from a Maya script editor
"""
import subprocess
import cPickle
print 'This value below should be a 1000:'
p = subprocess.Popen(["/path/to/multi_test.py", "-po"], stdout=subprocess.PIPE)
result = cPickle.load(p.stdout)
@dgovil
dgovil / mayaCustomMarkers.py
Last active October 21, 2018 04:29
Allows a user to create custom markers in maya.Based off of this pastebin: http://pastebin.com/Uc8S4QPx (which may further be from createive Crash) and further work by https://github.com/achayan and his pasteBin http://pastebin.com/JGJZ5uu1
from PyQt4 import QtGui, QtCore
import maya.cmds as cmds
import maya.OpenMayaUI as mui
import sip
def convertToQT(controlName):
controlPoniter = mui.MQtUtil.findControl(controlName)
if controlPoniter is not None:
return sip.wrapinstance(long(controlPoniter), QtCore.QObject)
@mottosso
mottosso / README.md
Last active February 6, 2023 13:56
Minimal QML SceneGraph 2
@csaez
csaez / QDictBox.py
Created February 16, 2016 12:58
Dynamic QDialog creating widgets from a python dictionary
from PySide import QtGui
class QDictBox(QtGui.QDialog):
WIDGETS = {str: QtGui.QLineEdit,
unicode: QtGui.QLineEdit,
int: QtGui.QSpinBox,
float: QtGui.QDoubleSpinBox,
list: QtGui.QComboBox,
bool: QtGui.QCheckBox}
@fredrikaverpil
fredrikaverpil / click2dto3d.py
Last active February 27, 2023 21:15
On Maya click: 2d coordinates to 3d world coordinates
import maya.api.OpenMaya as om
import maya.api.OpenMayaUI as omui
import maya.cmds as cmds
# Maya Python API:
# http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_index_html
def onPress():
"""Take x,y from mouse click, convert into 3d world coordinates"""
@dgovil
dgovil / maya_moc.cmake
Last active December 18, 2020 21:53
Configuring Qt for Maya moc
# Do some setup for Maya's Qt
set(QT_VERSION_MAJOR 5)
# Set moc Path
set(QT_MOC_EXECUTABLE ${MAYA_BIN_PATH}/moc)
add_executable(Qt5::moc IMPORTED)
set_target_properties(Qt5::moc PROPERTIES IMPORTED_LOCATION ${QT_MOC_EXECUTABLE})
set(CMAKE_AUTOMOC TRUE)
# Set the UIC Path
@jcowles
jcowles / MachineLearningResources.md
Last active November 9, 2023 09:56
Machine learning resources

"AI is the new Electricity"

Andrew Ng lecture, Stanford Graduate School of Business
High level, but totally worth watching.
https://www.youtube.com/watch?v=21EiKfQYZXc

Stanford cs231n, winter 2016

I went looking for lectures from different sources and these are a great "from first principles" introduction. The newer cs231n lectures may have more relevant details, but I like Andrej Karpathy's