This gist turned into a full python packge!
Visit the repo!
| ''' | |
| pslive | |
| ====== | |
| Live CSS Reloading for PySide. | |
| This is pretty useful. You might want to use it too! | |
| ''' | |
| from PySide import QtCore | |
| from collections import defaultdict |
| import time | |
| import sys | |
| from contextlib import contextmanager | |
| @contextmanager | |
| def stopwatch(label, width=20): | |
| ''' | |
| A context manager that prints out the execution time of the nested code. | |
| ''' |
| ''' | |
| toolshed | |
| ======== | |
| Rigging tools for Autodesk Maya. | |
| ''' | |
| from maya import cmds, OpenMaya | |
| import maya.api.OpenMaya as mapi | |
| import traceback |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| ''' | |
| template formatters | |
| =================== | |
| ``string.Formatter``s for converting standard pythong string templates to regex | |
| and glob patterns. ``RegexFormatter`` formats to a regex pattern with named | |
| groups perfect for use with ``re.search``. ``GlobFormatter`` formats to a glob | |
| pattern that can be used with ``glob.glob``, ``fnmatch.fnmatch`` and | |
| ``fnmatch.filter``. ``format_regex`` and ``format_glob`` are instances of |
| # -*- coding: utf-8 -*- | |
| #! /usr/bin/env python | |
| ''' | |
| Python Manager | |
| ============== | |
| GUI tool for managing modules and packages based on reimport: Full featured reload for Python. | |
| ''' | |
| import os |
This gist turned into a full python packge!
Visit the repo!
This gist was improved and incorporated in a set of shell scripts called cgutils.
Visit the repo!
| @echo off | |
| SET GIT_REPOS=\path\to\git_repos | |
| SET REMOTE_ROOT=\\remote\deploy\location | |
| SET LOCAL_ROOT=%USERPROFILE%\Documents\maya\2015-x64\scripts | |
| if "%1"=="-h" ( GOTO :help_msg ) | |
| if "%1"=="--help" ( GOTO :help_msg ) | |
| if "%1"=="-l" ( GOTO :list_packs ) | |
| if "%1"=="--list" ( GOTO :list_packs ) |
While this started as a quick gist, I ended up developing it far enough to give it it's own repository and documentation.
Visit Shout's Repo!
| import functools | |
| import maya.cmds as cmds | |
| import maya.mel as mel | |
| connect_dynamic = functools.partial(cmds.connectDynamic, delete=False) | |
| disconnect_dynamic = functools.partial(cmds.connectDynamic, delete=True) | |
| def chunk(fn): |