Skip to content

Instantly share code, notes, and snippets.

@jbwhit
jbwhit / investment-checklist.md
Last active September 10, 2024 15:14
This tweet https://x.com/datarade/status/1808705176179462467 shared a checklist from a summary from https://x.com/sb9721p. I tried to make it into an actual checklist.

Optimized Investment Evaluation Checklist

Purpose: To systematically evaluate potential investments by assessing key financial, operational, and strategic factors.

Date of creation: 2024-07-04

1. Initial Screening

  • Is the business within your circle of competence?
  • Can you explain the business model in one sentence?
%load_ext autoreload
%autoreload 1
%config InlineBackend.figure_format = 'retina'
%load_ext rich
import datetime
import hashlib
import json
import os
import re
import sys
@jbwhit
jbwhit / Resources.md
Last active January 8, 2024 21:16
Jonathan Whitmore's resource links for AAS 2024 talk
@jbwhit
jbwhit / example-ruff-formatting.ipynb
Last active October 31, 2024 07:22
Steps to use `ruff` in JupyterLab with the `jupyterlab_code_formatter` plugin.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / PlanetAnimation3.py
Last active August 10, 2023 09:47
Plotting Separation between prediction and observation
%%manim -qm PlanetAnimation3
df2 = pd.read_csv(
"https://gist.githubusercontent.com/jbwhit/8c745f8e6d814651a2254b3509e3d17c/raw/2e2457ee96dd8268f419fd842cdfb6e345b8ed22/uranus-example.csv"
)
class PlanetAnimation3(Scene):
def construct(self):
times = np.array(df2["date_frac"].values)
uranus_positions_1 = np.hstack(
df = pd.read_parquet("plotme.parquet")
class PlanetAnimation2(Scene):
def construct(self):
my_template = TexTemplate()
my_template.add_to_preamble(r"\usepackage{mathabx}")
Tex.set_default(tex_template=my_template)
scale = 12
shift = np.array([-4, -1])
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / scene.py
Last active June 8, 2023 17:20
This code creates this video here: https://youtu.be/g5QsoVxFSx0
import numpy as np
import pandas as pd
from manim import *
class SolarSystem(ThreeDScene):
def construct(self):
# Set the initial camera position
self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
colors = {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbwhit
jbwhit / Fixing matplotlib transparent label problems.ipynb
Last active May 26, 2023 22:50
Matplotlib label transparency problems
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.