Skip to content

Instantly share code, notes, and snippets.

View memilanuk's full-sized avatar

Monte Milanuk memilanuk

View GitHub Profile
@memilanuk
memilanuk / reddit.py
Last active August 29, 2015 14:10 — forked from anonymous/reddit.py
import tkinter as tk
root = tk.Tk()
root.wm_title('Radio Buttons')
label1 = tk.Label(root)
label1.config(text='Please select an option below.')
label1.pack()
@memilanuk
memilanuk / create_contactsDB.sql
Last active October 24, 2016 11:33
Populate sample DB for CRUD app
DROP TABLE IF EXISTS person;
DROP TABLE IF EXISTS address;
DROP TABLE IF EXISTS phone_number;
DROP TABLE IF EXISTS email;
PRAGMA FOREIGN_KEYS = TRUE;
CREATE TABLE person (
ID INTEGER PRIMARY KEY,
Title TEXT,
@memilanuk
memilanuk / contour_plot.R
Created May 15, 2017 00:12
Contour Plot / Heat Map for Load Development
require(lattice)
require(spatial)
groups <- read.csv(file="Desktop/damoncali.csv",head=TRUE,sep=",")
groups$x <- groups$CBTO
groups$y <- groups$Charge
groups$z <- groups$ES.MOA
x.Margin <- 0.00
y.Margin <- 0.0
# bswn.py -- Munge results from BSWN events to a usable format
import csv
with open('data.txt','r') as input_file:
lines = input_file.read().split('\n')
# Remove the first 8 lines of tile, header, etc.
lines = lines[8:]
_make is a function
_make ()
{
local cur prev words cword split;
_init_completion -s || return;
local file makef makef_dir=("-C" ".") makef_inc i;
case $prev in
-f | --file | --makefile | -o | --old-file | --assume-old | -W | --what-if | --new-file | --assume-new)
_filedir;
return
_make is a function
_make ()
{
local cur;
COMPREPLY=();
cur="${COMP_WORDS[COMP_CWORD]}";
if [[ ${cur} != -* ]]; then
local glob=$(shopt -p nullglob);
shopt -s nullglob;
COMPREPLY=($(compgen -W "$(for f in *.c; do echo ${f%.c}; done)" -- ${cur}));