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 | |
from gdata import service | |
import gdata | |
import atom | |
import getopt | |
import sys | |
from local_settings import email,password,blogid | |
import requests |
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
import requests | |
domain="zysten.net aok.de apotheke.de arthrose.de www.zuckerkuegelchen.de" | |
domains = domain.split(" ") | |
def main(domain): | |
url = "http://api.similarweb.com/Site/%s/v1/visits?gr=daily&start=9-2013&end=5-2014&md=true&Format=JSON&UserKey=16b3af1ddf135f22b90c0243fdfe3c2b"%domain | |
f = requests.get(url) | |
sum = 0 | |
for i in f.json()['Values']: |
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
def remove_tags(s): | |
li=[] | |
for i in range(len(s)): | |
b=s.find('>',i) | |
e=s.find('<',b+1) | |
p=s[b+1:e] | |
if len(p)!=0 : | |
li.append(p) | |
for e in range(0,len(li)-1,1): |
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
def do_it(x,y,z): | |
# To Do : for x in z: replace x by y,again and again | |
# 1st step: if x appears in z | |
# 2nd step: then replce x by y | |
for i in range(len(z)-3): | |
if z[i:i+3]==x: # I cannot understand why this is not working , I set | |
z=z[:i]+y+z[i+3:] # the condition that if x is in z then modify z as follows | |
i=0 # and then I set i as 0 , and go over the loop again, |
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
@echo off | |
title Ok so get ready to be annoyed, | |
:annoy | |
msg * Hello %username%, I am Saurav | |
msg * How are you %username%? | |
msg * I am fine. | |
msg * ....... | |
msg * this is a whale , '____________________________' | |
msg * I hope this annoying string of messages finds you in the best of your health. | |
msg * Since this is one way conversation, almost all of the talking will be done by me only. |
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
import webapp2 | |
form = """ | |
<form title="Google Something" align = "center" action = "http://www.google.com/search" target="_blank"> | |
<input name = "q"> <input type = "submit" value="Google search"> | |
</form> | |
<br> | |
<form title="Search something on Duck Duck go" align = "center" action = "http://www.duckduckgo.com/search" target="_blank"> | |
<input name = "q"> <input type = "submit" value="DuckDuckGo search"> | |
</form> |
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
Verifying that +sauravtom is my blockchain ID. https://onename.com/sauravtom |
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
<html> | |
<head> | |
<title>Firebase Chat Example</title> | |
<script type="text/javascript" src="https://cdn.firebase.com/v0/firebase.js"></script> | |
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script> | |
</head> | |
<body> | |
<input type='text' id='nameInput' placeholder="Your Url"> |
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
mkdir my_new_project | |
cd my_new_project | |
git init | |
git checkout --orphan gh-pages | |
touch index.html | |
touch README.md | |
gedit index.html //open index.html and edit the homepage | |
git add . | |
git commit -a -m 'First Version' | |
git remote add origin https://github.com/<username>/<projectname>.git |
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
import urllib2 | |
import json | |
def get_tweets(name): | |
s = urllib2.urlopen("http://search.twitter.com/search.json?q="+name).read() | |
x = json.loads(s) | |
for i in range(len(x['results'])): | |
print "%s.%s--> %s\n" %(i, x['results'][i]['from_user_name'], x['results'][i]['text']) | |
name = raw_input("Enter the twitter-username get recent tweets: ") |
OlderNewer