Skip to content

Instantly share code, notes, and snippets.

<Location />
SetHandler /path/to/umoja.wsgi
</Location>
ids = ['4153869960',
'4160152863',
'4165131655',
'4164906099',
'4165892330',
'4165146115']
import urllib
import json
In [1]: '' in 'abc'
Out[1]: True
In [2]: [] in [1, 2, 3,] #If empty sequence in sequence is True, why is this false?
Out[2]: False
In [3]: '' in [1, 2, 3,]
Out[3]: False
In [4]: x = 'abc'
# lint Python modules using external checkers.
#
# This is the main checker controlling the other ones and the reports
# generation. It is itself both a raw checker and an astng checker in order
# to:
# * handle message activation / deactivation at the module level
# * handle some basic but necessary stats'data (number of classes, methods...)
#
[MASTER]
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# Feel free to rename the models, but don't rename db_table values or field names.
#
# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]'
# into your database.
from django.db import models
import random
class Markov(object):
def __init__(self, open_file):
self.cache = {}
self.open_file = open_file
self.words = self.file_to_words()
self.word_size = len(self.words)
self.database()