Skip to content

Instantly share code, notes, and snippets.

View ksindi's full-sized avatar
🚀
Shipping

Kamil Sindi ksindi

🚀
Shipping
View GitHub Profile
@abhin4v
abhin4v / Fibonacci.java
Created November 24, 2009 18:46
Python-style Generator in Java
package net.abhinavsarkar.util;
/**
* A (infinite) Fibonacci number generator.
*
* @author Abhinav Sarkar
*/
public class Fibonacci extends Generator<Integer> {
@vassilevsky
vassilevsky / eclipse-pydev-zenburn.epf
Created December 20, 2010 06:21
Zenburn theme for PyDev editor under Eclipse Helios
file_export_version=3.0
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Background.SystemDefault=false
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Background=63,63,63
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.FindScope=85,85,100
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Foreground.SystemDefault=false
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Foreground=246,243,232
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionBackground.SystemDefault=false
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionBackground=85,85,85
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionForeground.SystemDefault=false
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionForeground=190,25,160
@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,
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

#-*- coding:utf-8 - *-
def load_dataset():
"Load the sample dataset."
return [[1, 3, 4], [2, 3, 5], [1, 2, 3, 5], [2, 5]]
def createC1(dataset):
"Create a list of candidate item sets of size one."
@andrewschoen
andrewschoen / S3 bucket sync
Created February 3, 2012 21:22
Python script to sync an S3 bucket to the local file system
# -*- coding: utf-8 -*-
import os
import StringIO
import hashlib
try:
from boto.s3.connection import S3Connection
from boto.s3.key import Key
except ImportError:
raise ImproperlyConfigured, "Could not load Boto's S3 bindings."
@ehazlett
ehazlett / redis.conf
Created February 13, 2012 15:32
Redis supervisor config
[program:redis]
command=/usr/local/bin/redis-server /storage/redis_data/redis.conf
directory=/storage/redis_data
user=root
autostart=false
stopsignal=QUIT
@Nooby
Nooby / Event.py
Created March 8, 2012 17:12
Simple Events for Python
class EventHook(object):
def __init__(self):
self.__handlers = []
def __iadd__(self, handler):
self.__handlers.append(handler)
return self
def __isub__(self, handler):
@rduplain
rduplain / MainActivity.java
Created May 8, 2012 20:08
A very simple full-screen WebView activity for Android native wrappers, as a starting point.
package com.willowtreeapps.demo;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
@nonZero
nonZero / graceful_int_handler.py
Created June 10, 2012 22:11
GracefulInterruptHandler
import signal
class GracefulInterruptHandler(object):
def __init__(self, sig=signal.SIGINT):
self.sig = sig
def __enter__(self):
self.interrupted = False