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 subprocess as sp | |
from copy import deepcopy | |
from random import choice | |
from typing import List, Tuple | |
from pynput.keyboard import Key, Listener | |
Matrix = List[List[int]] | |
SQR_N = 4 |
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
package main | |
import "fmt" | |
import "bufio" | |
import "bytes" | |
var r *bufio.Reader | |
var testCases = []struct { | |
stdin string |
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 time | |
class Timer: | |
_events = [] | |
def _add_event(self): | |
"""Add a event time recode""" | |
self._events.append(time.perf_counter()) |
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 os | |
import time | |
import requests | |
class DownloaderError(Exception): | |
pass | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Download Test</title> | |
</head> | |
<div> | |
<textarea id="input-text" rows="10" cols="60">Download Test</textarea> | |
<button id="btn">download</button> | |
</div> |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
"strconv" | |
) | |
type matrix [][]int |
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
let size = 16; | |
let cs = 40; | |
let arr; | |
let canvas = document.querySelector("#canvas"); | |
let colorWell = document.querySelector("#colorWell"); | |
let debug = document.querySelector("#debug"); | |
let ctx = canvas.getContext("2d"); | |
startup = () => { |
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 os | |
import tempfile | |
import ffmpeg | |
import requests | |
from tqdm import tqdm | |
def download(url, filename): | |
_, tmpfile = tempfile.mkstemp() |
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
// | |
class Matrix { | |
height: number; | |
width: number; | |
data: number[]; | |
constructor(height: number, width: number) { | |
this.height = height; | |
this.width = width; | |
this.data = new Array(height * width).fill(0); |