Skip to content

Instantly share code, notes, and snippets.

View uranix's full-sized avatar

Ivan Tsybulin uranix

  • Yandex
  • Moscow, Russia
View GitHub Profile
@uranix
uranix / Je5G-0.py
Created July 23, 2017 12:53
null created by uranix - https://repl.it/Je5G/0
haystack = [
[1, 0, 0, 1, 0, 1],
[1, 0, 1, 1, 1, 1],
[0, 1, 0, 0, 1, 0],
[1, 0, 1, 1, 0, 1],
[0, 0, 0, 0, 1, 0],
[1, 1, 1, 1, 0, 1]
]
needle = [
[1, 0, 1],
@uranix
uranix / neumann.matlab
Created July 28, 2015 12:53
Solving Neumann problem for Laplace equation in square
M = 59;
h = 2 / M;
si = [];
sj = [];
sv = [];
f = zeros((M + 1) * (M + 1), 1);
lbc = @(x, y) -x;
@uranix
uranix / gist:64dd00f49449fc884ee5
Created December 24, 2014 18:33
Struct of arrays sugar
#include <iostream>
#include <vector>
#include <functional>
#include <cmath>
template <typename T>
struct vec3 {
T x;
T y;
T z;