Skip to content

Instantly share code, notes, and snippets.

@millerjs
millerjs / cql.py
Created January 11, 2019 16:47
CSV Postgres importer script
#!/usr/bin/env python
from os.path import basename, splitext
from sqlalchemy import create_engine
import argparse
import getpass
import os
import pandas as pd
import re
@millerjs
millerjs / aamc_content_tagging.rb
Last active May 24, 2018 19:26
AAMC Content Tagging
def tag_aamc_content(tag_csv)
taggings = CSV.parse(tag_csv.strip_heredoc, headers: true)
missing_question_ids = Set.new
missing_tags = Set.new
taggings.each do |tagging_data|
question_id = tagging_data['BluePrint ID']
question = Question.where(id: question_id).first
if question.nil?

Storage Engine

A general storage engine, not sure what to pick as the interface

Simpler:

pub trait StorageEngine { fn store<T: RustcEncodable>(&mut self, t: T); }

Probably better?