Skip to content

Instantly share code, notes, and snippets.

View lazear's full-sized avatar

Michael Lazear lazear

  • Belharra Therapeutics
View GitHub Profile
#!/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
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):
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:
@lazear
lazear / cps.sml
Last active August 11, 2020 20:53
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}) =
use std::fmt;
#[derive(Clone, Debug)]
pub enum CpsTerm {
Var(String),
Abs(String, Box<CpsTerm>),
App(Box<CpsTerm>, Box<CpsTerm>),
}
#[derive(Clone, Debug)]
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
\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
implementation ::=
{ impl-phrase ;;}
impl-phrase ::=
expression | value-definition
| type-definition | exception-definition | directive
value-definition ::=
let [ rec ] let-binding { and let-binding }
@lazear
lazear / iex.py
Last active October 3, 2018 02:40
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
(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)