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
#To get all sql queries sent by Django from py shell | |
import logging | |
l = logging.getLogger('django.db.backends') | |
l.setLevel(logging.DEBUG) | |
l.addHandler(logging.StreamHandler()) | |
#For more info, http://stackoverflow.com/questions/971667/django-orm-how-to-view-or-log-the-executed-query |
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
#!/bin/bash | |
#Take project name as input | |
if [ -z "$1" ] | |
then | |
echo "Enter project name" | |
read proj | |
else | |
proj="$1" | |
fi |
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 Node: | |
def __init__(self,val,parent=None): | |
self.val = val | |
self.parent = parent | |
self.left = None | |
self.right = None | |
def setLeft(self,node): | |
self.left = node |
NewerOlder