- Join TS Files
- Convert TS to MP4
- Download Online AES-128 Encrypted HLS video
- Convert Video to GIF
- Extract Audio and Convert it to MP3
- Burn Subtitles into Video
This file contains hidden or 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
""" | |
Модели | |
""" | |
from django.db import models | |
from django.contrib.auth import get_user_model | |
class RecordManager(models.Manager): | |
def get_queryset(self): | |
return super().get_queryset().filter(deleted=False) |
This file contains hidden or 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
FROM traefik:v2.2 | |
RUN touch acme.json | |
RUN chmod 600 acme.json |
This file contains hidden or 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 asyncio | |
import aiohttp # pip install aiohttp | |
import aiofile # pip install aiofile | |
REPORTS_FOLDER = "reports" | |
FILES_PATH = os.path.join(REPORTS_FOLDER, "files") | |
def download_files_from_report(urls): |
This file contains hidden or 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
from functools import partial | |
import pydantic | |
import logging | |
from django.contrib.postgres.fields import JSONField | |
from typing import Type, Union, Tuple | |
from django.core.serializers.json import DjangoJSONEncoder |
This file contains hidden or 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 | |
#argument extention | |
FEXT=$1 | |
if [ $# -eq 0 ] | |
then | |
echo "No arguments, example: py" | |
exit 0 | |
fi |
This file contains hidden or 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
# Installing ffmpeg with H265 support | |
brew tap varenc/ffmpeg | |
brew install varenc/ffmpeg/ffmpeg --with-fdk-aac --HEAD | |
# Installing mp4edit tool | |
brew install bento4 |
This file contains hidden or 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
from smtplib import SMTP # Use this for standard SMTP protocol (port 25, no encryption) | |
# from smtplib import SMTP_SSL as SMTP # This invokes the secure SMTP protocol (port 465, uses SSL) | |
from email.mime.text import MIMEText | |
class Email(object): | |
SMTP_CONFIG = dict( | |
server="your_smtp_server_hostname", | |
username="your_smtp_server_username", | |
password="your_smtp_server_password" |
This file contains hidden or 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 numpy as np | |
''' | |
------------------------------------------------ | |
Use dynamic programming (DP) to solve 0/1 knapsack problem | |
Time complexity: O(nW), where n is number of items and W is capacity | |
------------------------------------------------ | |
knapsack_dp(values,weights,n_items,capacity,return_all=False) | |
Input arguments: |
This file contains hidden or 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
tasks: | |
- name: backup_something | |
local: "/path/to/sync" | |
remote: "memset_memstore:path/to/remote" | |
operation: sync | |
- name: backup_something_else | |
local: "/another/path/to/sync" | |
remote: "memset_memstore:another/path/to/remote" | |
operation: sync |
NewerOlder