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
#!/usr/bin/env python3 | |
import tkinter | |
from time import strftime | |
def tic(): | |
rel['text'] = strftime('%H:%M:%S') | |
def tac(): | |
tic() | |
rel.after(1000, tac) |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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
import random | |
def merge_sort(xs): | |
"""Inplace merge sort of array without recursive. The basic idea | |
is to avoid the recursive call while using iterative solution. | |
The algorithm first merge chunk of length of 2, then merge chunks | |
of length 4, then 8, 16, .... , until 2^k where 2^k is large than | |
the length of the array | |
""" | |