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 socket | |
import threading | |
def handle_client(client_socket, remote_ip, remote_port): | |
# Create a socket object for remote connection | |
remote_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
# Connect to the remote server | |
remote_socket.connect((remote_ip, remote_port)) | |
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 pikepdf | |
import os | |
import pathlib | |
pdf_pass = 'PASSWORD' | |
pdf_path = '' | |
if not pdf_path: | |
curr_path = pathlib.Path(__file__).parent.absolute() |
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 gist will create list of dictionaries. | |
""" | |
import pyzipper | |
def test(): | |
with pyzipper.PyZipFile(file="/home/dima/Desktop/test.zip") as fz: | |
files = fz.filelist | |
list = [] |
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
# Full page of API: https://pushover.net/api | |
# Get tokens page: https://pushover.net/#apps | |
import requests | |
class PushOverHandler: | |
def __init__(self,token, user_token): | |
self.token = token | |
self.user_token = user_token |
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 script is for filling the google forms automatically by entry ID and value. | |
This includes Date, ID and Full name, need modify only the ID and the Full name between the brackets. | |
''' | |
import requests | |
from datetime import datetime | |
url = 'https://docs.google.com/forms/d/<ID>/formResponse' # Change the ID to a proper one | |
date = datetime.now() |
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 | |
def countdown(t): | |
while t: | |
mins, secs = divmod(t, 60) | |
timeformat = '{:02d}:{:02d}'.format(mins, secs) | |
print(timeformat, end='\r') | |
time.sleep(1) | |
t -= 1 | |
print('Goodbye!\n\n\n\n\n') |
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 off | |
set mkvmergepath=mkvmerge.exe path | |
set videofileformat=file extention | |
:: Files counter for convertion | |
echo. | |
echo =========== Counter to convertion ================ | |
set filesCounter=0 | |
for /r . %%A IN (*.%videofileformat%) do ( | |
set /a filesCounter+=1 |
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 off | |
set mkvmergepath=mkvmerge.exe path | |
set videofileformat=file extention | |
:: Files counter for convertion | |
echo. | |
echo =========== Counter to convertion ================ | |
set filesCounter=0 | |
for /r . %%A IN (*.%videofileformat%) do ( | |
set /a filesCounter+=1 |