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
.include "m32def.inc" | |
.org 0 | |
; ЛР 3 | |
; Частота смены последовательности: | |
; 125ms / 8Hz | |
; Последоавтельности: | |
; 11111111 | |
; 01111110 |
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
# This is a configuration file for ProGuard. | |
# http://proguard.sourceforge.net/index.html#manual/usage.html | |
# | |
# Starting with version 2.2 of the Android plugin for Gradle, this file is distributed together with | |
# the plugin and unpacked at build-time. The files in $ANDROID_HOME are no longer maintained and | |
# will be ignored by new version of the Android plugin for Gradle. | |
# Optimizations can be turned on and off in the 'postProcessing' DSL block. | |
# The configuration below is applied if optimizations are enabled. | |
# Adding optimization introduces certain risks, since for example not all optimizations performed by | |
# ProGuard works on all versions of Dalvik. The following flags turn off various optimizations |
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
#!/bin/bash | |
files=$(ls photo*.jpg) | |
count=1 | |
for i in $(echo $files); do | |
cp $i ./$count.jpg | |
jpegoptim --size=100K $count.jpg | |
count=$(($count+1)) | |
done |
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 rich.console import Console | |
from rich.markdown import Markdown | |
if __name__ == "__main__": | |
if sys.argv[1:]: | |
console = Console() | |
with open(sys.argv[1:][0]) as readme: | |
markdown = Markdown(readme.read()) | |
console.print(markdown) |
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
#!/bin/python | |
""" | |
A rudimentary URL downloader (like wget or curl) to demonstrate Rich progress bars. | |
""" | |
from concurrent.futures import ThreadPoolExecutor | |
from functools import partial | |
import os.path | |
import sys | |
from typing import Iterable | |
from urllib.request import urlopen |
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
#get all files in $DIR that matches $NAME created last $MINUTE minutes, sort them in alphabet, | |
#copy in current dir as jpg(sorry) and try to compress in $SIZE size (for example 400K) | |
export count=1 | |
export files="$(find $DIR -type d -name $NAME -prune -o -mmin -MINUTE -type f -print | rg -v '\(' | sort -t _ -k 2 -g | tr '\n' ' ')" | |
for i in $(echo $files); do | |
cp $i ./$count.jpg | |
jpegoptim --size=$SIZE $count.jpg | |
count=$(($count+1)) | |
done |
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
BUILD_DIR=Build | |
SRC_DIR=Src | |
INC_DIR=Inc | |
CC=avr-gcc | |
LD=avr-ld | |
LIBS= | |
STANDART=c99 | |
OPTIMIZE=-Os | |
TARGET=main | |
MCU=atmega128 |
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
#it's important to have space after last integer | |
echo "1 2 3 4 5 " | tee a | sed 's/\s/\/3\n/g' | bc -l | sed 's/00//g' | sed 's/.$//g' | nl | grep -v '\.' | awk '{print $1}' > b; export A=$(cat a | sed 's/\s/\n/g'); export B=$(cat b); for i in $B; do echo -e "$A" | sed "${i}q;d" ; done | tr '\n' ' ' | rev | cut -c 2- | rev | sed 's/\s/+/g' | bc |