Tips and Traps¶
- Most videoes have a FPS of 24. Some videos have higher FPS (e.g., 30 or 60) so that they can capture motions better. A record video on a computer has a FPS of the refresh rate of the monitor, which is usually 60. You can get the FPS of a video using OpenCV in Python.
Get User's Information in Python
Encoding and Decoding Base64 String in Python
Packaging Python Dependencies for PySpark Using python-build-standalone
You can build a portable Python environment following steps below.
-
Install python-build-standalone.
-
Install Python packages using pip of the installed python-build-standalone distribution.
-
Pack the whole python-build-standalone directory into a compressed file, e.g.,
env.tar.gz
.
The GitHub repo dclong/python-portable has good examples of building portable Python environments leveraging …
Packaging Python Dependencies for PySpark Using conda-pack
python-build-standalone is a better alternative to conda-pack on managing Python dependencies for PySpark. Please refer to Packaging Python Dependencies for PySpark Using python-build-standalone for tutorials on how to use python-build-standalone to manage Python dependencies for PySpark.
Build Portable Python Environments Using conda-pack
Please refer to the GitHub repo dclong/conda_environ …
Build a Fat JAR Using Maven Without a Java Project
You can use Maven to download dependencies of Java packages without creating a Java project.
For example,
if you want to download all dependencies of arrow-jvm
and arrow-memory
and build everything into a single fat jar (for easy use in other places),
you can first crate a file pom.xml …