UV - A Pip Alternative

Recently I discover a new package manager for Python, uv, which could be a pip alternative written in rust. Just like all the “Rust version” remakes, it has an incredible speed boost compared to pip or poetry. UV can even generate a virtual environment (like the python venv). This is the official benchmark from the uv project description. Just by the glance of this graph I’m alredy amazed by the claim....

April 10, 2024 · 3 min

LINE TECH FRESH 面試分享

LINE TECH FRESH 面試分享

April 5, 2024 · 5 min

Simple Introduction to CORS

最近在接一個外包的案子的時候遇到了一個error message Access to fetch at ‘https://some-web-service/’ from origin ‘http:...

March 19, 2024 · 3 min

Pyenv - Manage Python Environments Easily

What is Pyenv? When you got multiple python projects at hand that use different python versions, uninstall and reinstall between them makes your python environment a mess. With pyenv, a Python version management tool, can let developers easily manage, install and switch between python versions. Installation pyenv only work on UNIX/MacOS systems, the alternative on Windows is pyenv-win You can install using homebrew 1 2 brew update brew install pyenv Set Up Shell Environment You should be able to check your shell enviornment with this command: echo $SHELL, then execute the following command accordingly...

March 3, 2024 · 2 min

Q Learning Basics

Q Learning Basics, Concepts and Implementations

February 29, 2024 · 2 min

ERC-20 Token Transaction Fetching

Decoding tx details, interpreting ERC-20 token tx data from blockchain and etherscan.io

February 23, 2024 · 2 min

LeetCode 20. Valid Parentheses

Question Link Description: Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Every close bracket has a corresponding open bracket of the same type. Examples Example 1 1 2 Input: s = "()" Output: true Example 2 1 2 Input: s = "()[]{}" Output: true Example 3 1 2 Input: s = "(]" Output: false Constraints 1 <= s....

January 10, 2024 · 1 min

AioHttp 取代 Requests

1 2 3 4 5 6 7 8 9 10 11 async def main(): async with aiohttp.ClientSession() as session: collected_data = [] depth = 0 max_depth = os.getenv('MAX_DEPTH') INITIAL_ADDRESSES = [#some addresses here] tasks = [process_transactions(session, address, API_KEY, depth, max_depth, collected_data) for address in INITIAL_ADDRESSES] await asyncio.gather(*tasks) save_to_csv(collected_data)

November 17, 2023 · 1 min

Git Basics and Conventional Commits

What is Git? Github? Github簡單來說是一個線上原始碼存放的平台。Git 則是一個版本控制的工具,許多平台(如Github, Gitlab) 都依靠這個工具運作,兩個是不一樣的東西。 ...

May 26, 2023 · 6 min

LeetCode 55. Jump Game

Question Link Description: You are given an integer array nums. You are initially positioned at the array’s first index, and each element in the array represents your maximum jump length at that position. Return true if you can reach the last index, or false otherwise. Examples Example 1 1 2 3 Input: nums = [2,3,1,1,4] Output: true Explanation: Jump 1 step from index 0 to 1, then 3 steps to...

May 23, 2023 · 1 min