Hack BroBeur
python script to make account at centre for logins.
In [7]:
from github import Github
import os
import getpass
import git
import time
from clint.textui import colored
import dominate
from dominate.tags import *
import envoy
In [8]:
zeuser = getpass.getuser()
In [9]:
g = Github(zeuser, 'cancer123now!')
In [9]:
In [10]:
gitlist = []
In [11]:
searchpy = g.search_repositories(zeuser)
In [12]:
for pya in searchpy:
print pya.full_name
wcm = pya.full_name
In [ ]:
for repo in g.get_user('wcmckee').get_repos():
gitlist.append(repo.name)
In [ ]:
os.mkdir('/home/wcmckee/github')
In [13]:
lisdir = os.listdir('/home/wcmckee/github/')
In [14]:
lisdir
Out[14]:
In [15]:
curlis = []
In [16]:
for lis in lisdir:
curlis.append(ls)
In [17]:
dlrepo = list(set(gitlist) - set(curlis))
In [18]:
print dlrepo
In [19]:
wafi = time.sleep(5)
In [21]:
import sh
In [22]:
import git
repo = git.Repo( '/home/wcmckee/learnpython' )
print repo.git.status()
In [23]:
assert repo.bare == False
In [24]:
ycmds = ['git', 'clone', ']
In [25]:
%%bash
df
In [110]:
pwd
Out[110]:
In [ ]:
import git
os.chdir()
In [26]:
for gitbl in dlrepo:
print (colored.red('Downloading - ' + (colored.blue('wcmckee') + ' - ' + gitbl)))
#git.Git().clone("https://github.com/wcmckee/" + gitbl)
envoy.run('git clone https://github.com/wcmckee/' + gitbl )
t = envoy.run('df')
t.std_out
print ('Download complete. Waiting 5 secs till the next')
wafi
In [104]:
from paramiko import SSHClient
from scp import SCPClient
ssh = SSHClient()
ssh.load_system_host_keys()
ssh.connect('example.com')
In [27]:
import subprocess
In [27]:
In [28]:
%%bash
source `dirname $0`/github-config.sh
In [28]:
In [29]:
cmdrun = ['sudo', 'pip', 'install', 'paramiko']
In [30]:
supi = envoy.run(cmdrun)
In [ ]:
insvn = subprocess.check_output(cmdrun)
In [31]:
newlis = []
In [32]:
for repoz in g.get_user('wcmckee').get_repos():
newlis.append(repo.name)
In [33]:
gitlist
Out[33]:
In [34]:
ls
In [35]:
cd brobeur-web/
In [36]:
minex = open(')
In [37]:
indop = open('index.html', 'r')
In [37]:
In [38]:
indop.read()
Out[38]:
In [42]:
from paramiko import SSHClient
from scp import SCPClient
ssh = SSHClient()
ssh.load_system_host_keys()
ssh.connect('example.com')
In [43]:
import envoy
In [44]:
import clon
In [44]:
In [ ]: