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 os | |
import json | |
import shutil | |
from collections import defaultdict | |
from tqdm import tqdm | |
def create_class_folders(output_dir, class_names): | |
for class_name in class_names: | |
class_dir = os.path.join(output_dir, class_name) | |
os.makedirs(class_dir, exist_ok=True) |
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 PIL import Image | |
import os | |
def resize_crop_and_flip(image_path, output_path, size=(250, 250)): | |
with Image.open(image_path) as img: | |
img_ratio = img.width / img.height | |
target_ratio = size[0] / size[1] | |
if img_ratio > target_ratio: | |
# Crop the width (crop horizontally) |
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
#!/bin/zsh | |
# Base directory | |
BASE_DIR="<target>" | |
CATEGORIES=("Words" "Alphabet") | |
RESIZED_DIR="Resize" | |
FRAMES_DIR="Frames" | |
FRAME_COUNT=8 | |
# Function to resize video and save |
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
[TCP] | |
22-SSH | |
80-HTTP | |
443-HTTPS | |
8080-Apps Genericas | |
3030-PDMWORKS | |
1433-SQLPDM | |
25734-License Server SNW | |
1055-SERVERANSYS | |
1056-VendorANSYS |
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
/*//grab the innerHTML of the child of the elements with the class username-i5-wv- | |
//and console.log the value prepended by @ | |
var usernames = []; | |
var username = document.getElementsByClassName('username-i5-wv-'); | |
//for each username print the innerHTML of every child | |
for (var i = 0; i < username.length; i++) { | |
usernames.push('@' + username[i].children[0].innerHTML);// I Think its this... im horrible at JS | |
} | |
console.log(usernames.toString()); |
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
./MainWindow.java:24: error: unmappable character (0xED) for encoding UTF-8 | |
// t�tulo, com info da liga��o atual | |
^ | |
./MainWindow.java:24: error: unmappable character (0xE7) for encoding UTF-8 | |
// t�tulo, com info da liga��o atual | |
^ | |
./MainWindow.java:24: error: unmappable character (0xE3) for encoding UTF-8 | |
// t�tulo, com info da liga��o atual | |
^ | |
./MainWindow.java:27: error: unmappable character (0xED) for encoding UTF-8 |
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
cd ./gui/src | |
javac -classpath ./:./classfiles/ojdbc8-19.3.0.0.jar -d ./classfiles -Xlint:unchecked -Xlint:unchecked -encoding Cp1252 Main.java | |
java -cp ./classfiles/ojdbc8-19.3.0.0.jar:./classfiles Main; |
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
#!/bin/sh | |
IFS=' | |
' | |
javac -classpath ./gui/:./gui/classfiles/ojdbc6.jar -d ./gui/classfiles ./gui/Main.java -encoding Cp1252 && | |
java -cp ./gui/classfiles/ojdbc6.jar:./gui/classfiles Main; |
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
#!/bin/sh | |
IFS=' | |
' | |
IP=172.20.4.63 | |
# iniciar o container. Correr apenas uma vez | |
docker run --name snx-vpn --cap-add=ALL -v /lib/modules:/lib/modules -e SNX_SERVER=vpn.ipleiria.pt -e SNX_USER=joao.silva -e SNX_PASSWORD=xxxxxxxx -t -d kedu/snx-checkpoint-vpn | |
# correr esta linha para iniciar a vpn | |
docker container start snx-vpn && sudo route add -net $IP netmask 255.255.255.255 gw `docker inspect --format '{{ .NetworkSettings.IPAddress }}' snx-vpn` && sudo route add -net 192.168.1.146 netmask 255.255.255.255 gw `docker inspect --format '{{ .NetworkSettings.IPAddress }}' snx-vpn` |