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/bin/python | |
# -*- coding: utf-8 -*- | |
# dependency: | |
# $ sudo apt-get install p7zip-full | |
# $ sudo apt-get install python-dev python-pip | |
# $ sudo pip instal requests | |
# $ sudo python pi_clone.py | |
import os | |
import subprocess | |
import time |
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 progress import Progress | |
from maya import cmds | |
sels = cmds.ls(sl=True) | |
progress = Progress(len(sels)) | |
try: | |
for sel in sels: | |
progress.count() | |
print(sel) |
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 datetime | |
today = datetime.datetime.today | |
from maya.api import OpenMaya as om2 | |
from maya import cmds | |
start = today() | |
sel_list = om2.MSelectionList() | |
[sel_list.add(m) | |
for m in cmds.ls(dag=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
import numpy as np | |
import random | |
import math | |
import cv2 | |
from PIL import Image | |
def detect_markers(im): | |
markers = [] | |
# 輪郭線抽出のための二値化 | |
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) |
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
node_list = cmds.ls() | |
print(node_list) | |
# Result: 9044 | |
start = datetime.datetime.now() | |
for i in xrange(100): | |
shading_engine = cmds.ls(type='shadingEngine') | |
if not shading_engine: |
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
var _layerList = [], | |
main = function() { | |
var document = activeDocument; | |
var layerList = document.layers; | |
getLayer(layerList); | |
var hasFeather = []; | |
for(var i = 0, num = _layerList.length; i < num; i++){ | |
var layer = _layerList[i]; |
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
#!/bin/bash | |
#Make sure we’re running with root permissions. | |
if [ `whoami` != root ]; then | |
echo Please run this script using sudo | |
echo Just type “sudo !!” | |
exit | |
fi | |
#Check for 64-bit arch | |
if [uname -m != x86_64]; then |
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 itertools import izip | |
from datetime import datetime | |
from maya import cmds | |
def slow_version(uvs): | |
a = ['meshName.uvst[0].uvsp[*]'] | |
a_append = a.append | |
for u, v in izip(uvs[0], uvs[1]): | |
a_append(u) | |
a_append(v) |
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
print('hello') |
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
#include <M5StickC.h> | |
#include <Wire.h> | |
#include "DHT12.h" | |
DHT12 dht12; | |
int PIN = 32; // GROVEの黄色い線にパルスを送る | |
int PWMCH = 0; | |
void setup() { |