Skip to content

Instantly share code, notes, and snippets.

View cre8tions's full-sized avatar

cre8tions cre8tions

View GitHub Profile
@YouKnow-sys
YouKnow-sys / custom_html_parser.py
Created June 21, 2024 15:01
Html parser/unparser with spoiler and custom emoji support for telethon
"""
Simple HTML -> Telegram entity parser.
"""
from collections import deque
from html import escape
from html.parser import HTMLParser
from typing import Iterable, Tuple, List
from telethon.helpers import add_surrogate, del_surrogate, within_surrogate, strip_text
from telethon.tl import TLObject
@Indigo744
Indigo744 / ProcessAsyncHelper.cs
Last active September 1, 2024 18:35 — forked from georg-jung/ProcessAsyncHelper.cs
The right way to run external process in .NET (async version)
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
/// <summary>
/// Process helper with asynchronous interface
/// - Based on https://gist.github.com/georg-jung/3a8703946075d56423e418ea76212745
/// - And on https://stackoverflow.com/questions/470256/process-waitforexit-asynchronously
/// </summary>
@darconeous
darconeous / tesla-key-card-protocol.md
Last active April 8, 2025 23:28
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum [email protected].

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@imneonizer
imneonizer / cv2_multi_line_texts.py
Last active August 14, 2022 11:08
how to write multi line texts with opencv
import numpy as np
import cv2
import textwrap
img = np.zeros((500,500,3), dtype='uint8')
print(img.shape)
height, width, channel = img.shape
text_img = np.ones((height, width))
@madebyollin
madebyollin / make_audiobook.py
Last active April 8, 2025 23:42
Converts an epub or text file to audiobook via Google Cloud TTS
#!/usr/bin/env python3
"""
To use:
1. install/set-up the google cloud api and dependencies listed on https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/texttospeech/cloud-client
2. install pandoc and pypandoc, also tqdm
3. create and download a service_account.json ("Service account key") from https://console.cloud.google.com/apis/credentials
4. run GOOGLE_APPLICATION_CREDENTIALS=service_account.json python make_audiobook.py book_name.epub
"""
import re
import sys
@bmatthewshea
bmatthewshea / whattomine-hashtimes.py
Last active January 11, 2024 05:55
Python script to calculate time to win full block and revenue per day. (GPU MINING)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# "Whattomine GPU Hash time calculator"
#
# This is not for CPU or ASIC calculations.
# Author: Brady Shea
# Email: Use github user: bmatthewshea or gist comments
# Origin: https://gist.github.com/bmatthewshea/90b120722e0561dd235adcdc231b6765
#
@filitchp
filitchp / OpenCV-3.1-Ubuntu-16.04-Cuda-8.md
Last active December 12, 2019 21:36
Installing OpenCV 3.1 on Ubuntu 16.04 with Cuda 8 support

This is a guide for installing OpenCV 3.1 on Ubuntu 16.04 with Cuda 8 support. This has been tested using a system with a GeForce GTX 1060 and on one with a GeForce GTX 1080.

Nvidia Drivers with Compiz

Install Nvidia drivers

# Start clean
sudo apt purge nvidia-*
# Add the PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
@arya-oss
arya-oss / INSTALL.md
Last active February 12, 2025 15:41
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@mkubenka
mkubenka / Vagrantfile
Last active October 12, 2022 05:34
Windows on AWS with Vagrant
require 'inifile'
require 'date'
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.guest = "windows"
config.vm.boot_timeout = 600
config.vm.provider :aws do |aws, override|
@olragon
olragon / gist:77200d913fa90a894a6c
Last active November 6, 2017 21:48 — forked from daz/ffmpeg-x264.sh
Cross-compile ffmpeg with x264 for Raspberry Pi 2
# Build environment. I use vagrant ubuntu/trusty64
sudo apt-get install build-essential git-core alsa-base
sudo git clone https://github.com/raspberrypi/tools.git /opt/tools
export CCPREFIX="/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-"
# Get ffmpeg and x264 repos
git clone git://source.ffmpeg.org/ffmpeg.git