<jupyter_start><jupyter_text>wcUsersDataScript to get users logged into the system.Saves the output of users as the hostname of the system.Convert to a dict and json object, merging with other hostname output.Runs script every min and if user is found then - time from their account File with, usernames, time remaining on user.time file is a json object.{'username' : 'wcmckee', 'time' : 320 }time is amount of time left on account.script to check this object and if 0 - lock account. ELSE, allow login. Script to add time to acoun,, auto add time to certain groups/user a day. username 45<jupyter_code>import os
import socket
import json
usertimedict = dict()
lisho = os.listdir('/home')
for ish in lisho:
    usertimedict.update({ish : 0})
usertimedict
addtime = (raw_input('add how much time: '))
#letim = len(addtime)
letim
addtime
type(addtime)
intime = int(addtime)
for ish in lisho:
    usertimedict.update({ish : intime})
usertimedict
opus = open('/home/wcmckee/sellcoffee/hostnames', 'w')
opus
myhn = socket.gethostname()
myhn
osscm = ('users > ' + myhn + '.txt')
osscm
os.chdir('/home/wcmckee/sellcoffee/')
os.system(osscm)
ophos = open('/home/wcmckee/sellcoffee/' + myhn + '.txt')
ophos.read()
ophos.close()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11128903122497999, 'fraction_numerical': 0.005604483586869495, 'mean_word_length': 4.868544600938967, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '68230', 'license': 'MIT', 'n_tokens_mistral': 444, 'n_tokens_neox': 429, 'n_words': 148, 'path': '.ipynb_checkpoints/wcusersdata-checkpoint.ipynb', 'repo_name': 'wcmckee/signinlca', 'size': '1249'}