Skip to content

Instantly share code, notes, and snippets.

View BlackHacked's full-sized avatar
📷
Hello World

Latin BlackHacked

📷
Hello World
View GitHub Profile
## Build angular site
- name: build
pull: if-not-exists
image: node:16.18.1-alpine
when:
branch:
- master
event:
- push
commands:

每个 Python 程序员可能都会遇到这样的场景:你写了一个 Python 程序,可能是一个简单的、包含单个文件的 、只使用了标准库的 Python 脚本,抑或是一个庞大的、包含多个模块的、甚至引用了大量的第三方库的复杂 Python 应用,如何将他们送到目标用户手中,让他们能很顺利地使用起来呢?

一种方案就是写一个详尽的文档,连带着你的程序一起发送给用户。文档中要说明,目标用户如何在自己机器上安装 Python 环境及依赖的包,如何对程序进行配置,等等。但倘若你的目标用户没用过 Python 甚至不懂编程,此种方案执行起来便困难重重。

另一种方案,就是将 Python 程序“打包”成可执行程序(.exe),只要目标用户具备基本的电脑操作技能,便能很容易地将程序运行起来。

在 Windows 平台上,将 Python 程序“打包”为可执行程序(.exe)的方案很多,我尝试过的方案有如下几种:

@WeltonThomasFerreira
WeltonThomasFerreira / README.md
Last active August 30, 2022 09:06
MongoDB: Basic Shell and CRUD
@craig-m-unsw
craig-m-unsw / README.md
Last active August 30, 2022 09:05
Learn MongoDB with docker-compose
from tinydb import TinyDB
# Disk storage
db = TinyDB('data.json')
# Memory storage
from tinydb.storages import MemoryStorage, Storage
db = TinyDB(storage=MemoryStorage)
@bangonkali
bangonkali / README.md
Last active May 16, 2022 04:01
Jetson Xavier NX Notes

Docker Snippets

Create a deepstream-l4t docker container instance.

sudo docker run -it \
  --rm \
  --net=host \
  --runtime nvidia \
 -e DISPLAY=$DISPLAY \
@sandys
sandys / Fastapi-sqlalchemy-pydantic-dataclasses-reloadable-logging.md
Last active June 30, 2024 09:23
fastapi with python 3.10 dataclasses - used to create both sqlalchemy and pydantic models simultaneously. And setting up sqlalchemy the right way (without deadlocks or other problems). Additionally, this also takes care of unified logging when running under gunicorn..as well as being able to run in restartable mode.
@nkhitrov
nkhitrov / logger.py
Last active July 3, 2024 03:12
Configure uvicorn logs with loguru for FastAPI
"""
WARNING: dont use loguru, use structlog
https://gist.github.com/nkhitrov/38adbb314f0d35371eba4ffb8f27078f
Configure handlers and formats for application loggers.
"""
import logging
import sys
from pprint import pformat
@ptantiku
ptantiku / setup-python3.8-via-ppa.sh
Last active April 14, 2023 12:31
Setup Python3.8 in Ubuntu Xenial (16.04 LTS). The python version was fixed at Python 3.5.1
#!/bin/sh
# install PPA
sudo add-apt-repository ppa:deadsnakes/ppa
# update and install
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv
# setup alternatives
@BoWang816
BoWang816 / ubuntu中文支持,及中文乱码问题
Created October 8, 2019 10:25
[ubuntu中文支持,及中文乱码问题] #日常安装总结
ubuntu中文支持,及中文乱码问题
该篇博文,是本人踩了一下午的坑的成果,亲测有效。对服务器同样有效。
状况:所用的ubuntu系统不支持中文,遇见中文就????。ORZ…
目标:使系统/服务器支持中文,能够正常显示。
首先,安装中文支持包language-pack-zh-hans: