<commit_before>import os
import io
import csv
from bson import ObjectId
# import time

from django.http import HttpRequest
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User

# from gnowsys_ndf.settings import GSTUDIO_LOGS_DIR_PATH
from gnowsys_ndf.ndf.models import *
from gnowsys_ndf.ndf.views.filehive import *
from gnowsys_ndf.ndf.views.methods import create_grelation

# if not os.path.isdir(GSTUDIO_LOGS_DIR_PATH):
# 	os.makedirs(GSTUDIO_LOGS_DIR_PATH)

warehouse_grp = node_collection.one({'_type': "Group", 'name': "warehouse"})
file_gst = node_collection.one({'_type': "GSystemType", 'name': "File"})
has_profile_pic_rt = node_collection.one({'_type': 'RelationType', 'name': unicode('has_profile_pic') })
auth_gst = node_collection.one({'_type': u'GSystemType', 'name': u'Author'})
auth_gst_id = auth_gst._id

# csv_log_file_name = 'user_details-' + str(time.strftime("%d-%b-%Y-%Hh-%Mm-%Ss")) + '.csv'
# csv_log_file = os.path.join(GSTUDIO_LOGS_DIR_PATH, csv_log_file_name)
# # To hold intermediate logs/errors
# csv_log_list = []

user_icons_dir_path = '/home/docker/code/display-pics/'


class Command(BaseCommand):
    help = "\n\tFor saving data in gstudio DB from NROER schema files. This will create 'File' type GSystem instances.\n\tCSV file condition: The first row should contain DB names.\n"
<commit_msg>Added help text for 'sync_users' script<commit_after>import os
import io
import csv
from bson import ObjectId
# import time

from django.http import HttpRequest
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User

# from gnowsys_ndf.settings import GSTUDIO_LOGS_DIR_PATH
from gnowsys_ndf.ndf.models import *
from gnowsys_ndf.ndf.views.filehive import *
from gnowsys_ndf.ndf.views.methods import create_grelation

# if not os.path.isdir(GSTUDIO_LOGS_DIR_PATH):
# 	os.makedirs(GSTUDIO_LOGS_DIR_PATH)

warehouse_grp = node_collection.one({'_type': "Group", 'name': "warehouse"})
file_gst = node_collection.one({'_type': "GSystemType", 'name': "File"})
has_profile_pic_rt = node_collection.one({'_type': 'RelationType', 'name': unicode('has_profile_pic') })
auth_gst = node_collection.one({'_type': u'GSystemType', 'name': u'Author'})
auth_gst_id = auth_gst._id

# csv_log_file_name = 'user_details-' + str(time.strftime("%d-%b-%Y-%Hh-%Mm-%Ss")) + '.csv'
# csv_log_file = os.path.join(GSTUDIO_LOGS_DIR_PATH, csv_log_file_name)
# # To hold intermediate logs/errors
# csv_log_list = []

user_icons_dir_path = '/home/docker/code/display-pics/'


class Command(BaseCommand):
    help = "Creating user, author and attaching profile pics from CSV's.\n\t- CSV file schema: user_id, school_code, username, password, oid\n\t- CSV file-name-path needs to be passed either as argument or can be passed on demand/asked by script.\n\t- Please keep user-display-pics folder at following location:\n\t\t/home/docker/code/display-pics/"

{'fraction_non_alphanumeric': 0.12627986348122866, 'fraction_numerical': 0.0, 'mean_word_length': 5.880281690140845, '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': '4668483', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1040, 'n_words': 234}