Skip to content

Instantly share code, notes, and snippets.

View dedan's full-sized avatar

Stephan Gabler dedan

View GitHub Profile
[
{
"text": "Asp – or ash?",
"spans": [
{
"start": 0,
"end": 3,
"text": "Asp",
"rank": 0,
"label": "DISASTER",
@dedan
dedan / main.jsx
Created November 24, 2016 10:40
FadeInFadeOut
require('normalize.css/normalize.css');
require('styles/App.css');
import React from 'react';
const ObjectOne = () => {
return <div style={{width: 100, height: 100, backgroundColor: 'red'}} />
}

Keybase proof

I hereby claim:

  • I am dedan on github.
  • I am dedan (https://keybase.io/dedan) on keybase.
  • I have a public key whose fingerprint is 2656 E66A 9C5B 94BA 33EE 8B88 1F41 872C F8E0 9F14

To claim this, I am signing this object:

@dedan
dedan / d3update.html
Created January 4, 2013 10:05
# d3 update example this post helped me a lot to understand how elements can react to changes in the data [http://bost.ocks.org/mike/join/]
<html>
<head>
<title>scratch</title>
<link rel="stylesheet" href="scratch.css" type="text/css"/>
<script type="text/javascript" src="d3.v2.js"></script>
</head>
<body>
<div id='chart'></div>
<script type="text/javascript">
@dedan
dedan / crabs.dat
Created August 12, 2012 19:31
python pca on leptograpsus data
sp sex index FL RW CL CW BD
B M 1 8.1 6.7 16.1 19.0 7.0
B M 2 8.8 7.7 18.1 20.8 7.4
B M 3 9.2 7.8 19.0 22.4 7.7
B M 4 9.6 7.9 20.1 23.1 8.2
B M 5 9.8 8.0 20.3 23.0 8.2
B M 6 10.8 9.0 23.0 26.5 9.8
B M 7 11.1 9.9 23.8 27.1 9.8
B M 8 11.6 9.1 24.5 28.4 10.4
B M 9 11.8 9.6 24.2 27.8 9.7
@dedan
dedan / noise_stimuli.py
Created June 15, 2012 12:09
noise reverse correlation experiment
from matplotlib.widgets import Button
from scipy import signal
import numpy as np
import pylab as plt
image_size = 100
kernel_size = 5
kernel = np.ones((kernel_size, kernel_size))
im = signal.convolve(np.random.random((image_size, image_size)), kernel)
@dedan
dedan / code
Created December 3, 2011 11:02
sess3
#!/usr/bin/env python
# encoding: utf-8
class Life(object):
"""docstring for Life"""
def __init__(self, initial_cell_coordinates):
super(Life, self).__init__()
self.cells = set(initial_cell_coordinates)
@dedan
dedan / life
Created December 3, 2011 10:01
session2
#!/usr/bin/env python
# encoding: utf-8
class Life(object):
"""docstring for Life"""
def __init__(self, init=None):
super(Life, self).__init__()
self.cells = init
@dedan
dedan / first
Created December 3, 2011 09:00
ret
import numpy as np
import pylab as plt
import time
living_cells = set([(1, 0), (1, 1), (1, 2)])
counting = {}
@dedan
dedan / draw_polygons.py
Created October 27, 2011 13:02
openGL python
from OpenGL.GL import *
from OpenGL.GLUT import *
from PIL import Image
width, height = 640, 480
def DrawStuff():
poly1 = [(0,0), (640,0), (0,480)]
color = (0.5, 0.4, 0.3, 0.8)
glClear(GL_COLOR_BUFFER_BIT)