Skip to content

Instantly share code, notes, and snippets.

View Thomascountz's full-sized avatar
💃
LGTM!

Thomas Countz Thomascountz

💃
LGTM!
View GitHub Profile
@Thomascountz
Thomascountz / third_export.rb
Created June 27, 2022 21:59
Lo-fi Piece written programmatically with Sonic Pi
# Listen here: https://soundcloud.com/thomas-countz/third-export
use_bpm 68
kicks = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Kicks"
snares = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Snares"
live_loop :click do
sleep 1
end
class Dictionary
def self.search_danish(word)
new(:da).search(word)
end
def initialize(language)
@language = language
end
def search(word)
@Thomascountz
Thomascountz / insert_all_behavior.rb
Last active June 2, 2022 18:19
activerecord test script for PR#45036 experimentation
# frozen_string_literal: true
require "bundler/inline"
gemfile do
source "https://rubygems.org"
# gem "activerecord", github: "thomascountz/rails", ref: "5942211feba53c8deec8884bcee109a759c5e60d"
gem "activerecord", path: "/worspaces/rails"
gem "sqlite3"
@Thomascountz
Thomascountz / split_names_prototype.rb
Created May 8, 2022 17:25
Ruby executable file to test a split_names! prototype - RailsConf 2022
#! /usr/bin/env ruby
## Usage:
# $ chmod +x ./split_names_prototype.rb
# $ ./split_names_prototype.rb
## Run Specs
# Remove breakpoint: (`binding.pry`)
# $ rspec ./split_names_prototype.rb
@Thomascountz
Thomascountz / active_record_test_bed.rb
Created February 16, 2022 08:41
In-memory ActiveRecord Test Bed
# active_record_testbed.rb
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'activerecord', require: 'active_record'
gem 'sqlite3', require: true
gem 'pry', require: true
end
@Thomascountz
Thomascountz / kaffe_log.py
Created January 22, 2022 12:59
A script to read values written to serial from a thermocouple attached to an Arduino to monitor coffee roasting
#!/usr/bin/env python3
import sys
import getopt
import serial
import time
import datetime
import csv
def main(argv):
@Thomascountz
Thomascountz / coloco
Created September 14, 2021 02:53
Columnar Datastore?
#!/usr/bin/env ruby
## USAGE EXAMPLE
## $ bin/coloco '{ "key": "value" }'
##
## $ find ./datastore -type f | xargs tail -n +1
## ==> ./datastore/key <==
## value
##
## ==> ./datastore/index <==
@Thomascountz
Thomascountz / daq_serial_sensor_samples.ipynb
Last active August 22, 2021 21:48
Hand gestures prediction based on z-axis accelerometer data from low-cost DAQ hardware
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Thomascountz
Thomascountz / copenhagenair.ipynb
Last active August 3, 2021 13:40
CopenhagenAir.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Thomascountz
Thomascountz / test_perceptron.py
Last active October 13, 2020 08:39
Tests for Python Perceptron v.1
"""
MIT License
Copyright (c) 2018 Thomas Countz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is