This project has been moved to https://github.com/yymao/adstex
You can now install adstex
by
pip install adstex
and then run it with
adstex file1.tex [file2.tex [...]] -o references.bib
""" | |
This project has been moved to https://github.com/yymao/TracyWidom | |
You can install this package by `pip install TracyWidom` | |
Please open issues at https://github.com/yymao/TracyWidom/issues | |
TracyWidom.py | |
A Python module to generate Tracy-Widom distribution functions | |
Author: Yao-Yuan Mao (yymao) | |
The MIT License (MIT) |
# Simulation Cheatsheet by Yao-Yuan Mao | |
import math | |
import numpy as np | |
import matplotlib.pyplot as plt | |
rho_crit = 2.7745945707e+11 | |
log10_rhom_30 = math.log10(rho_crit*0.30) | |
log10_rhom_25 = math.log10(rho_crit*0.25) | |
log2_10 = math.log(10, 2) |
<?php | |
if(isset($_GET['q'])){ | |
$url_base = 'https://ui.adsabs.harvard.edu/#search/q='; | |
#doi | |
$re = '/\b10\.\d{4,}(?:\.\d+)*\/(?:(?![\'"&<>])\S)+/'; | |
if (preg_match($re, $_GET['q'], $matches)){ | |
if (isset($_GET['rd'])){ | |
$url = $url_base . 'doi%3A' . urlencode($matches[0]); | |
} |
This project has been moved to https://github.com/yymao/adstex
You can now install adstex
by
pip install adstex
and then run it with
adstex file1.tex [file2.tex [...]] -o references.bib
<?php | |
if (!isset($_GET['url']) or !preg_match('/(?:\/spreadsheets\/d\/|[?&]key=)([\w-]+)/', $_GET['url'], $matches)) { | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Plots of Everything vs. Everything</title> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css"> |
#!/usr/bin/env python | |
import os | |
import time | |
from argparse import ArgumentParser | |
#user settings | |
_perl_exe = 'perl' | |
_default_ctrees_dir = os.getenv('HOME') + '/software/consistent-trees' | |
#!/usr/bin/env python | |
from __future__ import print_function | |
import subprocess | |
import argparse | |
from contextlib import closing | |
import socket | |
import random | |
__author__ = 'Yao-Yuan Mao' |
#!/usr/bin/env python | |
from __future__ import print_function | |
import re | |
import argparse | |
def _find_ending_brace(s, open_brace=1): | |
escaping = False | |
output = '' | |
remain = '' |
#!/usr/bin/env python | |
import os | |
from shutil import copyfileobj | |
try: | |
from urllib.request import urlopen | |
except ImportError: | |
from urllib2 import urlopen | |
SLAC_KNOWN_HOSTS_URL = 'ftp://ftp.slac.stanford.edu/admin/known_hosts' | |
KNOWN_HOSTS_PATH = os.path.join(os.getenv('HOME'), '.ssh', 'known_hosts') |
%% | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%% AASTeX61.cls %% | |
%% October 5, 2016 %% | |
%% December 28, 2016 (bug fix on .bib file) %% | |
%% Copyright 2016 American Astronomical Society %% | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
\def\currversion{6.1} |