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 | |
''' | |
Download files from a password protected seafile share. | |
Converted to use python from https://gist.github.com/vmx/ed6f91b93bc3c4f7e152dcd5f377ecef | |
''' | |
import requests | |
from argparse import ArgumentParser | |
import logging | |
from urllib.parse import urlparse | |
from pathlib import Path |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
name: eschool2021 | |
channels: | |
- default | |
- conda-forge | |
dependencies: | |
- astropy=4.2 | |
- numpy=1.20 | |
- matplotlib=3.4 | |
- astroquery | |
- jupyter |
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
import tarfile | |
import pandas as pd | |
from io import TextIOWrapper | |
import matplotlib.pyplot as plt | |
import os | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('outputfile') |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
from astropy.time import Time | |
import astropy.units as u | |
t = Time.now() + np.linspace(0, 30, 30) * u.day | |
# plot something vs time normally using a list of datetimes as x values | |
fig, ax = plt.subplots(constrained_layout=True) |
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
\usepackage{amsmath} | |
\usepackage{amssymb} | |
\usepackage{mathtools} | |
\usepackage{fontspec} | |
\usepackage{xcolor} | |
\setmainfont[BoldFont=Akkurat Office]{Akkurat Light Office} | |
\setsansfont[BoldFont=Akkurat Office]{Akkurat Light Office} | |
\setmonofont[BoldFont=Fira Code, Scale=MatchLowercase]{Fira Code Light} | |
\usepackage[ | |
math-style=ISO, |
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
import numpy as np | |
from scipy.optimize import curve_fit, minimize | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
from scipy.stats import poisson | |
MUON_LIFETIME = 2.196_981_1 | |
bins = np.linspace(0.5, 12, 150) |
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
import requests | |
from bs4 import BeautifulSoup | |
from argparse import ArgumentParser | |
import subprocess as sp | |
import tempfile | |
import os | |
from multiprocessing.pool import ThreadPool | |
import json | |
import logging | |
import re |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.