Skip to content

Instantly share code, notes, and snippets.

View davidlatwe's full-sized avatar
:shipit:
Awesome

David Lai davidlatwe

:shipit:
Awesome
View GitHub Profile
@davidlatwe
davidlatwe / inheritance_tracking.py
Created January 19, 2018 10:50
Tracking class inheritance
class FirstGen(object):
def tracker(self, trace=None):
if trace is None:
trace = []
for base in self.__class__.__bases__:
if "tracker" in dir(base):
trace += [base.__name__]
base().tracker(trace)
return trace
@davidlatwe
davidlatwe / dict_merge.py
Created March 19, 2018 11:13 — forked from angstwad/dict_merge.py
Recursive dictionary merge in Python
import collections
def dict_merge(dct, merge_dct):
""" Recursive dict merge. Inspired by :meth:``dict.update()``, instead of
updating only top-level keys, dict_merge recurses down into dicts nested
to an arbitrary depth, updating keys. The ``merge_dct`` is merged into
``dct``.
:param dct: dict onto which the merge is executed
:param merge_dct: dct merged into dct
@davidlatwe
davidlatwe / fieldwalker2.py
Created August 6, 2018 05:04
montydb.fieldwalker, NodeTree implementation
# from collections import deque
class _NoVal(object):
def __repr__(self):
return "_NoVal()"
__solts__ = ()
"""Avalanche-io C4 Framework - AssetID
Simplified from:
https://github.com/Avalanche-io/pyc4
"""
import hashlib
@davidlatwe
davidlatwe / cefpython_pyside.py
Created August 14, 2018 10:18 — forked from mmolero/cefpython_pyside.py
CefBrowser using PySide on Windows/Linux/MacOX
from cefpython3 import cefpython
import sys, os
import platform
import ctypes
from PySide.QtGui import *
from PySide.QtCore import *
import time
def make_plugins():
import pyblish.api
class CollectLongRun(pyblish.api.ContextPlugin):
order = pyblish.api.CollectorOrder
def process(self, context):
@davidlatwe
davidlatwe / into_avalon.feature
Last active September 7, 2018 20:09
Avalon Config BDD Test Example - Energizing Avalon via Config
Feature: Energizing Avalon with Reveries
Scenario: Launch <DCC_App> with Reveries pipeline implemented
Given an environment that meets the Avalon's demand
When I initiate Avalon
And I create a project <PROJECT_NAME>
And I set my task: <SILO> - <ASSET> - <TASK>
And I launch <DCC_App>
Then <DCC_App> will be startup with Reveries pipeline
@davidlatwe
davidlatwe / .coveragerc
Created September 9, 2018 07:31 — forked from mattbennett/.coveragerc
coverage subprocess
[run]
branch = True
source = .
@davidlatwe
davidlatwe / README.md
Created November 3, 2018 11:46
Maya Dependency Install Script (CentOS 7.4)

From https://gitlab.com/snippets/1690538

Maya Dependency Install Script (CentOS 7.4)

This script is for installing all of the necessary dependencies for Maya 2018 on CentOS 7.4. This script was put together on a minimal install with just GNOME Desktop and the NVIDIA proprietary driver installed. There may or may not be some dependencies missing from this list. For a full list of packages that Maya uses, run ldd /usr/autodesk/maya2018/bin/maya.bin. Good luck!

@davidlatwe
davidlatwe / maya2016.sh
Created November 3, 2018 18:05 — forked from stenstorp/maya2016.sh
Installing Maya 2016 SP6 on Ubuntu 16.04 with Student License
#!/bin/bash
#Download Maya from here: http://download.autodesk.com/us/support/files/maya_2016_service_pack_6/Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz
#Get a student License from: http://www.autodesk.com/education/free-software/maya
#Log in and select maya 2016, your language and an OS. Either should work.
# !!!!!! IMPORTANT !!!!!!
# BEFORE RUNNING, REPLACE "USER" AND "HOME" AT THE BOTTOM OF THIS SCRIPT WITH YOUR USERNAME AND HOME FOLDER
# !!!!!! IMPORTANT !!!!!!