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 tkinter as tk | |
from tkinter import filedialog, messagebox, ttk, simpledialog | |
from moviepy.editor import VideoFileClip, concatenate_videoclips | |
from threading import Thread | |
import sys | |
def adjust_resolution(clip, target_resolution): | |
# Function to adjust video resolution while keeping the aspect ratio | |
target_width, target_height = target_resolution |
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 OpenSSL.crypto as crypto | |
import sys | |
def progress_bar(current, total): | |
"""Print a progress bar to the console.""" | |
progress = float(current) / float(total) | |
bar_length = 40 | |
filled_length = int(round(bar_length * progress)) | |
bar = '=' * filled_length + '-' * (bar_length - filled_length) |
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
var clist = document.getElementsByClassName("inner_page");//change class name to yours or use other getElementXXX functions | |
var newTab = window.open('about:blank','canvase_to_image'); //need enable popup window for current site | |
for(ind=0;ind<clist.length;ind++){ | |
var dataURL = clist[ind].toDataURL("image/png"); | |
newTab.document.write("<img src='" + dataURL + "' alt='"+clist[ind].id+"'/><br/>"); | |
} |
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
{ | |
"name": "Clash auto switch", | |
"nodes": [ | |
{ | |
"parameters": {}, | |
"name": "Start", | |
"type": "n8n-nodes-base.start", | |
"typeVersion": 1, | |
"position": [ | |
240, |
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
# Youtube Link: https://www.youtube.com/watch?v=PgLjwl6Br0k | |
import tkinter as tk | |
from tkinter import filedialog, messagebox, ttk | |
import pandas as pd | |
# initalise the tkinter GUI | |
root = tk.Tk() |
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
# def xterm(): | |
# from tkinter import * | |
# import os | |
# root = Tk() | |
# termf = Frame(root, height=400, width=500) | |
# termf.pack(fill=BOTH, expand=YES) | |
# wid = termf.winfo_id() |
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
50543fc0bca1bb4f21300f0074990f846a8009febded0b2198324c1b31d2e2563c908dcabbc461f194e70527e03a807e9a478f9a56f7 | |
66bbd551d9847c1a10755987b43f8b214ee9c6ec2949eef01321b0bc42cffce6bdbd604924e5cbd99b7c56cf461561186921087fa1e9 | |
44fc6f82bdd0dff9aca3e0e82cbb9d6683516524c245494b89c272a83d2b88452ec0bfa0a73ffb42e304fe3748896111b9bdf4171903 |
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 numpy as np | |
from scipy.stats import entropy | |
def bytes_entropy(target_bytes,base=None): | |
v,c = np.unique([int(i) for i in target_bytes],return_counts=True) | |
if base is None: | |
base = len(target_bytes) | |
if base >256: | |
base = 256 | |
return entropy(c,base=base) |
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
#!/usr/bin/env python3 | |
#"Copyright 2009 Bryan Harris" | |
# | |
#This file is part of bin2bmp.py. | |
# | |
# bin2bmp.py is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# |
NewerOlder