This file contains hidden or 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
| import time | |
| from selenium import webdriver | |
| driver = webdriver.Chrome('/path/to/chromedriver') # Optional argument, if not specified will search path. | |
| driver.get('http://www.google.com/xhtml'); | |
| time.sleep(5) # Let the user actually see something! | |
| search_box = driver.find_element_by_name('q') | |
| search_box.send_keys('ChromeDriver') | |
| search_box.submit() | |
| time.sleep(5) # Let the user actually see something! |
This file contains hidden or 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 | |
| OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}') | |
| CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g') | |
| LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)" | |
| METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)" | |
| OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL) | |
| YELLOW="\033[1;33m" | |
| RED="\033[0;31m" | |
| ENDCOLOR="\033[0m" |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| _x=float(raw_input("Entrez un numéro pour trouver ses sorties sur son carré")) | |
| _xx=_x**2 | |
| print("le carré de ",_x,"est",_xx) |
This file contains hidden or 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
| _url_=[] | |
| _t_a_=raw_input(" Enter the text file : ") | |
| _fab=str(_t_a_) | |
| fr = open(_fab, "r") #file read | |
| for line in fr: | |
| _url_.append(line) | |
| _i=len(_url_) | |
| print(_i) |
This file contains hidden or 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
| "" | |
| import csv | |
| import requests | |
| GITHUB_USER = '' | |
| GITHUB_PASSWORD = '' | |
| GITHUB_TOKEN = '' | |
| REPO = '' # format is username/repo | |
| ISSUES_FOR_REPO_URL = 'https://api.github.com/repos/%s/issues' % REPO |
This file contains hidden or 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
| /********************************** example **************************************/ | |
| var base_url = 'http://people.cs.uct.ac.za/~swatermeyer/VulaMobi/'; | |
| function example() | |
| { | |
| var response = ""; | |
| var form_data = { | |
| username: username, | |
| password: password |
This file contains hidden or 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
| <h1>Countdown</h1> | |
| <div id="container"> | |
| <div> | |
| <span class="days"></span> | |
| <div class="smalltext">Days</div> | |
| </div> | |
| <div> | |
| <span class="hours"></span> | |
| <div class="smalltext">Hours</div> | |
| </div> |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import re,csv | |
| _csv_file="VIEWSTATE.csv" | |
| file = open('main.txt' , 'r') | |
| csv = open(_csv_file, "w") | |
| columnTitleRow = "val,name\n" | |
| csv.write(columnTitleRow) | |
| _a='' |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import requests | |
| def webber(url): | |
| headers = {"User-Agent": " "} # any user agent | |
| post={ | |
| # basically the post data/dictionary | |
| } | |
| r = requests.post(url = url, data = post,headers=headers) |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import json,os,csv | |
| from bs4 import BeautifulSoup | |
| _kurl=['IncomeSlab','IncomeSource','SalariedJob','HouseOwnershipStatus','HouseType','Exclusion','Inclusion','Deprivation'] | |
| _sfolder_2=['All Category','SC Category','ST Category','Other Category','Female Headed Category','Disable Member Category'] | |
| with open("json/district/district_main.json") as f: | |
| _d1 = json.load(f) | |
| for _ab in _kurl: # dir 1 | |
| for _ac in _sfolder_2: # sub directory | |
| _data=[] |