Skip to content

Instantly share code, notes, and snippets.

View syanyong's full-sized avatar
🏠
Working from anywhere

Sarucha Yanyong syanyong

🏠
Working from anywhere
View GitHub Profile
### Usage: python resize.py <directory of image>
### Example: python resize.py ~/Desktop/MyImages/
import os, sys
from PIL import Image
import glob
# Resize size (will maintain the aspect ratio)
size = 224, 224
from google.colab import drive
drive.mount('/content/drive')
!unzip /content/drive/MyDrive/WorkshopML/dataset.zip -d /content/drive/MyDrive/WorkshopML/dataset
# Plot bounding box from Pytorch Hub
def plot_boxes(result_dict, frame):
for ob in result_dict:
rec_start = (int(ob['xmin']), int(ob['ymin']))
rec_end = (int(ob['xmax']), int(ob['ymax']))
color = (255, 0, 0)
thickness = 3
cv2.rectangle(frame, rec_start, rec_end, color, thickness)
#include <WiFi.h>
#include <HTTPClient.h>
#define SERVER_NAME "https://notify-api.line.me/api/notify"
#define TOKEN ""
WiFiClient client;
HTTPClient http;
void sendLineNotify (const char * msg) {
#include <WiFi.h>
#include <HTTPClient.h>
#define SERVER_NAME "https://notify-api.line.me/api/notify"
#define TOKEN ""
WiFiClient client;
HTTPClient http;
void sendLineNotify (const char * msg) {
@syanyong
syanyong / tutorial_softether_client.md
Created April 25, 2024 05:22 — forked from Aschen/tutorial_softether_client.md
Tutorial SoftEther Client (Ubuntu)

SoftEther Client

Download and install

Go to http://www.softether-download.com/files/softether and download SoftEther Client for the right architecture.

> cd /tmp
> wget http://www.softether-download.com/files/softether/v4.18-9570-rtm-2015.07.26-tree/Linux/SoftEther_VPN_Client/64bit_-_Intel_x64_or_AMD64/softether-vpnclient-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz
> tar xf softether-vpnclient-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz