This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
def is_weekend(date, date_is_timestamp=False, format='%Y-%m-%d'): | |
""" | |
Check to see if a date falls on a weekend. | |
You can pass in date as a string. By default, is_weekend expects to see | |
a date in the format YYYY-mm-dd (ex. 2011-11-10). You can change this | |
using the strftime(3) format specifiers and passing the format in the | |
'format' argument. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sup.sh | |
# author: kyle isom <[email protected]> | |
# | |
# *extremely* primitive supervisor to ensure a daemon runs and stays running | |
# use it with crontab. | |
# | |
# this is an external supervisor to accompany the monitor python module I wrote | |
# that gets used in the code that's running. | |
# see https://github.com/kisom/pymods/blob/master/monitor.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; emacs lisp file to set up kyle's emacs | |
;;; install package.el | |
(let ((buffer (url-retrieve-synchronously | |
"http://tromey.com/elpa/package-install.el"))) | |
(save-excursion | |
(set-buffer buffer) | |
(goto-char (point-min)) | |
(re-search-forward "^$" nil 'move) | |
(eval-region (point) (point-max)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# author: kyle isom <[email protected]> | |
# license: isc / public domain dual-license | |
# see (http://www.brokenlcd.net/standard-license.txt) | |
# | |
""" | |
This is a module (with a main() function) to grab a list of image links in | |
an imgur album. The main() function demonstrates how to use that to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 2011-12-04 kyle isom <[email protected]> | |
# designed to quickly move all mah oreilly downloads to a folder where i | |
# can sort them | |
# assumptions: | |
# the only epubs are from o'reilly | |
# i download several formats for each book (pdf, epub, mobi) | |
# my main ebook library is organised by topic/.../title/title.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sbcl --script | |
;;;; build-image.lisp | |
;;;; build a customised sbcl image | |
;;;; | |
;;;; you can modify the package list by changing the *base-packages* | |
;;;; global variable. this is useful for building a custom binary with | |
;;;; your commonly used libraries already present (at the expense of | |
;;;; some memory) but will cut down on load times. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# author: kyle isom <[email protected]> | |
# license: isc / public domain dual-license | |
# | |
# i have this saved to ~/bin/validjson | |
""" | |
Quickly check whether a JSON file is valid or not. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! dug up this old thing from an old college class... i had a few good chuckles | |
!-------------------------------------------------------------------------- | |
! TITLE: CSCI260 Final Project | |
! AUTHORS: | |
! * kisom | |
! * Chris | |
! * Laura | |
! | |
! CLASS: CSCI260A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; test suite to go with hashing code | |
(ns user.test.sha256 | |
(:use [clojure.test] | |
[clojure.string :only [join]] | |
[user.hash])) | |
(def sha256-test-vectors | |
#^{:doc "test vectors from the NESSIE project (http://is.gd/jdM99e)"} | |
[{ :message "" | |
:expected "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# author: kyle isom <[email protected]> | |
# license: ISC / public domain | |
""" | |
Simple server to test sockets. | |
""" | |
import argparse | |
import os |