Skip to content

Instantly share code, notes, and snippets.

View jeethu's full-sized avatar

Jeethu Rao jeethu

View GitHub Profile
@jeethu
jeethu / gist:94499
Created April 13, 2009 15:50
DOMBuilder example
var Event = YAHOO.util.Event, DOM = YAHOO.util.Dom, DB = YAHOO.tagz.DomBuilder;
Event.onDOMReady(function() {
Event.on('id_ok','click',function(e) {
var s = YAHOO.lang.trim(DOM.get('id_name').value);
if(s) {
DOM.insertBefore(
DB.DIV({style:{margin:'2px'}},
DB.SPAN(
{style:{color:'white','background-color':'#aa0011',padding:'2px'}},
'You entered: '+s)),
@jeethu
jeethu / test_int_decode.py
Created March 27, 2012 12:18
A slightly faster way to decode ints and floats?
import os
import random
import re
import time
l = []
for x in range(100000):
l.append(random.choice(
[None, str(random.randint(-10000, 10000)),
str(random.random()),
@jeethu
jeethu / test.py
Created June 10, 2012 06:38
Test RequestHandler.prepare() and RequestHandler.on_finish() returning deferreds
import cyclone.web
from twisted.internet import reactor
from twisted.internet.task import deferLater
class TestHandler(cyclone.web.RequestHandler):
def _prepare(self):
print "Prepared!"
def prepare(self):

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

#!/usr/bin/env bash
##
# @author Jay Taylor <outtatime@gmail.com>
#
# @date 2011-10-20
#
# @description Copies MySQL database to ramdisk then runs supplied shell script
# or command. The ramdisk version of the database is then copied back to the
# filesystem. Speeds up IO-intensive operations (e.g. loading heavily indexed

Keybase proof

I hereby claim:

  • I am jeethu on github.
  • I am jeethu (https://keybase.io/jeethu) on keybase.
  • I have a public key ASDfxn5HNpSwM9Vif-t90Ku6WcyMszxEdhiPFfb3Gk5kWQo

To claim this, I am signing this object:

@jeethu
jeethu / Comparison
Created January 14, 2018 10:50
pyperformance benchmarks results for list_insert_memmove
py37_baseline-a.json
====================
Performance version: 0.6.0
Report on Linux-4.13.0-19-generic-x86_64-with-debian-stretch-sid
Number of logical CPUs: 8
Start date: 2018-01-13 22:22:33.914912
End date: 2018-01-13 22:57:15.543948
py37_list_insert_memmove_t_16-a.json
py37_baseline.json
==================
Performance version: 0.6.0
Report on Linux-4.13.0-19-generic-x86_64-with-debian-stretch-sid
Number of logical CPUs: 8
Start date: 2018-01-15 20:55:22.740090
End date: 2018-01-15 21:28:08.440029
py37_list_insert_memmove.json
py37_baseline-no-pgo.json
=========================
Performance version: 0.6.0
Report on Linux-4.13.0-19-generic-x86_64-with-debian-stretch-sid
Number of logical CPUs: 8
Start date: 2018-01-15 23:36:29.563960
End date: 2018-01-16 00:13:14.443979
py37_list_insert_memmove-no-pgo.json
py37_baseline-no-pgo-no-lto.json
================================
Performance version: 0.6.0
Report on Linux-4.13.0-19-generic-x86_64-with-debian-stretch-sid
Number of logical CPUs: 8
Start date: 2018-01-16 21:08:29.457607
End date: 2018-01-16 21:46:10.018098
py37_list_insert_memmove-t32-no-pgo-no-lto.json