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
Windows Registry Editor Version 5.00 | |
; Delete directories under HKEY_CURRENT_USER\Console, then run this | |
; Examples: https://gist.github.com/P4/4245793 | |
[HKEY_CURRENT_USER\Console] | |
"WindowAlpha"=dword:000000cd | |
"DefaultBackground"=dword:00000000 | |
; black dgray | |
"ColorTable00"=dword:00141414 |
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
// Both these pieces of code produce the same output, but the async method is neater, because | |
// all the variables stay in scope, and we can use a return statement to end the execution | |
// at any point. | |
// Here is the output in both cases: | |
// f has been called with param 2 | |
// ... | |
// The quotient is 5 | |
// f has been called with param -1 | |
// Dividing by 1 is not interesting |
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 threading import Thread | |
import time | |
class Timer(Thread): | |
def __init__(self, func, time): | |
super().__init__() | |
self.func = func | |
self.time = time | |
def run(self): |