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
for section in am.sections: | |
for element in section.elements: | |
print("*" * 10) | |
print(f"name: {element.name}") | |
print(f"length: {len(element.components)}") | |
for component in element.components: | |
print(f"type: {component.type}") | |
print(f"subtype: {component.subtype}") | |
print(f"subscript: {component.subscripts}") | |
print(component.ast) |
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 pandas | |
import scipy | |
# 49MB | |
df = pd.read_csv("oldtitle.csv") | |
# takes 1s to create pkl, 51MB | |
df.to_pickle("oldtitle.pkl") | |
# takes 1.5s to create nc, 610MB |
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 xarray as xr | |
def gen_param_names(): | |
# spatial subscript | |
state_names = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', | |
'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', | |
'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', | |
'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', | |
'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', | |
'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', |
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
Cruise, Tom 'Minority Report': The Players (2002) (V) [Himself] | |
'Minority Report': The Story, the Debate (2002) (V) [Himself] | |
'Rain Man' Featurette (1988) (TV) [Himself] <3> | |
'War of the Worlds': Characters - The Family Unit (2005) (V) [Himself] | |
'War of the Worlds': Production Diaries, East Coast - Beginning (2005) (V) [Himself] | |
'War of the Worlds': Production Diaries, East Coast - Exile (2005) (V) [Himself] | |
'War of the Worlds': Production Diaries, West Coast - Destruction (2005) (V) [Himself] | |
'War of the Worlds': Production Diaries, West Coast - War (2005) (V) [Himself] | |
'War of the Worlds': Revisiting the Invasion (2005) (V) [Himself] | |
100 Years at the Movies (1994) (TV) (archive footage) [Himself] |
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
functions { | |
vector diagSPD_EQ(real alpha, real rho, real L, int M) { | |
return sqrt((alpha^2) * sqrt(2*pi()) * rho * exp(-0.5*(rho*pi()/2/L)^2 * linspaced_vector(M, 1, M)^2)); | |
} | |
vector diagSPD_periodic(real alpha, real rho, int M) { | |
real a = 1/rho^2; | |
int one_to_M[M]; | |
for (m in 1:M) one_to_M[m] = m; |
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
# Two-Page Summary: Analogy between Bayesian Modeling and Startup Growth | |
## Introduction | |
The conceptual strategic operation of startups can be likened to Bayesian computation, particularly in the context of Simulation-Based Calibration Checking. This paper aims to draw an analogy between the P, A, D components in Bayesian modeling and startup growth, extending it to P, PD, PA, PAD models in both domains. We also discuss the most likely growth bottleneck sequences for startups, drawing parallels with Bayesian workflows. | |
## P, A, D Components and Models in Bayesian Workflow and Startup Growth | |
### 1. P, A, D component in Bayesian modeling | |
- **P**: Joint probability distribution over variables (e.g., p(y,θ)) | |
- **A**: Posterior approximator (e.g., MCMC, VI) |
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 | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
# Constants | |
x1, x2, y1, y2 = 1, 3, 2, 4 | |
# Grid of x, y points | |
x = np.linspace(0, 5, 400) | |
y = np.linspace(0, 5, 400) |
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 jax | |
import jax.numpy as jnp | |
import matplotlib.pyplot as plt | |
from collections import namedtuple | |
Decision = namedtuple('Decision', ['cable', 'assembly', 'pack']) | |
EquityRate = namedtuple('EquityRate', ['CEO', 'VC', 'Emp', 'Supp']) | |
INITIAL_MONEY = 760_000 |