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,
@capitolmuckrakr
capitolmuckrakr / .block
Created March 2, 2017 21:42
3. Drawing shapes
license: gpl-3.0
height: 240
border: no
@capitolmuckrakr
capitolmuckrakr / .block
Created March 2, 2017 21:22
I Make Circles
license: gpl-3.0
@capitolmuckrakr
capitolmuckrakr / .block
Last active March 2, 2017 21:04
2. Transforming data
license: gpl-3.0
height: 240
border: no
@capitolmuckrakr
capitolmuckrakr / .block
Last active March 2, 2017 21:04
1. DOM Manipulation
license: gpl-3.0
height: 240
border: no
#!/bin/bash
#
# Copied from http://julianoliver.com/output/log_2015-12-18_14-39
#
# DROPKICK.SH
#
# Detect and Disconnect the DropCam and Withings devices some people are using to
# spy on guests in their home, especially in AirBnB rentals. Based on Glasshole.sh:
#
# http://julianoliver.com/output/log_2014-05-30_20-52
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I am transitioning GPG keys away from an old 4096-bit RSA key to a new
8192-bit RSA key. There is no urgent reason for this transition. I
have chosen to generate and store this new key more securely than my
existing key.
The old key will continue to be valid for some time, but I prefer all
new correspondences to be encrypted with the new key, and will be
#elsif param_key == "amountReported"
if param_value.kind_of? Hash
@browser.select_list(:id=>"amountReportedOperator").option(:text=>"lte").select if param_value.to_a.flatten.first == :<=
@browser.select_list(:id=>"amountReportedOperator").option(:text=>"gte").select if param_value.to_a.flatten.first == :>=
@browser.text_field(:id => "#{param_key}").set "#{param_value.to_a.flatten.last}"
else
@browser.select_list(:id=>"amountReportedOperator").option(:text=>"eq").select
@browser.text_field(:id => "#{param_key}").set "#{param_value}"
end