Skip to content

Instantly share code, notes, and snippets.

View janzheng's full-sized avatar
🐢
vibin' w the cool kids

Jan Z janzheng

🐢
vibin' w the cool kids
View GitHub Profile

this is a test

heck yeah!

@janzheng
janzheng / cli.js
Created September 13, 2022 23:01 — forked from mattdesl/cli.js
colour palette from text prompt using Stable Diffusion https://twitter.com/mattdesl/status/1569457645182152705
/**
* General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts.
*
* Note that this uses an older fork of stable-diffusion
* with the 'txt2img.py' script, and that script was modified to
* support the --outfile command.
*/
var { spawn, exec } = require("child_process");
var path = require("path");
# STEP 1: Load
# Load documents using LangChain's DocumentLoaders
# This is from https://langchain.readthedocs.io/en/latest/modules/document_loaders/examples/csv.html
from langchain.document_loaders.csv_loader import CSVLoader
loader = CSVLoader(file_path='./example_data/mlb_teams_2012.csv')
data = loader.load()
@janzheng
janzheng / resume-schema-2.json
Last active February 6, 2024 21:02
JSON Resume Schema w/ mods
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$comment": "Revision: Added sectionDefinitions to meta, updated skills grouping, and included DOI and Citation for publications; added notes, roles, talks.",
"additionalProperties": false,
"definitions": {
"iso8601": {
"type": "string",
"description": "Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04",
"pattern": "^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$"
}
@janzheng
janzheng / script.js
Created February 15, 2024 09:15 — forked from gd3kr/script.js
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/