Skip to content

Instantly share code, notes, and snippets.

View JanDupal's full-sized avatar

Jan Dupal JanDupal

  • Brno, Czech Republic
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am jandupal on github.
  • I am jandupal (https://keybase.io/jandupal) on keybase.
  • I have a public key ASACU-t4YA_nzvF4PW-g4KBpeC7Cl8lm3-rGD6A7N5rAQgo

To claim this, I am signing this object:

@JanDupal
JanDupal / mnist.ipynb
Created November 23, 2015 22:02
TensorFlow & MNIST learning visualization
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JanDupal
JanDupal / README.md
Created September 22, 2012 11:47
Quick'n'dirty Jekyll plugin for sorted cycle

Jekyll sorted_for plugin

Quick'n'dirty Jekyll plugin for sorted cycle.

Install

Copy sorted_for.rb to _plugins/ directory of your Jekyll site.

Usage

@JanDupal
JanDupal / resist.rb
Created February 8, 2012 21:24
Resistor combinations (serial, parallel) using GP ( https://github.com/phorsfall/genetics/ )
$:.unshift("lib")
require "genetics"
require "pp"
class Resist < Tree
TARGET = 215
literals [50, 100, 500]
function(:para) { |a,b| (a*b)/(a+b) }
@JanDupal
JanDupal / interpol.hs
Created August 15, 2011 23:06
Vector interpolation in Haskell
size :: [Double] -> Double
size = sqrt . sum . map (**2)
add :: [Double] -> [Double] -> [Double]
add = zipWith (+)
normalize :: [Double] -> [Double]
normalize a = map (/ size a) a
interpolate :: [Double] -> [Double] -> [Double]