赤诚地燃烧
看最新一期的十三邀, 片尾有一段话, 说的很好 做自己想做的事 爱自己想爱的人 走自己想走的路 痛了就哭, 喜了就笑 累了就歇, 好了就走 … 我看到了自己 也看到 生命原本的纯粹与自然 →Read more
手握灵珠常奋笔, 心开天籁不吹箫
看最新一期的十三邀, 片尾有一段话, 说的很好 做自己想做的事 爱自己想爱的人 走自己想走的路 痛了就哭, 喜了就笑 累了就歇, 好了就走 … 我看到了自己 也看到 生命原本的纯粹与自然 →Read more
唯一确定的是不确定性 唯一不变的是变化 无法预测未来, 只能拥抱变化 通过迭代与反馈的循环来学习如何应对变化 →Read more
write a Dockerfile FROM openjdk:21 COPY target/reminder.jar /usr/src/reminder WORKDIR /usr/src/reminder EXPOSE 8080 CMD ["java" ,"-jar", "reminder.jar" ] build image docker build –t reminder:1.0.0 . docker run -it -p 18080:8080 reminder:1.0.0 use cloud native buildpacks to build open container initiative(OCI) ./mvnw spring-boot:build-image →Read more
# Prompt Variable Example Category 1 You are an expert in {language}, please explain how the {function} works in {language} in a simple and understandable way language, function You are an expert in Python, please explain how the list comprehension works in Python in a simple and understandable way learn 2 You are an expert […] →Read more
create a cluster minikube start –force –image-mirror-country='cn' –image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers' –cpus 2 –memory 4g –driver docker –profile lazy-rabbit-studio kubectl get nodes kubectl get context kubectl config use-context lazy-rabbit-studio minikube image load gcr.io/k8s-minikube/kicbase:v0.0.45 minikube start –force –base-image=gcr.io/k8s-minikube/kicbase:v0.0.45 -cpus 2 –memory 4g –driver docker –profile lazy-rabbit-studio minikube start –vm-driver=docker –base-image="anjone/kicbase" –image-mirror-country='cn' –image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers' –kubernetes-version='v1.22.0' –force minikube start –vm-driver=docker –base-image="anjone/kicbase" –image-mirror-country='cn' […] →Read more
Overview Occasionally you will need to monitor components which cannot be scraped. The Prometheus Pushgateway allows you to push time series from short-lived service-level batch jobs to an intermediary job which Prometheus can scrape. Combined with Prometheus’s simple text-based exposition format, this makes it easy to instrument even shell scripts without a client library. Data […] →Read more
Overview Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. A Prettier plugin must first parse the source code of the target language into a traversable data structure (Usually an […] →Read more
Overview — 翻译自 25-perfect-ai-prompts-for-java-developers "Suggest strategies for optimizing Java code for improved performance, including using bytecode optimization and efficient memory management techniques." 请建议优化 Java 代码以提高性能的策略,包括使用字节码优化和高效的内存管理技术。 "Explain the principles of Java concurrency and suggest ways to use concurrency techniques for improved code performance and scalability." 请解释 Java 并发的原理并建议使用并发技术来提高代码性能和可扩展性的方法。 "Suggest ways to optimize Java code for improved […] →Read more
Cloud Native Buildpacks (CNBs) transform your application source code into container images that can run on any cloud. With buildpacks, organizations can concentrate the knowledge of container build best practices within a specialized team, instead of having application developers across the organization individually maintain their own Dockerfiles. This makes it easier to know what is […] →Read more
1. 编译成可执行文件 可以使用工具将 Python 脚本转换为独立的可执行文件: 工具: PyInstaller: 支持多平台(Windows、macOS 和 Linux)。 pyinstaller –onefile your_script.py 上述命令会生成一个单独的可执行文件,位于 dist/ 目录下。 cx_Freeze: 也是一个常用的工具,支持类似功能。 cxfreeze your_script.py –target-dir dist/ py2exe(Windows 专用): 将 Python 脚本编译成 Windows 下的可执行文件。 优点: 生成的可执行文件不需要 Python 环境即可运行。 部分情况下可以混淆或隐藏源代码。 缺点: 用专业的反编译工具可能仍然还原部分代码逻辑。 2. 字节码保护 Python 源代码在运行时会被编译成字节码文件(.pyc),可以通过生成 .pyc 文件分发代码: 使用 compileall 模块生成字节码文件: python -m compileall your_script.py 然后分发生成的 .pyc 文件。 配合工具如 cython 或 […] →Read more