Account Loop Ping
Script that adds time.
Script that get all the users on the system, sets their mins.
In [12]:
import os
import json
import socket
from TwitterFollowBot import TwitterBot
In [14]:
brobeurtw = TwitterBot('/home/wcmckee/github/wcmckee-notebook/config.txt')
In [15]:
brobeurtw.send_tweet()
Out[15]:
In [ ]:
In [ ]:
In [2]:
myhn = socket.gethostname()
In [3]:
myhn
Out[3]:
In [ ]:
In [4]:
lisho = os.listdir('/home')
In [5]:
lisho
Out[5]:
In [6]:
usertimdict = dict()
In [16]:
compdict = dict()
In [ ]:
In [18]:
for ish in lisho:
#usertimdict.update({ish : 0})
compdict.update({myhn : {ish : 0}})
In [19]:
compdict
Out[19]:
In [20]:
jstim = json.dumps(compdict)
In [21]:
jstim
Out[21]:
In [22]:
opus = open('/home/wcmckee/sellcoffee/hostnames/' + myhn, 'w')
opus.write(jstim)
opus.close()
In [ ]:
In [ ]: