<commit_before>#! /bin/bash
#
# Copyright (C) 2014 by <NAME> (Ed) Borasky
#
# This program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#

# make workspace
sudo rm -fr /gisdata/temp
sudo mkdir -p /gisdata/temp
sudo mkdir -p /gisdata/sql
sudo mkdir -p /gisdata/bash
sudo chown -R ${USER}:${USER} /gisdata

# copy the code to /gisdata
cp run-geocoder-scripts.bash /gisdata/bash
chmod +x /gisdata/bash/run-geocoder-scripts.bash
cp make-scripts.sql /gisdata/sql

# change owner to 'postgres' - the generated scripts have to run as 'postgres'
sudo chown -R postgres:postgres /gisdata<commit_msg>cleanup<commit_after>#! /bin/bash
#
# Copyright (C) 2014 by <NAME> (Ed) Borasky
#
# This program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#

# make workspace
sudo rm -fr /gisdata/temp
sudo mkdir -p /gisdata/temp
sudo mkdir -p /gisdata/sql
sudo mkdir -p /gisdata/bash
sudo chown -R ${USER}:${USER} /gisdata

# drop and re-create the geocoder database
./create-geocoder-database.bash

# copy the code to /gisdata
cp run-geocoder-scripts.bash /gisdata/bash
chmod +x /gisdata/bash/*.bash
cp make-scripts.sql /gisdata/sql

# change owner to 'postgres' - the generated scripts have to run as 'postgres'
sudo chown -R postgres:postgres /gisdata
{'fraction_non_alphanumeric': 0.10071154898741105, 'fraction_numerical': 0.007662835249042145, 'mean_word_length': 4.021978021978022, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4722959', 'n_tokens_mistral': 649, 'n_tokens_neox': 607, 'n_words': 230}