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 wave | |
import struct | |
import math | |
# Audio parameters | |
sample_width = 2 | |
sample_rate = 44100 | |
duration = 5 | |
# Define the melody |
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 random | |
from PIL import Image | |
def create_random_image(width, height): | |
# Create a new blank image with RGB mode | |
image = Image.new('RGB', (width, height)) | |
# Create a pixel map | |
pixels = image.load() |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from tkinter import Tk | |
from tkinter.filedialog import askopenfilename | |
from pathlib import Path | |
import subprocess | |
Tk().withdraw() | |
input_file = Path(askopenfilename(title='Load video file', initialdir=f"{Path.home()}")) | |
input_projection = 'equirect' | |
output_projection = ['c3x2', 'c6x1', 'c1x6', | |
'eac', |
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
ffmpeg -re -i INPUT -c:v libx264 -c:a aac -preset slower -f dash ARBITRARY_NAME.mpd |
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
# All the commands have been tested on a Xubuntu 22.04 | |
# First we update our machine | |
sudo apt update | |
sudo apt upgrade | |
# We install the Nginx server | |
sudo apt install nginx | |
# We test and enable the firewall if it is disabled | |
sudo ufw status |