I hereby claim:
- I am scott-wilson on github.
- I am propersquid (https://keybase.io/propersquid) on keybase.
- I have a public key whose fingerprint is 9E0E 2DD9 E358 B735 B04C 0E32 EE31 90E1 D4FE 7818
To claim this, I am signing this object:
import numpy as np | |
import matplotlib.pyplot as plt | |
w = 400 | |
h = 300 | |
def normalize(x): | |
x /= np.linalg.norm(x) | |
return x |
class Foo(object): | |
def __init__(self, value): | |
self._value = value | |
class Bar(Foo): | |
def __init__(self, value): | |
value = do_something_to_value(value) | |
# Calls the parent class's version of __init__. |
# blender_version_save.py (c) 2013 Scott Wilson (ProperSquid) | |
# | |
# ***** BEGIN GPL LICENSE BLOCK ***** | |
# | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# |
import random | |
# An ugly way to get which 3d package you're in. | |
try: | |
from maya import cmds | |
_IN_MAYA = True | |
except ImportError: | |
_IN_MAYA = False | |
try: |
extends KinematicBody2D | |
# class member variables go here, for example: | |
# var a = 2 | |
# var b = "textvar" | |
var velocity = Vector2() | |
const WALK_SPEED = 200.0 | |
func _ready(): | |
# Called every time the node is added to the scene. |
I hereby claim:
To claim this, I am signing this object:
Hey, I have a question. I want to build something like the following. I have a trait that defines a bundle. The bundle is a bundle of chunks that can either come from a file, or a cache of chunks (more files). I could store the chunks in a vector in the bundle, but if I have really large files, then the amount of RAM used gets pretty huge, so I want to implement an iterator that can either read from the file and return the chunk, or read from the chunk cache and return the chunk. Right now I'm trying to define something like the following:
trait Bundle {
fn id(&self) -> &ID;
fn size(&self) -> u64;
fn chunks<I: Iterator>(&self) -> Result<I, Error>;
}
pub struct FileBundle<P: AsRef<Path>> {
import random | |
from maya import cmds | |
def get_new_name(prefix, suffixes): | |
names = [] | |
rand_value = random.randrange(10000, 20000) | |
for suffix in suffixes: | |
names.append("{}_{}_{}".format(prefix, rand_value, suffix)) |
#include <Imath/half.h> | |
namespace cppmm_bind | |
{ | |
namespace IMATH_NAMESPACE | |
{ | |
class __attribute__((annotate("cppmm:opaquebytes"))) half { | |
half() __attribute__((annotate("cppmm:rename:create_default"))); | |
half(float f) __attribute__((annotate("cppmm:rename:create_from_float"))); | |
~half() __attribute__((annotate("cppmm:rename:delete"))); |
@group(0) @binding(0) var input_meta_texture: texture_3d<u32>; | |
@group(0) @binding(1) var input_heat_texture: texture_3d<f32>; | |
@group(0) @binding(2) var output_heat_texture: texture_storage_3d<r32float, write>; | |
@compute | |
@workgroup_size(4, 4, 4) | |
fn heat_main( | |
@builtin(global_invocation_id) global_id: vec3<u32> | |
) { | |
let dimensions = textureDimensions(input_meta_texture); |