在这篇短文中,我们记录了如何在使用 [Ubuntu][] 1804 LTS
操作系统的单台服务器上,建立用户隔离的 [JupyterLab][] Web 环境。
目标是:
- 操作系统的用户可以各自不受干扰的使用独立的 [JupyterLab][]
- 各个用户的 [Conda][] 环境可以自动的出现在 [JupyterLab][] 的
Kernel
列表中
#!/usr/bin/env python | |
""" | |
Export all source code files into a single HTML file with Pygments syntax highlight and remove all comments and empty lines. | |
""" | |
import argparse | |
import fnmatch | |
import os | |
import sys |
from __future__ import annotations | |
from typing import Any, Dict, Iterable, Mapping, MutableMapping, MutableSequence, Union | |
class AttrDict: | |
""" | |
A class with both dictionary and attribute style access to it's data member. | |
It can be used in `RestrictedPython <http://restrictedpython.readthedocs.io/>`_ |
class SnippetFuncExecutor: | |
""" | |
exec and eval a Python code snippet with return expression, as if it's in a non-arguments function | |
""" | |
def __init__( | |
self, | |
*, | |
prefix: Optional[str] = None, | |
optimize: int = -1, |
#!/usr/bin/env python3 | |
""" | |
# Report PyProject version | |
The tool print python source code project's version from pip install report with a dry-run. | |
The project MUST have a `pyproject.toml` file with metadata defined in it! | |
- On non-western language Windows, environment `PYTHONUTF8` may be in need . |
docker 的 daemon.json
以及 registry 配置参考:
""" | |
Change dictionary's key naming style | |
""" | |
from typing import ( | |
Any, | |
Callable, | |
Iterable, | |
Mapping, | |
MutableMapping, |
#ifndef __RE_REPLACE__ | |
#define __RE_REPLACE__ | |
#include <string.h> | |
#include <regex.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif |
#!/usr/bin/env python3 | |
""" | |
使用 quay.io 提供的 pypa/manylinux Docker 镜像构建该项目及其依赖软件的 Python Wheel 发布包 | |
""" | |
import argparse | |
import os | |
import os.path | |
import platform |
from itertools import product | |
from pathlib import Path | |
from random import choice, randint, randrange, uniform | |
from typing import Any, BinaryIO, Mapping, Optional, Sequence, Union | |
from PIL import Image, ImageDraw, ImageFilter, ImageFont | |
__all__ = ['captcha_image'] | |