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 sys, array, os | |
def main_256(): | |
arr = array.array("B", range(256)) | |
arr.tofile(sys.stdout.buffer) | |
sys.stdout.flush() | |
def main_256_2(): |
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
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)" |
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 bin_cfg import pdf_dirs | |
def path_seq_print(): | |
yield from pdf_dirs | |
# for path in pdf_dirs: | |
# try: | |
# assert_readable_dir(path) | |
# s = "%s: %s" % ("ok", path) | |
# print(path) |
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
# в винде10 не работало | |
# echo something | clip | |
# хз почему | |
# поэтому сделал clip_from_stdin.py | |
cmd_lines = ''' | |
wh = where %* | |
gist git status |
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
####################################################################################################################### | |
re_is_url = re.compile( | |
r'^(?:http|ftp)s?://' # http:// or https:// | |
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain... | |
r'localhost|' # localhost... | |
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip | |
r'(?::\d+)?' # optional port | |
r'(?:/?|[/?]\S+)$', re.IGNORECASE) | |
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 python | |
import datetime | |
import json | |
####################################################################################################################### | |
def replace_suffix(s, suffix, replace): | |
""" | |
replace suffix if exists |
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
scoop install conemu clink | |
REM загрузить zip и распаковать: | |
REM [Clink](https://mridgers.github.io/clink/) | |
REM %ConEmuBaseDir%\clink | |
REM todo рассмотреть zsh.exe |
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
def hr(): | |
print('--------------------------------') | |
def equ2(a, b, c): | |
d = b * b - 4 * a * c | |
print('D =', d) | |
aa = a * 2 | |
d_sqrt = d ** 0.5 |
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
pygame | |
#pycairo | |
p5 |
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 pygame as pg | |
FPS = 30 | |
WW = 800 | |
WH = 600 | |
BLUE = (0, 0, 255) | |
BLACK = (0, 0, 0) | |
WHITE = (255, 255, 255) |