Skip to content

Instantly share code, notes, and snippets.

View mforets's full-sized avatar
🏠
Working from home

Marcelo Forets mforets

🏠
Working from home
View GitHub Profile
@mforets
mforets / gitignore
Created July 5, 2017 07:20
gitignore
## System specifics
*.DS_Store
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
@mforets
mforets / plot_sage.md
Last active February 23, 2024 10:41
plotting cheatsheet for SageMath
@mforets
mforets / residues.md
Last active May 7, 2017 17:52
residue calculus: exploring (non-commercial) complex variable features available through SageMath
sage: z = SR.var('z', domain='complex')
sage: k = SR.var('k', domain='integer')
sage: giac('assume(k, integer)')  # for Giac PExpect interface
@mforets
mforets / integrals.md
Last active April 19, 2018 15:45
a bunch of integrals: exploring (non-commercial) symbolic integrators available through SageMath
sage: integrate(exp(-x)*sinh(sqrt(x)), x, 0, oo, algorithm='maxima').simplify() # ok
1/4*(sqrt(pi)*(erf(1) - 1) + sqrt(pi) + 2*e^(-1) - 2)*e^(1/4) - 1/4*(sqrt(pi)*(erf(1) - 1) - sqrt(pi) + 2*e^(-1) - 2)*e^(1/4)
sage: _.canonicalize_radical()
1/2*sqrt(pi)*e^(1/4)
sage: integrate(exp(-x)*sinh(sqrt(x)), x, 0, oo, algorithm='giac').simplify() # ok, fast
1/2*sqrt(pi)*e^(1/4)
sage: integrate(exp(-x)*sinh(sqrt(x)), x, 0, oo, algorithm='sympy') # ok, fast, reduced
@mforets
mforets / dict2xml.py
Created October 20, 2016 10:05
Convert Python dictionaries into XML
r"""Convert Python dictionaries into XML.
AUTHORS:
- Marcelo Forets
EXAMPLES:
python: d = list()
python: d.append({'id':1, 'text':'foo'})