Skip to content

Instantly share code, notes, and snippets.

Vinnie Monaco vmonaco

Block or report user

Report or block vmonaco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stevecheckoway
stevecheckoway / fa.sty
Created Mar 10, 2018
Finite automata and (deterministic) Turing machine running/drawing.
View fa.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fa}
[2018/03/09 v0.3 Construct finite automata and Turing machines]
\RequirePackage{tikz}
\RequirePackage{etoolbox}
\usetikzlibrary{arrows.meta,automata,calc,chains,positioning}
% Define \emptystring to \varepsilon
@dmyersturnbull
dmyersturnbull / groupyby_parallel.py
Last active Sep 16, 2019
Performs a Pandas groupby operation in parallel
View groupyby_parallel.py
# coding=utf-8
import pandas as pd
import itertools
import time
import multiprocessing
from typing import Callable, Tuple, Union
def groupby_parallel(groupby_df: pd.core.groupby.DataFrameGroupBy,
func: Callable[[Tuple[str, pd.DataFrame]], Union[pd.DataFrame, pd.Series]],
@vmonaco
vmonaco / runs_test.py
Last active Sep 23, 2019
Multivariate Wald-Wolfowitz test to compare the distributions of two samples
View runs_test.py
"""
Multivariate Wald-Wolfowitz test for two samples in separate CSV files.
See:
Friedman, Jerome H., and Lawrence C. Rafsky.
"Multivariate generalizations of the Wald-Wolfowitz and Smirnov two-sample tests."
The Annals of Statistics (1979): 697-717.
Given multivariate sample X of length m and sample Y of length n, test the null hypothesis:
@vmonaco
vmonaco / segment_motion.py
Created Dec 7, 2015
Segment motion using a 2-state Gaussian HMM
View segment_motion.py
"""
Segment an acceleration or gyroscopic CSV file into motion/non-motion segments
using a 2-state HMM and Savitzky–Golay filter as preprocessing
"""
import sys
import pandas as pd
import matplotlib.pyplot as plt
from hmmlearn.hmm import GaussianHMM
from scipy.signal import savgol_filter
@vmonaco
vmonaco / cmu_powerlaw.py
Last active Apr 19, 2017
CMU keystroke power law
View cmu_powerlaw.py
'''
Created on May 26, 2015
@author: vinnie, vincent@vmonaco.com
Power-law results from:
"DATA FORENSIC TECHNIQUES USING BENFORD’S LAW AND ZIPF’S LAW FOR KEYSTROKE
DYNAMICS", Aamo Iorliam, Anthony T.S. Ho, Norman Poh, Santosh Tirunagari,
and Patrick Bours. IWBF 2015.
@tylerl
tylerl / rsa.py
Created Sep 24, 2011
RSA Explained in Python
View rsa.py
#!/usr/bin/env python
# This example demonstrates RSA public-key cryptography in an
# easy-to-follow manner. It works on integers alone, and uses much smaller numbers
# for the sake of clarity.
#####################################################################
# First we pick our primes. These will determine our keys.
#####################################################################
You can’t perform that action at this time.