Skip to content

Instantly share code, notes, and snippets.

View zduey's full-sized avatar

Zach Duey zduey

  • Philadelphia, PA
View GitHub Profile
@zduey
zduey / .vimrc
Created February 13, 2017 04:45
My vimrc
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
@zduey
zduey / luigi_backup.py
Created September 18, 2016 02:26
Example of using Luigi for backup to S3
import os
import boto3
import luigi
import shutil
import datetime
from luigi.s3 import S3Target
# Globals
today = datetime.datetime.today().strftime(format='%Y_%m_%d')
folder_to_archive = ''
@zduey
zduey / lstm_exploration.ipynb
Created January 29, 2017 20:45
LSTM model parameters and model accuracy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zduey
zduey / fork_from_child.c
Created February 6, 2018 13:45
POC: Calling fork() from a child process
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
// Sample program to convince myself that you can call fork() from a child process
// Since all processes in UNIX derive from init, this seemed like it would have to
// be true, but just chekcing.
int main() {
pid_t pid_1;
@zduey
zduey / convert_xlserialdate.py
Created October 9, 2016 15:20
Convert between Excel serialdate and Python datetime with adjustment for 1900 leap year bug
def xlserialdate_to_datetime(xlserialdate):
"""
Converts a Microsoft Excel serial date to datetime object
Arguments:
-----------
xlserialdate : int
Microsoft Excel serial date
@zduey
zduey / iex.py
Created March 4, 2017 16:04
Simple Real-Time Stock Streaming with Bokeh
import io
import requests
import pandas as pd
from bokeh.models import ColumnDataSource, HoverTool, ResizeTool, SaveTool
from bokeh.models.widgets import TextInput, Button
from bokeh.plotting import figure, curdoc
from bokeh.layouts import row, widgetbox
TICKER = ""