<commit_before># -*- coding: utf-8 -*-
__author__ = 'joko'

"""
@author:joko
@time: 16/11/8 下午2:52
"""

import os
import Utils as U
import adbUtils
import random


class minicap():
    def __init__(self, device):
        self.adb = adbUtils.ADB(device)
        ini = U.ConfigIni()
        self.minicap_path = ini.get_ini(
            'minicap', 'minicap_path').format(
            self.adb.get_cpu_version())
        self.minitouch_path = ini.get_ini(
            'minicap', 'minitouch_path').format(
            self.adb.get_cpu_version())
        self.minicapSO_path = ini.get_ini(
            'minicap', 'minicapSO_path').format(
            self.adb.get_sdk_version(), self.adb.get_cpu_version())

    def push_minicap(self):
        U.Logging.info('pushCpu_minicap:' + self.minicap_path)
        self.adb.adb('push %s /data/local/tmp' % self.minicap_path)

    def push_minicaptouch(self):
        U.Logging.info('pushtouch_minitouch:' + self.minitouch_path)
        self.adb.shell('chmod 777 /data/local/tmp/minitouch')

    def push_minicapSO(self):
        U.Logging.info('pushsdk_minicap.so:' + self.minicapSO_path)
        self.adb.adb('push %s /data/local/tmp' % self.minicapSO_path)
        self.adb.shell('chmod 777 /data/local/tmp/minicap')

    def check_minicap(self):
        width = None
        height = None
        for i in self.adb.shell(
                "'LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -i'").stdout.readlines():
            if 'secure' in i and 'true' in i:
                U.Logging.info('pushsdk:success')
            elif 'width' in i:
                width = i.strip().split(':')[1].strip().split(',')[0]
            elif 'height' in i:
                height = i.strip().split(':')[1].strip().split(',')[0]

        if width is not None:
            return width, height<commit_msg>fix log<commit_after># -*- coding: utf-8 -*-
__author__ = 'joko'

"""
@author:joko
@time: 16/11/8 下午2:52
"""

import os
import Utils as U
import adbUtils
import random


class minicap():
    def __init__(self, device):
        self.adb = adbUtils.ADB(device)
        ini = U.ConfigIni()
        self.minicap_path = ini.get_ini(
            'minicap', 'minicap_path').format(
            self.adb.get_cpu_version())
        self.minitouch_path = ini.get_ini(
            'minicap', 'minitouch_path').format(
            self.adb.get_cpu_version())
        self.minicapSO_path = ini.get_ini(
            'minicap', 'minicapSO_path').format(
            self.adb.get_sdk_version(), self.adb.get_cpu_version())

    def push_minicap(self):
        U.Logging.info('push_Cpu_minicap:' + self.minicap_path)
        self.adb.adb('push %s /data/local/tmp' % self.minicap_path)

    def push_minicaptouch(self):
        U.Logging.info('push_touch_minitouch:' + self.minitouch_path)
        self.adb.shell('chmod 777 /data/local/tmp/minitouch')

    def push_minicapSO(self):
        U.Logging.info('push_sdk_minicap.so:' + self.minicapSO_path)
        self.adb.adb('push %s /data/local/tmp' % self.minicapSO_path)
        self.adb.shell('chmod 777 /data/local/tmp/minicap')

    def check_minicap(self):
        width = None
        height = None
        for i in self.adb.shell(
                "'LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -i'").stdout.readlines():
            if 'secure' in i and 'true' in i:
                U.Logging.info('push_minicap_sdk:success')
            elif 'width' in i:
                width = i.strip().split(':')[1].strip().split(',')[0]
            elif 'height' in i:
                height = i.strip().split(':')[1].strip().split(',')[0]

        if width is not None:
            return width, height
{'fraction_non_alphanumeric': 0.14899401848830887, 'fraction_numerical': 0.010331702011963024, 'mean_word_length': 2.3144144144144145, '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': '1308206', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1317, 'n_words': 224}