Skip to content

Instantly share code, notes, and snippets.

@DGaffney
DGaffney / ALGO_MANIFEST.md
Last active December 9, 2024 03:05
Graze.social Algorithm Operator Documentation
@DGaffney
DGaffney / manifest.json
Created November 9, 2024 20:04
Cool Manifests
// match any prisencolinensinainciusol skeet
{
"filter": {
"and": [
{
"regex_matches": [
{
"var": "text"
},
"\\bprisencolinensinainciusol\\b"
@DGaffney
DGaffney / community.md
Created November 7, 2024 18:56
PDX Tech Slack Getting Involved in Community Quickstart
@DGaffney
DGaffney / llm_finetuning.py
Created September 2, 2024 03:21
Example finetuning procedure for a generic text regression task, provides for iteratively scaling the amount of observations to finetune with
import json
from datetime import datetime
import numpy as np
import pandas as pd
from sklearn.metrics import r2_score
from sklearn.model_selection import KFold
import xgboost as xgb
from datasets import Dataset, DatasetDict
from torch import Tensor
@DGaffney
DGaffney / LSTM-demo.py
Created February 9, 2024 18:22
LSTM Demo Code with tunable transition matrix to illustrate increasing predictive power with increasing memory dependence on prior states
#apt-get update && apt-get install -y tmux htop unzip nvtop zip rsync libpq-dev nano
#python3 -m pip install scikit-learn pandas tensorflow
from collections import Counter, defaultdict
import csv
import hashlib
import random
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
from tensorflow.keras.models import Sequential
@DGaffney
DGaffney / Gemfile
Last active February 28, 2019 02:44
oauth_dance_mini_site.rb
source 'https://rubygems.org'
gem 'pry'
gem 'sinatra'
gem 'twitter'
gem 'oauth'
["ABCD", "cocoa", "Cocoa Puff", "coconut", "colored", "coloured", "Jerry", "crow", "Angie", "Ann", "apple", "jock", "Junior Mint", "banana", "egg", "eggplant", "bans and cans", "fez", "black Barbie", "blockhead", "frog", "fuzzy", "fuzzy wuzzy", "book book", "brownie", "bubble", "buck", "bumblebee", "can eater", "celestial", "monkey", "Charlie", "ho", "hoe", "chief", "skinny", "mack", "mick", "mickey", "Mickey Finn", "Aunt Jane", "Aunt Jemima", "Aunt Mary", "Aunt Sally", "uncircumcised baboon", "Cushite", "Cushi", "Kushi", "Kushite", "dyke", "fruit", "inyenzi", "faranji", "shahktyer", "squarehead", "guala", "guala guala", "gook", "cholo", "wetback", "naco", "aracuano", "judas", "nigger", "paki", "amakwerekwere", "kwerekwere", "kweri kweri", "kwiri kwiri", "japie", "tizzone", "ditsoon", "tizzoni", "kala", "tapette", "pato", "beaner", "fag", "bule", "spice nigger", "ling ling", "Ami", "katol", "culona inchiavabile", "Schwuchtel", "Fotze", "Sack", "Schwanzlutscher", "carcamano", "Schlampe", "Neger", "Hure", "Hure
@DGaffney
DGaffney / gist:f46fe22e750b474ddec9dcb08110ef7b
Created October 22, 2018 16:50
software_adview_review_snippet_content_pre_oct_21_2018.html
<div class="row">
<div class="panel--invisible">
<div class="large-12 columns">
<div class="row">
<div class="large-12 columns">
<h3 class="reviewName">Google Drive is the best product out there for free!</h3>
</div>
</div>
<div>
<div class="row">
@DGaffney
DGaffney / gist:6275eaa31101d9c86934757cbd0cf18f
Created October 22, 2018 16:32
software_advice_review_snippet_10_21_2018.html
<div class="panel radius panel__product__review-title--blue">
<div class="row">
<div class="medium-7 columns">
<p class="no-margin">
<strong>
<span class="reviewAuthor">Michael</span> from Marketing Macabre
</strong>
<br>
Specialty:&nbsp;Other
<br>
@DGaffney
DGaffney / gist:f704d43dbb0b703f59f870a4159fee89
Created October 22, 2018 16:31
software_advice_review_snippet_10_21_2018.html
<div class="row u-mb-24 u-pb-14 review">
<div class="col-lg-4">
<div class="card x2">
<!---->
<div class="review-profile">
<p class="ui">
<strong class="review-profile-name">Gary</strong> from <strong class="review-profile-company">L.E.A.N. 4 Jesus Ministries, Inc.</strong>
</p>
</div><!----><!---->
<div class="review-ranking">