The usage of getattr from module in Python
import GPy # the name of kernel kernel_name = 'Matern32' # get class from module kernel_class = getattr(GPy.kern, kernel_name) #…
import GPy # the name of kernel kernel_name = 'Matern32' # get class from module kernel_class = getattr(GPy.kern, kernel_name) #…
import os import ftplib import glob import config from logging import getLogger, StreamHandler, Formatter, DEBUG, INFO logger = getLogger("FTP-client") logger.setLevel(INFO)…
Specifying the Python root directory is good to set in order to clarify which directory is root. And it helps…
Run Celery Worker Call function from Publisher thru broker Kill the process from broker
Set Information Id and Summary Convert Documents with Nodes, and Insert thoes
import os import zipfile def zip_directory( folder_path: str, zip_path: str ): with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf: for root, dirs,…
sudo /etc/init.d/ssh restart
cat /etc/os-release lsb_release -a uname -a
About We were using ServiceContext to convert documents into text, to feed text into LLMs, to make nodes from text.…
To count all JPEG files in a hierarchical directory in Linux, an efficient way is to use the find command.