Skip to content

Instantly share code, notes, and snippets.

View warmspringwinds's full-sized avatar

Daniil Pakhomov warmspringwinds

View GitHub Profile
import numpy as np
input = np.zeros((2, 2), dtype=complex)
input[0, 0] = 0.5 + 250j
input[0, 1] = -0.5
input[1, 0] = 0.5
input[1, 1] = -0.5 + 250j
result = np.linalg.svd(input, full_matrices=True)
import numpy as np
from lib import get_scale_local_maximas_orignal, get_scale_local_maximas_vectorized
from compiled import get_scale_local_maximas_cython
lapl_dummy = np.random.rand(100,100,100)
coords = np.random.random_integers(0,99, size=(1000,3))
%timeit get_scale_local_maximas_orignal(coords, lapl_dummy)
%timeit get_scale_local_maximas_cython(coords, lapl_dummy)
@warmspringwinds
warmspringwinds / index.html
Created July 23, 2014 18:52
Example of calculating coordinates of visible tiles in Leaflet.js
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="stylesheet" href="main.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<title>Leaflet test page</title>
</head>
<body>