Skip to content

Instantly share code, notes, and snippets.

import hou, os, sys
from PySide2 import QtCore
from canvaseventtypes import KeyboardEvent
import utility_hotkey_system
import nodegraphstates as states
this = sys.modules[__name__]
__userdir = hou.getenv('HOUDINI_USER_PREF_DIR')
__pythonlibs = os.path.join(__userdir, "python2.7libs")
//
// Created by Krzysztof Zablocki on 06/01/2017.
// Copyright (c) 2017 Pixle. All rights reserved.
//
import Foundation
extension Array {
func parallelFlatMap<T>(transform: (Element) throws -> [T]) throws -> [T] {
return try parallelMap(transform).flatMap { $0 }
}
function main(gameBuilder) {
var entity = gameBuilder.Entity("Max_rootNode")
// MARK: - Behaviors & Goals
var agent = entity.Agent("Max")
agent.mass = 1
agent.maxAcceleration = 1
agent.maxSpeed = 1
agent.radius = 0.5
function main(gameBuilder) {
// MARK: - Bad Guy
var entityBad = gameBuilder.Entity("baddy_bad")
var agent = entityBad.Agent("Bad")
var chaseBehavior = agent.Behavior()
chaseBehavior.wander(1)
chaseBehavior.seekAgent("player")
entityBad.onLoad = function(self, scene) {
diff --git a/sys/applemedia/iosassetsrc.m b/sys/applemedia/iosassetsrc.m
index e237c2e..5d32bc4 100644
--- a/sys/applemedia/iosassetsrc.m
+++ b/sys/applemedia/iosassetsrc.m
@@ -470,6 +470,7 @@ - (id) init
{
self = [super init];
+ NSLog(@">>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<");
return self;
#!/usr/bin/env coffee
fs = require('fs')
libxml = require('libxmljs')
file = fs.readFileSync(path = process.argv[2], 'utf8')
console.log(path)
xml = libxml.parseXml(file)
for quote in xml.find("//q")
before(function() {
var args = [].slice.call(arguments)
function cb() {
gc()
if (ITERATIONS--)
test.apply(null, args)
else
process.nextTick(endCb)
}
args.push(cb)
==27613== Memcheck, a memory error detector
==27613== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==27613== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==27613== Command: node --expose-gc example/walk-history.js
==27613==
==27613== Warning: noted but unhandled ioctl 0x5451 with no size/direction hints
==27613== This could cause spurious value errors to appear.
==27613== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==27613== Warning: noted but unhandled ioctl 0x5451 with no size/direction hints
==27613== This could cause spurious value errors to appear.
@nkallen
nkallen / gist:6430565
Created September 3, 2013 22:38
Valgrind output from nodegit/wip's example/walk-history.js
var git = require('../'),
path = require('path');
git.Repo.open(path.resolve(__dirname, '../.git'), function(error, repo) {
if (error) throw error;
repo.getMaster(function(error, branch) {
if (error) throw error;
for (var i = 0; i < 20; i++) {
@nkallen
nkallen / Benchmark A
Last active December 22, 2015 02:49
Performance for loading a blob at a particular commit and accessing some of its immutable fields. Benchmark A access its fields and crosses the runtime boundary for each field access. Benchmark B does not access any fields and thus doesn't cross the runtime boundary as often (to be precise, 7 times versus 4 times). As you can see, performance is…
var git = require('../'),
path = require('path');
// This example opens a certain file, `README.md`, at a particular commit,
// and prints the first 10 lines as well as some metadata.
function doIt(cb) {
git.Repo.open(path.resolve(__dirname, '../.git'), function(error, repo) {
if (error) throw error;