<commit_before>#!/usr/bin/env python

"""Program: SSH from Python
Programmer: <NAME>, Research Fellow, EPoD
Date created: August 28, 2017

Purpose: Establish SSH tunnel using python rather than bash
"""

import os
import subprocess

from write_to_gsheets_AGG import write_to_sheet

# Change to directory containing configuration files
os.chdir("C:/Users/mifryar/Documents/epodx")

# Establish ssh tunnel in background that auto-closes
# -f "fork into background", -F "use configuration file"
# -o ExistOnForwardFailure=yes "wait until connection and port
#   forwardings are set up before placing in background"
# sleep 10 "give python script 60 seconds to start using tunnel and<commit_msg>Manipulate pathnames in way that allows compatibility with Linux and Windows<commit_after>#!/usr/bin/env python

"""Program: SSH from Python
Programmer: <NAME>, Research Fellow, EPoD
Date created: August 28, 2017

Purpose: Establish SSH tunnel using python rather than bash
"""

import os
import subprocess

from write_to_gsheets_AGG import write_to_sheet

# Change to directory containing configuration files
home_dir = os.path.expanduser('~')
epodx_dir = os.path.join(home_dir, 'Documents/epodx')
dashboards_dir = os.path.join(home_dir, 'Documents/epodx-dashboards')
os.chdir(epodx_dir)

# Establish ssh tunnel in background that auto-closes
# -f "fork into background", -F "use configuration file"
# -o ExistOnForwardFailure=yes "wait until connection and port
#   forwardings are set up before placing in background"
# sleep 10 "give python script 60 seconds to start using tunnel and
{'fraction_non_alphanumeric': 0.0785307156428119, 'fraction_numerical': 0.01266624445851805, 'mean_word_length': 5.502057613168724, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2777120', 'n_tokens_mistral': 495, 'n_tokens_neox': 452, 'n_words': 181}