This file contains hidden or 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
| " git clone https://gist.github.com/b1f4795e010049e8087322dd0a7960bf.git | |
| set nocompatible " This must be first... BECAUSE REASONS... | |
| let mapleader = "\<Space>" | |
| let maplocalleader = "\<Space>" | |
| set t_Co=256 | |
| set laststatus=2 " For airline | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| "set rtp+=~\Downloads\vimwin\bundle\Vundle.vim |
This file contains hidden or 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
| #IfWinActive ahk_class AcrobatSDIWindow | |
| h:: | |
| if (inAcrobatSearchMode) | |
| Send h | |
| else Send {Left} | |
| return | |
| j:: | |
| if (inAcrobatSearchMode) |
This file contains hidden or 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
| def flat1(lst): | |
| """ | |
| flatten a list once | |
| """ | |
| bb = [] | |
| for ll in lst: | |
| if isinstance(ll,list): | |
| bb.extend(ll) | |
| else: | |
| bb.append(ll) |
This file contains hidden or 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 maya.api.OpenMaya as OpenMaya | |
| mesh = OpenMaya.MFnMesh() | |
| # Simple unitCube coordinates | |
| vertices = [] | |
| vertices.append(OpenMaya.MPoint( 1, 1, 1)) # 0 | |
| vertices.append(OpenMaya.MPoint( 1, -1, 1)) # 1 | |
| vertices.append(OpenMaya.MPoint( 1, -1, -1)) # 2 |
This file contains hidden or 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/python3.6 | |
| """ | |
| 3-D spline interpolation | |
| (with graph drawing by matplotlib) | |
| """ | |
| import matplotlib.pyplot as plt | |
| import sys | |
| import traceback | |
| class SplineInterpolation: |
This file contains hidden or 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
| # Install pip | |
| # $ curl -kL https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python | |
| # | |
| # Install Cython | |
| # $ pip install cython | |
| # | |
| # compile command | |
| python setup.py build_ext --inplace |
This file contains hidden or 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 sympy import * | |
| # https://people.maths.ox.ac.uk/hitchin/hitchinnotes/Geometry_of_surfaces/Chapter_3_Surfaces_in_R3.pdf | |
| def vec_diff(vector, *args): | |
| return [diff(axis, *args) for axis in vector] | |
| t, u = symbols('t u') | |
| r = symbols('r', positive=True) |
This file contains hidden or 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 maya import OpenMaya as om | |
| import numpy as np | |
| from ctypes import c_float, c_double, c_int, c_uint | |
| _CONVERT_DICT = { | |
| om.MPointArray: (float, 4, c_double, om.MScriptUtil.asDouble4Ptr), | |
| om.MFloatPointArray: (float, 4, c_float , om.MScriptUtil.asFloat4Ptr), | |
| om.MVectorArray: (float, 3, c_double, om.MScriptUtil.asDouble3Ptr), | |
| om.MFloatVectorArray: (float, 3, c_float , om.MScriptUtil.asFloat3Ptr), | |
| om.MDoubleArray: (float, 1, c_double, om.MScriptUtil.asDoublePtr), |
This file contains hidden or 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
| """Illustration of how to retrieve the shape under the mouse cursor | |
| Usage: | |
| Run `start()` to start listening for when the mouse stops and to display a tooltip | |
| Run `stop()` to stop listening | |
| """ | |
| from maya import cmds | |
| from PySide import QtGui, QtCore |
This file contains hidden or 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 maya.cmds as cmds | |
| import pymel.core as pm | |
| import maya.api.OpenMaya as om | |
| import maya.api.OpenMayaUI as omui | |
| class SamsClass(): | |
| def __init__(self): | |
| pass |