Skip to content

Instantly share code, notes, and snippets.

View nguyenthenguyen's full-sized avatar

Nguyễn Thế Nguyên nguyenthenguyen

View GitHub Profile
@RamonWill
RamonWill / TkinterTemplate.py
Last active July 31, 2025 13:44
Tkinter GUI template
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
"""
Useful Links:
https://stackoverflow.com/questions/7546050/switch-between-two-frames-in-tkinter Most useful in my opinion
https://www.tutorialspoint.com/python/python_gui_programming.htm
https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html
@docPhil99
docPhil99 / opencv_qt_label.md
Last active July 3, 2025 22:26
How to display opencv video in pyqt apps

The code for this tutorial is here

Opencv provides are useful, but limited, method of building a GUI. A much more complete system could be acheived using pyqt. The question is, how do we display images. There are quite a few possible routes but perhaps the easiest is to use QLabel since it has a setPixmap function. Below is some code that creates two labels. It then creates a grey pixmap and displays it one of the labels. code: staticLabel1.py

from PyQt5.QtWidgets import QWidget, QApplication, QLabel, QVBoxLayout
from PyQt5.QtGui import QPixmap, QColor
import sys
@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active November 8, 2025 16:12 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

package main
import (
"fmt"
"log"
"net"
"time"
)
// Dialer .
@tmilos
tmilos / README.md
Last active August 16, 2025 04:44
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

@mopemope
mopemope / example_pongo2.go
Created July 16, 2014 06:45
Gin meets Pongo2 !
package main
import (
"github.com/flosch/pongo2"
"github.com/gin-gonic/gin"
"net/http"
)
type pongoRender struct {
cache map[string]*pongo2.Template
@netroy
netroy / sub.go
Last active January 11, 2019 21:57
Redis subscribe over websockets in golang
package main
import (
"github.com/chuckpreslar/emission"
"github.com/garyburd/redigo/redis"
"github.com/gorilla/websocket"
"log"
"net/http"
)