Skip to content

Instantly share code, notes, and snippets.

View vchollati's full-sized avatar

Vamshi Chollati vchollati

View GitHub Profile
@mblondel
mblondel / perceptron.py
Last active April 21, 2024 13:42
Kernel Perceptron
# Mathieu Blondel, October 2010
# License: BSD 3 clause
import numpy as np
from numpy import linalg
def linear_kernel(x1, x2):
return np.dot(x1, x2)
def polynomial_kernel(x, y, p=3):
@jseabold
jseabold / send_text.py
Created October 16, 2011 15:07
context manager to time code and send text message when done
"""
Context manager or function to send text messages to your phone when a
process is done.
Edit the global variables. You might be able to find your phone e-mail
address here: http://tinywords.com/about-old/mobile/
Usage:
with SendText("long running process"):
do_something()
@hrldcpr
hrldcpr / tree.md
Last active January 24, 2026 21:18
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrequeiroz
andrequeiroz / holtwinters.py
Last active February 3, 2025 04:35
Implementation of Holt-Winters algorithms in Python 2
#The MIT License (MIT)
#
#Copyright (c) 2015 Andre Queiroz
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
@sloria
sloria / bobp-python.md
Last active August 5, 2026 11:38
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@debasishg
debasishg / gist:8172796
Last active August 5, 2026 05:48
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@johnmyleswhite
johnmyleswhite / abstract.md
Created February 11, 2014 22:49
Abstract for UC Davis Talk

Julia and Statistical Computing

Julia is a new language for technical computing. The language is designed to solve the "two language problem", in which scientists prototype code in a higher-level language like R and then rewrite parts (or all) of their code in a lower-level language like C. Julia strives to expose a set of basic abstractions that allow programmers to transition easily between quick-and-dirty prototype code and production-quality code.

@staltz
staltz / introrx.md
Last active August 6, 2026 06:30
The introduction to Reactive Programming you've been missing
@wrobstory
wrobstory / gist:98033556dd590132852e
Created September 8, 2014 04:17
PIP ALL THE THINGS
#!/bin/bash
virtualenv .env &&
source .env/bin/activate &&
brew install libevent &&
brew install libyaml &&
pip install cython &&
pip install numpy &&
pip install scipy &&
pip install pandas &&
pip install matplotlib &&