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
YQL search string, | |
encodeURIComponent | |
http://query.yahooapis.com/v1/public/streaming/yql?q= | |
select%20*%20from%20html%20where%20url%3D%22https%3A%2F%2Ftwitter.com%2Fsearch%2Frealtime%3Fq%3Dvine.co%252Fv%252F%2B%252B%2Bmom%26src%3Dtypd%22 | |
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 | |
import json as simplejson | |
response = urllib2.urlopen('https://twitter.com/') | |
html=response.read() | |
print html |
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 lang="en"> | |
<head> | |
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> | |
<title>Sauraxe</title> | |
<style type="text/css"> | |
#x{ | |
//text-align:center; | |
font-size:10px; | |
font-family:‘American Typewriter’, ‘Courier New’, Courier, Monaco, mono; |
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 vim_id = document.URL.substring(17); | |
var url = 'http://player.vimeo.com/play_redirect?quality=hd&codecs=h264&clip_id=' | |
+vim_id+ | |
'&time=1362143485&sig=e846af3c50137c059ea2099a220a1f8b&type=html5_desktop_local'; | |
saveToDisk(url, document.URL+'.mp4'); | |
console.log(url); | |
function saveToDisk(fileUrl, fileName) { | |
var save = document.createElement("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
text ='''g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.''' | |
def trans(string): | |
poop='' | |
for i in string: | |
#if i in ['.' , ',' , ')' , '(' , "'"," "]: #dont translate special characters | |
if in in " .,'():;": | |
poop+=i | |
else: |
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 sys import argv | |
import httplib2 | |
import simplejson as json | |
#API_KEY = ADD YOUR API KEY HERE , even if you don't shurl will still work | |
def shurl(longUrl): | |
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'; |
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
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
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: |