This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import xml.dom.minidom as m | |
def cmp_to_key(col, covert_to_proper_datatype): | |
class K(object): | |
def __init__(self, obj, *args): | |
self.obj = obj | |
def __lt__(self, other): | |
return covert_to_proper_datatype(self.obj[col]) < covert_to_proper_datatype(other.obj[col]) | |
return K |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct User{ | |
char name[45]; | |
int age; | |
float height; | |
}usr; | |
usr.name = "Someone"; | |
usr.age = 31; | |
ur.height = 6.1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User{ | |
String name; | |
int age; | |
float height; | |
void set_user(); | |
User get_user(); | |
} | |
void User::set-user(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usr = {'name': "Someone", 'age': 33, 'height': 6.1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usr = { someone, 33, 6.1 }. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usr = ('someone', 33, 6.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Usr = { 'User', | |
{name, someone}, | |
{age, 33}, | |
{height, 6.1} | |
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usr = ('User', | |
('name', 'someone'), | |
('age', 33), | |
('height', 6.1) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'User, N, A, H} = Usr. | |
{'Any", N, A, H} = Usr. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# User Arun K Rajeevan <the1.arun@gmail.com> | |
# Date 1302552098 -19800 | |
# Node ID fa92d22264a58dd6b232c28b1dd4c78f8ee62c4f | |
# Parent d3dc0e7da9aac20f5bab6f2d61afcb78b2444a47 | |
added bpython support | |
diff -r d3dc0e7da9aa -r fa92d22264a5 gluon/shell.py | |
--- a/gluon/shell.py Mon Apr 11 09:13:22 2011 -0500 | |
+++ b/gluon/shell.py Tue Apr 12 01:31:38 2011 +0530 |