Skip to content

Instantly share code, notes, and snippets.

@kitroed
kitroed / QueryForDuplicateFilesLinq.cs
Created January 27, 2014 19:33
Query for Duplicate Files LINQ
void Main()
{
// Uncomment QueryDuplicates2 to run that query.
// QueryDuplicates();
QueryDuplicates2();
// Keep the console window open in debug mode.
// Console.WriteLine("Press any key to exit.");
// Console.ReadKey();
}
@kitroed
kitroed / easy163.py
Last active August 29, 2015 14:01
r/dailyprogrammer challenge number 163 "easy" - Probability Distribution of a 6 Sided Di
# r/dailyprogrammer challenge number 163 "easy"
# Probability Distribution of a 6 Sided Di
# Author: Kit Roed
# Language: python3
#make python random do all the work
import random
dsize = 6
roll_counts = []
@kitroed
kitroed / easy162.py
Created May 27, 2014 06:10
r/dailyprogrammer (Easy): Novel Compression, pt. 1: Unpacking the Data
# daily programmer #162 easy "Novel Compression pt. 1: Unpacking the Data"
# author: Kit Roed
# example dictionary:
#
# is
# my
# hello
# name
# stan
@kitroed
kitroed / easy164-1.rb
Created May 31, 2014 04:28
Challenge #164 [Easy] Assemble this Scheme into Python
puts "Hello World"
@kitroed
kitroed / easy165.py
Created June 10, 2014 03:01
r/dailyprogrammer [6/2/2014] Challenge #165 [Easy] ASCII Game of Life
import os
import time
# global vars
iterations = 0
x = 0
y = 0
grid = []
# function to check life/death
<html>
<head>
</head>
<body>
<div>
<h1>Input</h1>
</div>
<div>
<h1>Output</h1>
<textarea type="text" id="outputTextArea" style="width:100%" rows=25></textarea>
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES;
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama
@kitroed
kitroed / rightwin_to_app.reg
Created February 25, 2015 18:32
Remap right Windows Key (e0 5c) to Application/Menu Key (e0 5d). [Thanks to http://www.howtogeek.com/howto/windows-vista/disable-caps-lock-key-in-windows-vista/]
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,5d,e0,5c,e0,00,00,00,00
@kitroed
kitroed / allsets_to_sql.py
Last active July 12, 2018 05:05
Convert mtgjson.com AllSets-x.json dataset into SQL tables using Python SQLAlchemy.
import json
from hashlib import md5
from os import path
from sys import stdout
from datetime import datetime
from dateutil.parser import parse
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String, Date, Boolean
from sqlalchemy.orm import sessionmaker, relationship
from sqlalchemy.ext.declarative import declarative_base
# the idea here is to throw together a quick
# SQLite database to store the hash of all
# the files found in a given subdir
import hashlib
import os
import time
import datetime
import socket
from sqlalchemy import create_engine