This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Storage animation</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style> | |
body { font-family: sans-serif;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
basic Ampl/GNU MathProg language description for gtksourceview | |
(e.g. syntax highlighting in gedit) | |
to be placed in /usr/share/gtksourceview-3.0/language-specs/ directory | |
Pierre Haessig, 2013 | |
--> | |
<language id="ampl" _name="Ampl" version="2.0" _section="Scientific"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" A bug with add_trait ? | |
-> is there a need to call a "register" function after adding a trait ? | |
Documentation reference for `add_trait` : | |
http://docs.enthought.com/traits/traits_user_manual/advanced.html#per-object-trait-attributes | |
Pierre Haessig — October 2013 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Type=Service | |
X-KDE-ServiceTypes=KonqPopupMenu/Plugin | |
MimeType=inode/directory; | |
Actions=openIPythonHere; | |
X-KDE-AuthorizeAction=shell_access | |
[Desktop Action openIPythonHere] | |
# TryExec=ipython | |
Exec=cd %f; ipython qtconsole --pylab |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Saving and loading Traits in a text file format | |
using a minimal amount of formatting and parsing code. | |
Pierre Haessig -- September 2013 | |
''' | |
from traits.api import HasTraits, Float | |
class Person(HasTraits): | |
weight = Float(75.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hour | power | |
---|---|---|
00 | 5.88 | |
01 | 5.51 | |
02 | 5.94 | |
03 | 6.84 | |
04 | 6.10 | |
05 | 5.80 | |
06 | 6.26 | |
07 | 4.64 | |
08 | 3.71 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as n | |
import random as r | |
import pylab as p | |
DIRS = ['up', 'right', 'down', 'left'] | |
def new_guy(seed=0): | |
r.seed(seed) | |
dna = [[r.choice(DIRS), | |
r.randint(1, 40), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
""" Shake an image | |
in relation to the discussion about xkcd-style graphs on matplotlib-users ML | |
ref: http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs | |
Pierre Haessig — October 2012 | |
""" | |
from os.path import splitext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
# Creates big x and y data: | |
N = 10**7 | |
t = np.linspace(0,1,N) | |
x = np.random.normal(size=N) | |
# Create a plot: |