Skip to content

Instantly share code, notes, and snippets.

View malleor's full-sized avatar

Janusz Lenar malleor

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@malleor
malleor / .block
Last active February 20, 2017 13:45 — forked from kerryrodden/.block
Przejścia w BBX
license: apache-2.0
@malleor
malleor / .block
Created February 17, 2017 12:50 — forked from mbostock/.block
Radial Tidy Tree
license: gpl-3.0
border: no
height: 1060
@malleor
malleor / _framerate_to_float.md
Last active December 15, 2015 07:19
Regex to convert a FlyCapture2 framerate enum to floats using the available documentation in a comment.

Replace:

.@{:i}, \/\*\*\< {:n}.*$

With:

\t\2, // \1

@malleor
malleor / _videomode_to_resolution_regex.md
Last active December 15, 2015 07:09
Convert FlyCapture2::VideoMode definition code into { width, height } pair - regex under VS10.

Replace:

.@{:i}, \/\*\*\< {:d+}x{:d+}.*$

With:

\t{ \2, \3 }, // \1

struct UserDerivedType :
public IUserType
{
// ...
};
void CreateCustomGraph(IProject& proj)
{
// create a uniform graph; no customization at this point
IUserGraphNode* first_node = proj.CreateUserGraph();
//
// in ExecuteManager::Execute:
//
IAlgorithm& v_alg = ...
ParamsIn v_in = ...
Context v_ctx = ...
// static data init
v_alg.Startup(v_ctx, v_in);
@malleor
malleor / A.py
Last active December 11, 2015 03:28
dla Kuby
from frames import script
@script
def A(a=3, b=5):
''' A returns bollox. '''
print 'Hello, framework.'
try:
args = {'a': 5}
@malleor
malleor / load_clouds.py
Last active December 11, 2015 03:19
Script execution concept Opt. 2: Denoted functions
from glob import glob
from os import cwd
from os.path import join, split, splitext
from frames import execute, script
@script(author='John Doe', version='0.6', multithreaded=False) # Declare the algorithm's info.
def load_clouds(cloud_extension='copsxml'): # Name and input params are given a a function with kwargs.
''' Loads all clouds of given format from the CWD. ''' # Documentation in a docstring.
cloud_ids = []