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 April 25, 2024 18:43
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 April 13, 2024 15:48
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
package main
import (
"fmt"
"log"
"net"
"time"
)
// Dialer .
@tmilos
tmilos / README.md
Last active March 18, 2024 05:34
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"
)