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
kvm -cdrom opticalimage.iso -boot d -m 4096 -drive file=/dev/sdx,format=raw |
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
echo -n "$1" | xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g' |
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
while ! rsync --partial --progress -avz -e ssh "user@server:/path/folder.to.copy" "/to.local.path"; do sleep 5; 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
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh $args[0] "cat >> .ssh/authorized_keys" |
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
mkdir ~/bin | |
mkdir ~/.local | |
mkdir ~/.local/bin | |
git clone https://github.com/Homebrew/brew homebrew | |
eval "$(homebrew/bin/brew shellenv)" | |
brew update --force --quiet | |
chmod -R go-w "$(brew --prefix)/share/zsh" | |
echo 'export PATH=$PATH:$HOME/bin:$HOME/.local/bin:$HOME/homebrew/bin' >> ~/.bashrc | |
source ~/.bashrc | |
curl https://bootstrap.pypa.io/get-pip.py | python3 - --user |
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 <stdio.h> | |
int main() { | |
int count = 0; | |
while (1) { | |
printf("fast\n"); | |
if (count == 49) { | |
count = 0; |
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
cgi.assign += ( ".sh" => "/bin/bash" ) | |
setenv.add-response-header += ( "Content-Type" => "text/html; charset=utf-8" ) | |
$HTTP["url"] =~ "\.sh$" { setenv.add-response-header = ( "Content-Type" => "text/plain; charset=utf-8" ) } |
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 cv2 | |
def is_image_blurry(image): | |
# Для анализа конвертируем изображение в оттенки серого | |
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
# Вычисляем оценку размытости изображения с использованием оператора Лапласа | |
# Оператор Лапласа выделяет границы объектов на изображении | |
# Далее вычисляется дисперсия значений пикселей на полученном изображении |
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 cv2 | |
def is_image_blurry(image): | |
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
blur_score = cv2.Laplacian(gray, cv2.CV_64F).var() | |
return blur_score | |
def rename_images_with_blur_score(folder_path): | |
for filename in os.listdir(folder_path): |