Skip to content

Instantly share code, notes, and snippets.

@tedtieken
tedtieken / SPARC.md
Created May 23, 2025 10:43 — forked from ruvnet/SPARC.md
The SPARC framework is a structured methodology for rapidly developing highly functional and scalable projects by systematically progressing through Specification, Pseudocode, Architecture, Refinement, and Completion. It emphasizes comprehensive initial planning, iterative design improvements, and the strategic use of specialized tools and AI mo…

SPARC Framework Prompt Template

Introduction

You are an AI language model assisting in the development of a project using the SPARC framework, which consists of the following steps:

  1. Specification
  2. Pseudocode
  3. Architecture
  4. Refinement
@tedtieken
tedtieken / recalculate_user.py
Created March 4, 2025 02:02 — forked from LouisdeBruijn/recalculate_user.py
Recalculate item and user vectors on-the-fly
def recalculate_user(user_ratings):
'''adds new user and its liked items to sparse matrix and returns recalculated recommendations'''
alpha = 40
m = load_npz('sparse_user_item.npz')
n_users, n_movies = m.shape
ratings = [alpha for i in range(len(user_ratings))]
@tedtieken
tedtieken / logit-chart.ipynb
Created December 29, 2024 02:43 — forked from brandon-lockaby/logit-chart.ipynb
logit chart notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tedtieken
tedtieken / wiki-100k.txt
Created January 30, 2022 22:57 — forked from abamacus/wiki-100k.txt
Wictionary top 100,000 most frequently-used English words [for john the ripper]
This file has been truncated, but you can view the full file.
#!comment: This allegedly waa a list of "the top 100,000 most frequently-used English words", see the repo I forked for more provenance.
#!comment: But it was very un-sanitized. I had a specific purpose in mind, and thought it might be somewhat more generally useful to have/share in the future, so here's how I sanitized the list:
#!comment: 0) put a number on each word (I should note that somehow it only included 98,913 to start with)
#!comment: 1) change all words to lower-case
#!comment: 2) blank out any words with characters other than a-z
#!comment: 3) remove any duplicates, keeping the lower (more frequent) number
#!comment: Now the list is 62916 words long, and still contains a lot of non-English words, but I think it is more useful.
#!comment:
#!comment: Format: Rank (original rank) Word
1 (1) the
@tedtieken
tedtieken / block_personal_appts
Created August 25, 2020 01:55 — forked from alranel/block_personal_appts.js
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Instructions on how to set up can be found at https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
function sync() {
// ID(s) of personal calendar(s)
var secondary_calendars = [
'xxxxxxx',
];
var today=new Date();
var enddate=new Date();
enddate.setDate(today.getDate()+90); // how many days in advance to monitor and block off time
@tedtieken
tedtieken / shopify_api.conf
Created May 31, 2016 19:54 — forked from rdetert/shopify_api.conf
Sync Shopify Customers who Accept Marketing with Sendy Using ActiveRecord 4
SHOPIFY_API_KEY = 'my-key'
SHOPIFY_PASSWORD = 'my-pass'
STORE_NAME = 'my-store'
@tedtieken
tedtieken / bulk import shipping rates
Created May 26, 2016 18:07 — forked from leobossmann/bulk import shipping rates
Bulk create/delete shipping rates in the Shopify backend. Go to Settings/Shipping and paste it into Javascript console. WARNING: This is a proof of concept, use with extreme caution and only if you know what you're doing, you will have to customize this to fit your needs. Again, just a proof of concept, worked for me, might not work for you. Ong…
function make_shipping_rates(id, low, mid, high) {
$.post('/admin/price_based_shipping_rates.json', {
price_based_shipping_rate: {
country_id: id,
min_order_subtotal: "0",
max_order_subtotal: "500",
name: "DHL Premiumversand",
offsets: [],
price: low
}
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
@tedtieken
tedtieken / gist:6567112
Created September 15, 2013 00:50
Demonstrating that the two envelopes paradox is actually a fallacy.
import random
envs = [10.0, 20.0]
rounds = 10000
total_stay = 0
for x in xrange(rounds):
  t_envs = envs[:]
  random.shuffle(t_envs)
  choice = t_envs.pop()
@tedtieken
tedtieken / fabfile.py
Created December 5, 2012 17:36 — forked from jpennell/fabfile.py
Fabric fabfile for Django/Heroku App
from fabric.api import env, local, require
def deploy():
"""fab [environment] deploy"""
require('environment')
maintenance_on()
push()
syncdb()
migrate()