Skip to content

Instantly share code, notes, and snippets.

Generalized Linear Model Regression Results
=================================================================================================
Dep. Variable: ['over50k[ <=50K]', 'over50k[ >50K]'] No. Observations: 19187
Model: GLM Df Residuals: 19090
Model Family: Binomial Df Model: 96
Link Function: logit Scale: 1.0
Method: IRLS Log-Likelihood: nan
Date: Fri, 28 Mar 2014 Deviance: nan
Time: 11:32:05 Pearson chi2: 4.75e+05
No. Iterations: 11
Call:
glm(formula = over50k ~ ., family = binomial, data = censusTrain)
Deviance Residuals:
Min 1Q Median 3Q Max
-5.1065 -0.5037 -0.1804 -0.0008 3.3383
Coefficients: (2 not defined because of singularities)
Estimate Std. Error z value Pr(>|z|)
(Intercept) -8.658e+00 1.379e+00 -6.279 3.41e-10 ***
PDetect[sensloc_, srcloc_] := Exp[-EuclideanDistance[sensloc, srcloc]];
PDFSrcloc[srcloc_] :=
1/(2 \[Pi])
Exp[-(srcloc[[1]]^2 + srcloc[[2]]^2)/
2](*PDF[BinormalDistribution[{1,1},0],srcloc]*);
PDFJointSrcSens[srcloc_, senslocs_, sensstates_] :=
PDFSrcloc[srcloc]*
If[Length[sensstates] > 0,
Times @@
MapThread[
@orome
orome / Error Log
Created October 23, 2014 01:51
Log of output from matplotlib 1.4.1 update attempt
------------------------------------------------------------
/usr/local/bin/pip run on Wed Oct 22 21:49:40 2014
Getting page https://pypi.python.org/simple/matplotlib/
URLs to search for versions for matplotlib in /Library/Python/2.7/site-packages:
* https://pypi.python.org/simple/matplotlib/
Analyzing links from page https://pypi.python.org/simple/matplotlib/
Skipping link https://pypi.python.org/packages/2.6/m/matplotlib/matplotlib-1.4.0-cp26-none-win32.whl#md5=774d62b98c9a7bcfcf29b65c0b3bb056 (from https://pypi.python.org/simple/matplotlib/); unknown archive format: .whl
Skipping link https://pypi.python.org/packages/2.6/m/matplotlib/matplotlib-1.4.0-cp26-none-win_amd64.whl#md5=198652a75d184f4f6900f74fb9d68a7f (from https://pypi.python.org/simple/matplotlib/); unknown archive format: .whl
Skipping link https://pypi.python.org/packages/2.6/m/matplotlib/matplotlib-1.4.1-cp26-none-win32.whl#md5=e60c572f1e731f0f311f601028d6d2ff (from https://pypi.python.org/simple/matplotlib/); unknown archive format: .w
@orome
orome / Segmented Plot
Last active August 29, 2015 14:10
Segmenting a wrapping matplotlib plot
# See -- http://stackoverflow.com/q/27138751/656912
from __future__ import division
import ephem
import matplotlib
import matplotlib.pyplot
import numpy
def segment_plot(x, y, ax, color='b', lw=1, ls='-', lims=[0, 24], thresh=0.95):
@orome
orome / AWS Route 53 Bug
Last active February 22, 2017 14:04
AWS Route 53 script nameserver setting bug
from __future__ import (absolute_import, print_function, division, unicode_literals)
import boto.beanstalk
import boto.exception
import boto.ec2.elb
import boto.route53.connection
import boto.route53.record
import boto.route53.domains.layer1
@orome
orome / keybase.md
Created May 28, 2017 13:09
Keybase Proof

Keybase proof

I hereby claim:

  • I am orome on github.
  • I am orome (https://keybase.io/orome) on keybase.
  • I have a public key ASAneDg0BZ7PtPrJtJJJ6fes75KJiKdkWhOp3tHpbMzioAo

To claim this, I am signing this object:

@orome
orome / gpg_fix.txt
Created January 14, 2020 21:40 — forked from cezaraugusto/gpg_fix.txt
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@orome
orome / mplerror.log
Created November 3, 2020 17:14
Output for failed Matplotlib installation on Python 3.9
This file has been truncated, but you can view the full file.
Collecting matplotlib
Downloading matplotlib-3.3.2.tar.gz (37.9 MB)
|████████████████████████████████| 37.9 MB 8.4 MB/s
Collecting certifi>=2020.06.20
Using cached certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
Collecting cycler>=0.10
Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting kiwisolver>=1.0.1
Downloading kiwisolver-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl (61 kB)
|████████████████████████████████| 61 kB 376 kB/s