The with open
statement is a particularly convenient feature in Python, allowing for automatic closure of objects when operations are completed. For custom objects, it’s also possible to support the with
syntax.
The with open
statement is a particularly convenient feature in Python, allowing for automatic closure of objects when operations are completed. For custom objects, it’s also possible to support the with
syntax.
From past experiences… I have gained many skills as a byproduct… Today, this is also the case. My original intention was to use the source code provided by NetEase to compile an improved version of VirtualBox, but in the end… I learned several Docker-related skills…
Although I also use Git for some project code management, I actually don’t know many of Git’s features and haven’t used them. Today, I tried using Git hooks.
While chaining various programs using Bash, you often discover some amazing and useful tricks. Here are two I recently found.
To learn Go language, I rewrote a script that was used frequently in my previous work. Compared to Python, which is simple, quick, easy to understand and has many useful third-party modules with abundant learning materials in both Chinese and English, if it wasn’t for performance reasons, I really wouldn’t want to switch…
I recently discovered GNU Parallel, a simple and useful parallel program implemented in Perl, which can easily execute various commands in Bash in parallel. This is particularly useful for tasks that can be divided into independent subtasks.
After using snakemake for some time, I found that it has many practical features to facilitate daily analysis. Here is a record and整理.
R provides convenient multiprocessing capabilities, and Python has similar functionality.