Skip to content

Instantly share code, notes, and snippets.

View scosman's full-sized avatar
⌨️

Steve Cosman scosman

⌨️
  • getkiln.ai, ex-Apple, ex-Shoebox, ex-MSFT
  • Toronto, ON
  • 02:21 (UTC -04:00)
  • X @scosman
View GitHub Profile
{
"label": "",
"message": "typechecking - ty",
"logoSvg": "<svg width=\"510\" height=\"622\" viewBox=\"0 0 510 622\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M206.701 0C200.964 0 196.314 4.64131 196.314 10.3667V41.4667C196.314 47.192 191.663 51.8333 185.927 51.8333H156.843C151.107 51.8333 146.456 56.4746 146.456 62.2V145.133C146.456 150.859 141.806 155.5 136.069 155.5H106.986C101.249 155.5 96.5988 160.141 96.5988 165.867V222.883C96.5988 228.609 91.9484 233.25 86.2118 233.25H57.1283C51.3917 233.25 46.7413 237.891 46.7413 243.617V300.633C46.7413 306.359 42.0909 311 36.3544 311H10.387C4.6504 311 0 315.641 0 321.367V352.467C0 358.192 4.6504 362.833 10.387 362.833H145.418C151.154 362.833 155.804 367.475 155.804 373.2V430.217C155.804 435.942 151.154 440.583 145.418 440.583H116.334C110.597 440.583 105.947 445.225 105.947 450.95V507.967C105.947 513.692 101.297 518.333 95.5601 518.333H66.4766C60.74 518.333 56.0896 522.975 56.0896 528.7V611.633C56.08
@scosman
scosman / load.py
Last active December 10, 2024 16:58
Kiln Data Load Example
# pip install kiln-ai
import kiln_ai
import kiln_ai.datamodel
# Created a project and task via the UI and put its path here
task_path = "/Users/youruser/Kiln Projects/test project/tasks/632780983478 - Joke Generator/task.kiln"
task = kiln_ai.datamodel.Task.load_from_file(task_path)
# Add data to the task - loop over you dataset and run this for each item
item = kiln_ai.datamodel.TaskRun(
@scosman
scosman / Video.md
Last active November 20, 2024 19:45
Synthetic Data Generation with Kiln AI

This video is a walk-through of Kiln AI synthetic data generation. It's being used for a task to generate headlines for news articles.

Download the tool from: https://getkiln.ai

reddit.small.file.mp4
@scosman
scosman / 1 - Animating SVGs with Sonnet 3.5
Last active January 20, 2025 15:00
Sonnet 3.5 Fun - SVG Animation
I used sonnet 3.5 and Cursor to created a logo which animates on entry.
Input file: initial_logo.svg (below)
Prompt:
```
Let's add a start up animation to this SVG
Make it feel like feel like the logo starts broken, then fixes itself piece by piece. In a playful style like pixar.
```
{"label":"Coverage","message":"91%","schemaVersion":1,"color":"brightgreen"}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
helloworld
@scosman
scosman / dash.html
Created August 30, 2012 13:50
Kobo stats
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function()
{
$('#goBtn').click(function()
{
getStats();
setInterval(getStats, 300000); // 5 mins
@scosman
scosman / gist:2499922
Created April 26, 2012 14:22
Threaded delayed_job
# Threaded delayed_job. Useful for Heroku where each process/dyno costs money.
# run "rake jobs:threaded_work[4]" to start 4 worker threads
namespace :jobs do
desc "Start several delayed_job workers."
task :threaded_work, [:num_workers] => :environment do |t,args|
args.with_defaults(:num_workers => 1)
threads = []
workers = []
workersSemaphore = Mutex.new