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
# Copy the following GraphQL query into the TezTok API Explorer at | |
# https://graphiql.teztok.com/ | |
# Fill out the wallet, date1 and date2 parameters with the Tezos address | |
# and date range you're interested in. The output combines events() and | |
# events_aggregate() query to give you a quick overview over sales and buys | |
# over the time period. | |
# | |
# Example: |
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
// assembled from some stackoverflow answers | |
const start = performance.now(); | |
// Draw the fullscreen quad | |
twgl.drawBufferInfo(gl, quad_bufferInfo); | |
let sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0); | |
checkSync = () => { |
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
struct Light { | |
float intensity; | |
vec3 colour; | |
vec3 pa; | |
vec3 pb; | |
float w; | |
vec3 L; | |
vec3 nL; | |
}; |
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
#pragma opname fisheyelens | |
#pragma oplabel "Fisheye Lens" | |
#pragma hint x hidden | |
#pragma hint y hidden | |
#pragma hint Time hidden | |
#pragma hint dofx hidden | |
#pragma hint dofy hidden | |
#pragma hint aspect hidden | |
#pragma hint P hidden |
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
float theta = -$PI * x; | |
float phi = $PI * 0.5 * y; | |
float sin_theta = sin(theta); | |
float cos_theta = cos(theta); | |
float sin_phi = sin(phi); | |
float cos_phi = cos(phi); | |
i.z = sin_theta * cos_phi; | |
i.y = sin_phi; |
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
int i, steps = 80; | |
float sumhist[], sum=0, slice = 1.0/float(steps); | |
seed += 123456789; | |
for (i=0;i<steps;i++) { | |
float pos = (i*slice); | |
float val = chramp("__rndweight", pos); | |
sum += val; | |
push(sumhist, sum); | |
} |
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
selpath = hou.hscriptExpression('mousepath()').split('.')[-1] | |
voppath = '/'.join( selpath.split('/')[:-1] ) | |
node = hou.node(voppath) | |
retval, aname = hou.ui.readInput("Attribute Name", buttons=('OK',)) | |
if retval != -1: | |
add = node.createNode('addattrib') | |
add.setName("add_%s"%aname) | |
add.parm('attrib').set(aname) |
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
if hou.updateModeSetting() == hou.updateMode.Manual: | |
hou.setUpdateMode(hou.updateMode.AutoUpdate) | |
elif hou.updateModeSetting() == hou.updateMode.AutoUpdate: | |
hou.setUpdateMode(hou.updateMode.Manual) |
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
// http://soup-dev.websitetoolbox.com/post/curl-noise-for-maya-5937312 | |
pickWalk -d down; | |
string $part[] = `ls -sl`; | |
addAttr -ln "noiseFrequency" -at double3 $part[0]; | |
addAttr -ln "noiseFrequencyX" -at double -p noiseFrequency $part[0]; | |
addAttr -ln "noiseFrequencyY" -at double -p noiseFrequency $part[0]; | |
addAttr -ln "noiseFrequencyZ" -at double -p noiseFrequency $part[0]; | |
setAttr -type double3 ($part[0] + ".noiseFrequency") 0.4 0.4 0.4; | |
setAttr -e-keyable true ($part[0] + ".noiseFrequency"); |
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
%feature("autodoc"); | |
%feature("docstring","Gets a single flattened tuple, containing attribute data for all particles"); | |
PyObject* getTuple(const ParticleAttribute& attr) | |
{ | |
unsigned int numparticles = $self->numParticles(); | |
PyObject* tuple=PyTuple_New(numparticles * attr.count); | |
if(attr.type==Partio::INT){ | |
for(unsigned int i=0;i<numparticles;i++) { |
NewerOlder