Skip to content

Instantly share code, notes, and snippets.

View hrichardlee's full-sized avatar

Hyunho Richard Lee hrichardlee

View GitHub Profile
import asyncio
import meadowrun
def main():
s3_bucket_name = "meadowrun-sd" # replace this with your own bucket name!
folder_name = "steampunk_computer"
prompt = "a digital illustration of a steampunk computer floating among clouds, detailed"
asyncio.run(
meadowrun.run_command(
import time
import requests
def upload_license_file(base_url: str) -> None:
with open("Sentiment Analysis on Financial Text.gravity-ai.key", "r") as f:
response = requests.post(f"{base_url}/api/license/file", files={"License": f})
response.raise_for_status()
@hrichardlee
hrichardlee / companies.txt
Last active August 18, 2022 02:32
Meadowrun-wikipedia-demo
3M
A. O. Smith
Abbott
AbbVie
Abiomed
Accenture
Activision Blizzard
ADM
Adobe
ADP
@hrichardlee
hrichardlee / scratch_py1.mypkg.foo.py
Last active October 7, 2021 16:01
Poetry issue #4610: Scripts in path dependencies don't work if develop = true
def bar():
print("in foo.bar!")
public static class RabinKarp
{
public static IReadOnlyDictionary<int, HashSet<ulong>> PrecomputePatternHashes(IEnumerable<string> patterns)
{
return patterns.ToLookup(p => p.Length, p => RollingHash.Hash(p))
.ToDictionary(ps => ps.Key, ps => new HashSet<ulong>(ps));
}
public static IEnumerable<string> Search(string text, IEnumerable<string> patterns, IReadOnlyDictionary<int, HashSet<ulong>> patternHashes = null)
{
@hrichardlee
hrichardlee / addwfrule.ps1
Last active December 21, 2015 01:38
Added the ability to add block rules and to repeat the script
#use Process Monitor and filter to Operation = TCP Disconnect to find blocked programs
#shortcut should point to %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "c:\bin\addwfrule\addwfrule.ps1"
function Select-FileDialog
{
param([string]$Title,[string]$Directory,[string]$Filter="All Files (*.*)|*.*")
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
$objForm = New-Object System.Windows.Forms.OpenFileDialog
$objForm.InitialDirectory = $Directory
$objForm.Filter = $Filter