Skip to content

Instantly share code, notes, and snippets.

import http.client, urllib.parse, json
import requests
from bs4 import BeautifulSoup
import openai
import nltk
# Download the NLTK Punkt tokenizer model
nltk.download('punkt')
# Set up your API keys
@henryamster
henryamster / image_sequence_driven_quick_clip_guided_diffusion_hq_256x256_and_512x512.ipynb
Created October 10, 2021 04:24
Image_Sequence_Driven_Quick_CLIP_Guided_Diffusion_HQ_256x256_and_512x512.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@henryamster
henryamster / MP3OfIsolatedVocalsFromYoutubeLink.ipynb
Created December 21, 2020 08:12
download an mp3 of isolated vocals from a youtube video link
@henryamster
henryamster / dice.js
Last active January 4, 2020 23:33
dice roll simulation
r=1e2,a=[];i=_=>Math.floor(Math.random()*6);di=(v,i,s)=>s.indexOf(v)==i;for(p=0;p<r;p++){a.push(i()+1)};b=a.reduce((a,i)=>a+=i);t=(`\nDICE SIM \nmax: ${Math.max(...a)}\nmin: ${Math.min(...a)}\nmean: ${(b/r)}\nmedian: ${(Math.max(...a)-Math.min(...a))/2}\nmode: ${(a.filter(di).map(x=>[x, a.filter(y=>y===x).length]).sort((a,b)=>a[1]<b[1]?1:-1)[0].join(' -> '))}\nsample: ${r}\nst.dev: ${ Math.sqrt(a.map(x=>{d=x-(b/r);return d*d}).reduce((i,a)=>i+=a)).toFixed(4)}\nresults: ${ a.filter(di).map(x=> [x, a.filter(y=>y===x).length]).sort((a,b)=>a[1]<b[1]?1:-1).map((z,i)=>String.fromCharCode(0x2680+z[0]-1)+':'+z[1]).join(' ')}\nrolls:\n${a.map((x,i)=>`${`${String.fromCharCode(0x267F+x)}`}`).join(' ')}`);
@henryamster
henryamster / index.html
Last active May 25, 2019 04:42
OutForDay Clock
<div class="container">
<div class="column">
<h1 class="is-size-1">
<span class="has-text-danger thicc"> Meijer</span> Intern Clockout Calculator
</h1>
<div class="columns">
<!--in for day-->
<div class="column">
<label for="inDay">In for day:</label><br/>
<div class="control has-icons-left has-icons-right">
@henryamster
henryamster / hfxyz-redesign.markdown
Last active November 14, 2018 07:50
HFXYZ Redesign