Skip to content

Instantly share code, notes, and snippets.

View jakeyeung's full-sized avatar

Jake Yeung jakeyeung

View GitHub Profile
@jakeyeung
jakeyeung / sfi_playground_multi_traj_example_cat_inputs.ipynb
Created October 24, 2023 08:10
Concatenating input trajectories gives error
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakeyeung
jakeyeung / sfi_heterogeneous_data_question.ipynb
Last active October 18, 2023 09:34
Stochastic Force Inference heterogeneous data question
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakeyeung
jakeyeung / fit_flat_model_check_obs_noise.md
Created August 9, 2023 15:03
Check obs_noise from GP fit using constant kernel
# import blackjax # terrible to install
import jax
import jax.numpy as jnp
import jax.random as jr
import jax.tree_util as jtu
import matplotlib as mpl
import matplotlib.pyplot as plt
import tensorflow_probability.substrates.jax as tfp
from jax.config import config
@jakeyeung
jakeyeung / fit_flat_model_check_obs_noise.ipynb
Created August 9, 2023 15:02
Check obs_noise from constant kernel fit
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakeyeung
jakeyeung / gist:197bb484453cbbc5802b7df293869f80
Created August 9, 2023 15:01
fit_flat_model_check_obs_noise.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "67bd240f-1763-4be8-90af-0bdf988fbdb1",
"metadata": {},
"outputs": [
{
"name": "stderr",
@jakeyeung
jakeyeung / 20181018_093505_463tMy.png
Last active October 18, 2018 06:08
Directions HGH to Nade hotel
20181018_093505_463tMy.png

How to go from HGH airport to Nade hotel (city center)

Preamble

This is a short guide of how to go from Hangzhou Airport International Terminal to Nade hotel in the city center (Wu lin men). My specific experience is from Hong Kong to Hangzhou, which I am guessing would be very similar to other people’s flights because the airport is small.

Bus time is about 40 minutes.

@jakeyeung
jakeyeung / Directions.html
Created October 18, 2018 05:16
Hangzhou airport to Nade hotel at Wu lin men
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>How to go from HGH airport to Nade hotel (city center)</title>
<!-- 2018-10-18 Thu 13:14 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<meta name="author" content="Jake Yeung and Bingqing Cheng" />

Keybase proof

I hereby claim:

  • I am jakeyeung on github.
  • I am jakeyeung (https://keybase.io/jakeyeung) on keybase.
  • I have a public key ASD4RDr7vMhoubacJDVyK6ItBVQjmpuF_T5U_kP0vrufYwo

To claim this, I am signing this object:

# Functions ---------------------------------------------------------------
####### lib ############
# Here is an R script wrote by Aaron Statham which saves UCSC to pdfs -
# you can choose which genome and tracks to display by altering the 'url' parameter. 'trackfile' is the url of a file describing the custom tracks (beds/bigwigs) to display
mergePDF <- function(output="merged.pdf", sourcefiles=c("source1.pdf","source2.pdf","source3.pdf"))
{
# create the command string and call the command using system()