Skip to content

Instantly share code, notes, and snippets.

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

Sarucha Yanyong syanyong

🏠
Working from home
View GitHub Profile
@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
#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) {
# 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)
from google.colab import drive
drive.mount('/content/drive')
!unzip /content/drive/MyDrive/WorkshopML/dataset.zip -d /content/drive/MyDrive/WorkshopML/dataset
### 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
@syanyong
syanyong / pub.py
Created March 21, 2021 07:00
Demo code for exercise
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy # เรียก Libray จากภายนอก
from geometry_msgs.msg import Twist
import time
vel = Twist() # สร้าง Object สำหรับเปลี่ยนความเร็วหุ่นยนต์
def main (): # ฟังก์ชั่นหลัก
rospy.init_node('turtle_commander', anonymous=False) # Regis Node บน Master
@syanyong
syanyong / pub.py
Last active March 21, 2021 04:29
Getting start ROS Python pub.py (Created on Feb 21, 2021)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy # เรียก Libray จากภายนอก
from geometry_msgs.msg import Twist
import time
vel = Twist() # สร้าง Object สำหรับเปลี่ยนความเร็วหุ่นยนต์
def main (): # ฟังก์ชั่นหลัก
rospy.init_node('turtle_commander', anonymous=False) # Regis Node บน Master
@syanyong
syanyong / pub.py
Last active January 31, 2021 07:16
Jan 31, 2021 ROS Day 2
#!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
import time
# Noted
# Topic: /turtle1/cmd_vel
# Type: geometry_msgs/Twist
def main ():
#!/usr/bin/env python
import rospy
def main ():
rospy.init_node('turtle_commander', anonymous=True)
rate = rospy.Rate(10) # 10 Hz
while not rospy.is_shutdown():
# TODO
# END