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
def get_maya_location(): | |
""" | |
Return maya install location on Windows | |
Source: https://github.com/JukeboxPipeline/jukebox-core/blob/master/src/jukeboxcore/ostool.py | |
:returns: path to maya | |
:rtype: str | |
:raises: errors.SoftwareNotFoundError | |
""" | |
# The supported maya versions |
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 functools import wraps | |
from maya import cmds | |
def undo(func): | |
""" Puts the wrapped `func` into a single Maya Undo action, then | |
undoes it when the function enters the finally: block """ | |
@wraps(func) | |
def _undofunc(*args, **kwargs): | |
try: | |
# start an undo chunk |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.poop.hello</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>say</string> | |
<string>poop</string> |
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 maya.cmds as cmds | |
import maya.OpenMaya as OpenMaya | |
import math | |
# Find if object located within camera frustum | |
# Usage: | |
# from obj_in_frust import in_frustum | |
# in_frustum('camera1', 'pCube1') | |
class Plane(object): |
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 | |
from PySide import QtGui | |
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin | |
class MainWindow(MayaQWidgetDockableMixin, QtGui.QMainWindow): | |
def __init__(self, parent=None): | |
super(MainWindow, self).__init__(parent=parent)\ |
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
// Align object to target vector base on selected normal | |
// Useful when object has some weird orientation baked | |
// in the mesh and you wan to straighten it up. | |
// Point with normal from second wrangler input to align | |
vector from = point(1, 'N', 0); | |
// Allign "from" normal to the following vector | |
vector to = {0,1,0}; |
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
# Default preset | |
$tweaks = @( | |
### Require administrator privileges ### | |
"RequireAdmin", | |
### Privacy Tweaks ### | |
"DisableTelemetry", | |
"DisableWiFiSense", | |
"DisableSmartScreen", | |
"DisableWebSearch", |
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 logging | |
log = logging.getLogger() | |
handler = logging.StreamHandler() | |
handler.setFormatter(logging.Formatter('%(levelname)s: %(message)s')) | |
log.addHandler(handler) | |
log.setLevel(logging.INFO) | |
log.info('Hello World!') |
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
#!/usr/bin/env python3 | |
import cv2 | |
import mediapipe as mp | |
from pathlib import Path | |
import argparse | |
parser = argparse.ArgumentParser( | |
description='Extract human 3D poses from videos using BlazePose model.') |
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
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
NewerOlder