Skip to content

Instantly share code, notes, and snippets.

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

Vu Anh rain1024

🏠
Working from home
View GitHub Profile
@rain1024
rain1024 / filtered_words.py
Created November 22, 2023 14:02
filtered_words
import docx
import os
def extract(input_files, output_dir, words):
# Create the output directory if it doesn't exist
if not os.path.exists(output_dir):
os.makedirs(output_dir)
# Iterate through the input files
@rain1024
rain1024 / azure_openai_nodejs_starter_code.js
Last active May 2, 2024 05:28
Azure OpenAI Starter Code
const axios = require('axios');
const YOUR_RESOURCE_NAME = ''; // Replace with your Azure OpenAI Resource name
const YOUR_DEPLOYMENT_NAME = ''; // Replace with your deployment id
const YOUR_API_KEY = ''; // Replace with your API key
const endpoint = `https://${YOUR_RESOURCE_NAME}.openai.azure.com/openai/deployments/${YOUR_DEPLOYMENT_NAME}/chat/completions?api-version=2023-05-15`;
async function getChatCompletions() {
try {
@rain1024
rain1024 / python_vscode.md
Last active March 8, 2023 08:53
Python with VSCode

File .vscode/lauch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Current File",
      "type": "python",
 "request": "launch",
@rain1024
rain1024 / _vscode_dont_touch_the_mouse.md
Last active February 21, 2023 22:41
VSCode - Don't Tourch The Mouse

VS Code - Don't Touch The Mouse

Visual Studio Code (VS Code) is a widely used code editor that provides a range of features to aid developers in writing efficient code. However, not all developers are aware of the various keyboard shortcuts and hidden features that can significantly enhance their productivity. One such feature is the ability to navigate and edit code without using a mouse, which can save time and streamline workflow.

These articles aims to highlight the advantages of not using a mouse while using VS Code and provide tips and tricks to navigate and edit code without one. Whether you're a novice or an experienced developer, learning these techniques can improve your efficiency and productivity in using VS Code.

C++ 20 programming with Visual Studio Code (macOS Monterey)

Environment

  • C++ 20
  • macOS Montery
  • Visual Studio Code
  • Compiler: Clang++

Instructions

@rain1024
rain1024 / debug_cpp_ubuntu_vscode.md
Last active May 23, 2022 09:31
Debug C++ on Ubuntu 20.04 with Visual Studio Code
@rain1024
rain1024 / debug_cpp_mac_vscode.md
Last active May 23, 2022 09:13
Debug C++ on Mac with Visual Studio Code
@rain1024
rain1024 / cpp_ubuntu_instruction.md
Last active May 9, 2022 06:58
C++ programming with Visual Studio Code (Ubuntu 20.04)

C++ programming with Visual Studio Code (Ubuntu 20.04)

Install VS Code Ubuntu 20.04

sudo apt update && sudo apt-get upgrade --fix-missing 
sudo apt install build-essential checkinstall
sudo apt install ubuntu-restricted-extras
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
@rain1024
rain1024 / install_cuda-11.4_ubuntu-18.04.sh
Created October 22, 2021 08:57
CUDA 11.4 Installation on Ubuntu 18.04
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
sudo apt update
sudo apt install -y cuda
@rain1024
rain1024 / Rasa and Tensorflow Compatibility.md
Last active October 22, 2021 06:49
Deep Learning Dependencies

Rasa and Tensorflow Compatibility

Rasa Release Date Tensorflow