<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2020 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Breakpad """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function

import os
import sys
import stat
import subprocess

import qisys.sh
import qisys.archive
import qisys.command
from qisys import ui


def is_elf(filename):
    """ Check that a file is in the elf format. """
    with open(filename, "rb") as fp:
        data = fp.read(4)
    fp.close()
    return data == b'\x7fELF'

def is_macho(filename):
    """ Check that a file is in the Mach-O format. """
    with open(filename, "rb") as fp:
        data = fp.read(2)
    fp.close()
    return data == '\xcf\xfa'


def is_exe(filename):
    """ Check that a file is a Windows executable. """
    return filename.endswith((".exe", ".dll"))
<commit_msg>breakpad: Add missing blank line<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2020 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Breakpad """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function

import os
import sys
import stat
import subprocess

import qisys.sh
import qisys.archive
import qisys.command
from qisys import ui


def is_elf(filename):
    """ Check that a file is in the elf format. """
    with open(filename, "rb") as fp:
        data = fp.read(4)
    fp.close()
    return data == b'\x7fELF'


def is_macho(filename):
    """ Check that a file is in the Mach-O format. """
    with open(filename, "rb") as fp:
        data = fp.read(2)
    fp.close()
    return data == '\xcf\xfa'


def is_exe(filename):
    """ Check that a file is a Windows executable. """
    return filename.endswith((".exe", ".dll"))

{'fraction_non_alphanumeric': 0.11773547094188377, 'fraction_numerical': 0.012024048096192385, 'mean_word_length': 3.379385964912281, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '784592', 'n_tokens_mistral': 664, 'n_tokens_neox': 626, 'n_words': 234}