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
======== File1 ======== | |
math|osman | |
phys|ayse,fatma | |
======== File2 ======== | |
hasan|phys | |
huseyin|math | |
======== Output ======== | |
math|osman,huseyin |
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
import shelve | |
# Files to merged | |
FILE1 = '/tmp/file1' | |
FILE2 = '/tmp/file2' | |
# Shelve file | |
SHELVE = '/tmp/shelve' | |
# Open shelve file |
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
import sys | |
import copy | |
def gen_emp_tree(num): | |
l = [] | |
for i in range(4): | |
l.append(['']*num) | |
return l | |
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
# ... | |
# Add 'haystack' to installed apps. | |
INSTALLED_APPS = ( | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.sites', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', |
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
django-admin.py startproject logviewer |
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
mkdir logviewer-stuff | |
cd logviewer-stuff | |
# Django installation | |
wget https://www.djangoproject.com/download/1.4.3/tarball/ | |
tar xvzf Django-1.4.3.tar.gz | |
cd Django-1.4.3 | |
python setup.py install | |
cd .. |