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 sys | |
from dotenv import load_dotenv | |
import openai # pip install openai | |
import re | |
# Load the API key from the .env file | |
load_dotenv() | |
# Get the API key from the environment variable |
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
#!/data/data/com.termux/files/usr/bin/zsh | |
# | |
# This is a termux-url-opener script to do diffrent tasks on my Android phone | |
# | |
# | |
# | |
# How to use this script | |
############################# | |
# Create the bin directory | |
# ➜ ~ mkdir bin |
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
###################################### | |
# | |
# Termux bash.bashrc | |
# by brainf+ck | |
# | |
# Last modified: 2022/06/30 | |
# | |
###################################### | |
#### Global ########################## |
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
#!/usr/bin/env bash | |
echo "PIP PACKAGE UPDATER" | |
going=true | |
while $going | |
do | |
read -n 1 -p "`echo $'\n[1] Force update all packages'``echo $'\n[2] Check for updates'``echo $'\n[5] Update packages considering dependencies'``echo $'\n[9] Force reinstall all packages'``echo $'\n[Q] Quit'``echo $'\n> '`" ans; | |
echo $'\n' | |
case $ans in | |
1) | |
echo $'Force updating all packages...\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
#!/bin/bash | |
# Bash script to control a TPLink HS110 or HS100 smart plug. | |
# Usage: $0 -u username -p password -d "?" => list devices, and should output token. | |
# Usage: $0 -t <token> -d <device_id> -o off => turn off.. | |
# Usage: $0 -t <token> -d <device_id> -o off => turn on.. | |
# Default action is to turn the first device found off. |
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 | |
echo ---------------------------------------------------------------------- | |
echo VIDEO AND SUBTITLE MERGER | |
echo version 1.0.0 by Seyoum | |
echo ---------------------------------------------------------------------- | |
:: Set file video extention | |
:VIDEOFILEEXTENTION | |
echo. | |
set /p videofileformat=Enter the video file type extension (e.g mp4): | |
if /I "%videofileformat%" EQU "webm" echo You have chosen %videofileformat% as your video file format&goto:SUBTITLEFILEEXTENTION |
Essentially just copy the existing video and audio stream as is into a new container, no funny business!
The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.
With ffmpeg
this can be achieved with -c copy
. Older examples may use -vcodec copy -acodec copy
which does the same thing.
These examples assume ffmpeg
is in your PATH
. If not just substitute with the full path to your ffmpeg binary.
NewerOlder