Skip to content

Instantly share code, notes, and snippets.

View capitolmuckrakr's full-sized avatar
💭
for the good of the realm

Alexander Cohen @capitolmuckrakr capitolmuckrakr

💭
for the good of the realm
View GitHub Profile
@capitolmuckrakr
capitolmuckrakr / lowess.py
Created November 6, 2018 23:16 — forked from agramfort/lowess.py
LOWESS : Locally weighted regression
"""
This module implements the Lowess function for nonparametric regression.
Functions:
lowess Fit a smooth nonparametric regression curve to a scatterplot.
For more information, see
William S. Cleveland: "Robust locally weighted regression and smoothing
scatterplots", Journal of the American Statistical Association, December 1979,
@capitolmuckrakr
capitolmuckrakr / gtk-firefox.sh
Last active January 28, 2018 23:40 — forked from joekiller/gtk-firefox.sh
INSTALL FIREFOX ON AMAZON LINUX X86_64 COMPILING GTK+
#!/bin/bash
# GTK+ and Firefox for Amazon Linux
# Written by Joseph Lawson 2012-06-03
# http://joekiller.com
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/
# chmod 755 ./gtk-firefox.sh
# sudo ./gtk-firefox.sh
SELECT ORI, AGENCY, MAX(CENPOP1 + CENPOP2 + CENPOP3) as population, sum(MRDR1) as murders,
sum(MANSLT1) as manslaughters, sum(ROBT1) as robberies, sum(ASLTT1) as assaults,
sum(ASSMPL1) as simple_assaults, sum(BURGT1) as burglaries, sum(LARCT1) as larcenies,
sum(VHTHFTT1) as motor_vehicle_theft, sum(ALLFTOT1) as all_crimes
FROM RETA14_AZ
GROUP BY 1, 2
ORDER BY 3 DESC;
CREATE TABLE az_crime2014 AS
SELECT ORI, AGENCY, ADDRS2, MAX(CENPOP1 + CENPOP2 + CENPOP3) as population14, sum(MRDR1) as murders14,
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -x