<commit_before>#!/usr/bin/env python

# -*- coding: utf-8 -*-
# This file is part of MaliceIO - https://github.com/malice-plugins/pdf
# See the file 'LICENSE' for copying permission.

__description__ = 'Malice PDF Plugin'
__author__ = 'blacktop - <https://github.com/blacktop>'
__version__ = '0.1.0'
__date__ = '2018/01/29'

import hashlib
import json
import logging
import os
from flask import Flask, request, redirect, abort, url_for, jsonify
from werkzeug.utils import secure_filename
# import re
# import sys
# import tempfile
# import unicodedata

import click
from jinja2 import BaseLoader, Environment

from elastic import Elastic
from pdfid import pdfid
# from pdfparser import pdf_parser

log = logging.getLogger(__name__)


class PDF(object):<commit_msg>fix imports<commit_after>#!/usr/bin/env python

# -*- coding: utf-8 -*-
# This file is part of MaliceIO - https://github.com/malice-plugins/pdf
# See the file 'LICENSE' for copying permission.

__description__ = 'Malice PDF Plugin'
__author__ = 'blacktop - <https://github.com/blacktop>'
__version__ = '0.1.0'
__date__ = '2018/01/29'

import hashlib
import json
import logging
import os

import click

from elastic import Elastic
from flask import Flask, abort, jsonify, redirect, request, url_for
from jinja2 import BaseLoader, Environment
from pdfid import pdfid
from pdfparser import pdf_parser
from werkzeug.utils import secure_filename

log = logging.getLogger(__name__)


class PDF(object):
{'fraction_non_alphanumeric': 0.09657534246575343, 'fraction_numerical': 0.01780821917808219, 'mean_word_length': 4.774703557312253, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '5844758', 'n_tokens_mistral': 475, 'n_tokens_neox': 452, 'n_words': 154}