Skip to content

Instantly share code, notes, and snippets.

@mgualt
mgualt / gist:7280078
Created November 2, 2013 15:24
One simple improvement to the code I gave in Assignment 8 would be to define the function as below. In this way, f actually takes input which is an ordered pair (c,x), and outputs another ordered pair (c, x^2 + c). Then when building the long term values list, we get somewhat simpler code.
def f((c,x)):
return (c,x^2 + c)
def LTV(c):
"returns last 50 results from iterating f 500 times beginning with (c,0)"
points=[(c,0)]
for i in range(500):
newpoint = f(points[-1])
points.append(newpoint)
return points[-50:]
@mgualt
mgualt / make output
Created September 17, 2012 15:56
building pdf2htmlex
Scanning dependencies of target pdf2htmlEX
[ 7%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o
[ 15%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/general.cc.o
[ 23%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/state.cc.o
[ 30%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/install.cc.o
[ 38%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/export.cc.o
[ 46%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/text.cc.o
[ 53%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/image.cc.o
[ 61%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/LineBuffer.cc.o
[ 69%] Building C object CMakeFiles/pdf2htmlEX.dir/src/ffw.c.o
@mgualt
mgualt / gist:3732711
Created September 16, 2012 14:47
failure of poppler install
$ brew install --enable-xpdf-headers poppler==> Downloading http://poppler.freedesktop.org/poppler-0.20.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/poppler-0.20.2.tar.gz
==> ./configure --prefix=/usr/local/Cellar/poppler/0.20.2 --enable-xpdf-header
==> make install
Making install in goo
CXX gfile.lo
CXX gmempp.lo
CXX GooHash.lo
CXX GooList.lo
CXX GooTimer.lo
@mgualt
mgualt / current-outline-for-dev.md
Created July 21, 2012 19:58
Current outline for the development of a simple piece of software

Suppose I have an idea for the development of a simple utility -- this could be a program which monitors input from a sensor, processes it, and outputs messages using some communication method, say email.

I know that nowadays there must be many frameworks whereby I can focus on writing the core part of the program in my favourite language, say python, and then once the basic functionality is working, I can throw it in the black box, throw in various user interfaces which the black box requires, and out pops an "app" for download on any platform, a web app, or even an embedded cpu gizmo which functions as a standalone appliance, such as a smoke alarm.

@mgualt
mgualt / mgualt-post-1.org
Created July 21, 2012 08:14
Second gist experiment

What is it?

Will it work?

@mgualt
mgualt / mgualt-post-0.org
Created July 19, 2012 04:38
First gist experiment

If the ssc groupoid integrating a Poisson Lie algebroid exists, then it is a symplectic groupoid. But the other groupoids in the category of integrations are not necessarily symplectic, as the symplectic form on the ssc groupoid may not descend to the various possible quotients.

For example (from Henrique), take $T^* S^3 = S^3× \mathbb{R}^3$, which is clearly symplectic, and compare it to $S^3× T^3$, which admits no symplectic form.