Skip to content

Instantly share code, notes, and snippets.

View Viku21's full-sized avatar

Vikash Viku21

  • Samsung Electronics
  • Noida
View GitHub Profile
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
def max_of_three(a,b,c):
if a > b and a > c :
print ('{} is largest among three.' .format(a))
elif b > a and b > c :
print ('{} is largest among three.' .format(b))
else:
print ('{} is largest among three.' .format(c))
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()