Skip to content

Instantly share code, notes, and snippets.

import os
import glob
import tkinter as tk
from PIL import Image, ImageTk
class ImageGallery:
def __init__(self, master, folder_path):
self.master = master
self.folder_path = folder_path
self.image_files = [f for f in os.listdir(folder_path) if f.endswith('.png') or f.endswith('.jpg') or f.endswith('.jpeg')]
import tkinter as tk
import subprocess
from tkinter import filedialog
import datetime
import os
def run_script():
# Check if there is a file called "interpolated.mp4" in the chosen folder
if os.path.isfile(os.path.join(photos_path.get(), "interpolated.mp4")):
# Get the current time as a string
@2blackbar
2blackbar / openbor script reference
Last active April 11, 2023 00:33
openbor script reference
Script Reference
By uTunnels
A script contains an interpreter to parse from text and execute the code. It can be loaded from a text file. A script also contains a local variant list. If the script is executed, the immediate code(those outside any functions) will be executed and function main will be called one time. The script will be reseted before next executation, so all script variants will lost, but the variants in local variant list will not been deleted, they are useful to store values.
Syntax
Similar to c syntax. Some differences:
Ignore types. int long char void ... will be treated as the same thing, they only tell the engine it is a data type. And a function can return a value no matter you set void type before it.
name BOULI
health 30
speed 30
running 65 8 1.4 1 1
type player
gfxshadow 1
nolife 1
jumpheight 8.4
jumpspeed 54
jumpmove 7 7