Skip to content

Instantly share code, notes, and snippets.

View jseabold's full-sized avatar

Skipper Seabold jseabold

View GitHub Profile
@andreas-h
andreas-h / r_stl.py
Created December 5, 2013 16:30
Python-wrapper for R's STL
# -*- coding: utf-8 -*-
import datetime
from numpy import asarray, ceil
import pandas
import rpy2.robjects as robjects
def stl(data, ns, np=None, nt=None, nl=None, isdeg=0, itdeg=1, ildeg=1,
nsjump=None, ntjump=None, nljump=None, ni=2, no=0, fulloutput=False):
@thiagomarzagao
thiagomarzagao / mcq.py
Last active May 4, 2020 01:50
The Python script below implements the “Fightin’ Words” algorithm (see Monroe, B., Colaresi, M., Quinn, K. Fightin’ words: lexical feature selection and evaluation for identifying the content of political conflict. Political Analysis, 16(4), pp. 372-403). It takes as inputs word-frequency matrices. These matrices must be in CSV format. The first…
### FIGHTIN' WORDS (MCQ-2008)
### author: Thiago Marzagao
### contact: marzagao ddott 1 at osu ddott edu
import os
import sys
import pandas as pd
import numpy as np
from numpy import matrix as m
@lisamelton
lisamelton / encode.sh
Last active March 31, 2024 21:13
This is the shell script I use to drive HandBrakeCLI to re-encode video files in a format suitable for playback on Apple TV, Roku 3, iOS, OS X, etc.
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
@joelverhagen
joelverhagen / clean_py.sh
Created October 8, 2012 16:48
Recursively removes all .pyc files and __pycache__ directories in the current directory
#!/bin/sh
# recursively removes all .pyc files and __pycache__ directories in the current
# directory
find . | \
grep -E "(__pycache__|\.pyc$)" | \
xargs rm -rf
# or, for copy-pasting:
@postmodern
postmodern / consulting_agreement_amendment.md
Created August 2, 2012 23:53
Contract amendent to allow Open Sourcing of out-of-scope/unrelated Software

Excluded Inventions

Consultant shall have the right to retain ownership of any inventions, original works of authorship, discoveries, concepts or ideas, which are unrelated to Consultant’s present work (or the actual or demonstrably anticipated research or development of the Company) under this Agreement; or that the Consultant developed entirely on his own time without using the Company’s equipment, supplies, facilities and does not contain any Company trade secrets, proprietary materials or any other protected intellectual property owned by the Company. Consultant represents that the exclusion of such Inventions from this Section 9 (Inventions) will not materially affect Consultant’s ability