Skip to content

Instantly share code, notes, and snippets.

View jeschkies's full-sized avatar

Karsten Jeschkies jeschkies

View GitHub Profile
@jeschkies
jeschkies / Makefile
Created May 8, 2016 20:36
Example dependency management with Make
#…
bootstrap: vendor/.last-build
# run bootstrap before building anything
*.o **/*.o: | bootstrap
clean:
rm -rf *.o lib/*.o test_assimp *.dSYM *.gcov *.gcno *.gcda genfiles $(BINS)
distclean: clean
@jeschkies
jeschkies / SMOTE.py
Last active March 29, 2016 20:05
SMOTE implementation extracted from NYAN (https://github.com/blacklab/nyan/blob/master/shared_modules/smote.py), my Master's thesis project.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
The MIT License (MIT)
Copyright (c) 2012-2013 Karsten Jeschkies <jeskar@web.de>
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
@jeschkies
jeschkies / main
Created December 9, 2013 08:57
Is used to demonstrate a malformed database schema bug in Slick and SQLite3.
import java.io.File
import scala.slick.driver.SQLiteDriver.simple._
import Database.threadLocalSession
//Define database schema
case class Article(id: Long, title: String, text: String)
object Articles extends Table[Article]("ARTICLES") {
def id = column[Long]("ID", O.PrimaryKey)