<commit_before>import functools
import hashlib
import json
import os
import re
import urllib
import urlparse

import jinja2
import markdown
import webapp2
import wtforms
from wtforms.fields.html5 import IntegerField
from wtforms.widgets.html5 import URLInput

from google.appengine.api import memcache
from google.appengine.api import urlfetch
from google.appengine.ext import db

import config_NOCOMMIT

JINJA = jinja2.Environment(
  loader=jinja2.FileSystemLoader('templates/'),
  extensions=['jinja2.ext.autoescape'],
  autoescape=True)
JINJA.filters["urlencode"] = urllib.quote_plus

YOUTUBE_ID_VALIDATOR = re.compile(r'^[\w\-]+$')
INVALID_SLUG_CHARS = re.compile(r'[^\w-]')
MULTIDASH_RE = re.compile(r'-+')
SLUG_TOKEN_AMOUNT = 2

DEFAULT_TITLE = "Team Awesome"

DEFAULT_DESC = u"""\
## A word from {title}:

Giving money to a super PAC is one of the last things I thought I'd ever \
do... but I just did.<commit_msg>don't use quote_plus for urlencode filtering<commit_after>import functools
import hashlib
import json
import os
import re
import urllib
import urlparse

import jinja2
import markdown
import webapp2
import wtforms
from wtforms.fields.html5 import IntegerField
from wtforms.widgets.html5 import URLInput

from google.appengine.api import memcache
from google.appengine.api import urlfetch
from google.appengine.ext import db

import config_NOCOMMIT

JINJA = jinja2.Environment(
  loader=jinja2.FileSystemLoader('templates/'),
  extensions=['jinja2.ext.autoescape'],
  autoescape=True)
JINJA.filters["urlencode"] = lambda s: urllib.quote(s, safe="")

YOUTUBE_ID_VALIDATOR = re.compile(r'^[\w\-]+$')
INVALID_SLUG_CHARS = re.compile(r'[^\w-]')
MULTIDASH_RE = re.compile(r'-+')
SLUG_TOKEN_AMOUNT = 2

DEFAULT_TITLE = "Team Awesome"

DEFAULT_DESC = u"""\
## A word from {title}:

Giving money to a super PAC is one of the last things I thought I'd ever \
do... but I just did.
{'fraction_non_alphanumeric': 0.1037037037037037, 'fraction_numerical': 0.008465608465608466, 'mean_word_length': 5.367003367003367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '384492', 'n_tokens_mistral': 678, 'n_tokens_neox': 649, 'n_words': 185}