<commit_before>import functools
from flask import Flask, render_template, make_response, request, redirect, g, url_for
import requests
from functools import wraps
from flask import render_template

"""
The default_session is only used for testing purposes
Alternative: 11010001
"""
DEFAULT_SESSION = '34563456'

app = Flask(__name__)

def with_session(f):
	"""
	Decorator for checking sessionID
	- query string
	- cookie parameter
	- defualt_session for tests
	Example: http://127.0.0.1:5000/?sessionID=11010001
	"""
	@wraps(f)
	def decorated_function(*args, **kwargs):
		print request.args.get
		request.sessionID = None
		if request.args.get('sessionID'):
			print "Session is supplied as a query string"
			request.sessionID = int(request.args['sessionID'])
		elif 'sessionID' in request.cookies:
			print "Session is retrived from cookies"
			request.sessionID = request.cookies.get('sessionID')
		else:
			print "Session is default for testing"<commit_msg>possible print problem<commit_after>import functools
from flask import Flask, render_template, make_response, request, redirect, g, url_for
import requests
from functools import wraps
from flask import render_template

"""
The default_session is only used for testing purposes
Alternative: 11010001
"""
DEFAULT_SESSION = '34563456'

app = Flask(__name__)

def with_session(f):
	"""
	Decorator for checking sessionID
	- query string
	- cookie parameter
	- defualt_session for tests
	Example: http://127.0.0.1:5000/?sessionID=11010001
	"""
	@wraps(f)
	def decorated_function(*args, **kwargs):
		print (request.args.get)
		request.sessionID = None
		if request.args.get('sessionID'):
			print ("Session is supplied as a query string")
			request.sessionID = int(request.args['sessionID'])
		elif 'sessionID' in request.cookies:
			print ("Session is retrived from cookies")
			request.sessionID = request.cookies.get('sessionID')
		else:
			print ("Session is default for testing")
{'fraction_non_alphanumeric': 0.10108303249097472, 'fraction_numerical': 0.035069623517276945, 'mean_word_length': 5.081504702194358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6895797', 'n_tokens_mistral': 671, 'n_tokens_neox': 590, 'n_words': 181}