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 / tut.md
Last active December 4, 2025 00:24
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
@rain1024
rain1024 / _vscode_dont_touch_the_mouse.md
Last active June 14, 2025 09:52
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.

@rain1024
rain1024 / pytorch_lightning_simplest_example.py
Last active June 14, 2024 23:45
Simplest Pytorch Lightning Example
import pytorch_lightning as pl
import numpy as np
import torch
from torch.nn import MSELoss
from torch.optim import Adam
from torch.utils.data import DataLoader, Dataset
import torch.nn as nn
class SimpleDataset(Dataset):
@rain1024
rain1024 / azure_openai_nodejs_starter_code.js
Last active June 3, 2024 07:38
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 / 0 design-pattern.md
Last active March 9, 2024 22:47
design pattern

Design Pattern

  • name
  • intent
  • problem/motivation
  • solution
  • structure
  • code
  • consequences & trade-offs

Creational

@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 / 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 / Galaxy Of Tutorial Torrents
Created December 9, 2016 16:02 — forked from TristinDavis/Galaxy Of Tutorial Torrents
Ultimate Galaxy Of Tutorial Torrents
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@rain1024
rain1024 / 002. io.md
Last active October 1, 2022 05:58
shell

Input, Output

read X
read Y
echo $((X+Y))
echo $((X-Y))
echo $((X*Y))
echo $((X/Y))