Rico's Nerd Cluster

「离开世界之前 一切都是过程」

Python - File Management

os

File Path Processing os.path.basename("/home/foo/Downloads/000000.pcd") gives the string after the last “/”. So here we get: 000000.pcd os.path.splitext("/home/foo/Downloads/000000.pcd") give...

Python - Enums

Enum, IntEnum

IntEnum IntEnum’s members are ints, while enum instance’s members are its own class Enum: Base class for creating enumerated constants. IntEnum: Base class for creating enumera...

Python - Python Iterables

Iterable, Itertools, Round Robin Counter

What is An Iterable An iterable is any object that returns an iterator, which allows you to iterate its elements. Some common examples include lists, dictionaries, sets, and strings. Iterating ove...

Python - Jupyter Notebook Common Magic Commands

Jupyter Notebook Common Magic Commands

Magic command %command is a function in IPython. Make sure matplotlib is rendered inline Immediately autoreload modules if they are changed outside 1 2 3 4 5 6 7 8 9 10 11 %matplotlib inlin...

Python - Python Misc, os, shutil

Sys, Print, Argparse Path-Related Utils, HDF5

sys Check current python version 1 2 3 4 if sys.version_info.major == 3 and sys.version_info.minor == 10: print("Python version is 3.10") else: print(f"Python version is not 3.10, it'...

Python - Functions

Map-Reduce-Filter, Lambda (Under Active Updates)

Map, Reduce, Filter Map, Reduce, Filter are paradigms of functional programming. WIth them, we can write simpler and shorter programs. They are applied on iterables. Map map(callable, iterable) ...

Adoc

📄 What is AsciiDoc? An .adoc file is a text file written in AsciiDoc format—a lightweight and readable markup language used for writing technical documentation, software manuals, README files, and...

Gitlab Misc.

Access Control, Gitlab CI

Access Control If you are not sure who have the merge privileges, Go to your project. Navigate to: Project Information > Members Check Roles with write access: Maintainer – F...

Git - Workflows

Git Test Runners, CI/CD, PyPi

Local Git Repo Setup Copy ssh key to Github Set up email and username: 1 2 git config --global user.name "Your Name" git config --global user.email "your_email@example.com" Regular Git Wo...

Git and VCS

Gitalk, CI/CD, vcstools

Gitalk Gitalk is a free, open-source commenting system that uses GitHub issues for comment storage. It’s an excellent option for developers hosting websites on platforms like GitHub Pages. Cre...