<commit_before>'''
Created on Nov 10, 2013

@author: <NAME>
@email: mpillay [at] lbl [dot] gov
'''


from bottle import route, run, response, redirect, template, request, post, static_file
from os import listdir
import csv


host = 'localhost'
port = 8080
uploadLocation = '/home/pillay/Downloads/userUploads/'
baseUrl = 'http://%s:%s' % (host, port)


@route('/')
def home():
    linksList = []
    
    # Use of HTML is purposeful, to demonstrate that templates are not 
    # necessary for bottle
    linksList.append('<a href=%s/showUploads>Show uploaded files</a>' % baseUrl)
    linksList.append('<a href=%s/showCsvUploads>Show uploaded CSV files</a>' % baseUrl)
    linksList.append('<br>')
    linksList.append('<a href=%s/login>Login</a>' % baseUrl)
    linksList.append('<a href=%s/uploadFile>Upload File</a>' % baseUrl)
    linksList.append('<a href=%s/logout>Logout</a>' % baseUrl)
    linksList.append('<br>')
    linksList.append('<a href=%s/youtube>Click me</a>' % baseUrl)
    
    
    links = '<br>'.join(linksList)
    
    homepage = '''
           <h1>Python web development using the Bottle Framework</h1>
           <h2>Software Carpentry bootcamp at LBNL - 18 Nov, 2013</h2>
           <br><br><br><commit_msg>Filtering records by columns and/or rows, Login, Logout (Reusable functions)<commit_after>'''
Created on Nov 10, 2013

@author: <NAME>
@email: mpillay [at] lbl [dot] gov
'''


from bottle import route, run, response, redirect, template, request, post, static_file
from os import listdir
import csv


host = 'localhost'
port = 8080
uploadLocation = '/home/pillay/Downloads/userUploads/'
baseUrl = 'http://%s:%s' % (host, port)


@route('/')
def home():
    linksList = []
    
    # Use of HTML is purposeful, to demonstrate that templates are not 
    # necessary for bottle
    linksList.append('<b><u>Public Pages</b></u>')
    linksList.append('<a href=%s/showUploads>Show uploaded files</a>' % baseUrl)
    linksList.append('<a href=%s/showCsvUploads>Show uploaded CSV files</a>' % baseUrl)
    linksList.append('<br>')
    
    linksList.append('<b><u>Private Pages</b></u>')
    linksList.append('<a href=%s/login>Login</a>' % baseUrl)
    linksList.append('<a href=%s/uploadFile>Upload File</a>' % baseUrl)
    linksList.append('<a href=%s/logout>Logout</a>' % baseUrl)
    linksList.append('<br>')
    
    linksList.append('<b><u>Embedded Pages</b></u>')
    linksList.append('<a href=%s/youtube>Click me</a>' % baseUrl)
    
    
    links = '<br>'.join(linksList)
    
    homepage = '''
           <h1>Python web development using the Bottle Framework</h1>
           <h2>Software Carpentry bootcamp at LBNL - 18 Nov, 2013</h2>
           <br><br><br>
{'fraction_non_alphanumeric': 0.1631442343344457, 'fraction_numerical': 0.014831294030404153, 'mean_word_length': 3.6040955631399316, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '332157', 'n_tokens_mistral': 953, 'n_tokens_neox': 890, 'n_words': 224}