<commit_before>#!/usr/bin/env python
# -*- coding:utf-8 -*-

__author__ = 'hanks'

from flask import Flask
from flask import send_from_directory
from flask import render_template
from ..models import FileInfo, FileUtil
from . import main

@main.route('/')
def index():
    apklist = FileUtil.get_files()
    print apklist
    return render_template('index.html', apklist=apklist)

@main.route('/login')
def login():
    return render_template('login.html')

@main.route('/edit/tableitem/<int:id>')
def update_tableitem(id):
    pass

@main.route('/apk/<path:filename>')
def download(filename):
    attachment_meta = AttachmentMeta(filename)
    if not attachment_meta:
        flask.abort(404)
    return send_from_directory(FileUtil.get_upload_path() ,filename=attachment_meta.filepath)<commit_msg>reset download method<commit_after>#!/usr/bin/env python
# -*- coding:utf-8 -*-

__author__ = 'hanks'

from flask import Flask
from flask import send_from_directory
from flask import render_template
from ..models import FileInfo, FileUtil
from . import main

@main.route('/')
def index():
    apklist = FileUtil.get_files()
    print apklist
    return render_template('index.html', apklist=apklist)

@main.route('/login')
def login():
    return render_template('login.html')

@main.route('/edit/tableitem/<int:id>')
def update_tableitem(id):
    pass

@main.route('/apk/<path:filename>')
def download(filename):
    if not filename:
        flask.abort(404)
    return send_from_directory(FileUtil.get_upload_path() ,filename=filename)
{'fraction_non_alphanumeric': 0.1328125, 'fraction_numerical': 0.005208333333333333, 'mean_word_length': 4.7565543071161045, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5584985', 'n_tokens_mistral': 508, 'n_tokens_neox': 490, 'n_words': 111}