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 sys | |
word = sys.argv[1] | |
n = len(word) | |
num_of_combs = 2**n | |
for i in range(num_of_combs): | |
num = bin(i)[2:].zfill(n) # if cat 000, 001, 010.. if jack 0000, 0001, 0010... | |
print(''.join([ word[index].upper() if value == '1' else word[index].lower() for index, value in enumerate(num)])) |
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
Bollywood takes sides this election, it's 616 artistes VS 907 artistes | |
Was Madhya Pradesh govt scheme funds diverted via Hawala? | |
Were funds stolen from schemes which were meant for malnourished children and pregnant mothers in Madhya Pradesh? | |
5 killed in a Maoist attack in Dantewada, Chhattisgarh.Why are the #UrbanNaxalsSilent? | |
RSS leader gunned down in Kishtwar, why are Kashmir terror apologists silent? | |
With the focus on the last mile, has the BJP hit home with it's vision document? | |
Is appeasement over development in elections 2019? | |
Unbelievable cash stash. Whose money was it anyway? | |
Was a family bribed? | |
Rahul Gandhi wants to muzzle media? |
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 | |
import re | |
import commands | |
build_error = commands.getoutput("go build") | |
print "go build errors:" | |
print build_error | |
sources = re.findall(r"cannot find package \"[a-zA-Z.\/]*\"",build_error) |
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 sys | |
try: | |
x,y,z = map(int,raw_input().split()) | |
except ValueError: | |
print "Invalid Input" | |
sys.exit(0) | |
if not (x<y+z and y<x+z and z<x+y): | |
print "Triangle cannot be formed" | |
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
var divs = document.getElementsByTagName("div"); | |
var x = [] | |
for(var i=0;i<divs.length;i++){ | |
if(divs[i].id.match(/.*modal_signup_wrapper/i)){ | |
x=divs[i].id.match(/.*modal_signup_wrapper/i); | |
} | |
} | |
document.getElementById(x[0]).hidden=true; |
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 glob import glob | |
import webbrowser | |
images = glob("*.jpg") + glob("*.png") | |
images.sort() | |
f = open("comic.html","w") | |
imgbegin = "<img src='" | |
imgend = "'>" | |
for src in images: |