git grep "text to look for" $(git rev-list --all)
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
| cd Cert:\CurrentUser\My | |
| dir | |
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
| # How this works is: if we want n1 to go first in the sorted order, we return -1 and we want n2 to go first, we return a +1 | |
| def compare(n1, n2): | |
| if n1+n2 > n2+n1: | |
| return -1 | |
| else: | |
| return 1 | |
| nums = sorted(nums, key=cmp_to_key(compare)) | |
| # cmp_to_key is important |
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 heapq | |
| class MyHeap(object): | |
| def __init__(self, initial=None, key=lambda x: x): | |
| # Max Heap: key: lambda x: -x | |
| # Min Head: default key would work | |
| self.key = key | |
| self.index = 0 | |
| if initial: |
Let i=0, so, (1<<i) = 00001 01010 | 00001 = 01011
Let i=1, so,
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 | |
| # -*- coding: utf-8 -*- | |
| # Note: To use the 'upload' functionality of this file, you must: | |
| # $ pipenv install twine --dev | |
| import io | |
| import os | |
| import sys | |
| from shutil import rmtree |
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
| The most beautiful explanation of Raft Concesus Algo: http://thesecretlivesofdata.com/raft/ |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
- Tell me about yourself.
- Tell me about current company(team) and your role in it
- What are you looking for in next company
- Why do you want to leave your currrent company
- Tell me an area where you think you can improve.
- Tell me a time when you created an innovative product
- Give me an example of when you took a risk and it failed.
NewerOlder