在这篇短文中,我们记录了如何在使用 [Ubuntu][] 1804 LTS
操作系统的单台服务器上,建立用户隔离的 [JupyterLab][] Web 环境。
目标是:
- 操作系统的用户可以各自不受干扰的使用独立的 [JupyterLab][]
- 各个用户的 [Conda][] 环境可以自动的出现在 [JupyterLab][] 的
Kernel
列表中
/* | |
============================================================================ | |
Name : StringSplit.c | |
Author : | |
Version : | |
Copyright : | |
Description : Hello World in C, Ansi-style | |
============================================================================ | |
*/ |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Created on 2011-8-29 | |
@author: tanbro | |
''' | |
import os |
#ifndef __RE_REPLACE__ | |
#define __RE_REPLACE__ | |
#include <string.h> | |
#include <regex.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif |
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/>`_ |
#!/usr/bin/env python | |
# encoding: utf-8 | |
''' | |
printver -- print version and date of python modules | |
print module's __version__, __date__ and __updated__ variable | |
:author: Liu Xue Yan | |
:mail: tanbro@163.com | |
''' |
import sys | |
import os | |
try: | |
import fcntl | |
except ImportError: | |
fcntl = None | |
LOCK_PATH = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "lock") | |
OS_WIN = False |
# -*- coding: utf-8 -*- | |
""" | |
Re-Pack `Wheel` to a PYC-Only One | |
""" | |
from __future__ import print_function, unicode_literals | |
import argparse | |
import compileall |
import re | |
HANZI = r'([\u4E00-\u9FFF]|[\u3400-\u4DBF]|[\U00020000-\U0002A6DF]|[\U0002A700-\U0002B73F]|[\U0002B740-\U0002B81F]|[\U0002B820-\U0002CEAF]|[\uF900-\uFAFF]|[\U0002F800-\U0002FA1F])' | |
CJK_WHITESPACE_REGEX = re.compile(r'(?P<c>[\u2E80-\u9FFF])(\s+)') | |
def remove_cjk_whitespace(s): # type: (str)->str | |
"""删除字符串中 CJK 文字之间的空格 |
""" | |
Remove line seperator in a text | |
""" | |
import re | |
REMOVE_LINESEP_RE = re.compile(r'(?P<c>[\S])([\r|\n]+)') | |
def remove_linesep(s): # type: (str)->str | |
return re.sub(REMOVE_LINESEP_RE, r'\g<c>', s.strip()) |