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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'> | |
</head> | |
<body style="background-color:black"> | |
<center> | |
<h1 style="color:white; font-family: 'Open Sans', sans-serif; font-size:100px; margin-top:15%;" >Darwin was right. <br> Nature doesn't start from scratch.</h1> | |
</center> |
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 urllib2 | |
from bs4 import BeautifulSoup | |
page = urllib2.urlopen('http://www.codechef.com/rankings/ACMAMR14?utm_content=bufferd975d&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer') | |
page = page.read() | |
soup = BeautifulSoup(page) | |
soup.prettify() | |
userranks = [] | |
for anchor in soup.findAll('a', href=True): | |
p = anchor['href'] | |
if "users/acm14am" in p: |
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
<?php | |
function ldap_auth($ldap_id, $ldap_password){ | |
$ds = ldap_connect("ldap.iitb.ac.in") or die("Unable to connect to LDAP server. Please try again later."); | |
if($ldap_id=='') die("You have not entered any LDAP ID. Please go back and fill it up."); | |
if($ldap_password=='') die("You have not entered any password. Please go back and fill it up."); | |
$sr = ldap_search($ds,"dc=iitb,dc=ac,dc=in","(uid=$ldap_id)"); | |
$info = ldap_get_entries($ds, $sr); | |
$roll = $info[0]["employeenumber"][0]; | |
//print_r($info); | |
$ldap_id = $info[0]['dn']; |
NewerOlder