Skip to content

Instantly share code, notes, and snippets.

@agramfort
agramfort / lowess.py
Last active August 16, 2023 06:19
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,
@driki
driki / How I cut my RCN internet bill
Created November 28, 2012 01:00
How I cut my monthly RCN internet bill
19:40John B.: Hello Matt! How may I help you?
19:41Matt M.: Hi John. I need to lower my bill. Comcast internet is much cheaper. Thinking of switching
19:43Matt M.: They are offering me $34.99/mo my latest RCN bill is $49.99
19:43John B.: Let me see what I can do, sir. I'd be happy to help you. May I please have your address and phone number?
19:44Matt M.: Sure. XXXXXXXXX, MA XXXXX and my phone number is XXX-XXX-XXXX.
19:45John B.: Thank you sir. One moment please while I research what I can do.
19:45Matt M.: Great thanks.
19:48John B.: I tried to put you in the $34.99 plan, however the system knows your an active customer and denies me.
19:49John B.: But we do have another option!
19:49Matt M.: OK. What are you thinking?
@yanofsky
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@julionc
julionc / 00.howto_install_phantomjs.md
Last active June 7, 2024 11:29
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@arnov
arnov / ab.py
Last active May 13, 2019 14:29
Bayesian AB Test
#!/usr/bin/python
# -*- coding: utf-8 -*-
import math
def calc_ab(alpha_a, beta_a, alpha_b, beta_b):
'''
See http://www.evanmiller.org/bayesian-ab-testing.html
αA is one plus the number of successes for A
@tmalsburg
tmalsburg / predict_vs_simulate.org
Last active November 18, 2022 01:14
Predict vs simulate in lme4

Predict vs simulate in lme4

For this investigation we are going to use the sleepdata data set from the lme4 package. Here is the head of the data frame:

@gigamonkey
gigamonkey / criteria.txt
Last active January 5, 2020 06:21
Hiring criteria: looking for the ability to …
Write a program that does what it’s supposed to do
Write idiomatic code
Debug a program that you wrote
Debug a program someone else wrote
Debug the interaction between a system you wrote and one you didn’t
File a good bug report
Modify a program you didn’t write
Test a program you wrote
Test a program you didn’t write
Learn a new programming language
@betatim
betatim / convert.sh
Last active August 22, 2021 23:20
🚀 Minimal `nbconvert` template to convert jupyter notebooks to HTML + thebe (details: https://betatim.github.io/posts/really-interactive-posts/). Open the generated HTML in a browser it will look like a normal notebook except for the code cells, which you can edit and execute!
# Convert your notebook to an interactive webpage
#
# Attached a notebook (really-interactive-posts.ipynb) and the generated
# output (really-interactive-posts.html). The thebe.tpl template file is
# at the very end of the gist.
$ jupyter nbconvert --template thebe.tpl --to html <notebook.ipynb>
# You can open the generated webpage locally file://... howerver some
@dwilkie
dwilkie / docker-cheat-sheat.md
Last active May 12, 2024 14:08
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@alanwill
alanwill / delete-multiple-rows.py
Created August 21, 2016 08:59
Delete Multiple DynamoDB rows
import boto3
getCleanTable = taskStatus.query(
KeyConditionExpression=Key('requestId').eq('a3248585-8ac0-4889-b1fb-976d9113f7f2') & Key('eventTimestamp').gt('1')
)
for i in getCleanTable['Items']:
cleanupTable = boto3.client('dynamodb').batch_write_item(
RequestItems={
'talr-taskStatus': [