<commit_before>#!/bin/sh

#  startrecording.sh
#  Bugs
#
#  Created by <NAME> on 4/10/15.
#  Copyright (c) 2015 <NAME>. All rights reserved.

thisdir=$1 # $1 is the bundle resources path directly from the calling script file
serial=$2
adb=$thisdir/adb

chara=$($adb -s $serial shell getprop ro.build.characteristics)
if [[ $chara == *"watch"* ]]
then
echo "Recording from watch..."
$adb -s $serial shell screenrecord --o raw-frames /sdcard/screencapture.raw
else
echo "Recording from phone..."
#open .
$adb -s $serial shell screenrecord --bit-rate 2000000 --verbose --size 540x960 /sdcard/capture.mp4 > $1/reclog.txt
#$adb -s $serial shell screenrecord /sdcard/capture.mp4 > $1/reclog.txt
fi<commit_msg>Add support video in landscape<commit_after>#!/bin/sh

#  startrecording.sh
#  Bugs
#
#  Created by <NAME> on 4/10/15.
#  Copyright (c) 2015 <NAME>. All rights reserved.

thisdir=$1 # $1 is the bundle resources path directly from the calling script file
serial=$2
adb=$thisdir/adb

chara=$($adb -s $serial shell getprop ro.build.characteristics)
if [[ $chara == *"watch"* ]]
then
    echo "Recording from watch..."
    $adb -s $serial shell screenrecord --o raw-frames /sdcard/screencapture.raw
else
    echo "Recording from phone..."
    orientation=$(`$adb shell dumpsys input | grep 'SurfaceOrientation' | awk '{ print $2 }'`)
    if [ "$orientation" = "0" ] || [ "$orientation" = "2" ]
    then
        $adb -s $serial shell screenrecord --bit-rate 2000000 --verbose --size 540x960 /sdcard/capture.mp4 > $1/reclog.txt
    else
        $adb -s $serial shell screenrecord --bit-rate 2000000 --verbose --size 960x540 /sdcard/capture.mp4 > $1/reclog.txt
#$adb -s $serial shell screenrecord /sdcard/capture.mp4 > $1/reclog.txt
    fi
fi

{'fraction_non_alphanumeric': 0.14548591144335826, 'fraction_numerical': 0.04370327774583094, 'mean_word_length': 3.496124031007752, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 12, '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': '7233582', 'n_tokens_mistral': 658, 'n_tokens_neox': 605, 'n_words': 187}