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
<?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
<!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
class TicToc(object): | |
'''Timing class | |
1st time an instance is called, it sets a timestamp (time.time()) | |
2nd time, it computes and returns the difference (in seconds, float). | |
Examples | |
-------- | |
>>> t = TicToc() | |
>>> t() # returns time.time() |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Pierre Haessig — March 2014 | |
""" | |
Qt adaptation of Gael Varoquaux's tutorial to integrate Matplotlib | |
http://docs.enthought.com/traitsui/tutorials/traits_ui_scientific_app.html#extending-traitsui-adding-a-matplotlib-figure-to-our-application | |
based on Qt-based code shared by Didrik Pinte, May 2012 | |
http://markmail.org/message/z3hnoqruk56g2bje |
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/env python | |
# Original source : https://gist.github.com/iMichka/9901318 | |
# Change : use a timer | |
import sys | |
import numpy | |
from PyQt4 import QtGui, QtCore | |
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg | |
from matplotlib.collections import PolyCollection |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.