Skip to content

Instantly share code, notes, and snippets.

View bazuzu931's full-sized avatar
💭
you're tearing me apart lisa!

bazuzu931 bazuzu931

💭
you're tearing me apart lisa!
View GitHub Profile
@shimpe
shimpe / fancy_captions.py
Last active May 17, 2024 02:41
fancy captions with moviepy
import PySide6.QtSvg
import PySide6.QtGui
import PySide6.QtCore
import moviepy.video.VideoClip
import moviepy.editor
import numpy as np
from moviepy.editor import *
from vectortween.PointAnimation import PointAnimation
from vectortween.SequentialAnimation import SequentialAnimation
@shimpe
shimpe / colored_word.py
Created December 11, 2022 13:24
Make caption with multiple colors in moviepy
# Import everything needed to edit video clips
from moviepy.editor import *
from vectortween.PointAnimation import PointAnimation
fps = 25
duration = 10
W = 2000
H = 500
# Generate a text clip
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"default_root": "current",
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.dll",
"*.obj",
"*.o",
@asqd
asqd / mp3_slicer.py
Last active November 23, 2022 09:08
Python script to slice large mp3 file by chunks
from os import path
from pydub import AudioSegment
import sys
# pydub use ffmpeg to file manupulation
# don't forget to install ffmpeg
sys.path.append('/usr/local/bin/ffmpeg')
def load_songs(fn):
meta = {}
songs = []
@miguelgrinberg
miguelgrinberg / .vimrc
Last active November 19, 2025 18:07
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'
@Birdi7
Birdi7 / callback_data_factory_simple.py
Last active October 29, 2024 18:25
A simple example of usage of callback data factory from aiogram
"""
This is a simple example of usage of CallbackData factory
For more comprehensive example see callback_data_factory.py
"""
import asyncio
import logging
from aiogram import Bot, Dispatcher, executor, types
from aiogram.contrib.fsm_storage.memory import MemoryStorage
<template>
<div class="container">
<div class="row mt-5">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Users</h3>
<div class="card-tools">
<button class="btn btn-success" data-toggle="modal" data-target="#addNew">Add New
# install 7.1.3 on ubuntu from source
https://techlist.top/php7-install-from-source/
#1. Re-Install PHP 5.6
#What worked for me was this guide: http://www.lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu
#Actually is not required to remove php7.0, you can install php5.6 together ( also because you will have dependency problem with phpmyadmin package that required php7.0)
#Assuming libapache2-mod-php is a suitable way to enable PHP in Apache for you, you can proceed in this way:
sudo add-apt-repository ppa:ondrej/php
@simplesasha
simplesasha / gist:73005e8e08065d8c360dba09dc86626b
Created May 5, 2018 11:38
Интеграция Python 3 в Sublime Text 3 (простая и интерактивная консоль REPL)
1. Открываем Sublime Text -> Tools -> Build System -> New Build System
2. Вставляем в открывшийся файл следующие строки, чтобы получилось вот так:
{
"cmd": ["python3", "-i", "-u", "$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python"
}
3. Сохраняем файл с названием python3.sublime-build и не меняем путь предложенный редактором
# Fix root access error in new mysql version
sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new-password';
sudo service mysql stop
sudo service mysql start
# change root password
mysqladmin -u root -p password
show databases;