This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.support.wait import WebDriverWait | |
browser = webdriver.Firefox() | |
browser.get("http://qa/") | |
t = browser.title | |
print t | |
bios_button = browser.find_element_by_xpath("html/body/div[2]/table/tbody/tr[1]/td[1]/a").click() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget "https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz" | |
tar -xf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure | |
make | |
make verify | |
sudo make install | |
sudo ldconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install -y python-software-properties software-properties-common | |
sudo add-apt-repository -y ppa:pi-rho/dev | |
sudo apt-get update | |
sudo apt-get install -y tmux=2.0-1~ppa1~t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu 12.04 (Precise Pangolin) шаг 5: sudo apt-get install -y tmux=1.9a-1~ppa1~p (пока только tmux 1.9) | |
ubuntu 13.10 (Saucy Salamander) шаг 5: sudo apt-get install -y tmux=1.9a-1~ppa1~s (пока только tmux 1.9) | |
ubuntu 14.10 (Utopic Unicorn) шаг 5: sudo apt-get install -y tmux=2.0-1~ppa1~u | |
ubuntu 15.04 (Vivid Vervet) шаг 5: sudo apt-get install -y tmux=2.0-1~ppa1~v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Firefox XPath | |
# Full XPath = html/body/div[5]/form/table/tbody/tr/td[2]/table/tbody/tr/td/div/span[4] | |
# Result: SWI9X15C_05.05.16.02 r21040 carmd-fwbuild1 2014/03/17 23:49:48 | |
# XPath: substring-before(substring-after(//span[4], 'C_'), ' r') | |
# Result: 05.05.16.02 | |
# Python Selenium/Webdriver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
string_name = "hi Vlad, welcome to the California" | |
def mv_uppercase_rm_whitespaces(string_name): | |
a = string_name.title() # capitalize the first letter | |
b = a.replace(',', '') # remove comma | |
c = b.replace(' ', '') # remove whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import time | |
modem_status = '' | |
start_time = time.time() | |
attempts_time = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import time | |
from main_driver import driver | |
def check_modem_connection_status(path_to_modem_connection, path_to_reconnect_button): | |
modem_status = driver.find_element_by_xpath(path_to_modem_connection).text | |
start_time = time.time() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/kivy | |
from kivy.app import App | |
from kivy.uix.button import Button | |
from kivy.core.window import Window | |
class TestApp(App): | |
Window.size = (320, 240) | |
title = 'vswebschool.blogspot.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VALUE="$(cat /sys/class/backlight/intel_backlight/brightness)" | |
echo "Your carrent brightness is: ${VALUE}" | |
echo "Input your value of brightness: " | |
read INPUT | |
echo $INPUT | tee /sys/class/backlight/intel_backlight/brightness |
OlderNewer