Skip to content

Instantly share code, notes, and snippets.

View codedeep79's full-sized avatar

Nguyễn Trung Hậu codedeep79

View GitHub Profile
@codedeep79
codedeep79 / Cài đặt PyTorch trên Debian.md
Last active August 20, 2022 16:00
Cài đặt PyTorch trên Debian

Install Python package manager

Pip is the native Python package manager. We will use it to install PyTorch and torchvision. To install pip3, run the following command. Because pip3 depends on Python 3, python3 will also be installed if it is not in your Debian system.

sudo apt install python3-pip

Installing PyTorch

pip3 install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
@codedeep79
codedeep79 / Cài đặt OpenCV trên Ubuntu 18.04.md
Last active August 20, 2022 15:13
Cài đặt OpenCV trên Ubuntu 18.04

OpenCV (Open Source Computer Vision Library) là một thư viện thị giác máy tính mã nguồn mở. Nó được sử dụng cho rất nhiều ứng dụng, bao gồm phân tích hình ảnh y tế, video giám sát, phát hiện và nhận dạng khuôn mặt, theo dõi các đối tượng chuyển động, trích xuất mô hình 3D, v.v. OpenCV có thể tận dụng khả năng xử lý đa lõi và có tính năng tăng tốc GPU để hoạt động trong thời gian thực.

Cài đặt OpenCV từ Ubuntu Repository

Để cài đặt OpenCV từ Ubuntu 18.04 repositories, hãy làm theo các bước sau:

sudo apt update
sudo apt install python3-opencv

Lệnh trên sẽ cài đặt tất cả các package cần thiết để chạy OpenCV. Để xác minh cài đặt, hãy nhập module cv2 và in phiên bản OpenCV:

@codedeep79
codedeep79 / Cài đặt TensorFlow trên Ubuntu 20.04.md
Last active August 20, 2022 14:44
Cài đặt TensorFlow trên Ubuntu 20.04

Một thư viện học máy mã nguồn mở, TensorFlow được sử dụng để đào tạo mạng nơ-ron. Được thể hiện dưới dạng biểu đồ luồng dữ liệu trạng thái, mỗi nút trong biểu đồ đại diện cho các hoạt động được thực hiện bởi mạng nơ-ron trên mảng đa chiều. Các mảng đa chiều này thường được gọi là "tensors", do đó có tên là TensorFlow.

Điều kiện tiên quyết

Trước khi bắt đầu hướng dẫn này, bạn sẽ cần những thứ sau:

  • Một máy chủ Ubuntu 20.04 với ít nhất 4GB RAM
  • Python 3.8 trở lên và đã cài đặt virtualenv.

Bước 1 - Tạo môi trường lập trình

Trong bước này, chúng tôi sẽ tạo một môi trường ảo để cài đặt TensorFlow vào đó mà không ảnh hưởng đến các dự án lập trình khác của chúng tôi. Nếu đã tạo virtualenv, vui lòng bỏ qua bước 1. Đầu tiên, tạo một thư mục dự án. Chúng tôi sẽ gọi nó là tf-demo cho mục đích demo, nhưng hãy chọn một tên thư mục có ý nghĩa đối với bạn:

mkdir ~/tf-demo
@codedeep79
codedeep79 / Cài đặt driver và Arduino IDE trong Debian.md
Last active August 20, 2022 14:06
Cài đặt driver và Arduino IDE trong Debian

First, go to https://www.arduino.cc . Then, click on Download

Choose the right version for your operating system You will be redirected to a page inviting the right to contribute money to develop software for Arduino, continue to click JUST DOWNLOAD to start downloading. The file is compressed and you have to extract it in a suitable folder, remembering that it will be executed from there. Open the arduino-1.x.x folder just created by the extraction process and spot the install.sh file. Right click on it and choose Run in Terminal from the contextual menu. The installation process will quickly end and you should find a new icon on your desktop.

@codedeep79
codedeep79 / Software testing.md
Last active August 20, 2022 03:34
Kiểm thử phần mềm
  • Cross-browser testing
  • Recovery testing: Recovery testing is performed in order to determine how quickly the system can recover after the system crash or hardware failure. It comes under the type of non-functional testing.
  • Test Load Balancer(TLB)
  • Database Testing: Database testing is done to validate the data in the UI is matched with the data stored in the database. It involves in checking the schema, tables, triggers etc., of the database.
  • Concurrency testing: Concurrency testing means accessing the application at the same time by multiple users to ensure the stability of the system. This is mainly used to identify deadlock issues.
  • Fuzz testing: Fuzz testing is used to identify coding errors and security loopholes in an application. By inputting a massive amount of random data to the system in an attempt to make it crash to identify if anything breaks in the application.
  • GUI Testing: Graphical User Interface Testing is to test the interface between the application a
@codedeep79
codedeep79 / Những công cụ kiểm thử trình duyệt chéo.md
Created August 20, 2022 02:43
Những công cụ kiểm thử trình duyệt chéo

Cross-browser testing is simply testing your website or application in multiple browsers and making sure that it works consistently and correctly without any issues. This applies to both web applications and websites.

Obviously the best idea is to test browser compatibility because it is impossible to guess or control which browser, platform, version of browser the end user will use.

Why is cross browser testing done? To know which browsers are making the function go wrong so that it can be repaired. To improve efficiency and usability for users so that the product is the best business.

What we need to test under browser testing:

  • CSS validation
  • HTML or XHTML validation
  • Page validations with and without JavaScript enabled.
@codedeep79
codedeep79 / No-Code Tools You should definitely try.md
Created August 20, 2022 01:57
No-Code Tools You should definitely try

Google AppSheet

Google AppSheet is a web app that allows you to build a spreadsheet-based app without writing any single line of code.

Zapier

Zapier is a workflow automation tool that connects the apps you use.

Webflow

Webflow is a website builder that lets you create your own website without writing any code. Using drag and drop tools, it's easy to build a beautiful site in just minutes.

Thunkable

Thunkable makes it easy for you to build your application in no time, whether you're looking for a hands-on experience with no code creation or are launching your very own business.

Bravo Studio

Bravo Studio is an app builder for designers and developers. It makes it possible to turn Figma prototypes into native iOS and Android applications instantly without writing any code—and allows users to test their designs on r

@codedeep79
codedeep79 / Visualize YouTube Data with Plotly Express.md
Last active August 18, 2022 09:10
Visualize YouTube Data with Plotly Express

In this tutorial, we will create data visualizations of popular YouTube channels using Python, Plotly Express, and Google Colab.

First, visit Google Colab and start a "New notebook".

After that, make sure you have the latest version of Python on your machine. You can check this by typing $ python --version in the Windows command prompt or the terminal on Mac and Linux. It would be best if you were running Python version 3.10 or above.

Dataset

I will use the "Most Subscribed YouTube Channels" dataset from Kaggle. It contains data about the top 1000 YouTube channels. There are seven columns:

  • rank: Rank of the channel as per total subscribers (1-1000)
  • youtuber: Channel name
  • subscribers: Total number of followers
@codedeep79
codedeep79 / Install Java OpenJDK.md
Created August 17, 2022 01:20
Install Java OpenJDK 8-18

Update System

First, update your Debian operating system to ensure all existing packages are up to date

sudo apt update && sudo apt upgrade -y

Install Java OpenJDK

Install Java OpenJDK 8

sudo apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main'