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 gspread | |
from newspaper import Article | |
from bs4 import BeautifulSoup | |
import requests | |
import re | |
import time | |
import feedparser | |
# Login with your Google account | |
gc = gspread.login('megmailaccount', 'mepassword') |
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 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 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
#!/usr/bin/env python | |
import json | |
import requests | |
def main(): | |
arr = requests.get("http://www.reddit.com/reddits.json?limit=1000").json()['data']['children'] | |
arr = [i['data']['display_name'] for i in arr] | |
f=open('subreddits.json','w') | |
f.write(json.dumps(arr)) |
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
#!/usr/bin/env python | |
import sys | |
import collections | |
import urllib | |
def main(date): | |
log_file = open('/var/log/auth.log', "r") | |
#creating an array of the ip of all items which contain date and the string "Failed password" | |
arr = [line.split(" ")[-4] for line in log_file if date in line and "Failed password" in line] |
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
#!/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 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
from bs4 import BeautifulSoup | |
import urllib2 | |
import urllib | |
import time | |
import datetime | |
import sys | |
import os | |
from local_settings import username, password | |
chanells = ['TheFunnyVines','vinehumor','ScienceVines','TheFunnyVine','The_Best_Vines','BestOfVines'] |
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
Question 1 | |
Fibonacci series are defined as the number in the following integer sequence 0,1,1,2,3,5,8,13,21,34,55,89,144 <br> | |
Let there be a function such that f(0,1) which generates the fibonacci series, where 0,1 are the first two terms of the fibonacci series. | |
such that f(4,5) will generate the following series 4,5,9,14,23,37,60 ... <br> | |
Find the 20th term of the series represented f(100,101) | |
ANS 1101365 | |
Solution: |
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
iframe{ | |
position:absolute; | |
top:0px; | |
bottom:0px; | |
} |
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
script = document.createElement( 'script' ); | |
script.src = 'http://code.jquery.com/jquery-1.9.1.js'; | |
document.body.appendChild(script); | |
var all = document.getElementsByTagName("div"); | |
var viewer = document.getElementById("viewer").style; | |
for (var i=0, max=all.length; i < max; i++) { | |
all[i].style.visibility='hidden'; |
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
javascript: (function () { | |
var all = document.getElementsByTagName("div"); | |
var viewer = document.getElementById("viewer").style; | |
for (var i=0, max=all.length; i < max; i++) { | |
all[i].style.visibility='hidden'; | |
} | |
viewer.visibility='visible'; | |
viewer.position='absolute'; |