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 | |
from openai import OpenAI | |
import plotly | |
import plotly.graph_objs as go | |
import umap | |
url = "http://localhost:80" | |
client = OpenAI( |
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
https://services.math.duke.edu/~rtd/EOSP/EOSP2021.pdf - stochastic processes | |
https://arxiv.org/abs/2106.10165 - principles of deep learning theory | |
https://arxiv.org/abs/2104.13478 - geometric deep learning | |
https://hastie.su.domains/ElemStatLearn/printings/ESLII_print12_toc.pdf | |
https://ia601508.us.archive.org/35/items/collection-of-mathematics-probability-and-statistics-books/A%20First%20Course%20in%20Probability%2C%20Global%20Edition%20%28Sheldon%20Ross%29.pdf | |
https://www.cs.uoi.gr/~arly/courses/ml/tmp/Bishop_book.pdf - PRML, Chris Bishop | |
https://github.com/probml/pml2-book/releases/latest/download/book2.pdf | |
https://maurice-weiler.gitlab.io/cnn_book/EquivariantAndCoordinateIndependentCNNs.pdf | |
https://arxiv.org/abs/1504.03001 - Chaos on the interval (225pp) | |
https://www.ma.imperial.ac.uk/~dturaev/kuznetsov.pdf - Elements of Applied Bifurcation Theory (614pp) |
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
# NB: ar5iv endpoint is lagged relative main arxiv | |
import subprocess | |
def convert_arxiv_url_to_markdown(arxiv_url, target_format='markdown_github'): | |
parts = arxiv_url.split('/') | |
article_id = parts[-1] if parts[-1] else parts[-2] # Account for trailing slash | |
article_id = article_id.replace('.pdf', '') | |
html_url = f'https://ar5iv.labs.arxiv.org/html/{article_id}' | |
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
simulate the behavior of the following function. respond only with the output, enclosed in brackets. | |
def pair(node1, node2): | |
GeeseGraph = WorldGraph.neighborhood("things related to geese") | |
geese_nodes1 = GeeseGraph.nearest_neighbors(node1, n=10) | |
geese_nodes2 = GeeseGraph.nearest_neighbors(node2, n=10) | |
return geese_nodes1.intersect(geese_nodes2).sample(n=1, bias="funny matches") | |
>>> GeeseGraph.sample(n=100) | |
[pond, goose, feather, honk, migration, flock, nest, lake, wintering grounds, birdwatching, grain, park, bread, gosling, water, flyway, wetlands, grass, reeds, sunrise, sunset, quack, wildlife, bird, aviary, down, flapping, waddle, pecking, squawk, preen, aquatic plants, river, stream, marsh, ecosystem, habitat, conservation, ornithology, species, biodiversity, nature reserve, environmental protection, tagging, tracking, molting, territorial, aggression, mating rituals, offspring, survival, adaptation, plumage, waterfowl, aquatic invertebrates, feeding, foraging, resting, roosting, territo |
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 scipy as sp | |
from scipy.stats import poisson, expon | |
import matplotlib.pyplot as plt | |
import math | |
import random | |
random.seed(42) | |
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
eff_batch_size=2048 | |
######################### | |
# what you're doing-ish # | |
######################### | |
gradient_accumulation_steps = 4 | |
micro_batch_size = eff_batch_size // gradient_accumulation_steps |
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
def init_comfy( | |
comfyui_path = "/home/dmarx/projects/ComfyUI" | |
): | |
# 1. add ComyUI to path | |
import sys | |
sys.path.append(comfyui_path) | |
# 2. ensure cli parser doesn't cause issues | |
from comfy.options import enable_args_parsing | |
enable_args_parsing(False) |
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
#!pip install omegaconf keyframed | |
from omegaconf import OmegaConf | |
from collections import defaultdict | |
from keyframed import Curve | |
from keyframed.dsl import curve_from_cn_string | |
from keyframed.utils import simplify | |
def update_storyboard_inferred_values(storyboard): |
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
from pathlib import Path | |
import re | |
images = list(Path('./frames').glob('*.png')) | |
n_frames = len(images) | |
def get_frame_index(fpath): | |
fpath = str(fpath) | |
match = re.findall('[0-9]+', fpath) | |
if match: |
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
scene1 {transition: t0} | scene2 {transition: t1} | scene3 {transition: t0} | scene4 | |
scenes: | |
scene1: | |
prompts: | |
- foo | |
- bar | |
scene2: | |
prompts: | |
- baz |
NewerOlder