Skip to content

Instantly share code, notes, and snippets.

View ezod's full-sized avatar

Aaron Mavrinac ezod

View GitHub Profile
@ezod
ezod / grab.c
Created May 24, 2012 18:06
Simple HALCON (Linux) program for ICube to grab a JPEG image on SIGUSR1.
#include <signal.h>
#include "HalconC.h"
#ifndef NO_EXPORT_MAIN
int quit;
Htuple AcqHandle;
void start()
{
@ezod
ezod / pso.py
Created May 25, 2012 15:18
Particle Swarm Optimization
"""\
Particle Swarm Optimization
@author: Aaron Mavrinac
@organization: University of Windsor
@contact: mavrin1@uwindsor.ca
@license: GPL-3
"""
import numpy
@ezod
ezod / gist:3373556
Created August 16, 2012 20:49
Patch to add DOI numbers to conference articles without pages in IEEEtranN.bst
--- /usr/share/texmf-dist/bibtex/bst/IEEEtran/IEEEtranN.bst 2008-09-30 19:18:36.000000000 -0400
+++ IEEEtranNdoi.bst 2012-08-16 16:41:34.000000000 -0400
@@ -146,6 +146,10 @@
FUNCTION {default.name.latex.cmd}{ "" }
+% The default DOI prefix.
+FUNCTION {default.name.doi.prefix}{ "" }
+
+
@ezod
ezod / sequelmania.py
Created February 25, 2013 02:27
Quantifying the 21st-century trend of film sequels, remakes, and franchise reboots over the top 10 grossing films each year since 2000.
#!/usr/bin/env python
# Quantifying the 21st-century trend of film sequels, remakes, and franchise
# reboots over the top 10 grossing films each year since 2000.
import numpy
from scipy import stats
y = range(2000, 2013)
@ezod
ezod / Number to English.i7x
Created September 23, 2013 00:10
Inform 7 extension which substitutes the English name of integral numbers in text for more natural-looking dialogue.
Version 1 of Number to English by Aaron Mavrinac begins here.
"Substitute the English name of integral numbers for more natural-looking dialogue."
Table of English Numbers
Integer English Name
0 "zero"
1 "one"
2 "two"
3 "three"
#include <windows.h>
#include <iostream>
int main(int argc, char *argv[])
{
LASTINPUTINFO * lastInputInfo = new LASTINPUTINFO();
lastInputInfo->cbSize = sizeof(*lastInputInfo);
GetLastInputInfo(lastInputInfo);
std::cout << GetTickCount() - lastInputInfo->dwTime << std::endl;
return 0;