Skip to content

Instantly share code, notes, and snippets.

Janusz Lenar malleor

  • Warsaw, Poland
Block or report user

Report or block malleor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View aa.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View PL127.geojson
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 Feb 20, 2017 — forked from kerryrodden/.block
Przejścia w BBX
View .block
license: apache-2.0
@malleor
malleor / .block
Created Feb 17, 2017 — forked from mbostock/.block
Radial Tidy Tree
View .block
license: gpl-3.0
border: no
height: 1060
View icebreaker_1.md

Crazy inventions

Show the photos:

1a 1b

2

3a

@malleor
malleor / iris.py
Last active Aug 29, 2015
Playing with Decision Trees from scikit
View iris.py
import numpy as np
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
from matplotlib import pyplot as plt
# fetch data
iris = load_iris()
classes = {}
for cls in (0,1,2):
classes[cls] = np.array([v for k, v in zip(iris.target, iris.data) if k == cls])
View play2048.js
function play(iteration) {
var ctrl = {
up: function() { window.gm.inputManager.emit('move', 0); return window.gm.moved; },
right: function() { window.gm.inputManager.emit('move', 1); return window.gm.moved; },
down: function() { window.gm.inputManager.emit('move', 2); return window.gm.moved; },
left: function() { window.gm.inputManager.emit('move', 3); return window.gm.moved; }
};
while(!window.gm.over && !window.gm.won) {
if(!iteration(ctrl)) {
@malleor
malleor / _framerate_to_float.md
Last active Dec 15, 2015
Regex to convert a FlyCapture2 framerate enum to floats using the available documentation in a comment.
View _framerate_to_float.md

Replace:

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

With:

\t\2, // \1
@malleor
malleor / _videomode_to_resolution_regex.md
Last active Dec 15, 2015
Convert FlyCapture2::VideoMode definition code into { width, height } pair - regex under VS10.
View _videomode_to_resolution_regex.md

Replace:

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

With:

\t{ \2, \3 }, // \1
View custom_graph_usage.cpp
struct UserDerivedType :
public IUserType
{
// ...
};
void CreateCustomGraph(IProject& proj)
{
// create a uniform graph; no customization at this point
IUserGraphNode* first_node = proj.CreateUserGraph();
You can’t perform that action at this time.