<jupyter_start><jupyter_text>KSO Tutorials 1: Check and update csv filesWritten by @jannesgg and @vykantonLast updated: May 11th, 2022  Set up and requirements Import Python packages<jupyter_code>%load_ext autoreload
%autoreload 2

# Set the directory of the libraries
import sys
sys.path.append('..')

# Set to display dataframes as interactive tables
from itables import init_notebook_mode
init_notebook_mode(all_interactive=True)

# Import required modules
import kso_utils.tutorials_utils as t_utils
import kso_utils.project_utils as p_utils
import kso_utils.server_utils as serv_utils
import kso_utils.t1_utils as t1
import kso_utils.t2_utils as t2

print("Packages loaded successfully")<jupyter_output><empty_output><jupyter_text>Choose your project<jupyter_code>project_name = t_utils.choose_project()
# Get project specific info
project = p_utils.find_project(project_name=project_name.value)
db_path, project_name, server_i_dict, db_initial_info = t_utils.get_project_details(project)<jupyter_output><empty_output><jupyter_text>Check the sites_csv<jupyter_code>sites_df_sheet = t1.open_sites_csv(db_initial_info)
sites_df_sheet
t1.check_sites_database(db_initial_info, sites_df_sheet, project)<jupyter_output><empty_output><jupyter_text>Check the movies_csv<jupyter_code>t1.check_movies_csv(db_info_dict, project)<jupyter_output><empty_output><jupyter_text>Check all movies in server are captured in movies_csv  Merge go_pro files<jupyter_code>project = p_utils.find_project(project_name=project_name.value)
db_info_dict = t_utils.initiate_db(project)
missing_from_server, missing_from_csv = t1.check_movies_from_server(db_info_dict, project)
deployment_selected = t1.select_deployment(missing_from_csv)
event_date = t1.select_eventdate()
t1.update_new_deployments(deployment_selected, db_info_dict, event_date)
#END<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07169811320754717, 'fraction_numerical': 0.010242587601078167, 'mean_word_length': 10.248484848484848, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '559658', 'license': 'MIT', 'n_tokens_mistral': 664, 'n_tokens_neox': 642, 'n_words': 123, 'path': 'tutorials/1_Check_and_update_csv_files.ipynb', 'repo_name': 'ocean-data-factory-sweden/koster_zooniverse', 'size': '1855'}