<commit_before>#!/bin/sh

# Copyright (C) 2014 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.

# mbed devices are detected ass mass storage devices. To upload
# a new firmware, simply copy your binary onto this device and
# press the reset button.
#
# Under Ubuntu/Mint the default mount-point is /media/$(USER)/MBED
#
# NOTE: You have to manually press the boards RESET button after
#       flashing
#
# @author <NAME> <hauke.petersen@fu-berlin.de>
# @author <NAME> <oliver.hahm@inria.fr>

OS=`uname`
DID_MOUNT=false

BINFILE=$1

# set the mount path depending on the OS
if [ ${OS} = "Linux" ]
then
    MOUNT=/media/$USER/MBED
elif [ ${OS} = "Darwin" ]
then
    MOUNT=/Volumes/MBED
else
    echo ""
    echo "ERROR: No mount point defined for your OS"
    echo "Please copy the binary manually to your MBED device"
    echo ""
    exit
fi

# check if device was mounted
mount | grep ${MOUNT} > /dev/null
if [ $? -eq 1 ]
then
    mount ${MOUNT}
    if [ $? -eq 1 ]
    then
        echo ""
        echo "ERROR: could not mount your MBED device"
        echo ""
        exit
    else
        DID_MOUNT=true
    fi
fi

# remove old binary
rm -f ${MOUNT}/*.bin
# copy new binary to device
cp ${BINFILE} ${MOUNT}
# make sure hexfile was written
sync

# unmount the device if we have manually mounted it before
if [ ${DID_MOUNT} = true ]
then
    umount ${MOUNT}
fi

echo ""
echo "UPLOAD SUCCESFUL"<commit_msg>boards/mbed_lpc1768: fix file format documentation in flash<commit_after>#!/bin/sh

# Copyright (C) 2014 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.

# mbed devices are detected ass mass storage devices. To upload
# a new firmware, simply copy your binary onto this device and
# press the reset button.
#
# Under Ubuntu/Mint the default mount-point is /media/$(USER)/MBED
#
# NOTE: You have to manually press the boards RESET button after
#       flashing
#
# @author <NAME> <<EMAIL>>
# @author <NAME> <<EMAIL>>

OS=`uname`
DID_MOUNT=false

BINFILE=$1

# set the mount path depending on the OS
if [ ${OS} = "Linux" ]
then
    MOUNT=/media/$USER/MBED
elif [ ${OS} = "Darwin" ]
then
    MOUNT=/Volumes/MBED
else
    echo ""
    echo "ERROR: No mount point defined for your OS"
    echo "Please copy the binary manually to your MBED device"
    echo ""
    exit
fi

# check if device was mounted
mount | grep ${MOUNT} > /dev/null
if [ $? -eq 1 ]
then
    mount ${MOUNT}
    if [ $? -eq 1 ]
    then
        echo ""
        echo "ERROR: could not mount your MBED device"
        echo ""
        exit
    else
        DID_MOUNT=true
    fi
fi

# remove old binary
rm -f ${MOUNT}/*.bin
# copy new binary to device
cp ${BINFILE} ${MOUNT}
# make sure binary was written
sync

# unmount the device if we have manually mounted it before
if [ ${DID_MOUNT} = true ]
then
    umount ${MOUNT}
fi

echo ""
echo "UPLOAD SUCCESFUL"
{'fraction_non_alphanumeric': 0.09974342527261065, 'fraction_numerical': 0.007055805003207184, 'mean_word_length': 3.034928848641656, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2626440', 'n_tokens_mistral': 1048, 'n_tokens_neox': 1017, 'n_words': 417}