Skip to content

Instantly share code, notes, and snippets.

View btbytes's full-sized avatar

Pradeep Gowda btbytes

View GitHub Profile
@btbytes
btbytes / *Packages*
Created January 4, 2010 21:22
ELPA... Yum.
abacus 1.0.2 available Abacus Calculator
archive-downloader 1.1 available Download files from archive.org
asciidoc 0.1 available asciidoc text file development support
auto-dictionary 1.0.1 available automatic dictionary switcher for flyspell
blank-mode 6.6 available Minor mode to visualize blanks
bubbles 0.5 available Puzzle game for Emacs.
cal-china-x 0.6 available Chinese calendar extras
caps-mode 1.0 available (minor mode) letters are inserted capitalized
changelog-url 0.1 available ChangeLog bugzilla buttonizer
chess 1.96 available Play chess in Emacs
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Raphael.js sandbox</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Pradeep Gowda">
<script src="raphael.js" type="text/javascript" charset="utf-8"></script>
require("date") -- luaforge.net/projects/date/
a = date(2010,1,8)
print("Date : ", a)
print('GMT TIME: '..os.date("!%Y-%m-%dT%H:%M:%S"))
print(os.date())
gmt = os.date("!%c")
gmt=date()
print(gmt:fmt("${iso}"))
#include <stdio.h>
#include <time.h>
#define SIZE 256
int
main(int argc, char* argv[])
{
time_t curtime;
struct tm *gtime;
@btbytes
btbytes / html5_template.html
Created January 21, 2010 15:58
Minimal HTML5 Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>
</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
import math
import time
radius = 6371
def distance(latA, lngA, latB, lngB):
latAr = math.radians(latA)
lngAr = math.radians(lngA)
latBr = math.radians(latB)
lngBr = math.radians(lngB)
(py26)Pradeep-Gowdas-MacBook:distance_py pradeep$ time python distance.py
416.374050856
real 6m57.198s
user 6m37.892s
sys 0m1.504s
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
@btbytes
btbytes / indepth_python.markdown
Created February 3, 2010 16:00
A list of Python concepts to explore in-depth.

Function Annotations

This thread talks about Python function annotations and use of with statement in a way similar to Ruby's blocks.