This file contains hidden or 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
| makeSearchCommand({ | |
| name: "citeulike-search", | |
| url: "http://www.citeulike.org/search/all?q={QUERY}", | |
| icon: "/favicon.ico", | |
| description: "Searches CiteUlike for your keywords.", | |
| }); |
This file contains hidden or 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
| //http://itoshi.tv/d/?date=20080901#p02 | |
| makeSearchCommand({ | |
| name: "oald", | |
| url: "http://www.oup.com/oald-bin/web_getald7index1a.pl?search_word={QUERY}", | |
| icon: "/favicon.ico", | |
| description: "Searches OALD for your keywords.", | |
| }); | |
| //http://itoshi.tv/d/?date=20080901#p03 | |
| makeSearchCommand({ | |
| name: "pubmed", |
This file contains hidden or 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
| CmdUtils.CreateCommand({ | |
| name: "insert-formula", | |
| takes: {"expression in LaTeX": noun_arb_text}, | |
| homepage: "http://arataka.wordpress.com", | |
| author: {name: "Takafumi Arakaki", homepage: "http://arataka.wordpress.com"}, | |
| license: "MPL", | |
| preview: function( pblock, what ) { | |
| var base = "https://secure.s21g.com/formula/formulae/preview_with_auth"; |
This file contains hidden or 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
| #ifdef NUMPY_DEBUG | |
| static void *NumPyDebug_CheckAndGetPtr(PyArrayObject *aobj, | |
| char *name, int ndim, int *ind) | |
| { | |
| int i; | |
| void *dptr = PyArray_DATA(aobj); | |
| PyGILState_STATE gstate; | |
| if(ndim != PyArray_NDIM(aobj)){ | |
| /* specified number of dimentions is not same of its of array */ |
This file contains hidden or 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 scipy | |
| from scipy.integrate import odeint | |
| sin=scipy.sin | |
| cos=scipy.cos | |
| def dydt(y,t0, dl, bt, ro): | |
| return scipy.array([ | |
| dl * (y[1] - y[0]), | |
| y[0] * (ro - y[2]) - y[1], | |
| y[0] * y[1] - bt * y[2] |
This file contains hidden or 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 -*- | |
| import numpy | |
| import pylab | |
| dstr = """\ | |
| ----------\ | |
| ---####---\ | |
| --######--\ | |
| -##----##-\ | |
| -##----##-\ |
This file contains hidden or 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
| TOOLSROOT=../tools | |
| rst2latex=python ${TOOLSROOT}/rst2latex.py | |
| rst2latexmath=python ${TOOLSROOT}/rst2latexmath.py | |
| rst2mathml=python ${TOOLSROOT}/rst2mathml.py | |
| ### | |
| .PHONY: allpdf | |
| allpdf: $(shell find . -name "*.txt" \ | |
| | sed -e 's/txt/pdf/' -e 's/.*/_build\/latexmath\/&/') |
This file contains hidden or 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
| set style line 1 lt 1 lc rgbcolor "#4f81bd" | |
| set style line 2 lt 1 lc rgbcolor "#c0504d" | |
| set style line 3 lt 1 lc rgbcolor "#9bbb59" | |
| set style line 4 lt 1 lc rgbcolor "#8064a2" | |
| set style line 5 lt 1 lc rgbcolor "#4bacc6" | |
| set style line 6 lt 1 lc rgbcolor "#f79646" | |
| set style line 7 lt 1 lc rgbcolor "#13256f" | |
| set style line 8 lt 1 lc rgbcolor "#c65c0c" | |
| set style line 9 lt 1 lc rgbcolor "#1e781e" | |
| set style line 10 lt 1 lc rgbcolor "#ce38c7" |
This file contains hidden or 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 h5py | |
| import os | |
| myfile = 'myfile.hdf5' | |
| print "remove %s" % myfile | |
| if os.path.exists(myfile): | |
| os.remove(myfile) | |
| print "write to %s" % myfile |
This file contains hidden or 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 h5py | |
| ispace = ' ' * 2 | |
| def see_dataset(dset, indent=0): | |
| sp = ispace * (indent+1) | |
| vstr = str(dset.value) | |
| print "\n".join([sp + vi for vi in vstr.split('\n')]) | |
| def see_group(group, indent=0): | |
| sp = ispace * indent |
OlderNewer