<commit_before>#!/usr/bin/env python
"""Various methods reused in main scripts"""

import os, sys, subprocess, multiprocessing, struct, numpy, math
import liblas
from osgeo import osr

PC_FILE_FORMATS = ['las','laz']
OCTTREE_NODE_NUM_CHILDREN = 8

DB_NAME = 'pc_extents'
DB_TABLE_RAW = 'extents_raw'
DB_TABLE_POTREE = 'extents_potree'

def shellExecute(command, showOutErr = False):
    """ Execute the command in the SHELL and shows both stdout and stderr"""
    print command
    (out,err) = subprocess.Popen(command, shell = True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
    r = '\n'.join((out,err))
    if showOutErr:
        print r
    return r

# Check the LAStools is installed and that it is in PATH before libLAS
if shellExecute('lasinfo -version').count('LAStools') == 0:
    raise Exception("LAStools is not found!. Please check that it is in PATH and that it is before libLAS")

def getUserName():<commit_msg>change default tables<commit_after>#!/usr/bin/env python
"""Various methods reused in main scripts"""

import os, sys, subprocess, multiprocessing, struct, numpy, math
import liblas
from osgeo import osr

PC_FILE_FORMATS = ['las','laz']
OCTTREE_NODE_NUM_CHILDREN = 8

DB_NAME = 'pc_extents'
DB_TABLE_RAW = 'extent_raw'
DB_TABLE_POTREE = 'extent_potree'

def shellExecute(command, showOutErr = False):
    """ Execute the command in the SHELL and shows both stdout and stderr"""
    print command
    (out,err) = subprocess.Popen(command, shell = True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
    r = '\n'.join((out,err))
    if showOutErr:
        print r
    return r

# Check the LAStools is installed and that it is in PATH before libLAS
if shellExecute('lasinfo -version').count('LAStools') == 0:
    raise Exception("LAStools is not found!. Please check that it is in PATH and that it is before libLAS")

def getUserName():
{'fraction_non_alphanumeric': 0.10665258711721225, 'fraction_numerical': 0.0021119324181626186, 'mean_word_length': 4.656716417910448, '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': '3047719', 'n_tokens_mistral': 639, 'n_tokens_neox': 612, 'n_words': 203}