def Logare(): usr = chrome.find_element_by_id('user') while usr==[]: usr = chrome.find_element_by_id('user') # chrome.support.expected_conditions.visibility_of(usr) pas = chrome.find_element_by_id('password') but = chrome.find_element_by_link_text('Logare') usr.send_keys('iggprt') pas.send_keys('ElilasCC') but.click() but2 = [] while but2 == []: print (but2) try: but2 = chrome.find_element_by_link_text('Lumea 64') except: pass but2.click() time.slepp(1) but.click() while(): but2 = chrome.f print ('DONE')
def yMove(gpage, yVal): if (gpage.coord.y < yVal): while gpage.coord.y < yVal: gpage.move(0, MOVE_STEP) time.sleep(TIME_SLEEP) else: while gpage.coord.y > yVal: gpage.move(0, -MOVE_STEP) time.slepp(TIME_SLEEP)
def main(): if platform.system == 'Windows': os.system('cls') else: os.system('clear') Music = input( 'Please enter the name of the singer or song or country you are looking for:\nEnter:' ) time.slepp(2) print('processing...\n') if os.path.isdir('Music/{}'.format(Music)): pass else: os.mkdir('Music/{}'.format(Music)) Download_Music(Music)
def insert2db(conn, cid, bno, name, href, img, listprice, saleprice): try: bud = SqlQueryBuilder() bud.set_table(BOOK_TAB) bud.add_field('book_no', bno, 's') bud.add_field('book_name', name, 's') bud.add_field('cate', cid, 'i') bud.add_field('create_time', 'now()', '') bud.add_field('url', href, 's') bud.add_field('image_list', img, 's') bud.add_field('listprice', listprice, 'f') bud.add_field('saleprice', saleprice, 'f') sql = bud.get_insert() print sql print '-------------------------' conn.execute(sql) except Exception as e: print e time.slepp(3)
def test_auth(self): # Подключить webdriver Firefox br = webdriver.Firefox() # Перейти на главную страницу, получив адрес сервера 'localhost:8081' и полный URL br.get('%%' % (self.live_server_url, '/')) # Перейти по ссылке регистрации br.find_element_by_xpath('//a[@href="/register/"]').click() # Подождать 3 секунды time.sleep(3) # Регистрация пользователя # Найти поле username и указать значение 'new' br.find_element_by_id('username').send_keys('new') # Найти поле email и указать значение '*****@*****.**' br.find_element_by_id('email').send_keys('*****@*****.**') # Указать пароль в 2-ух полях br.find_element_by_id('password1').send_keys('12345678user') br.find_element_by_id('password2').send_keys('12345678user') # Перейти по ссылке регистрации br.find_element_by_id('btn_register').click() # Активизировать пользователя в тестовой БД pis = Myuser.objects.get(username='******') # Поставить признак пользователя - Активен pis.is_active = True # Сохранить в БД pis.save() # Перейти на домашнюю страницу br.find_element_by_xpath('//a[@href="/"]').click() # Подождать 3 секунды time.slepp(3) # Войти под зарегистрированным пользователем br.find_element_by_id('username').send_keys('new') br.find_element_by_id('password').send_keys('12345678') br.find_element_by_name('Вход').click() # Проверить наличие имени авторизованного пользователя в соответствующем теге assert br.find_element_by_xpath('//a[@data-content="Личный кабинет"]').text == 'new' # Отключить вебдрайвер, закрыть браузер br.quit()
def OnRecognition(self, StreamNumber, StreamPosition, RecognitionType, Result): newResult = win32com.client.Dispatch(Result) print('说:', newResult.PhraseInfo.GetText()) s =newResult.PhraseInfo.GetText() if s == '上': win32api.keybd_event(38, 0, 0, 0) #上键-39 time.slepp(1) win32api.keybd_event(38, 0, win32con.KEYEVENTF_KEYUP, 0) print('shang') elif s == '下': win32api.keybd_event(40, 0, 0, 0) #下键-40 time.slepp(1) win32api.keybd_event(40, 0, win32con.KEYEVENTF_KEYUP, 0) print('xia') elif s == '左': win32api.keybd_event(37, 0, 0, 0) #左键-37 time.slepp(1) win32api.keybd_event(37, 0, win32con.KEYEVENTF_KEYUP, 0) print('zuo') elif s == '右': win32api.keybd_event(39, 0, 0, 0) #右键-39 time.slepp(1) win32api.keybd_event(39, 0, win32con.KEYEVENTF_KEYUP, 0) print('you')
┃━┫┃┃┏┫━┫┏┓ ┃┏┫┃┃┗┫┃┃┃┃ ┗┛┗━┻━┻┻┛┃┃ ┏┳┳━┳┳┳┓┏┫┣┳┓ ┃┃┃┃┃┃┃┃┣┻┫┃┃ ┣┓┃┃┃┃┣┫┃┏┻┻┫ ┗━┻━┻━┻ " print " ====================" print " RED DEVIL " print "=====================" print " AUTHOR : TAUFIQ X " print " TEAM : RED DEVIL OFF " print " MEMBER : TAUFIQ X ,LUCKY,RISKY,BANDIT,PANGLIMA " print "============================================ " print time.slepp(1) print " [+] PILIHAN TOOLS [+] " print " [1] CREATE VIRUS " print " [2] DDOS ATTACK " print " [3] SCRIPT DEFACE " print " [4] TROJAN " print " [5] BRUTE FORCE " print " [6[ RANSOMEWARE " print " [7] DARK FB " print " [8] SCAN IP WEB " print " [9] LACAK IP " print " [10] INSTALL BAHAN DULU GAN BIAR WORK" time.sleep(1) pilih = raw_input( ' [?] PILIH TOOLS : ' ) if pilih =="1": os.system('git clone https://github.com/saydog/Virus-droid-creator ')
def fwd(self): self.isMoving = True while fwd() != 1: time.slepp(.1) print "Can't do the vroom vroom"
def waitEndOfSyncMove(self): while self._sendCmd("Q\r") != '.': time.slepp(0.001)
sg_freq = rospy.Publisher('/dev/e8257d/ip_192_168_100_37/freq_cmd', Float64, queue_size=1) sg_power = rospy.Publisher('/dev/e8257d/ip_192_168_100_37/power_cmd', Float64, queue_size=1) date = datetime.datetime.today().strftime('%Y%m%d_%H%M%S') file_name = name + '/' + date + '.necstdb' print(file_name) #set power power = input("How much sg power?? [dBm] ") sg_power.publish(power) time.slepp(0.1) #set freq&sweep start_freq = 0 #GHz end_freq = 20 #GHz freq_width = 5E-3 #GHz sg_freq.publish(start_freq) time.sleep(0.1) logger.start(file_name) time.sleep(1) for i in range(start_freq, end_freq + 1E-8, freq_width): sg_freq.publish(i) time.sleep(0.1)
import RPi.GPIO as GPIO import time x = int(input("enter x: ")) for x in range(x): GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(18, GPIO.OUT) GPIO.output(18, GPIO.HIGH) time.sleep(3) GPIO.output(18, GPIO.LOW) time.slepp(3)
def run(self): while self.queue.qsize() > 0: msg = self.queue.get() print("Workter %d: %s" % self.num, msg) time.sleep(1) time.slepp(a)
def m1(): for i in range(5): print("thread nature", current.thread().isDaemon()) time.slepp(3)
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnigs(False) GPIO.setup(21,GPIO.OUT) count =0 for count in range (0,3): print "Fan On" GPIO.output(21,GPIO.HIGH) time.sleep(4) print "Fan Off" GPIO.output(21,GPIO.LOW) time.slepp(4)
def MenuShell(): choice = input( "Type...\n {1} to download video with audio \n {2} to only video \n {3} to only audio \n \n" ) if choice == str("1"): link = input("Enter the video link:") yt = YouTube(link) #Title of video print("Title: ", yt.title) #Number of views of video print("Number of views: ", yt.views) #Length of the video print("Length of video: ", yt.length, "seconds") #Description of video print("Description: ", yt.description) #Rating print("Ratings: ", yt.rating) #print(yt.streams.filter(progressive=True)) #ys = yt.streams.get_by_itag('137') time.sleep(0.2) ys = yt.streams.get_highest_resolution() ys.download() contatore = 0 while contatore <= 99: contatore = contatore + 1 #time.sleep(0.4) print("Download Video: [" + str(contatore) + "%]") time.sleep(0.4) os.system("clear") print("") print("Download of ", yt.title, " Completed") #print(yt.streams) if choice == str("2"): link = input("Enter the video link:") yt = YouTube(link) #Title of video print("Title: ", yt.title) #Number of views of video print("Number of views: ", yt.views) #Length of the video print("Length of video: ", yt.length, "seconds") #Description of video print("Description: ", yt.description) #Rating print("Ratings: ", yt.rating) #print(yt.streams.filter(progressive=True)) time.sleep(0.2) ys = yt.streams.get_by_itag('137') ys.download() contatore = 0 while contatore <= 99: contatore = contatore + 1 #time.sleep(0.4) print("Download Video: [" + str(contatore) + "%]") time.sleep(0.3) os.system("clear") print("") print("Download of ", yt.title, " Completed") #print(yt.streams) if choice == str("3"): link = input("Enter the video link:") yt = YouTube(link) #Title of video print("Title: ", yt.title) #Number of views of video print("Number of views: ", yt.views) #Length of the video print("Length of video: ", yt.length, "seconds") #Description of video print("Description: ", yt.description) #Rating print("Ratings: ", yt.rating) time.slepp(0.2) ys = yt.streams.get_by_itag('140') ys.download() contatore = 0 while contatore <= 99: contatore = contatore + 1 #time.sleep(0.4) print("Download Audio: [" + str(contatore) + "%]") time.sleep(0.4) os.system("clear") print("") print("Download of ", yt.title, " Completed") #print(yt.streams) else: sys.exit()