Skip to content

Instantly share code, notes, and snippets.

======== File1 ========
math|osman
phys|ayse,fatma
======== File2 ========
hasan|phys
huseyin|math
======== Output ========
math|osman,huseyin
import shelve
# Files to merged
FILE1 = '/tmp/file1'
FILE2 = '/tmp/file2'
# Shelve file
SHELVE = '/tmp/shelve'
# Open shelve file
import sys
import copy
def gen_emp_tree(num):
l = []
for i in range(4):
l.append(['']*num)
return l
# ...
# 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',
@denizeren
denizeren / create-django-project.sh
Created December 17, 2012 15:54
Creates Django project named logviewer
django-admin.py startproject logviewer
@denizeren
denizeren / install-django-haystack-elasticsearch.sh
Created December 17, 2012 15:48
Installs django, django-haystack and elasticsearch
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 ..