git branch -vv | grep gone | awk '{print $1}' | tr "\n" " " | xargs git branch -d
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 { | |
box-sizing: border-box; | |
} | |
*, *:after, *:before { | |
box-sizing: inherit; | |
} |
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
from functools import reduce | |
for _ in range(int(input())): | |
input() | |
print(reduce(lambda x, y: x ^ y, list(map(int, input().split())))) |
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
m = { | |
'0': '_', | |
'1': '0', | |
'2': '1', | |
'3': '2', | |
'4': '3', | |
'5': '4', | |
'6': '5', | |
'7': '6', | |
'8': '7', |
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
#preparing for download | |
mkdir "gridcorpus" | |
cd "gridcorpus" | |
mkdir "raw" "audio" "video" | |
cd "raw" && mkdir "audio" "video" | |
for i in `seq $1 $2` | |
do | |
printf "\n\n------------------------- Downloading $i th speaker -------------------------\n\n" | |
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
__author__ = "Karthik M A M" | |
#get the user input | |
x = [ input().split() for i in range(int(input().split()[0])) ] | |
c = int(input()) | |
n, m = len(x), len(x[0]) | |
#iterate over each ring | |
for l in range(min(n, m) // 2): | |
temp = x[l + 1: n - l - 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
#This algorithm will find the prime numbers | |
#faster than conventional methods | |
#by checking only the prime number divisiblity | |
prime = [2] | |
for i in range(2, int(input())): | |
l = int(i ** 0.5) + 1 | |
for j in prime: | |
if j > l: | |
prime.append(i) | |
break |
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
#precedance and the operation of each binary operator | |
prec = { "**": 3, | |
"*": 2, | |
"/": 2, | |
'%': 2, | |
"+": 1, | |
"-": 1, | |
"$": 0} | |
operFunc = {'+': lambda a, b: a + b, | |
'-': lambda a, b: a - b, |