Skip to content

Instantly share code, notes, and snippets.

View gormih's full-sized avatar
🧸
bear

Michael Alexeevich gormih

🧸
bear
View GitHub Profile
from github import Github
account = Github('username', 'password')
repo = account.get_repo('username/your_public_repository')
repo.create_file("new_file.txt", "init commit", "file_content ------ ")
@gormih
gormih / img-sound-to-video.sh
Created January 10, 2021 17:06 — forked from orjanv/img-sound-to-video.sh
Use ffmpeg to create a video of a picture and a sound file
ffmpeg -loop 1 -i image.jpg -i audio.wav -c:v libx264 -tune stillimage -c:a aac -strict experimental -b:a 192k -pix_fmt yuv420p -shortest out.mp4
import requests
from PIL import Image
from playsound import playsound
oauth_url = 'https://oauth.yandex.com/token'
client_id = 'iddddddd'
client_secret = 'secret'
username = 'ololo@olololo.olo'
password = 'passowrd'
from win32com import client
def process_sql_in_mdb(mdb_file_path: str, sql: str):
'''
:param mdb_file_path: Full path to .mdb file
:param sql: sql query
:return: row set for db
'''
connection = client.Dispatch(r'ADODB.Connection')
row_set = client.Dispatch(r'ADODB.Recordset')
@gormih
gormih / python_logging_sqlite_handler.py
Last active January 20, 2022 08:45 — forked from giumas/Logging - SQLite handler
A minimal SQLite handler for the python logging module
import sqlite3
import logging
import time
__version__ = "0.2.0"
initial_sql = """CREATE TABLE IF NOT EXISTS log(
TimeStamp TEXT,
Source TEXT,