This file contains hidden or 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
#___________myproject/settings.py__________ | |
INSTALLED_APPS = [ | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
'anotherapp', | |
'activitystream' |
This file contains hidden or 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 glob | |
import os, time | |
time_and_file=dict() | |
folder_name=raw_input() | |
ct=1 | |
#assuming folder at the same directory as script | |
for filename in glob.glob(folder_name+"/*.*"): | |
name=filename.split('.')[0] | |
try: |
This file contains hidden or 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
# -*- coding: UTF-8 -*- | |
def upside_down(inp): | |
#print upside-down of a given alphabetic string | |
rev_dict = {'z': u'z', 'y': u'ʎ', 'x': u'x', | |
'w': u'ʍ', 'v': u'ʌ', 'u': u'n', | |
't': u'ʇ', 's': u's', 'r': u'ɹ', | |
'q': u'b', 'p': u'd', 'o': u'o', | |
'n': u'u', 'm': u'ɯ', 'l': u'\u0285', | |
'k': u'ʞ', 'j': u'ɾ', 'i': u'ᴉ', |
This file contains hidden or 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 itertools | |
def all_perm(word): | |
# prints all permutation to a given word | |
for p in list(itertools.permutations(word)): | |
print ''.join(p) | |
all_perm("abcde") |
NewerOlder