0%

1. Generate new RSA SSH keys

ssh-keygen -t rsa -b 2048 -C "email@example.com"

for example, I have 2 keys in my laptop

~/.ssh/id_rsa
~/.ssh/tpp_rsa

Next, add the new key you just created

ssh-add ~/.ssh/tpp_rsa

You can check your added keys

ssh-add -l

2. Modify the ssh config

nano ~/.ssh/config
Read more »

TF-IDF short for term frequency – inverse document frequency, is a numerical statistic that is intended to reflect how important a word is to a document in a collection or corpus. It is often used as a weighting factor in searches of information retrieval, text mining, and user modeling. The tf–idf value increases proportionally to the number of times a word appears in the document and is offset by the number of documents in the corpus that contain the word, which helps to adjust for the fact that some words appear more frequently in general. tf–idf is one of the most popular term-weighting schemes today.

1. Bag of words

Tokenize a sentence

from nltk.tokenize import TreebankWordTokenizer

sentence = "The faster Harry got to the store, the faster Harry, the faster, would get home."
tokenizer = TreebankWordTokenizer()
token_sequence = tokenizer.tokenize(sentence.lower())
print(token_sequence)
['the', 'faster', 'harry', 'got', 'to', 'the', 'store', ',', 'the', 'faster', 'harry', ',', 'the', 'faster', ',', 'would', 'get', 'home', '.']
Read more »

1. Overview

This is a simple example of how to config your own headless chrome browser inside a docker container. Then use a simple Python web application to say hello world with python selenium.

Project structure: - app.py - Dockerfile - bin/ + chromedriver + google-chrome-87_amd64.deb

Source code on GitHub

2. Coding

  • Dockerfile
Read more »

Hey fellow coders! Let me share a personal fork in my life's repository - becoming a dad. It's like deploying a new life feature that brings unexpected joys and challenges.

The Big Reveal

Our journey began in Dalat City, not with debugging, but with discovering we were expecting. The moment I learned about our upcoming 'release' (our baby), it felt like a successful code compilation after countless errors.

Health Check Commit

We faced our first 'bug' early on due to missed health checks. My wife, a fellow enthusiast of chill beers and algorithms, had her concerns. Thankfully, our little 'program' was error-free and running smoothly.

The Deployment Day

Read more »

Getting Started

  1. Download gcloud private key on google cloud console

IAM & Admin -> Service Accounts -> Your account name -> Add key -> Create New Key

  1. Install google cloud sdk
  • Download

curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-317.0.0-linux-x86_64.tar.gz

  • Untar

tar -xf google-cloud-sdk-317.0.0-linux-x86_64.tar.gz

  • Install

./google-cloud-sdk/install.sh

Read more »