View Find-FirstItem.ps1
Function Find-FirstItem {
[Parameter(Mandatory, Position = 0)]
[string] $Filter
Get-ChildItem -Recurse -Filter $Filter | Select-Object -First 1 -ExpandProperty FullName
View Systray.cs
using System;
using System.Drawing;
using System.Windows.Forms;
namespace MyTrayApp
public class SysTrayApp : Form
public static void Main()
View MediaKeys.ahk
; ^ = Ctrl
; volume up
; volume down
; volume mute
View autoexec.cfg
alias +jumpthrow "+jump;-attack"
alias -jumpthrow "-jump"
bind mouse3 +jumpthrow
bind mouse5 +voicerecord
alias +fwdjumpthrow "+forward;+jump;-attack"
alias -fwdjumpthrow "-forward;-jump"
bind capslock +fwdjumpthrow
exec buyscript;
alias +djump "+jump; +duck"
alias -djump "-jump; -duck"

Distributed Circular linked list sum

You are given a circular linked list whose nodes are distributed. Every node has next pointer and a method send(integer). A node can talk to its next node only. Different instances of same �threads are running in the nodes. How would you implement the run method of the thread class so that each node prints the sum of complete linked list.

Distributed binary tree sum

You are given a binary tree where each node has an integer value, a left, right and parent pointer. Every node is an independent distributed system where a thread is running in each node. You can talk to other node only by one method called "send(node, data)". And a node can call "send" only to its children or parent. How will you design the system so that all the nodes know the total sum of values of all the nodes in the binary tree and report them asynchronously.

Distributed doubly linked list sum

You are given a doubly linked list whose nodes are distributed. Every node has n

from collections import Counter
from heapq import heapify, heappop, heappush
s = input()
c = Counter(s)
pq = [(c[k], k, None, None) for k in c]
codes = {}
while len(pq) > 1:
r = heappop(pq)
import hashlib, os
unique = dict()
for filename in os.listdir('.'):
if os.path.isfile(filename):
filehash = hashlib.md5(open(filename, 'rb').read()).hexdigest()
if filehash not in unique:
unique[filehash] = filename
print (filename + ' is a duplicate of ' + unique[filehash])
from bs4 import BeautifulSoup
from itertools import count
import requests
url = ''
jpg = ''
png = ''
status = '\r[page {:0>3}] [image {:0>2}|24] [{:.<24}]'.format

Keybase proof

I hereby claim:

  • I am st0le on github.
  • I am gauravkamath ( on keybase.
  • I have a public key whose fingerprint is 6A30 6360 1097 9800 B9DF 154F 4DD9 FB9F 5039 0C57

To claim this, I am signing this object:

def find_anagrams(hay, needle):
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101]
f = lambda c : primes[ord(c.lower()) - ord('a')]
needle_primes = map(f, needle)
needle_primehash = reduce(mul, needle_primes)
current_primehash = 1
l = len(needle)
locations = []
for i,c in enumerate(hay):
if i >= l: