Skip to content

Instantly share code, notes, and snippets.

View bazarus's full-sized avatar

Elizar bazarus

  • Moscow
View GitHub Profile
@stchris
stchris / getimg.py
Created February 19, 2011 13:34
Improved version of getimg.sh - gets the 'image of the day' from NASA, writes the summary onto the image and sets it as the Gnome wallpaper.
#!/usr/bin/env python
"""
getimg.py
Gets the current image of the day from NASA and sets it as the
background in Gnome. The summary / description text is written
to the image.
Requires:
PIL (apt-get install python-imaging or pip install PIL)
@julik
julik / reducer.py
Created September 16, 2011 16:22
Iteratively reduce keyframes on linear segments in Nuke
import math
DELTA = 0.0001
def is_linear_segment(before, current, after, delta):
dx = after.x - before.x
dy = after.y - before.y
t = (current.x - before.x) / dx
linear_y = before.y + (dy * t)
return math.fabs(linear_y - current.y) < delta
@billroy
billroy / jsonio.py
Created September 21, 2012 13:38
Read/write JSON object from file in python
import simplejson
import json
def put(data, filename):
try:
jsondata = simplejson.dumps(data, indent=4, skipkeys=True, sort_keys=True)
fd = open(filename, 'w')
fd.write(jsondata)
fd.close()
except:
@jedypod
jedypod / Link Tools
Last active November 24, 2021 11:49
@fredrikaverpil
fredrikaverpil / get_set_values.py
Last active May 20, 2024 20:31
Get and set knob values #nuke
# Get all nodes of type Read
readnodes = nuke.allNodes('Read')
for readnode in readnodes:
print readnode
# List all knobs for selected node
print( nuke.toNode('Read1') )
# List all knobs for specific node
print( nuke.selectedNode() )
@taikomatsu
taikomatsu / evaluate_tcl_expression.py
Last active August 6, 2019 09:30
Evaluate Tcl Expression
# ReadのfileでTcl書式のExpressionが使われていた場合に
# パスを展開して取り出す方法
import nuke
reads = [o for o in nuke.selectedNodes() if o.Class() == 'Read']
for o in reads:
filepath = o.knob('file').getValue()
print nuke.tcl('subst', filepath)
"""
You can download the flickr API by running
pip install flickrapi
Info here:
http://stuvel.eu/media/flickrapi-docs/documentation/2-calling.html
You'll need to create a Flickr API app here:

#Quixel Megascans Bridge API ####Updated: Aug 18th, 2016

We have developed an API to fetch information from the Bridge. The following is an initial list of endpoints any software will be able to retrieve information from.

*Megascans repository path *Zip folder paths *Get all assets (folder and json path) *Get selected assets (folder and json path) *Search results (folder and json path) against a string

#Quixel Megascans Bridge API ####Updated: Aug 19th, 2016

We have developed an API to fetch information from the Bridge. The following is an initial list of endpoints any software will be able to retrieve information from.

  • Megascans repository path
  • Zip folder paths
  • Get all assets (folder and json path)
  • Get selected assets (folder and json path)
  • Search results (folder and json path) against a string