<commit_before>@echo off

REM move this to python script


SET DIR=%~dp0

SET FOUND_PYTHON_EXE=""
1>NUL 2>NUL CMD /c where python2
IF NOT ERRORLEVEL 1 (
   SET FOUND_PYTHON_EXE=python2
)

IF %FOUND_PYTHON_EXE% EQU "" (
   1>NUL 2>NUL CMD /c where python
   IF NOT ERRORLEVEL 1 (
      SET FOUND_PYTHON_EXE=python
   )
)

IF %FOUND_PYTHON_EXE% EQU "" (
  ECHO ERROR: no Python executable found on PATH.
  ECHO Make sure you can run 'python' or 'python2' in a Command Prompt.
  EXIT /b
)

SET "DIR=%DIR%\venv"
SET "DEACTIVATE=%DIR%\venv\Scripts\deactivate.bat"

IF "%1" == "setup" (
   IF NOT DEFINED DevEnvDir (
      CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
   )
   GOTO :setup
) ELSE (
       CALL "%DIR%\Scripts\activate.bat"
       python ers.py %*
       CALL "%DIR%\Scripts\deactivate.bat"
       EXIT /b %ERRORLEVEL%
       GOTO :eof
)

:setup
1>NUL 2>NUL CMD /c where virtualenv
IF ERRORLEVEL 1 (
   ECHO ERROR: virtualenv not installed.
   EXIT /b 1
)

IF NOT EXIST "%DIR%" (
       virtualenv venv
       PUSHD venv\Scripts
       CALL activate
       pip install click
       pip install wget
       POPD
)

git submodule init
git submodule update

python ers.py cef

CALL venv\Scripts\deactivate.bat

IF NOT EXIST "build\bin" (
   ECHO Creating build\bin
   mkdir build\bin
)

IF NOT EXIST "build\bin\Debug" (
   ECHO Creating build\bin\Debug
   mkdir build\bin\Debug
)

IF NOT EXIST "build\bin\Release" (
   ECHO Creating build\bin\Release
   mkdir build\bin\Release
)

cd client
pwd
npm install
pwd
cd ..
pwd

pushd libs\cef_binary_3.2704.1414.g185cd6c_windows64\Debug<commit_msg>Forgot to remove npm install code from ers.bat<commit_after>@echo off

REM move this to python script


SET DIR=%~dp0

SET FOUND_PYTHON_EXE=""
1>NUL 2>NUL CMD /c where python2
IF NOT ERRORLEVEL 1 (
   SET FOUND_PYTHON_EXE=python2
)

IF %FOUND_PYTHON_EXE% EQU "" (
   1>NUL 2>NUL CMD /c where python
   IF NOT ERRORLEVEL 1 (
      SET FOUND_PYTHON_EXE=python
   )
)

IF %FOUND_PYTHON_EXE% EQU "" (
  ECHO ERROR: no Python executable found on PATH.
  ECHO Make sure you can run 'python' or 'python2' in a Command Prompt.
  EXIT /b
)

SET "DIR=%DIR%\venv"
SET "DEACTIVATE=%DIR%\venv\Scripts\deactivate.bat"

IF "%1" == "setup" (
   IF NOT DEFINED DevEnvDir (
      CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
   )
   GOTO :setup
) ELSE (
       CALL "%DIR%\Scripts\activate.bat"
       python ers.py %*
       CALL "%DIR%\Scripts\deactivate.bat"
       EXIT /b %ERRORLEVEL%
       GOTO :eof
)

:setup
1>NUL 2>NUL CMD /c where virtualenv
IF ERRORLEVEL 1 (
   ECHO ERROR: virtualenv not installed.
   EXIT /b 1
)

IF NOT EXIST "%DIR%" (
       virtualenv venv
       PUSHD venv\Scripts
       CALL activate
       pip install click
       pip install wget
       POPD
)

git submodule init
git submodule update

python ers.py cef

CALL venv\Scripts\deactivate.bat

IF NOT EXIST "build\bin" (
   ECHO Creating build\bin
   mkdir build\bin
)

IF NOT EXIST "build\bin\Debug" (
   ECHO Creating build\bin\Debug
   mkdir build\bin\Debug
)

IF NOT EXIST "build\bin\Release" (
   ECHO Creating build\bin\Release
   mkdir build\bin\Release
)

pushd libs\cef_binary_3.2704.1414.g185cd6c_windows64\Debug
{'fraction_non_alphanumeric': 0.09636699507389163, 'fraction_numerical': 0.021551724137931036, 'mean_word_length': 2.881720430107527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1381171', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1234, 'n_words': 358}