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
<html> | |
<head> | |
<title>Dithering Test</title> | |
</head> | |
<body> | |
<canvas></canvas> | |
<script> | |
var canvas = document.getElementsByTagName("canvas")[0]; |
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
A trick to autheticate on connection to an IRC server | |
/connect irc.freenode.net 6667 :<username> <password> | |
In xchat, this means you put :<username> <password> into the server password box. |
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
from threading import Thread, Lock, Condition, get_ident, current_thread | |
from collections import deque, namedtuple | |
import time | |
cond = Condition() | |
lock = Lock() | |
ThreadSub = namedtuple("ThreadSub", ["queue", "callbacks"]) | |
subscriptions = {"chat":{}, "file":{}} |
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
#!/bin/bash | |
a=1 | |
compile_video() | |
{ | |
trap exit SIGINT | |
# modify these as needed | |
FPS=15 |
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
from math import log | |
def toList(num): | |
return toList(num // 3) + [["L"], ["-"], ["R"]][num % 3] if num else [] | |
def solution(n): | |
return toList(n + sum(3**x for x in range(1 + int(log(n*2, 3))))) |
OlderNewer