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
Copyright (c) 2011 Peter Hillerström, http://peter.vasb.fi/ | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
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
Copyright (c) 2011 Peter Hillerström, http://peter.vasb.fi/ | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
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
// JavaScript Range Function | |
// © 2006 Matthias Miller (originally written March 29, 2006) | |
// © 2010-2011 Peter Hillerström (modified 20.10.2010) | |
// Feel free to use it under the BSD license. | |
// Version: 0.1 Matthias Miller (originally written March 29, 2006) | |
// Version: 0.2 Peter Hillerström (modified October 20, 2010) | |
// Version: 0.3 Peter Hillerström (rewritten on May 24, 2011) |
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
;;; -*- coding: utf-8; mode: Lisp; syntax: ANSI-Common-Lisp -*- | |
;;; | |
;;; ------------------------------------------------------------------------- | |
;;; Twist - P-TRIE - probability trie (with branch widths) | |
;;; ------------------------------------------------------------------------- | |
;;; | |
;;; Copyright (c) 2010 Peter Hillerström | |
;;; | |
;;; Permission is hereby granted, free of charge, to any person obtaining a | |
;;; a copy of this software and associated documentation files (the "Software"), |
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
"""From the numba examples | |
(https://github.com/numba/numba/blob/master/examples/mandel.py), | |
but tweaked to recalculate on the fly as the viewport changes""" | |
from numba import autojit | |
import numpy as np | |
from pylab import imshow, jet, show, ion | |
import matplotlib.pyplot as plt | |
@autojit |
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
/** | |
* Circular Tooltip (SO) | |
* http://stackoverflow.com/q/13132864/1397351 | |
*/ | |
* { margin: 0; padding: 0; } | |
body { | |
overflow: hidden; | |
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg); | |
} | |
/* generic styles for button & circular menu */ |
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 | |
"""Usage: grep.py regexp file""" | |
import re, sys | |
if len(sys.argv) < 3: | |
print(__doc__) | |
exit(1) | |
regexp = re.compile(sys.argv[1]); |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
Sliding windows module. | |
""" | |
import numpy as np | |
from numpy.lib.stride_tricks import as_strided |
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 zsh | |
# -*- encoding: utf-8 -*- | |
# Copyright (c) 2015 by Peter Hillerström | |
# License: MIT License | |
# This can be sourced from zsh dotfiles. If you don't care about other | |
# functions than `about`, put them inside the about function. | |
# Output can be piped to GNU `fmt -s` command for nice formatting. | |
about() { |
OlderNewer