Skip to content

Instantly share code, notes, and snippets.

View heldonjose's full-sized avatar

Héldon José Oliveira heldonjose

View GitHub Profile
@heldonjose
heldonjose / cortar_video.py
Created June 19, 2024 11:58
Cortar Vídeo tempo inicial e final
from moviepy.video.io.VideoFileClip import VideoFileClip
def cortar_video(input_video_path, output_video_path, start_time, end_time):
# Carregar o vídeo
video = VideoFileClip(input_video_path)
# Cortar o vídeo entre os tempos especificados
video_cortado = video.subclip(start_time, end_time)
@heldonjose
heldonjose / ShhetImageLoader.py
Last active February 24, 2023 14:27
Ler imagens no excel
from openpyxl import load_workbook
import io
import string
from PIL import Image
class SheetImageLoader:
"""Loads all images in a sheet"""
@heldonjose
heldonjose / convert_base64_to_input_file.js
Last active May 11, 2022 00:34
Converter base64 to inputFile
#https://stackoverflow.com/questions/71466930/how-to-get-base64-img-src-and-insert-it-into-input-files
function dataURLtoFile(dataurl, filename) {
var arr = dataurl.split(','),
mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]),
n = bstr.length,
u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);