Разделение экранов видео Split Screen на Python
Код из видео:
from moviepy.editor import VideoFileClip, clips_array
clip1 = VideoFileClip("v1.mp4").subclip(0, 2).margin(5)
clip2 = VideoFileClip("v2.mp4").subclip(0, 2).margin(5)
clip3 = VideoFileClip("v3.mp4").subclip(0, 2).margin(5)
clip4 = VideoFileClip("v4.mp4").subclip(0, 2).margin(5)
combined = clips_array([[clip1, clip2],
[clip3, clip4]])
combined.write_videofile('output.mp4')
Код из видео:
from moviepy.editor import VideoFileClip, clips_array
clip1 = VideoFileClip("v1.mp4").subclip(0, 2).margin(5)
clip2 = VideoFileClip("v2.mp4").subclip(0, 2).margin(5)
clip3 = VideoFileClip("v3.mp4").subclip(0, 2).margin(5)
clip4 = VideoFileClip("v4.mp4").subclip(0, 2).margin(5)
combined = clips_array([[clip1, clip2],
[clip3, clip4]])
combined.write_videofile('output.mp4')
👍16
скоро же начинается учебный год, решил выложить пару статей для новичков))
👍14😁2❤1
И так, ребят, не разбегайтесь, в ближайшее время будет камбэк))
❤13👍1🔥1
Думаю отличная тема для статьи в этот день!
https://it-start.online/articles/vyvod-tablicy-umnozhenija-v-python
https://it-start.online/articles/vyvod-tablicy-umnozhenija-v-python
IT Start
Вывод таблицы умножения в Python - IT Start
Вывод таблицы умножения в Python. Разберём два способа вывода таблицы умножения в Python. Вывод таблицы умножения циклом while и for.
👍9❤2🔥1
Рано или поздно я наконец начну придерживаться графика, как и раньше. По крайней мере я на это надеюсь))
⚡6👍3🔥1
GUI Переводчик на Python tkinter v2
Код из видео:
from tkinter import *
from tkinter import ttk
from googletrans import Translator
def translate():
for language, suffix in languages.items():
if comboTwo.get() == language:
text = t_input.get('1.0', END)
translation = translator.translate(text, dest=suffix)
t_output.delete('1.0', END)
t_output.insert('1.0', translation.text)
root = Tk()
root.geometry('500x350')
root.title('Переводчик')
root.resizable(width=False, height=False)
root['bg'] = 'black'
translator = Translator()
languages = {'Русский': 'ru', 'Английский': 'en', 'Французский': 'fr'}
header_frame = Frame(root, bg='black')
header_frame.pack(fill=X)
header_frame.grid_columnconfigure(0, weight=1)
header_frame.grid_columnconfigure(1, weight=1)
header_frame.grid_columnconfigure(2, weight=1)
comboOne = ttk.Combobox(header_frame,
values=[lang for lang in languages], state='readonly')
comboOne.current(0)
comboOne.grid(row=0, column=0)
label = Label(header_frame, fg='white', bg='black', font='Arial 17 bold', text='->')
label.grid(row=0, column=1)
comboTwo = ttk.Combobox(header_frame,
values=[lang for lang in languages], state='readonly')
comboTwo.current(1)
comboTwo.grid(row=0, column=2)
t_input = Text(root, width=35, height=5, font='Arial 12 bold')
t_input.pack(pady=20)
btn = Button(root, width=45, text='Перевести', command=translate)
btn.pack()
t_output = Text(root, width=35, height=5, font='Arial 12 bold')
t_output.pack(pady=20)
root.mainloop()
Код из видео:
from tkinter import *
from tkinter import ttk
from googletrans import Translator
def translate():
for language, suffix in languages.items():
if comboTwo.get() == language:
text = t_input.get('1.0', END)
translation = translator.translate(text, dest=suffix)
t_output.delete('1.0', END)
t_output.insert('1.0', translation.text)
root = Tk()
root.geometry('500x350')
root.title('Переводчик')
root.resizable(width=False, height=False)
root['bg'] = 'black'
translator = Translator()
languages = {'Русский': 'ru', 'Английский': 'en', 'Французский': 'fr'}
header_frame = Frame(root, bg='black')
header_frame.pack(fill=X)
header_frame.grid_columnconfigure(0, weight=1)
header_frame.grid_columnconfigure(1, weight=1)
header_frame.grid_columnconfigure(2, weight=1)
comboOne = ttk.Combobox(header_frame,
values=[lang for lang in languages], state='readonly')
comboOne.current(0)
comboOne.grid(row=0, column=0)
label = Label(header_frame, fg='white', bg='black', font='Arial 17 bold', text='->')
label.grid(row=0, column=1)
comboTwo = ttk.Combobox(header_frame,
values=[lang for lang in languages], state='readonly')
comboTwo.current(1)
comboTwo.grid(row=0, column=2)
t_input = Text(root, width=35, height=5, font='Arial 12 bold')
t_input.pack(pady=20)
btn = Button(root, width=45, text='Перевести', command=translate)
btn.pack()
t_output = Text(root, width=35, height=5, font='Arial 12 bold')
t_output.pack(pady=20)
root.mainloop()
👍25❤3🔥1
Ну всё, завтра ожидайте видос в 16:30 по МСК!
Надеюсь следующий выйдет точно не через месяц))
Надеюсь следующий выйдет точно не через месяц))
👍7🎉6🔥3
всё время проскакивают мысли как было классно, когда снимал их каждый день. Я бы и сейчас с радостью этим занимался, да времени не хватает :(