<commit_before># coding=utf-8
"""
Every project needs its trash heap of miscellaneous functions and classes

Copyright 2015 BlazeMeter Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

import csv
import itertools
import json
import logging
import mimetypes
import os
import platform
import random
import re
import shlex
import signal
import socket
import subprocess
import sys
import tempfile
import time
import webbrowser
import zipfile
from _csv import Error
from abc import abstractmethod
from collections import defaultdict, Counter
from subprocess import PIPE
from webbrowser import GenericBrowser
import psutil
from progressbar import ProgressBar, Percentage, Bar, ETA
from psutil import Popen
from urwid import BaseScreen
from bzt.six import string_types, iteritems, viewvalues, binary_type, text_type, b, integer_types, request, file_type


def run_once(func):
    """
    A decorator to run function only once

    :type func: __builtin__.function
    :return:<commit_msg>reformat<commit_after># coding=utf-8
"""
Every project needs its trash heap of miscellaneous functions and classes

Copyright 2015 BlazeMeter Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

import csv
import itertools
import json
import logging
import mimetypes
import os
import platform
import random
import re
import shlex
import signal
import socket
import subprocess
import sys
import tempfile
import time
import webbrowser
import zipfile
from abc import abstractmethod
from collections import defaultdict, Counter
from subprocess import PIPE
from webbrowser import GenericBrowser

import psutil
from progressbar import ProgressBar, Percentage, Bar, ETA
from psutil import Popen
from urwid import BaseScreen

from bzt.six import string_types, iteritems, viewvalues, binary_type, text_type, b, integer_types, request, file_type


def run_once(func):
    """
    A decorator to run function only once

    :type func: __builtin__.function
    :return:
{'fraction_non_alphanumeric': 0.04201101928374656, 'fraction_numerical': 0.006198347107438017, 'mean_word_length': 5.090146750524109, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7337394', 'n_tokens_mistral': 764, 'n_tokens_neox': 731, 'n_words': 383}