Skip to content

Instantly share code, notes, and snippets.

View cobaohieu's full-sized avatar

Hieu C B cobaohieu

View GitHub Profile
##install https://brew.sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew upgrade
##nvidia gfx driver install
https://github.com/vulgo/webdriver.sh
@cobaohieu
cobaohieu / gist:1c3634a18d7b8a716bc98b5151ca050b
Last active September 7, 2021 17:01 — forked from tzvsi/gist:222b3b22a847004a729744f89fe31255
Installing CUDA 10.2, CuDNN 8.0.2, TensorRT 8.0.1, Ubuntu 18.04

Step 1: Installing CUDA (~5.5 minutes)

You can also install CUDA directly from the offline installer, but this is a little easier.

sudo apt update
sudo apt upgrade -y

mkdir install ; cd install
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
@cobaohieu
cobaohieu / opencv_qt_label.md
Created August 11, 2021 12:56 — forked from docPhil99/opencv_qt_label.md
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
@cobaohieu
cobaohieu / resizeImg.py
Last active July 21, 2021 09:39 — forked from justudin/resizeImg.py
bulk resize image with python with its its corresponding subdirectory/folder
# -*- coding: utf-8 -*-
"""
Clone on Wed Jul 21 16:39:29 2021
@author: xyz
This code is used to resize the images from dir/subdir to new directory (newdir/subdir) with its corresponding subdirectory
Original folder with it subdir:
./vegetables
@cobaohieu
cobaohieu / Install PyQt5 on Ubuntu with python3.md
Last active May 29, 2021 15:06 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@cobaohieu
cobaohieu / update-gcc.md
Last active April 4, 2024 09:43 — forked from patrickmmartin/PYTHON_DEFAULT.md
update-alternatives for gcc on Ubuntu

Run the following commands as root or user with sudo access to update the packages list and install the prerequisites: To install the Development Tools packages, run the following command as root or user with sudo privileges :

$ sudo apt update
$ sudo apt-get upgrade -y
$ sudo apt-get dist-upgrade -y
$ sudo apt-get install build-essential software-properties-common manpages-dev -y
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
$ sudo apt-get update -y
@cobaohieu
cobaohieu / update-python.md
Last active June 3, 2021 15:48 — forked from growtopiajaw/update-python.md
update-alternatives for python2 and python3 in Ubuntu 18.04.x
  • Run the following commands as root or user with sudo access to update the packages list and install the prerequisites:
$ sudo apt update
$ sudo apt install software-properties-common
  • Add the deadsnakes PPA to your system’s sources list:
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@cobaohieu
cobaohieu / Activate Office 2019 for macOS VoL.md
Created November 28, 2019 16:07 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref