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
| #!/usr/bin/env python | |
| import sys,os | |
| import smtplib | |
| from email.mime.text import MIMEText | |
| import getpass | |
| import argparse | |
| def sendMail(user,password,to,subject,text,mail_server="smtp.gmail.com",port=587): |
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
| #!/usr/bin/env python | |
| import sys,argparse | |
| import pyPdf | |
| ################################################################ | |
| ###########Merge PDF files in a single document################# | |
| #python mergePDF.py <file1.pdf> ... <fileN.pdf> -o <output.pdf># | |
| ################################################################ |
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
| from __future__ import division | |
| import numpy as np | |
| class Binomial(object): | |
| def __init__(self,maxN=501,modulo=100003): | |
| self._modulo = modulo | |
| self._binomial = np.ones((maxN,)*2,dtype=np.int)*-1 | |
| #Initialize binomials with boundary conditions |
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
| from lenstools.simulations import PotentialPlane | |
| import numpy as np | |
| import astropy.units as u | |
| from astropy.cosmology import WMAP9 | |
| #Last non trivial snapshot | |
| last_snapshot = 60 | |
| #Size of the plane (make it large enough to fit 3.5 degrees in angular size) | |
| angle = 300*u.Mpc |
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
| #!/usr/bin/env perl | |
| use warnings; | |
| use strict; | |
| use 5.010; | |
| ############################################################################################################################## | |
| #Read a text file and look for the lines that contain a python function definition: separate into function name and arguments# | |
| ############################################################################################################################## |
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
| #!/usr/bin/env python | |
| import sys,os | |
| #Get root path | |
| if len(sys.argv)<2: | |
| print("Usage: python {0} <root_path>".format(sys.argv[0])) | |
| sys.exit(0) | |
| root_path = sys.argv[1] |
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
| #!/usr/bin/env python | |
| import sys,os | |
| import smtplib | |
| from email.mime.text import MIMEText | |
| import getpass | |
| import argparse | |
| def sendMail(user,password,to,subject,text,mail_server="smtp.gmail.com",port=587): |
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
| from __future__ import division | |
| import numpy as np | |
| #FFT engines | |
| from numpy.fft import rfftfreq,irfft | |
| #Interpolation | |
| from scipy import interpolate | |
| #Units |