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
#!/bin/bash | |
# This script sets up a benchmarking harness for MaxQuant on a c5ad ubuntu EC2 instance | |
sudo apt update && \ | |
sudo apt install -y \ | |
tmux \ | |
htop \ | |
awscli \ | |
unzip \ | |
mono-complete \ | |
gdb |
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
import requests | |
import pandas as pd | |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import LogNorm | |
URL = 'https://app.dimensions.ai/viz/data/publication/timeline-source-published.json?search_mode=content&search_text="{engine}" AND "proteomics"&search_type=kws&search_field=full_search' | |
def get(engine: str): |
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
import requests | |
from multiprocessing import Pool | |
TOKEN = "eyJhbGciOiJSUzI1NiJ9.<your JWT here>" | |
def download(f): | |
print(f"downloading {f['name']}...") | |
try: | |
resp = requests.get(f["href"]) | |
with open(f["name"], 'wb') as file: |
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
signature NAME = sig | |
type t | |
val empty: string -> t | |
val fresh: t -> string | |
end; | |
structure Name = struct | |
datatype t = T of {name: string, id: int ref}; | |
fun empty name = T {name=name, id=ref 0}; | |
fun fresh (T {name, id}) = |
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
use std::fmt; | |
#[derive(Clone, Debug)] | |
pub enum CpsTerm { | |
Var(String), | |
Abs(String, Box<CpsTerm>), | |
App(Box<CpsTerm>, Box<CpsTerm>), | |
} | |
#[derive(Clone, Debug)] |
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
import matplotlib.pyplot as plt | |
import matplotlib.ticker as ticker | |
import numpy as np | |
import pandas as pd | |
from mpl_toolkits.mplot3d import Axes3D | |
from datetime import datetime | |
from datetime import timedelta | |
from scipy.interpolate import CubicSpline |
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
\documentclass{article} | |
\title{Reference sheet for ``Introduction to Logic''} | |
\date{2019-04-15} | |
\author{Michael Lazear} | |
\pagestyle{headings} | |
\usepackage{amsmath} | |
\begin{document} | |
\pagenumbering{gobble} | |
\maketitle |
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
implementation ::= | |
{ impl-phrase ;;} | |
impl-phrase ::= | |
expression | value-definition | |
| type-definition | exception-definition | directive | |
value-definition ::= | |
let [ rec ] let-binding { and let-binding } |
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
import json | |
import requests | |
import pandas as pd | |
import numpy as np | |
import operator | |
import base64 | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
import dateutil | |
from datetime import datetime, timezone |
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
(define (transform f) | |
"Transform a lambda function into a STACKREF form" | |
(define (lambda-args f) (cadr f)) | |
(define (lambda-body f) (caddr f)) | |
(define (deep-map func list) | |
"Recursively map function onto sublists" | |
(map | |
(lambda (x) | |
(if (pair? x) |
NewerOlder